Browse Source

fix: 巡查计划管理-编辑时巡查项目名称下拉展示对应类型数据

master_tdsql
易浩轩 1 year ago
parent
commit
45d0816690
  1. 10
      src/views/runManage/engineering/inspectionPlan/Dike.vue
  2. 4
      src/views/runManage/engineering/inspectionPlan/Sluice.vue

10
src/views/runManage/engineering/inspectionPlan/Dike.vue

@ -83,7 +83,7 @@ export default {
if (res.data.cycleType) {
this.ruleForm.cycleType = res.data.cycleType.toString()
}
this.changePatrolType(res)
this.changePatrolType(res.data, false)
this.dialogVisible = true
})
},
@ -134,8 +134,10 @@ export default {
});
},
//
changePatrolType(ruleForm) {
this.$set(ruleForm, 'xcId', '')
changePatrolType(ruleForm, reset) {
if (reset) {
this.$set(ruleForm, 'xcId', '')
}
postDFInspectionProjectList({
data: {
timeView: {
@ -284,7 +286,7 @@ export default {
<el-input style="width: 202px;" v-model="ruleForm.name"></el-input>
</el-form-item>
<el-form-item label-width="120px" label="巡查类型" prop="type">
<el-select v-model="ruleForm.type" placeholder="请选择巡查类型" @change="changePatrolType(ruleForm)">
<el-select v-model="ruleForm.type" placeholder="请选择巡查类型" @change="changePatrolType(ruleForm, true)">
<el-option v-for="item in examType" :label="item.dictLabel" :value="item.dictValue"
:key="item.id"></el-option>
</el-select>

4
src/views/runManage/engineering/inspectionPlan/Sluice.vue

@ -83,7 +83,7 @@ export default {
if (res.data.cycleType) {
this.ruleForm.cycleType = res.data.cycleType.toString()
}
this.changePatrolType(res, false)
this.changePatrolType(res.data, false)
this.dialogVisible = true
})
},
@ -135,12 +135,12 @@ export default {
},
//
changePatrolType(ruleForm, clear) {
this.$set(ruleForm, 'xcId', '')
if (clear) {
console.log('清空');
this.ruleForm.frequency = ''
this.ruleForm.cycleType = ''
this.ruleForm.otherConfig.time = ''
this.$set(ruleForm, 'xcId', '')
}
postSZInspectionProjectList({
data: {

Loading…
Cancel
Save