| | |
| | | <tr> |
| | | <td class="w-25 m-color required">部门</td> |
| | | <td class="w-25 m-color"> |
| | | <el-form-item prop="dep"> |
| | | <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.dep" /> |
| | | </el-form-item> |
| | | <!-- <el-form-item prop="dep">--> |
| | | <!-- <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.dep" />--> |
| | | <!-- </el-form-item>--> |
| | | <el-select style="width: 100%" v-model="projectDialogState.projectForm.dep" clearable filterable> |
| | | <el-option |
| | | v-for="item in projectDialogState.deptList" |
| | | :key="item.id" |
| | | :value="item.depName" |
| | | :label="item.depName" |
| | | ></el-option> |
| | | </el-select> |
| | | </td> |
| | | <td class="w-25 m-color required">立项时间</td> |
| | | <td class="w-25 m-color"> |
| | |
| | | <!-- :label="item.personName"--> |
| | | <!-- ></el-option>--> |
| | | <!-- </el-select>--> |
| | | <el-form-item prop="safeLiabilityUser"> |
| | | <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.safeLiabilityUser" /> |
| | | </el-form-item> |
| | | <el-select style="width: 100%" v-model="projectDialogState.projectForm.safeLiabilityUser" clearable filterable @change="getSafeLiabilityUserPhone($event)"> |
| | | <el-option |
| | | v-for="item in projectDialogState.systemPersonList" |
| | | :key="item.id" |
| | | :value="item.realName" |
| | | :label="item.realName" |
| | | ></el-option> |
| | | </el-select> |
| | | <!-- <el-form-item prop="safeLiabilityUser">--> |
| | | <!-- <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.safeLiabilityUser" />--> |
| | | <!-- </el-form-item>--> |
| | | </td> |
| | | <td class="w-25 m-color required">电话</td> |
| | | <td class="w-25 m-color"> |
| | |
| | | import {useUserInfo} from "/@/stores/userInfo"; |
| | | import {storeToRefs} from "pinia"; |
| | | import {checkChineseName, verifyPhone} from "/@/utils/toolsValidate"; |
| | | import {departmentApi} from "/@/api/systemManage/department"; |
| | | |
| | | const SelectEquipment = defineAsyncComponent(() => import('./selectEquipment.vue')) |
| | | const SelectMaterial = defineAsyncComponent(() => import('./selectMaterial.vue')) |
| | |
| | | allPersonList: [], |
| | | allRoomList: [], |
| | | systemPersonList: [], |
| | | deptList: [] |
| | | }) |
| | | |
| | | const getLiabilityUserPhone = (value: number)=>{ |
| | | const data = projectDialogState.systemPersonList.find(item => item.id === value) as AllPersonListType |
| | | projectDialogState.projectForm.liabilityUserPhone = data.phone |
| | | } |
| | | |
| | | const getSafeLiabilityUserPhone = (value: number)=>{ |
| | | const data = projectDialogState.systemPersonList.find(item => item.realName === value) as AllPersonListType |
| | | projectDialogState.projectForm.safeLiabilityUserPhone = data.phone |
| | | } |
| | | |
| | | // const getSafeLiabilityUserPhone = (value: number)=>{ |
| | |
| | | siteList: [], |
| | | deviceList: [], |
| | | stuffList: [], |
| | | hazardousWasteList: [] |
| | | hazardousWasteList: [], |
| | | }; |
| | | }else if(title === '整改' || title === '编辑'){ |
| | | projectDialogState.title = title; |
| | |
| | | } |
| | | } |
| | | if(projectDialogState.title === '新增'){ |
| | | if(checkChineseName(projectDialogState.projectForm.safeLiabilityUser) == false){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '安全负责人姓名格式有误', |
| | | duration: 1000 |
| | | }); |
| | | return |
| | | } |
| | | // if(checkChineseName(projectDialogState.projectForm.safeLiabilityUser) == false){ |
| | | // ElMessage({ |
| | | // type: 'warning', |
| | | // message: '安全负责人姓名格式有误', |
| | | // duration: 1000 |
| | | // }); |
| | | // return |
| | | // } |
| | | if(verifyPhone(projectDialogState.projectForm.safeLiabilityUserPhone) == false || verifyPhone(projectDialogState.projectForm.liabilityUserPhone) == false){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | } |
| | | }; |
| | | |
| | | const getDeptData =async () => { |
| | | let res = await departmentApi().getDepartmentList() |
| | | if (res.data.code === 100) { |
| | | projectDialogState.deptList = res.data.data |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | } |
| | | |
| | | |
| | | const emit = defineEmits(['refresh']); |
| | | |
| | | defineExpose({ |
| | |
| | | onMounted(() => { |
| | | getAllPersonList(); |
| | | getPersonList(); |
| | | getDeptData(); |
| | | }); |
| | | </script> |
| | | |