App安全环保检查发起增加检查人员验证,当被检查单位是沧州矿石、曹煤炭、曹实业时,只能选择对应企业的人员或秦港人员进行安全环保检查。

dev-安全环保检查验证
songwenxuan 2024-02-23 17:34:00 +08:00
parent 1df08fe74c
commit 5d898b71b7
2 changed files with 37 additions and 7 deletions

View File

@ -24,6 +24,7 @@ export const setImgFilesListAdd = (params) => uploads("/app/imgfiles/uploadFileL
export const setVideoAdd = (params) => upload("/app/imgfiles/add", params) //上传视频
export const setImgFilesAddVideo = (params) => uploads("/app/imgfiles/addVideo", params) //上传视频
export const getHiddenRegion = (params) => post("/app/hiddenRegion/gerRegionList", {loading: false, ...params}) //获取隐患部位
export const checkDept = (params) => post("/app/corpDepartment/checkDept", params) //获取隐患部位
export const getInspectedDepartment = (params) => post("/app/corpDepartment/listTreeCorpDept", {loading: false, ...params}) //获取被检查部门
export const getInspectionDepartment = (params) => post("/app/corpDepartment/listTreeManageAndCorp", {loading: false, ...params}) //获取检查部门
export const getInspectors = (params) => post("/AppUser/listAllManageAndCorp", {loading: false, ...params}) //获取检查人员

View File

@ -84,14 +84,14 @@
</view>
</view>
</u-cell>
<u-cell>
<u-cell v-if="this.form.INSPECTED_DEPARTMENT_ID!==''">
<view slot="title" class="title">检查人员</view>
<view slot="value">
<u-button type="primary" text="添加" size="mini" class="bth-mini" @click="addInspector"
v-if="!disabled"></u-button>
</view>
</u-cell>
<u-cell class="title-none">
<u-cell class="title-none" v-if="this.form.INSPECTED_DEPARTMENT_ID!==''">
<view slot="value" style="flex: 1">
<view class="pr mt-10" v-for="(item,index) in form.inspectorList" :key="item.id">
<u-cell-group :border="false" class="border">
@ -338,6 +338,7 @@
<script>
import {
checkDept,
getDeptUser,
getHiddenLevel,
getHiddenRegion,
@ -345,10 +346,10 @@ import {
getInspectedDepartment,
getInspectionDepartment,
getInspectionType,
getInspectors,
getInspectors, getSafetyenvironmentalExplain,
getSafetyenvironmentalGoEdit,
setImgFilesAdd,
setSafetyenvironmentalAdd,setSafetyenvironmentalAdd_plus,
setSafetyenvironmentalAdd, setSafetyenvironmentalAdd_plus,
setSafetyenvironmentalEdit, setSafetyenvironmentalEdit_plus,
setVideoAdd
} from "../../../api";
@ -515,6 +516,13 @@ export default {
let resData = await getInspectors({'DEPARTMENT_ID': detpId});
return resData.userList;
},
async checkDept(id,deptId) {
let resData = await checkDept({
DEPARTMENT_ID: deptId,
id: id
});
return resData.message;
},
async fnGetSafetyenvironmentalGoEdit() {
let resData = await getSafetyenvironmentalGoEdit({INSPECTION_ID: this.INSPECTION_ID})
for (let i = 0; i < resData.pd.hiddenList.length; i++) {
@ -544,6 +552,8 @@ export default {
this.fnGetDeptUser(e[0].id).then(res => {
this.$set(this.inspectedSiteuserColumns, 0, res)
})
this.form.inspectorList = []
this.addInspector()
}
if (list === 'inspectionTypeTreeList') {
this.form.INSPECTION_TYPE = e[0].id
@ -554,9 +564,28 @@ export default {
this.form.inspectorList[index].INSPECTION_DEPARTMENT_NAME = e[0].name
this.form.inspectorList[index].INSPECTION_USER_NAME = ''
this.form.inspectorList[index].INSPECTION_USER_ID = ''
var id = e[0].id
var deptId = this.form.INSPECTED_DEPARTMENT_ID
this.checkDept(id,deptId).then(res => {
if(res==='选择成功'){
uni.showToast({
icon: 'none',
title: '选择成功',
duration: 1500
});
this.fnGetInspectors(e[0].id).then(res => {
this.$set(this.inspectorList[0], index, res)
})
}else{
this.form.inspectorList.splice(index,1)
uni.showToast({
icon: 'none',
title: '选择错误,请选择港股部门或者当前被检查公司下部门',
duration: 1500
});
}
})
}
if (list === 'hiddenRegionTreeList') {
this.hiddenForm.HIDDENPART = e[0].id