From baf475f44f0a940bbdc2dde36fff9cdf97da58bc Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期四, 17 八月 2023 16:43:28 +0800 Subject: [PATCH] 证书修改 --- src/views/specialWorkSystem/workTicket/zysq/components/ground.vue | 60 ++++++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 38 insertions(+), 22 deletions(-) diff --git a/src/views/specialWorkSystem/workTicket/zysq/components/ground.vue b/src/views/specialWorkSystem/workTicket/zysq/components/ground.vue index 9b16ea0..6838d8e 100644 --- a/src/views/specialWorkSystem/workTicket/zysq/components/ground.vue +++ b/src/views/specialWorkSystem/workTicket/zysq/components/ground.vue @@ -61,6 +61,18 @@ /> </el-form-item> </el-col> + <el-col :span="12"> + <el-form-item label="关联视频设备" prop="cameraIds"> + <el-select v-model="form.cameraIds" multiple> + <el-option + v-for="item in deviceList" + :key="item.id" + :label="item.name" + :value="item.id" + /> + </el-select> + </el-form-item> + </el-col> </el-row> <el-divider border-style="dashed"/> <el-row> @@ -102,7 +114,7 @@ <el-col :span="12"> <el-form-item label="关联作业" prop="workDetail.otherSpecialWork"> <el-select v-model="form.workDetail.otherSpecialWork" multiple> - <el-option v-for="item in otherWorkList" :key="item.value" :label="item.label" :value="item.value" /> + <el-option v-for="item in otherWorkList" :key="item.value" :label="item.label" :value="item.label" /> </el-select> </el-form-item> </el-col> @@ -110,7 +122,7 @@ <el-row> <el-col :span="24"> <el-form-item label="图片上传" prop="workDetail.gbPath"> - <el-upload accept="image/*" :on-exceed="showTip" :on-preview="handlePictureCardPreview" :limit='imgLimit' v-model:file-list="fileList" :http-request="upload" :action="uploadUrl" list-type="picture-card" :on-remove="handleRemove" :before-remove="beforeRemove" :before-upload="getUploadUrl"> + <el-upload accept="image/*" :on-exceed="showTip" :on-preview="handlePictureCardPreview" :limit='imgLimit' v-model:file-list="fileList" :http-request="upload" :action="uploadUrl" list-type="picture-card" :before-remove="beforeRemove" :before-upload="getUploadUrl"> <el-icon><Plus /></el-icon> <template #tip> <div class="el-upload__tip">上传jpg/png图片尺寸小于500KB,最多可上传3张</div> @@ -151,7 +163,6 @@ import { workApplyApi } from '/@/api/specialWorkSystem/workApply'; import axios from 'axios'; - interface stateType { equipmentDialog: boolean, form: Object, @@ -173,7 +184,7 @@ components: { materialDialog: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/zysq/components/materialDialog.vue')), }, - props:['workerList','departList'], + props:['workerList','departList', 'deviceList'], setup(props: any, context: any) { const userInfo = useUserInfo() const { userInfos } = storeToRefs(userInfo); @@ -182,11 +193,12 @@ form: { operatorUids: [], workType: 4, - workLevel: null, + workLevel: 0, workContent: '', workLocation: '', hazardIdentification: '', - maId: null, + cameraIds: [], + maBaseId: null, workDetail:{ operationDepId: null, gbScope: '', @@ -194,7 +206,7 @@ gbPath: [], otherSpecialWork: [] }, - wmAddReqDTOList: [], + receiveUids: [], workTimeLine: [], expStartTime: '', expEndTime: '' @@ -282,6 +294,7 @@ workContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], workLocation: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], hazardIdentification: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], + cameraIds: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], workTimeLine: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], "workDetail.operationDepId": [{ required: true, message: '该内容不能为空', trigger: 'blur' }], "workDetail.gbScope": [{ required: true, message: '该内容不能为空', trigger: 'blur' }], @@ -295,21 +308,24 @@ // } const openMaList = ()=>{ - material.value.equipmentDialog = true - material.value.getMaList(state.form.workType,state.form.workLevel) - } - const conFirmMaterials = (addList: Array<any>,chosenId: number) =>{ - state.form.maId = null - state.form.wmAddReqDTOList = [] - if(addList.length > 0){ - for(let i in addList){ - if(addList[i].depId != null && addList[i].useCount != null){ - state.form.wmAddReqDTOList.push(addList[i]) - } + if(state.form.operatorUids == []){ + ElMessage({ + type: 'warning', + message: '请先选择作业人再获取相应物资配置' + }); + }else{ + if(material.value.receiveUids.length==0){ + material.value.receiveUids = state.form.operatorUids } + material.value.getMaList(state.form.workType,state.form.workLevel) + material.value.workerList = props.workerList } - // state.form.wmAddReqDTOList = addList - state.form.maId = chosenId + } + const conFirmMaterials = (receiveUids: Array<number>,chosenId: number) =>{ + state.form.maBaseId = null + state.form.receiveUids = [] + state.form.receiveUids = receiveUids + state.form.maBaseId = chosenId } const submitForm = async (formEl: FormInstance | undefined) => { @@ -343,8 +359,8 @@ message: res.data.msg }); } - state.form.maId = null - state.form.wmAddReqDTOList = [] + material.value.maBaseId = null + material.value.receiveUids = [] } else { console.log('error submit!', fields) } -- Gitblit v1.9.2