[代码更新](pet)

- add.vue
   - 安全环保检查新增 是否为相关方按钮 更新部门人员下拉树逻辑
 - edit.vue
   - 新增用户取消邮箱必填,取消邮箱校验
hyx_2024-9-25_tongbu
huangyuxuan 2024-09-05 14:48:47 +08:00
parent d5edfcdaf7
commit f033a6c128
3 changed files with 64 additions and 9 deletions

View File

@ -309,7 +309,6 @@ export default {
}
},
setShowModel(model) {
console.log("test===========================")
this.$store.dispatch('permission/setShowModel', model)
},
toggleSideBar() {

View File

@ -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' }],

View File

@ -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) => {