Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
3772012be2
@ -482,6 +482,7 @@ export default class Section extends Group {
|
||||
this.setAshShow();
|
||||
model.preGreen && this.line.setStyle({stroke: '#00FF00'});
|
||||
model.preBlue && this.line.setStyle({stroke: '#4A76B7'});
|
||||
model.preWhite && this.line.setStyle({stroke: '#fff'})
|
||||
} else {
|
||||
this.handleSwitchSection(model, flag);
|
||||
// 顺序代表优先级
|
||||
|
@ -178,26 +178,6 @@ export default {
|
||||
getDeviceByCode(code) {
|
||||
return this.mapDevice[code];
|
||||
},
|
||||
// 综合演练切换现地行调模式
|
||||
// changePrdType(val) {
|
||||
// const nameList = Object.keys(this.$store.state.map.map || {});
|
||||
// let list = [];
|
||||
// let showMode = '';
|
||||
// nameList.forEach((item) => {
|
||||
// if (item !== 'skinVO') {
|
||||
// const data = this.$store.state.map.map[item];
|
||||
// if (data && data.constructor === Array) {
|
||||
// list = [...list, ...data];
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// if (val === '01') {
|
||||
// showMode = '03';
|
||||
// } else if (val === '02') {
|
||||
// showMode = '02';
|
||||
// }
|
||||
// this.map.updatePrdType(list, showMode, val);
|
||||
// },
|
||||
setShowStation(stationCode, setCenter) {
|
||||
const list = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
|
@ -1,21 +1,21 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1100px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-dialog v-dialogDrag top="12vh" class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1100px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row>
|
||||
<el-col :span="3">列车车次</el-col>
|
||||
<el-col :span="2">列车车次</el-col>
|
||||
<el-col :span="21"><span>{{ selected.tripNumber }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="3">进路描述</el-col>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="2">进路描述</el-col>
|
||||
<el-col :span="21">
|
||||
<div style="width: 100%;height: 50px;">
|
||||
<span>{{ `${type === 'dep' ? '发车/通过': '接车/通过'}; 股道:${selected.trackName};进路按钮:${getRouteNames(selected)}` }}</span>
|
||||
<div style="width: 100%;height: 50px;background: #DFE3E6;padding: 10px;">
|
||||
<span>{{ `${type === 'dep' ? '发车/通过': '接车/通过'}; 股道:${selected.trackName};进路按钮:${getRouteNames()}` }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="3">进路显示</el-col>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="2">进路显示</el-col>
|
||||
<el-col :span="21">
|
||||
<map-visual ref="map" :map-data="mapData" :width="780" :height="600" />
|
||||
<map-visual ref="map" :map-data="mapData" :width="960" :height="600" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--<el-row :gutter="24">-->
|
||||
@ -51,6 +51,19 @@
|
||||
<!--<map-visual ref="map" :map-data="mapData" :width="780" :height="600" />-->
|
||||
<!--</el-col>-->
|
||||
<!--</el-row>-->
|
||||
<el-row style="margin-top: 10px;margin-bottom: 10px;">
|
||||
<el-col :span="21" :offset="2">
|
||||
<el-radio disabled v-model="radio" label="禁用">分段办理</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="display: flex;justify-content: space-between;margin-bottom: 10px;">
|
||||
<el-button size="mini" v-if="type === 'rec'" :type="selected.receivingRouteAutoTrigger?'warning':''" :disabled="!!route.lock" @click="commit">办理接车</el-button>
|
||||
<el-button size="mini" v-if="type === 'dep'" :type="selected.departureRouteAutoTrigger?'warning':''" :disabled="!!route.lock" @click="commit">办理发车</el-button>
|
||||
<el-button size="mini" disabled>办理通过</el-button>
|
||||
<el-button size="mini" disabled>进路单锁</el-button>
|
||||
<el-button size="mini" :disabled="!!!route.lock" @click="commit">取消进路</el-button>
|
||||
<el-button size="mini" @click="doClose">关闭</el-button>
|
||||
</div>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<confirm-tip ref="confirmTip" @close="doClose" />
|
||||
</el-dialog>
|
||||
@ -76,6 +89,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
radio:'',
|
||||
beforeSectionList: [],
|
||||
beforeSwitchList: [],
|
||||
dialogShow: false,
|
||||
@ -116,8 +130,10 @@ export default {
|
||||
this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map));
|
||||
},
|
||||
methods: {
|
||||
getRouteNames(data) {
|
||||
|
||||
getRouteNames() {
|
||||
const receivingRoute = this.$store.state.map.routeData[this.selected.receivingRouteCode];
|
||||
const departureRoute = this.$store.state.map.routeData[this.selected.departureRouteCode];
|
||||
return (receivingRoute?receivingRoute.name: '') + ',' + (departureRoute?departureRoute.name: '');
|
||||
},
|
||||
doShow(selected, type) {
|
||||
// this.$root.$emit('dialogOpen', selected);
|
||||
@ -134,13 +150,20 @@ export default {
|
||||
this.beforeSectionList = [];
|
||||
if (this.mapData) {
|
||||
this.$refs.map.loadData(this.mapData);
|
||||
setTimeout(() => {
|
||||
if (this.type === 'rec'){
|
||||
this.clickEvent(this.selected.receivingRouteCode);
|
||||
} else if (this.type === 'dep'){
|
||||
this.clickEvent(this.selected.departureRouteCode);
|
||||
}
|
||||
}, 100);
|
||||
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.route = null;
|
||||
this.route = {};
|
||||
this.restoreBeforeDevices();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
@ -150,8 +173,7 @@ export default {
|
||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||
this.beforeSectionList.forEach(el => {
|
||||
el.routeLock = false;
|
||||
el.preBlue = false;
|
||||
el.preGreen = false;
|
||||
el.preWhite = false;
|
||||
});
|
||||
}
|
||||
|
||||
@ -179,10 +201,8 @@ export default {
|
||||
const containSwitchList = [];
|
||||
if (!route.setting) {
|
||||
const signalBegin = this.$refs.map.getDeviceByCode(route.startSignalCode);
|
||||
const signalEnd = this.$refs.map.getDeviceByCode(route.endSignalCode);
|
||||
const diff = signalBegin.position.x - signalEnd.position.x;
|
||||
const code = diff > 0 ? route.endSignalCode : route.startSignalCode;
|
||||
const signal = diff > 0 ? signalEnd : signalBegin;
|
||||
const code = route.startSignalCode;
|
||||
const signal = signalBegin;
|
||||
const switchCodeList = [];
|
||||
|
||||
this.$refs.map.setCenterWithOffset(code, 50, signal.position.y);
|
||||
@ -191,10 +211,10 @@ export default {
|
||||
const section = deepAssign({}, this.$refs.map.getDeviceByCode(code));
|
||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||
section.logicSectionCodeList.forEach(sectionCode => {
|
||||
containSectionList.push({code: sectionCode, preGreen: true, preBlue: false});
|
||||
containSectionList.push({code: sectionCode, preWhite: true});
|
||||
});
|
||||
} else {
|
||||
containSectionList.push({code, preGreen: true, preBlue: false});
|
||||
containSectionList.push({code, preWhite: true});
|
||||
}
|
||||
|
||||
if (section.switchSection && section.switch) {
|
||||
@ -213,10 +233,10 @@ export default {
|
||||
containSwitchList.push({code: el.switchCode, routeLock: true, pos:el.pos });
|
||||
if (el.normal) {
|
||||
containSectionList.push({code: sectionA.code, routeLock:true });
|
||||
containSectionList.push({code: sectionC.code, preBlue: true });
|
||||
// containSectionList.push({code: sectionC.code, preBlue: true });
|
||||
} else {
|
||||
containSectionList.push({code: sectionC.code, routeLock:true });
|
||||
containSectionList.push({code: sectionB.code, preBlue: true });
|
||||
// containSectionList.push({code: sectionB.code, preBlue: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -224,6 +244,7 @@ export default {
|
||||
this.$refs.map.updateMapDevice([...containSectionList, ...containSwitchList]);
|
||||
this.beforeSectionList = containSectionList;
|
||||
this.beforeSwitchList = containSwitchList;
|
||||
console.log(this.beforeSectionList, this.beforeSwitchList, '======');
|
||||
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
@ -242,17 +263,21 @@ export default {
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
if (this.route) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 1).then(({valid, operate})=>{
|
||||
const type = this.route.lock ? menuOperate.Signal.cancelTrainRoute :menuOperate.Signal.arrangementRoute;
|
||||
const param = this.route.lock ? { signalCode: this.route.startSignalCode } : { routeCode:this.route.code };
|
||||
console.log(this.route.startSignalCode, '-----------', type, param);
|
||||
commitOperate(type, param, 3).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](this.row.startSignalCode);
|
||||
operate.message = `命令:进路设置<br/>始端信号机:${signal.name}<br/>进路:${this.row.name}`;
|
||||
// this.doClose();
|
||||
// const signal = this.$store.getters['map/getDeviceByCode'](this.row.startSignalCode);
|
||||
// operate.message = `命令:进路设置<br/>始端信号机:${signal.name}<br/>进路:${this.row.name}`;
|
||||
this.doClose();
|
||||
this.$refs.confirmTip.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch((e) => {
|
||||
console.error(e);
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
|
@ -41,7 +41,7 @@
|
||||
@click="doShowRoute(item, 'rec')">
|
||||
{{ '接路' + (item.receivingRouteLock ? '':getRouteName(item.receivingRouteCode)) }}
|
||||
</div>
|
||||
<div :style="{ background: item.arrive ? '#29CA42': '#ccc' }" class="button-box-fir" style="margin-left: 10px;">到点</div>
|
||||
<div :style="{ background: item.arrive ? '#29CA42': '#ccc' }" class="button-box-fir" style="margin-left: 10px;cursor: default;">到点</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>{{item.arriveTime}}</div>
|
||||
@ -60,7 +60,7 @@
|
||||
@click="doShowRoute(item, 'dep')">
|
||||
{{ '发路' + (item.departureRouteLock ? '':getRouteName(item.departureRouteCode)) }}
|
||||
</div>
|
||||
<div :style="{ background: item.departure ? '#29CA42': '#ccc' }" class="button-box-fir" style="margin-left: 10px;">发点</div>
|
||||
<div :style="{ background: item.departure ? '#29CA42': '#ccc' }" class="button-box-fir" style="margin-left: 10px;cursor: default;">发点</div>
|
||||
</div>
|
||||
<div>{{ item.tripNumber }}</div>
|
||||
<div>{{ item.trackName }}</div>
|
||||
|
Loading…
Reference in New Issue
Block a user