新版绘图 交路代码调整
This commit is contained in:
parent
3f942518f1
commit
2f8832be83
@ -7,7 +7,7 @@
|
||||
<el-input v-model="addModel.name" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.startStationCodeColon')" prop="startStationCode">
|
||||
<el-select v-model="addModel.startStationCode" clearable :filterable="true" @change="changeStartStation()">
|
||||
<el-select v-model="addModel.startStationCode" clearable :filterable="true" @change="changeStartStation">
|
||||
<el-option
|
||||
v-for="item in filterStationList"
|
||||
:key="item.code"
|
||||
@ -21,7 +21,7 @@
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.startSectionColon')" prop="startSectionCode">
|
||||
<el-select v-model="addModel.startSectionCode" clearable :filterable="true" :disabled="editShow" @change="changeStartSection()">
|
||||
<el-select v-model="addModel.startSectionCode" clearable :filterable="true" :disabled="editShow" @change="changeStartSection">
|
||||
<el-option
|
||||
v-for="item in filterSectionList"
|
||||
:key="item.code"
|
||||
@ -36,7 +36,7 @@
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.endStationColon')" prop="endStationCode">
|
||||
<el-select v-model="addModel.endStationCode" clearable :filterable="true" :disabled="!isStartSelected" @change="changeEndStation()">
|
||||
<el-select v-model="addModel.endStationCode" clearable :filterable="true" :disabled="!isStartSelected" @change="changeEndStation">
|
||||
<el-option
|
||||
v-for="item in filterStationList"
|
||||
:key="item.code"
|
||||
@ -51,7 +51,7 @@
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.endSectionColon')" prop="endSectionCode">
|
||||
<el-select v-model="addModel.endSectionCode" clearable :filterable="true" :disabled="editShow || !isStartSelected" @change="changeEndSection()">
|
||||
<el-select v-model="addModel.endSectionCode" clearable :filterable="true" :disabled="editShow || !isStartSelected" @change="changeEndSection">
|
||||
<el-option
|
||||
v-for="item in filterSectionList"
|
||||
:key="item.code"
|
||||
@ -81,17 +81,6 @@
|
||||
<el-form-item :label="$t('map.remarksColon')" prop="description">
|
||||
<el-input v-model="addModel.description" type="textarea" :rows="4" :placeholder="$t('map.pleaseSelect')" />
|
||||
</el-form-item>
|
||||
<!--<el-form-item :label="$t('map.trafficSegmentData')" prop="parkSectionCodeList">-->
|
||||
<!--<el-select v-model="addModel.parkSectionCodeList" multiple>-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in sectionList"-->
|
||||
<!--:key="item.code"-->
|
||||
<!--:label="`${item.name}(${item.code})`"-->
|
||||
<!--:value="item.code"-->
|
||||
<!--/>-->
|
||||
<!--</el-select>-->
|
||||
<!--<el-button :type=" field === 'routingSection' ? 'danger' : 'primary'" @click="hover('routingSection')">{{ $t('map.activate') }}</el-button>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item :label="$t('map.trafficSegmentData')" prop="parkSectionCodeList">
|
||||
<el-button type="primary" size="small" :loading="generating" style="margin-bottom:10px" @click.native.prevent="generateParkSection">生成交路区段</el-button>
|
||||
<el-table
|
||||
@ -236,9 +225,9 @@ export default {
|
||||
name: [
|
||||
{ required: true, message: '请输入交路名称', trigger: 'change' }
|
||||
],
|
||||
destinationCode: [
|
||||
{ required: true, message: '请输入目的地码', trigger: 'change' }
|
||||
],
|
||||
// destinationCode: [
|
||||
// { required: true, message: '请输入目的地码', trigger: 'change' }
|
||||
// ],
|
||||
startStationCode: [
|
||||
{ required: true, message: '请选择起始站', trigger: 'change' }
|
||||
],
|
||||
@ -342,7 +331,11 @@ export default {
|
||||
this.judgeAllowSelected();
|
||||
this.addStartSectionData(true);
|
||||
},
|
||||
changeStartSection() {
|
||||
changeStartSection(data) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](data);
|
||||
if (section.belongStation) {
|
||||
this.addModel.startStationCode = section.belongStation;
|
||||
}
|
||||
this.judgeAllowSelected();
|
||||
this.addStartSectionData(false);
|
||||
},
|
||||
@ -350,7 +343,11 @@ export default {
|
||||
this.judgeAllowSelected();
|
||||
this.addEndSectionData(true);
|
||||
},
|
||||
changeEndSection() {
|
||||
changeEndSection(data) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](data);
|
||||
if (section.belongStation) {
|
||||
this.addModel.startStationCode = section.belongStation;
|
||||
}
|
||||
this.judgeAllowSelected();
|
||||
this.addEndSectionData(false);
|
||||
},
|
||||
@ -390,6 +387,9 @@ export default {
|
||||
this.addEndSectionData(true);
|
||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'startSectionCode'.toUpperCase()) {
|
||||
if (selected.standTrack || selected.reentryTrack || selected.transferTrack) {
|
||||
if (selected.belongStation) {
|
||||
this.addModel.startStationCode = selected.belongStation;
|
||||
}
|
||||
this.addModel.startSectionCode = selected.code;
|
||||
this.judgeAllowSelected();
|
||||
this.addStartSectionData(false);
|
||||
@ -399,6 +399,9 @@ export default {
|
||||
}
|
||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'endSectionCode'.toUpperCase()) {
|
||||
if (selected.standTrack || selected.reentryTrack || selected.transferTrack) {
|
||||
if (selected.belongStation) {
|
||||
this.addModel.startStationCode = selected.belongStation;
|
||||
}
|
||||
this.addModel.endSectionCode = selected.code;
|
||||
this.judgeAllowSelected();
|
||||
this.addEndSectionData(false);
|
||||
@ -495,13 +498,8 @@ export default {
|
||||
list.splice(index, 1);
|
||||
},
|
||||
buildModel(code) {
|
||||
// this.addModel.routingSectionList.forEach((elem, index) => {
|
||||
// elem['orderNum'] = index + 1;
|
||||
// });
|
||||
|
||||
const model = Object.assign({}, this.addModel);
|
||||
model['mapId'] = this.mapInfo.id;
|
||||
|
||||
if (code) { model['code'] = code; }
|
||||
return model;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user