安全意识调查、培训需求调查
This commit is contained in:
parent
c19d5ecd8f
commit
038f01dcac
@ -2,7 +2,7 @@
|
||||
<view class="todo-page">
|
||||
<view class="background"></view>
|
||||
<view class="allview">
|
||||
<view class="card" >
|
||||
<view class="card">
|
||||
<u--form labelWidth="auto" :model="model" ref="wForm" class="demo-ruleForm">
|
||||
<view style="position: relative;">
|
||||
<view style="position: absolute;left: -10px;color: #3d4b70;top: -3px;">*</view>
|
||||
@ -12,27 +12,77 @@
|
||||
<u-form-item required label="调查名称" prop="LOCATION" borderBottom>
|
||||
<u--input disabledColor="#ffffff" v-model="model.NAME" border="none" inputAlign="right" fontSize="14px" placeholder="请输入调查名称"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
|
||||
<u-form-item required label="截止时间" prop="ENDTIME" borderBottom @click="showCheckDate(1)">
|
||||
<u--input disabled disabledColor="#fff" v-model="model.END_TIME" placeholder="请选择时间" border="none" inputAlign="right" fontSize="14px"></u--input>
|
||||
<u-icon style="margin-left: 4px;" name="arrow-down" size="12"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item required label="参与部门" @click="handleShowSheet({title: '参与部门', name: 'Nav_JoinDepartment'})" >
|
||||
<u-form-item required label="参与部门" @click="handleShowSheet({title: '参与部门', name: 'Nav_JoinDepartment'})">
|
||||
<u-icon name="arrow-down" size="12" slot="right"></u-icon>
|
||||
</u-form-item>
|
||||
<view class="tag-view" v-if="model.Nav_JoinDepartment">
|
||||
<uni-tag class="tag" v-for="(i, k) in model.Nav_JoinDepartment.filter(i => !i.IS_DELETED)" :key="k" :inverted="true" :text="i.Nav_Department.NAME" type="primary" />
|
||||
</view>
|
||||
<u-form-item required label="调查内容" @click="handleShowSheet({title: '调查内容', name: 'Nav_Points'})" >
|
||||
<u-form-item required label="调查内容" @click="handleShowSheet({title: '调查内容', name: 'Nav_Points'})">
|
||||
<u-icon name="arrow-down" size="12" slot="right"></u-icon>
|
||||
</u-form-item>
|
||||
<view class="tag-view" v-if="model.Nav_Points">
|
||||
<uni-tag class="tag" v-for="(i, k) in model.Nav_Points.filter(i => !i.IS_DELETED)" :key="k" :inverted="true" :text="i.Nav_Point.NAME" type="primary" />
|
||||
</view>
|
||||
<u-form-item label="含下级组织成员" v-if="model.STATUS == undefined||model.STATUS == '0'">
|
||||
<u-switch v-model="model.IS_DOWN" @change="changeDown" slot="right"></u-switch>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<u--form labelWidth="auto" :model="model" ref="wForm" class="sub-form">
|
||||
|
||||
|
||||
<view style="position: relative;">
|
||||
|
||||
<view style="position: absolute;left: -10px;color: #3d4b70;top: -3px;">*</view>
|
||||
</view>
|
||||
|
||||
<view style="font-size: 15px; font-weight: bold;color: #3d4b70;margin-bottom: 10px;margin-top: 20px;">组织人员</view>
|
||||
<uni-collapse :border="false" accordion>
|
||||
<view v-for="(item, index) in model.Nav_ListUsers.filter(i => !i.IS_DELETED)" :key="index">
|
||||
<uni-collapse-item title-border="none" :border="false">
|
||||
<template v-slot:title>
|
||||
<view class="uni-collapse-item__title-box">
|
||||
<view class="uni-collapse-item__title-text">
|
||||
{{index+1+'.'+(item.Nav_Department||{}).NAME+'-'+(item.Nav_User||{}).NAME}}
|
||||
</view>
|
||||
<view @click.stop>
|
||||
<u-icon @click="handleDelRowBefore(item)" name="trash" color="#ff4d4f" size="21" style="margin-right: 10px;"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view class="content" style="padding: 0px 0px 0px 10px;">
|
||||
|
||||
<u-form-item label="组织" prop="Product_Unit" @click="handleShowSheet({title: '组织', name: 'Nav_Department',itemData:item})" borderBottom>
|
||||
<u--input v-model="(item.Nav_Department||{}).NAME" disabled disabledColor="#ffffff" placeholder="请选择组织" border="none" inputAlign="right" fontSize="14px">
|
||||
</u--input>
|
||||
<u-icon style="margin-left: 4px;" name="arrow-down" size="12">
|
||||
</u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="人员" prop="Product_Unit" @click="handleShowSheet({title: '人员', name: 'Nav_User',itemData:item})" borderBottom>
|
||||
<u--input v-model="(item.Nav_User||{}).NAME" disabled disabledColor="#ffffff" placeholder="请选择人员" border="none" inputAlign="right" fontSize="14px">
|
||||
</u--input>
|
||||
<u-icon style="margin-left: 4px;" name="arrow-down" size="12">
|
||||
</u-icon>
|
||||
</u-form-item>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</uni-collapse-item>
|
||||
</view>
|
||||
</uni-collapse>
|
||||
<view style="padding: 10px 16px;display: flex;flex-direction: row;">
|
||||
<u-button type="primary" @click="handleNew" color="#3d4b70" :plain="true" style="margin-right: 5px;">新增</u-button>
|
||||
<!-- <u-button type="primary" @click="handleNewCheckList" color="#3d4b70" style="margin-left: 5px;">检查清单</u-button> -->
|
||||
</view>
|
||||
</u--form>
|
||||
</view>
|
||||
<view style="padding: 10px 16px;" class="bottom-button">
|
||||
<view style="padding: 10px 16px;" class="bottom-button">
|
||||
<u-button type="primary" @click="submit" color="#3d4b70" :loading="stepLoad">提交</u-button>
|
||||
</view>
|
||||
<query-selector :multiple="selectorInfo.isMultiple" :show="selectorInfo.showPopup" :title="selectorInfo.title" :lists="selectorInfo.dataLists" :defaultChecked="selectorInfo.defaultChecked"
|
||||
@ -88,9 +138,10 @@
|
||||
model: {
|
||||
Nav_JoinDepartment: [],
|
||||
Nav_Points: [],
|
||||
NAME:'',
|
||||
END_TIME:'',
|
||||
|
||||
NAME: '',
|
||||
END_TIME: '',
|
||||
Nav_ListUsers: []
|
||||
|
||||
},
|
||||
peopleSelectOption: {
|
||||
showSelector: false,
|
||||
@ -148,8 +199,7 @@
|
||||
loadData() {
|
||||
if (this.ID == undefined || this.ID == '') {
|
||||
this.stepLoad = false
|
||||
if (this.ID == undefined || this.ID == '')
|
||||
this.ID = guid()
|
||||
this.ID = guid()
|
||||
this.model.ID = this.ID
|
||||
} else {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
@ -160,6 +210,9 @@
|
||||
extendInclude(json, 'Nav_Points');
|
||||
extendInclude(json, 'Nav_Points.Nav_Point');
|
||||
extendInclude(json, 'Nav_LaunchUser');
|
||||
extendInclude(json, 'Nav_ListUsers');
|
||||
extendInclude(json, 'Nav_ListUsers.Nav_Department');
|
||||
extendInclude(json, 'Nav_ListUsers.Nav_User');
|
||||
|
||||
extendIgnoreDataRule(json)
|
||||
// extendInclude(json, 'Nav_Details.Nav_DetailContents.Nav_Question');
|
||||
@ -186,6 +239,20 @@
|
||||
}
|
||||
|
||||
},
|
||||
changeDown(e) {
|
||||
this.getOperationList()
|
||||
},
|
||||
handleDelRowBefore(item) {
|
||||
item.IS_DELETED = true
|
||||
let indexNotDel = 1
|
||||
this.model.Nav_ListUsers.forEach((e, i) => {
|
||||
if (!e.IS_DELETED) {
|
||||
e.ROW_NO = indexNotDel
|
||||
indexNotDel++
|
||||
}
|
||||
})
|
||||
this.$forceUpdate()
|
||||
},
|
||||
|
||||
async handleShowSheet(p) {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
@ -205,18 +272,24 @@
|
||||
json.Start = (p.pageIndex - 1) * json.Limit;
|
||||
}
|
||||
json.Sort = 'NAME'
|
||||
if (p.name == 'Nav_JoinDepartment') {
|
||||
|
||||
this.selectorInfo.isMultiple = true
|
||||
if (p.name == 'Nav_JoinDepartment' || p.name == 'Nav_Department') {
|
||||
|
||||
|
||||
extendRule(json, 'ENABLE_STATUS', 1, '0')
|
||||
|
||||
if (p.name == 'Nav_JoinDepartment') {
|
||||
this.selectorInfo.isMultiple = true
|
||||
extendRule(json, 'ENABLE_STATUS', 1, '0')
|
||||
json.Sort = 'ID'
|
||||
json.SelectField = ["ID", "NAME", "NAME"]
|
||||
}
|
||||
|
||||
|
||||
dataSelect = await getRequestOrderPage(json, "/FM/Department/OrderPaged").then(res => {
|
||||
this.selectorInfo.totalCount = res.TotalCount
|
||||
if (res != undefined && res.Data.length > 0) {
|
||||
for (let i = 0; i < res.Data.length; i++) {
|
||||
res.Data[i].NAME = res.Data[i].NAME
|
||||
res.Data[i].name = res.Data[i].NAME
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
@ -226,21 +299,24 @@
|
||||
}
|
||||
return res.Data
|
||||
})
|
||||
if (this.model.Nav_JoinDepartment && this.model.Nav_JoinDepartment.length > 0 && this.model.Nav_JoinDepartment[0]
|
||||
.Nav_Department != null) {
|
||||
// this.selectorInfo.defaultChecked = []
|
||||
this.model.Nav_JoinDepartment.forEach(e => {
|
||||
defaultChecked.push(e.Nav_Department)
|
||||
})
|
||||
} else {
|
||||
defaultChecked = null
|
||||
if (p.name == 'Nav_JoinDepartment') {
|
||||
if (this.model.Nav_JoinDepartment && this.model.Nav_JoinDepartment.length > 0 && this.model.Nav_JoinDepartment[0]
|
||||
.Nav_Department != null) {
|
||||
// this.selectorInfo.defaultChecked = []
|
||||
this.model.Nav_JoinDepartment.forEach(e => {
|
||||
defaultChecked.push(e.Nav_Department)
|
||||
})
|
||||
} else {
|
||||
defaultChecked = null
|
||||
}
|
||||
}
|
||||
|
||||
} else if (p.name == 'Nav_Points') {
|
||||
|
||||
|
||||
this.selectorInfo.isMultiple = true
|
||||
|
||||
|
||||
extendRule(json, 'TYPE', 1, '1')
|
||||
|
||||
|
||||
dataSelect = await getRequestOrderPage(json, "/SE/TestEnumPoint/OrderPaged").then(res => {
|
||||
this.selectorInfo.totalCount = res.TotalCount
|
||||
if (res != undefined && res.Data.length > 0) {
|
||||
@ -264,6 +340,25 @@
|
||||
} else {
|
||||
defaultChecked = null
|
||||
}
|
||||
} else if (p.name == 'Nav_User') {
|
||||
if (p.itemData.DEPARTMENT_ID) {
|
||||
extendRule(json, 'DEPARTMENT_ID', 1, p.itemData.DEPARTMENT_ID)
|
||||
}
|
||||
json.OrgRule = []
|
||||
dataSelect = await getRequestOrderPage(json, "/FM/FMUser/OrderPagedUseful").then(res => {
|
||||
this.selectorInfo.totalCount = res.TotalCount
|
||||
if (res != undefined && res.Data.length > 0) {
|
||||
for (let i = 0; i < res.Data.length; i++) {
|
||||
res.Data[i].name = res.Data[i].NAME
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '暂无信息',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
return res.Data
|
||||
})
|
||||
}
|
||||
if (defaultChecked == null)
|
||||
defaultChecked = []
|
||||
@ -314,6 +409,7 @@
|
||||
})
|
||||
}
|
||||
this.model.Nav_JoinDepartment = listArea
|
||||
this.getOperationList()
|
||||
// this.model.RiskAreaNAME = areaShow
|
||||
} else if (this.selectorInfo.name == 'Nav_Points') {
|
||||
let listArea = []
|
||||
@ -331,9 +427,45 @@
|
||||
})
|
||||
}
|
||||
this.model.Nav_Points = listArea
|
||||
}
|
||||
} else if (this.selectorInfo.name == 'Nav_Department') {
|
||||
this.selectorInfo.itemData.Nav_Department = e
|
||||
this.selectorInfo.itemData.DEPARTMENT_ID = e.ID
|
||||
} else if (this.selectorInfo.name == 'Nav_User') {
|
||||
this.selectorInfo.itemData.Nav_User = e
|
||||
this.selectorInfo.itemData.USER_ID = e.ID
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
handleNew() {
|
||||
this.model.Nav_ListUsers.push({
|
||||
Nav_Department: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_User: {
|
||||
NAME: ''
|
||||
},
|
||||
USER_ID: '',
|
||||
DEPARTMENT_ID: ''
|
||||
})
|
||||
},
|
||||
getOperationList() {
|
||||
let keyWord = ''
|
||||
if (this.model.Nav_JoinDepartment != null && this.model.Nav_JoinDepartment.length > 0) {
|
||||
this.model.Nav_JoinDepartment.forEach(e => {
|
||||
if (e.IS_DELETED == null || e.IS_DELETED == false)
|
||||
keyWord += e.DEPARTMENT_ID + '|'
|
||||
})
|
||||
}
|
||||
if (keyWord.length > 0) {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, keyWord, null, null, null, (this.model.IS_DOWN == null ? 'false' : this.model.IS_DOWN), this.model.ID)
|
||||
extendRule(json, 'id', 1, this.model.ID);
|
||||
getRequestOrderPage(json, "/SE/SESafeSurvey/GetListDemand").then(res => {
|
||||
this.model.Nav_ListUsers = res.Data
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
showCheckDate(dataIndex, item) {
|
||||
this.dateTimePickerInfo = {
|
||||
@ -355,17 +487,18 @@
|
||||
},
|
||||
submit() {
|
||||
this.modelEdit = JSON.parse(JSON.stringify(this.model))
|
||||
// if(this.modelEdit.Nav_JoinDepartment&&this.modelEdit.Nav_JoinDepartment.length>0){
|
||||
// this.modelEdit.Nav_JoinDepartment.map(item=>{
|
||||
// delete item.Nav_Department
|
||||
// })
|
||||
// }
|
||||
if (this.modelEdit.Nav_ListUsers && this.modelEdit.Nav_ListUsers.length > 0) {
|
||||
this.modelEdit.Nav_ListUsers.map(item => {
|
||||
delete item.Nav_Department
|
||||
delete item.Nav_User
|
||||
})
|
||||
}
|
||||
// if(this.modelEdit.Nav_Points&&this.modelEdit.Nav_Points.length>0){
|
||||
// this.modelEdit.Nav_Points.map(item=>{
|
||||
// delete item.Nav_Point
|
||||
// })
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
if (this.TaskID == null || this.TaskID == '') {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<view class="todo-page">
|
||||
<view class="background"></view>
|
||||
<view class="allview">
|
||||
<view class="card" >
|
||||
<view class="card">
|
||||
<u--form labelWidth="auto" :model="model" ref="wForm" class="demo-ruleForm">
|
||||
<view style="position: relative;">
|
||||
<view style="position: absolute;left: -10px;color: #3d4b70;top: -3px;">*</view>
|
||||
@ -12,27 +12,78 @@
|
||||
<u-form-item required label="调查名称" prop="LOCATION" borderBottom>
|
||||
<u--input disabledColor="#ffffff" v-model="model.NAME" border="none" inputAlign="right" fontSize="14px" placeholder="请输入调查名称"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
|
||||
<u-form-item required label="截止时间" prop="ENDTIME" borderBottom @click="showCheckDate(1)">
|
||||
<u--input disabled disabledColor="#fff" v-model="model.END_TIME" placeholder="请选择时间" border="none" inputAlign="right" fontSize="14px"></u--input>
|
||||
<u-icon style="margin-left: 4px;" name="arrow-down" size="12"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item required label="参与部门" @click="handleShowSheet({title: '参与部门', name: 'Nav_JoinDepartment'})" >
|
||||
<u-form-item required label="参与部门" @click="handleShowSheet({title: '参与部门', name: 'Nav_JoinDepartment'})">
|
||||
<u-icon name="arrow-down" size="12" slot="right"></u-icon>
|
||||
</u-form-item>
|
||||
<view class="tag-view" v-if="model.Nav_JoinDepartment">
|
||||
<uni-tag class="tag" v-for="(i, k) in model.Nav_JoinDepartment.filter(i => !i.IS_DELETED)" :key="k" :inverted="true" :text="i.Nav_Department.NAME" type="primary" />
|
||||
</view>
|
||||
<u-form-item required label="调查目的" @click="handleShowSheet({title: '调查目的', name: 'Nav_Points'})" >
|
||||
<u-form-item required label="调查目的" @click="handleShowSheet({title: '调查目的', name: 'Nav_Points'})">
|
||||
<u-icon name="arrow-down" size="12" slot="right"></u-icon>
|
||||
</u-form-item>
|
||||
<view class="tag-view" v-if="model.Nav_Points">
|
||||
<uni-tag class="tag" v-for="(i, k) in model.Nav_Points.filter(i => !i.IS_DELETED)" :key="k" :inverted="true" :text="i.Nav_Point.NAME" type="primary" />
|
||||
</view>
|
||||
<u-form-item label="含下级组织成员" v-if="model.STATUS == undefined||model.STATUS == '0'">
|
||||
<u-switch v-model="model.IS_DOWN" @change="changeDown" slot="right"></u-switch>
|
||||
</u-form-item>
|
||||
|
||||
</u--form>
|
||||
<u--form labelWidth="auto" :model="model" ref="wForm" class="sub-form">
|
||||
|
||||
|
||||
<view style="position: relative;">
|
||||
|
||||
<view style="position: absolute;left: -10px;color: #3d4b70;top: -3px;">*</view>
|
||||
</view>
|
||||
|
||||
<view style="font-size: 15px; font-weight: bold;color: #3d4b70;margin-bottom: 10px;margin-top: 20px;">组织人员</view>
|
||||
<uni-collapse :border="false" accordion>
|
||||
<view v-for="(item, index) in model.Nav_Demands.filter(i => !i.IS_DELETED)" :key="index">
|
||||
<uni-collapse-item title-border="none" :border="false">
|
||||
<template v-slot:title>
|
||||
<view class="uni-collapse-item__title-box">
|
||||
<view class="uni-collapse-item__title-text">
|
||||
{{index+1+'.'+(item.Nav_Department||{}).NAME+'-'+(item.Nav_User||{}).NAME}}
|
||||
</view>
|
||||
<view @click.stop>
|
||||
<u-icon @click="handleDelRowBefore(item)" name="trash" color="#ff4d4f" size="21" style="margin-right: 10px;"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view class="content" style="padding: 0px 0px 0px 10px;">
|
||||
|
||||
<u-form-item label="组织" prop="Product_Unit" @click="handleShowSheet({title: '组织', name: 'Nav_Department',itemData:item})" borderBottom>
|
||||
<u--input v-model="(item.Nav_Department||{}).NAME" disabled disabledColor="#ffffff" placeholder="请选择组织" border="none" inputAlign="right" fontSize="14px">
|
||||
</u--input>
|
||||
<u-icon style="margin-left: 4px;" name="arrow-down" size="12">
|
||||
</u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="人员" prop="Product_Unit" @click="handleShowSheet({title: '人员', name: 'Nav_User',itemData:item})" borderBottom>
|
||||
<u--input v-model="(item.Nav_User||{}).NAME" disabled disabledColor="#ffffff" placeholder="请选择人员" border="none" inputAlign="right" fontSize="14px">
|
||||
</u--input>
|
||||
<u-icon style="margin-left: 4px;" name="arrow-down" size="12">
|
||||
</u-icon>
|
||||
</u-form-item>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</uni-collapse-item>
|
||||
</view>
|
||||
</uni-collapse>
|
||||
<view style="padding: 10px 16px;display: flex;flex-direction: row;">
|
||||
<u-button type="primary" @click="handleNew" color="#3d4b70" :plain="true" style="margin-right: 5px;">新增</u-button>
|
||||
<!-- <u-button type="primary" @click="handleNewCheckList" color="#3d4b70" style="margin-left: 5px;">检查清单</u-button> -->
|
||||
</view>
|
||||
</u--form>
|
||||
</view>
|
||||
<view style="padding: 10px 16px;" class="bottom-button">
|
||||
<view style="padding: 10px 16px;" class="bottom-button">
|
||||
<u-button type="primary" @click="submit" color="#3d4b70" :loading="stepLoad">提交</u-button>
|
||||
</view>
|
||||
<query-selector :multiple="selectorInfo.isMultiple" :show="selectorInfo.showPopup" :title="selectorInfo.title" :lists="selectorInfo.dataLists" :defaultChecked="selectorInfo.defaultChecked"
|
||||
@ -88,9 +139,10 @@
|
||||
model: {
|
||||
Nav_JoinDepartment: [],
|
||||
Nav_Points: [],
|
||||
NAME:'',
|
||||
END_TIME:'',
|
||||
|
||||
NAME: '',
|
||||
END_TIME: '',
|
||||
Nav_Demands: []
|
||||
|
||||
},
|
||||
peopleSelectOption: {
|
||||
showSelector: false,
|
||||
@ -156,10 +208,14 @@
|
||||
const json = initFilter(orgId, "", "")
|
||||
extendRule(json, 'ID', 1, this.ID);
|
||||
extendInclude(json, 'Nav_JoinDepartment.Nav_Department');
|
||||
extendInclude(json, 'Nav_Points.Nav_Point');
|
||||
extendInclude(json, 'Nav_LaunchDepartment');
|
||||
extendInclude(json, 'Nav_LaunchUser');
|
||||
extendInclude(json, 'Nav_JoinDepartment');
|
||||
extendInclude(json, 'Nav_Points');
|
||||
extendInclude(json, 'Nav_Points.Nav_Point');
|
||||
extendInclude(json, 'Nav_LaunchUser');
|
||||
extendInclude(json, 'Nav_Demands');
|
||||
extendInclude(json, 'Nav_Demands.Nav_Department');
|
||||
extendInclude(json, 'Nav_Demands.Nav_User');
|
||||
|
||||
extendIgnoreDataRule(json)
|
||||
// extendInclude(json, 'Nav_Details.Nav_DetailContents.Nav_Question');
|
||||
@ -186,6 +242,20 @@
|
||||
}
|
||||
|
||||
},
|
||||
changeDown(e) {
|
||||
this.getOperationList()
|
||||
},
|
||||
handleDelRowBefore(item) {
|
||||
item.IS_DELETED = true
|
||||
let indexNotDel = 1
|
||||
this.model.Nav_Demands.forEach((e, i) => {
|
||||
if (!e.IS_DELETED) {
|
||||
e.ROW_NO = indexNotDel
|
||||
indexNotDel++
|
||||
}
|
||||
})
|
||||
this.$forceUpdate()
|
||||
},
|
||||
|
||||
async handleShowSheet(p) {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
@ -205,18 +275,22 @@
|
||||
json.Start = (p.pageIndex - 1) * json.Limit;
|
||||
}
|
||||
json.Sort = 'NAME'
|
||||
if (p.name == 'Nav_JoinDepartment') {
|
||||
|
||||
this.selectorInfo.isMultiple = true
|
||||
if (p.name == 'Nav_JoinDepartment' || p.name == 'Nav_Department') {
|
||||
if (p.name == 'Nav_JoinDepartment') {
|
||||
this.selectorInfo.isMultiple = true
|
||||
extendRule(json, 'ENABLE_STATUS', 1, '0')
|
||||
json.Sort = 'ID'
|
||||
json.SelectField = ["ID", "NAME", "NAME"]
|
||||
}
|
||||
|
||||
|
||||
extendRule(json, 'ENABLE_STATUS', 1, '0')
|
||||
|
||||
dataSelect = await getRequestOrderPage(json, "/FM/Department/OrderPaged").then(res => {
|
||||
this.selectorInfo.totalCount = res.TotalCount
|
||||
if (res != undefined && res.Data.length > 0) {
|
||||
for (let i = 0; i < res.Data.length; i++) {
|
||||
res.Data[i].NAME = res.Data[i].NAME
|
||||
res.Data[i].name = res.Data[i].NAME
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
@ -226,23 +300,26 @@
|
||||
}
|
||||
return res.Data
|
||||
})
|
||||
if (this.model.Nav_JoinDepartment && this.model.Nav_JoinDepartment.length > 0 && this.model.Nav_JoinDepartment[0]
|
||||
.Nav_Department != null) {
|
||||
// this.selectorInfo.defaultChecked = []
|
||||
this.model.Nav_JoinDepartment.forEach(e => {
|
||||
defaultChecked.push(e.Nav_Department)
|
||||
})
|
||||
} else {
|
||||
defaultChecked = null
|
||||
if (p.name == 'Nav_JoinDepartment') {
|
||||
if (this.model.Nav_JoinDepartment && this.model.Nav_JoinDepartment.length > 0 && this.model.Nav_JoinDepartment[0]
|
||||
.Nav_Department != null) {
|
||||
// this.selectorInfo.defaultChecked = []
|
||||
this.model.Nav_JoinDepartment.forEach(e => {
|
||||
defaultChecked.push(e.Nav_Department)
|
||||
})
|
||||
} else {
|
||||
defaultChecked = null
|
||||
}
|
||||
}
|
||||
|
||||
} else if (p.name == 'Nav_Points') {
|
||||
|
||||
|
||||
this.selectorInfo.isMultiple = true
|
||||
json.Sort = "ID"
|
||||
|
||||
|
||||
|
||||
extendRule(json, 'TYPE', 1, '2')
|
||||
|
||||
|
||||
dataSelect = await getRequestOrderPage(json, "/SE/TestEnumPoint/OrderPaged").then(res => {
|
||||
this.selectorInfo.totalCount = res.TotalCount
|
||||
if (res != undefined && res.Data.length > 0) {
|
||||
@ -266,6 +343,25 @@
|
||||
} else {
|
||||
defaultChecked = null
|
||||
}
|
||||
}else if (p.name == 'Nav_User') {
|
||||
if (p.itemData.DEPARTMENT_ID) {
|
||||
extendRule(json, 'DEPARTMENT_ID', 1, p.itemData.DEPARTMENT_ID)
|
||||
}
|
||||
json.OrgRule = []
|
||||
dataSelect = await getRequestOrderPage(json, "/FM/FMUser/OrderPagedUseful").then(res => {
|
||||
this.selectorInfo.totalCount = res.TotalCount
|
||||
if (res != undefined && res.Data.length > 0) {
|
||||
for (let i = 0; i < res.Data.length; i++) {
|
||||
res.Data[i].name = res.Data[i].NAME
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '暂无信息',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
return res.Data
|
||||
})
|
||||
}
|
||||
if (defaultChecked == null)
|
||||
defaultChecked = []
|
||||
@ -316,6 +412,7 @@
|
||||
})
|
||||
}
|
||||
this.model.Nav_JoinDepartment = listArea
|
||||
this.getOperationList()
|
||||
// this.model.RiskAreaNAME = areaShow
|
||||
} else if (this.selectorInfo.name == 'Nav_Points') {
|
||||
let listArea = []
|
||||
@ -333,7 +430,13 @@
|
||||
})
|
||||
}
|
||||
this.model.Nav_Points = listArea
|
||||
}
|
||||
} else if (this.selectorInfo.name == 'Nav_Department') {
|
||||
this.selectorInfo.itemData.Nav_Department = e
|
||||
this.selectorInfo.itemData.DEPARTMENT_ID = e.ID
|
||||
} else if (this.selectorInfo.name == 'Nav_User') {
|
||||
this.selectorInfo.itemData.Nav_User = e
|
||||
this.selectorInfo.itemData.USER_ID = e.ID
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
@ -354,9 +457,45 @@
|
||||
}
|
||||
this.dateTimePickerInfo.showCheckDate = false
|
||||
|
||||
},
|
||||
handleNew() {
|
||||
this.model.Nav_Demands.push({
|
||||
Nav_Department: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_User: {
|
||||
NAME: ''
|
||||
},
|
||||
USER_ID: '',
|
||||
DEPARTMENT_ID: ''
|
||||
})
|
||||
},
|
||||
getOperationList() {
|
||||
let keyWord = ''
|
||||
if (this.model.Nav_JoinDepartment != null && this.model.Nav_JoinDepartment.length > 0) {
|
||||
this.model.Nav_JoinDepartment.forEach(e => {
|
||||
if (e.IS_DELETED == null || e.IS_DELETED == false)
|
||||
keyWord += e.DEPARTMENT_ID + '|'
|
||||
})
|
||||
}
|
||||
if (keyWord.length > 0) {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, keyWord, null, null, null, (this.model.IS_DOWN == null ? 'false' : this.model.IS_DOWN), this.model.ID)
|
||||
extendRule(json, 'id', 1, this.model.ID);
|
||||
getRequestOrderPage(json, "/SE/SETrainSurvey/GetListDemand").then(res => {
|
||||
this.model.Nav_Demands = res.Data
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
submit() {
|
||||
this.modelEdit = JSON.parse(JSON.stringify(this.model))
|
||||
if (this.modelEdit.Nav_Demands && this.modelEdit.Nav_Demands.length > 0) {
|
||||
this.modelEdit.Nav_Demands.map(item => {
|
||||
delete item.Nav_Department
|
||||
delete item.Nav_User
|
||||
})
|
||||
}
|
||||
// if(this.modelEdit.Nav_JoinDepartment&&this.modelEdit.Nav_JoinDepartment.length>0){
|
||||
// this.modelEdit.Nav_JoinDepartment.map(item=>{
|
||||
// delete item.Nav_Department
|
||||
@ -367,7 +506,7 @@
|
||||
// delete item.Nav_Point
|
||||
// })
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
if (this.TaskID == null || this.TaskID == '') {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user