大铁线路调整9
This commit is contained in:
parent
5e30c99d2c
commit
daff80c19e
265
src/jmapNew/theme/datie_02/menus/dialog/mapVisual.vue
Normal file
265
src/jmapNew/theme/datie_02/menus/dialog/mapVisual.vue
Normal file
@ -0,0 +1,265 @@
|
||||
<template>
|
||||
<div
|
||||
ref="jlmapCanvas"
|
||||
class="jlmap-canvas"
|
||||
:style="{ width: width + 'px', height: height + 'px' }"
|
||||
>
|
||||
<div :id="canvasId" class="display_canvas" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Jlmap from '@/jmapNew/map';
|
||||
import { parserFactory, ParserType } from '@/jmapNew/parser';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import deviceType from '@/jmapNew/constant/deviceType';
|
||||
|
||||
export default {
|
||||
name: 'JLocalmapVisual',
|
||||
props: {
|
||||
width: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
mapData: {
|
||||
type: Object,
|
||||
defautl() {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
offset: {
|
||||
x: 0,
|
||||
y: 0
|
||||
},
|
||||
map: null,
|
||||
mapDevice: {},
|
||||
routeData: [],
|
||||
autoReentryData: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
canvasId() {
|
||||
return ['map', Math.random().toFixed(5) * 100000].join('_');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.config.canvasSizeCount': function (val) {
|
||||
this.resetSize();
|
||||
}
|
||||
// '$store.state.training.prdType': function (val) {
|
||||
// if (val) {
|
||||
// this.changePrdType(val);
|
||||
// }
|
||||
// }
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.map) {
|
||||
this.map.dispose();
|
||||
this.map = null;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
document.getElementById(this.canvasId).oncontextmenu = function (e) {
|
||||
return false;
|
||||
};
|
||||
|
||||
const prdType = this.$store.state.training.prdType;
|
||||
|
||||
let showMode = '';
|
||||
if (prdType == '01') {
|
||||
showMode = '03';
|
||||
} else if (prdType == '02') {
|
||||
showMode = '02';
|
||||
}
|
||||
|
||||
if (!this.map) {
|
||||
this.map = new Jlmap({
|
||||
dom: document.getElementById(this.canvasId),
|
||||
config: {
|
||||
renderer: 'canvas',
|
||||
width: this.width,
|
||||
height: this.height
|
||||
},
|
||||
options: {
|
||||
scaleRate: 1,
|
||||
offsetX: 0,
|
||||
offsetY: 0,
|
||||
zoomOnMouseWheel: false
|
||||
},
|
||||
showConfig: {
|
||||
prdType: prdType,
|
||||
previewOrMapDraw: true,
|
||||
showMode: showMode
|
||||
},
|
||||
methods: {}
|
||||
});
|
||||
}
|
||||
|
||||
window.document.oncontextmenu = function () {
|
||||
return false;
|
||||
};
|
||||
|
||||
if (this.mapData.skinVO) {
|
||||
const parser = parserFactory(ParserType.Graph.value);
|
||||
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
|
||||
}
|
||||
},
|
||||
loadData() {
|
||||
try {
|
||||
this.setMap(this.mapData, this.mapDevice);
|
||||
} catch (error) {
|
||||
console.log('[ERROR] ', error);
|
||||
}
|
||||
},
|
||||
// 设置地图
|
||||
setMap(data, mapDevice) {
|
||||
if (data.skinVO) {
|
||||
this.routeData = this.$store.state.map.routeData;
|
||||
this.autoReentryData = this.$store.state.map.autoReentryData;
|
||||
this.map.setMap(data, mapDevice, {
|
||||
routeData: this.routeData,
|
||||
autoReentryData: this.autoReentryData
|
||||
});
|
||||
this.setMapFree();
|
||||
} else {
|
||||
this.mapDevice = {};
|
||||
this.map.clear();
|
||||
}
|
||||
},
|
||||
// 重置jlmap宽高
|
||||
resetSize() {
|
||||
this.$nextTick(() => {
|
||||
this.map && this.map.resize({ width: this.width, height: this.height });
|
||||
});
|
||||
},
|
||||
// 设置显示图层
|
||||
setLevelVisible(levels) {
|
||||
this.map && this.map.setLevelVisible(levels);
|
||||
},
|
||||
setMapFree() {
|
||||
const list = [];
|
||||
Object.values(this.mapDevice).forEach((elem) => {
|
||||
const code = elem.code;
|
||||
const type = elem._type;
|
||||
// 列车不需要设置默认状态
|
||||
type != deviceType.Train &&
|
||||
list.push({ code, _type: type, _free: true });
|
||||
});
|
||||
|
||||
this.map.update(list, false);
|
||||
},
|
||||
// 设置中心偏移
|
||||
setCenterWithOffset(code, dx, y) {
|
||||
this.map.setCenterWithOffset(code, dx, y - this.height / 2);
|
||||
},
|
||||
// 更新地图数据
|
||||
updateMapDevice(elems) {
|
||||
const list = [];
|
||||
elems.forEach((elem) => {
|
||||
if (elem.code) {
|
||||
list.push(deepAssign(this.mapDevice[elem.code], elem));
|
||||
}
|
||||
});
|
||||
|
||||
this.map.update(list, false);
|
||||
},
|
||||
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;
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
this.map.updateShowStation(list, stationCode);
|
||||
!setCenter && this.setCenter(stationCode);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.mask {
|
||||
opacity: 0;
|
||||
background: #000;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 9;
|
||||
}
|
||||
.jlmap-canvas {
|
||||
position: relative;
|
||||
-moz-user-select: none;
|
||||
-o-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
background: #000;
|
||||
float: left;
|
||||
}
|
||||
.title {
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
line-height: 32px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.zoom-view {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
padding-top: 5px;
|
||||
height: 42px;
|
||||
border-bottom: 1px #f3f3f3 solid;
|
||||
border-right: 1px #f3f3f3 solid;
|
||||
}
|
||||
|
||||
/deep/ {
|
||||
.el-form.el-form--inline {
|
||||
height: 28px !important;
|
||||
line-height: 28px !important;
|
||||
}
|
||||
|
||||
.el-loading-mask {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,41 +1,56 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" :width="showExpand? '1100px': '300px'" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="showExpand? 6: 24">
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>集中站</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px; line-height: 30px;">
|
||||
<el-col :span="11"><span>进路列表</span></el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-button class="expand" @click="expandPath">{{ expandTitle }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; height: 460px; margin-top:10px" size="mini" highlight-current-row :show-header="false" @row-click="clickEvent">
|
||||
<el-table-column :id="domIdChoose" prop="name" style="margin-left:30px" />
|
||||
</el-table>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col v-show="showExpand" :span="showExpand? 18: 0">
|
||||
<map-visual ref="map" :map-data="mapData" :width="780" :height="600" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<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-row>
|
||||
<el-col :span="3">列车车次</el-col>
|
||||
<el-col :span="21"><span>{{ selected.tripNumber }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="3">进路描述</el-col>
|
||||
<el-col :span="21">
|
||||
<div style="width: 100%;height: 50px;">
|
||||
<span>{{ `${type === 'dep' ? '发车/通过': '接车/通过'}; 股道:${selected.trackName};进路按钮:${getRouteNames(selected)}` }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="3">进路显示</el-col>
|
||||
<el-col :span="21">
|
||||
<map-visual ref="map" :map-data="mapData" :width="780" :height="600" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--<el-row :gutter="24">-->
|
||||
<!--<el-col :span="6">-->
|
||||
<!--<el-row class="header">-->
|
||||
<!--<el-col :span="11"><span>集中站</span></el-col>-->
|
||||
<!--<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>-->
|
||||
<!--</el-row>-->
|
||||
<!--<el-row>-->
|
||||
<!--<el-col :span="11">-->
|
||||
<!--<el-input v-model="stationName" size="small" disabled />-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="11" :offset="2">-->
|
||||
<!--<el-input v-model="signalName" size="small" disabled />-->
|
||||
<!--</el-col>-->
|
||||
<!--</el-row>-->
|
||||
<!--<el-row style="margin-top: 10px; line-height: 30px;">-->
|
||||
<!--<el-col :span="11"><span>进路列表</span></el-col>-->
|
||||
<!--</el-row>-->
|
||||
<!--<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; height: 460px; margin-top:10px" size="mini" highlight-current-row :show-header="false" @row-click="clickEvent">-->
|
||||
<!--<el-table-column :id="domIdChoose" prop="name" style="margin-left:30px" />-->
|
||||
<!--</el-table>-->
|
||||
<!--<el-row justify="center" class="button-group">-->
|
||||
<!--<el-col :span="8" :offset="4">-->
|
||||
<!--<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定</el-button>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="8" :offset="4">-->
|
||||
<!--<el-button :id="domIdCancel" @click="cancel">取 消</el-button>-->
|
||||
<!--</el-col>-->
|
||||
<!--</el-row>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="18">-->
|
||||
<!--<map-visual ref="map" :map-data="mapData" :width="780" :height="600" />-->
|
||||
<!--</el-col>-->
|
||||
<!--</el-row>-->
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<confirm-tip ref="confirmTip" @close="doClose" />
|
||||
</el-dialog>
|
||||
@ -61,22 +76,19 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
beforeSectionList: [],
|
||||
beforeSwitchList: [],
|
||||
showExpand: true,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
row: null,
|
||||
selected: {},
|
||||
operation: '',
|
||||
display: true,
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
mapData: null,
|
||||
route: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
}
|
||||
},
|
||||
type: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -96,58 +108,21 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '进路设置';
|
||||
},
|
||||
expandTitle() {
|
||||
return this.showExpand ? '收起进路预览' : '展开进路预览';
|
||||
},
|
||||
commitDisabled() {
|
||||
let disabled = true;
|
||||
if (this.row) {
|
||||
disabled = !this.row.canSetting;
|
||||
}
|
||||
return disabled;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.commitDisabled) {
|
||||
this.commit();
|
||||
}
|
||||
return '进路办理';
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
created() {
|
||||
this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map));
|
||||
},
|
||||
methods: {
|
||||
expandPath() {
|
||||
this.showExpand = !this.showExpand;
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.$root.$emit('dialogOpen', selected);
|
||||
getRouteNames(data) {
|
||||
|
||||
},
|
||||
doShow(selected, type) {
|
||||
// this.$root.$emit('dialogOpen', selected);
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
const routeList = JSON.parse(JSON.stringify(tempData || []));
|
||||
|
||||
this.tempData = routeList;
|
||||
this.tempData.forEach(route => {
|
||||
if (route.turnBack) {
|
||||
route.name = `${route.name}(Z)`;
|
||||
}
|
||||
});
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.type = type;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.loadData();
|
||||
@ -159,15 +134,14 @@ export default {
|
||||
this.beforeSectionList = [];
|
||||
if (this.mapData) {
|
||||
this.$refs.map.loadData(this.mapData);
|
||||
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.row = null;
|
||||
this.route = null;
|
||||
this.restoreBeforeDevices();
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
@ -194,26 +168,26 @@ export default {
|
||||
this.beforeSectionList = [];
|
||||
this.beforeSwitchList = [];
|
||||
},
|
||||
clickEvent(row, event, column) {
|
||||
this.row = row;
|
||||
if (row) {
|
||||
clickEvent(routeCode) {
|
||||
const route = this.$store.state.map.routeData[routeCode];
|
||||
this.route = route;
|
||||
if (route) {
|
||||
// 恢复进路区段的切除状态
|
||||
this.row.canSetting = true;
|
||||
this.restoreBeforeDevices();
|
||||
|
||||
const containSectionList = [];
|
||||
const containSwitchList = [];
|
||||
if (!row.setting) {
|
||||
const signalBegin = this.$refs.map.getDeviceByCode(row.startSignalCode);
|
||||
const signalEnd = this.$refs.map.getDeviceByCode(row.endSignalCode);
|
||||
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 ? row.endSignalCode : row.startSignalCode;
|
||||
const code = diff > 0 ? route.endSignalCode : route.startSignalCode;
|
||||
const signal = diff > 0 ? signalEnd : signalBegin;
|
||||
const switchCodeList = [];
|
||||
|
||||
this.$refs.map.setCenterWithOffset(code, 50, signal.position.y);
|
||||
if (row.routeSectionList && row.routeSectionList.length) {
|
||||
row.routeSectionList.forEach(code => {
|
||||
if (route.routeSectionList && route.routeSectionList.length) {
|
||||
route.routeSectionList.forEach(code => {
|
||||
const section = deepAssign({}, this.$refs.map.getDeviceByCode(code));
|
||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||
section.logicSectionCodeList.forEach(sectionCode => {
|
||||
@ -229,8 +203,8 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
if (row.routeSwitchList && row.routeSwitchList.length) {
|
||||
row.routeSwitchList.filter(el => switchCodeList.includes(el.switchCode)).forEach(el => {
|
||||
if (route.routeSwitchList && route.routeSwitchList.length) {
|
||||
route.routeSwitchList.filter(el => switchCodeList.includes(el.switchCode)).forEach(el => {
|
||||
const swch = deepAssign({}, this.$refs.map.getDeviceByCode(el.switchCode));
|
||||
const sectionA = this.$refs.map.getDeviceByCode(swch.sectionACode);
|
||||
const sectionB = this.$refs.map.getDeviceByCode(swch.sectionBCode);
|
||||
@ -254,7 +228,7 @@ export default {
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||
val: row.code
|
||||
val: route.code
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
@ -297,6 +271,15 @@ export default {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
} //D3D8DC
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
/deep/ .el-dialog__header{
|
||||
background: #B4B6B9;
|
||||
}
|
||||
/deep/ .el-dialog__body{
|
||||
background: #D3D8DC !important;
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
|
@ -442,7 +442,7 @@ export default {
|
||||
operate.over = true;
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
|
||||
operate.code = signal.code;
|
||||
operate.param = {signalId: signal.code};
|
||||
operate.param = {signalCode: signal.code};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {
|
||||
this.clearOperate();
|
||||
}).catch(() => this.$refs.noticeInfo.doShow() );
|
||||
@ -474,7 +474,7 @@ export default {
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
|
||||
param: {
|
||||
signalId: model._type === 'Signal' ? model.code : model.signalCode
|
||||
signalCode: model._type === 'Signal' ? model.code : model.signalCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
@ -492,7 +492,7 @@ export default {
|
||||
code: model.code,
|
||||
operation: this.Signal.guide.button.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||
param: {signalId: model.signalCode}
|
||||
param: {signalCode: model.signalCode}
|
||||
};
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode);
|
||||
// 信号机引导时间15s以内再次点击引导不需要进行密码输入
|
||||
@ -514,10 +514,10 @@ export default {
|
||||
};
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code);
|
||||
if (model._type === 'SignalButton' && model.type === 'PICK' && signal.routeLock) {
|
||||
operate.param = {signalId: model.signalCode};
|
||||
operate.param = {signalCode: model.signalCode};
|
||||
this.sendCommand(operate);
|
||||
} else if (model._type === 'Signal' && model.type === 'SHUNTING' && signal.routeLock) {
|
||||
operate.param = {signalId: model.code};
|
||||
operate.param = {signalCode: model.code};
|
||||
this.sendCommand(operate);
|
||||
}
|
||||
},
|
||||
@ -527,7 +527,7 @@ export default {
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: this.cmdType,
|
||||
param: { id: model.code}
|
||||
param: { switchCode: model.code}
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
@ -563,18 +563,18 @@ export default {
|
||||
if (model._type === 'Signal' && !this.checkHasTrainButton(model)) {
|
||||
if (buttonOperation === this.Signal.lock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
|
||||
operate.param = {signalId: model.code};
|
||||
operate.param = {signalCode: model.code};
|
||||
} else if (buttonOperation === this.Signal.unlock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
|
||||
operate.param = {signalId: model.code};
|
||||
operate.param = {signalCode: model.code};
|
||||
}
|
||||
} else if (model._type === 'SignalButton' && model.type === 'PICK') {
|
||||
if (buttonOperation === this.Signal.lock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
|
||||
operate.param = {signalId: model.signalCode};
|
||||
operate.param = {signalCode: model.signalCode};
|
||||
} else if (buttonOperation === this.Signal.unlock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
|
||||
operate.param = {signalId: model.signalCode};
|
||||
operate.param = {signalCode: model.signalCode};
|
||||
}
|
||||
}
|
||||
this.sendCommand(operate);
|
||||
@ -587,7 +587,7 @@ export default {
|
||||
code: model.code,
|
||||
operation: this.guideLockRightFlag ? this.Switch.guideLock.rightButton : this.Switch.guideLock.leftButton,
|
||||
nextCmdType: CMD.Switch.CMD_SWITCH_MASTER_LOCK,
|
||||
param: {signalId: model.signalCode}
|
||||
param: {signalCode: model.signalCode}
|
||||
};
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
@ -599,7 +599,7 @@ export default {
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
||||
param: {id: model.code}
|
||||
param: {sectionCode: model.code}
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
}
|
||||
|
@ -131,6 +131,31 @@ export default {
|
||||
}
|
||||
],
|
||||
menuDirective: [
|
||||
{
|
||||
label: '切换驾驶模式',
|
||||
children: [
|
||||
{
|
||||
label: '转AM-C模式',
|
||||
handler: this.handlerApplyAmcMode
|
||||
},
|
||||
{
|
||||
label: '转SM-C模式',
|
||||
handler: this.handlerApplySmcMode
|
||||
},
|
||||
{
|
||||
label: '转AM-I模式',
|
||||
handler: this.handlerApplyAmiMode
|
||||
},
|
||||
{
|
||||
label: '转SM-I模式',
|
||||
handler: this.handlerApplySmiMode
|
||||
},
|
||||
{
|
||||
label: '转RM模式',
|
||||
handler: this.handlerApplyRmMode
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '确认运行至前方站',
|
||||
handler: this.nextStation
|
||||
@ -146,7 +171,11 @@ export default {
|
||||
{
|
||||
label: '越红灯行驶',
|
||||
handler: this.handleOverEedLight
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '驾驶至',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
],
|
||||
menuSpeed: [
|
||||
{
|
||||
@ -439,6 +468,79 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
handlerApplyAmcMode() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Change_Preselection_Mode',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: { preselectionMode: 'AM_C' }
|
||||
};
|
||||
commitTrainSend(group, param).then(({ valid, operate }) => {
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handlerApplySmcMode() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Change_Preselection_Mode',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: { preselectionMode: 'SM_C' }
|
||||
};
|
||||
commitTrainSend(group, param).then(({ valid, operate }) => {
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handlerApplyAmiMode() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Change_Preselection_Mode',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: { preselectionMode: 'AM_I' }
|
||||
};
|
||||
commitTrainSend(group, param).then(({ valid, operate }) => {
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handlerApplySmiMode() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Change_Preselection_Mode',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: { preselectionMode: 'SM_I' }
|
||||
};
|
||||
commitTrainSend(group, param).then(({ valid, operate }) => {
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handlerApplyRmMode() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Change_Preselection_Mode',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: { preselectionMode: 'RM' }
|
||||
};
|
||||
commitTrainSend(group, param).then(({ valid, operate }) => {
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 驾驶至(托管)
|
||||
handleDriveTo() {
|
||||
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.collocation, this.selected, true);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
|
@ -35,7 +35,12 @@
|
||||
</div>
|
||||
<div style="display: flex;">
|
||||
<div :style="{ background: item.receivingNotice ? '#29CA42': '#ccc' }" class="button-box-fir" @click="doShowRecDep(item,'rec')">接预</div>
|
||||
<div class="button-box-sec" :style="{ background: handleBackground(item.receivingRouteLock, item.receivingRouteCode) }" >{{ '接路' + (item.receivingRouteLock ? '':getRouteName(item.receivingRouteCode)) }}</div>
|
||||
<div
|
||||
class="button-box-sec"
|
||||
:style="{ background: handleBackground(item.receivingRouteLock, item.receivingRouteCode) }"
|
||||
@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>
|
||||
<div>
|
||||
@ -49,7 +54,12 @@
|
||||
<div>起点-->终点</div>
|
||||
<div style="display: flex;">
|
||||
<div :style="{ background: item.departureNotice ? '#29CA42': '#ccc' }" class="button-box-fir" @click="doShowRecDep(item,'dep')">发预</div>
|
||||
<div class="button-box-sec" :style="{ background: handleBackground(item.departureRouteLock, item.departureRouteCode) }" >{{ '发路' + (item.departureRouteLock ? '':getRouteName(item.departureRouteCode)) }}</div>
|
||||
<div
|
||||
class="button-box-sec"
|
||||
:style="{ background: handleBackground(item.departureRouteLock, item.departureRouteCode) }"
|
||||
@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>
|
||||
<div>{{ item.tripNumber }}</div>
|
||||
@ -69,8 +79,8 @@
|
||||
<div style="width: 49%;margin-top: 10px;">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<div style="background: #0f0;">{{ `进路序列模式:<${readOnly ? '只读':'可修改'}>` }}</div>
|
||||
<el-button size="mini" style="padding: 7px 4px;">修改申请</el-button>
|
||||
<el-button size="mini" style="padding: 7px 4px;">只读申请</el-button>
|
||||
<el-button size="mini" style="padding: 7px 4px;" disabled>修改申请</el-button>
|
||||
<el-button size="mini" style="padding: 7px 4px;" disabled>只读申请</el-button>
|
||||
<el-button size="mini" style="padding: 7px 4px;margin-left: 30px;">查找列车</el-button>
|
||||
<el-input style="width: 70px;height: 25px;" size="mini" v-model="searchTrain" />
|
||||
<div style="margin-left: 10px;">上下行</div>
|
||||
@ -83,7 +93,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
<div style="margin-left: 10px;">接车口</div>
|
||||
<el-select size="mini" v-model="andDown" style="width: 100px;margin-left: 5px;">
|
||||
<el-select size="mini" v-model="andDown" style="width: 100px;margin-left: 5px;" disabled>
|
||||
<el-option
|
||||
v-for="item in andDownList"
|
||||
:key="item.value"
|
||||
@ -92,7 +102,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
<div style="margin-left: 10px;">发车口</div>
|
||||
<el-select size="mini" v-model="andDown" style="width: 100px;margin-left: 5px;">
|
||||
<el-select size="mini" v-model="andDown" style="width: 100px;margin-left: 5px;" disabled>
|
||||
<el-option
|
||||
v-for="item in andDownList"
|
||||
:key="item.value"
|
||||
@ -143,7 +153,7 @@
|
||||
</div>
|
||||
<div style="width: 49%;margin-top: 10px;">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<el-select size="mini" v-model="unknow">
|
||||
<el-select size="mini" v-model="unknow" disabled>
|
||||
<el-option
|
||||
v-for="item in unknowList"
|
||||
:key="item.value"
|
||||
@ -152,8 +162,8 @@
|
||||
/>
|
||||
</el-select>
|
||||
<div>调机-J101</div>
|
||||
<el-button size="mini">进路预览</el-button>
|
||||
<el-select size="mini" v-model="unknow1">
|
||||
<el-button size="mini" disabled>进路预览</el-button>
|
||||
<el-select size="mini" v-model="unknow1" disabled>
|
||||
<el-option
|
||||
v-for="item in unknowList1"
|
||||
:key="item.value"
|
||||
@ -161,8 +171,8 @@
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button size="mini">办理进路</el-button>
|
||||
<el-button size="mini">发送机车</el-button>
|
||||
<el-button size="mini" disabled>办理进路</el-button>
|
||||
<el-button size="mini" disabled>发送机车</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
@ -185,6 +195,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<rec-dep ref="recDep" />
|
||||
<route-selection ref="routeSelection" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -198,10 +209,12 @@
|
||||
import LinkPic from '@/assets/datie/link.png';
|
||||
import CameraPic from '@/assets/datie/camera.png';
|
||||
import RecDep from '@/jmapNew/theme/datie_02/menus/dialog/recDep'
|
||||
import RouteSelection from '@/jmapNew/theme/datie_02/menus/dialog/routeSelection1';
|
||||
export default {
|
||||
name: 'lineBoard',
|
||||
components: {
|
||||
RecDep
|
||||
RecDep,
|
||||
RouteSelection
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -296,13 +309,16 @@
|
||||
},
|
||||
doShowRecDep(row, type) {
|
||||
this.$refs.recDep.doShow(row, type, this.selectCode);
|
||||
},
|
||||
doShowRoute(row, type) {
|
||||
this.$refs.routeSelection.doShow(row, type, this.selectCode);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/deep/ .lineBoard .el-dialog__header{
|
||||
/deep/ .el-dialog__header{
|
||||
background: #B4B6B9;
|
||||
}
|
||||
/deep/ .el-dialog__body{
|
||||
|
Loading…
Reference in New Issue
Block a user