|
|
@ -2,7 +2,7 @@ |
|
|
|
<script> |
|
|
|
import { |
|
|
|
getDicts, |
|
|
|
postSZInspectionPlanlist, |
|
|
|
postSZInspectionPlanList, |
|
|
|
postSZInspectionPlan, |
|
|
|
putSZInspectionPlan, |
|
|
|
postSZInspectionProjectList, |
|
|
@ -115,7 +115,7 @@ export default { |
|
|
|
}); |
|
|
|
} |
|
|
|
this.ruleForm = res.data; |
|
|
|
this.ruleForm.type = res.data.type.toString(); |
|
|
|
this.ruleForm.type = res.data.type?.toString() || ""; |
|
|
|
this.ruleForm.wagaCode = this.$route.query.wagaCode; |
|
|
|
if (res.data.cycleType) { |
|
|
|
this.ruleForm.cycleType = res.data.cycleType.toString(); |
|
|
@ -238,11 +238,12 @@ export default { |
|
|
|
}, |
|
|
|
// 获取数据 |
|
|
|
getTableData(search) { |
|
|
|
postSZInspectionPlanlist({ |
|
|
|
postSZInspectionPlanList({ |
|
|
|
data: { |
|
|
|
timeView: { |
|
|
|
timeField: "create_time", |
|
|
|
}, |
|
|
|
wagaCode: this.$route.query.wagaCode, |
|
|
|
}, |
|
|
|
cv: { |
|
|
|
name: "name", |
|
|
@ -289,7 +290,6 @@ export default { |
|
|
|
}, |
|
|
|
// 上传前 |
|
|
|
beforeAvatarUpload(e) { |
|
|
|
console.log("beforeAvatarUpload >>>>> ", e); |
|
|
|
let formData = new FormData(); |
|
|
|
formData.append({ |
|
|
|
file: e, |
|
|
@ -306,21 +306,25 @@ export default { |
|
|
|
handleChange(e) { |
|
|
|
console.log("handleChange >>>>> ", e); |
|
|
|
}, |
|
|
|
// 获取巡查类型 |
|
|
|
getXcType(val) { |
|
|
|
let type = ""; |
|
|
|
this.examType.forEach((element) => { |
|
|
|
if (element.dictValue == val) { |
|
|
|
type = element.dictLabel; |
|
|
|
} |
|
|
|
}); |
|
|
|
return type; |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
// 获取列表数据 |
|
|
|
this.getTableData(); |
|
|
|
getDicts("xs_classfy").then((res) => { |
|
|
|
if (res.data && Array.isArray(res.data)) { |
|
|
|
res.data.forEach((element) => { |
|
|
|
element.dictValue = element.dictValue; |
|
|
|
}); |
|
|
|
this.examType = res.data; |
|
|
|
} |
|
|
|
this.examType = res.data || []; |
|
|
|
}); |
|
|
|
getDicts("xs_cycle_type").then((res) => { |
|
|
|
console.log("🚀res.data🚀", res.data); |
|
|
|
this.patrolType = res.data; |
|
|
|
this.patrolType = res.data || []; |
|
|
|
}); |
|
|
|
}, |
|
|
|
}; |
|
|
@ -362,10 +366,7 @@ export default { |
|
|
|
<el-table-column prop="name" align="center" label="计划名称" /> |
|
|
|
<el-table-column align="center" label="巡查类型"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="examType.length > 0">{{ |
|
|
|
examType.find((item) => item.dictValue == scope.row.type) |
|
|
|
.dictLabel || "" |
|
|
|
}}</span> |
|
|
|
<span>{{ getXcType(scope.row.type) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|