| | |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-col :span="12" class="valueSelect"> |
| | | <el-form-item label="关联其他特殊作业" prop="involveOtherWork"> |
| | | <el-select v-model="form.involveOtherWork" multiple clearable> |
| | | <el-option |
| | | v-for="item in otherWorkList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.label" |
| | | /> |
| | | <!-- <el-select v-model="form.involveOtherWork" multiple clearable>--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in otherWorkList"--> |
| | | <!-- :key="item.value"--> |
| | | <!-- :label="item.label"--> |
| | | <!-- :value="item.label"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <el-select v-model="form.involveOtherWork" multiple clearable :teleported="false" @click="openWorkSelect"> |
| | | <el-option v-for="item in otherWorks" :key="item.workApplyId" :label="item.workContent" :value="item.workApplyId"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业简图" prop="workDetail.gbPath"> |
| | | <el-upload accept="image/*" :auto-upload="true" :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/*" :auto-upload="true" :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图片尺寸小于5M,最多可上传3张</div> |
| | | <div class="el-upload__tip">上传jpg/png图片尺寸小于2M,最多可上传3张</div> |
| | | </template> |
| | | </el-upload> |
| | | </el-form-item> |
| | |
| | | <el-row style="display: flex;justify-content: center"> |
| | | <el-table :data="safetyMeasureBasicList" style="width: 90%" border> |
| | | <el-table-column type="index" label="序号" width="100px" align="center"/> |
| | | <el-table-column prop="measureContent" label="安全措施" align="center"/> |
| | | <el-table-column prop="measureContent" label="安全措施"/> |
| | | <!-- <el-table-column prop="address" label="确认人">--> |
| | | <!-- <template #default="scope">--> |
| | | |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="签字人" prop="workDetail.signUid"> |
| | | <el-select v-model="form.workDetail.signUid" clearable> |
| | | <el-option |
| | | v-for="item in workerList" |
| | | :key="item.uid" |
| | | :label="item.username" |
| | | :value="item.uid" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | <div class="applyBtn"> |
| | | <el-button type="primary" size="large" plain @click="submitForm(ruleFormRef)">提交申报</el-button> |
| | | </div> |
| | | <work-select ref="workSelectRef" @refreshWorks="getSelected()"></work-select> |
| | | <el-dialog v-model="dialogVisible"> |
| | | <img w-full :src="dialogImageUrl" alt="Preview Image" /> |
| | | </el-dialog> |
| | |
| | | import {ElMessage, ElMessageBox, UploadProps, UploadUserFile} from 'element-plus' |
| | | import type { FormInstance, FormRules } from 'element-plus' |
| | | import { workApplyApi } from '/@/api/specialWorkSystem/workApply'; |
| | | import workSelect from "/@/views/newSpecialWorkSystem/workTicket/zysq/components/workSelect.vue"; |
| | | import axios from "axios"; |
| | | interface stateType { |
| | | form: Object, |
| | | otherWorkList: Array<any>, |
| | | equipmentDialog: boolean, |
| | | props:{}, |
| | | depProps:{}, |
| | |
| | | } |
| | | export default defineComponent({ |
| | | name: 'groundForm', |
| | | components: {}, |
| | | props:['departList','departList2','workerList','deviceList'], |
| | | components: {workSelect}, |
| | | props:['departList','departList2','workerList','deviceList','otherWorks'], |
| | | setup(props: any, context: any) { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | |
| | | workContent: '', |
| | | workLocation: '', |
| | | riskIdentification: '', |
| | | involveOtherWork: '', |
| | | involveOtherWork: [], |
| | | safetyMeasureUids: [], |
| | | approvalDepBasicList: [], |
| | | acceptUid: null, |
| | |
| | | cameraIds: [], |
| | | workDetail: { |
| | | gbDesc: '', |
| | | gbPath: [] |
| | | gbPath: [], |
| | | signUid: null |
| | | } |
| | | }, |
| | | otherWorkList: [ |
| | | { |
| | | label: "动火作业", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "受限空间作业", |
| | | value: 2 |
| | | }, |
| | | { |
| | | label: "吊装作业", |
| | | value: 3 |
| | | }, |
| | | { |
| | | label: "动土作业", |
| | | value: 4 |
| | | }, |
| | | { |
| | | label: "断路作业", |
| | | value: 5 |
| | | }, |
| | | { |
| | | label: "高处作业", |
| | | value: 6 |
| | | }, |
| | | { |
| | | label: "临时用电作业", |
| | | value: 7 |
| | | }, |
| | | { |
| | | label: "盲板抽堵作业", |
| | | value: 8 |
| | | } |
| | | ], |
| | | props:{ |
| | | expandTrigger: 'hover', |
| | | label: 'depName', |
| | |
| | | acceptUid: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | startOrEndUids: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | "workDetail.gbDesc": [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | "workDetail.gbPath": [{ required: true, message: '该内容不能为空', trigger: 'blur' }] |
| | | "workDetail.gbPath": [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | "workDetail.signUid": [{ required: true, message: '该内容不能为空', trigger: 'blur' }] |
| | | }); |
| | | |
| | | const workSelectRef = ref() |
| | | // 页面载入时执行方法 |
| | | onMounted(() => { |
| | | }); |
| | | const openWorkSelect = ()=>{ |
| | | workSelectRef.value.openDialog(state.form.involveOtherWork) |
| | | } |
| | | |
| | | const getSelected = ()=>{ |
| | | state.form.involveOtherWork = workSelectRef.value.selected |
| | | } |
| | | const findParent = ()=>{ |
| | | state.form.seDepId = findNearestDepLevel2DepId(props.departList2,state.form.applyDepId) |
| | | console.log(state.form.seDepId,'state.form.seDepId') |
| | |
| | | state.dialogVisible = true; |
| | | }; |
| | | |
| | | const getUploadUrl = async (rawFile: any) => { |
| | | const fileSize = rawFile.size / 1024 / 1024 < 5 ? '1' : '0' |
| | | if(fileSize === '0'){ |
| | | const getUploadUrl = async(rawFile: any) => { |
| | | if(rawFile.size / 1024 / 1024 > 2){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '文件大小不能超过5M。' |
| | | message: '文件大小不能超过2M。' |
| | | }); |
| | | return false |
| | | return Promise.reject(false) |
| | | }else{ |
| | | const res = await workApplyApi().getUpload9Url(rawFile.name); |
| | | const res = await workApplyApi().getUpload9Url(rawFile.name) |
| | | state.form.workDetail.gbPath.push(res.data.data.fileName) |
| | | state.uploadUrl = res.data.data.uploadUrl; |
| | | state.uploadUrl = res.data.data.uploadUrl |
| | | } |
| | | }; |
| | | |
| | |
| | | // if (state.fileList.length === 2) { |
| | | // state.fileList.splice(0, 1); |
| | | // } |
| | | console.log(state.form.workDetail.gbPath,'gbpath') |
| | | }); |
| | | }; |
| | | }; |
| | | |
| | | const beforeRemove = (file: {}, fileList: []) => { |
| | | if (file && file.status === "success") { |
| | | const result = new Promise((resolve, reject) => { |
| | | ElMessageBox.confirm('此操作将删除该图片, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | |
| | | .then(() => { |
| | | // console.log(state.workDetail.gbPath,'path') |
| | | const list = JSON.parse(JSON.stringify(state.form.workDetail.gbPath)) |
| | | fileList.map((item,index)=>{ |
| | | if(item.uid === file.uid){ |
| | | fileList.splice(index,1) |
| | | state.form.workDetail.gbPath.splice(index,1) |
| | | fileList.map((item, index) => { |
| | | if (item.uid === file.uid) { |
| | | fileList.splice(index, 1) |
| | | state.form.workDetail.gbPath.splice(index, 1) |
| | | // 请求删除接口 |
| | | deletePic(false,list[index]) |
| | | deletePic(list[index]) |
| | | } |
| | | }) |
| | | console.log(state.form.workDetail.gbPath,'gbpath') |
| | | console.log(state.form.workDetail.gbPath, 'gbpath') |
| | | }) |
| | | .catch(() => { |
| | | reject(false); |
| | | }); |
| | | }); |
| | | return result; |
| | | } |
| | | }; |
| | | |
| | | // 删除图片接口 |
| | |
| | | showTip, |
| | | handlePictureCardPreview, |
| | | beforeRemove, |
| | | openWorkSelect, |
| | | getSelected, |
| | | workSelectRef, |
| | | Search, |
| | | ruleFormRef, |
| | | applyRules, |
| | |
| | | width: 100%; |
| | | height: 100vh; |
| | | overflow: hidden; |
| | | position: relative; |
| | | overflow-y: scroll; |
| | | padding: 0 0 120px; |
| | | &::-webkit-scrollbar{ |
| | | width: 0; |
| | | background-color: transparent; |
| | | } |
| | | .homeCard{ |
| | | width: 100%; |
| | | padding: 20px; |
| | |
| | | margin-bottom: 20px; |
| | | } |
| | | .applyBtn{ |
| | | position: fixed; |
| | | left: 0; |
| | | bottom: 0; |
| | | z-index: 999; |
| | | width: 100%; |
| | | background: #fff; |
| | | padding: 20px 0; |
| | |
| | | width: 100% !important; |
| | | } |
| | | } |
| | | |
| | | .valueSelect{ |
| | | ::v-deep(.el-popper){ |
| | | display: none !important; |
| | | } |
| | | } |
| | | .tab-i{ |
| | | margin-bottom: 15px; |
| | | |