| | |
| | | <el-row :gutter="30" style="margin-bottom: 30px" v-if="state.data.length>0"> |
| | | <el-col :span="28"> |
| | | <div style="display: flex;align-items: center"> |
| | | <span style="font-size: 22px;font-weight: 600">记录编号:{{ chooseItem.index }}(提交时间:{{chooseItem.createTime}})</span> |
| | | <span style="font-size: 22px;font-weight: 600;margin-top: 10px;">记录编号:{{ chooseItem.index }}(提交时间:{{chooseItem.createTime}})</span> |
| | | <div style="display: flex;align-items: center;flex-wrap: wrap"> |
| | | <div v-for="(item,index) in state.data"> |
| | | <el-check-tag style="margin-left: 20px;margin-top:10px;cursor: pointer" :checked="chooseItem.id === item.id" type="primary" @click="chooseRecord(item,index)">记录编号{{ index+1 }}</el-check-tag> |
| | | <el-check-tag style="margin-left: 20px;margin-top:10px;cursor: pointer;padding: 15px 25px" :checked="chooseItem.id === item.id" size="large" @click="chooseRecord(item,index)">记录编号{{ index+1 }}</el-check-tag> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item prop="location" label="现场勘验位置"> |
| | | <el-input |
| | | v-model="state.formData.location" |
| | | v-model.trim="state.formData.location" |
| | | size="large" |
| | | placeholder="请填写现场勘验位置" |
| | | @focus="openLocation" |
| | | > |
| | | |
| | | <template #append> |
| | | <el-button :icon="Search" @click="openLocation"/> |
| | | </template> |
| | |
| | | <el-col :span="24" v-if="state.formData.isSafetyCheck == 0"> |
| | | <el-form-item prop="recordData" label="现场勘验记录"> |
| | | <el-input |
| | | v-model="state.formData.recordData" |
| | | v-model.trim="state.formData.recordData" |
| | | :autosize="{ minRows: 6 }" |
| | | maxlength="200" |
| | | show-word-limit |
| | |
| | | } |
| | | |
| | | const achieveLatLng=(lng,lat)=>{ |
| | | state.formData.location = lng + ',' + lat |
| | | if(lng && lat){ |
| | | state.formData.location = lng + ',' + lat |
| | | }else { |
| | | ElMessage.warning('请选择勘验位置') |
| | | } |
| | | |
| | | } |
| | | |
| | | // 图片上传 |
| | |
| | | } |
| | | |
| | | const handleRemove = async (file, uploadFiles,type) => { |
| | | |
| | | if(file && file.status == 'success') { |
| | | ElMessageBox.confirm( |
| | | '确定删除该附件?', |
| | | '提示', |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | .then(async () => { |
| | | const res = await delFile(file.id) |
| | | if(res.code == 200){ |
| | | if (res.code == 200) { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件已删除' |
| | | }) |
| | | if(type == 1){ |
| | | if (type == 1) { |
| | | const index = state.formData.deviceImages.findIndex(v => v.id === file.id) |
| | | state.formData.deviceImages.splice(index,1); |
| | | state.formData.deviceImages.splice(index, 1); |
| | | |
| | | } |
| | | if(type == 2){ |
| | | if (type == 2) { |
| | | const index = state.formData.investingationImages.findIndex(v => v.id === file.id) |
| | | state.formData.investingationImages.splice(index,1); |
| | | state.formData.investingationImages.splice(index, 1); |
| | | |
| | | } |
| | | if(type == 3){ |
| | | if (type == 3) { |
| | | const index = state.formData.companyImages.findIndex(v => v.id === file.id) |
| | | state.formData.companyImages.splice(index,1); |
| | | state.formData.companyImages.splice(index, 1); |
| | | } |
| | | if(type == 5){ |
| | | if (type == 5) { |
| | | const index = state.formData.assAccessoryFiles.findIndex(v => v.id === file.id) |
| | | state.formData.assAccessoryFiles.splice(index,1); |
| | | state.formData.assAccessoryFiles.splice(index, 1); |
| | | } |
| | | }else{ |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(()=>{ |
| | | .catch(() => { |
| | | // if(type == 1){ |
| | | // getBeforeFiles() |
| | | // } |
| | |
| | | // getSafetyFiles() |
| | | // } |
| | | }) |
| | | } |
| | | |
| | | } |
| | | |