进路关联超限区段

This commit is contained in:
fan 2021-08-05 10:40:13 +08:00
parent ed8a3e8554
commit b55f0cc583
2 changed files with 27 additions and 1 deletions

View File

@ -721,3 +721,10 @@ export function deleteOverrunSection(mapId, code) {
method: 'delete'
});
}
// 查询超限区段list
export function queryOverunSectionList(mapId) {
return request({
url: `/api/draftMap/${mapId}/overrun/all`,
method: 'get'
});
}

View File

@ -149,6 +149,16 @@
@click="hover('routeStationStandList')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="关联超限区段" prop="overrunList">
<el-select v-model="addModel.overrunList" multiple clearable filterable style="width: 220px;">
<el-option
v-for="item in overrunSectionList"
:key="item.code"
:label="item.code"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-form>
<hostile-data ref="hostile" :conflicting-signal-list="addModel.conflictingSignalList" @hover="hover" />
<br>
@ -164,7 +174,7 @@
</template>
<script>
import { mapGetters } from 'vuex';
import { getRouteNewList, getFlankProtectionList, putSetDraftMapRouteById, createRoute } from '@/api/jmap/mapdraft';
import { getRouteNewList, getFlankProtectionList, putSetDraftMapRouteById, createRoute, queryOverunSectionList } from '@/api/jmap/mapdraft';
import HostileData from './hostileData';
// import { EventBus } from '@/scripts/event-bus';
@ -232,9 +242,11 @@ export default {
flankProtectionList: [],
stationStandList: [], //
overlapCode:'',
overrunList: [], //
conflictingSignalList: [] //
},
// overlapList: [], //
overrunSectionList: [], //
routeList: [] //
};
},
@ -343,6 +355,7 @@ export default {
mounted() {
this.getRouteList();
this.getFlankProtectList();
this.getOverrunSectionList();
// this.initProtectData();
// EventBus.$on('successCI', () => {
// this.initProtectData();
@ -364,6 +377,11 @@ export default {
this.$store.dispatch('map/setFlankProtectList', item);
});
},
getOverrunSectionList() {
queryOverunSectionList(this.$route.params.mapId).then(resp => {
this.overrunSectionList = resp.data;
});
},
swictchName(code) {
let name = '';
if (code) {
@ -436,6 +454,7 @@ export default {
this.addModel.overlapCode = '';
this.addModel.code = '';
this.addModel.conflictingSignalList = [];
this.addModel.overrunList = [];
this.isSave = true;
this.routeCode = '';
this.routeType = '';