[代码更新](pet)
- add.vue - 安全环保检查新增 是否为相关方按钮 更新部门人员下拉树逻辑 - edit.vue - 新增用户取消邮箱必填,取消邮箱校验hyx_2024-9-25_tongbu
parent
d5edfcdaf7
commit
f033a6c128
|
@ -309,7 +309,6 @@ export default {
|
|||
}
|
||||
},
|
||||
setShowModel(model) {
|
||||
console.log("test===========================")
|
||||
this.$store.dispatch('permission/setShowModel', model)
|
||||
},
|
||||
toggleSideBar() {
|
||||
|
|
|
@ -798,12 +798,12 @@ export default {
|
|||
{ validator: hasUser, trigger: 'blur' }
|
||||
],
|
||||
EMAIL: [
|
||||
{ required: true, message: '请输入邮箱', trigger: 'blur' },
|
||||
{ required: false, message: '请输入邮箱', trigger: 'blur' },
|
||||
{
|
||||
pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/,
|
||||
message: '请输入正确的邮箱'
|
||||
},
|
||||
{ validator: hasEmail, trigger: 'blur' }
|
||||
}
|
||||
// { validator: hasEmail, trigger: 'blur' }
|
||||
],
|
||||
PERSON_TYPE: [{ required: true, message: '请选择人员类型', trigger: 'change' }],
|
||||
ROLE_NAME: [{ required: true, message: '请选择角色组', trigger: 'change' }],
|
||||
|
|
|
@ -13,6 +13,16 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否为相关方" prop="IS_XGF">
|
||||
<el-radio-group id="IS_XGF" ref="IS_XGF" v-model="form.IS_XGF" @change="getXgfTreeData">
|
||||
<el-radio :label="'1'" >是</el-radio>
|
||||
<el-radio :label="'0'" >否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="被检查单位" prop="INSPECTED_DEPARTMENT_ID">
|
||||
|
@ -86,7 +96,7 @@
|
|||
<el-col :span="11">
|
||||
<el-form-item label="检查人员" prop="INSPECTION_USER_ID">
|
||||
<el-select v-model="item.INSPECTION_USER_ID" clearable placeholder="请选择检查人员" @change="changeHiddenUserList">
|
||||
<el-option v-for="data in INSPECTOR_List[index]" :key="data.USER_ID" :label="data.NAME" :value="data.USER_ID" />
|
||||
<el-option v-for="data in INSPECTED_SITEUSER_List" :key="data.USER_ID" :label="data.NAME" :value="data.USER_ID" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -421,7 +431,8 @@ export default {
|
|||
CONFIRM_MESSAGE_SIGN: '',
|
||||
CONFIRM_MESSAGE_TIME: '',
|
||||
situationList: [{ INSPECTION_SITUATION_ID: '', SITUATION: '' }], // 检查情况
|
||||
hiddenList: [{ ...this.hiddenForm }] // 隐患信息集合
|
||||
hiddenList: [{ ...this.hiddenForm }], // 隐患信息集合
|
||||
IS_XGF: '' // 是否相关方
|
||||
},
|
||||
hiddenCurIndex: -1,
|
||||
hdFile: [], // 隐患附件
|
||||
|
@ -519,7 +530,7 @@ export default {
|
|||
this.INSPECTED_SITEUSER_List = []
|
||||
}
|
||||
if (newVal != null && newVal != '') {
|
||||
this.getUserList(newVal)
|
||||
this.getXgfUserList(newVal)
|
||||
}
|
||||
},
|
||||
immediate: false
|
||||
|
@ -587,8 +598,9 @@ export default {
|
|||
this.INSPECTOR_List.push([])
|
||||
},
|
||||
updateInspecteDept(DEPARTMENT_ID, i) {
|
||||
this.form.inspectorList[i].INSPECTION_USER_ID = ''
|
||||
this.getInspectorList(DEPARTMENT_ID, i)
|
||||
// this.form.inspectorList[i].INSPECTION_USER_ID = ''
|
||||
// this.getInspectorList(DEPARTMENT_ID, i)
|
||||
this.getXgfUserList(DEPARTMENT_ID)
|
||||
},
|
||||
// 获取人员列表
|
||||
getInspectorList(DEPARTMENT_ID, i) {
|
||||
|
@ -1039,6 +1051,50 @@ export default {
|
|||
})
|
||||
})
|
||||
},
|
||||
// 获取相关方被检查单位数据
|
||||
getXgfTreeData(value) {
|
||||
console.info(value)
|
||||
if (value == '1') {
|
||||
requestFN(
|
||||
'/department/getXgfListTree',
|
||||
{}
|
||||
).then((data) => {
|
||||
this.treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes')
|
||||
this.treeDataInspectDept = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes')
|
||||
}).catch((e) => {
|
||||
})
|
||||
} else {
|
||||
requestFN(
|
||||
'/department/listTree',
|
||||
{}
|
||||
).then((data) => {
|
||||
this.treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes')
|
||||
this.treeDataInspectDept = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes')
|
||||
}).catch((e) => {
|
||||
})
|
||||
}
|
||||
},
|
||||
// 获取相关方被检查单位现场负责人
|
||||
getXgfUserList(DEPARTMENT_ID) {
|
||||
console.info(this.form.IS_XGF)
|
||||
if (this.form.IS_XGF == '1') {
|
||||
requestFN(
|
||||
'/user/xgfListAll',
|
||||
{ DEPARTMENT_ID: DEPARTMENT_ID }
|
||||
).then((data) => {
|
||||
this.INSPECTED_SITEUSER_List = data.userList
|
||||
}).catch((e) => {
|
||||
})
|
||||
} else {
|
||||
requestFN(
|
||||
'/user/listAll',
|
||||
{ DEPARTMENT_ID: DEPARTMENT_ID }
|
||||
).then((data) => {
|
||||
this.INSPECTED_SITEUSER_List = data.userList
|
||||
}).catch((e) => {
|
||||
})
|
||||
}
|
||||
},
|
||||
// 获取隐患部位 下拉树
|
||||
getHiddenReginTreeList() {
|
||||
return new Promise((resolve) => {
|
||||
|
|
Loading…
Reference in New Issue