延续保护解锁区段不可修改

This commit is contained in:
fan 2020-01-15 10:30:59 +08:00
parent 388690c181
commit e80c0cd07f
2 changed files with 2 additions and 10 deletions

View File

@ -3,7 +3,7 @@
<el-form ref="form" :model="addModel" :rules="rules" label-width="150px" size="mini" style="margin-top: 10px">
<div class="definition">
<el-form-item label="延续保护解锁区段:" prop="unlockSectionCode">
<el-select v-model="addModel.unlockSectionCode" clearable>
<el-select v-model="addModel.unlockSectionCode" clearable :disabled="true">
<el-option
v-for="item in sectionList"
:key="item.code"
@ -11,10 +11,6 @@
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'unlockSectionCode' ? 'danger' : 'primary'"
@click="hover('unlockSectionCode')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="延续保护解锁时间(s):" prop="unlockTime">
<el-input-number v-model="addModel.unlockTime" :min="0" />
@ -272,8 +268,6 @@ export default {
}
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase() && this.field.toUpperCase() === 'routeOverlapSwitchList'.toUpperCase()) {
this.overlapCode = selected.code;
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'unlockSectionCode'.toUpperCase()) {
this.addModel.unlockSectionCode = selected.code;
}
}
},

View File

@ -350,9 +350,7 @@ export default {
this.changeSectionSelected(objOld, false, 'routePhysicalSection');
}
if (obj && obj.length) {
if (!this.addModel.code) {
this.$refs.protect.addModel.unlockSectionCode = obj[obj.length - 1];
}
this.$refs.protect.addModel.unlockSectionCode = obj[obj.length - 1];
this.changeSectionSelected(obj, true, 'routePhysicalSection');
}
},