|
|
@ -1,6 +1,6 @@ |
|
|
|
<!-- 巡查计划管理-堤防 --> |
|
|
|
<script> |
|
|
|
import { getDicts, postDFInspectionPlanlist, |
|
|
|
import { postDFInspectionPlanlist, |
|
|
|
postDFInspectionPlan, putDFInspectionPlan, |
|
|
|
postDFInspectionProjectList, getDFInspectionPlan, |
|
|
|
deleteDFInspectionPlan, listUser } from '@/api/management' |
|
|
@ -65,7 +65,6 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
uploadFileData, |
|
|
|
// 编辑巡查项目 |
|
|
|
editTableItem(row) { |
|
|
|
getDFInspectionPlan(row.id).then((res) => { |
|
|
@ -232,8 +231,22 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 上传前 |
|
|
|
beforeAvatarUpload(e){ |
|
|
|
console.log('beforeAvatarUpload >>>>> ', e) |
|
|
|
beforeUpload(e){ |
|
|
|
console.log('beforeUpload >>>>> ', e) |
|
|
|
return true |
|
|
|
}, |
|
|
|
handleUpload(e){ |
|
|
|
console.log('e >>>>> ', e) |
|
|
|
const {file} = e |
|
|
|
let formData = new FormData() |
|
|
|
formData.append('file',file) |
|
|
|
uploadFileData(formData).then(res=>{ |
|
|
|
console.log('res >>>>> ', res) |
|
|
|
|
|
|
|
}).catch(err=>{ |
|
|
|
console.log('err >>>>> ', err) |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
// 文件上传后 |
|
|
|
handleChange(e){ |
|
|
@ -245,10 +258,11 @@ export default { |
|
|
|
this.getTableData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
// 获取列表数据 |
|
|
|
this.getTableData() |
|
|
|
getDicts('xs_classfy').then((res) => { |
|
|
|
created(){ |
|
|
|
this.getDicts("embankment_type").then((response) => { |
|
|
|
this.embankmentTypeOptions = response.data; |
|
|
|
}); |
|
|
|
this.getDicts('xs_classfy').then((res) => { |
|
|
|
if (res.data && Array.isArray(res.data)) { |
|
|
|
res.data.forEach(element => { |
|
|
|
element.dictValue = element.dictValue |
|
|
@ -256,10 +270,15 @@ export default { |
|
|
|
this.examType = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
getDicts('xs_cycle_type').then((res) => { |
|
|
|
this.getDicts('xs_cycle_type').then((res) => { |
|
|
|
this.patrolType = res.data |
|
|
|
}) |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
// 获取列表数据 |
|
|
|
this.getTableData() |
|
|
|
|
|
|
|
}, |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
@ -363,13 +382,15 @@ export default { |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="ruleForm.type == 2" label-width="120px" label="检查依据" prop="checkList"> |
|
|
|
<el-upload |
|
|
|
action="#" |
|
|
|
class="avatar-uploader" |
|
|
|
:http-request="uploadFileData" |
|
|
|
:http-request="handleUpload" |
|
|
|
:auto-upload="true" |
|
|
|
:before-upload="beforeAvatarUpload" |
|
|
|
:before-upload="beforeUpload" |
|
|
|
v-model:file-list="ruleForm.checkList" |
|
|
|
accept=".PDF,.docx,.doc,.excel,.ppt,.jpg,.png,.txt" |
|
|
|
:on-change="handleChange" |
|
|
|
:maxLength="9" |
|
|
|
> |
|
|
|
<el-button type="primary">上传</el-button> |
|
|
|
<template #tip> |
|
|
|