曹妃甸实业、曹煤炭、沧州矿石安全环保检查发起增加检查人员校验,只有对应公司和秦港人员可以是检查人

2024年2月1日V1.0.53^2
songwenxuan 2024-01-31 14:56:46 +08:00
parent e71ba80f39
commit 6e151129c5
1 changed files with 53 additions and 7 deletions

View File

@ -22,6 +22,7 @@
:options="treeData"
:props="defaultProps"
v-model="form.INSPECTED_DEPARTMENT_ID"
@change="changeCurrentDeptId(form.INSPECTED_DEPARTMENT_ID)"
placeholder="请选择被检查单位"
style="width: 300px" />
</el-form-item>
@ -68,8 +69,8 @@
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left">检查人员 <el-button type="primary" size="mini" @click="addInspector"></el-button></el-divider>
<el-form-item v-for="(item,index) in form.inspectorList" :key="index + (Math.random() + '').replace('.', '')" :label="(index+1)+'.'">
<el-divider v-if="CURRENT_INSPECTED_DEPARTMENT_ID !== null && CURRENT_INSPECTED_DEPARTMENT_ID !== '' " content-position="left">检查人员 <el-button type="primary" size="mini" @click="addInspector"></el-button></el-divider>
<el-form-item v-if="CURRENT_INSPECTED_DEPARTMENT_ID !== null && CURRENT_INSPECTED_DEPARTMENT_ID !== '' " v-for="(item,index) in form.inspectorList" :key="index + (Math.random() + '').replace('.', '')" :label="(index+1)+'.'">
<div class="uo-flex">
<el-row :gutter="20">
<el-col :span="12">
@ -82,7 +83,8 @@
v-model="item.INSPECTION_DEPARTMENT_ID"
placeholder="请选择检查人员部门"
style="width: 300px"
@change="updateInspecteDept(item.INSPECTION_DEPARTMENT_ID,index)"/>
@visible-change=""
@change="updateInspecteDept(item.INSPECTION_DEPARTMENT_ID,index,item)"/>
</el-form-item>
</el-col>
<el-col :span="11">
@ -348,6 +350,7 @@ export default {
},
pd: [],
switchInspectionType: 'select',
CURRENT_INSPECTED_DEPARTMENT_ID: '', //
form: {
INSPECTION_SUBJECT: '', //
INSPECTION_SOURCE: '4', // 4- 5-
@ -480,6 +483,12 @@ export default {
handleAdd() {
this.dialogType = 'add'
},
changeCurrentDeptId(id) {
this.form.inspectorList = []
this.form.inspectorList.push({ INSPECTION_INSPECTOR_ID: '', INSPECTION_DEPARTMENT_ID: '', INSPECTION_USER_ID: '', USER_SIDE: '' })
this.INSPECTOR_List.push([])
this.CURRENT_INSPECTED_DEPARTMENT_ID = id
},
changeSwitch(type) {
if (type === 'InspectionType') {
this.form.INSPECTION_TYPE = ''
@ -498,10 +507,46 @@ export default {
this.form.inspectorList.push({ INSPECTION_INSPECTOR_ID: '', INSPECTION_DEPARTMENT_ID: '', INSPECTION_USER_ID: '', USER_SIDE: '' })
this.INSPECTOR_List.push([])
},
updateInspecteDept(DEPARTMENT_ID, i) {
this.form.inspectorList[i].INSPECTION_USER_ID = ''
this.form.inspectorList[i].USER_SIDE = ''
this.getInspectorList(DEPARTMENT_ID, i)
updateInspecteDept(id,i,item) {
//
if (id) {
requestFN(
'/corpDepartment/checkDept',
{
DEPARTMENT_ID: this.CURRENT_INSPECTED_DEPARTMENT_ID,
id: id
}
).then((data) => {
if (data.message!=null) {
this.INSPECTION_DEPARTMENT_ID = ''
this.INSPECTOR_List = []
this.INSPECTION_USER_ID = ''
this.$message.error(data.message)
}else {
//
if (id) {
requestFN(
'/user/listAllManageAndCorp',
{
DEPARTMENT_ID: id
}
).then((data) => {
this.INSPECTOR_List[i] = data.userList
this.$forceUpdate()
}).catch((e) => {
})
}
this.form.inspectorList[i].INSPECTION_USER_ID = ''
this.form.inspectorList[i].USER_SIDE = ''
this.$message.success('检查人员部门选择成功')
this.getInspectorList(DEPARTMENT_ID, i)
}
}).catch((e) => {
})
}
this.form.inspectorList = []
this.form.inspectorList.push({ INSPECTION_INSPECTOR_ID: item.INSPECTION_INSPECTOR_ID, INSPECTION_DEPARTMENT_ID: item.INSPECTION_DEPARTMENT_ID, INSPECTION_USER_ID: '', USER_SIDE: item.USER_SIDE })
this.INSPECTOR_List.push([])
},
//
getInspectorList(DEPARTMENT_ID, i) {
@ -509,6 +554,7 @@ export default {
requestFN(
'/user/listAllManageAndCorp',
{
CURRENT_INSPECTED_DEPARTMENT_ID: this.CURRENT_INSPECTED_DEPARTMENT_ID,
DEPARTMENT_ID: DEPARTMENT_ID,
NOMAIN: '1'
}