地图绘图 目的地码 添加起始区段的字段
This commit is contained in:
parent
5e91907816
commit
ed791a0a2f
@ -19,6 +19,20 @@
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="addModel.description" type="textarea" style="width: 330px;" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="addModel.type && addModel.type != 'NORMAL_OPERATION'" label="起始区段" prop="startSectionCode">
|
||||
<el-select v-model="addModel.startSectionCode" clearable :filterable="true">
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type=" field === 'sectionCode3' ? 'danger' : 'primary'"
|
||||
@click="hover('sectionCode3')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="addModel.type && addModel.type != 'NORMAL_OPERATION'" label="目标区段" prop="sectionCode">
|
||||
<el-select v-model="addModel.sectionCode" clearable :filterable="true">
|
||||
<el-option
|
||||
@ -151,7 +165,8 @@ export default {
|
||||
stationACode: '',
|
||||
stationBCode: '',
|
||||
stationAFrontTurnBack: null,
|
||||
stationBFrontTurnBack: null
|
||||
stationBFrontTurnBack: null,
|
||||
startSectionCode:''
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
@ -213,6 +228,8 @@ export default {
|
||||
if (selected) {
|
||||
if (selected._type == 'Section' && this.field == 'sectionCode1') {
|
||||
this.addModel.sectionCode = selected.code;
|
||||
} else if (selected._type == 'Section' && this.field == 'sectionCode3') {
|
||||
this.addModel.startSectionCode = selected.code;
|
||||
} else if (selected._type == 'Section' && this.field == 'sectionCode2') {
|
||||
if (!this.addModel.runPath.includes(selected.code)) {
|
||||
this.addModel.runPath.push(selected.code);
|
||||
@ -233,6 +250,7 @@ export default {
|
||||
delete model.stationBFrontTurnBack;
|
||||
} else {
|
||||
delete model.sectionCode;
|
||||
delete model.startSectionCode;
|
||||
delete model.right;
|
||||
}
|
||||
return model;
|
||||
@ -277,6 +295,7 @@ export default {
|
||||
description: '',
|
||||
type: '',
|
||||
sectionCode: '',
|
||||
startSectionCode:'',
|
||||
runPath: [],
|
||||
right: '',
|
||||
stationACode: '',
|
||||
|
Loading…
Reference in New Issue
Block a user