JD1A 皮肤修改
This commit is contained in:
parent
0a4bfa82ae
commit
8d38ee214e
@ -533,7 +533,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
jointImg: { // 道岔 A B C D四元素属性配置
|
||||
trapezoidLength: 8, // 直角梯形元素默认长度
|
||||
faultStatus: true, // 挤岔表示
|
||||
faultStatus: false, // 挤岔表示
|
||||
fork: true, // 挤岔专用(如有挤岔操作 变为true)
|
||||
forKColor: 'red' // 挤岔颜色 配合挤岔专用
|
||||
},
|
||||
@ -546,17 +546,22 @@ class SkinCode extends defaultStyle {
|
||||
rectLock: { // 矩形封锁框图形
|
||||
rectWidth: 18, // 矩形框 宽高
|
||||
rectBorderColor: '#fff', // 矩形边框颜色
|
||||
block: true, // 封锁显示
|
||||
block: false, // 封锁显示
|
||||
blockColor: 'red', // 封锁颜色
|
||||
followName: true // 位置跟随名称确定
|
||||
},
|
||||
arcBlcok: { // 圆形封锁图形
|
||||
show: true, // 显示
|
||||
show: false, // 显示
|
||||
shapeR: 10,
|
||||
arcBorderColor: 'red', // 默认边框颜色
|
||||
locationColor: 'red', // 定位封锁颜色
|
||||
inversionColor: 'red' // 反位封锁颜色
|
||||
}
|
||||
inversionColor: 'red' // 反位封锁颜色
|
||||
},
|
||||
switchDot: { // 岔心小圆点
|
||||
show: true,
|
||||
monoLockColor: '#ff0000', // 单锁 红色
|
||||
lockColor: '#0000ff' // 单封 蓝色
|
||||
},
|
||||
};
|
||||
|
||||
this[deviceType.LcControl] = {
|
||||
|
35
src/jmapNew/shape/graph/Switch/ESwDot.js
Normal file
35
src/jmapNew/shape/graph/Switch/ESwDot.js
Normal file
@ -0,0 +1,35 @@
|
||||
import Group from 'zrender/src/container/Group'
|
||||
import Circle from 'zrender/src/graphic/shape/Circle'
|
||||
|
||||
class ESwDot extends Group {
|
||||
constructor(model, drictx, dricty) {
|
||||
super()
|
||||
this.model = model
|
||||
this.dricty = dricty > 0
|
||||
this.drictx = drictx > 0
|
||||
this.create()
|
||||
}
|
||||
create() {
|
||||
const { model } = this
|
||||
this.dot = new Circle({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z || 0 + 12,
|
||||
shape: {
|
||||
cx: model.intersection.x + (this.drictx ? 12 : -12),
|
||||
cy: model.intersection.y + (this.dricty ? 8 : -8),
|
||||
r: 2
|
||||
},
|
||||
style: {
|
||||
fill: '#FF0000'
|
||||
}
|
||||
})
|
||||
this.add(this.dot)
|
||||
}
|
||||
setColor(color) {
|
||||
console.log(this.dot)
|
||||
console.log(color)
|
||||
this.dot.setStyle({ fill: color })
|
||||
}
|
||||
}
|
||||
|
||||
export default ESwDot
|
@ -13,6 +13,7 @@ import EMouse from './EMouse';
|
||||
import EHighlight from '../element/EHighlight';
|
||||
import ETriangle from './ETriangle';
|
||||
import store from '@/store/index';
|
||||
import ESwDot from './ESwDot';
|
||||
|
||||
export default class Switch extends Group {
|
||||
constructor(model, {style, mapDevice}) {
|
||||
@ -211,6 +212,13 @@ export default class Switch extends Group {
|
||||
textFill: 'yellow'
|
||||
}
|
||||
});
|
||||
|
||||
if (this.style.Switch.switchDot.show) {
|
||||
console.log(this.style.Switch.switchDot.show)
|
||||
const { drictx, dricty } = this.triangle
|
||||
this.dot = new ESwDot(model, drictx, dricty)
|
||||
this.add(this.dot)
|
||||
}
|
||||
|
||||
this.add(this.shapeModelA);
|
||||
this.add(this.shapeModelB);
|
||||
@ -218,6 +226,7 @@ export default class Switch extends Group {
|
||||
this.add(this.shapeBlockCover);
|
||||
this.add(this.name);
|
||||
this.add(this.enabledName);
|
||||
|
||||
style.Switch.text.show && model.nameShow ? this.name.show() : this.name.hide();
|
||||
}
|
||||
|
||||
@ -343,6 +352,7 @@ export default class Switch extends Group {
|
||||
this.artificialArc && this.artificialArc.hide();
|
||||
this.name && this.name.show();
|
||||
this.limitName && this.limitName.show();
|
||||
this.dot && this.dot.hide()
|
||||
}
|
||||
|
||||
/** 定位*/
|
||||
@ -434,28 +444,20 @@ export default class Switch extends Group {
|
||||
.start();
|
||||
}
|
||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
setSwitchFault(fault, pos) {
|
||||
if (this.style.Switch.jointImg.faultStatus && fault && (pos == 'NO' || pos == 'EX') ) { // 宁波线失表状态
|
||||
this.setForkAction(fault); // 道岔挤岔
|
||||
} else if (this.style.Switch.faultNoHandle ) {
|
||||
this.shapeModelA.hide();
|
||||
this.shapeModelB.hide();
|
||||
this.shapeModelC.hide();
|
||||
} else {
|
||||
const faultList = ['SPLIT', 'SQUEEZE', 'NORMAL_SPLIT', 'REVERSE_SPLIT', 'SPLIT_1'];
|
||||
// (fault === 'SPLIT' || fault === 'SQUEEZE' || (fault === 'NORMAL_SPLIT' && !reversePosition) || (fault === 'REVERSE_SPLIT' && !normalPosition))
|
||||
if (this.model.switchFaultCode && fault && faultList.includes(fault) ) {
|
||||
const switchFault = this.mapDevice[this.model.switchFaultCode];
|
||||
switchFault.instance.setControlColor('#F00', true);
|
||||
} else if (this.model.switchFaultCode) {
|
||||
const switchFault = this.mapDevice[this.model.switchFaultCode];
|
||||
switchFault.instance.setControlColor(this.style.backgroundColor, false);
|
||||
}
|
||||
// stopAnimation
|
||||
this.shapeModelB.stopAnimation(false);
|
||||
this.shapeModelC.stopAnimation(false);
|
||||
this.shapeModelA.stopAnimation(false);
|
||||
setSwitchFault(fault) {
|
||||
const faultList = ['SPLIT', 'SQUEEZE', 'NORMAL_SPLIT', 'REVERSE_SPLIT', 'SPLIT_1'];
|
||||
// (fault === 'SPLIT' || fault === 'SQUEEZE' || (fault === 'NORMAL_SPLIT' && !reversePosition) || (fault === 'REVERSE_SPLIT' && !normalPosition))
|
||||
if (this.model.switchFaultCode && fault && faultList.includes(fault) ) {
|
||||
const switchFault = this.mapDevice[this.model.switchFaultCode];
|
||||
switchFault.instance.setControlColor('#F00', true);
|
||||
} else if (this.model.switchFaultCode) {
|
||||
const switchFault = this.mapDevice[this.model.switchFaultCode];
|
||||
switchFault.instance.setControlColor(this.style.backgroundColor, false);
|
||||
}
|
||||
// stopAnimation
|
||||
this.shapeModelB.stopAnimation(false);
|
||||
this.shapeModelC.stopAnimation(false);
|
||||
this.shapeModelA.stopAnimation(false);
|
||||
}
|
||||
/** 挤叉*/
|
||||
setForkAction(fault) {
|
||||
@ -514,6 +516,10 @@ export default class Switch extends Group {
|
||||
this.lockArc.setStyle({ stroke: this.style.Switch.arcBlcok.inversionColor });
|
||||
}
|
||||
}
|
||||
if (this.style.Switch.switchDot.show) {
|
||||
this.dot.show()
|
||||
this.dot.setColor(this.style.Switch.switchDot.monoLockColor)
|
||||
}
|
||||
this.setTextColor(this.style.Switch.text.monolockLocationColor);
|
||||
}
|
||||
|
||||
@ -567,6 +573,10 @@ export default class Switch extends Group {
|
||||
this.lockRect.setStyle({ stroke: this.style.Switch.rectLock.blockColor, fill: this.style.Switch.rectLock.blockFillColor });
|
||||
}
|
||||
}
|
||||
if (this.style.Switch.switchDot.show) {
|
||||
this.dot.show()
|
||||
this.dot.setColor(this.style.Switch.switchDot.lockColor)
|
||||
}
|
||||
|
||||
// if (this.style.Switch.coverBlock && this.style.Switch.coverBlock.show) {
|
||||
// this.shapeBlockCover.show();
|
||||
@ -706,7 +716,7 @@ export default class Switch extends Group {
|
||||
this.setAshShow();
|
||||
}
|
||||
} else {
|
||||
this.setSwitchFault(model.fault, model.pos);
|
||||
this.setSwitchFault(model.fault);
|
||||
|
||||
// model.pos == 'NO' || model.pos == 'EX';
|
||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
@ -718,7 +728,16 @@ export default class Switch extends Group {
|
||||
this.switchPosition = 'reverse';
|
||||
this.setInversionAction(model); /** 反位*/
|
||||
} else if (model.pos == 'NO') {
|
||||
this.setLossAction(model.fault); // 失去
|
||||
//宁波线失表
|
||||
if (this.style.Switch.jointImg.faultStatus && model.fault) {
|
||||
this.setForkAction(model.fault)
|
||||
} else if (this.style.Switch.faultNoHandle) {
|
||||
this.shapeModelA.hide();
|
||||
this.shapeModelB.hide();
|
||||
this.shapeModelC.hide();
|
||||
} else {
|
||||
this.setLossAction(model.fault); // 失去
|
||||
}
|
||||
} else if (model.pos == 'EX') {
|
||||
this.setForkAction(model.fault); // 挤岔
|
||||
}
|
||||
|
292
src/jmapNew/theme/datie_jd1a/menus/bottomTable.vue
Normal file
292
src/jmapNew/theme/datie_jd1a/menus/bottomTable.vue
Normal file
@ -0,0 +1,292 @@
|
||||
<template>
|
||||
<div v-show="showTable" style="background: #F0F0F0;z-index: 10;position: absolute;left: 0;bottom: 0;width: 100%;font-size: 14px;">
|
||||
<i class="el-icon-close close_icon" @click.stop="doClose" />
|
||||
<el-row>
|
||||
<el-col :span="11" style="padding: 0 10px;">
|
||||
<div style="border: 1px solid #C7C7C7;margin-top: 10px;">
|
||||
<div style="position: relative; top: -8px;left: 15px;width: 130px;background: #f0f0f0;">列车进路序列 可修改</div>
|
||||
<div style="width: 100%;background: #9F9F9F">
|
||||
<el-table
|
||||
ref="sequenceTable"
|
||||
:data="sequenceList"
|
||||
height="90"
|
||||
:row-class-name="tableRowClassName"
|
||||
border
|
||||
style="width: 650px"
|
||||
:cell-style="{padding: 0}"
|
||||
:default-sort="{prop: 'startTime', order: 'ascending'}"
|
||||
>
|
||||
<el-table-column type="index" width="30" label="序" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="tripNumber" label="车次" width="60" label-class-name="bottom-table-label-header">
|
||||
<template slot-scope="scope">
|
||||
<div style="width: 100%;height: 22px;" @contextmenu="popMenuShow(scope.row, '' ,$event)">{{ scope.row.tripNumber }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="trackName" label="股道" width="50" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="autoTrigger" label="自触" width="50" label-class-name="bottom-table-label-header">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="scope.row.autoTrigger" @change="triggerChange(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="direction" label="方向" width="100" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="startTime" label="开始" width="80" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="planTime" label="计划" width="90" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="" label="状态" width="90" label-class-name="bottom-table-label-header">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getRouteStatus(scope.row.status) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="description" label="进路描述" label-class-name="bottom-table-label-header">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getRouteName(scope.row.routeCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex;align-items: center;">
|
||||
<div style="margin-right: 10px;">车站</div>
|
||||
<el-select v-model="stationCode" size="mini" @change="stationChange">
|
||||
<el-option
|
||||
v-for="item in stationList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<div style="border: 1px outset #C7C7C7;margin-left: 20px;padding: 3px;">释放权限</div>
|
||||
<div style="margin-left: 10px;">字体</div>
|
||||
<div style="margin-left: 10px;border: 1px inset #C7C7C7;padding: 3px;">常规</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<div style="border: 1px solid #C7C7C7;margin-top: 10px;">
|
||||
<div style="position: relative; top: -8px;left: 15px;width: 103px;background: #f0f0f0;">调车进路 可修改</div>
|
||||
<el-row>
|
||||
<el-col :span="12" style="padding: 0 10px;">
|
||||
<div style="border: 1px solid #C7C7C7;">
|
||||
<div style="position: relative; top: -8px;left: 15px;width: 86px;background: #f0f0f0;">调车进路序列</div>
|
||||
<div style="width: 100%;background: #9F9F9F">
|
||||
<el-table :data="tableData" height="55" border style="width: 465px" :cell-style="{padding: 0}">
|
||||
<el-table-column type="index" label="顺序" width="50" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="" label="勾序" width="50" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="" label="进路及方向" width="95" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="" label="自触" width="50" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="" label="状态" width="50" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="" label="触发时间" width="80" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="" label="占用时间" label-class-name="bottom-table-label-header" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" style="padding: 0 10px;">
|
||||
<div style="border: 1px solid #C7C7C7;">
|
||||
<div style="position: relative; top: -8px;left: 15px;width: 44px;background: #f0f0f0;">勾序列</div>
|
||||
<div style="width: 100%;background: #9F9F9F">
|
||||
<el-table :data="tableData" height="55" style="width: 360px" border :cell-style="{padding: 0}">
|
||||
<el-table-column type="index" label="钩计划" width="70" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="" label="股道" width="50" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="" label="操作" width="50" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="" label="状态" width="50" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="" label="记事" width="50" label-class-name="bottom-table-label-header" />
|
||||
<el-table-column property="" label="作业时间" label-class-name="bottom-table-label-header" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row>
|
||||
<div style="display: flex;align-items: center;">
|
||||
<div>作业单</div>
|
||||
<el-select v-model="sheetValue" size="mini" style="margin-left: 10px;width: 500px;">
|
||||
<el-option
|
||||
v-for="item in sheetList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<div style="border: 1px outset #C7C7C7;margin-left: 20px;padding: 3px;">单头信息</div>
|
||||
<div style="border: 1px outset #C7C7C7;margin-left: 20px;padding: 3px;">删除</div>
|
||||
<div style="border: 1px outset #C7C7C7;margin-left: 20px;padding: 3px;">发送</div>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div style="display: flex;">
|
||||
<div>历史进路</div>
|
||||
<div style="margin-left: 300px;">状态:</div>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<pop-menu ref="popMenu" :menu="menu" style="background: #DFE3E6;" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { EventBus } from '@/scripts/event-bus'; // 996
|
||||
import { menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
export default {
|
||||
name: 'BottomTable',
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [{}],
|
||||
stationCode: '',
|
||||
sheetValue: '',
|
||||
routeParam: {},
|
||||
showTable: false,
|
||||
sheetList: [{ label: '历史进路', value: 'historyRoute' }],
|
||||
sequenceList: [],
|
||||
sequenceMap: {},
|
||||
menu: [{label: '人工触发', handler: this.artificialTrigger, disabled: false}, {label: '删除', handler: this.artificialTrigger, disabled: true}]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'showTable': function (val) {
|
||||
const offset = val ? 162 : 0;
|
||||
EventBus.$emit('setMenuButtonPosition', offset);
|
||||
},
|
||||
'$store.state.socket.railCtcStatusMsg': function (val) {
|
||||
if (val && val.length) {
|
||||
val.forEach(item => {
|
||||
if (item && item.routeSequence && item.routeSequence.lines && item.routeSequence.lines.length) {
|
||||
item.routeSequence.lines.forEach(elem => {
|
||||
if (!this.sequenceMap[elem.id]) {
|
||||
this.sequenceMap[elem.id] = Object.assign(elem, { stationCode: item.stationCode, readOnly: item.readOnly });
|
||||
} else {
|
||||
this.sequenceMap[elem.id] = Object.assign(this.sequenceMap[elem.id], elem, { stationCode: item.stationCode, readOnly: item.readOnly });
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
this.sequenceList = [];
|
||||
for (const key in this.sequenceMap) {
|
||||
if (this.sequenceMap[key].stationCode === this.stationCode) {
|
||||
this.sequenceList.push(this.sequenceMap[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
EventBus.$on('bottomTableShowOrHidden', () => {
|
||||
this.showTable = !this.showTable;
|
||||
});
|
||||
if (this.stationList && this.stationList.length) {
|
||||
this.stationCode = this.stationList[0].code;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.showTable = true;
|
||||
},
|
||||
doClose() {
|
||||
this.showTable = false;
|
||||
},
|
||||
getRouteStatus(status) {
|
||||
if (status === '2') {
|
||||
return '触发完成';
|
||||
} else if (status === '1') {
|
||||
return '正在触发';
|
||||
} else {
|
||||
return '等待中';
|
||||
}
|
||||
},
|
||||
triggerChange(row) {
|
||||
const triggerParam = { stationCode: this.stationCode, tripNumber: row.tripNumber, routeCode: row.routeCode, trigger: row.autoTrigger };
|
||||
if (row.autoTrigger) {
|
||||
this.setTrigger(triggerParam, row);
|
||||
} else {
|
||||
this.cancelTrigger(triggerParam, row);
|
||||
}
|
||||
},
|
||||
stationChange(stationCode) {
|
||||
this.sequenceList = [];
|
||||
for (const key in this.sequenceMap) {
|
||||
if (this.sequenceMap[key].stationCode === stationCode) {
|
||||
this.sequenceList.push(this.sequenceMap[key]);
|
||||
}
|
||||
}
|
||||
},
|
||||
tableRowClassName({row, rowIndex}) {
|
||||
if (row.status === '0') {
|
||||
return 'bottom-table-route-wait';
|
||||
} else if (row.tripNumber) {
|
||||
return 'bottom-table-route-green';
|
||||
} else {
|
||||
return 'bottom-table-route-gray';
|
||||
}
|
||||
},
|
||||
getRouteName(code) {
|
||||
if (code) {
|
||||
const route = this.$store.state.map.routeData[code];
|
||||
return route ? route.name : '';
|
||||
} else { return ''; }
|
||||
},
|
||||
setTrigger(triggerParam, row) {
|
||||
commitOperate(menuOperate.CTC.autoTrigger, triggerParam, 3).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$message.success('设置自动触发成功!');
|
||||
}
|
||||
}).catch((e) => {
|
||||
console.error(e);
|
||||
row.autoTrigger = false;
|
||||
this.$message.error('设置自动触发失败!');
|
||||
});
|
||||
},
|
||||
popMenuShow(item, type, e) {
|
||||
this.routeParam = {routeCode: item.routeCode, tripNumber: item.tripNumber, force: false, duration: null};
|
||||
this.$refs.popMenu.resetShowPosition({x: e.x, y:e.y});
|
||||
},
|
||||
cancelTrigger(triggerParam, row) {
|
||||
commitOperate(menuOperate.CTC.autoTrigger, triggerParam, 3).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$message.success('取消自动触发成功!');
|
||||
}
|
||||
}).catch((e) => {
|
||||
console.error(e);
|
||||
row.autoTrigger = true;
|
||||
this.$message.error('取消自动触发失败!');
|
||||
});
|
||||
},
|
||||
artificialTrigger() {
|
||||
commitOperate(menuOperate.CTC.setRoute, this.routeParam, 3).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$message.success('人工触发成功!');
|
||||
}
|
||||
}).catch((e) => {
|
||||
console.error(e);
|
||||
this.$message.error('人工触发失败!');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
<style>
|
||||
.bottom-table-label-header{
|
||||
background: #FFF3EE;
|
||||
}
|
||||
.bottom-table-route-wait {
|
||||
background: #ff0 !important;
|
||||
}
|
||||
.bottom-table-route-gray{
|
||||
background: #c0c0c0 !important;
|
||||
}
|
||||
.bottom-table-route-green{
|
||||
background: #0f0 !important;
|
||||
}
|
||||
</style>
|
210
src/jmapNew/theme/datie_jd1a/menus/dialog/addSpareTrain.vue
Normal file
210
src/jmapNew/theme/datie_jd1a/menus/dialog/addSpareTrain.vue
Normal file
@ -0,0 +1,210 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm train-set-plan"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="11">车次号</el-col>
|
||||
<el-col :span="11" :offset="1">上下行</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="addModel.tripNumber" size="mini" @blur="handleTripNumber" />
|
||||
<div class="tripNumberTips">{{ messageTip1 }}</div>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-select v-model="addModel.right" size="mini" disabled>
|
||||
<el-option :value="true" :label="rightTrueLabel" />
|
||||
<el-option :value="false" :label="rightFalseLabel" />
|
||||
</el-select>
|
||||
<div class="tripNumberTips">{{ messageTip2 }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'TrainSetPlan',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
messageTip1:'',
|
||||
messageTip2:'',
|
||||
addModel: {
|
||||
tripNumber: '',
|
||||
right: '',
|
||||
sectionCode: ''
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'mapConfig'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '模拟车次输入';
|
||||
},
|
||||
rightTrueLabel() {
|
||||
return this.mapConfig.upRight ? '上行' : '下行';
|
||||
},
|
||||
rightFalseLabel() {
|
||||
return this.mapConfig.upRight ? '下行' : '上行';
|
||||
}
|
||||
},
|
||||
watch:{},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.$root.$emit('dialogOpen', selected);
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
this.addModel.sectionCode = selected.code;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.addModel = {
|
||||
tripNumber: '',
|
||||
right: '',
|
||||
sectionCode: ''
|
||||
};
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
handleTripNumber() {
|
||||
const figuresOfServiceMinNumber = 2;
|
||||
const figuresOfServiceMaxNumber = 6;
|
||||
// this.$store.state.map.mapConfig.figuresOfServiceNumber;
|
||||
const tripNumber = this.addModel.tripNumber;
|
||||
const judge = /^[a-zA-Z0-9]*[\d]$/.test(this.addModel.tripNumber);
|
||||
if (judge) {
|
||||
if (tripNumber.toString().length > figuresOfServiceMaxNumber || tripNumber.toString().length < figuresOfServiceMinNumber) {
|
||||
this.messageTip1 = '车次号长度' + figuresOfServiceMinNumber + '-' + figuresOfServiceMaxNumber + '位';
|
||||
} else {
|
||||
this.addModel.tripNumber = tripNumber;
|
||||
this.messageTip1 = '';
|
||||
const result = this.addModel.tripNumber.match(/[\d]$(?=[a-zA-Z0-9]*)/);
|
||||
if (result) {
|
||||
const is_even = result[0] % 2 == 0;
|
||||
this.addModel.right = is_even;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.addModel.tripNumber = '';
|
||||
this.messageTip1 = '请输入车次号(最后一位必须是数字)';
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
const figuresOfServiceMinNumber = 2;
|
||||
const figuresOfServiceMaxNumber = 6;
|
||||
let result = false;
|
||||
const tripNumber = this.addModel.tripNumber;
|
||||
if (tripNumber.toString().length > figuresOfServiceMaxNumber || tripNumber.toString().length < figuresOfServiceMinNumber) {
|
||||
result = false;
|
||||
} else {
|
||||
result = true;
|
||||
}
|
||||
if (this.addModel.tripNumber && result) {
|
||||
// if (this.addModel.right === '') {
|
||||
// this.messageTip2 = '请选择上下行';
|
||||
// return;
|
||||
// }
|
||||
const params = {
|
||||
tripNumber: this.addModel.tripNumber,
|
||||
sectionCode: this.addModel.sectionCode,
|
||||
right: this.addModel.right
|
||||
};
|
||||
this.messageTip1 = '';
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Section.addSpareTrain, params, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
if (this.addModel.tripNumber) {
|
||||
this.messageTip1 = '该车次号长度' + figuresOfServiceMinNumber + '-' + figuresOfServiceMaxNumber + '位';
|
||||
} else {
|
||||
this.messageTip1 = '请输入车次号';
|
||||
}
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
/deep/ .el-row {
|
||||
margin: 10px
|
||||
}
|
||||
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
// background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.tripNumberTips{
|
||||
margin-top: 7px;
|
||||
color: #f00;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
return '信号关灯';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
return OperationEvent.Signal.signalClose.confirm.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.messages = operate.messages;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
this.signalClose();
|
||||
}
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.signalClose.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm confirm-control-speed"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="540px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{ message }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControlSpeed',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
type: '',
|
||||
operation: '',
|
||||
message: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
return '区段设置限速';
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
return '区段取消限速';
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
return '道岔设置限速';
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
return '道岔取消限速';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
return OperationEvent.Section.cancelSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
return OperationEvent.Switch.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
return OperationEvent.Switch.cancelSpeed.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.type = operate.type;
|
||||
this.operation = operate.operation;
|
||||
this.message = operate.message;
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.type
|
||||
};
|
||||
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control-speed .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm confirm-control-speed"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{ message }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="11">
|
||||
<el-button :id="confirmId" type="primary" @click="confirm">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ConfirmTip',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
message: '',
|
||||
confirmId: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '提示';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.message = operate.message;
|
||||
this.dialogShow = true;
|
||||
this.confirmId = operate.confirmId;
|
||||
},
|
||||
confirm() {
|
||||
this.$emit('close');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.confirm-control-speed .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
.chengdou-03__systerm .el-dialog .el-button{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
return '添加列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
return '修改列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
return '删除列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
return '移动列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
return '交换列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
return '修改车组号';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
/** 添加列车识别号*/
|
||||
return OperationEvent.Train.addTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
/** 修改列车识别号*/
|
||||
return OperationEvent.Train.editTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
/** 删除列车识别号*/
|
||||
return OperationEvent.Train.delTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
/** 移动列车识别号*/
|
||||
return OperationEvent.Train.moveTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
/** 交换列车识别号*/
|
||||
return OperationEvent.Train.switchTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
/** 修改车组号*/
|
||||
return OperationEvent.Train.editTrainNo.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.messages = operate.messages;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
this.routeSetting();
|
||||
}
|
||||
},
|
||||
// 进路设置
|
||||
routeSetting() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Train.addTrainId.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
title="密码校验"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-input v-model="encryptionPassword" placeholder="请使用软键盘输入" size="medium" :disabled="true" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="showMistake">
|
||||
<el-col :span="22" :offset="1">
|
||||
<span class="password-error">*密码输入错误请重新输入*</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">7</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">8</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">9</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">4</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">5</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">6</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">1</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">2</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">3</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">0</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputClear">C</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="backSpace"> < </el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="12">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'PasswordBox',
|
||||
data() {
|
||||
return {
|
||||
/* 写死的初始密码*/
|
||||
correctPassword: '123',
|
||||
dialogShow: false,
|
||||
operation: '',
|
||||
checkHasInput: false,
|
||||
/* 输入值*/
|
||||
passwordCheck: '',
|
||||
/* 输入值替换为对应长度的星号*/
|
||||
encryptionPassword: '',
|
||||
loading: false,
|
||||
showMistake: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.password.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
if (operate.operateNext) {
|
||||
this.operation = operate.operateNext;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.checkHasInput = false;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.showMistake = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() { // 确定
|
||||
if (this.passwordCheck === this.correctPassword) {
|
||||
this.$emit('checkOver', this.operate);
|
||||
this.doClose();
|
||||
this.inputClear();
|
||||
} else {
|
||||
this.showMistake = true;
|
||||
}
|
||||
},
|
||||
/* 软键盘输入*/
|
||||
inputNum(e) {
|
||||
this.showMistake = false;
|
||||
this.passwordCheck += e.path[0].innerText;
|
||||
this.encryptionPassword = this.passwordCheck.replace(/./g, '*');
|
||||
},
|
||||
/* 软键盘清除*/
|
||||
inputClear() {
|
||||
this.showMistake = false;
|
||||
this.passwordCheck = '';
|
||||
this.encryptionPassword = '';
|
||||
},
|
||||
/* 软键盘回退*/
|
||||
backSpace() {
|
||||
this.showMistake = false;
|
||||
const password = this.passwordCheck;
|
||||
if (password !== '') {
|
||||
this.passwordCheck = password.substring(0, password.length - 1);
|
||||
this.encryptionPassword = this.passwordCheck;
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
send: false,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.password.operation
|
||||
};
|
||||
this.$emit('checkCancel');
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.inputClear();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.notice-info .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
|
||||
.password-error {
|
||||
|
||||
color: red;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm popup-alarm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-row>
|
||||
<el-col :offset="2">
|
||||
<span v-for="(message, index) in messages" :key="index">{{ message }}</span><br>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'PopupAlarm',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: [],
|
||||
operate: null,
|
||||
operation: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '弹出式告警';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.dialogShow = true;
|
||||
this.messages = messages || [];
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
// 确认计轴有效
|
||||
this.alxeEffective();
|
||||
}
|
||||
|
||||
},
|
||||
alxeEffective() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.alarm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.popup-alarm .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
137
src/jmapNew/theme/datie_jd1a/menus/dialog/defectiveShunting.vue
Normal file
137
src/jmapNew/theme/datie_jd1a/menus/dialog/defectiveShunting.vue
Normal file
@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm route-hand-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="260px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="table">
|
||||
<div v-for="(temp,index) in tempTable" :key="index" class="eachShunt">
|
||||
<div class="shuntingName">{{ temp.name }}</div>
|
||||
<div class="shuntingSelected">
|
||||
<el-checkbox v-model="temp.selected" size="medium" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="9" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="9" :offset="3">
|
||||
<el-button :id="domIdCancel" @click="cancel">退出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
export default {
|
||||
name: 'DefectiveShunting',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
title:'分路不良',
|
||||
loading:false,
|
||||
sectionCode:'',
|
||||
tempTable:[]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Section.defectiveShunting.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
doShow({switchSection, code, shuntingTypeList = ''}) {
|
||||
this.sectionCode = code;
|
||||
if (switchSection) {
|
||||
this.tempTable = [
|
||||
{name:'岔前不良', selected:shuntingTypeList.includes('SWITCH_FRONT_SHUNTING'), value:'SWITCH_FRONT_SHUNTING'},
|
||||
{name:'定位不良', selected:shuntingTypeList.includes('FIXED_POSITION_SHUNTING'), value:'FIXED_POSITION_SHUNTING'},
|
||||
{name:'反位不良', selected:shuntingTypeList.includes('REVERSE_POSITION_SHUNTING'), value:'REVERSE_POSITION_SHUNTING'}
|
||||
];
|
||||
} else {
|
||||
this.tempTable = [{
|
||||
name:'分路不良',
|
||||
selected:shuntingTypeList.includes('SECTION_SHUNTING'),
|
||||
value:'SECTION_SHUNTING'
|
||||
}];
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const shuntingTypeList = [];
|
||||
this.tempTable.forEach(each=>{
|
||||
if (each.selected) {
|
||||
shuntingTypeList.push(each.value);
|
||||
}
|
||||
});
|
||||
const operate = {
|
||||
over: true,
|
||||
code:this.sectionCode,
|
||||
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
|
||||
operation: OperationEvent.Section.defectiveShunting.confirm.operation,
|
||||
param:{
|
||||
sectionCode:this.sectionCode,
|
||||
shuntingTypeList:shuntingTypeList
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => { this.doClose(); this.$refs.noticeInfo.doShow(); console.log(error); });
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.shuntingName{
|
||||
display: inline-block;
|
||||
width: 90px;
|
||||
padding: 4px 0px;
|
||||
background: #fff;
|
||||
border-radius: 5px;
|
||||
border: 1px #bfbfbf solid;
|
||||
text-align: center;
|
||||
}
|
||||
.shuntingSelected{display: inline-block;margin-left: 5px;}
|
||||
.eachShunt{margin-top:3px;text-align: center;}
|
||||
</style>
|
99
src/jmapNew/theme/datie_jd1a/menus/dialog/deleteRunplan.vue
Normal file
99
src/jmapNew/theme/datie_jd1a/menus/dialog/deleteRunplan.vue
Normal file
@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm train-set-plan"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="280px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="text-align: center;">
|
||||
确定删除该列车的行车信息?
|
||||
</div>
|
||||
<el-row justify="center" class="button-group" style="margin-top:20px">
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="3">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
export default {
|
||||
name: 'DeleteRunplan',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model:{
|
||||
stationCode:'',
|
||||
runPlanCode:''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.CTCCommand.deleteRunplan.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '警告';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(row) {
|
||||
// 4.移除行车日志 CTC_REMOVE_RUN_PLAN 参数:stationCode 车站编码 runPlanCode 运行编码
|
||||
this.model.stationCode = row.stationCode;
|
||||
this.model.runPlanCode = row.code;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.CTC.deleteRunplan, this.model, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
this.$emit('clearRpRow');
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('clearRpRow');
|
||||
this.doClose();
|
||||
this.$emit('noticeInfo');
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$emit('clearRpRow');
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
163
src/jmapNew/theme/datie_jd1a/menus/dialog/drawSelect.vue
Normal file
163
src/jmapNew/theme/datie_jd1a/menus/dialog/drawSelect.vue
Normal file
@ -0,0 +1,163 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="600px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div>
|
||||
<el-form v-if="selected" :inline="true" :model="form" class="demo-form-inline">
|
||||
<el-form-item label="设备类型:">
|
||||
<el-select v-model="form.deviceType" :disabled="true" style="width: 150px;">
|
||||
<el-option
|
||||
v-for="item in deviceTypeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称:">
|
||||
<el-input v-model="form.deviceName" :disabled="true" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
prop="fileName"
|
||||
label="文件"
|
||||
width="400"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="操作"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div class="text-button" @click="openPdf(scope.row)">打开</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import { getUploadFile } from '@/api/pdf';
|
||||
import { DrawingType } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
selected: null,
|
||||
selectedType: '',
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tableData: [],
|
||||
deviceTypeList: [
|
||||
{ label: '区段', value: 'Section' },
|
||||
{ label: '信号机', value: 'Signal' },
|
||||
{ label: '道岔', value: 'Switch' },
|
||||
{ label: '车站', value: 'Station' }
|
||||
],
|
||||
deviceIdList: [],
|
||||
form: {
|
||||
mapId: '',
|
||||
deviceId: '',
|
||||
deviceCode: '',
|
||||
deviceName: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.selectedType === 'normStudy') {
|
||||
return '规范学习';
|
||||
} else if (this.selectedType === 'clCaAn') {
|
||||
return '经典案例分析';
|
||||
} else if (this.selectedType === 'baDeTr') {
|
||||
return '基础设备培训';
|
||||
} else {
|
||||
return '图纸检索';
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(selected, selectedType) {
|
||||
this.selectedType = selectedType;
|
||||
const params = { mapId: this.$route.query.mapId, fileType: DrawingType[selectedType] };
|
||||
this.selected = selected;
|
||||
if (this.selected) {
|
||||
this.form.deviceName = selected.name;
|
||||
this.form.deviceType = selected._type;
|
||||
params.deviceType = selected._type.toUpperCase();
|
||||
params.deviceId = selected.code;
|
||||
}
|
||||
this.loading = true;
|
||||
getUploadFile(params).then(resp => {
|
||||
this.tableData = resp.data;
|
||||
this.loading = false;
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$message.error('图纸检索失败!');
|
||||
});
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
openPdf(row) {
|
||||
const url = `https://joylink.club/oss/joylink/${row.filePath}`;
|
||||
window.open(url, '_blank');
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.text-button{
|
||||
color: #148ad0;
|
||||
cursor:pointer;
|
||||
}
|
||||
.text-button:active{
|
||||
color: #b938e1;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.text-button:hover{
|
||||
color: #b938e1;
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
245
src/jmapNew/theme/datie_jd1a/menus/dialog/mapVisual.vue
Normal file
245
src/jmapNew/theme/datie_jd1a/menus/dialog/mapVisual.vue
Normal file
@ -0,0 +1,245 @@
|
||||
<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;
|
||||
};
|
||||
console.log(this.mapData, '---------------');
|
||||
if (this.mapData && 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];
|
||||
},
|
||||
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>
|
@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm train-set-plan"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="modifyAdjacentStation">
|
||||
<div class="adjacentStationTrip"> {{ tripNumber }}次列车</div>
|
||||
<div class="adjacentStationStart">
|
||||
<el-select
|
||||
v-model="model.arriveStationCode"
|
||||
placeholder=""
|
||||
size="mini"
|
||||
style="width:100px"
|
||||
popper-class="stationSelect"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in stationList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<div style="display:inline-block">站驶来</div>
|
||||
</div>
|
||||
<div class="adjacentStationEnd">
|
||||
<div style="display:inline-block">驶向</div>
|
||||
<el-select
|
||||
v-model="model.departStationCode"
|
||||
placeholder=""
|
||||
size="mini"
|
||||
style="width:100px"
|
||||
popper-class="stationSelect"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in stationList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<div style="display:inline-block">站</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group" style="margin-top:20px">
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="1">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
// import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
export default {
|
||||
name: 'ModifyAdjacentStation',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tripNumber:'',
|
||||
stationList:[],
|
||||
model:{
|
||||
stationCode:'', // 车站编码
|
||||
runPlanCode:'', // 运行编码
|
||||
arriveStationCode:'', // 到达车站
|
||||
departStationCode:'' // 发车车站
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.CTCCommand.modifyAdjacentStation.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '修改相关车站';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.stationList = this.$store.state.map.map.stationList;
|
||||
},
|
||||
methods: {
|
||||
doShow(row) {
|
||||
this.model.stationCode = row.stationCode;
|
||||
this.model.runPlanCode = row.code;
|
||||
this.model.arriveStationCode = (row.arriveRunPlan && row.arriveRunPlan.stationCode) || '';
|
||||
this.model.departStationCode = (row.departRunPlan && row.departRunPlan.stationCode) || '';
|
||||
this.tripNumber = row.tripNumber;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.CTC.modifyAdjacentStation, this.model, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
this.$emit('clearRpRow');
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('clearRpRow');
|
||||
this.doClose();
|
||||
this.$emit('noticeInfo');
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$emit('clearRpRow');
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.modifyAdjacentStation{text-align: center;font-size: 14px;color: #000;}
|
||||
.adjacentStationTrip{text-align: center;}
|
||||
.adjacentStationStart{margin-top: 10px;}
|
||||
.adjacentStationEnd{margin-top: 10px;}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.stationSelect{
|
||||
z-index:2014 !important;
|
||||
}
|
||||
</style>
|
224
src/jmapNew/theme/datie_jd1a/menus/dialog/modifyTripNumber.vue
Normal file
224
src/jmapNew/theme/datie_jd1a/menus/dialog/modifyTripNumber.vue
Normal file
@ -0,0 +1,224 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm train-set-plan"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="560px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="modifyTripNumber">
|
||||
<!-- 修改车次号(大铁CTC) -->
|
||||
<div class="modifyTripNumberT">
|
||||
<div style="display:inline-block;margin-right:10px">请选择车站</div>
|
||||
<el-select
|
||||
v-model="stationCode"
|
||||
placeholder=""
|
||||
size="mini"
|
||||
style="width:100px"
|
||||
popper-class="stationSelect"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in stationList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="modifyTripNumberB">
|
||||
<div class="modifyTripNumberBL">
|
||||
<div class="modifyTripNumberTip">原列车信息</div>
|
||||
<div class="modifyTripNumberS">
|
||||
<div class="modifyTripNumberName">到达车次:</div>
|
||||
<el-input v-model="oldArriveTripNumber" type="text" class="" size="mini" style="width: 140px;" disabled />
|
||||
</div>
|
||||
<div class="modifyTripNumberE">
|
||||
<div class="modifyTripNumberName">出发车次:</div>
|
||||
<el-input v-model="oldDepartTripNumber" type="text" class="" size="mini" style="width: 140px;" disabled />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modifyTripNumberBR">
|
||||
<div class="modifyTripNumberTip">新列车信息</div>
|
||||
<div>
|
||||
<el-form ref="form" :model="model" label-width="85px" :rules="rules">
|
||||
<el-form-item label="到达车次:" prop="arriveTripNumber">
|
||||
<el-input v-model="model.arriveTripNumber" style="width:140px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出发车次:" prop="departTripNumber">
|
||||
<el-input v-model="model.departTripNumber" style="width:140px" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <div class="modifyTripNumberName">到达车次:</div>
|
||||
<el-input v-model="model.arriveTripNumber" type="text" class="" size="mini" style="width: 95px;" />
|
||||
</div>
|
||||
<div class="modifyTripNumberE">
|
||||
<div class="modifyTripNumberName">出发车次:</div>
|
||||
<el-input v-model="model.departTripNumber" type="text" class="" size="mini" style="width: 95px;" />
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<el-checkbox-group v-model="trainTypeList" style="text-align:center;margin-top:10px">
|
||||
<el-checkbox label="保留车" name="type" />
|
||||
<el-checkbox label="终到车" name="type" />
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<el-row justify="center" style="margin-top:10px">
|
||||
<el-col :span="7" :offset="5">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="7" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div></el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
// import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
export default {
|
||||
name: 'ModifyTripNumber',
|
||||
data() {
|
||||
var validateTripNumber = (rule, value, callback) => {
|
||||
if (value) {
|
||||
const judge = /^[a-zA-Z0-9]*[\d]$/.test(value);
|
||||
if (judge) {
|
||||
if (value.toString().length > 6 || value.toString().length < 2) {
|
||||
callback('车次长度2-6位');
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
callback('字母+数字,最后一位数字');
|
||||
}
|
||||
} else {
|
||||
callback('请输入车次');
|
||||
}
|
||||
};
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
oldArriveTripNumber:'',
|
||||
oldDepartTripNumber:'',
|
||||
trainTypeList:[],
|
||||
stationList:[],
|
||||
stationCode:'', // 车站编码
|
||||
runPlanCode:'', // 运行编码
|
||||
model:{
|
||||
arriveTripNumber:'', // 到达车次
|
||||
departTripNumber:'' // 发车车次
|
||||
},
|
||||
rules: {
|
||||
arriveTripNumber:[
|
||||
{ required: true, validator: validateTripNumber, trigger: 'blur' }
|
||||
// message: '请输入到达车次'
|
||||
],
|
||||
departTripNumber:[
|
||||
{ required: true, validator: validateTripNumber, trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.CTCCommand.modifyTripNumber.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '设置车次';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.stationList = this.$store.state.map.map.stationList;
|
||||
},
|
||||
methods: {
|
||||
doShow(row) {
|
||||
this.stationCode = row.stationCode;
|
||||
this.runPlanCode = row.code;
|
||||
this.oldArriveTripNumber = (row.arriveRunPlan && row.arriveRunPlan.tripNumber) || '';
|
||||
this.oldDepartTripNumber = (row.departRunPlan && row.departRunPlan.tripNumber) || '';
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.model = {
|
||||
arriveTripNumber:'', // 到达车次
|
||||
departTripNumber:'' // 发车车次
|
||||
};
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.loading = true;
|
||||
const params = Object.assign({stationCode:this.stationCode, runPlanCode:this.runPlanCode}, this.model);
|
||||
commitOperate(menuOperate.CTC.modifyTripNumber, params, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
this.$emit('clearRpRow');
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('clearRpRow');
|
||||
this.doClose();
|
||||
this.$emit('noticeInfo');
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$emit('clearRpRow');
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.modifyTripNumber{font-size: 15px;color:#201f1e;}
|
||||
.modifyTripNumberT{}
|
||||
.modifyTripNumberB{margin-top:20px;color:#201f1e;}
|
||||
.modifyTripNumberBL,.modifyTripNumberBR{
|
||||
width: 49%;
|
||||
display: inline-block;
|
||||
border: 1px #999795 solid;
|
||||
padding:20px 10px 10px 10px;
|
||||
position: relative;
|
||||
}
|
||||
.modifyTripNumberTip{
|
||||
position:absolute;
|
||||
left:10px;
|
||||
top:-10px;
|
||||
background: #ece9d8;
|
||||
padding: 0px 5px;
|
||||
}
|
||||
.modifyTripNumberS{margin-bottom:20px;height: 24px;font-size:0;}
|
||||
.modifyTripNumberName{display: inline-block;width:85px;text-align: right;font-size: 15px;}
|
||||
.modifyTripNumberE{margin-bottom: 20px;height: 24px;font-size:0;}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.chengdou-03__systerm .el-dialog .modifyTripNumber .el-checkbox-group .el-checkbox .el-checkbox__label{font-size: 15px !important;line-height: 16px;}
|
||||
.chengdou-03__systerm .el-dialog .modifyTripNumber .el-checkbox-group .el-checkbox .el-checkbox__input{vertical-align: top;line-height: 16px;}
|
||||
.stationSelect{
|
||||
z-index:2014 !important;
|
||||
}
|
||||
.modifyTripNumberBR .el-form-item .el-form-item__label{font-size:15px;padding-right:0px;line-height:24px;vertical-align:top;}
|
||||
.modifyTripNumberBR .el-form-item{margin-bottom:20px;}
|
||||
.modifyTripNumberBR .el-form-item .el-form-item__content{line-height:24px;vertical-align: top;height:24px;}
|
||||
</style>
|
136
src/jmapNew/theme/datie_jd1a/menus/dialog/recDep.vue
Normal file
136
src/jmapNew/theme/datie_jd1a/menus/dialog/recDep.vue
Normal file
@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
title="作业窗口"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div>
|
||||
<el-form :model="form" class="demo-form-inline">
|
||||
<el-form-item label="作业任务:">
|
||||
<el-input v-model="form.work" type="textarea" :rows="2" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作时间:">
|
||||
<el-input v-model="form.time" type="textarea" :rows="1" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作信息:">
|
||||
<el-input v-model="form.info" type="textarea" :rows="2" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: center;"><el-button v-if="type === 'rec'" style="width: 200px;" @click="commit(menuOperate.CTC.receivingNotice)">完成接预</el-button></div>
|
||||
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'dep'" style="width: 200px;" @click="commit(menuOperate.CTC.departureNotice)">完成发预</el-button></div>
|
||||
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'rec'" style="width: 200px;" @click="commit(menuOperate.CTC.cancelReceivingNotice)">取消接预</el-button></div>
|
||||
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'dep'" style="width: 200px;" @click="commit(menuOperate.CTC.cancelDepartureNotice)">取消发预</el-button></div>
|
||||
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'arrive'" style="width: 200px;" @click="commit(menuOperate.CTC.finishArrive)">完成到点</el-button></div>
|
||||
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'arrive'" style="width: 200px;" @click="commit(menuOperate.CTC.cancelArrive)">取消到点</el-button></div>
|
||||
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'departure'" style="width: 200px;" @click="commit(menuOperate.CTC.finishDeparture)">完成发点</el-button></div>
|
||||
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'departure'" style="width: 200px;" @click="commit(menuOperate.CTC.cancelDeparture)">取消发点</el-button></div>
|
||||
<el-button style="height: 50px;width: 50px;position: relative;left: 370px;" @click="doClose">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
selected: null,
|
||||
selectedType: '',
|
||||
dialogShow: false,
|
||||
menuOperate: menuOperate,
|
||||
type: '',
|
||||
stationCode: '',
|
||||
tripNumber: '',
|
||||
loading: false,
|
||||
tableData: [],
|
||||
deviceTypeList: [
|
||||
{ label: '区段', value: 'Section' },
|
||||
{ label: '信号机', value: 'Signal' },
|
||||
{ label: '道岔', value: 'Switch' },
|
||||
{ label: '车站', value: 'Station' }
|
||||
],
|
||||
deviceIdList: [],
|
||||
form: {
|
||||
work: '',
|
||||
time: '',
|
||||
info: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(row, type, stationCode) {
|
||||
this.type = type;
|
||||
this.loading = true;
|
||||
this.stationCode = stationCode;
|
||||
this.tripNumber = row.tripNumber;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit(type) {
|
||||
this.loading = true;
|
||||
commitOperate(type, {stationCode: this.stationCode, tripNumber: this.tripNumber}, 3).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
this.$message.error('操作失败!');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
/*background: rgba(0, 0, 0, x);*/
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.text-button{
|
||||
color: #148ad0;
|
||||
cursor:pointer;
|
||||
}
|
||||
.text-button:active{
|
||||
color: #b938e1;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.text-button:hover{
|
||||
color: #b938e1;
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
196
src/jmapNew/theme/datie_jd1a/menus/dialog/routeDetail.vue
Normal file
196
src/jmapNew/theme/datie_jd1a/menus/dialog/routeDetail.vue
Normal file
@ -0,0 +1,196 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm route-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="460px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="2"><span>车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="1"><span>始端信号机</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin-top: 20px">
|
||||
<el-table
|
||||
ref="tempTable"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
:height="140"
|
||||
>
|
||||
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
domIdChoose: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'mapConfig'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '查询进路状态';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
this.tempData = tempData || [];
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
handleRouteName(name) {
|
||||
return name.replace(/-/, '-->');
|
||||
},
|
||||
handleDirection(signalCode) {
|
||||
let signalDirection = '';
|
||||
this.signalList.some(item => {
|
||||
if (item.code === signalCode) {
|
||||
signalDirection = item.right;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
|
||||
return '上行';
|
||||
} else {
|
||||
return '下行';
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
278
src/jmapNew/theme/datie_jd1a/menus/dialog/routeGuide.vue
Normal file
278
src/jmapNew/theme/datie_jd1a/menus/dialog/routeGuide.vue
Normal file
@ -0,0 +1,278 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm route-setting"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="460px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="route-table-box">
|
||||
<span class="route-table-tip">进路列表</span>
|
||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini" height="90" highlight-current-row @row-click="clickEvent">
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" style="margin-top: 40px">
|
||||
<el-col :span="12" :offset="12">
|
||||
<el-button
|
||||
:id="domIdConfirm"
|
||||
type="primary"
|
||||
:loading="loading"
|
||||
:disabled="commitDisabled"
|
||||
@click="commit"
|
||||
>执行</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<!--<password-box ref="passwordBox" @checkOver="passWordCommit" />-->
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
// import PasswordBox from './childDialog/passwordInputBox.vue';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
NoticeInfo
|
||||
// PasswordBox
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
beforeSectionList: [],
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: '',
|
||||
display: true,
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
},
|
||||
commitDisabled:true,
|
||||
controlTypeNameMap: {
|
||||
'01': '折返',
|
||||
'02': '直通'
|
||||
},
|
||||
row: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.guide.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '办理引导进路';
|
||||
},
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'mapConfig'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
getProtectedSectionName(row) {
|
||||
let name = '';
|
||||
if (row &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList.length > 0) {
|
||||
|
||||
const protect = row.overlapSectionList[0];
|
||||
name = `${protect.name}`;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
if (station) {
|
||||
name = `${name}(${station.name})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
handleRouteName(name) {
|
||||
return name.replace(/-/, '-->');
|
||||
},
|
||||
handleDirection(signalCode) {
|
||||
let signalDirection = '';
|
||||
this.signalList.some(item => {
|
||||
if (item.code === signalCode) {
|
||||
signalDirection = item.right;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
|
||||
return '上行';
|
||||
} else {
|
||||
return '下行';
|
||||
}
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
this.commitDisabled = true;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
this.tempData = tempData || [];
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
clickEvent(row, event, column) {
|
||||
this.commitDisabled = false;
|
||||
this.row = row;
|
||||
if (row) {
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.guide.choose.operation,
|
||||
val: row.code
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 办理引导进路
|
||||
commit() {
|
||||
if (this.row && this.row.code) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.guide.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||
param: {
|
||||
routeCode: this.row.code
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
} else {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.route-table-tip {
|
||||
position: relative !important;
|
||||
color: #3C72DF !important;
|
||||
background: #ECE9D8 !important;
|
||||
font-size: 12px;
|
||||
top: -7px;
|
||||
left: 7px;
|
||||
}
|
||||
|
||||
.route-table-box {
|
||||
margin-top: 20px !important;
|
||||
line-height: 10px !important;
|
||||
border: 2px solid #FFFFFF !important;
|
||||
border-radius: 5px !important;
|
||||
z-index: 1;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
|
||||
.item-lable {
|
||||
line-height: 26px !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
267
src/jmapNew/theme/datie_jd1a/menus/dialog/routeHandControl.vue
Normal file
267
src/jmapNew/theme/datie_jd1a/menus/dialog/routeHandControl.vue
Normal file
@ -0,0 +1,267 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-dialogDrag class="chengdou-03__systerm route-hand-control" :title="title" :visible.sync="show" width="500px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<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>
|
||||
<div class="table">
|
||||
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" :highlight-current-row="highlight" :height="140" @row-click="clickEvent">
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :disabled="commitDisabled" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'RouteHandControl',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
tempData: [],
|
||||
operation: null,
|
||||
selection: [],
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
highlight: true,
|
||||
row: '',
|
||||
commitDisabled: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'mapConfig'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return OperationEvent.Signal.humanControl.choose.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return OperationEvent.Signal.atsAutoControl.choose.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return '进路收人工控';
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return '进路交自动控';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
this.selection = [];
|
||||
this.commitDisabled = true;
|
||||
// 如果不是断点激活,而是第一次显示则初始化
|
||||
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;
|
||||
}
|
||||
}
|
||||
if (tempData && tempData.length > 0) {
|
||||
tempData.forEach(elem => {
|
||||
elem.check = false;
|
||||
elem.disabled = false;
|
||||
// 设置禁用状态
|
||||
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
|
||||
(elem.atsControl == '0') ) {
|
||||
elem.disabled = true;
|
||||
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
|
||||
(elem.atsControl == '1') ) {
|
||||
elem.disabled = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.tempData = tempData || [];
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
handleRouteName(name) {
|
||||
return name.replace(/-/, '-->');
|
||||
},
|
||||
handleDirection(signalCode) {
|
||||
let signalDirection = '';
|
||||
this.signalList.some(item => {
|
||||
if (item.code === signalCode) {
|
||||
signalDirection = item.right;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
|
||||
return '上行';
|
||||
} else {
|
||||
return '下行';
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$refs.tempTable.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
|
||||
clickEvent(row, event, column) {
|
||||
this.highlight = false;
|
||||
if (row && row.code) {
|
||||
this.highlight = true;
|
||||
this.selection = [row];
|
||||
this.beforeSectionList = row.containSectionList || [];
|
||||
this.row = row;
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
operation: '',
|
||||
val: row.code
|
||||
};
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 进路交人工控*/
|
||||
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
|
||||
this.commitDisabled = !row.atsControl;
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 进路交自动控*/
|
||||
this.commitDisabled = Boolean(row.atsControl);
|
||||
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 进路交人工控*/
|
||||
this.humanControl();
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 进路交自动控*/
|
||||
this.atsAutoControl();
|
||||
}
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
commitOperate(menuOperate.Signal.humanControl, {routeCodeList: [this.row.code]}, 2).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList: [this.row.code]}, 2).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
325
src/jmapNew/theme/datie_jd1a/menus/dialog/routeSelection.vue
Normal file
325
src/jmapNew/theme/datie_jd1a/menus/dialog/routeSelection.vue
Normal file
@ -0,0 +1,325 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm route-setting"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="route-table-box">
|
||||
<span class="route-table-tip">进路列表</span>
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tempData"
|
||||
border
|
||||
:cell-style="tableStyle"
|
||||
style="width: 99%;"
|
||||
size="mini"
|
||||
height="150"
|
||||
highlight-current-row
|
||||
@row-click="clickEvent"
|
||||
>
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" style="margin-top: 70px">
|
||||
<el-col :span="12" :offset="12">
|
||||
<el-button
|
||||
:id="domIdConfirm"
|
||||
type="primary"
|
||||
:loading="loading"
|
||||
:disabled="commitDisabled"
|
||||
@click="commit"
|
||||
>执行</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import PasswordBox from './childDialog/passwordInputBox.vue';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
PasswordBox
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
beforeSectionList: [],
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
row: null,
|
||||
operation: '',
|
||||
display: true,
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
commitDisabled:true,
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '办理进路';
|
||||
},
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'sectionList',
|
||||
'mapConfig'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
getProtectedSectionName(row) {
|
||||
let name = '';
|
||||
if (row &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList.length > 0) {
|
||||
|
||||
const protect = row.overlapSectionList[0];
|
||||
name = `${protect.name}`;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
if (station) {
|
||||
name = `${name}(${station.name})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
handleRouteName(name) {
|
||||
return name.replace(/-/, '-->');
|
||||
},
|
||||
handleDirection(signalCode) {
|
||||
let signalDirection = '';
|
||||
this.signalList.some(item => {
|
||||
if (item.code === signalCode) {
|
||||
signalDirection = item.right;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
|
||||
return '上行';
|
||||
} else {
|
||||
return '下行';
|
||||
}
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
this.commitDisabled = true;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
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;
|
||||
}
|
||||
}
|
||||
this.tempData = tempData || [];
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.restoreBeforeDevices();
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
restoreBeforeDevices() {
|
||||
// 恢复之前选中设备
|
||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||
this.beforeSectionList.forEach(elem => {
|
||||
elem.cutOff = false;
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
||||
this.beforeSectionList = [];
|
||||
},
|
||||
clickEvent(row, event, column) {
|
||||
this.row = row;
|
||||
if (row) {
|
||||
// 恢复进路区段的切除状态
|
||||
this.restoreBeforeDevices();
|
||||
row.canSetting = true;
|
||||
this.commitDisabled = false;
|
||||
// 设置选中区段为切除状态
|
||||
const containSectionList = [];
|
||||
if (row.routeSectionList && row.routeSectionList.length) {
|
||||
// 设置新选的进路区段为切除状态
|
||||
row.routeSectionList.forEach(elem => {
|
||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
|
||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||
section.logicSectionCodeList.forEach(item => {
|
||||
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
|
||||
sec.cutOff = true;
|
||||
containSectionList.push(sec);
|
||||
});
|
||||
} else {
|
||||
section.cutOff = true;
|
||||
containSectionList.push(section);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/updateMapState', [...containSectionList]);
|
||||
this.beforeSectionList = containSectionList || [];
|
||||
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||
val: row.code
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
this.loading = true;
|
||||
commitOperate({operation:OperationEvent.Signal.arrangementRoute.confirm.operation}, {routeCode: this.row.code}, 1).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$refs.passwordBox.doShow({operation:OperationEvent.Signal.arrangementRoute.menu.operation});
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
passWordCommit(data) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {}, 2).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.route-table-tip {
|
||||
position: relative !important;
|
||||
color: #3C72DF !important;
|
||||
background: #ECE9D8 !important;
|
||||
font-size: 12px;
|
||||
top: -7px;
|
||||
left: 7px;
|
||||
}
|
||||
|
||||
.route-table-box {
|
||||
margin-top: 15px !important;
|
||||
line-height: 10px !important;
|
||||
border: 2px solid #FFFFFF !important;
|
||||
border-radius: 5px !important;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.item-lable {
|
||||
line-height: 26px !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
308
src/jmapNew/theme/datie_jd1a/menus/dialog/routeSelection1.vue
Normal file
308
src/jmapNew/theme/datie_jd1a/menus/dialog/routeSelection1.vue
Normal file
@ -0,0 +1,308 @@
|
||||
<template>
|
||||
<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="2">列车车次</el-col>
|
||||
<el-col :span="21"><span style="font-size: 18px;color: #f00;">{{ selected.tripNumber }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="2">进路描述</el-col>
|
||||
<el-col :span="21">
|
||||
<div style="width: 100%;height: 50px;background: #DFE3E6;padding: 10px;">
|
||||
<span>{{ `${type === 'dep' ? '发车/通过': '接车/通过'}; 股道:${selected.trackName};进路按钮:${getRouteNames()}` }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="2">进路显示</el-col>
|
||||
<el-col :span="21">
|
||||
<map-visual ref="map" :map-data="mapData" :width="960" :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>-->
|
||||
<el-row style="margin-top: 10px;margin-bottom: 10px;">
|
||||
<el-col :span="21" :offset="2">
|
||||
<el-radio v-model="radio" disabled label="禁用">分段办理</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="display: flex;justify-content: space-between;margin-bottom: 10px;">
|
||||
<el-button v-if="type === 'rec'" size="mini" :type="selected.receivingRouteAutoTrigger?'warning':''" :disabled="!!route.lock || !selected.receivingNotice" @click="commit">办理接车</el-button>
|
||||
<el-button v-if="type === 'dep'" size="mini" :type="selected.departureRouteAutoTrigger?'warning':''" :disabled="!!route.lock || !selected.departureNotice" @click="commit">办理发车</el-button>
|
||||
<el-button size="mini" disabled>办理通过</el-button>
|
||||
<el-button size="mini" disabled>进路单锁</el-button>
|
||||
<el-button size="mini" :disabled="cancelRouteDisabled" @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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import { mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { mapGetters } from 'vuex';
|
||||
// import { dbReadData } from '@/utils/indexedDb';
|
||||
import ConfirmTip from './childDialog/confirmTip';
|
||||
import MapVisual from './mapVisual';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
ConfirmTip,
|
||||
MapVisual
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
radio:'',
|
||||
beforeSectionList: [],
|
||||
beforeSwitchList: [],
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: {},
|
||||
operation: '',
|
||||
display: true,
|
||||
mapData: null,
|
||||
route: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
},
|
||||
type: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'overlapData'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '进路办理';
|
||||
},
|
||||
cancelRouteDisabled() {
|
||||
return !this.route.lock || (this.type === 'rec' && !this.selected.receivingNotice) || (this.type === 'dep' && !this.selected.departureNotice);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.mapDataLoadedCount': function (val) { // 地图数据加载完成
|
||||
this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map));
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
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);
|
||||
this.selected = selected;
|
||||
this.type = type;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.loadData();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
loadData() {
|
||||
this.beforeSwitchList = [];
|
||||
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 = {};
|
||||
this.restoreBeforeDevices();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
restoreBeforeDevices() {
|
||||
// 恢复之前选中设备
|
||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||
this.beforeSectionList.forEach(el => {
|
||||
el.routeLock = false;
|
||||
el.preWhite = false;
|
||||
});
|
||||
}
|
||||
|
||||
if (this.beforeSwitchList && this.beforeSwitchList.length) {
|
||||
this.beforeSwitchList.forEach(el => {
|
||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
el.pos = 'NO';
|
||||
el.routeLock = false;
|
||||
});
|
||||
}
|
||||
|
||||
this.$refs.map.updateMapDevice([...this.beforeSectionList, ...this.beforeSwitchList]);
|
||||
|
||||
this.beforeSectionList = [];
|
||||
this.beforeSwitchList = [];
|
||||
},
|
||||
clickEvent(routeCode) {
|
||||
const route = this.$store.state.map.routeData[routeCode];
|
||||
this.route = route;
|
||||
if (route) {
|
||||
// 恢复进路区段的切除状态
|
||||
this.restoreBeforeDevices();
|
||||
|
||||
const containSectionList = [];
|
||||
const containSwitchList = [];
|
||||
if (!route.setting) {
|
||||
const signalBegin = this.$refs.map.getDeviceByCode(route.startSignalCode);
|
||||
const code = route.startSignalCode;
|
||||
const signal = signalBegin;
|
||||
const switchCodeList = [];
|
||||
|
||||
this.$refs.map.setCenterWithOffset(code, 50, signal.position.y);
|
||||
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 => {
|
||||
containSectionList.push({code: sectionCode, preWhite: true});
|
||||
});
|
||||
} else {
|
||||
containSectionList.push({code, preWhite: true});
|
||||
}
|
||||
|
||||
if (section.switchSection && section.switch) {
|
||||
switchCodeList.push(section.switch.code);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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);
|
||||
const sectionC = this.$refs.map.getDeviceByCode(swch.sectionCCode);
|
||||
// normalPosition: el.normal, reversePosition: !el.normal
|
||||
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 });
|
||||
} else {
|
||||
containSectionList.push({code: sectionC.code, routeLock:true });
|
||||
// containSectionList.push({code: sectionB.code, preBlue: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.$refs.map.updateMapDevice([...containSectionList, ...containSwitchList]);
|
||||
this.beforeSectionList = containSectionList;
|
||||
this.beforeSwitchList = containSwitchList;
|
||||
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||
val: route.code
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow('当前进路不允许排列, 与其他进路可能发生冲突');
|
||||
}
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
if (this.route) {
|
||||
this.loading = true;
|
||||
const type = this.route.lock ? menuOperate.Signal.cancelTrainRoute : menuOperate.Signal.arrangementRoute;
|
||||
const param = this.route.lock ? { signalCode: this.route.startSignalCode } : { routeCode:this.route.code };
|
||||
commitOperate(type, param, 3).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
} // D3D8DC
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
/deep/ .el-dialog__header{
|
||||
background: #B4B6B9;
|
||||
}
|
||||
/deep/ .el-dialog__body{
|
||||
background: #D3D8DC !important;
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
114
src/jmapNew/theme/datie_jd1a/menus/dialog/sectionDetail.vue
Normal file
114
src/jmapNew/theme/datie_jd1a/menus/dialog/sectionDetail.vue
Normal file
@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm section-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" label-position="left" :model="formModel" label-width="100px">
|
||||
<el-form-item label="区段名称">
|
||||
<el-input v-model="formModel.sectionName" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="车站名称">
|
||||
<el-input v-model="formModel.stationName" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="公里标(Km)">
|
||||
<el-input v-model="formModel.kmPost" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="长度(m)">
|
||||
<el-input v-model="formModel.lengthFact" disabled />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" style="margin-top: 50px">
|
||||
<el-col :span="7" :offset="17">
|
||||
<el-button :id="domIdConfirm" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
formModel: {
|
||||
sectionName: '',
|
||||
stationName: '',
|
||||
kmPost: '',
|
||||
lengthFact: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Section.detail.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '无岔区段属性对话框';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是因为断点激活则需要,初始化菜单初始值
|
||||
if (!this.dialogShow) {
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
const hasParentCode = (this.selected.type == '02');
|
||||
this.formModel.sectionName = hasParentCode ? selected.parentName + '-' + selected.name : selected.name;
|
||||
this.formModel.lengthFact = selected.lengthFact;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.formModel.stationName = station.name;
|
||||
this.formModel.kmPost = station.kmPost;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Section.detail.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
265
src/jmapNew/theme/datie_jd1a/menus/dialog/sendRunplan.vue
Normal file
265
src/jmapNew/theme/datie_jd1a/menus/dialog/sendRunplan.vue
Normal file
@ -0,0 +1,265 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
id="sendRunplanClass"
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="1165px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="tableList">
|
||||
<div class="leftTable">
|
||||
<el-table
|
||||
id="sendRunplanLeftTable"
|
||||
:data="tableData1"
|
||||
border
|
||||
height="570"
|
||||
style="width: 100%;border:1px #ccc solid"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
width="70"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="tripNumber"
|
||||
label="车次"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="type"
|
||||
label="类型"
|
||||
width="50"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="arriveRunPlan.accessName"
|
||||
label="方向"
|
||||
width="105"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.arriveRunPlan" :title="scope.row.arriveRunPlan.accessName">{{ scope.row.arriveRunPlan.accessName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="arriveRunPlan.sectionName"
|
||||
label="到达股道"
|
||||
width="95"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="arriveRunPlan.planTime"
|
||||
label="到达时刻"
|
||||
width="95"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="departRunPlan.accessName"
|
||||
label="去向"
|
||||
width="105"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.departRunPlan" :title="scope.row.departRunPlan.accessName">{{ scope.row.departRunPlan.accessName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="departRunPlan.sectionName"
|
||||
label="出发股道"
|
||||
width="95"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="departRunPlan.planTime"
|
||||
label="出发时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="property"
|
||||
label="属性"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="tips"
|
||||
label="注意事项"
|
||||
width="120"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="rightTable">
|
||||
<el-table
|
||||
id="sendRunplanRightTable"
|
||||
:data="tableData2"
|
||||
border
|
||||
height="570"
|
||||
style="width: 100%;border:1px #ccc solid"
|
||||
>
|
||||
<el-table-column
|
||||
prop="number"
|
||||
label="序号"
|
||||
width="40"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="number"
|
||||
label="受令单位"
|
||||
width="70"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="number"
|
||||
label="状态"
|
||||
width="70"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">发送</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<!-- updateTrip -->
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
export default {
|
||||
name:'SendRunplan',
|
||||
data() {
|
||||
return {
|
||||
dialogShow:false,
|
||||
loading: false,
|
||||
tableData1:[],
|
||||
tableData2:[],
|
||||
addModel:{
|
||||
stationCode:'',
|
||||
planParamList:[],
|
||||
force:1
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.CTCCommand.batchModifyTrackSection.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '发送计划';
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
doShow(tableData, activeDepartRunPlan, activeArriveRunPlan, filterSectionList) {
|
||||
this.addModel.planParamList = [];
|
||||
this.tableData1 = [];
|
||||
tableData.forEach(element => {
|
||||
if (element.arriveRunPlan && element.arriveRunPlan.sectionCode) {
|
||||
const sectionObj = filterSectionList.find(section=>{ return section.code == element.arriveRunPlan.sectionCode; }) || {name:''};
|
||||
element.arriveRunPlan.sectionName = sectionObj.name;
|
||||
}
|
||||
if (element.departRunPlan && element.departRunPlan.sectionCode) {
|
||||
const sectionObj = filterSectionList.find(section=>{ return section.code == element.departRunPlan.sectionCode; }) || {name:''};
|
||||
element.departRunPlan.sectionName = sectionObj.name;
|
||||
}
|
||||
this.tableData1.push(element);
|
||||
});
|
||||
// filterSectionList
|
||||
this.addModel.stationCode = this.$store.state.training.roleDeviceCode;
|
||||
const activeDepartRunPlanList = Object.values(activeDepartRunPlan).filter(activeDepart=>{ return activeDepart.changeSectionCode && activeDepart.changeSectionCode != activeDepart.sectionCode; });
|
||||
if (activeDepartRunPlanList.length > 0) {
|
||||
activeDepartRunPlanList.forEach(depart=>{
|
||||
this.addModel.planParamList.push({
|
||||
runPlanCode:depart.code,
|
||||
departSectionCode:depart.changeSectionCode
|
||||
});
|
||||
});
|
||||
}
|
||||
const activeArriveRunPlanList = Object.values(activeArriveRunPlan).filter(activeArrive=>{ return activeArrive.changeSectionCode && activeArrive.changeSectionCode != activeArrive.sectionCode; });
|
||||
if (activeArriveRunPlanList.length > 0) {
|
||||
activeArriveRunPlanList.forEach(arrive=>{
|
||||
this.addModel.planParamList.push({
|
||||
runPlanCode:arrive.code,
|
||||
arriveSectionCode:arrive.changeSectionCode
|
||||
});
|
||||
});
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.addModel.planParamList.length > 0) {
|
||||
const params = this.addModel;
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.CTC.batchModifyTrackSection, params, 3).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$emit('closeFlash');
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$emit('noticeInfo');
|
||||
});
|
||||
}
|
||||
|
||||
// * @param stationCode 车站编码
|
||||
// * @param runPlanCode 运行编码
|
||||
// * @param arriveSectionCode 到达股道编码
|
||||
// * @param departSectionCode 出发股道编码
|
||||
// * @param force 是否强制 0:不强制。1:强制
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tableList{
|
||||
display: inline-block
|
||||
}
|
||||
.leftTable{
|
||||
display: inline-block;
|
||||
width: 955px;
|
||||
}
|
||||
.rightTable{
|
||||
display: inline-block;
|
||||
margin-left:10px;
|
||||
font-size:13px;
|
||||
width:150px
|
||||
}
|
||||
.sendRunplanLeftTable{
|
||||
|
||||
}
|
||||
</style>
|
||||
<style lang="css">
|
||||
#sendRunplanClass.chengdou-03__systerm .el-dialog .el-dialog__body{
|
||||
padding: 10px;
|
||||
}
|
||||
#sendRunplanClass.chengdou-03__systerm .el-dialog .el-table .cell div{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
62
src/jmapNew/theme/datie_jd1a/menus/dialog/shuntRoute.vue
Normal file
62
src/jmapNew/theme/datie_jd1a/menus/dialog/shuntRoute.vue
Normal file
@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="fuzhou-01__systerm"
|
||||
title="调车进路参数"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px;text-align: center;">
|
||||
<div>{{ `${routeName}调车进路预计占用时间:` }}</div>
|
||||
<div style="display: flex;align-items: center;margin-top: 10px;">
|
||||
<el-input-number v-model="time" size="small" :controls="false" style="width: 220px;" />
|
||||
<div>分钟</div>
|
||||
</div>
|
||||
<div style="border: 1px solid #000;padding: 10px;margin-top: 10px;">
|
||||
<el-radio v-model="radio" label="1">电力机车</el-radio>
|
||||
<el-radio v-model="radio" label="2">内燃机车</el-radio>
|
||||
</div>
|
||||
<div style="text-align: center;margin-top: 10px;">
|
||||
<el-button @click="commit">确定</el-button>
|
||||
<el-button @click="doClose">取消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ShuntRoute',
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
routeName: '',
|
||||
radio: '',
|
||||
time: 0
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
doClose() {
|
||||
this.show = false;
|
||||
this.$emit('routeCancel');
|
||||
},
|
||||
doShow(route) {
|
||||
this.show = true;
|
||||
this.routeName = route.name;
|
||||
},
|
||||
commit() {
|
||||
this.show = false;
|
||||
this.$emit('routeCommit', '', this.time);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
191
src/jmapNew/theme/datie_jd1a/menus/dialog/stageRunplan.vue
Normal file
191
src/jmapNew/theme/datie_jd1a/menus/dialog/stageRunplan.vue
Normal file
@ -0,0 +1,191 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
id="stageRunplanClass"
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="945px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div>
|
||||
<span>最近接受时间: {{ updateTime }}</span>
|
||||
</div>
|
||||
<el-table
|
||||
id="stageRunplanLeftTable"
|
||||
:data="tableData"
|
||||
border
|
||||
height="370"
|
||||
style="width: 100%;border:1px #ccc solid"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
width="70"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="arriveTripNumber"
|
||||
label="到达车次"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="departTripNumber"
|
||||
label="出发车次"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="status"
|
||||
label="类型"
|
||||
width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.status==-1">删除</div>
|
||||
<div v-else-if="scope.row.status==1">添加</div>
|
||||
<div v-else-if="scope.row.status==0">变化</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="arriveSectionCode"
|
||||
label="到达股道"
|
||||
width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.status==-1">删除</div>
|
||||
<div v-else-if="scope.row.status==1">{{ sectionMap[scope.row.arriveSectionCode] }}</div>
|
||||
<div v-else-if="scope.row.arriveSectionCode">{{ sectionMap[scope.row.arriveSectionCode]+'['+sectionMap[scope.row.oldArriveSectionCode]+']' }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="arrivePlanTime"
|
||||
label="到达时间"
|
||||
width="170"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.status==-1">删除</div>
|
||||
<div v-else>{{ scope.row.arrivePlanTime }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="departSectionCode"
|
||||
label="出发股道"
|
||||
width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.status==-1">删除</div>
|
||||
<!-- {{ sectionMap }} -->
|
||||
<div v-else-if="scope.row.status==1">{{ sectionMap[scope.row.departSectionCode] }}</div>
|
||||
<div v-else-if="scope.row.departSectionCode">{{ sectionMap[scope.row.departSectionCode]+'['+sectionMap[scope.row.oldDepartSectionCode]+']' }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="departPlanTime"
|
||||
label="出发时间"
|
||||
width="170"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.status==-1">删除</div>
|
||||
<div v-else>{{ scope.row.departPlanTime }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row justify="center" class="button-group" style="margin-top:10px">
|
||||
<el-col :span="6" :offset="5">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">签收</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
export default {
|
||||
name:'StageRunplan',
|
||||
data() {
|
||||
return {
|
||||
dialogShow:false,
|
||||
loading: false,
|
||||
tableData:[],
|
||||
sectionMap:{},
|
||||
updateTime:''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'sectionList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.CTCCommand.stationSignRunplan.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '阶段计划';
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
doShow(currentRailwaySimulationRunplan) {
|
||||
this.stationCode = currentRailwaySimulationRunplan.stationCode;
|
||||
this.tableData = currentRailwaySimulationRunplan.dataList;
|
||||
this.updateTime = currentRailwaySimulationRunplan.updateTime;
|
||||
this.sectionMap = {};
|
||||
this.sectionList.forEach(section=>{
|
||||
if (section.standTrack) { this.sectionMap[section.code] = section.name; }
|
||||
});
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.CTC.stationSignRunplan, {stationCode:this.stationCode}, 3).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$emit('closeFlash');
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$emit('noticeInfo');
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="css">
|
||||
#stageRunplanClass.chengdou-03__systerm .el-dialog .el-dialog__body{
|
||||
padding: 10px;
|
||||
}
|
||||
#stageRunplanClass.chengdou-03__systerm .el-dialog .el-table .cell div{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
603
src/jmapNew/theme/datie_jd1a/menus/dialog/standControl.vue
Normal file
603
src/jmapNew/theme/datie_jd1a/menus/dialog/standControl.vue
Normal file
@ -0,0 +1,603 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-detain-train"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="11">
|
||||
<span>车站</span>
|
||||
<el-input v-model="stationName" style="width: 110px; margin-left: 10px;" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<span>站台</span>
|
||||
<el-input v-model="standName" style="width: 110px; margin-left: 10px;" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-if="DetainTrain">
|
||||
<div
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;"
|
||||
>
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-radio-group v-model="radio" @change="choose">
|
||||
<el-col :span="24">
|
||||
<el-radio
|
||||
:id="domIdDetainCar"
|
||||
label="01"
|
||||
style="display: block; text-align: left; float: left; margin-right: 10px;"
|
||||
>本站台
|
||||
</el-radio>
|
||||
<el-radio
|
||||
:id="isUpDirection? domIdDetainChoose: ''"
|
||||
v-if="radio1 == 2"
|
||||
:disabled="!isUpDirection"
|
||||
:label="`${isUpDirection}`"
|
||||
style="display: block; text-align: left; float: left; margin-right: 10px;"
|
||||
>上行全线
|
||||
</el-radio>
|
||||
<el-radio
|
||||
:id="isUpDirection ? '': domIdDetainChoose"
|
||||
v-if="radio1 == 2"
|
||||
:label="`${!isUpDirection}`"
|
||||
:disabled="isUpDirection"
|
||||
style="display: block; text-align: left; float: left;"
|
||||
>下行全线</el-radio>
|
||||
</el-col>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
label="1"
|
||||
:disabled="radio1 == '2'"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
扣车</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
label="2"
|
||||
:disabled="radio1 == '1'"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
取消扣车</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="JumpStop">
|
||||
<div
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 115px;"
|
||||
>
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="24">
|
||||
<el-radio-group v-model="radio" @change="chooseJumpStop">
|
||||
<el-radio
|
||||
:id="radio == '02' ? domIdChoose : ''"
|
||||
label="01"
|
||||
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 80px;"
|
||||
>
|
||||
站台跳停
|
||||
</el-radio>
|
||||
<el-radio
|
||||
:id="radio == '01' ? domIdChoose : ''"
|
||||
label="02"
|
||||
style="display: block; text-align: left; margin-left: 0; float: left;"
|
||||
>
|
||||
指定列车跳停</el-radio>
|
||||
<div style="float: left;">
|
||||
<span>车组号</span>
|
||||
<el-select
|
||||
:id="domIdCancelJumpStop"
|
||||
v-model="tripNumber"
|
||||
style="width: 120px; margin-left: 20px;"
|
||||
size="mini"
|
||||
:disabled="radio == '01'"
|
||||
@change="trainNoSelectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in trainList"
|
||||
:key="option.groupNumber"
|
||||
:label="option.groupNumber"
|
||||
:value="option.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
label="1"
|
||||
:disabled="radio1 == 2"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
跳停</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
label="2"
|
||||
:disabled="radio1 == 1"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
取消跳停</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="RunLevel">
|
||||
<div
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 105px;"
|
||||
>
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-radio-group v-model="radio" @change="chooseStopTime">
|
||||
<el-col :span="24">
|
||||
<el-radio
|
||||
:id="radio == '02' ? domIdChoose1 : ''"
|
||||
label="01"
|
||||
style="display: block; text-align: left; margin-right: 10px; margin-bottom:10px; width: 60px;"
|
||||
>
|
||||
自动
|
||||
</el-radio>
|
||||
<el-radio
|
||||
:id="radio == '01' ? domIdChoose1 : ''"
|
||||
label="02"
|
||||
style="display: block; text-align: left; margin-left: 0; float: left;"
|
||||
>
|
||||
人工</el-radio>
|
||||
<div v-if="radio2 == 2" style="float: left; margin-left: 20px;">
|
||||
<span>运行等级</span>
|
||||
<el-select
|
||||
:id="domIdRunLevel"
|
||||
v-model="trainRunlevel"
|
||||
style="width: 120px; margin-left: 20px;"
|
||||
size="mini"
|
||||
:disabled="radio == '01'"
|
||||
@change="trainNoSelectLevel"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in runLevelList"
|
||||
:key="option.value"
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div v-if="radio2 == 1" style="float: left; margin-left: 20px;">
|
||||
<span>停站时间</span>
|
||||
<el-input-number
|
||||
:id="domIdStopTime"
|
||||
v-model="trainStopTime"
|
||||
:min="15"
|
||||
:max="300"
|
||||
:step="1"
|
||||
size="mini"
|
||||
:controls="false"
|
||||
style="width:100px;display:inline-block;margin-left:10px;height:34px;"
|
||||
:disabled="radio == '01'"
|
||||
@blur="handleTrainStopTime"
|
||||
/>
|
||||
<div style="margin-left: 5px;display: inline-block;font-size: 14px;">秒</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
|
||||
<el-radio :id="effective === false? '': domIdChoose2" :label="false">一次有效</el-radio>
|
||||
<el-radio :id="effective === true? '': domIdChoose2" :label="true">一直有效</el-radio>
|
||||
</el-radio-group>
|
||||
<!-- <el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
:id="effective == '02' ? '': domIdChoose2"
|
||||
label="01"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
一次有效</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
:id="effective == '01' ? '': domIdChoose2"
|
||||
label="02"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
一直有效</el-radio>
|
||||
</el-col>
|
||||
</el-radio-group> -->
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
standName: '',
|
||||
stationName: '',
|
||||
selected: null,
|
||||
operation: null,
|
||||
isUpDirection:true,
|
||||
radio: '01',
|
||||
radio1: '1',
|
||||
radio2: '1',
|
||||
DetainTrain: false,
|
||||
JumpStop: false,
|
||||
RunLevel: false,
|
||||
trainList: [],
|
||||
runLevelList: [
|
||||
{ value: 2, label: '常速' },
|
||||
{ value: 1, label: '低速' },
|
||||
{ value: 3, label: '高速' }
|
||||
],
|
||||
tripNumber: '',
|
||||
effective: '01',
|
||||
trainRunlevel: 2,
|
||||
trainStopTime: 30,
|
||||
disabledTime: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map',
|
||||
'mapConfig'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
domIdDetainCar() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrain.choose.domId : '';
|
||||
},
|
||||
domIdDetainChoose() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
if (this.radio1 == '1') { // 跳停
|
||||
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
|
||||
} else { // 取消跳停
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
|
||||
}
|
||||
},
|
||||
// domIdJumpStop() {
|
||||
// return this.dialogShow ? OperationEvent.StationStand.setJumpStop.choose.domId : '';
|
||||
// },
|
||||
domIdCancelJumpStop() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.choose.domId : '';
|
||||
},
|
||||
domIdChoose1() {
|
||||
if (this.radio2 == '1') { // 设置停站时间
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose1.domId : '';
|
||||
} else { // 设置站间运行等级
|
||||
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose1.domId : '';
|
||||
}
|
||||
},
|
||||
domIdChoose2() {
|
||||
if (this.radio2 == '1') { // 设置停站时间
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose2.domId : '';
|
||||
} else { // 设置站间运行等级
|
||||
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose2.domId : '';
|
||||
}
|
||||
},
|
||||
domIdStopTime() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.input.domId : '';
|
||||
},
|
||||
domIdRunLevel() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.chooseTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
return '扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation || this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
|
||||
return '取消扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
return '设置跳停';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
return '取消跳停';
|
||||
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
return '设置停站时间';
|
||||
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
return '设置站间运行等级';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
operation(data) {
|
||||
if (data != OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
|
||||
this.JumpStop = false;
|
||||
this.RunLevel = false;
|
||||
this.DetainTrain = false;
|
||||
this.radio = '01';
|
||||
this.radio1 = '1';
|
||||
this.radio2 = '1';
|
||||
if (data == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
this.radio1 = '1';
|
||||
this.radio = '01';
|
||||
this.DetainTrain = true;
|
||||
} else if (data == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
this.radio1 = '2';
|
||||
this.radio = '01';
|
||||
this.DetainTrain = true;
|
||||
} else if (data == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
this.JumpStop = true;
|
||||
this.radio1 = '1';
|
||||
} else if (data == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
this.JumpStop = true;
|
||||
this.radio1 = '2';
|
||||
} else if (data == OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
this.RunLevel = true;
|
||||
this.radio2 = '1';
|
||||
} else if (data == OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
this.RunLevel = true;
|
||||
this.radio2 = '2';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempDate = null) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.tripNumber = '';
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
this.operation = operate.operation;
|
||||
if (selected) {
|
||||
this.getDirection(selected);
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.getDirection(selected);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
this.radio = selected.direction;
|
||||
}
|
||||
this.effective = false;
|
||||
this.radio = '01';
|
||||
this.disabledTime = true;
|
||||
this.trainList = this.map.trainList; // 加载列车数据
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
getDirection(selected) {
|
||||
if (this.mapConfig.upRight) {
|
||||
this.standName = selected.right ? '上行' : '下行';
|
||||
this.isUpDirection = selected.right;
|
||||
} else if (!this.mapConfig.upRight) {
|
||||
this.standName = selected.right ? '下行' : '上行';
|
||||
this.isUpDirection = !selected.right;
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.operation = '';
|
||||
this.trainStopTime = 30;
|
||||
},
|
||||
choose(upDown) { // 取消扣车 请求code码
|
||||
const operate = {
|
||||
operation: upDown == '01'
|
||||
? OperationEvent.StationStand.cancelDetainTrain.choose.operation
|
||||
: OperationEvent.Command.common.choose.operation,
|
||||
val: this.radio
|
||||
};
|
||||
if (this.radio == '02' || this.radio == '03') {
|
||||
this.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation;
|
||||
} else {
|
||||
this.operation = OperationEvent.StationStand.cancelDetainTrain.menu.operation;
|
||||
}
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
trainNoSelectChange(upDown) { // 跳停 选择车组号
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation
|
||||
};
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
chooseJumpStop(upDown) {
|
||||
const operate = {
|
||||
operation: ''
|
||||
};
|
||||
if (this.radio1 == '1') { // 跳停选择
|
||||
operate.operation = OperationEvent.StationStand.setJumpStop.select.operation;
|
||||
} else { // 取消跳停选择
|
||||
operate.operation = OperationEvent.StationStand.cancelJumpStop.select.operation;
|
||||
}
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
chooseEffective(effective) {
|
||||
const operate = {
|
||||
operation: '',
|
||||
val: effective
|
||||
};
|
||||
if (this.radio2 == '1') { // 设置停站时间
|
||||
operate.operation = OperationEvent.StationStand.setStopTime.choose2.operation;
|
||||
} else { // 设置站间运行等级
|
||||
operate.operation = OperationEvent.StationStand.setRunLevel.choose2.operation;
|
||||
}
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
chooseStopTime(upDown) {
|
||||
const operate = {
|
||||
operation: '',
|
||||
val: this.radio
|
||||
};
|
||||
if (this.radio2 == '1') { // 设置停站时间
|
||||
operate.operation = OperationEvent.StationStand.setStopTime.choose1.operation;
|
||||
} else { // 设置站间运行等级
|
||||
operate.operation = OperationEvent.StationStand.setRunLevel.choose1.operation;
|
||||
}
|
||||
if (this.radio === '01') {
|
||||
this.disabledTime = true;
|
||||
this.trainRunlevel = 2;
|
||||
this.effective = false;
|
||||
} else {
|
||||
this.disabledTime = false;
|
||||
this.effective = true;
|
||||
}
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
trainNoSelectLevel(upDown) {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setRunLevel.chooseTrain.operation,
|
||||
val: `${upDown}`,
|
||||
param: {
|
||||
standRunLevel: `${upDown}`
|
||||
}
|
||||
};
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
handleTrainStopTime() {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
||||
val: `${this.trainStopTime}`
|
||||
};
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
handleBreak(operate) { // 断点记录
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
valid && this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
this.setDetainTrain(); /** 设置扣车*/
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation || this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
|
||||
this.cancelDetainTrain(); /** 取消扣车*/
|
||||
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
this.setJumpStop(); /** 设置跳停*/
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
this.cancelJumpStop(); /** 取消跳停*/
|
||||
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
this.setStopTime(); /** 设置停站时间*/
|
||||
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
this.setRunLevel(); /** 设置站间运行等级*/
|
||||
}
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
this.sendCommand(menuOperate.StationStand.setDetainTrain);
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
|
||||
} else {
|
||||
this.sendCommand(menuOperate.StationStand.cancelDetainTrainAll);
|
||||
}
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
this.sendCommand(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.tripNumber});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
this.sendCommand(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.tripNumber});
|
||||
},
|
||||
// 设置停站时间
|
||||
setStopTime() {
|
||||
this.sendCommand(menuOperate.StationStand.setStopTime, {parkingTime: this.radio == '01' ? -1 : this.trainStopTime, parkingAlwaysValid: this.effective});
|
||||
},
|
||||
// 设置运行速度
|
||||
setRunLevel() {
|
||||
this.sendCommand(menuOperate.StationStand.setRunLevel, {runLevelTime:this.radio === '02' ? this.trainRunlevel : 2, runLevelTimeForever: this.effective});
|
||||
},
|
||||
sendCommand(operate, param) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, param, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.stand-detain-train .context {
|
||||
height: 80px !important;
|
||||
}
|
||||
/deep/ {
|
||||
.el-input--mini .el-input__icon{
|
||||
line-height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
217
src/jmapNew/theme/datie_jd1a/menus/dialog/standDetail.vue
Normal file
217
src/jmapNew/theme/datie_jd1a/menus/dialog/standDetail.vue
Normal file
@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="380px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10">
|
||||
<span>车站</span>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<span>站台</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="header">
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="standName" style="padding: 0 3px;" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>停站时间</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.stopTime" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>运行等级</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.runLevel" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>扣车</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.detainCar" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>跳停</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.jumpStop" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="18">
|
||||
<span style="opacity: 0;">1</span>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'StandDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
standName: '',
|
||||
runLevelList: [
|
||||
'自动',
|
||||
'低速',
|
||||
'常速',
|
||||
'高速'
|
||||
],
|
||||
modelData: {
|
||||
stopTime: '自动',
|
||||
runLevel: '自动',
|
||||
detainCar: '无扣车',
|
||||
jumpStop: '无跳停'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'mapConfig',
|
||||
'stationList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '站台信息';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
|
||||
// const stationList = this.stationList.slice();
|
||||
// const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
// let stationStand, station;
|
||||
// if (selected.direction == '01') { // 下行
|
||||
// // 下行时,此站不是最后一站
|
||||
// if (index != 0) {
|
||||
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
// }
|
||||
// } else {
|
||||
// // 上行时,此站不是最后一站
|
||||
// if (index != this.stationList.length - 1) {
|
||||
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
// }
|
||||
// }
|
||||
this.modelData = {
|
||||
stopTime: selected.parkingTime < 0 ? '自动' : `${selected.parkingTime} 秒`,
|
||||
runLevel: this.runLevelList[selected.runLevelTime],
|
||||
detainCar: selected.stationHoldTrain || selected.centerHoldTrain ? '已设置' : '无扣车',
|
||||
jumpStop: selected.allSkip || selected.assignSkip ? '已设置' : '无跳停'
|
||||
};
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
if (this.mapConfig.upRight) {
|
||||
this.standName = selected.right ? '上行' : '下行';
|
||||
} else if (!this.mapConfig.upRight) {
|
||||
this.standName = selected.right ? '下行' : '上行';
|
||||
}
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected, opts);
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.content {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
332
src/jmapNew/theme/datie_jd1a/menus/dialog/trainControl.vue
Normal file
332
src/jmapNew/theme/datie_jd1a/menus/dialog/trainControl.vue
Normal file
@ -0,0 +1,332 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm train-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item v-if="operation != '70c'" prop="sectionCode">
|
||||
<span slot="label">轨道</span>
|
||||
<el-input v-model="addModel.sectionCode" />
|
||||
</el-form-item>
|
||||
<el-form-item v-else prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车组号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item v-if="operation == '708'" prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" />
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="operation == '70c'" prop="targetCode">
|
||||
<span slot="label">目的地</span>
|
||||
<el-input v-model="addModel.targetCode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item v-if="operation == '708'" prop="trainCode">
|
||||
<span slot="label">序列号</span>
|
||||
<el-input v-model="addModel.trainCode" />
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="operation == '70c'" prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item v-if="operation == '70c'" prop="trainType">
|
||||
<span slot="label">运行模式</span>
|
||||
<br>
|
||||
<el-radio-group v-model="addModel.runningMode" style="margin-left: 15px;">
|
||||
<el-radio :label="'01'">普通</el-radio>
|
||||
<el-radio :label="'02'">专列</el-radio>
|
||||
<el-radio :label="'03'">不停站直达</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-train ref="confirmTrain" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import ConfirmTrain from './childDialog/confirmTrain';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainControl',
|
||||
components: {
|
||||
ConfirmTrain,
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
sectionCode: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
serviceNumber: '',
|
||||
targetCode: '',
|
||||
trainCode: '',
|
||||
runningMode: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
stationName: [
|
||||
{ required: true, message: '请输入车站', trigger: 'blur'}
|
||||
],
|
||||
sectionCode: [
|
||||
{ required: true, message: '请输入轨道', trigger: 'blur'}
|
||||
],
|
||||
trainWindowCode: [
|
||||
{ required: true, message: '请输入车次窗', trigger: 'blur'}
|
||||
],
|
||||
groupNumber: [
|
||||
{ required: true, message: '请选择车组号', trigger: 'change' }
|
||||
],
|
||||
serviceNumber: [
|
||||
{ required: true, message: '请输入服务号', trigger: 'blur'}
|
||||
],
|
||||
targetCode: [
|
||||
{ required: true, message: '请输入目的地号', trigger: 'blur'}
|
||||
],
|
||||
trainCode: [
|
||||
{ required: true, message: '请输入序列号', trigger: 'blur'}
|
||||
],
|
||||
runningMode: [
|
||||
{ required: true, message: '请选择运行模式', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
direction: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
|
||||
/* 设目的地*/
|
||||
return OperationEvent.Train.destinationTrainId.menu.domId;
|
||||
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation) {
|
||||
/* 设计划车*/
|
||||
return OperationEvent.Train.setPlanTrainId.menu.domId;
|
||||
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation) {
|
||||
/* 设人工车*/
|
||||
return OperationEvent.Train.artificialTrainId.menu.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
|
||||
return '设目的地车';
|
||||
} else if ( this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
|
||||
return '设计划车';
|
||||
} else if ( this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
|
||||
return '设人工车';
|
||||
}
|
||||
return '';
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.addModel = {
|
||||
tripNumber: '',
|
||||
groupNumber: '',
|
||||
trainType: '01',
|
||||
serviceNumber: '',
|
||||
targetCode: ''
|
||||
};
|
||||
/** 加载列车数据*/
|
||||
this.loadInitData(this.map);
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation ) {
|
||||
this.destinationTrainId();
|
||||
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
|
||||
this.setPlanTrainId();
|
||||
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
|
||||
this.artificialTrainId();
|
||||
}
|
||||
},
|
||||
// 设目的地车
|
||||
destinationTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Train.destinationTrainId.menu.operation,
|
||||
message: [`设目的地车:成功`],
|
||||
val: ''
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设计划车
|
||||
setPlanTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
|
||||
message: [`设计划车:成功`],
|
||||
val: ''
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设人工车
|
||||
artificialTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Train.artificialTrainId.menu.operation,
|
||||
message: [`设人工车:成功`],
|
||||
val: ''
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
133
src/jmapNew/theme/datie_jd1a/menus/dialog/trainCreate.vue
Normal file
133
src/jmapNew/theme/datie_jd1a/menus/dialog/trainCreate.vue
Normal file
@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="chengdou-03__systerm route-create" :title="title" :visible.sync="show" width="380px" label-position="top" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<el-form size="small" label-width="100px">
|
||||
<el-form-item label="列车:" prop="trainCode">
|
||||
<el-select v-model="trainCode" filterable placeholder="列车">
|
||||
<el-option
|
||||
v-for="item in trainList"
|
||||
:key="item.code"
|
||||
:label="item.groupNumber"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="列车方向:" prop="direction">
|
||||
<el-select v-model="direction" filterable placeholder="列车方向">
|
||||
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
|
||||
</el-select>
|
||||
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col style="text-align: right;">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteCreate',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
trainList: [],
|
||||
trainNoList: [],
|
||||
directionList: [
|
||||
{
|
||||
value: '2',
|
||||
label: '上行'
|
||||
},
|
||||
{
|
||||
value: '1',
|
||||
label: '下行'
|
||||
}
|
||||
],
|
||||
trainCode: '',
|
||||
tripNumber: '',
|
||||
direction: '',
|
||||
selected: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return OperationEvent.Section.newtrain.menu.domId;
|
||||
},
|
||||
title() {
|
||||
return '设置列车';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.dialogShow = true;
|
||||
this.selected = selected;
|
||||
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.trainCode = '';
|
||||
this.direction = '';
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
||||
cmdType: CMD.Section.CMD_NEW_TRAIN,
|
||||
val: '' + this.direction + '::' + this.trainCode
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
181
src/jmapNew/theme/datie_jd1a/menus/dialog/trainCreateNumber.vue
Normal file
181
src/jmapNew/theme/datie_jd1a/menus/dialog/trainCreateNumber.vue
Normal file
@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @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-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainCreateNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '新建车组号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.createTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
150
src/jmapNew/theme/datie_jd1a/menus/dialog/trainDelete.vue
Normal file
150
src/jmapNew/theme/datie_jd1a/menus/dialog/trainDelete.vue
Normal file
@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="90px" :model="addModel" :rules="rules">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import { getPublishMapTrainNos } from '@/api/runplan';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainDelete',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
groupNumber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除列车识别号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
// getPublishMapTrainNos(map.skinCode).then(response => {
|
||||
// this.trainNoList = response.data;
|
||||
// }).catch(() => {
|
||||
// this.$messageBox(`获取列车车组号失败`);
|
||||
// });
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.delTrainId.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
176
src/jmapNew/theme/datie_jd1a/menus/dialog/trainDeleteNumber.vue
Normal file
176
src/jmapNew/theme/datie_jd1a/menus/dialog/trainDeleteNumber.vue
Normal file
@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable disabled>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @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-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainDeleteNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:''
|
||||
},
|
||||
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除车组号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.deleteTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
378
src/jmapNew/theme/datie_jd1a/menus/dialog/trainDetailInfo.vue
Normal file
378
src/jmapNew/theme/datie_jd1a/menus/dialog/trainDetailInfo.vue
Normal file
@ -0,0 +1,378 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane :id="domIdBasicInfo" label="基本信息" name="first">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="groupNumber">
|
||||
<span slot="label">车组号</span>
|
||||
<el-input v-model="addModel.groupNumber" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="type">
|
||||
<span slot="label">服务类型</span>
|
||||
<el-input v-model="addModel.type" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainCode">
|
||||
<span slot="label">序列号</span>
|
||||
<el-input v-model="addModel.trainCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="driverCode">
|
||||
<span slot="label">司机号</span>
|
||||
<el-input v-model="addModel.driverCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="targetCode">
|
||||
<span slot="label">目的地号</span>
|
||||
<el-input v-model="addModel.targetCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="sectionCode">
|
||||
<span slot="label">轨道</span>
|
||||
<el-input v-model="addModel.sectionCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="nextStation">
|
||||
<span slot="label">下一站</span>
|
||||
<el-input v-model="addModel.nextStation" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="targetName">
|
||||
<span slot="label">目的地</span>
|
||||
<el-input v-model="addModel.targetName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="trackingMode">
|
||||
<span slot="label">跟踪模式</span>
|
||||
<el-input v-model="addModel.trackingMode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="runStatus">
|
||||
<span slot="label">运行状态</span>
|
||||
<el-input v-model="addModel.runStatus" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="departureTime">
|
||||
<span slot="label">出发时刻</span>
|
||||
<el-input v-model="addModel.departureTime" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="arrivedTime">
|
||||
<span slot="label">到达时刻</span>
|
||||
<el-input v-model="addModel.arrivedTime" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="planDeviation">
|
||||
<span slot="label">计划偏离</span>
|
||||
<el-input v-model="addModel.planDeviation" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdMarshalInfo" label="编组信息" name="second">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="marshallingNo">
|
||||
<span slot="label">编组号</span>
|
||||
<el-input v-model="addModel.marshallingNo" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="carNo1">
|
||||
<span slot="label">车头号1</span>
|
||||
<el-input v-model="addModel.carNo1" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="carNo2">
|
||||
<span slot="label">车头号2</span>
|
||||
<el-input v-model="addModel.carNo2" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table :data="tableData" style="width: 100%" height="250">
|
||||
<el-table-column prop="carriage" label="车厢" width="80" />
|
||||
<el-table-column prop="carriageNumber" label="车厢号" width="80" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdAtpInfo" label="ATP信息" name="third">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="trainId">
|
||||
<span slot="label">车载ID</span>
|
||||
<el-input v-model="addModel.trainId" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="directionType">
|
||||
<span slot="label">运行方向</span>
|
||||
<el-input v-model="addModel.directionType" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="drivingMode">
|
||||
<span slot="label">驾驶模式</span>
|
||||
<el-input v-model="addModel.drivingMode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="speed">
|
||||
<span slot="label">速度</span>
|
||||
<el-input v-model="addModel.speed" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stopQuasiState">
|
||||
<span slot="label">停准状态</span>
|
||||
<el-input v-model="addModel.stopQuasiState" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="doorStatus">
|
||||
<span slot="label">车门状态</span>
|
||||
<el-input v-model="addModel.doorStatus" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="runLevel">
|
||||
<span slot="label">运行等级</span>
|
||||
<el-input v-model="addModel.runLevel" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="stopState">
|
||||
<span slot="label">停跳状态</span>
|
||||
<el-input v-model="addModel.stopState" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="position">
|
||||
<span slot="label">车头位置</span>
|
||||
<el-input v-model="addModel.position" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="loadingRate">
|
||||
<span slot="label">载重率</span>
|
||||
<el-input v-model="addModel.loadingRate" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdCarAlarm" label="车辆报警" name="fourth" />
|
||||
</el-tabs>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="19">
|
||||
<el-button :id="domIdCancel" @click="cancel">退出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainDetailInfo',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName:'',
|
||||
groupNumber:'',
|
||||
type:'',
|
||||
serviceNumber:'',
|
||||
trainCode:'',
|
||||
driverCode:'',
|
||||
targetCode:'',
|
||||
sectionCode:'',
|
||||
nextStation:'',
|
||||
targetName:'',
|
||||
trackingMode:'',
|
||||
runStatus:'',
|
||||
departureTime:'',
|
||||
arrivedTime:'',
|
||||
planDeviation:'',
|
||||
marshallingNo:'',
|
||||
carNo1:'',
|
||||
carNo2:'',
|
||||
trainId:'',
|
||||
directionType:'',
|
||||
drivingMode:'',
|
||||
speed:'',
|
||||
stopQuasiState:'',
|
||||
doorStatus:'',
|
||||
runLevel:'',
|
||||
stopState:'',
|
||||
position:'',
|
||||
loadingRate:''
|
||||
},
|
||||
activeName:'first',
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tableData:[
|
||||
{carriage:'1', carriageNumber:'101'},
|
||||
{carriage:'2', carriageNumber:'102'},
|
||||
{carriage:'3', carriageNumber:'103'},
|
||||
{carriage:'4', carriageNumber:'104'},
|
||||
{carriage:'5', carriageNumber:'105'},
|
||||
{carriage:'6', carriageNumber:'106'}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdCarAlarm() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.carAlarm.domId : '';
|
||||
},
|
||||
domIdBasicInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.basicInfo.domId : '';
|
||||
},
|
||||
domIdMarshalInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.marshalInfo.domId : '';
|
||||
},
|
||||
domIdAtpInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.atpInfo.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '列车信息显示';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName:'',
|
||||
tripNumber: '',
|
||||
groupNumber:''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
handleClick() {
|
||||
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
174
src/jmapNew/theme/datie_jd1a/menus/dialog/trainEditNumber.vue
Normal file
174
src/jmapNew/theme/datie_jd1a/menus/dialog/trainEditNumber.vue
Normal file
@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-form-item>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="旧车组号" prop="oldGroupNumber">
|
||||
<el-select v-model="addModel.oldGroupNumber" filterable disabled>
|
||||
<el-option v-for="train in trainList" :key="train.oldGroupNumber" :label="train.oldGroupNumber" :value="train.oldGroupNumber" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item label="新车组号" prop="newGroupNumber">
|
||||
<el-select v-model="addModel.newGroupNumber">
|
||||
<el-option v-for="train in trainList" :key="train.newGroupNumber" :label="train.newGroupNumber" :value="train.newGroupNumber" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group-train">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @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-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainEditNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
oldGroupNumber: '',
|
||||
newGroupNumber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
newGroupNumber: [
|
||||
{ required: true, message: '请输入新车组号', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '修改车组号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
oldGroupNumber: '',
|
||||
newGroupNumber: ''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.editTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
200
src/jmapNew/theme/datie_jd1a/menus/dialog/trainMove.vue
Normal file
200
src/jmapNew/theme/datie_jd1a/menus/dialog/trainMove.vue
Normal file
@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="640px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="width: 46%;">
|
||||
<el-form-item label="车 组 号:" label-width="95px" prop="tripNumber">
|
||||
<el-input v-model="addModel.tripNumber" disabled />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="overflow: hidden;">
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;"
|
||||
>
|
||||
<span class="base-label">源车次窗</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandSource">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandSource" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 窗:" prop="trainSource">
|
||||
<el-input v-model="addModel.trainSource" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;"
|
||||
>
|
||||
<span class="base-label">目的车次窗</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 窗:" prop="trainGoal">
|
||||
<el-input v-model="addModel.trainGoal" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @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-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
tripNumber: '',
|
||||
trainSource: '',
|
||||
stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
tripNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandSource: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
],
|
||||
trainGoal: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '移动列车识别号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
193
src/jmapNew/theme/datie_jd1a/menus/dialog/trainMoveNumber.vue
Normal file
193
src/jmapNew/theme/datie_jd1a/menus/dialog/trainMoveNumber.vue
Normal file
@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="90px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable disabled>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="purposeStationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.purposeStationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="purposeTrainWindowCode">
|
||||
<span slot="label">目的车次窗</span>
|
||||
<el-input v-model="addModel.purposeTrainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @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-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainMoveNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
purposeStationName: '',
|
||||
purposeTrainWindowCode: ''
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '移动车组号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
purposeStationName: '',
|
||||
purposeTrainWindowCode: ''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
51
src/jmapNew/theme/datie_jd1a/menus/dialog/trainRoute.vue
Normal file
51
src/jmapNew/theme/datie_jd1a/menus/dialog/trainRoute.vue
Normal file
@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="fuzhou-01__systerm"
|
||||
title="列车进路办理"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div>{{ `请为进路${routeName}输入车次号:` }}</div>
|
||||
<el-input v-model="trainCode" size="small" />
|
||||
<div style="text-align: center;margin-top: 10px;">
|
||||
<el-button @click="commit">确定</el-button>
|
||||
<el-button @click="doClose">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'TrainRoute',
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
routeName: '',
|
||||
trainCode: ''
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
doClose() {
|
||||
this.show = false;
|
||||
this.$emit('routeCancel');
|
||||
},
|
||||
doShow(route) {
|
||||
this.show = true;
|
||||
this.routeName = route.name;
|
||||
},
|
||||
commit() {
|
||||
this.show = false;
|
||||
this.$emit('routeCommit', this.trainCode);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
181
src/jmapNew/theme/datie_jd1a/menus/dialog/trainSetPlan.vue
Normal file
181
src/jmapNew/theme/datie_jd1a/menus/dialog/trainSetPlan.vue
Normal file
@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm train-set-plan"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="11">车组号</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="addModel.groupNumber" size="mini" :disabled="true" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">服务号</el-col>
|
||||
<el-col :span="11" :offset="2">序列号</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input :id="domIdServerNoChange" v-model="addModel.serviceNumber" size="mini" />
|
||||
<div style="color:red;font-size:13px;margin-top:5px;">{{ messageTip1 }}</div>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input :id="domIdTrainNoChange" v-model="addModel.tripNumber" size="mini" />
|
||||
<div style="color:red;font-size:13px;margin-top:5px;">{{ messageTip2 }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'TrainSetPlan',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
messageTip1:'',
|
||||
messageTip2:'',
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
tripNumber: '',
|
||||
serviceNumber: ''
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdServerNoChange() {
|
||||
return this.dialogShow ? OperationEvent.Train.setPlanTrainId.serverNoChange.domId : '';
|
||||
},
|
||||
domIdTrainNoChange() {
|
||||
return this.dialogShow ? OperationEvent.Train.setPlanTrainId.trainNoChange.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '设置计划车';
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.dialogShow) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.$root.$emit('dialogOpen', selected);
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
// if (!this.dialogShow) {
|
||||
// }
|
||||
this.addModel.groupNumber = selected.groupNumber;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if (!this.addModel.serviceNumber) {
|
||||
this.messageTip1 = '请输入服务号';
|
||||
return;
|
||||
}
|
||||
if (!this.addModel.tripNumber) {
|
||||
this.messageTip1 = '';
|
||||
this.messageTip2 = '请输入序列号';
|
||||
return;
|
||||
}
|
||||
const params = {
|
||||
groupNumber: this.addModel.groupNumber,
|
||||
tripNumber: this.addModel.tripNumber,
|
||||
serviceNumber: this.addModel.serviceNumber
|
||||
};
|
||||
this.messageTip1 = '';
|
||||
this.messageTip2 = '';
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.TrainWindow.setPlanTrainId, params, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
/deep/ .el-row {
|
||||
margin: 10px
|
||||
}
|
||||
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
// background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
209
src/jmapNew/theme/datie_jd1a/menus/dialog/trainSwitch.vue
Normal file
209
src/jmapNew/theme/datie_jd1a/menus/dialog/trainSwitch.vue
Normal file
@ -0,0 +1,209 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="640px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="overflow: hidden;">
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px; margin-right: 4%;"
|
||||
>
|
||||
<span class="base-label">源车次窗</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item label="车 组 号:" prop="trainNumberSource">
|
||||
<el-input v-model="addModel.trainNumberSource" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="stationStandSource">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandSource" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 窗:" prop="trainSource">
|
||||
<el-input v-model="addModel.trainSource" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px;"
|
||||
>
|
||||
<span class="base-label">目的车次窗</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item label="车 组 号:" prop="trainNumberGoal">
|
||||
<el-input v-model="addModel.trainNumberGoal" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 窗:" prop="trainGoal">
|
||||
<el-input v-model="addModel.trainGoal" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @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-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainSwitch',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
trainNumberSource: '',
|
||||
trainSource: '',
|
||||
stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: '',
|
||||
trainNumberGoal: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
trainNumberSource: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandSource: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
],
|
||||
trainNumberGoal: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
],
|
||||
trainGoal: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '移动列车识别号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
155
src/jmapNew/theme/datie_jd1a/menus/dialog/updateTrip.vue
Normal file
155
src/jmapNew/theme/datie_jd1a/menus/dialog/updateTrip.vue
Normal file
@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm updateTrip"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="display: inline-block;margin-left:22px;">
|
||||
<span class="tripNumberName">车次号:</span>
|
||||
<div class="tripNumberClass">
|
||||
<el-input v-model="tripNumber" size="mini" @blur="handleTripNumber" />
|
||||
<div class="tripNumberTips">{{ messageTip1 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
export default {
|
||||
name: 'UpdateTrip',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow:false,
|
||||
tripNumber: '',
|
||||
messageTip1:'',
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.updateTrip.confirm.domId : '';
|
||||
},
|
||||
domIdChangeTripNumber() {
|
||||
return this.dialogShow ? OperationEvent.Train.updateTrip.changeTripNumber.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '修改车次号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, tripNumber) {
|
||||
this.tripNumber = tripNumber;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
handleTripNumber() {
|
||||
this.judgeTripNumber();
|
||||
},
|
||||
judgeTripNumber() {
|
||||
const figuresOfServiceMinNumber = 2;
|
||||
const figuresOfServiceMaxNumber = 6;
|
||||
// this.$store.state.map.mapConfig.figuresOfServiceNumber;
|
||||
const tripNumber = this.tripNumber;
|
||||
const judge = /^[a-zA-Z0-9]*[\d]$/.test(this.tripNumber);
|
||||
let result = false;
|
||||
if (judge) {
|
||||
if (tripNumber.toString().length > figuresOfServiceMaxNumber || tripNumber.toString().length < figuresOfServiceMinNumber) {
|
||||
this.messageTip1 = '车次号长度' + figuresOfServiceMinNumber + '-' + figuresOfServiceMaxNumber + '位';
|
||||
result = false;
|
||||
} else {
|
||||
this.messageTip1 = '';
|
||||
result = true;
|
||||
}
|
||||
} else {
|
||||
this.tripNumber = '';
|
||||
this.messageTip1 = '请输入车次号(最后一位数字)';
|
||||
}
|
||||
return result;
|
||||
},
|
||||
commit() {
|
||||
const result = this.judgeTripNumber();
|
||||
if (this.tripNumber && result) {
|
||||
const params = {
|
||||
tripNumber: this.tripNumber
|
||||
};
|
||||
this.messageTip1 = '';
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Train.updateTripCommit, params, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.tripNumber = '';
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.tripNumberClass{
|
||||
display: inline-block;
|
||||
width:140px
|
||||
}
|
||||
.tripNumberName{
|
||||
margin-left: 5px;
|
||||
height: 22px;
|
||||
vertical-align: top;
|
||||
margin-right:10px;
|
||||
display: inline-block;
|
||||
}
|
||||
.tripNumberTips{
|
||||
margin-top: 10px;
|
||||
color: #f00;
|
||||
font-size: 13px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
@ -1,19 +1,133 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<div v-if="isCtc" style="font-size: 14px;padding: 0 10px;background: #DEE3F3;line-height: 30px;position: absolute;width: 100%;z-index: 9;">{{ `哈尔滨局CTC3.0(车务终端A机)--王岗:${this.dateString}第一班 18:00 管理员代--` }}</div>
|
||||
<menu-bar v-if="isShowBar" ref="menuBar" :date-strin="dateString1" :selected="selected" />
|
||||
<div v-if="isCtc" style="position: absolute; top: 64px;z-index: 10;background: #F0F0F0;padding: 2px;height: 65px;width: 100%;">
|
||||
<div style="display: flex;">
|
||||
<img :src="ctcBarIcon1" class="img-box">
|
||||
<img :src="ctcBarIcon2" class="img-box">
|
||||
<img :src="ctcBarIcon3" class="img-box">
|
||||
<img :src="ctcBarIcon4" class="img-box">
|
||||
<img :src="ctcBarIcon5" class="img-box">
|
||||
<img :src="ctcBarIcon6" class="img-box">
|
||||
<img :src="ctcBarIcon7" class="img-box">
|
||||
<img :src="ctcBarIcon8" class="img-box">
|
||||
<img :src="ctcBarIcon9" class="img-box">
|
||||
<img :src="ctcBarIcon10" class="img-box">
|
||||
<img :src="ctcBarIcon11" class="img-box">
|
||||
<img :src="ctcBarIcon12" class="img-box">
|
||||
<img :src="ctcBarIcon13" class="img-box">
|
||||
<img :src="ctcBarIcon14" class="img-box">
|
||||
<img :src="ctcBarIcon15" class="img-box">
|
||||
<img :src="ctcBarIcon16" class="img-box">
|
||||
<img :src="ctcBarIcon17" class="img-box">
|
||||
<img :src="ctcBarIcon18" class="img-box" @click="handleRunplan">
|
||||
</div>
|
||||
<div style="display: flex;padding: 2px;border-top: 2px solid #D1D1D1;margin-top: 3px">
|
||||
<div class="img-box" :class="{flicker: hasCommandMsg, redFlick: hasCommandMsg}" style="width: 100px;height: 25px;line-height: 21px;text-align: center;" @click="showCmdManage">调度命令</div>
|
||||
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;" />
|
||||
<div id="stageRunplanOut" class="img-box" @click="stageRunplan">阶段计划</div>
|
||||
<div class="img-box" style="width: 100px;height: 25px;line-height: 21px;text-align: center;margin-left: 5px;">阶段记事</div>
|
||||
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">{{ dateString1 + ' ' + time }}</div>
|
||||
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">同步站机通信中断</div>
|
||||
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">与中心通信正常</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="$store.state.training.prdType == '01'&& !isCtc" style="width: 1405px;position: fixed;height: 30px;background: #808080;z-index: 9;bottom: 0;left: 0;display: flex;">
|
||||
<div style="width: 60%;height: 30px;line-height: 30px;text-align: center;">提示信息窗</div>
|
||||
<div style="width: 40%;height: 30px;line-height: 30px;text-align: center;border-left: 2px #ccc solid;">{{ '操控A:主机' + ' ' + dateString + ' ' + time }}</div>
|
||||
</div>
|
||||
<!-- <div v-if="!isCtc && isDispStation" class="goDispatcherLoger">
|
||||
<el-button size="small" @click="goDispatcherLoger">行车日志</el-button>
|
||||
</div> -->
|
||||
<menu-button v-if="!isCtc" ref="menuButton" :selected="selected" />
|
||||
<menu-button-ctc v-if="isCtc" ref="menuButtonCtc" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
<runplan-pane v-if="isCtc" ref="runplanPane" />
|
||||
<!-- <dispatcher-loger v-if="isDispStation" ref="dispatcherLoger" /> -->
|
||||
<bottom-table ref="bottomTable" />
|
||||
<menu-panel v-if="isCtc" ref="menuPanel" />
|
||||
<stage-runplan v-if="isCtc" ref="stageRunplan" @closeFlash="closeStageFlash" @noticeInfo="noticeInfo" />
|
||||
<notice-info v-if="isCtc" ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<cmdManage v-if="isCtc" ref="cmdManage" />
|
||||
<signedCmd v-if="isCtc" ref="signedCmd" @signedCmdClose="signedCmdClose" @changeSignedStatus="changeSignedStatus" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { mapGetters, mapState } from 'vuex';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuButton from './menuButton';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuBar from './menuBar';
|
||||
import MenuButtonCtc from './menuButtonCtc';
|
||||
import RunplanPane from './runplanPane';
|
||||
import StageRunplan from './dialog/stageRunplan';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
// import DispatcherLoger from './dispatcherLoger';
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import BottomTable from './bottomTable';
|
||||
import MenuPanel from './menuPanel';
|
||||
import CtcBarIcon1 from '@/assets/ctc_icon/pic1.png';
|
||||
import CtcBarIcon2 from '@/assets/ctc_icon/pic2.png';
|
||||
import CtcBarIcon3 from '@/assets/ctc_icon/pic3.png';
|
||||
import CtcBarIcon4 from '@/assets/ctc_icon/pic4.png';
|
||||
import CtcBarIcon5 from '@/assets/ctc_icon/pic5.png';
|
||||
import CtcBarIcon6 from '@/assets/ctc_icon/pic6.png';
|
||||
import CtcBarIcon7 from '@/assets/ctc_icon/pic7.png';
|
||||
import CtcBarIcon8 from '@/assets/ctc_icon/pic8.png';
|
||||
import CtcBarIcon9 from '@/assets/ctc_icon/pic9.png';
|
||||
import CtcBarIcon10 from '@/assets/ctc_icon/pic10.png';
|
||||
import CtcBarIcon11 from '@/assets/ctc_icon/pic11.png';
|
||||
import CtcBarIcon12 from '@/assets/ctc_icon/pic12.png';
|
||||
import CtcBarIcon13 from '@/assets/ctc_icon/pic13.png';
|
||||
import CtcBarIcon14 from '@/assets/ctc_icon/pic14.png';
|
||||
import CtcBarIcon15 from '@/assets/ctc_icon/pic15.png';
|
||||
import CtcBarIcon16 from '@/assets/ctc_icon/pic16.png';
|
||||
import CtcBarIcon17 from '@/assets/ctc_icon/pic17.png';
|
||||
import CtcBarIcon18 from '@/assets/ctc_icon/pic18.png';
|
||||
import cmdManage from '@/views/dispatcherStationManage/cmdManage.vue';
|
||||
import signedCmd from '@/views/dispatcherStationManage/signedCmd.vue';
|
||||
|
||||
export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
MenuButton,
|
||||
MenuSignal,
|
||||
MenuSwitch
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
MenuStationStand,
|
||||
MenuStation,
|
||||
MenuTrain,
|
||||
PassiveAlarm,
|
||||
PassiveContorl,
|
||||
PassiveTimeout,
|
||||
MenuButtonCtc,
|
||||
RunplanPane,
|
||||
StageRunplan,
|
||||
NoticeInfo,
|
||||
// DispatcherLoger,
|
||||
BottomTable,
|
||||
MenuPanel,
|
||||
cmdManage,
|
||||
signedCmd
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -23,15 +137,742 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentRailwaySimulationRunplan:{},
|
||||
alarmMessages: [
|
||||
{ id: 1, message: '这是告警信息一' },
|
||||
{ id: 2, message: '这是告警信息二' },
|
||||
{ id: 3, message: '这是告警信息三' },
|
||||
{ id: 4, message: '这是告警信息四' },
|
||||
{ id: 5, message: '这是告警信息五' },
|
||||
{ id: 6, message: '这是告警信息六' },
|
||||
{ id: 7, message: '这是告警信息七' }
|
||||
],
|
||||
warningMessages: [
|
||||
{ id: 1, message: '这是预警信息一' },
|
||||
{ id: 2, message: '这是预警信息二' },
|
||||
{ id: 3, message: '这是预警信息三' },
|
||||
{ id: 4, message: '这是预警信息四' },
|
||||
{ id: 5, message: '这是预警信息五' },
|
||||
{ id: 6, message: '这是预警信息六' },
|
||||
{ id: 7, message: '这是预警信息七' }
|
||||
],
|
||||
time: '00:00:00',
|
||||
dateString: '',
|
||||
dateString1: '',
|
||||
ctcBarIcon1: CtcBarIcon1,
|
||||
ctcBarIcon2: CtcBarIcon2,
|
||||
ctcBarIcon3: CtcBarIcon3,
|
||||
ctcBarIcon4: CtcBarIcon4,
|
||||
ctcBarIcon5: CtcBarIcon5,
|
||||
ctcBarIcon6: CtcBarIcon6,
|
||||
ctcBarIcon7: CtcBarIcon7,
|
||||
ctcBarIcon8: CtcBarIcon8,
|
||||
ctcBarIcon9: CtcBarIcon9,
|
||||
ctcBarIcon10: CtcBarIcon10,
|
||||
ctcBarIcon11: CtcBarIcon11,
|
||||
ctcBarIcon12: CtcBarIcon12,
|
||||
ctcBarIcon13: CtcBarIcon13,
|
||||
ctcBarIcon14: CtcBarIcon14,
|
||||
ctcBarIcon15: CtcBarIcon15,
|
||||
ctcBarIcon16: CtcBarIcon16,
|
||||
ctcBarIcon17: CtcBarIcon17,
|
||||
ctcBarIcon18: CtcBarIcon18
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('config', [
|
||||
'width'
|
||||
])
|
||||
]),
|
||||
...mapState('socket', [
|
||||
'dispatchCommandMsg'
|
||||
]),
|
||||
hasCommandMsg() {
|
||||
let status = false;
|
||||
if (this.dispatchCommandMsg.body) {
|
||||
status = true;
|
||||
}
|
||||
return status;
|
||||
},
|
||||
isShowBar() {
|
||||
return this.$store.state.training.prdType === '02' || this.$route.query.ctc;
|
||||
},
|
||||
isCtc() {
|
||||
return this.$route.query.ctc;
|
||||
},
|
||||
isDispStation() {
|
||||
return this.$route.query.dispatcherStation;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
isShowBar(val) {
|
||||
val && this.$store.dispatch('config/updateMenuBar');
|
||||
},
|
||||
'$store.state.socket.simulationTimeSync': function (time) { // 仿真时间更新
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
|
||||
const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
|
||||
this.initDate(date);
|
||||
},
|
||||
'$store.state.socket.railwaySimulationRunplanSendChange': function (val) {
|
||||
if (this.isCtc) {
|
||||
this.getRailwaySimulationRunplanSend();
|
||||
}
|
||||
},
|
||||
'$store.state.training.roleDeviceCode': function (val) {
|
||||
if (this.isCtc) {
|
||||
this.getRailwaySimulationRunplanSend();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('config/updateMenuBar');
|
||||
const _that = this;
|
||||
window.onclick = function (e) {
|
||||
if (!_that.$store.state.training.trainingStart) {
|
||||
_that.$refs.menuBar && _that.$refs.menuBar.blankClickClose();
|
||||
}
|
||||
_that.$refs.menuStationStand.doClose();
|
||||
_that.$refs.menuSwitch.doClose();
|
||||
_that.$refs.menuSignal.doClose();
|
||||
_that.$refs.menuSection.doClose();
|
||||
_that.$refs.menuTrain.doClose();
|
||||
_that.$refs.menuStation.doClose();
|
||||
};
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.onclick = function (e) {};
|
||||
},
|
||||
methods: {
|
||||
changeSignedStatus(info) {
|
||||
this.isCtc && this.$refs.cmdManage.changeSignedStatus(info);
|
||||
},
|
||||
signedCmdClose() {
|
||||
this.isCtc && this.$refs.cmdManage.doShow();
|
||||
},
|
||||
showCmdManage() {
|
||||
if (!this.isCtc) { return; }
|
||||
if (this.hasCommandMsg) {
|
||||
this.$refs.signedCmd.doShow();
|
||||
} else {
|
||||
this.$refs.cmdManage.doShow();
|
||||
}
|
||||
},
|
||||
getRailwaySimulationRunplanSend() {
|
||||
const stationCode = this.$store.state.training.roleDeviceCode;
|
||||
const railwaySimulationRunplanSendMap = this.$store.state.socket.railwaySimulationRunplanSendMap;
|
||||
if (railwaySimulationRunplanSendMap[stationCode] && railwaySimulationRunplanSendMap[stationCode].dataList.length > 0) {
|
||||
// 阶段计划
|
||||
document.getElementById('stageRunplanOut').classList.add('active');
|
||||
this.currentRailwaySimulationRunplan = railwaySimulationRunplanSendMap;
|
||||
} else {
|
||||
const sendRunplan = document.getElementById('stageRunplanOut').className;
|
||||
document.getElementById('stageRunplanOut').className = sendRunplan.replace('active', '');
|
||||
}
|
||||
},
|
||||
initDate(date) {
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}:${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
const years = date.getFullYear() + '';
|
||||
let months = date.getMonth() + 1 + '';
|
||||
let dates = date.getDate() + '';
|
||||
if (months.length < 2) { months = '0' + months; }
|
||||
if (dates.length < 2) { dates = '0' + dates; }
|
||||
this.dateString = years + months + dates;
|
||||
this.dateString1 = years + '年' + months + '月' + dates + '日';
|
||||
},
|
||||
handleRunplan() {
|
||||
this.$refs.runplanPane.doShow();
|
||||
},
|
||||
stageRunplan() {
|
||||
if (document.getElementById('stageRunplanOut').className.includes('active')) {
|
||||
const stationCode = this.$store.state.training.roleDeviceCode;
|
||||
this.$refs.stageRunplan.doShow(this.currentRailwaySimulationRunplan[stationCode]);
|
||||
}
|
||||
},
|
||||
noticeInfo() {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
},
|
||||
closeStageFlash() {
|
||||
const sendRunplan = document.getElementById('stageRunplanOut').className;
|
||||
document.getElementById('stageRunplanOut').className = sendRunplan.replace('active', '');
|
||||
const stationCode = this.$store.state.training.roleDeviceCode;
|
||||
this.$store.dispatch('socket/deleteRailwaySimulationRunplan', stationCode);
|
||||
}
|
||||
// goDispatcherLoger() {
|
||||
// this.$refs.dispatcherLoger.doShow();
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.redFlick {
|
||||
background: red;
|
||||
}
|
||||
@keyframes fade {
|
||||
from {
|
||||
opacity: 1.0;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.2;
|
||||
}
|
||||
to {
|
||||
opacity: 1.0;
|
||||
}
|
||||
}
|
||||
.flicker {
|
||||
animation: fade 600ms infinite;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.menus .pop-menu {
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
||||
.menus .pop-menu span {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.menus .pop-menu .is-disabled span {
|
||||
color: #B4B3B8;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog {
|
||||
background: #0055E8;
|
||||
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
|
||||
border: 1px solid rgb(69, 134, 247);
|
||||
border-radius: 6px;
|
||||
font-size: 13px !important;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog span {
|
||||
font-size: 13px !important;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog span .el-icon-arrow-up{
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__footer {
|
||||
background: #ECE9D8;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__body {
|
||||
padding: 20px;
|
||||
margin: 0px 3px 3px;
|
||||
border: 2px solid rgba(120, 121, 123, 0.5);
|
||||
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
|
||||
background: #ECE9D8;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__title {
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 7px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn {
|
||||
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
|
||||
border: 1px solid #fff;
|
||||
border-radius: 4px;
|
||||
top: 6px;
|
||||
right: 3px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-button {
|
||||
height: 24px;
|
||||
line-height: 22px;
|
||||
padding: 0px;
|
||||
width: 80px;
|
||||
border: 2px outset #E2E2E2;
|
||||
border-radius: 4px !important;
|
||||
color: #000;
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .expand {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-button:focus span {
|
||||
border: 1px dashed gray;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-button:active {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-button:disabled {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-button:disabled span {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-input {
|
||||
border: 2px inset #E9E9E9;
|
||||
height: 22px !important;
|
||||
line-height: 22px !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-input__inner {
|
||||
color: #000;
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
border-radius: 0px !important;
|
||||
box-sizing: border-box;
|
||||
height: 22px !important;
|
||||
line-height: 22px !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-input.is-disabled .el-input__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-textarea {
|
||||
border: 2px inset #E9E9E9;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-textarea .el-textarea__inner {
|
||||
color: #000;
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
border-radius: 0px !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table--border th.gutter {
|
||||
background: #EBEADB !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table {
|
||||
border: 2px inset #E9E9E9;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table .cell {
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table th.is-leaf {
|
||||
background: #F0F0F0 !important;
|
||||
border-right: 1px solid #BDBDBD !important;
|
||||
border-bottom: 1px solid #BDBDBD !important;
|
||||
color: #000 !important;
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table tr td {
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table .el-table__empty-text {
|
||||
top: 15px !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .current-row>td {
|
||||
background: #3399FF !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox__inner {
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox__label {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
|
||||
background: #E6E6E6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
|
||||
color: #C5C9CC !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
|
||||
background: #fff !important;
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
|
||||
position: absolute;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
content: "";
|
||||
border: 1px solid #000;
|
||||
border-left: 0;
|
||||
border-top: 0;
|
||||
height: 7px;
|
||||
left: 4px;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio__inner {
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio__label {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
|
||||
background: #fff !important;
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
border-radius: 100%;
|
||||
background-color: #000 !important;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
|
||||
background: #E6E6E6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
|
||||
color: #C5C9CC !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -15px;
|
||||
top: -18px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-form-item label {
|
||||
font-weight: normal !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
.fuzhou-01__systerm .el-dialog {
|
||||
background: rgba(100, 100, 100, 0.3);
|
||||
border: 2px solid rgb(144, 144, 144, 0.8);
|
||||
border-radius: 6px;
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-dialog__header {
|
||||
padding: 5px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-dialog__footer {
|
||||
background: #F0F0F0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
margin: 0px 5px 5px;
|
||||
border: 2px solid rgba(120, 121, 123, 0.5);
|
||||
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
|
||||
background: #F0F0F0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-dialog__title {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
color: #000;
|
||||
border-radius: 4px;
|
||||
padding: 0px 2px;
|
||||
height: 20px;
|
||||
line-height: 20px
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-dialog__title::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
-webkit-filter: blur(10px);
|
||||
filter: blur(10px);
|
||||
height: 20px;
|
||||
width: -webkit-fill-available;
|
||||
background: rgba(128, 128, 128, 0.8);
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-dialog__headerbtn {
|
||||
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
|
||||
border: 1px solid #fff;
|
||||
border-radius: 4px;
|
||||
top: 4px;
|
||||
right: 5px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-button {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
padding: 0px;
|
||||
width: 80px;
|
||||
border: 2px outset #E2E2E2;
|
||||
border-radius: 0px !important;
|
||||
color: #000;
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-button:focus span {
|
||||
border: 1px dashed gray;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-button:active {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-button:disabled {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-button:disabled span {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-input {
|
||||
border: 2px inset #E9E9E9;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-input .el-input__inner {
|
||||
color: #000;
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
border-radius: 0px !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-textarea {
|
||||
border: 2px inset #E9E9E9;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-textarea .el-textarea__inner {
|
||||
color: #000;
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
border-radius: 0px !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-table {
|
||||
border: 2px inset #E9E9E9;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-table .cell {
|
||||
line-height: unset !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-table th.is-leaf {
|
||||
background: #F0F0F0 !important;
|
||||
border-right: 1px solid #BDBDBD !important;
|
||||
border-bottom: 1px solid #BDBDBD !important;
|
||||
color: #000 !important;
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-table tr td {
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-table .el-table__empty-text {
|
||||
top: 15px !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .current-row>td {
|
||||
background: #3399FF !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-checkbox__inner {
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-checkbox__label {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
|
||||
background: #E6E6E6 !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
|
||||
color: #C5C9CC !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
|
||||
background: #fff !important;
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
|
||||
position: absolute;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
content: "";
|
||||
border: 1px solid #000;
|
||||
border-left: 0;
|
||||
border-top: 0;
|
||||
height: 7px;
|
||||
left: 4px;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-radio__inner {
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-radio__label {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
|
||||
background: #fff !important;
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
border-radius: 100%;
|
||||
background-color: #000 !important;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
|
||||
background: #E6E6E6 !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
|
||||
color: #C5C9CC !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .base-label {
|
||||
background: rgb(240 240 240);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-form-item label {
|
||||
font-weight: normal !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .context {
|
||||
height: 100px;
|
||||
border: 2px inset #E2E2E2;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .table {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .notice {
|
||||
margin-left: 62px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .button-group {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.img-box{
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border: 2px #ccc outset;
|
||||
margin-top: 0;
|
||||
background: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
.img-box:active{
|
||||
border: 2px #ccc inset;
|
||||
}
|
||||
.img-box:hover{
|
||||
border: 2px #ccc inset;
|
||||
}
|
||||
#stageRunplanOut{
|
||||
width: 100px;height: 25px;line-height: 21px;text-align: center;margin-left: 100px;
|
||||
}
|
||||
#stageRunplanOut.active{
|
||||
animation:changeColor 1s infinite;
|
||||
-moz-animation:changeColor 1s infinite; /* Firefox */
|
||||
-webkit-animation:changeColor 1s infinite; /* Safari and Chrome */
|
||||
}
|
||||
@keyframes changeColor
|
||||
{
|
||||
0% {background:#f0f0f0;}
|
||||
50% {background:#ff1900;}
|
||||
100% {background:#f0f0f0;}
|
||||
}
|
||||
@-moz-keyframes changeColor /* Firefox */
|
||||
{
|
||||
0% {background:#f0f0f0;}
|
||||
50% {background:#ff1900;}
|
||||
100% {background:#f0f0f0;}
|
||||
}
|
||||
@-webkit-keyframes changeColor /* Safari and Chrome */
|
||||
{
|
||||
0% {background:#f0f0f0;}
|
||||
50% {background:#ff1900;}
|
||||
100% {background:#f0f0f0;}
|
||||
}
|
||||
</style>
|
||||
|
335
src/jmapNew/theme/datie_jd1a/menus/menuBar.vue
Normal file
335
src/jmapNew/theme/datie_jd1a/menus/menuBar.vue
Normal file
@ -0,0 +1,335 @@
|
||||
<template>
|
||||
<div id="menuBarChengdu3">
|
||||
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%;" :style="{ top: top }" />
|
||||
<station-control-convert ref="stationControlConvert" />
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-name ref="viewName" />
|
||||
<train-add ref="trainAdd" />
|
||||
<train-transtalet ref="trainTranstalet" />
|
||||
<train-delete ref="trainDelete" />
|
||||
<manage-user ref="manageUser" />
|
||||
<help-about ref="helpAbout" />
|
||||
<set-limit-speed ref="setLimitSpeed" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuBar from '@/jmapNew/theme/components/menus/menuBar';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import StationControlConvert from './menuDialog/stationControlConvert';
|
||||
import TrainAdd from './menuDialog/trainAdd';
|
||||
import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
import TrainDelete from './menuDialog/trainDelete';
|
||||
import PasswordBox from './menuDialog/passwordBox';
|
||||
import ViewName from './menuDialog/viewName';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
import SetLimitSpeed from './menuDialog/setLimitSpeed';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'MenuBarChengdu03',
|
||||
components: {
|
||||
MenuBar,
|
||||
StationControlConvert,
|
||||
PasswordBox,
|
||||
ViewName,
|
||||
TrainAdd,
|
||||
TrainTranstalet,
|
||||
TrainDelete,
|
||||
ManageUser,
|
||||
HelpAbout,
|
||||
SetLimitSpeed
|
||||
},
|
||||
props: {
|
||||
dateString: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
title: '登录',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '登录',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '注销',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '退出',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '工具栏',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '标准按钮',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '签收栏',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示系统信息窗口',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示进路序列管理窗口',
|
||||
click: this.bottomTableShowOrHidden
|
||||
},
|
||||
{
|
||||
title: '显示信号员计划表',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示信号员注意事项',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '站场图',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '行车日志',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// title: '车站定位',
|
||||
// operate: '',
|
||||
// children: [
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
title: '工具',
|
||||
// operate: OperationEvent.Command.mBar.view,
|
||||
operate: '',
|
||||
hide: true,
|
||||
children: [
|
||||
{
|
||||
title: '调度命令管理',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '甩挂车作业',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车编组(速报表)',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '站存车(现存车)',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列控命令',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '车站直接限速',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '运统46',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '站场图回放',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列控区间占用逻辑检查',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '更新数据',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车固定径路',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '用户管理',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '选项',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
type: '时钟显示',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '调试',
|
||||
operate: '',
|
||||
children: []
|
||||
},
|
||||
{
|
||||
title: '窗口',
|
||||
operate: '',
|
||||
children: []
|
||||
},
|
||||
{
|
||||
title: '帮助',
|
||||
operate: '',
|
||||
children: []
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
title: '登录(L)',
|
||||
operate: '',
|
||||
children: []
|
||||
},
|
||||
{
|
||||
title: '应用程序(T)',
|
||||
operate: '',
|
||||
children: []
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
top() {
|
||||
return this.$store.state.training.prdType === '02' ? '0' : '30px';
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.menuNormal['Center'][3].children = this.initStationList();
|
||||
},
|
||||
methods: {
|
||||
initStationList() {
|
||||
const list = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.visible) {
|
||||
const node = {
|
||||
title: station.name,
|
||||
operate: station.code,
|
||||
show: true,
|
||||
click: this.mapLocation,
|
||||
code: station.code
|
||||
};
|
||||
|
||||
list.push(node);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(code) {
|
||||
if (code) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: code });
|
||||
}
|
||||
},
|
||||
// 关于
|
||||
about(order) {
|
||||
const operate = {
|
||||
operation: order.operate
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.helpAbout.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
getLoginResult(operate) {
|
||||
/** 密码校验*/
|
||||
if (operate.operation == OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation) {
|
||||
if (operate.success) {
|
||||
/** 校验成功*/
|
||||
this.$refs.stationControlConvert.doShow({ operation: OperationEvent.StationControl.forcedStationControl.mbar.operation });
|
||||
}
|
||||
}
|
||||
},
|
||||
setLimitSpeed(order) {
|
||||
const operate = {
|
||||
operation: order.operate
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.setLimitSpeed.doShow(operate, true);
|
||||
}
|
||||
});
|
||||
},
|
||||
blankClickClose() {
|
||||
this.$refs.menuBar.doClose();
|
||||
},
|
||||
cancleLimitSpeed(order) {
|
||||
const operate = {
|
||||
operation: order.operate
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.setLimitSpeed.doShow(operate, false);
|
||||
}
|
||||
});
|
||||
},
|
||||
bottomTableShowOrHidden() {
|
||||
EventBus.$emit('bottomTableShowOrHidden');
|
||||
},
|
||||
undeveloped() {
|
||||
this.$refs.menuBar.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
#menuBarChengdu3{
|
||||
line-height:30px;
|
||||
}
|
||||
#menuBarChengdu3 #menuBar .menu-li-block .label{
|
||||
padding: 0px 30px 0px 5px !important;
|
||||
}
|
||||
.img-box{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
</style>
|
878
src/jmapNew/theme/datie_jd1a/menus/menuButton.vue
Normal file
878
src/jmapNew/theme/datie_jd1a/menus/menuButton.vue
Normal file
@ -0,0 +1,878 @@
|
||||
<template>
|
||||
<div v-if="isShowBtn" id="menuButtons_box" class="menu menuButton" style="height: 35px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
|
||||
<button :id="Station.stationMasterLock.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor: xGuideMasterLock? guideColorDown: guideColorUp}" @click="guideLockRightButtonDown()">
|
||||
<span style="color: #800000">
|
||||
<center><b>X引导总锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<!--<button :id="Station.guideLock.button.domId" style="cursor: not-allowed;" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Station.guideLock.button.operation, ['GuideLock'])">-->
|
||||
<!--<!–<span style="color: #800000">–>-->
|
||||
<!--<span style="color: #808080">-->
|
||||
<!--<center><b>坡道解锁</b></center>-->
|
||||
<!--</span>-->
|
||||
<!--</button>-->
|
||||
<button :id="MixinCommand.totalCancel.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.totalCancel.button.operation, ['Signal','SignalButton'])">
|
||||
<span style="color: black">
|
||||
<center><b>总取消</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.humanTrainRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['Signal','SignalButton'])">
|
||||
<span style="color: #800000">
|
||||
<center><b>总人解</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Section.fault.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Section.fault.button.operation, ['Section'])">
|
||||
<span style="color: #800000">
|
||||
<center><b>区故解</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.locate.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.locate.button.operation, ['Switch'])">
|
||||
<span style="color: black">
|
||||
<center><b>总定位</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.reverse.button.domId" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown(Switch.reverse.button.operation, ['Switch'])">
|
||||
<span style="color: black">
|
||||
<center><b>总反位</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Command.cancel.clearMbm.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Command.cancel.clearMbm.operation)">
|
||||
<span style="color: black">
|
||||
<center><b>清除</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.lock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.lock.button.operation, ['Switch'])">
|
||||
<span style="color: black">
|
||||
<center><b>单锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.unlock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.unlock.button.operation, ['Switch'])">
|
||||
<span style="color: black">
|
||||
<center><b>单解</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.lock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.lock.button.operation, ['Signal', 'SignalButton'])">
|
||||
<span style="color: black">
|
||||
<center><b>按钮封锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.unlock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.unlock.button.operation, ['Signal', 'SignalButton'])">
|
||||
<span style="color: black">
|
||||
<center><b>按钮解封</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.block.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.block.button.operation, ['Switch'])">
|
||||
<span style="color: black">
|
||||
<center><b>道岔封锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.unblock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.unblock.button.operation, ['Switch'])">
|
||||
<span style="color: black">
|
||||
<center><b>道岔解封</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<!--<button :id="Signal.signalLight.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalLight.menuButton.operation, ['Signal'])">-->
|
||||
<!--<span style="color: black">-->
|
||||
<!--<center><b>点灯</b></center>-->
|
||||
<!--</span>-->
|
||||
<!--</button>-->
|
||||
<!--<button :id="Signal.signalDestroy.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalDestroy.menuButton.operation, ['Signal'])">-->
|
||||
<!--<span style="color:#800000">-->
|
||||
<!--<center><b>灭灯</b></center>-->
|
||||
<!--</span>-->
|
||||
<!--</button>-->
|
||||
<button :id="Station.stationMasterLock.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor: sGuideMasterLock? guideColorDown: guideColorUp}" @click="guideLockLeftButtonDown()">
|
||||
<span style="color: #800000">
|
||||
<center><b>S引导总锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Station.powerUnLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="powerOnUnlock()">
|
||||
<!--<span style="color: #800000">-->
|
||||
<span style="color:black">
|
||||
<center><b>上电解锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :disabled="true" style="cursor: not-allowed;" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown()">
|
||||
<!--<span style="color: black">-->
|
||||
<span style="color: #808080">
|
||||
<center><b>辅助菜单</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Section.defectiveShunting.button.domId" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown(Section.defectiveShunting.button.operation, ['Section'])">
|
||||
<!--<span style="color: #800000">-->
|
||||
<span style="color: black">
|
||||
<center><b>分路不良</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :disabled="true" style="cursor: not-allowed;" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown()">
|
||||
<!--<span style="color: black">-->
|
||||
<span style="color: #808080">
|
||||
<center><b>标记窗</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<!--<button class="button_box" :style="{width: width + 'px', backgroundColor:buttonUpColor}" @click="buttonDown()">-->
|
||||
<!--<span style="color: #800000">-->
|
||||
<!--<center><b>故障通知</b></center>-->
|
||||
<!--</span>-->
|
||||
<!--</button>-->
|
||||
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<defective-shunting ref="defectiveShunting" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import DefectiveShunting from './dialog/defectiveShunting.vue';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { MouseEvent } from '@/scripts/ConstDic';
|
||||
// import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'MapButtonMenu',
|
||||
components: {
|
||||
PasswordBox,
|
||||
DefectiveShunting,
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// point: {
|
||||
// x: 0,
|
||||
// y: 30
|
||||
// },
|
||||
operation: '0',
|
||||
buttonName: '',
|
||||
guideColorDown: '#FEEE1A',
|
||||
guideColorUp: '#DCDCDC',
|
||||
buttonDownColor: '#FEEE1A',
|
||||
buttonUpColor: '#DCDCDC',
|
||||
width: 78,
|
||||
tempData: null,
|
||||
offset: {},
|
||||
commandTypeList: [],
|
||||
cmdTypeList: [],
|
||||
deviceList: [],
|
||||
timeNode: 0, // 按钮 15秒 计时
|
||||
deviceTimeNode: 0, // 信号按钮设备15秒 计时
|
||||
routeDataMap: null, // btnCodeList 为key
|
||||
routeButtonCodeList: [], // btnCodeList 拼接code list
|
||||
guideLockRightFlag: false,
|
||||
guideLockLeftFlag: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'routeList',
|
||||
'routeData',
|
||||
'signalList',
|
||||
'autoReentryList',
|
||||
'autoReentryData'
|
||||
]),
|
||||
point() {
|
||||
return this.$store.state.training.prdType == '01' ? {x:0, y:30} : {x:0, y:0};
|
||||
},
|
||||
Switch() {
|
||||
return OperationEvent.Switch;
|
||||
},
|
||||
Section() {
|
||||
return OperationEvent.Section;
|
||||
},
|
||||
Station() {
|
||||
return OperationEvent.Station;
|
||||
},
|
||||
Signal() {
|
||||
return OperationEvent.Signal;
|
||||
},
|
||||
CTCCommand() {
|
||||
return OperationEvent.CTCCommand;
|
||||
},
|
||||
MixinCommand() {
|
||||
return OperationEvent.MixinCommand;
|
||||
},
|
||||
Command() {
|
||||
return OperationEvent.Command;
|
||||
},
|
||||
sGuideMasterLock() {
|
||||
return this.$store.state.map.stationSGuideMasterLock;
|
||||
},
|
||||
xGuideMasterLock() {
|
||||
return this.$store.state.map.stationXGuideMasterLock;
|
||||
},
|
||||
isShowBtn() {
|
||||
return this.$store.state.training.prdType == '01' || this.$store.state.training.prdType == '10';
|
||||
},
|
||||
CMD() {
|
||||
return CMD;
|
||||
},
|
||||
cmdType() {
|
||||
switch (this.operation) {
|
||||
case this.Switch.lock.button.operation: // 道岔单锁
|
||||
return CMD.Switch.CMD_SWITCH_SINGLE_LOCK;
|
||||
case this.Switch.unlock.button.operation: // 道岔解锁
|
||||
return CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK;
|
||||
case this.Switch.locate.button.operation: // 道岔定位
|
||||
return CMD.Switch.CMD_SWITCH_NORMAL_POSITION;
|
||||
case this.Switch.reverse.button.operation: // 道岔反位
|
||||
return CMD.Switch.CMD_SWITCH_REVERSE_POSITION;
|
||||
case this.Switch.block.button.operation: // 道岔封锁
|
||||
return CMD.Switch.CMD_SWITCH_BLOCK;
|
||||
case this.Switch.unblock.button.operation:
|
||||
return CMD.Switch.CMD_SWITCH_UNBLOCK;
|
||||
case this.Section.fault.button.operation: // 区故解
|
||||
return CMD.Section.CMD_SECTION_FAULT_UNLOCK;
|
||||
case this.Signal.humanTrainRoute.button.operation: // 总人解 (取消引导进路)
|
||||
return CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
case this.Signal.arrangementRoute.button.operation: // 排列进路
|
||||
return CMD.Signal.CMD_SIGNAL_SET_ROUTE;
|
||||
case this.Signal.guide.button.operation: // 办理引导
|
||||
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||
this.updateButtonShow(val, old);
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function (val) {
|
||||
this.selectedChange();
|
||||
},
|
||||
'$store.state.map.clearButtonCount': function(val) {
|
||||
this.commandTypeList = [];
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
this.clearOperate();
|
||||
this.guideLockRightFlag = false;
|
||||
this.guideLockLeftFlag = false;
|
||||
},
|
||||
'$store.state.socket.simulationTimeSync': function (val) {
|
||||
if (this.timeNode && val - this.timeNode >= 15) {
|
||||
this.clearOperate();
|
||||
}
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15) {
|
||||
if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'SignalButton') {
|
||||
this.$store.dispatch('training/updateMapState', [{code: this.deviceList[0].code, _type: 'SignalButton', hasSelected: 0}]);
|
||||
} else if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'Signal' && this.deviceList[0].type === 'SHUNTING') {
|
||||
this.$store.dispatch('training/updateMapState', [{code: this.deviceList[0].code, _type: 'Signal', hasSelected: 0}]);
|
||||
}
|
||||
this.deviceList = [];
|
||||
}
|
||||
},
|
||||
'$store.state.map.showCentralizedStationCode': function(val) {
|
||||
if (val) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](val);
|
||||
this.$store.getters['map/checkStationGuideMaster'](station.code, station.sGuideMasterLock, station.xGuideMasterLock);
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.routeDataMap = null;
|
||||
this.routeButtonCodeList = [];
|
||||
},
|
||||
methods: {
|
||||
// 输入密码正确回调
|
||||
passWordCommit(data) {
|
||||
let operate = {};
|
||||
if (data.nextCmdType) {
|
||||
operate = {
|
||||
over: true,
|
||||
operation: data.operation,
|
||||
cmdType: data.nextCmdType,
|
||||
param: data.param
|
||||
};
|
||||
} else {
|
||||
operate = {
|
||||
operationPre: data.operation,
|
||||
operation: data.operateNext
|
||||
};
|
||||
}
|
||||
this.trainingOperation(operate);
|
||||
},
|
||||
// 执行操作
|
||||
trainingOperation(operate) {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
/* 引导总锁输入面后 处理按钮选中状态 */
|
||||
if (operate.operationPre === this.Switch.guideLock.leftButton.operation || operate.operation === this.Switch.guideLock.leftButton.operation) {
|
||||
this.guideLockLeftFlag = !this.guideLockLeftFlag;
|
||||
} else if (operate.operationPre === this.Switch.guideLock.rightButton.operation || operate.operation === this.Switch.guideLock.rightButton.operation) {
|
||||
this.guideLockRightFlag = !this.guideLockRightFlag;
|
||||
}
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
updateButtonShow(val, old) {
|
||||
if (old) {
|
||||
// 恢复旧按钮显示
|
||||
const domId = OperationHandler.getDomIdByOperation(old);
|
||||
const dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = false;
|
||||
dom.style.backgroundColor = this.buttonUpColor;
|
||||
this.$refs.password.doClose();
|
||||
}
|
||||
}
|
||||
if (val) {
|
||||
// 新按钮按下效果
|
||||
const domId = OperationHandler.getDomIdByOperation(val);
|
||||
const dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = true;
|
||||
dom.style.backgroundColor = this.buttonDownColor;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 上电解锁 大铁线路
|
||||
powerOnUnlock() {
|
||||
const operate = {
|
||||
over:true,
|
||||
operation:this.Station.powerUnLock.button.operation,
|
||||
cmdType:CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
|
||||
code:this.$store.state.map.showCentralizedStationCode,
|
||||
param:{stationCode: this.$store.state.map.showCentralizedStationCode}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.clearOperate();
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 分路不良
|
||||
handelDefectiveShunting(model) {
|
||||
// CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING;
|
||||
const {switchSection, code, shuntingTypeList} = model;
|
||||
this.clearOperate();
|
||||
this.$refs.defectiveShunting.doShow({switchSection, code, shuntingTypeList});
|
||||
},
|
||||
// S引导总锁按钮点击
|
||||
guideLockLeftButtonDown() {
|
||||
const operate = {
|
||||
operation: this.Station.stationMasterLock.leftButton.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
// 引导总锁弹出 调用取消引导总锁指令
|
||||
operate.nextCmdType = this.sGuideMasterLock ? CMD.Station.CMD_STATION_MASTER_UNLOCK : CMD.Station.CMD_STATION_MASTER_LOCK;
|
||||
operate.param = {throat: 'S', stationCode: this.$store.state.map.showCentralizedStationCode};
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// X引导总锁按钮点击
|
||||
guideLockRightButtonDown() {
|
||||
const operate = {
|
||||
operation: this.Station.stationMasterLock.rightButton.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
// 引导总锁弹出 调用取消引导总锁指令
|
||||
operate.nextCmdType = this.xGuideMasterLock ? CMD.Station.CMD_STATION_MASTER_UNLOCK : CMD.Station.CMD_STATION_MASTER_LOCK;
|
||||
operate.param = {throat: 'X', stationCode: this.$store.state.map.showCentralizedStationCode};
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
buttonDown(operation, commandTypeList) {
|
||||
this.clearOperate();
|
||||
if (operation != this.Command.cancel.clearMbm.operation) {
|
||||
const operate = {
|
||||
operation: operation
|
||||
};
|
||||
// 以下 会弹出密码框 (总人解,区故解) 铅封按钮
|
||||
const operationList = [this.Signal.humanTrainRoute.button.operation, this.Section.fault.button.operation, this.Section.defectiveShunting.button.operation];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.operation = operation;
|
||||
this.commandTypeList = commandTypeList;
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// 判断是否需要 弹窗密码框
|
||||
if (operationList.includes(operation)) {
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
this.timeNode = this.$store.state.socket.simulationTimeSync;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 清除按钮
|
||||
const operate = {
|
||||
start: true,
|
||||
operation: operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.commandTypeList = [];
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
this.guideLockRightFlag = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 解析进路数据
|
||||
handleRouteDataMap() {
|
||||
this.routeDataMap = {};
|
||||
this.routeButtonCodeList = [];
|
||||
this.routeList.forEach(item => {
|
||||
const name = item.btnCodeList.join('-');
|
||||
this.routeDataMap[name] = item;
|
||||
this.routeButtonCodeList.push(name);
|
||||
});
|
||||
},
|
||||
// 校验已点击的信号按钮code 是否有符合条件的进路
|
||||
checkHaveRoute(deviceList) {
|
||||
let name = '';
|
||||
deviceList.forEach((device, index) =>{
|
||||
name = name + (index ? '-' : '') + device.code;
|
||||
});
|
||||
return this.routeButtonCodeList.some(item => item.includes(name));
|
||||
},
|
||||
// 排列进路 OR 信号重开操作
|
||||
arrangementRouteOperation(deviceList) {
|
||||
const operate = {
|
||||
operation: this.Signal.arrangementRoute.button.operation
|
||||
};
|
||||
if (!this.routeDataMap) { this.handleRouteDataMap(); }
|
||||
|
||||
if (!this.checkHaveRoute(deviceList)) { // 无效的进路按钮选择 清除deviceList
|
||||
this.$message.error('无效的进路按钮');
|
||||
this.clearOperate();
|
||||
return;
|
||||
}
|
||||
this.deviceTimeNode = this.$store.state.socket.simulationTimeSync;
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](deviceList[0].signalCode || deviceList[0].code);// deviceList[0] 为 SignalButton || Signal
|
||||
if (deviceList.length === 1 && !signal.lockedRouteCode) { // 排列进路 处理始端信号机状态
|
||||
operate.code = deviceList[0].code;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
// 仅信号按钮调车信号机有状态
|
||||
if (deviceList[0]._type === 'SignalButton' || (deviceList[0]._type === 'Signal' && deviceList[0].type === 'SHUNTING')) {
|
||||
this.$store.dispatch('training/updateMapState', [{code: deviceList[0].code, _type: deviceList[0]._type, hasSelected: 1}]);
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else if (deviceList.length === 1 && signal.lockedRouteCode) { // 信号重开
|
||||
operate.operation = this.Signal.reopenSignal.button.operation;
|
||||
operate.over = true;
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
|
||||
operate.code = signal.code;
|
||||
operate.param = {signalCode: signal.code};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {
|
||||
this.clearOperate();
|
||||
}).catch(() => this.$refs.noticeInfo.doShow() );
|
||||
} else if (deviceList.length > 1) {
|
||||
let key = '';
|
||||
deviceList.forEach((item, index) => {
|
||||
key = key + (index ? '-' : '') + item.code;
|
||||
});
|
||||
const route = this.routeDataMap[key];
|
||||
if (route) {
|
||||
operate.over = true;
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
|
||||
operate.code = deviceList[deviceList.length - 1].code;
|
||||
operate.param = {routeCode: route.code};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.deviceTimeNode = 0;
|
||||
}).catch(() => {
|
||||
this.deviceTimeNode = 0;
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}).finally(() => { this.clearOperate(); });
|
||||
}
|
||||
}
|
||||
},
|
||||
// 总取消
|
||||
handelTotalCancel(model) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
|
||||
param: {
|
||||
signalCode: model._type === 'Signal' ? model.code : model.signalCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.clearOperate();
|
||||
}).catch((error) => {
|
||||
this.clearOperate();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 引导信号
|
||||
handleGuideSignal(model) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.Signal.guide.button.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||
param: {signalCode: model.signalCode}
|
||||
};
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode);
|
||||
// 信号机引导时间15s以内再次点击引导不需要进行密码输入
|
||||
if (signal.guideTime) {
|
||||
this.sendCommand(operate);
|
||||
} else {
|
||||
operate.nextCmdType = CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
},
|
||||
// 人解进路
|
||||
handleTotalHumanSolution(model) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
val: model.code,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
};
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code);
|
||||
if (model._type === 'SignalButton' && model.type === 'PICK') {
|
||||
operate.param = {signalCode: model.signalCode};
|
||||
this.sendCommand(operate);
|
||||
} else if (model._type === 'Signal' && model.type === 'SHUNTING') {
|
||||
operate.param = {signalCode: model.code};
|
||||
this.sendCommand(operate);
|
||||
}
|
||||
},
|
||||
handelSwitchOperate(model) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: this.cmdType,
|
||||
param: { switchCode: model.code}
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 发送指令
|
||||
sendCommand(operate) {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}).finally(() =>{ this.clearOperate(); });
|
||||
},
|
||||
// 校验是否有列车(接车)按钮
|
||||
checkHasTrainButton(model) {
|
||||
if (model.signalButtonList && model.signalButtonList.length > 0) {
|
||||
let flag = false;
|
||||
model.signalButtonList.forEach(item => {
|
||||
const signalButton = this.$store.getters['map/getDeviceByCode'](item);
|
||||
flag = flag || signalButton.type === 'PICK';
|
||||
});
|
||||
return flag;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
handelSignalBlockOrUnblock(model) {
|
||||
const buttonOperation = this.$store.state.menuOperation.buttonOperation;
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: buttonOperation,
|
||||
cmdType: '',
|
||||
param: {}
|
||||
};
|
||||
if (model._type === 'Signal' && !this.checkHasTrainButton(model)) {
|
||||
if (buttonOperation === this.Signal.lock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
|
||||
operate.param = {signalCode: model.code};
|
||||
} else if (buttonOperation === this.Signal.unlock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
|
||||
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 = {signalCode: model.signalCode};
|
||||
} else if (buttonOperation === this.Signal.unlock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
|
||||
operate.param = {signalCode: model.signalCode};
|
||||
}
|
||||
}
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
handleGuideLock(model) {
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode);
|
||||
if (signal && (this.guideLockRightFlag && signal.right) || (this.guideLockLeftFlag && !signal.right)) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.guideLockRightFlag ? this.Switch.guideLock.rightButton : this.Switch.guideLock.leftButton,
|
||||
nextCmdType: CMD.Switch.CMD_SWITCH_MASTER_LOCK,
|
||||
param: {signalCode: model.signalCode}
|
||||
};
|
||||
// 信号机引导时间15s以内再次点击引导不需要进行密码输入
|
||||
if (signal.guideTime) {
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_MASTER_LOCK;
|
||||
this.sendCommand(operate);
|
||||
} else {
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}
|
||||
},
|
||||
handelFaultSection(model) {
|
||||
if (model._type === 'Section') {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
||||
param: {sectionCode: model.code}
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
}
|
||||
},
|
||||
// CHANGE_DIRECTION
|
||||
selectedChange() {
|
||||
// 按钮按下时
|
||||
const model = this.selected; // 选择设备
|
||||
if ((this.$store.state.training.prdType != '01' && this.$store.state.training.prdType != '10') || this.selected._event !== MouseEvent.Left || (!model._type && !model._code)) {
|
||||
return;
|
||||
}
|
||||
const buttonOperation = this.$store.state.menuOperation.buttonOperation;
|
||||
const switchOperation = [
|
||||
this.Switch.lock.button.operation,
|
||||
this.Switch.unlock.button.operation,
|
||||
this.Switch.locate.button.operation,
|
||||
this.Switch.reverse.button.operation,
|
||||
this.Switch.block.button.operation,
|
||||
this.Switch.unblock.button.operation
|
||||
];
|
||||
if ((this.guideLockLeftFlag || this.guideLockRightFlag) && model._type === 'SignalButton' && model.type === 'GUIDE') {
|
||||
this.handleGuideLock(model);
|
||||
} else if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
||||
if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
||||
this.handelTotalCancel(model);
|
||||
} else if (buttonOperation === this.Signal.humanTrainRoute.button.operation) {
|
||||
this.handleTotalHumanSolution(model);
|
||||
} else if (switchOperation.includes(buttonOperation)) {
|
||||
this.handelSwitchOperate(model);
|
||||
} else if (buttonOperation === this.Signal.lock.button.operation || buttonOperation === this.Signal.unlock.button.operation) {
|
||||
this.handelSignalBlockOrUnblock(model);
|
||||
} else if (buttonOperation === this.Section.fault.button.operation) {
|
||||
this.handelFaultSection(model);
|
||||
} else if (buttonOperation === this.Section.defectiveShunting.button.operation) {
|
||||
this.handelDefectiveShunting(model);
|
||||
} else {
|
||||
this.clearOperate();
|
||||
}
|
||||
} else if (!buttonOperation) {
|
||||
const signalButtonList = ['ASSIST', 'CHANGE_DIRECTION', 'PICK_ASSIST', 'DEPART_ASSIST', 'OCCLUSION', 'RECOVERY', 'ACCIDENT'];
|
||||
if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) && model.type === 'GUIDE' ) {
|
||||
this.handleGuideSignal(model);
|
||||
} else if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) {
|
||||
// 改方操作 总辅助操作 接辅助操作 发辅助操作
|
||||
this.assistOperateOrChange(model);
|
||||
} else if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) || (model._type === 'Signal' && !model.blockade)) {
|
||||
this.deviceList.push(model);
|
||||
this.arrangementRouteOperation(this.deviceList);
|
||||
} else {
|
||||
this.clearOperate();
|
||||
}
|
||||
} else { this.clearOperate(); }
|
||||
if (this.timeNode) { this.timeNode = 0; }
|
||||
},
|
||||
checkSignalBlock(code) { // 校验信号是否锁闭
|
||||
if (code) {
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return signal && signal.blockade;
|
||||
} else { return false; }
|
||||
},
|
||||
clearOperate() { // 清除操作
|
||||
this.deviceList && this.deviceList.length && this.$store.dispatch('training/updateMapState', [{code: this.deviceList[0].code, _type: this.deviceList[0]._type, hasSelected: 0}]);
|
||||
this.deviceList = [];
|
||||
Handler.clear(); // 清空操作组
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
},
|
||||
assistOperateOrChange(model) {
|
||||
// mode.type==
|
||||
const modelTypeMap = {
|
||||
// 总辅助按钮
|
||||
'ASSIST':{
|
||||
operation:this.CTCCommand.assistPressMainAssist.menu.operation,
|
||||
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_MAIN_ASSIST,
|
||||
param:{
|
||||
labelEnum:model.labelEnum,
|
||||
stationCode:model.stationCode,
|
||||
pressDown:model.pressDown ? 0 : 1 // 1按下、0弹起
|
||||
}
|
||||
},
|
||||
// 改方
|
||||
'CHANGE_DIRECTION':{
|
||||
operation:this.CTCCommand.assistPressDownTurnDirection.menu.operation,
|
||||
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION,
|
||||
param:{
|
||||
labelEnum:model.labelEnum,
|
||||
stationCode:model.stationCode,
|
||||
pressDown:model.pressDown ? 0 : 1 // 1按下、0弹起
|
||||
}
|
||||
},
|
||||
// 接辅助按钮
|
||||
'PICK_ASSIST':{
|
||||
// this.CTCCommand.assistPressDownTurnDirection.menu.operation
|
||||
operation:this.CTCCommand.assistPressReceiveAssist.menu.operation,
|
||||
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_RECEIVE_ASSIST,
|
||||
param:{
|
||||
labelEnum:model.labelEnum,
|
||||
stationCode:model.stationCode
|
||||
}
|
||||
},
|
||||
// 发辅助按钮
|
||||
'DEPART_ASSIST':{
|
||||
operation:this.CTCCommand.assistPressDeliverAssist.menu.operation,
|
||||
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_DELIVER_ASSIST,
|
||||
param:{
|
||||
labelEnum:model.labelEnum,
|
||||
stationCode:model.stationCode
|
||||
}
|
||||
},
|
||||
// 事故按钮
|
||||
'ACCIDENT':{
|
||||
operation:this.CTCCommand.assistPressAccident.menu.operation,
|
||||
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_ACCIDENT,
|
||||
param:{
|
||||
labelEnum:model.labelEnum,
|
||||
stationCode:model.stationCode
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
const noPasswordModelTypeMap = {
|
||||
// 闭塞按钮
|
||||
'OCCLUSION':{
|
||||
operation:this.CTCCommand.assistPressBlock.menu.operation,
|
||||
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_BLOCK,
|
||||
param:{
|
||||
labelEnum:model.labelEnum,
|
||||
stationCode:model.stationCode
|
||||
}
|
||||
},
|
||||
// 复原按钮
|
||||
'RECOVERY':{
|
||||
operation:this.CTCCommand.assistPressRestore.menu.operation,
|
||||
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_RESTORE,
|
||||
param:{
|
||||
labelEnum:model.labelEnum,
|
||||
stationCode:model.stationCode
|
||||
}
|
||||
}
|
||||
};
|
||||
if (noPasswordModelTypeMap[model.type]) {
|
||||
const operate = {
|
||||
over:true,
|
||||
operation: noPasswordModelTypeMap[model.type].operation,
|
||||
code: model.code,
|
||||
param: noPasswordModelTypeMap[model.type].param,
|
||||
cmdType : noPasswordModelTypeMap[model.type].nextCmdType
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.clearOperate();
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
|
||||
} else {
|
||||
const operate = {
|
||||
operation: modelTypeMap[model.type].operation,
|
||||
code: model.code,
|
||||
param: modelTypeMap[model.type].param
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
operate.nextCmdType = modelTypeMap[model.type].nextCmdType;
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
// const operate = {
|
||||
// over: true,
|
||||
// code: model.code,
|
||||
// operation: this.CTCCommand.assistPressDownTurnDirection.menu.operation,
|
||||
// cmdType: CMD.CTC.CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION,
|
||||
// param: {
|
||||
// labelEnum:model.labelEnum,
|
||||
// stationCode:model.stationCode
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
// // this.clearOperate();
|
||||
// }).catch((error) => {
|
||||
// // this.clearOperate();
|
||||
// console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
// });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
$bg: #fff;
|
||||
$hoverBg: #FEEE1A;
|
||||
.button_box{
|
||||
display: block;
|
||||
float: left;
|
||||
font-size: 13px;
|
||||
height: 35px;
|
||||
}
|
||||
.menu {
|
||||
background-color: $bg;
|
||||
position: fixed;
|
||||
border: 1px solid gray;
|
||||
z-index: 10;
|
||||
display: block;
|
||||
|
||||
.dsp-block {
|
||||
display: block;
|
||||
text-align: center;
|
||||
border-radius: unset;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dsp-block:hover {
|
||||
background-color: $hoverBg;
|
||||
}
|
||||
}
|
||||
</style>
|
827
src/jmapNew/theme/datie_jd1a/menus/menuButtonCtc.vue
Normal file
827
src/jmapNew/theme/datie_jd1a/menus/menuButtonCtc.vue
Normal file
@ -0,0 +1,827 @@
|
||||
<template>
|
||||
<div v-if="isShowBtn" id="menuButtons_box" class="menu menuButton" style="height: 35px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
|
||||
<button :id="Signal.arrangementRoute.button.domId" class="button_box" @click="buttonDown(Signal.arrangementRoute.button.operation, ['Signal','SignalButton'])">
|
||||
<span :style="{ color: operation === Signal.arrangementRoute.button.operation ? '#ccc':'black'}">
|
||||
<center><b>进</b><b>路</b></center>
|
||||
<center><b>建</b><b>立</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="MixinCommand.totalCancel.button.domId" class="button_box" @click="buttonDown(MixinCommand.totalCancel.button.operation, ['Signal','SignalButton'])">
|
||||
<span :style="{color: operation === MixinCommand.totalCancel.button.operation ? '#ccc': 'black'}">
|
||||
<center><b>总</b></center>
|
||||
<center><b>取</b><b>消</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.reopenSignal.button.domId" class="button_box" @click="buttonDown(Signal.reopenSignal.button.operation, ['Signal'])">
|
||||
<span :style="{color: operation === Signal.reopenSignal.button.operation ? '#ccc': 'black'}">
|
||||
<center><b>信</b><b>号</b></center>
|
||||
<center><b>重</b><b>开</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.guide.button.domId" class="button_box" @click="buttonDown(Signal.guide.button.operation, ['SignalButton'])">
|
||||
<span :style="{color: operation === Signal.guide.button.operation? '#ccc':'#800000'}">
|
||||
<center><b>引</b><b>导</b></center>
|
||||
<center><b>按</b><b>钮</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Station.guideLock.button.domId" :disabled="true" class="button_box" @click="buttonDown(Station.guideLock.button.operation, ['Button'])">
|
||||
<span :style="{color: operation === Station.guideLock.button.operation?'#ccc':'#800000'}">
|
||||
<center><b>引</b><b>导</b></center>
|
||||
<center><b>总</b><b>锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.humanTrainRoute.button.domId" class="button_box" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['Signal'])">
|
||||
<span :style="{color: operation === Signal.humanTrainRoute.button.operation ? '#ccc':'#800000'}">
|
||||
<center><b>总</b></center>
|
||||
<center><b>人</b><b>解</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.locate.button.domId" class="button_box" @click="buttonDown(Switch.locate.button.operation, ['Switch'])">
|
||||
<span :style="{color: operation === Switch.locate.button.operation? '#ccc':'black'}">
|
||||
<center><b>道</b><b>岔</b></center>
|
||||
<center><b>总</b><b>定</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.reverse.button.domId" class="button_box" @click="buttonDown(Switch.reverse.button.operation, ['Switch'])">
|
||||
<span :style="{color: operation === Switch.reverse.button.operation? '#ccc':'black'}">
|
||||
<center><b>道</b><b>岔</b></center>
|
||||
<center><b>总</b><b>反</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.lock.button.domId" class="button_box" @click="buttonDown(Switch.lock.button.operation, ['Switch'])">
|
||||
<span :style="{color: operation === Switch.lock.button.operation ? '#ccc':'black'}">
|
||||
<center><b>道</b><b>岔</b></center>
|
||||
<center><b>单</b><b>锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.unlock.button.domId" class="button_box" @click="buttonDown(Switch.unlock.button.operation, ['Switch'])">
|
||||
<span :style="{color: operation === Switch.unlock.button.operation ? '#ccc':'black'}">
|
||||
<center><b>道</b><b>岔</b></center>
|
||||
<center><b>解</b><b>锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="MixinCommand.block.button.domId" class="button_box" @click="buttonDown(MixinCommand.lock.button.operation, ['Switch', 'Signal'])">
|
||||
<span :style="{color: operation === MixinCommand.block.button.operation ? '#ccc':'black'}">
|
||||
<center><b>封</b><b>锁</b></center>
|
||||
<center><b>按</b><b>钮</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="MixinCommand.functionButton.button.domId" class="button_box" @click="buttonDown(MixinCommand.functionButton.button.operation, ['StationStand', 'Station'])">
|
||||
<span :style="{color: operation === MixinCommand.functionButton.button.operation ? '#ccc':'black'}">
|
||||
<center><b>功</b><b>能</b></center>
|
||||
<center><b>按</b><b>钮</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="111" class="button_box" @click="buttonDown()">
|
||||
<span style="color: black;">
|
||||
<center><b>坡</b><b>道</b></center>
|
||||
<center><b>解</b><b>锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="222" :disabled="true" class="button_box" @click="buttonDown()">
|
||||
<span style="color: black;">
|
||||
<center><b>分</b><b>路</b></center>
|
||||
<center><b>不</b><b>良</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Command.cancel.clearMbm.domId" class="button_box" @click="commandClear">
|
||||
<span style="color: black;">
|
||||
<center><b>命</b><b>令</b></center>
|
||||
<center><b>清</b><b>除</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="333" class="button_box" @click="commandOrders">
|
||||
<span style="color: black;">
|
||||
<center><b>命</b><b>令</b></center>
|
||||
<center><b>下</b><b>达</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="444" class="button_box" @click="buttonDown()">
|
||||
<span style="color: black;">
|
||||
<center><b>状</b><b>态</b></center>
|
||||
<center><b>选</b><b>择</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="555" class="button_box" @click="buttonDown()">
|
||||
<span style="color: black;">
|
||||
<center><b>模</b><b>式</b></center>
|
||||
<center><b>转</b><b>换</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<train-route ref="trainRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" />
|
||||
<shunt-route ref="shuntRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import TrainRoute from './dialog/trainRoute.vue';
|
||||
import ShuntRoute from './dialog/shuntRoute.vue';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { MouseEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'MapButtonMenu',
|
||||
components: {
|
||||
// CenterConfig,
|
||||
PasswordBox,
|
||||
NoticeInfo,
|
||||
PopMenu,
|
||||
TrainRoute,
|
||||
ShuntRoute
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
point: {
|
||||
x: 0,
|
||||
y: 0
|
||||
},
|
||||
operation: '',
|
||||
buttonName: '',
|
||||
guideColorDown: '#FEEE1A',
|
||||
guideColorUp: '#DCDCDC',
|
||||
buttonDownColor: '#FBFBFB',
|
||||
buttonUpColor: '#F0F0F0',
|
||||
width: 45,
|
||||
tempData: null,
|
||||
offset: {},
|
||||
commandTypeList: [],
|
||||
menuSignal: null,
|
||||
cmdTypeList: [],
|
||||
deviceList: [],
|
||||
timeNode: 0, // 按钮 15秒 计时
|
||||
deviceTimeNode: 0, // 信号按钮设备15秒 计时
|
||||
routeDataMap: null, // btnCodeList 为key
|
||||
routeButtonCodeList: [], // btnCodeList 拼接code list
|
||||
menu: [
|
||||
{
|
||||
label: '命令下达',
|
||||
handler: this.commandOrders
|
||||
},
|
||||
{
|
||||
label: '命令清除',
|
||||
handler: this.commandClear
|
||||
}
|
||||
],
|
||||
switchOperation: [],
|
||||
route: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'routeList',
|
||||
'routeData',
|
||||
'signalList',
|
||||
'autoReentryList',
|
||||
'autoReentryData'
|
||||
]),
|
||||
Switch() {
|
||||
return OperationEvent.Switch;
|
||||
},
|
||||
Section() {
|
||||
return OperationEvent.Section;
|
||||
},
|
||||
Station() {
|
||||
return OperationEvent.Station;
|
||||
},
|
||||
Signal() {
|
||||
return OperationEvent.Signal;
|
||||
},
|
||||
CTCCommand() {
|
||||
return OperationEvent.CTCCommand;
|
||||
},
|
||||
MixinCommand() {
|
||||
return OperationEvent.MixinCommand;
|
||||
},
|
||||
Command() {
|
||||
return OperationEvent.Command;
|
||||
},
|
||||
isShowBtn() {
|
||||
return this.$store.state.training.prdType == '01' || this.$store.state.training.prdType == '10';
|
||||
},
|
||||
CMD() {
|
||||
return CMD;
|
||||
},
|
||||
cmdType() {
|
||||
switch (this.operation) {
|
||||
case this.Switch.lock.button.operation: // 道岔单锁
|
||||
return CMD.Switch.CMD_SWITCH_SINGLE_LOCK;
|
||||
case this.Switch.unlock.button.operation: // 道岔解锁
|
||||
return CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK;
|
||||
case this.Switch.locate.button.operation: // 道岔定位
|
||||
return CMD.Switch.CMD_SWITCH_NORMAL_POSITION;
|
||||
case this.Switch.reverse.button.operation: // 道岔反位
|
||||
return CMD.Switch.CMD_SWITCH_REVERSE_POSITION;
|
||||
case this.Switch.block.button.operation: // 道岔封锁
|
||||
return CMD.Switch.CMD_SWITCH_BLOCK;
|
||||
case this.Switch.unblock.button.operation:
|
||||
return CMD.Switch.CMD_SWITCH_UNBLOCK;
|
||||
case this.Section.fault.button.operation: // 区故解
|
||||
return CMD.Section.CMD_SECTION_FAULT_UNLOCK;
|
||||
case this.Signal.humanTrainRoute.button.operation: // 总人解 (取消引导进路)
|
||||
return CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
case this.Signal.arrangementRoute.button.operation: // 排列进路
|
||||
return CMD.Signal.CMD_SIGNAL_SET_ROUTE;
|
||||
case this.Signal.guide.button.operation: // 办理引导
|
||||
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||
this.updateButtonShow(val, old);
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function (val) {
|
||||
this.selectedChange();
|
||||
},
|
||||
'$store.state.map.clearButtonCount': function(val) {
|
||||
this.commandTypeList = [];
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
this.clearOperate();
|
||||
},
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.$refs && this.$refs.popMenu && this.$refs.popMenu.resetShowPosition(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.$refs && this.$refs.popMenu && this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationTimeSync': function (val) {
|
||||
if (this.timeNode && val - this.timeNode >= 15) {
|
||||
this.clearOperate();
|
||||
}
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15) {
|
||||
if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'SignalButton') {
|
||||
this.$store.dispatch('training/updateMapState', [{code: this.deviceList[0].code, _type: 'SignalButton', hasSelected: 0}]);
|
||||
} else if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'Signal' && this.deviceList[0].type === 'SHUNTING') {
|
||||
this.$store.dispatch('training/updateMapState', [{code: this.deviceList[0].code, _type: 'Signal', hasSelected: 0}]);
|
||||
}
|
||||
this.deviceList = [];
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.routeDataMap = null;
|
||||
this.routeButtonCodeList = [];
|
||||
},
|
||||
mounted() {
|
||||
EventBus.$on('arrangementRouteMenu', (signal) => {
|
||||
this.clearOperate();
|
||||
this.buttonDown(this.Signal.arrangementRoute.button.operation, ['Signal', 'SignalButton']);
|
||||
if (signal.signalButtonList && signal.signalButtonList.length) {
|
||||
const deviceCode = signal.signalButtonList.find(buttonCode => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](buttonCode);
|
||||
return device.type === 'PICK';
|
||||
});
|
||||
this.deviceList.push(this.$store.getters['map/getDeviceByCode'](deviceCode));
|
||||
}
|
||||
this.menuSignal = signal;
|
||||
this.arrangementRouteOperation(this.deviceList, this.menuSignal);
|
||||
});
|
||||
this.buttonDown(this.Signal.arrangementRoute.button.operation, ['Signal', 'SignalButton']);
|
||||
this.switchOperation = [
|
||||
this.Switch.lock.button.operation,
|
||||
this.Switch.unlock.button.operation,
|
||||
this.Switch.locate.button.operation,
|
||||
this.Switch.reverse.button.operation,
|
||||
this.Switch.block.button.operation,
|
||||
this.Switch.unblock.button.operation
|
||||
];
|
||||
EventBus.$on('setMenuButtonPosition', (offset) => {
|
||||
this.point.y = offset;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 输入密码正确回调
|
||||
passWordCommit(data) {
|
||||
let operate = {};
|
||||
if (data.nextCmdType) {
|
||||
operate = {
|
||||
over: true,
|
||||
operation: data.operation,
|
||||
cmdType: data.nextCmdType,
|
||||
param: data.param
|
||||
};
|
||||
} else {
|
||||
operate = {
|
||||
operationPre: data.operation,
|
||||
operation: data.operateNext
|
||||
};
|
||||
}
|
||||
this.trainingOperation(operate);
|
||||
},
|
||||
// 执行操作
|
||||
trainingOperation(operate) {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
updateButtonShow(val, old) {
|
||||
if (old) {
|
||||
// 恢复旧按钮显示
|
||||
const domId = OperationHandler.getDomIdByOperation(old);
|
||||
const dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = false;
|
||||
dom.style.backgroundColor = this.buttonUpColor;
|
||||
}
|
||||
}
|
||||
if (val) {
|
||||
// 新按钮按下效果
|
||||
const domId = OperationHandler.getDomIdByOperation(val);
|
||||
const dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = true;
|
||||
dom.style.backgroundColor = this.buttonDownColor;
|
||||
}
|
||||
}
|
||||
},
|
||||
// S引导总锁按钮点击
|
||||
guideLockLeftButtonDown() {
|
||||
const operate = {
|
||||
operation: this.Switch.guideLock.leftButton.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
// 引导总锁弹出 调用取消引导总锁指令
|
||||
operate.nextCmdType = CMD.Switch.CMD_SWITCH_MASTER_UNBLOCK;
|
||||
operate.param = {right: false};
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// X引导总锁按钮点击
|
||||
guideLockRightButtonDown() {
|
||||
const operate = {
|
||||
operation: this.Switch.guideLock.rightButton.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
// 引导总锁弹出 调用取消引导总锁指令
|
||||
operate.nextCmdType = CMD.Switch.CMD_SWITCH_MASTER_UNBLOCK;
|
||||
operate.param = {right: true};
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
buttonDown(operation, commandTypeList) {
|
||||
this.clearOperate();
|
||||
if (operation != this.Command.cancel.clearMbm.operation) {
|
||||
const operate = {
|
||||
operation: operation
|
||||
};
|
||||
// 以下 会弹出密码框 (总人解,区故解) 铅封按钮 684
|
||||
const operationList = [
|
||||
this.Signal.humanTrainRoute.button.operation,
|
||||
this.Section.fault.button.operation,
|
||||
this.Signal.guide.button.operation
|
||||
];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.operation = operation;
|
||||
this.commandTypeList = commandTypeList;
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// 判断是否需要 弹窗密码框
|
||||
if (operationList.includes(operation)) {
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
this.timeNode = this.$store.state.socket.simulationTimeSync;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 清除按钮
|
||||
const operate = {
|
||||
start: true,
|
||||
operation: operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.commandTypeList = [];
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 解析进路数据
|
||||
handleRouteDataMap() {
|
||||
this.routeDataMap = {};
|
||||
this.routeButtonCodeList = [];
|
||||
this.routeList.forEach(item => {
|
||||
const name = item.btnCodeList.join('-');
|
||||
this.routeDataMap[name] = item;
|
||||
this.routeButtonCodeList.push(name);
|
||||
});
|
||||
},
|
||||
// 校验已点击的信号按钮code 是否有符合条件的进路
|
||||
checkHaveRoute(deviceList) {
|
||||
let name = '';
|
||||
deviceList.forEach((device, index) =>{
|
||||
name = name + (index ? '-' : '') + device.code;
|
||||
});
|
||||
if (this.menuSignal) {
|
||||
const signalName = this.menuSignal.code;
|
||||
return this.routeButtonCodeList.some(item => item.includes(name) || item.includes(signalName));
|
||||
} else {
|
||||
return this.routeButtonCodeList.some(item => item.includes(name));
|
||||
}
|
||||
},
|
||||
// 信号重开
|
||||
handelReopenSignal(device) {
|
||||
const operate = {
|
||||
operation: this.Signal.reopenSignal.button.operation,
|
||||
code: device.code,
|
||||
param: { signalCode: device.code }
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {
|
||||
}).catch(() => this.$refs.noticeInfo.doShow() );
|
||||
},
|
||||
// 排列进路
|
||||
arrangementRouteOperation(deviceList) {
|
||||
const operate = { operation: this.Signal.arrangementRoute.button.operation };
|
||||
if (!this.routeDataMap) { this.handleRouteDataMap(); }
|
||||
if (!this.checkHaveRoute(deviceList)) { // 无效的进路按钮选择 清除deviceList
|
||||
this.$message.error('无效的进路按钮');
|
||||
this.clearOperate();
|
||||
return;
|
||||
}
|
||||
this.deviceTimeNode = this.$store.state.socket.simulationTimeSync;
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](deviceList[0].signalCode || deviceList[0].code);// deviceList[0] 为 SignalButton || Signal
|
||||
if (deviceList.length === 1 && !signal.routeLock) { // 排列进路 处理始端信号机状态
|
||||
operate.code = deviceList[0].code;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
// 仅信号按钮调车信号机有状态
|
||||
if (deviceList[0]._type === 'SignalButton' || (deviceList[0]._type === 'Signal' && deviceList[0].type === 'SHUNTING')) {
|
||||
this.$store.dispatch('training/updateMapState', [{code: deviceList[0].code, _type: deviceList[0]._type, hasSelected: 1}]);
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else if (deviceList.length > 1) {
|
||||
let key = '';
|
||||
deviceList.forEach((item, index) => {
|
||||
key = key + (index ? '-' : '') + item.code;
|
||||
});
|
||||
const route = this.routeDataMap[key];
|
||||
if (route) {
|
||||
operate.code = deviceList[deviceList.length - 1].code;
|
||||
operate.param = {routeCode: route.code};
|
||||
this.route = route;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.deviceTimeNode = 0;
|
||||
this.$store.dispatch('training/updateMapState',
|
||||
[{code: this.deviceList[0].code, _type: this.deviceList[0]._type, hasSelected: 0}, {code: this.deviceList[1].code, _type: this.deviceList[1]._type, hasSelected: 1}]);
|
||||
}).catch(() => {
|
||||
this.deviceTimeNode = 0;
|
||||
this.clearOperate();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else if (this.menuSignal) {
|
||||
key = '';
|
||||
deviceList.forEach((item, index) => {
|
||||
key = key + (index ? '-' : '') + (index ? item.code : this.menuSignal.code);
|
||||
});
|
||||
const route = this.routeDataMap[key];
|
||||
if (route) {
|
||||
operate.code = deviceList[deviceList.length - 1].code;
|
||||
operate.param = {routeCode: route.code};
|
||||
this.route = route;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.deviceTimeNode = 0;
|
||||
this.$store.dispatch('training/updateMapState',
|
||||
[{code: this.deviceList[0].code, _type: this.deviceList[0]._type, hasSelected: 0}, {code: this.deviceList[1].code, _type: this.deviceList[1]._type, hasSelected: 1}]);
|
||||
}).catch(() => {
|
||||
this.deviceTimeNode = 0;
|
||||
this.clearOperate();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 总取消
|
||||
handelTotalCancel(model) {
|
||||
const operate = {
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
param: {
|
||||
signalCode: model._type === 'Signal' ? model.code : model.signalCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 引导信号
|
||||
handleGuideSignal(model) {
|
||||
const operate = {
|
||||
code: model.code,
|
||||
operation: this.Signal.guide.button.operation,
|
||||
param: {signalCode: model.signalCode}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.$store.dispatch('training/updateMapState', [{code: model.code, _type: model._type, hasSelected: 1}]);
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 人解进路
|
||||
handleTotalHumanSolution(model) {
|
||||
const operate = {
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
val: model.code,
|
||||
param: { signalCode: model.code }
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handelSwitchOperate(model) {
|
||||
const operate = {
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
param: { switchCode: model.code}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 发送指令
|
||||
sendCommand(operate) {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}).finally(() =>{ this.clearOperate(); });
|
||||
},
|
||||
// 校验是否有列车(接车)按钮
|
||||
checkHasTrainButton(model) {
|
||||
if (model.signalButtonList && model.signalButtonList.length > 0) {
|
||||
let flag = false;
|
||||
model.signalButtonList.forEach(item => {
|
||||
const signalButton = this.$store.getters['map/getDeviceByCode'](item);
|
||||
flag = flag || signalButton.type === 'PICK';
|
||||
});
|
||||
return flag;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
handelSignalBlockOrUnblock(model) {
|
||||
const buttonOperation = this.$store.state.menuOperation.buttonOperation;
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: buttonOperation,
|
||||
cmdType: '',
|
||||
param: {}
|
||||
};
|
||||
if (model._type === 'Signal' && !this.checkHasTrainButton(model)) {
|
||||
if (buttonOperation === this.Signal.lock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
|
||||
operate.param = {signalCode: model.code};
|
||||
} else if (buttonOperation === this.Signal.unlock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
|
||||
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 = {signalCode: model.signalCode};
|
||||
} else if (buttonOperation === this.Signal.unlock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
|
||||
operate.param = {signalCode: model.signalCode};
|
||||
}
|
||||
}
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
handleGuideLock(model) {
|
||||
const operate = {
|
||||
code: model.code,
|
||||
operation: this.Signal.guide.button.operation,
|
||||
param: {signalCode: model.signalCode}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
}).catch((e) => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.clearOperate();
|
||||
});
|
||||
},
|
||||
handelFaultSection(model) {
|
||||
if (model._type === 'Section') {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
||||
param: {sectionCode: model.code}
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
}
|
||||
},
|
||||
// CHANGE_DIRECTION
|
||||
selectedChange() {
|
||||
// 按钮按下时
|
||||
const model = this.selected; // 选择设备
|
||||
if ((this.$store.state.training.prdType != '01' && this.$store.state.training.prdType != '10') || this.selected._event !== MouseEvent.Left || (!model._type && !model._code)) {
|
||||
return;
|
||||
}
|
||||
const buttonOperation = this.$store.state.menuOperation.buttonOperation;
|
||||
// if (model._type === 'SignalButton' && model.type === 'GUIDE') {
|
||||
// this.handleGuideLock(model);
|
||||
// this.handleGuideSignal(model);
|
||||
// } else
|
||||
if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
||||
if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
||||
this.handelTotalCancel(model);
|
||||
} else if (buttonOperation === this.Signal.humanTrainRoute.button.operation) {
|
||||
this.handleTotalHumanSolution(model);
|
||||
} else if (this.switchOperation.includes(buttonOperation)) {
|
||||
this.handelSwitchOperate(model);
|
||||
} else if (buttonOperation === this.Signal.lock.button.operation || buttonOperation === this.Signal.unlock.button.operation) {
|
||||
this.handelSignalBlockOrUnblock(model);
|
||||
} else if (buttonOperation === this.Section.fault.button.operation) {
|
||||
this.handelFaultSection(model);
|
||||
} else if (buttonOperation === this.Signal.reopenSignal.button.operation) {
|
||||
this.handelReopenSignal(model);
|
||||
} else if (buttonOperation === this.Signal.arrangementRoute.button.operation) {
|
||||
this.deviceList.push(model);
|
||||
this.arrangementRouteOperation(this.deviceList);
|
||||
} else if (buttonOperation === this.Signal.guide.button.operation ) {
|
||||
this.handleGuideSignal(model);
|
||||
} else {
|
||||
this.clearOperate();
|
||||
}
|
||||
} else if (!buttonOperation) {
|
||||
if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) && model.type === 'GUIDE' ) {
|
||||
this.handleGuideSignal(model);
|
||||
} else if (model._type === 'SignalButton' && model.type === 'CHANGE_DIRECTION') {
|
||||
// 改方操作
|
||||
// this.changeDirection(model);
|
||||
this.clearOperate();
|
||||
} else if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) || (model._type === 'Signal' && !model.blockade)) {
|
||||
this.deviceList.push(model);
|
||||
this.arrangementRouteOperation(this.deviceList);
|
||||
} else {
|
||||
this.clearOperate();
|
||||
}
|
||||
} else { this.clearOperate(); }
|
||||
if (this.timeNode) { this.timeNode = 0; }
|
||||
},
|
||||
checkSignalBlock(code) { // 校验信号是否锁闭
|
||||
if (code) {
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return signal && signal.blockade;
|
||||
} else { return false; }
|
||||
},
|
||||
clearOperate() { // 清除操作
|
||||
const deviceState = [];
|
||||
if (this.deviceList && this.deviceList[0]) {
|
||||
deviceState.push({code: this.deviceList[0].code, _type: this.deviceList[0]._type, hasSelected: 0});
|
||||
}
|
||||
if (this.deviceList && this.deviceList[1]) {
|
||||
deviceState.push({code: this.deviceList[1].code, _type: this.deviceList[0]._type, hasSelected: 0});
|
||||
}
|
||||
this.$store.dispatch('training/updateMapState', deviceState);
|
||||
this.deviceList = [];
|
||||
this.menuSignal = null;
|
||||
Handler.clear(); // 清空操作组
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', this.operation);
|
||||
},
|
||||
routeCommit(trainCode, duration) {
|
||||
const operate = {over: true, cmdType: CMD.CTC.CTC_SET_ROUTE, param:{ tripNumber: trainCode || '', duration: duration >= 0 ? duration : null, force: false }};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.clearOperate();
|
||||
}).catch((e) => {
|
||||
console.log(e, 'error');
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.clearOperate();
|
||||
});
|
||||
},
|
||||
commandOrders() {
|
||||
if (this.operation === OperationEvent.Signal.arrangementRoute.button.operation) {
|
||||
if (this.deviceList && this.deviceList[0] && this.deviceList[0].type === 'PICK') {
|
||||
this.$refs.trainRoute.doShow(this.route);
|
||||
} else if (this.deviceList && this.deviceList[0] && this.deviceList[0]._type === 'Signal') {
|
||||
this.$refs.shuntRoute.doShow(this.route);
|
||||
} else {
|
||||
this.routeCommit();
|
||||
}
|
||||
} else if (this.operation === OperationEvent.MixinCommand.totalCancel.button.operation) {
|
||||
const operate = {over: true, cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.clearOperate();
|
||||
}).catch((e) => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.clearOperate();
|
||||
});
|
||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.button.operation) {
|
||||
const operate = {over: true, cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.clearOperate();
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.clearOperate();
|
||||
});
|
||||
} else if (this.operation === OperationEvent.Signal.guide.button.operation) {
|
||||
const operate = {over: true, cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.$store.dispatch('training/updateMapState', [{code: this.selected.code, _type: this.selected._type, hasSelected: 0}]);
|
||||
this.clearOperate();
|
||||
}).catch(() => {
|
||||
this.$store.dispatch('training/updateMapState', [{code: this.selected.code, _type: this.selected._type, hasSelected: 0}]);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.clearOperate();
|
||||
});
|
||||
} else if (this.operation === OperationEvent.Signal.humanTrainRoute.button.operation) {
|
||||
const operate = {over: true, cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
}).catch((e) => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}).finally(() => { this.clearOperate(); });
|
||||
} else if (this.switchOperation.includes(this.operation)) {
|
||||
const operate = {over:true, cmdType: this.cmdType};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}).finally(() => { this.clearOperate(); });
|
||||
}
|
||||
},
|
||||
commandClear() {
|
||||
this.clearOperate();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
$bg: #fff;
|
||||
$hoverBg: #FEEE1A;
|
||||
.button_box{
|
||||
display: block;
|
||||
float: left;
|
||||
font-size: 13px;
|
||||
height: 35px;
|
||||
width: 45px;
|
||||
background: #F0F0F0;
|
||||
}
|
||||
.menu {
|
||||
background: -webkit-linear-gradient(#FDFDFE, #DEE3F3);
|
||||
background: -o-linear-gradient(#FDFDFE, #DEE3F3);
|
||||
background: -moz-linear-gradient(#FDFDFE, #DEE3F3);
|
||||
background: linear-gradient(#FDFDFE, #DEE3F3);
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
border: 1px solid gray;
|
||||
z-index: 10;
|
||||
display: block;
|
||||
|
||||
.dsp-block {
|
||||
display: block;
|
||||
text-align: center;
|
||||
border-radius: unset;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dsp-block:hover {
|
||||
background-color: $hoverBg;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm two-confirmation"
|
||||
title="二次确认"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:show-close="false"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">确认</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TwoConfirmation',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: '',
|
||||
timer: null,
|
||||
domIdConfirm: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
messages() {
|
||||
if (this.operate) {
|
||||
return this.operate.messages;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.domIdConfirm = '';
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
||||
}
|
||||
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
|
||||
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operate && this.operate.selection) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
val: this.operate.val,
|
||||
selection: this.operate.selection
|
||||
};
|
||||
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.doClose();
|
||||
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}, 1000).catch(() => {
|
||||
this.loading = true;
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm user-add" :title="title" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
|
||||
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
|
||||
<el-form-item label="工号:" prop="jobNumber">
|
||||
<el-input v-model="model.jobNumber"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名:" prop="userName">
|
||||
<el-input v-model="model.userName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码:" prop="password">
|
||||
<el-input type="password" v-model="model.password"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码:" prop="confirm">
|
||||
<el-input type="password" v-model="model.confirm"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="0">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'UserAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: {},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
type: 'ADD',
|
||||
jobNumber: '',
|
||||
userName: '',
|
||||
password: '',
|
||||
confirm: '',
|
||||
},
|
||||
rules: {
|
||||
jobNumber: [
|
||||
{ required: true, message: '请输入工号', trigger: 'blur' }
|
||||
],
|
||||
userName: [
|
||||
{ required: true, message: '请输入用户名', trigger: 'blur' }
|
||||
],
|
||||
password: [
|
||||
{ required: true, message: '请输入密码', trigger: 'change' }
|
||||
],
|
||||
confirm: [
|
||||
{ required: true, message: '请再次输入密码', trigger: 'change' }
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '增加用户'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.resetFields();
|
||||
});
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
if (this.model.password === this.model.confirm) {
|
||||
this.doClose();
|
||||
this.$emit('operateUser', this.model);
|
||||
} else {
|
||||
this.$messageBox('二次输入密码不一致');
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); this.model });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm user-delete" :title="title" :visible.sync="show" width="260px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="padding-left: 10px; padding-bottom: 10px">
|
||||
<i class="el-icon-info"></i>
|
||||
<template v-for="message in messages">
|
||||
<span>{{message}}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="3">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'UserDelete',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: {},
|
||||
messages: [],
|
||||
model: {
|
||||
type: 'DELETE',
|
||||
jobNumber: '',
|
||||
userName: '',
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除用户'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.messages = operate.messages;
|
||||
this.model.userName = '';
|
||||
this.model.jobNumber = '';
|
||||
if (selected) {
|
||||
this.model.userName = selected.userName;
|
||||
this.model.jobNumber = selected.jobNumber;
|
||||
}
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.model.userName && this.model.jobNumber) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$emit('operateUser', this.model);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$messageBox('选择的用户名或工号为空');
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm user-edit" :title="title" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
|
||||
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
|
||||
<el-form-item label="工号:" prop="jobNumber">
|
||||
<el-input v-model="model.jobNumber" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名:" prop="userName">
|
||||
<el-input v-model="model.userName" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="原始密码:" prop="oldPassword">
|
||||
<el-input type="oldPassword" v-model="model.oldPassword"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码:" prop="password">
|
||||
<el-input type="password" v-model="model.password"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码:" prop="confirm">
|
||||
<el-input type="password" v-model="model.confirm"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="0">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'UserEdit',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: {},
|
||||
selected: {},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
type: 'EDIT',
|
||||
jobNumber: '',
|
||||
userName: '',
|
||||
oldPassword: '',
|
||||
password: '',
|
||||
confirm: '',
|
||||
},
|
||||
rules: {
|
||||
jobNumber: [
|
||||
{ required: true, message: '请输入工号', trigger: 'blur' }
|
||||
],
|
||||
userName: [
|
||||
{ required: true, message: '请输入用户名', trigger: 'blur' }
|
||||
],
|
||||
oldPassword: [
|
||||
{ required: true, message: '请输入原始密码', trigger: 'change' }
|
||||
],
|
||||
password: [
|
||||
{ required: true, message: '请输入新密码', trigger: 'change' }
|
||||
],
|
||||
confirm: [
|
||||
{ required: true, message: '请再次输入新密码', trigger: 'change' }
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '用户编辑页面'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.resetFields();
|
||||
this.selected = selected;
|
||||
if (selected) {
|
||||
this.model.jobNumber = selected.jobNumber;
|
||||
this.model.userName = selected.userName;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid)
|
||||
if (this.selected.password !== this.model.oldPassword) {
|
||||
this.$messageBox('原始密码错误');
|
||||
} else if (this.model.password !== this.model.confirm) {
|
||||
this.$messageBox('二次输入的密码错误');
|
||||
} else if (this.model.oldPassword === this.model.password) {
|
||||
this.$messageBox('老密码和新密相同');
|
||||
} else {
|
||||
this.doClose();
|
||||
this.$emit('operateUser', this.model);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
126
src/jmapNew/theme/datie_jd1a/menus/menuDialog/helpAbout.vue
Normal file
126
src/jmapNew/theme/datie_jd1a/menus/menuDialog/helpAbout.vue
Normal file
@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm manage-user" :title="title" :visible.sync="show" width="600px" :before-close="doClose"
|
||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="height: 70px;">
|
||||
<div style="position: relative; left: 10px;">
|
||||
</div>
|
||||
<div style="position: relative; left: 80px;">
|
||||
<div style="width:100%">
|
||||
<span style="padding-left: 60px">ControlMonitor 1.3.5.0</span>
|
||||
<el-button style="position: absolute; right: 95px;" :id="domIdConfirm" type="primary"
|
||||
:loading="loading" @click="commit">确定</el-button>
|
||||
</div>
|
||||
<div style="width:100%; padding-top: 20px">
|
||||
<span> 版权所有(C)2010-2011 北京玖琏科技有限公司</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 10px; margin: 5px; ">
|
||||
<el-table :data="tableData" style="width: 100%;" height="400">
|
||||
<el-table-column prop="moduleName" label="模块名称" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="version" label="版本" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="updateDate" label="修改日期">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'ManageUser',
|
||||
data() {
|
||||
return {
|
||||
tableData: [
|
||||
{
|
||||
moduleName: '主程序版本:',
|
||||
version: '123',
|
||||
updateDate: '123'
|
||||
}
|
||||
],
|
||||
operate: {},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '关于ControlMonitor'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.menu.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
138
src/jmapNew/theme/datie_jd1a/menus/menuDialog/limitSpeed.vue
Normal file
138
src/jmapNew/theme/datie_jd1a/menus/menuDialog/limitSpeed.vue
Normal file
@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @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-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
|
||||
},
|
||||
|
||||
rules: {
|
||||
// groupNumber: [
|
||||
// { required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
// ],
|
||||
// stationStandCode: [
|
||||
// { required: true, message: '请选择终端', trigger: 'change' }
|
||||
// ],
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '设置限速';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
285
src/jmapNew/theme/datie_jd1a/menus/menuDialog/manageUser.vue
Normal file
285
src/jmapNew/theme/datie_jd1a/menus/menuDialog/manageUser.vue
Normal file
@ -0,0 +1,285 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm manage-user" :title="title" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; ">
|
||||
<span class="base-label">用户列表</span>
|
||||
<el-row>
|
||||
<el-col :span="18">
|
||||
<el-table ref="multipleTable" :data="tableData" border row-key="code" style="width: 100%"
|
||||
height="450" center size="mini" highlight-current-row @row-click="chooseUser">
|
||||
<el-table-column prop="jobNumber" label="工号" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.jobNumber}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userName" label="用户名">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.userName}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="20">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button style="margin-top: 140px; margin-left: 10px;" :id="domIdFreshUser" @click="freshUser">刷新
|
||||
</el-button>
|
||||
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdAddUser" @click="addUser">增加
|
||||
</el-button>
|
||||
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdEditUser" @click="editUser">修改
|
||||
</el-button>
|
||||
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdDelUser" @click="delUser">删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="0">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<user-add ref="userAdd" @operateUser="operateUser"></user-add>
|
||||
<user-edit ref="userEdit" @operateUser="operateUser"></user-edit>
|
||||
<user-delete ref="userDelete" @operateUser="operateUser"></user-delete>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import UserAdd from './childDialog/userAdd';
|
||||
import UserEdit from './childDialog/userEdit';
|
||||
import UserDelete from './childDialog/userDelete';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'ManageUser',
|
||||
components: {
|
||||
UserAdd,
|
||||
UserEdit,
|
||||
UserDelete
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
operate: {},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdAddUser() {
|
||||
return this.dialogShow ? OperationEvent.Command.manage.addUser.domId : '';
|
||||
},
|
||||
domIdEditUser() {
|
||||
return this.dialogShow ? OperationEvent.Command.manage.editUser.domId : '';
|
||||
},
|
||||
domIdDelUser() {
|
||||
return this.dialogShow ? OperationEvent.Command.manage.delUser.domId : '';
|
||||
},
|
||||
domIdFreshUser() {
|
||||
return this.dialogShow ? OperationEvent.Command.manage.freshUser.domId : '';
|
||||
},
|
||||
domIdChooseUser() {
|
||||
return this.dialogShow ? OperationEvent.Command.manage.chooseUser.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '用户管理'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
//添加用户
|
||||
addUser() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.manage.addUser.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$refs.userAdd.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
//编辑用户
|
||||
editUser() {
|
||||
if (this.selected) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.manage.editUser.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$refs.userEdit.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
} else {
|
||||
this.$messageBox('请先选择用户');
|
||||
}
|
||||
},
|
||||
//删除用户
|
||||
delUser() {
|
||||
if (this.selected) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.manage.delUser.operation,
|
||||
messages: [`你确定删除用户${this.selected.userName}吗?`]
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$refs.userDelete.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
} else {
|
||||
this.$messageBox('请先选择用户');
|
||||
}
|
||||
},
|
||||
//刷新用户
|
||||
freshUser() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.manage.freshUser.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
//选择用户
|
||||
chooseUser(row) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.manage.chooseUser.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.selected = row;
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.menu.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
},
|
||||
//增删改函数处理
|
||||
operateUser(data) {
|
||||
if (data && data.type === 'ADD') {
|
||||
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
|
||||
if (index < 0) {
|
||||
this.tableData.push({
|
||||
jobNumber: data.jobNumber,
|
||||
userName: data.userName,
|
||||
password: data.password
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('添加失败,存在相同工号的用户');
|
||||
}
|
||||
} else if (data && data.type === 'EDIT') {
|
||||
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
|
||||
if (index >= 0) {
|
||||
this.tableData[index].password = data.password;
|
||||
this.tableData[index].userName = data.userName;
|
||||
} else {
|
||||
this.$messageBox('修改失败');
|
||||
}
|
||||
} else if (data && data.type === 'DELETE') {
|
||||
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
|
||||
if (index >= 0) {
|
||||
this.tableData.splice(index, 1);
|
||||
} else {
|
||||
this.$messageBox('删除失败');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
221
src/jmapNew/theme/datie_jd1a/menus/menuDialog/passwordBox.vue
Normal file
221
src/jmapNew/theme/datie_jd1a/menus/menuDialog/passwordBox.vue
Normal file
@ -0,0 +1,221 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm password-box"
|
||||
title="密码框"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="context" style="overflow:hidden">
|
||||
<el-form label-width="80px" size="mini">
|
||||
<el-form-item prop="username">
|
||||
<span slot="label">用户名:</span>
|
||||
<el-input v-model="model.username" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<span slot="label">密 码:</span>
|
||||
<el-input v-model="model.password" type="password" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="operate">
|
||||
<el-button-group v-model="key" class="left" size="mini">
|
||||
<el-button size="mini" @click="click(1)">1</el-button>
|
||||
<el-button size="mini" @click="click(2)">2</el-button>
|
||||
<el-button size="mini" @click="click(3)">3</el-button>
|
||||
<el-button size="mini" @click="click(4)">4</el-button>
|
||||
<el-button size="mini" @click="click(5)">5</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group v-model="key" class="right" size="mini">
|
||||
<el-button @click="esc">回退</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group v-model="key" class="left" size="mini">
|
||||
<el-button size="mini" @click="click(6)">6</el-button>
|
||||
<el-button size="mini" @click="click(7)">7</el-button>
|
||||
<el-button size="mini" @click="click(8)">8</el-button>
|
||||
<el-button size="mini" @click="click(9)">9</el-button>
|
||||
<el-button size="mini" @click="click(0)">0</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group v-model="key" class="right" size="mini">
|
||||
<el-button @click="clr">清空</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'PasswordBox',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: null,
|
||||
model: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
key: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
/** 强制站控*/
|
||||
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(operate) {
|
||||
this.model.username = '';
|
||||
this.model.password = '';
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.model.username = this.$store.state.user.name;
|
||||
},
|
||||
doShow(operate) {
|
||||
/** 如果不是断点激活,而是第一次显示需要初始化数据*/
|
||||
if (!this.dialogShow) {
|
||||
this.loadInitData(operate);
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.password.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.operate.type
|
||||
};
|
||||
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
/** 强制站控*/
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation;
|
||||
}
|
||||
|
||||
if (this.model.password == '123456') {
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setLoginResult', {
|
||||
operation: operate.operation,
|
||||
success: valid
|
||||
});
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('setLoginResult', {
|
||||
operation: operate.operation,
|
||||
success: false
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow('密码输入错误!');
|
||||
}
|
||||
},
|
||||
click(key) {
|
||||
if (!this.model.password) {
|
||||
this.model.password = '';
|
||||
}
|
||||
this.model.password += key;
|
||||
},
|
||||
esc() {
|
||||
if (this.model.password) {
|
||||
this.model.password = this.model.password.substring(0, this.model.password.length - 1);
|
||||
}
|
||||
},
|
||||
clr() {
|
||||
this.model.password = '';
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.password-box .el-form {
|
||||
margin-top: 10px !important;
|
||||
margin-right: 20px !important;
|
||||
}
|
||||
|
||||
.password-box .el-form-item {
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
|
||||
.password-box .context {
|
||||
height: 170px !important;
|
||||
}
|
||||
|
||||
.password-box .operate {
|
||||
margin-top: 10px !important;
|
||||
padding-bottom: 10px !important;
|
||||
}
|
||||
|
||||
.password-box .left {
|
||||
margin-left: 10px !important;
|
||||
}
|
||||
|
||||
.password-box .left .el-button {
|
||||
color: #000;
|
||||
background: #F0F0F0;
|
||||
text-align: center;
|
||||
width: 30px !important;
|
||||
}
|
||||
|
||||
.password-box .right {
|
||||
color: #000;
|
||||
margin-left: 10px !important;
|
||||
background: #F0F0F0;
|
||||
width: 80px !important;
|
||||
}
|
||||
</style>
|
154
src/jmapNew/theme/datie_jd1a/menus/menuDialog/routeCancel.vue
Normal file
154
src/jmapNew/theme/datie_jd1a/menus/menuDialog/routeCancel.vue
Normal file
@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="signal-control"
|
||||
:class="popClass"
|
||||
title="取消进路"
|
||||
:visible.sync="dialogShow"
|
||||
width="350px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div>
|
||||
<i class="el-icon-warning"/>
|
||||
<span>{{ showMessage }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" :pop-class="popClass" />
|
||||
<password-box ref="passwordBox" @checkOver="passWordCommit" @checkCancel="cancel" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '../../../components/utils/menuOperate';
|
||||
import NoticeInfo from '../../../components/menus/childDialog/noticeInfo';
|
||||
import PasswordBox from '../dialog/childDialog/passwordInputBox.vue';
|
||||
export default {
|
||||
name: 'routeCancel',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
PasswordBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
signalName: '',
|
||||
popClass: 'chengdou-03__systerm',
|
||||
loading: false,
|
||||
showMessage: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
this.signalName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
} else if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()){
|
||||
this.switchName = selected.name;
|
||||
}
|
||||
this.operation = operate.operation;
|
||||
if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||
this.showMessage = `下发“取消进路”【信号机:${this.signalName}】命令吗?`;
|
||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||
this.showMessage = `下发“信号重开”命令吗?`;
|
||||
} else if (this.operation === OperationEvent.Signal.guide.menu.operation) {
|
||||
this.showMessage = `下发“引导进路”命令吗?`;
|
||||
} else if (this.operation === OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
||||
this.showMessage = `下发“总人解”命令吗?`
|
||||
} else if (this.operation === OperationEvent.Switch.locate.menu.operation) {
|
||||
this.showMessage = `下发“定操【道岔:${this.switchName}】”命令吗?`
|
||||
} else if (this.operation === OperationEvent.Switch.reverse.menu.operation) {
|
||||
this.showMessage = `下发“反操【道岔:${this.switchName}】”命令吗?`
|
||||
} else if (this.operation === OperationEvent.Switch.lock.menu.operation) {
|
||||
this.showMessage = `下发“单锁【道岔:${this.switchName}】”命令吗?`
|
||||
} else if (this.operation === OperationEvent.Switch.unlock.menu.operation) {
|
||||
this.showMessage = `下发“单解【道岔:${this.switchName}】”命令吗?`
|
||||
} else {
|
||||
this.showMessage = '';
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||
this.sendCommand(menuOperate.Signal.cancelTrainRoute);
|
||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||
this.sendCommand(menuOperate.Signal.reopenSignal);
|
||||
} else if (this.operation === OperationEvent.Signal.guide.menu.operation) {
|
||||
this.$refs.passwordBox.doShow({ operation: OperationEvent.Signal.guide.menu.operation });
|
||||
} else if (this.operation === OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
||||
this.sendCommand(menuOperate.Signal.humanTrainRoute);
|
||||
} else if (this.operation === OperationEvent.Switch.locate.menu.operation) {
|
||||
this.sendCommand(menuOperate.Switch.locate);
|
||||
} else if (this.operation === OperationEvent.Switch.reverse.menu.operation ) {
|
||||
this.sendCommand(menuOperate.Switch.reverse);
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
passWordCommit(operate) {
|
||||
if (operate.operation === OperationEvent.Signal.guide.menu.operation) {
|
||||
this.sendCommand(menuOperate.Signal.guide);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
286
src/jmapNew/theme/datie_jd1a/menus/menuDialog/setLimitSpeed.vue
Normal file
286
src/jmapNew/theme/datie_jd1a/menus/menuDialog/setLimitSpeed.vue
Normal file
@ -0,0 +1,286 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="800px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="14">
|
||||
<div class="card-box">
|
||||
<span class="tip-label">请求</span>
|
||||
<el-row style="margin: 5px">
|
||||
<el-col :span="6" class="item-label">线路选择</el-col>
|
||||
<el-col :span="6">
|
||||
<el-select v-model="data.path">
|
||||
<el-option
|
||||
v-for="item in pathList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6" class="item-label">限制速度</el-col>
|
||||
<el-col :span="6">
|
||||
<el-select v-model="data.speed">
|
||||
<el-option
|
||||
v-for="item in speedList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6" class="item-label">起始公里标</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="data.begKmPost" />
|
||||
</el-col>
|
||||
<el-col :span="6" class="item-label">结束公里标</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="data.endKmPost" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6" class="item-label">限速区段长度</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="data.length" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button>查看</el-button>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button>请求</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="card-box">
|
||||
<span class="tip-label">执行</span>
|
||||
<el-row style="margin: 5px">
|
||||
<el-col :span="6" class="item-label">线路选择</el-col>
|
||||
<el-col :span="6">
|
||||
<el-select v-model="form.path">
|
||||
<el-option
|
||||
v-for="item in pathList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6" class="item-label">限制速度</el-col>
|
||||
<el-col :span="6">
|
||||
<el-select v-model="form.speed">
|
||||
<el-option
|
||||
v-for="item in speedList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6" class="item-label">起始公里标</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="form.begKmPost" />
|
||||
</el-col>
|
||||
<el-col :span="6" class="item-label">结束公里标</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="form.endKmPost" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6" class="item-label">限速区段长度</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="form.length" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button>查看</el-button>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button>请求</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="card-box">
|
||||
<span class="tip-label">操作提示</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="9" :offset="1">
|
||||
<div class="card-box">
|
||||
<span class="tip-label">设备列表</span>
|
||||
<el-table class="card-table" :data="deviceData" border style="width: 100%" height="300">
|
||||
<el-table-column prop="stationName" label="站名" />
|
||||
<el-table-column prop="deviceCode" label="设备号" />
|
||||
<el-table-column prop="deviceName" label="设备名" />
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @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-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
data: {
|
||||
path: '',
|
||||
speed: '',
|
||||
begKmPost: '',
|
||||
endKmPost: '',
|
||||
length: ''
|
||||
},
|
||||
form: {
|
||||
path: '',
|
||||
speed: '',
|
||||
begKmPost: '',
|
||||
endKmPost: '',
|
||||
length: ''
|
||||
},
|
||||
pathList: [
|
||||
{ name: '上行站线', value: '01' },
|
||||
{ name: '下行站线', value: '02' }
|
||||
],
|
||||
speedList: [
|
||||
{ name: '10Km/h', value: '10' },
|
||||
{ name: '15Km/h', value: '15' },
|
||||
{ name: '20Km/h', value: '20' },
|
||||
{ name: '25Km/h', value: '25' }
|
||||
],
|
||||
deviceData: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '设置临时限速';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
|
||||
.card-box {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.card-table {
|
||||
position: relative;
|
||||
top: -15px;
|
||||
}
|
||||
|
||||
.tip-label {
|
||||
position: relative;
|
||||
left: 5px;
|
||||
top: -15px;
|
||||
background: #ECE9D8;
|
||||
}
|
||||
|
||||
.item-label {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,433 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm station-control-convert"
|
||||
title="控制模式转换"
|
||||
:visible.sync="show"
|
||||
width="700px"
|
||||
:before-close="doClose"
|
||||
:show-close="true"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="tableData"
|
||||
border
|
||||
row-key="code"
|
||||
style="width: 100%"
|
||||
height="250"
|
||||
center
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column :id="domIdChoose" prop="check" label="选择" width="60" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox ref="check" v-model="scope.row.check" :disabled="scope.row.disabled" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="operate" label="操作区域" width="140">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="control" label="控制模式" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="中心-车站通信状态" width="140">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.status }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="result" label="转换执行状态">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.result }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button v-if="isFork" :id="domIdFork" :disabled="disabledCommit" @click="forkCommit">强制站控</el-button>
|
||||
<el-button v-if="isRequest" :id="domIdRequest" :disabled="disabledCommit" @click="requestCommit">请求站控
|
||||
</el-button>
|
||||
<el-button v-if="isConter" :id="domIdConter" :disabled="disabledCommit" @click="conterCommit">请求中控
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<two-confirmation ref="twoConfirmation" @setOperate="getOperate" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import TwoConfirmation from './childDialog/twoConfirmation';
|
||||
|
||||
export default {
|
||||
name: 'StationControlConvert',
|
||||
components: {
|
||||
TwoConfirmation
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: null,
|
||||
dialogShow: false,
|
||||
disabledSend: false,
|
||||
disabledSure: false,
|
||||
disabledClose: false,
|
||||
operation: '',
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
},
|
||||
selection: [],
|
||||
tableData: [],
|
||||
timer: null,
|
||||
count: 0,
|
||||
backOperate: '',
|
||||
timeout: 61
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started'
|
||||
]),
|
||||
disabledCommit() {
|
||||
return this.disabledSend || this.disabledSure;
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
isFork() {
|
||||
if (this.dialogShow) {
|
||||
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl);
|
||||
}
|
||||
return '';
|
||||
},
|
||||
isRequest() {
|
||||
if (this.dialogShow) {
|
||||
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl);
|
||||
}
|
||||
return '';
|
||||
},
|
||||
isConter() {
|
||||
if (this.dialogShow) {
|
||||
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl);
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdChoose() {
|
||||
if (this.dialogShow) {
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
return OperationEvent.StationControl.forcedStationControl.choose.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
return OperationEvent.StationControl.requestStationControl.choose.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
return OperationEvent.StationControl.requestCentralControl.choose.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConter() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.requestCentralControl.menu.domId : '';
|
||||
},
|
||||
domIdFork() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.forcedStationControl.menu.domId : '';
|
||||
},
|
||||
domIdRequest() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.requestStationControl.menu.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem) {
|
||||
if (elem.hasOwnProperty('timeout')) {
|
||||
this.updateTableValue(elem.stationControlCode, { result: `接受转换应答超时` }, false);
|
||||
} else if (elem.hasOwnProperty('success')) {
|
||||
if (elem.success) {
|
||||
this.updateTableValue(elem.stationControlCode, { result: '控制模式转换成功' }, true);
|
||||
} else {
|
||||
this.updateTableValue(elem.stationControlCode, { result: `控制模式转换失败` }, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
backOperate: function (operate) {
|
||||
if (this.dialogShow && operate) {
|
||||
if (operate.selection && operate.selection.length) {
|
||||
operate.selection.forEach(elem => {
|
||||
if (operate.commit) {
|
||||
this.updateTableValue(elem.code, { result: `已发送转换请求,${this.timeout}秒后超时.` }, false);
|
||||
} else if (operate.cancel) {
|
||||
this.updateTableValue(elem.code, { result: '' }, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
// 深度数据状态
|
||||
tableData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadTableData();
|
||||
},
|
||||
methods: {
|
||||
updateTableValue(code, result, success) {
|
||||
this.tableData.forEach((row, index) => {
|
||||
if (row.code == code) {
|
||||
for (const prop in result) {
|
||||
row[prop] = result[prop];
|
||||
}
|
||||
if (success) {
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
row.control = this.controlProps['02']; // 01:中控, 02:站控
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
row.control = this.controlProps['01']; // 01:中控, 02:站控
|
||||
}
|
||||
row.disabled = true;
|
||||
row.check = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
checkTableDataSelction(data) {
|
||||
const selection = [];
|
||||
if (data && data.length > 0) {
|
||||
data.forEach(row => {
|
||||
if (row.check && !row.disabled) {
|
||||
selection.push(row);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.disabledSend = !selection.length;
|
||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||
this.handleChooseChange(selection);
|
||||
this.selection = selection;
|
||||
}
|
||||
},
|
||||
checkBoxDisabled(row) {
|
||||
const control = (this.$store.getters('map/getDeviceByCode')(row.code) || {});
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
if (control && control.status == '02') { // 01:中控, 02:站控
|
||||
return true;
|
||||
}
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
if (control && control.status == '01') { // 01:中控, 02:站控
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
loadTableData() {
|
||||
this.tableData = [];
|
||||
this.stationList.forEach(station => {
|
||||
// const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||
this.tableData.push({
|
||||
code: station.code,
|
||||
operate: station.name || '',
|
||||
control: '',
|
||||
check: false,
|
||||
disabled: false,
|
||||
status: '正常',
|
||||
result: ''
|
||||
});
|
||||
});
|
||||
},
|
||||
initTableDataStatus() {
|
||||
this.tableData.forEach(row => {
|
||||
row.disabled = this.checkBoxDisabled(row);
|
||||
row.check = false;
|
||||
row.result = '';
|
||||
const control = (this.$store.getters('map/getDeviceByCode')(row.code) || {}).state;
|
||||
if (control) {
|
||||
row.control = this.controlProps[control.status];
|
||||
}
|
||||
});
|
||||
},
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.disabledSure = false;
|
||||
this.initTableDataStatus();
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$refs.multipleTable.setCurrentRow();
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
clearTimer() {
|
||||
this.count = 0;
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
},
|
||||
serializeCodeListWithSeparator(sep) {
|
||||
const codeList = [];
|
||||
if (this.selection && this.selection.length) {
|
||||
this.selection.forEach(elem => {
|
||||
codeList.push(elem.code);
|
||||
});
|
||||
}
|
||||
return codeList.join(sep);
|
||||
},
|
||||
handleChooseChange(selection) {
|
||||
this.selection = selection;
|
||||
if (selection && selection.length) {
|
||||
const operate = {
|
||||
|
||||
operation: '',
|
||||
val: this.serializeCodeListWithSeparator('::'),
|
||||
selection: selection
|
||||
};
|
||||
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.choose.operation;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestStationControl.choose.operation;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestCentralControl.choose.operation;
|
||||
}
|
||||
|
||||
this.disabledSure = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.disabledSure = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
} else if (!selection) {
|
||||
this.$messageBox('请选择一条数据');
|
||||
}
|
||||
},
|
||||
requestCommit() {
|
||||
const operate = {
|
||||
|
||||
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
|
||||
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
||||
val: this.serializeCodeListWithSeparator('::'),
|
||||
selection: this.selection
|
||||
};
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
this.disabledClose = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.twoConfirmation.doShow(operate);
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.disabledSure = false;
|
||||
this.disabledClose = false;
|
||||
});
|
||||
},
|
||||
forkCommit() {
|
||||
const operate = {
|
||||
|
||||
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
|
||||
operation: OperationEvent.StationControl.forcedStationControl.menu.operation,
|
||||
val: this.serializeCodeListWithSeparator('::'),
|
||||
selection: this.selection
|
||||
};
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
this.disabledClose = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.twoConfirmation.doShow(operate);
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.disabledSure = false;
|
||||
this.disabledClose = false;
|
||||
});
|
||||
},
|
||||
conterCommit() { // 请求中控
|
||||
const operate = {
|
||||
|
||||
messages: ['确认将如下操作区域的控制模式由站控转为中控:'],
|
||||
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
||||
val: this.serializeCodeListWithSeparator('::'),
|
||||
selection: this.selection
|
||||
};
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
this.disabledClose = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.twoConfirmation.doShow(operate);
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.disabledSure = false;
|
||||
this.disabledClose = false;
|
||||
});
|
||||
},
|
||||
getOperate(operate) {
|
||||
this.backOperate = operate;
|
||||
if (operate.cancel) {
|
||||
this.disabledClose = false;
|
||||
this.disabledSure = this.disabledSend = false;
|
||||
}
|
||||
if (operate.commit || operate.timeout) {
|
||||
this.disabledSend = this.disabledSure = true;
|
||||
this.disabledClose = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
168
src/jmapNew/theme/datie_jd1a/menus/menuDialog/trainAdd.vue
Normal file
168
src/jmapNew/theme/datie_jd1a/menus/menuDialog/trainAdd.vue
Normal file
@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">添加位置</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终   端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="前车车次号:" prop="trainNumberLimber">
|
||||
<el-input v-model="addModel.trainNumberLimber" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item label="添加车次号:" label-width="115px" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @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-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
trainNumberLimber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
// trainNumberLimber: [
|
||||
// { required: true, message: '请输入前车车次号', trigger: 'blur' }
|
||||
// ],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '添加计划车';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
151
src/jmapNew/theme/datie_jd1a/menus/menuDialog/trainDelete.vue
Normal file
151
src/jmapNew/theme/datie_jd1a/menus/menuDialog/trainDelete.vue
Normal file
@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @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-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除计划车';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Command.planTrain.delPlanTrain.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<el-form-item label="车 次 号:" label-width="115px" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">目的</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="trainNumberLimber">
|
||||
<el-input v-model="addModel.trainNumberLimber" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @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-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainTranstalet',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
trainNumberLimber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
trainNumberLimber: [
|
||||
{ required: true, message: '请输入前车车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '平移计划车';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
256
src/jmapNew/theme/datie_jd1a/menus/menuDialog/viewName.vue
Normal file
256
src/jmapNew/theme/datie_jd1a/menus/menuDialog/viewName.vue
Normal file
@ -0,0 +1,256 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm view-name"
|
||||
title="名称显示设置"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-checkbox-group v-model="nameLevels">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="1">信号机名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="2">站台轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="3" disabled>按钮名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="4">折返轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="5">轨道名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="7">道岔名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="8">标识灯名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="9">道岔区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="10">目的地名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="11">计轴区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="12">公里标</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ViewName',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setNameDisplay();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活显示,而是第一次显示时,需要初始化参数
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.nameLevels.sort().join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setNameDisplay();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setNameDisplay() {
|
||||
const deviceList = [];
|
||||
|
||||
// 信号机
|
||||
let nameShow = this.nameLevels.includes(1);
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 按钮名称
|
||||
nameShow = this.nameLevels.includes(3);
|
||||
|
||||
// 道岔
|
||||
nameShow = this.nameLevels.includes(7); // 道岔名称
|
||||
const switchSectionNameShow = this.nameLevels.includes(9); // 道岔轨名称
|
||||
const switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 控制模式
|
||||
const indicatorShow = this.nameLevels.includes(8);
|
||||
const control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); // 标识灯名称
|
||||
});
|
||||
}
|
||||
|
||||
// 区段
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
// if (elem.switchSection && elem.parentCode) {
|
||||
// // 道岔轨的区段名称默认不显示
|
||||
// nameShow = false;
|
||||
if (elem.type == '03') {
|
||||
nameShow = false;
|
||||
} else if (elem.type === '01') {
|
||||
// 计轴区段名称
|
||||
nameShow = this.nameLevels.includes(11);
|
||||
} else if (elem.type === '02') {
|
||||
// 轨道轨名称
|
||||
nameShow = this.nameLevels.includes(5);
|
||||
} else if (elem.type === '04') {
|
||||
// 道岔区段名称
|
||||
nameShow = this.nameLevels.includes(9);
|
||||
}
|
||||
|
||||
// 站台轨名称
|
||||
if (elem.standTrack) {
|
||||
standTrackNameShow = this.nameLevels.includes(2);
|
||||
}
|
||||
|
||||
// 折返轨名称
|
||||
if (elem.reentryTrack) {
|
||||
reentryTrackNameShow = this.nameLevels.includes(4);
|
||||
}
|
||||
|
||||
// 转换轨名称
|
||||
if (elem.transferTrack) {
|
||||
transferTrackNameShow = this.nameLevels.includes(6);
|
||||
}
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 停车点
|
||||
const destCodeShow = this.nameLevels.includes(10);
|
||||
const stopPointList = this.$store.getters['map/stopPointList'];
|
||||
if (stopPointList && stopPointList.length > 0) {
|
||||
stopPointList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 车站
|
||||
const kmPostShow = this.nameLevels.includes(12);
|
||||
const stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); // 公里标
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
302
src/jmapNew/theme/datie_jd1a/menus/menuPanel.vue
Normal file
302
src/jmapNew/theme/datie_jd1a/menus/menuPanel.vue
Normal file
@ -0,0 +1,302 @@
|
||||
<template>
|
||||
<div v-if="dialogShow" id="faultChoose">
|
||||
<!-- <div class="falutChooseTitle">ceshi</div>-->
|
||||
<div class="card" style="padding: 5px;">
|
||||
<div style="background: #999EA7;display: flex;align-items: center;">
|
||||
<div class="button-box">
|
||||
<img :src="t3Pic" class="img-button">
|
||||
</div>
|
||||
<div class="button-box">
|
||||
<img :src="panelPic" class="img-button" @click="showLineBoard">
|
||||
</div>
|
||||
<div class="button-box">
|
||||
<img :src="trainPic" class="img-button">
|
||||
</div>
|
||||
<div class="button-box">
|
||||
<img :src="linkPic" class="img-button">
|
||||
</div>
|
||||
<div class="button-box">
|
||||
<img :src="cameraPic" class="img-button">
|
||||
</div>
|
||||
<div style="width: 205px;height: 36px; background: #fff;border-radius: 5px;" />
|
||||
<div class="button-box">
|
||||
<img :src="settingPic" class="img-button">
|
||||
</div>
|
||||
<div class="button-box">
|
||||
<img :src="shutdownPic" class="img-button">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MouseEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import T3Pic from '@/assets/ctc_icon/t3.png';
|
||||
import TrainPic from '@/assets/ctc_icon/train.png';
|
||||
import PanelPic from '@/assets/ctc_icon/panel.png';
|
||||
import LinkPic from '@/assets/ctc_icon/link.png';
|
||||
import CameraPic from '@/assets/ctc_icon/camera.png';
|
||||
import SettingPic from '@/assets/ctc_icon/setting.png';
|
||||
import ShutdownPic from '@/assets/ctc_icon/shutdown.png';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'RouteCreate',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: true,
|
||||
loading: false,
|
||||
selected: null,
|
||||
t3Pic: T3Pic,
|
||||
panelPic: PanelPic,
|
||||
trainPic: TrainPic,
|
||||
linkPic: LinkPic,
|
||||
cameraPic: CameraPic,
|
||||
settingPic: SettingPic,
|
||||
shutdownPic: ShutdownPic
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList',
|
||||
'sectionList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
createDisable() {
|
||||
return !(this.groupNumber1 && this.groupNumber1.length === 4 && this.nowSectionCode && this.newTrainCode && this.newTrainCode.length === 8);
|
||||
},
|
||||
updateDisable() {
|
||||
return !(this.newTrainCode && this.newTrainCode.length === 8);
|
||||
},
|
||||
moveDisable() {
|
||||
return !this.newSectionCode;
|
||||
},
|
||||
deleteDisable() {
|
||||
return !this.nowTrainCode;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.selectedCount':function(em) {
|
||||
const device = this.$store.state.menuOperation.selected;
|
||||
if (device && device.code && device._type === 'Section') {
|
||||
this.nowSectionCode = device.code;
|
||||
} else if (device && device.code && device._type === 'Train' && device._event === MouseEvent.Left) {
|
||||
this.doShow(device);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.dragEvent(); // 24
|
||||
},
|
||||
methods: {
|
||||
doShow(selected) {
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.dragEvent();
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
showLineBoard() {
|
||||
EventBus.$emit('showLineBoard');
|
||||
},
|
||||
dragEvent() {
|
||||
const offset = this.offset;
|
||||
const dragDom = document.querySelector('#faultChoose');
|
||||
dragDom.style.cursor = 'move';
|
||||
|
||||
/** 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);*/
|
||||
const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
|
||||
dragDom.onmousedown = (e) => {
|
||||
/** 鼠标按下,计算当前元素距离可视区的距离*/
|
||||
const disX = e.clientX;
|
||||
const disY = e.clientY;
|
||||
|
||||
/** 获取到的值带px 正则匹配替换*/
|
||||
let styL, styT;
|
||||
|
||||
/** 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px*/
|
||||
if (sty.left.includes('%')) {
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100);
|
||||
styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
|
||||
} else {
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
styL = +sty.left.replace(/\px/g, '');
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
styT = +sty.top.replace(/\px/g, '');
|
||||
}
|
||||
document.onmousemove = function (e) {
|
||||
/** 通过事件委托,计算移动的距离*/
|
||||
const l = e.clientX - disX;
|
||||
const t = e.clientY - disY;
|
||||
|
||||
/** 移动当前元素*/
|
||||
// dragDom.style.left = `${l + styL}px`;
|
||||
// dragDom.style.top = `${t + styT}px`;
|
||||
|
||||
/** 移动当前元素*/
|
||||
if (l + styL < 0) {
|
||||
dragDom.style.left = `0px`;
|
||||
} else if (l + styL > document.body.clientWidth - dragDom.clientWidth - 10) {
|
||||
dragDom.style.left = `${document.body.clientWidth - dragDom.clientWidth - 10}px`;
|
||||
} else {
|
||||
dragDom.style.left = `${l + styL}px`;
|
||||
}
|
||||
if (t + styT <= offset) {
|
||||
dragDom.style.top = offset + `px`;
|
||||
} else if (t + styT > document.body.clientHeight - dragDom.clientHeight - 10) {
|
||||
dragDom.style.top = `${document.body.clientHeight - dragDom.clientHeight - 10}px`;
|
||||
} else {
|
||||
dragDom.style.top = `${t + styT}px`;
|
||||
}
|
||||
/** 将此时的位置传出去*/
|
||||
// binding.value({ x: e.pageX, y: e.pageY });
|
||||
};
|
||||
|
||||
document.onmouseup = function () {
|
||||
document.onmousemove = null;
|
||||
document.onmouseup = null;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
#faultChoose .el-button--mini {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.triggerFaultListLeft{
|
||||
display: inline-block;
|
||||
float: left;
|
||||
width: 730px;
|
||||
}
|
||||
// 谷歌、safari、qq浏览器、360浏览器滚动条样式
|
||||
// 定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸
|
||||
#faultChoose .el-table__body-wrapper::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
// height: 110px;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
/*定义滚动条轨道 内阴影+圆角*/
|
||||
#faultChoose .el-table__body-wrapper::-webkit-scrollbar-track {
|
||||
// box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
|
||||
border-radius: 10px;
|
||||
background-color: #FFFFFF;;
|
||||
}
|
||||
/*定义滑块 内阴影+圆角*/
|
||||
#faultChoose .el-table__body-wrapper::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
// box-shadow: inset 0 0 6px rgba(0,0,0,.3);
|
||||
background-color: #eaeaea;
|
||||
}
|
||||
/*滑块效果*/
|
||||
#faultChoose .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
|
||||
border-radius: 5px;
|
||||
// box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
||||
background: rgba(0,0,0,0.4);
|
||||
}
|
||||
/*IE滚动条颜色*/
|
||||
html {
|
||||
scrollbar-face-color:#bfbfbf;/*滚动条颜色*/
|
||||
scrollbar-highlight-color:#000;
|
||||
scrollbar-3dlight-color:#000;
|
||||
scrollbar-darkshadow-color:#000;
|
||||
scrollbar-Shadow-color:#adadad;/*滑块边色*/
|
||||
scrollbar-arrow-color:rgba(0,0,0,0.4);/*箭头颜色*/
|
||||
scrollbar-track-color:#eeeeee;/*背景颜色*/
|
||||
}
|
||||
</style>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.triggerFaultInfo{
|
||||
margin-bottom:10px;
|
||||
padding: 10px 0px 10px 15px;
|
||||
}
|
||||
.triggerFaultList{
|
||||
font-size: 14px;
|
||||
margin-top: 10px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.triggerFaultTitle{
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.falutChooseTitle{
|
||||
cursor: all-scroll;
|
||||
background-color: #c0c0c0;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
color: #000;
|
||||
padding-left: 10px;
|
||||
border-radius: 6px 6px 0 0;
|
||||
}
|
||||
#faultChoose{
|
||||
width: 510px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 0;
|
||||
border-radius: 6px;
|
||||
z-index:2009;
|
||||
background-color: #E2E2E2;
|
||||
}
|
||||
.faultChooseFoot{
|
||||
display: inline-block;
|
||||
float: right;
|
||||
margin-right: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.closeFalutChoose{
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
cursor: pointer;
|
||||
line-height: 30px;
|
||||
}
|
||||
.closeFalutChooseIn{
|
||||
font-size: 20px;
|
||||
margin-left: 5px;
|
||||
background-color: #f00;
|
||||
color: #FFF;
|
||||
border: 1px solid #fff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.img-button{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background: #EBEBEB;
|
||||
border: 2px inset #fff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.img-button:hover{
|
||||
border: 2px outset #fff;
|
||||
}
|
||||
.img-button:active{
|
||||
border: 2px outset #fff;
|
||||
}
|
||||
.button-box{
|
||||
padding: 3px;
|
||||
background: #EBEBEB;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 5px;
|
||||
margin: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
260
src/jmapNew/theme/datie_jd1a/menus/menuSection.vue
Normal file
260
src/jmapNew/theme/datie_jd1a/menus/menuSection.vue
Normal file
@ -0,0 +1,260 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" pop-class="chengdou-03__systerm" />
|
||||
<section-detail ref="sectionDetail" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<train-add-plan ref="trainAddPlan" pop-class="chengdou-03__systerm" />
|
||||
<set-fault ref="setFault" pop-class="datie-02__systerm" />
|
||||
<!-- <load-spare-train ref="loadSpareTrain" pop-class="chengdou-03__systerm" /> -->
|
||||
<add-spare-train ref="addSpareTrain" />
|
||||
<draw-select ref="drawSelect" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import SectionDetail from './dialog/sectionDetail';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import AddSpareTrain from './dialog/addSpareTrain';
|
||||
|
||||
import DrawSelect from './dialog/drawSelect';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SectionControl,
|
||||
SectionDetail,
|
||||
NoticeInfo,
|
||||
TrainAddPlan,
|
||||
SetFault,
|
||||
// LoadSpareTrain,
|
||||
AddSpareTrain,
|
||||
DrawSelect
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
// {
|
||||
// label: '图纸调用',
|
||||
// handler: this.drawingCall
|
||||
// },
|
||||
// {
|
||||
// label: '基础设备培训',
|
||||
// handler: this.baDeTrCall
|
||||
// }
|
||||
{
|
||||
label: ' 增加车次',
|
||||
handler: this.addSpare,
|
||||
cmdType: CMD.Section.CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
// label: '区故解',
|
||||
// handler: this.fault,
|
||||
// cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
// },
|
||||
// {
|
||||
// label: '属性',
|
||||
// handler: this.detail,
|
||||
// cmdType: CMD.Section.CMD_SECTION_DETAILS
|
||||
// }
|
||||
// {
|
||||
// label: ' 增加车次',
|
||||
// handler: this.addSpare,
|
||||
// cmdType: CMD.Section.CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
// {
|
||||
// label: '设置备用车',
|
||||
// handler: this.loadSpare,
|
||||
// cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
|
||||
// }
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
console.log(this.buttonOperation, '***********');
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && (!this.buttonOperation || this.$route.query.ctc)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
if (isDev) {
|
||||
this.menuNormal.Center.push( {
|
||||
label: '新建计划列车',
|
||||
handler: this.createPlanTrain,
|
||||
cmdType: CMD.Section.CMD_Train_Init_Plan
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.selected.type != '04') {
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
} else {
|
||||
this.menu = [];
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
drawingCall() {
|
||||
this.$refs.drawSelect.doShow(this.selected, 'drawing');
|
||||
},
|
||||
baDeTrCall() {
|
||||
this.$refs.drawSelect.doShow(this.selected, 'baDeTr');
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// loadSpare() {
|
||||
// commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{
|
||||
// if (valid) {
|
||||
// this.$refs.loadSpareTrain.doShow(operate, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
addSpare() {
|
||||
commitOperate(menuOperate.Section.addSpareTrain, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.addSpareTrain.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置计轴失效
|
||||
alxeFailure() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.alxeFailure.menu.operation,
|
||||
cmdType: '',
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 故障解锁
|
||||
fault() {
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
detail() {
|
||||
commitOperate(menuOperate.Section.detail, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionDetail.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 新建计划车(开发专用)
|
||||
createPlanTrain() {
|
||||
commitOperate(menuOperate.Train.createPlanTrain, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.trainAddPlan.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,20 +1,52 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<route-selection ref="routeSelection" />
|
||||
<route-control ref="routeControl" pop-class="chengdou-03__systerm" />
|
||||
<route-detail ref="routeDetail" />
|
||||
<route-guide ref="routeGuide" />
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<password-box ref="passwordBox" pop-class="chengdou-03__systerm" @checkOver="passWordCommit" />
|
||||
<draw-select ref="drawSelect" />
|
||||
<route-cancel ref="routeCancel" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
// OperateMode
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import RouteSelection from './dialog/routeSelection';
|
||||
import RouteDetail from './dialog/routeDetail';
|
||||
import RouteHandControl from './dialog/routeHandControl';
|
||||
import RouteGuide from './dialog/routeGuide';
|
||||
import RouteCancel from './menuDialog/routeCancel';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import PasswordBox from '@/jmapNew/theme/components/menus/childDialog/passwordInputBox';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import DrawSelect from './dialog/drawSelect';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo
|
||||
RouteControl,
|
||||
RouteSelection,
|
||||
RouteHandControl,
|
||||
RouteDetail,
|
||||
RouteGuide,
|
||||
NoticeInfo,
|
||||
PasswordBox,
|
||||
SetFault,
|
||||
DrawSelect,
|
||||
RouteCancel
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -29,39 +61,123 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '总取消',
|
||||
handler: this.signalTotalCancle
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
{
|
||||
label: '总人解',
|
||||
handler: this.humanTrainRoute
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '开放引导信号',
|
||||
handler: this.signalRouteGuide
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
{
|
||||
label: '建立引导总锁闭',
|
||||
handler: this.guideTotalLock
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '加封',
|
||||
handler: this.seal
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
}
|
||||
{
|
||||
label: '办理 通过进路',
|
||||
handler: this.arrangementRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '列车 办理进路',
|
||||
handler: this.arrangementRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
{
|
||||
label: '取消进路',
|
||||
handler: this.cancelTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '封锁/解封',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '总人解',
|
||||
handler: this.humanTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '引导',
|
||||
handler: this.guide,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
{
|
||||
label: '坡道解锁',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
// label: '办理进路',
|
||||
// handler: this.arrangementRoute,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
// },
|
||||
// {
|
||||
// label: '办理引导进路',
|
||||
// handler: this.guide,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
// },
|
||||
// {
|
||||
// label: '取消进路',
|
||||
// handler: this.cancelTrainRoute,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
// },
|
||||
// {
|
||||
// label: '总人解',
|
||||
// handler: this.humanTrainRoute,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
// },
|
||||
// {
|
||||
// label: '信号重开',
|
||||
// handler: this.reopenSignal,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
// },
|
||||
// {
|
||||
// label: '信号封锁',
|
||||
// handler: this.lock,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
// },
|
||||
// {
|
||||
// label: '信号解封',
|
||||
// handler: this.unlock,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
// },
|
||||
// {
|
||||
// label: '进路收人工控',
|
||||
// handler: this.humanControl,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
// },
|
||||
// {
|
||||
// label: '进路交自动控',
|
||||
// handler: this.atsAutoControl,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
// },
|
||||
// {
|
||||
// label: '进路信息',
|
||||
// handler: this.detail,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
// }
|
||||
]
|
||||
}
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -72,13 +188,17 @@ export default {
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'routeList'
|
||||
]),
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
||||
console.log(DeviceMenu.Signal, val, this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal), this.buttonOperation);
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && (!this.buttonOperation || this.$route.query.ctc)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
@ -90,41 +210,180 @@ export default {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
// // 故障模式菜单列表
|
||||
// if (this.operatemode === OperateMode.FAULT) {
|
||||
// this.menu = this.menuForce;
|
||||
// }
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
drawingCall() {
|
||||
this.$refs.drawSelect.doShow(this.selected, 'drawing');
|
||||
},
|
||||
baDeTrCall() {
|
||||
this.$refs.drawSelect.doShow(this.selected, 'baDeTr');
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
// 总取消
|
||||
signalTotalCancle() {
|
||||
|
||||
},
|
||||
// 总人解
|
||||
humanTrainRoute() {
|
||||
|
||||
},
|
||||
// 开放引导信号
|
||||
signalRouteGuide() {
|
||||
|
||||
},
|
||||
// 建立引导总锁闭
|
||||
guideTotalLock() {
|
||||
|
||||
},
|
||||
// 加封
|
||||
seal() {
|
||||
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取进路列表
|
||||
getRouteList(selectType) {
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === selectType.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
return routes;
|
||||
},
|
||||
// 设置进路
|
||||
arrangementRoute() {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
// this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
EventBus.$emit('arrangementRouteMenu', this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路引导
|
||||
guide() {
|
||||
commitOperate(menuOperate.Signal.guide, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
// this.$refs.passwordBox.doShow({...operate, ...{selected: this.selected}, ...{routesList: this.getRouteList(this.selected)}});
|
||||
this.$refs.routeCancel.doShow(operate, this.selected)
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeCancel.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 总人解
|
||||
humanTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeCancel.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeCancel.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
lockOrUnlock() {
|
||||
if (this.selected.lock) {
|
||||
commitOperate(menuOperate.Signal.lock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
commitOperate(menuOperate.Signal.unlock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 信号封锁
|
||||
lock() {
|
||||
commitOperate(menuOperate.Signal.lock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号解封
|
||||
unlock() {
|
||||
commitOperate(menuOperate.Signal.unlock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
commitOperate(menuOperate.Signal.humanControl, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询进路状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
passWordCommit(data) {
|
||||
const step = {
|
||||
operation: data.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
switch (data.operation) {
|
||||
case OperationEvent.Signal.guide.menu.operation:
|
||||
this.$refs.routeGuide.doShow(data, data.selected, data.routesList);
|
||||
break;
|
||||
case OperationEvent.Signal.humanTrainRoute.button.operation:
|
||||
Object.assign(data, {operation: OperationEvent.Signal.humanTrainRoute.menu.operation});
|
||||
this.$refs.routeControl.doShow(data, data.selected);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
213
src/jmapNew/theme/datie_jd1a/menus/menuStation.vue
Normal file
213
src/jmapNew/theme/datie_jd1a/menus/menuStation.vue
Normal file
@ -0,0 +1,213 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<draw-select ref="drawSelect" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import DrawSelect from './dialog/drawSelect';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
|
||||
export default {
|
||||
name: 'StationMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SetFault,
|
||||
NoticeInfo,
|
||||
PasswordBox,
|
||||
DrawSelect
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
// {
|
||||
// label: '图纸调用',
|
||||
// handler: this.drawingCall
|
||||
// },
|
||||
// {
|
||||
// label: '基础设备培训',
|
||||
// handler: this.baDeTrCall
|
||||
// }
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置ZC故障',
|
||||
handler: this.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消ZC故障',
|
||||
handler: this.cancelStoppage
|
||||
},
|
||||
{
|
||||
label: '重启联锁机',
|
||||
handler: this.restartInterlock,
|
||||
cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function (val) {
|
||||
const selected = this.$store.state.menuOperation.selected;
|
||||
const subtype = this.$store.state.menuOperation.subType;
|
||||
if (subtype == 'veryControlButton' && selected._type == 'Station') {
|
||||
this.veryControlClick(selected);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
drawingCall() {
|
||||
this.$refs.drawSelect.doShow(this.selected, 'drawing');
|
||||
},
|
||||
baDeTrCall() {
|
||||
this.$refs.drawSelect.doShow(this.selected, 'baDeTr');
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
restartInterlock() {
|
||||
commitOperate(menuOperate.Station.restartInterlockMachine, { stationCode: this.selected.code }, 3).then(({valid, operate}) => {
|
||||
}).catch(error=>{
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
|
||||
if (valid && this.selected.zcCode) {
|
||||
const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected);
|
||||
} else if (!this.selected.zcCode) {
|
||||
console.error('该车站无zc设备');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
|
||||
if (valid && this.selected.zcCode) {
|
||||
const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected);
|
||||
} else if (!this.selected.zcCode) {
|
||||
console.error('该车站无zc设备');
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
},
|
||||
handlerOpenPdf(elem) {
|
||||
const url = `https://joylink.club/oss/projects/wjls/${this.selected.jp}/${elem.file}`;
|
||||
window.open(url, '_blank');
|
||||
},
|
||||
// 非常站控
|
||||
veryControlClick(selected) {
|
||||
// stationCode车站编号、pressDown:1按下、0抬起
|
||||
const pressDown = selected.controlMode == 'Interlock' ? 0 : 1;
|
||||
commitOperate(menuOperate.StationControl.requestVeryControl, { stationCode: selected.code, pressDown:pressDown }, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
operate.nextCmdType = CMD.ControlConvertMenu.CMD_CM_SPECIAL_STATION_CONTROL;
|
||||
operate['operateNext'] = OperationEvent.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
clearOperate() { // 清除操作
|
||||
// Handler.clear(); // 清空操作组
|
||||
// this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
},
|
||||
// 输入密码正确回调
|
||||
passWordCommit(data) {
|
||||
let operate = {};
|
||||
if (data.nextCmdType) {
|
||||
operate = {
|
||||
over: true,
|
||||
operation: data.operation,
|
||||
cmdType: data.nextCmdType,
|
||||
param: data.param
|
||||
};
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
220
src/jmapNew/theme/datie_jd1a/menus/menuStationStand.vue
Normal file
220
src/jmapNew/theme/datie_jd1a/menus/menuStationStand.vue
Normal file
@ -0,0 +1,220 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<stand-control ref="standControl" />
|
||||
<stand-detail ref="standDetail" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StandControl from './dialog/standControl';
|
||||
import StandDetail from './dialog/standDetail';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
StandControl,
|
||||
StandDetail,
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
// label: '设置扣车',
|
||||
// handler: this.setDetainTrain,
|
||||
// cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
// },
|
||||
// {
|
||||
// label: '取消扣车',
|
||||
// handler: this.cancelDetainTrain,
|
||||
// cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
// },
|
||||
// {
|
||||
// label: '设置跳停',
|
||||
// handler: this.setJumpStop,
|
||||
// cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
// },
|
||||
// {
|
||||
// label: '取消跳停',
|
||||
// handler: this.cancelJumpStop,
|
||||
// cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
// },
|
||||
// {
|
||||
// label: '设置停站时间',
|
||||
// handler: this.setStopTime,
|
||||
// cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
// },
|
||||
// {
|
||||
// label: '设置站间运行等级',
|
||||
// handler: this.setRunLevel,
|
||||
// cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
// },
|
||||
// {
|
||||
// label: '显示站台信息',
|
||||
// handler: this.detail,
|
||||
// cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 停站时间控制
|
||||
setStopTime() {
|
||||
commitOperate(menuOperate.StationStand.setStopTime, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置运行等级
|
||||
setRunLevel() {
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询站台状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.StationStand.detail, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standDetail.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,26 +1,46 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" pop-class="chengdou-03__systerm" />
|
||||
<switch-control ref="switchControl" pop-class="chengdou-03__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<switch-hook-lock ref="switchHookLock" pop-class="chengdou-03__systerm" />
|
||||
<set-fault ref="setFault" pop-class="datie-02__systerm" />
|
||||
<draw-select ref="drawSelect" />
|
||||
<route-cancel ref="routeCancel" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
// OperateMode
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import DrawSelect from './dialog/drawSelect';
|
||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import SwitchHookLock from '@/jmapNew/theme/components/menus/dialog/switchHookLock';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||
import RouteCancel from './menuDialog/routeCancel';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SectionControl,
|
||||
SwitchControl,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault,
|
||||
SwitchHookLock,
|
||||
DrawSelect,
|
||||
RouteCancel
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
@ -34,73 +54,201 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '总定',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
{
|
||||
label: '总反',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '单锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
{
|
||||
label: '单解',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '封闭',
|
||||
handler: this.block,
|
||||
{
|
||||
label: '定操',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
{
|
||||
label: '反操',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
{
|
||||
label: '单锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
{
|
||||
label: '单解',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '封锁',
|
||||
handle: this.block,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
{
|
||||
label: '解封',
|
||||
handler: this.unblock,
|
||||
{
|
||||
label: '解封',
|
||||
handle: this.unblock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
label: '区故解',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '岔前 分路不良',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '定位 分路不良',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '反位 分路不良',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '接触网定位无电',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '接触网反位无电',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '添加调机号',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '删除调机号',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '修改调机号',
|
||||
handle: ''
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
// label: '单操到定位',
|
||||
// handler: this.locate,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
// },
|
||||
// {
|
||||
// label: '单操到反位',
|
||||
// handler: this.reverse,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
// },
|
||||
// {
|
||||
// label: '道岔单锁',
|
||||
// handler: this.lock,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
// },
|
||||
// {
|
||||
// label: '道岔解锁',
|
||||
// handler: this.unlock,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
// },
|
||||
// {
|
||||
// label: '道岔封锁',
|
||||
// handler: this.block,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
// },
|
||||
// {
|
||||
// label: '道岔解封',
|
||||
// handler: this.unblock,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
// },
|
||||
// {
|
||||
// label: '区故解',
|
||||
// handler: this.fault,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
// }
|
||||
// {
|
||||
// label: '属性',
|
||||
// handler: this.undeveloped,
|
||||
// auth: { station: true, center: true },
|
||||
// cmdType: CMD.Switch.
|
||||
// }
|
||||
]
|
||||
}
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && (!this.buttonOperation || this.$route.query.ctc)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
// 道岔总定
|
||||
locate() {
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
const menuHook = [{
|
||||
label: '道岔钩锁',
|
||||
handler: this.hookLock
|
||||
}];
|
||||
this.menu = [...this.menuForce, ...menuHook];
|
||||
} else {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
// 道岔总反
|
||||
reverse() {
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
drawingCall() {
|
||||
this.$refs.drawSelect.doShow(this.selected, 'drawing');
|
||||
},
|
||||
baDeTrCall() {
|
||||
this.$refs.drawSelect.doShow(this.selected, 'baDeTr');
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -122,6 +270,7 @@ export default {
|
||||
},
|
||||
// 道岔封锁
|
||||
block() {
|
||||
debugger
|
||||
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
@ -136,34 +285,54 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
// 道岔故障解锁/ 区故解
|
||||
fault() {
|
||||
commitOperate(menuOperate.Switch.fault, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
// 区段激活
|
||||
active() {
|
||||
commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
// 故障模式菜单列表
|
||||
// if (this.operatemode === OperateMode.FAULT) {
|
||||
// if (!this.$store.state.scriptRecord.bgSet) {
|
||||
// const menuHook = [{
|
||||
// label: '道岔钩锁',
|
||||
// handler: this.hookLock
|
||||
// }];
|
||||
// this.menu = [...this.menuForce, ...menuHook];
|
||||
// } else {
|
||||
// this.menu = this.menuForce;
|
||||
// }
|
||||
// }
|
||||
|
||||
// 单操到定位
|
||||
locate() {
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
this.$refs.routeCancel.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 单操到反位
|
||||
reverse() {
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
this.$refs.routeCancel.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔钩锁
|
||||
hookLock() {
|
||||
this.$refs.switchHookLock.doShow(this.selected);
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
211
src/jmapNew/theme/datie_jd1a/menus/menuTool.vue
Normal file
211
src/jmapNew/theme/datie_jd1a/menus/menuTool.vue
Normal file
@ -0,0 +1,211 @@
|
||||
<template>
|
||||
<div id="menuTool">
|
||||
<div class="nav">
|
||||
<div v-for="(item,index) in tools" :key="index" class="tool">
|
||||
<img :src="item.src" :alt="item.title">
|
||||
</div>
|
||||
<img class="logo" :src="logoImg">
|
||||
<system-time
|
||||
v-if="isShowSystemTime"
|
||||
class="time"
|
||||
:time="time"
|
||||
:zoom="2"
|
||||
:width="180"
|
||||
:height="48"
|
||||
:fine="2"
|
||||
:top="6"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
|
||||
export default {
|
||||
name: 'MenuTool',
|
||||
components: {
|
||||
SystemTime
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
logoImg: logo_,
|
||||
time: '00:0000',
|
||||
tools: [
|
||||
{
|
||||
title: '服务器1',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '服务器2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '主调',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台3',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '大屏',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '维护工作站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '运行图显示人工站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '跳停',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '扣车',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车报警',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isShowSystemTime() {
|
||||
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
const date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initTools();
|
||||
},
|
||||
methods: {
|
||||
initTools() {
|
||||
this.tools = [];
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
$top: 30px;
|
||||
$width: 50px;
|
||||
$height: 50px;
|
||||
|
||||
#menuTool {
|
||||
z-index: 5;
|
||||
position: absolute;
|
||||
top: $top;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: block;
|
||||
height: $height;
|
||||
line-height: $height;
|
||||
color: #0000;
|
||||
background: #ECE9D8;
|
||||
border: 1px solid #B6BCCC !important;
|
||||
border-bottom: 2px solid #B6BCCC !important;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.tool {
|
||||
background: #808080;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
float: left;
|
||||
height: $height - 2;
|
||||
width: $width + 15;
|
||||
margin: 1px;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding-top: 4px;
|
||||
height: $height - 10;
|
||||
width: $width - 10;
|
||||
}
|
||||
}
|
||||
|
||||
.time {
|
||||
position: relative;
|
||||
float: right;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
position: relative;
|
||||
float: right;
|
||||
text-align: center;
|
||||
margin: 1px 10px;
|
||||
height: $height - 4;
|
||||
width: $width - 4;
|
||||
}
|
||||
</style>
|
614
src/jmapNew/theme/datie_jd1a/menus/menuTrain.vue
Normal file
614
src/jmapNew/theme/datie_jd1a/menus/menuTrain.vue
Normal file
@ -0,0 +1,614 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<train-control ref="trainControl" />
|
||||
<train-edit-number ref="trainEditNumber" />
|
||||
<train-create-number ref="trainCreateNumber" />
|
||||
<train-move-number ref="trainMoveNumber" />
|
||||
<train-delete-number ref="trainDeleteNumber" />
|
||||
<train-detail-info ref="trainDetailInfo" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
<!-- <train-set-plan ref="trainSetPlan" /> -->
|
||||
<update-trip ref="updateTrip" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import TrainControl from './dialog/trainControl';
|
||||
import TrainEditNumber from './dialog/trainEditNumber';
|
||||
import TrainMoveNumber from './dialog/trainMoveNumber';
|
||||
import TrainCreateNumber from './dialog/trainCreateNumber';
|
||||
import TrainDeleteNumber from './dialog/trainDeleteNumber';
|
||||
import TrainDetailInfo from './dialog/trainDetailInfo';
|
||||
// import TrainSetPlan from './dialog/trainSetPlan';
|
||||
import UpdateTrip from './dialog/updateTrip';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'MenuTrain',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
TrainControl,
|
||||
TrainEditNumber,
|
||||
TrainMoveNumber,
|
||||
TrainCreateNumber,
|
||||
TrainDeleteNumber,
|
||||
TrainDetailInfo,
|
||||
SetFault,
|
||||
UpdateTrip
|
||||
// TrainSetPlan
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
// {
|
||||
// label: '设置计划车',
|
||||
// handler: this.setPlanTrain,
|
||||
// cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN
|
||||
// },
|
||||
{
|
||||
label: '变更车次号',
|
||||
handler: this.modifyTripNumber,
|
||||
cmdType: CMD.Train.CMD_TRAIN_UPDATE_TRIP_NUMBER_TRAIN
|
||||
},
|
||||
{
|
||||
label: '删车次号',
|
||||
handler: this.removeTripNumber,
|
||||
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '变更车次号',
|
||||
handler: this.modifyTripNumber,
|
||||
cmdType: CMD.Train.CMD_TRAIN_UPDATE_TRIP_NUMBER_TRAIN
|
||||
}
|
||||
// {
|
||||
// label: '设置计划车',
|
||||
// handler: this.setPlanTrain,
|
||||
// cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN
|
||||
// }
|
||||
// {
|
||||
// label: '新建车组号',
|
||||
// handler: this.createTrainNo
|
||||
// },
|
||||
// {
|
||||
// label: '移动车组号',
|
||||
// handler: this.moveTrainNo
|
||||
// },
|
||||
// {
|
||||
// label: '删除车组号',
|
||||
// handler: this.deleteTrainNo
|
||||
// },
|
||||
// {
|
||||
// label: '修改车组号',
|
||||
// handler: this.editTrainNo
|
||||
// },
|
||||
// {
|
||||
// label: '设计划车',
|
||||
// handler: this.setPlanTrainId
|
||||
// },
|
||||
// {
|
||||
// label: '设目的地',
|
||||
// handler: this.destinationTrainId
|
||||
// },
|
||||
// {
|
||||
// label: '设人工车',
|
||||
// handler: this.artificialTrainId
|
||||
// },
|
||||
// {
|
||||
// label: '设特殊人工车',
|
||||
// handler: this.undeveloped
|
||||
// },
|
||||
// {
|
||||
// label: '详细列车信息',
|
||||
// handler: this.detailTrainInfo
|
||||
// },
|
||||
// {
|
||||
// label: '属性',
|
||||
// handler: this.undeveloped
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement
|
||||
}
|
||||
],
|
||||
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
|
||||
},
|
||||
{
|
||||
label: '进路闭塞法行车',
|
||||
handler: this.routeBlockRun
|
||||
},
|
||||
{
|
||||
label: '越引导信号行驶',
|
||||
handler: this.handleOverFuideSignal
|
||||
},
|
||||
{
|
||||
label: '越红灯行驶',
|
||||
handler: this.handleOverEedLight
|
||||
},
|
||||
// {
|
||||
// label: '驾驶至',
|
||||
// handler: this.handleDriveTo
|
||||
// },
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.handleTurnDirection
|
||||
},
|
||||
{
|
||||
label: '发车',
|
||||
handler: this.handleDepartTrain
|
||||
},
|
||||
{
|
||||
label: '停车',
|
||||
handler: this.handleParkingTrain
|
||||
}
|
||||
],
|
||||
menuSpeed: [
|
||||
{
|
||||
label: '确认运行至前方站',
|
||||
handler: this.limitSpeed
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode',
|
||||
'memberList'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function () {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Train) && (!this.buttonOperation || this.$route.query.ctc)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
console.log(this.menu, '================');
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
this.menu = [...this.menuForce, ...this.menuDirective];
|
||||
} else {
|
||||
this.menu = [...this.menuForce];
|
||||
}
|
||||
}
|
||||
// 指令模式列表
|
||||
if (this.operatemode === OperateMode.DIRECTIVE) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
this.menu = [...this.menuDirective];
|
||||
}
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
},
|
||||
nextStation() {
|
||||
this.trainSend('Drive_Ahead');
|
||||
},
|
||||
routeBlockRun() {
|
||||
this.trainSend('Route_Block_Drive');
|
||||
},
|
||||
handleOverFuideSignal() {
|
||||
this.trainSend('Drive_Through_The_Guide_Signal');
|
||||
},
|
||||
handleOverEedLight() {
|
||||
this.trainSend('Drive_Through_The_Red_Light');
|
||||
},
|
||||
trainSend(type) {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: type,
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 限速行驶
|
||||
limitSpeed() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.limitSpeed.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 设置计划车
|
||||
// setPlanTrain() {
|
||||
// const operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
// param: {}
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainSetPlan.doShow(operate, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 设计划车
|
||||
setPlanTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.setPlanTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainControl.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设目的地车
|
||||
destinationTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.destinationTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainControl.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设人工车
|
||||
artificialTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.artificialTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainControl.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 详细列车信息
|
||||
detailTrainInfo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.detailTrainInfo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDetailInfo.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 创建车组号
|
||||
createTrainNo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.createTrainNo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainCreateNumber.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除车组号
|
||||
deleteTrainNo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.deleteTrainNo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDeleteNumber.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改车组号
|
||||
editTrainNo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.editTrainNo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainEditNumber.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 移动车组号
|
||||
moveTrainNo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainNo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainMoveNumber.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
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);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 换端
|
||||
handleTurnDirection() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Turn_Direction',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate}) => {
|
||||
}).catch((error)=> {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleDepartTrain() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Depart_Train',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate}) => {
|
||||
}).catch((error)=> {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleParkingTrain() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Parking_Train',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate}) => {
|
||||
}).catch((error)=> {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
|
||||
},
|
||||
modifyTripNumber() {
|
||||
commitOperate(menuOperate.Train.updateTrip, {groupNumber:this.selected.groupNumber}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.updateTrip.doShow(operate, this.selected.tripNumber);
|
||||
}
|
||||
});
|
||||
},
|
||||
removeTripNumber() {
|
||||
commitOperate(menuOperate.Train.removeTrip, {groupNumber:this.selected.groupNumber}, 3).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
}
|
||||
}).catch((error)=> {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
216
src/jmapNew/theme/datie_jd1a/menus/passiveDialog/alarm.vue
Normal file
216
src/jmapNew/theme/datie_jd1a/menus/passiveDialog/alarm.vue
Normal file
@ -0,0 +1,216 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm alarm-detail"
|
||||
:title="level+'级告警详细信息'"
|
||||
:visible.sync="show"
|
||||
width="760px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form label-width="80px" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="线路名称">
|
||||
<el-input v-model="model.lineName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位名称">
|
||||
<el-input v-model="model.unitName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="模块名称">
|
||||
<el-input v-model="model.moduleName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="报警时间">
|
||||
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item>
|
||||
<span slot="label">等 级</span>
|
||||
<el-input v-model="model.level" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="确认状态">
|
||||
<el-input v-model="model.confirm" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9" class="alarm-type">
|
||||
<el-form-item>
|
||||
<span slot="label">类  型</span>
|
||||
<el-input v-model="model.type" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="15" class="alarm-child-type">
|
||||
<el-form-item label="子类型">
|
||||
<el-input v-model="model.childType" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="时间摘要">
|
||||
<el-input v-model="model.timeSummary" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="推荐操作">
|
||||
<el-input v-model="model.recommendedOperation" disabled />
|
||||
</el-form-item>
|
||||
<div class="alarm-detail-description">
|
||||
<span> 报警详细描述</span><br>
|
||||
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" placeholder="请输入内容" disabled />
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="3" :offset="9">
|
||||
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确 定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<span style="line-height:26px">未确认{{ level }}级报警数目:1</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'AlarmDetail',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
level: 0,
|
||||
operate: null,
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
},
|
||||
model: {
|
||||
lineName: '',
|
||||
unitName: '',
|
||||
moduleName: '',
|
||||
level: '',
|
||||
confirm: '',
|
||||
alarmDate: '',
|
||||
type: '',
|
||||
childType: '',
|
||||
timeSummary: '',
|
||||
recommendedOperation: '',
|
||||
alarmDetail: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'name'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// '$store.state.socket.msgHead': function (elem) {
|
||||
// if (elem && elem.hasOwnProperty('success')) {
|
||||
// if (elem.success) {
|
||||
// const operate = this.$store.state.training.operate;
|
||||
// console.log(elem);
|
||||
// elem.stationCodes.forEach(stationCode => {
|
||||
// const station = this.$store.getters['map/getDeviceByCode'](elem.stationCodes);
|
||||
// const newOperate = {
|
||||
// type: operate.type,
|
||||
// name: station.name
|
||||
// };
|
||||
|
||||
// this.doShow(newOperate);
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.model = {
|
||||
lineName: this.name,
|
||||
unitName: this.operate.name,
|
||||
moduleName: 'CMM控制模式转换模式',
|
||||
level: '0级告警',
|
||||
confirm: '确认状态',
|
||||
alarmDate: new Date(),
|
||||
type: '系统事件',
|
||||
childType: '依据信号设备操作命令设置控制模式',
|
||||
timeSummary: '控制模式摘要',
|
||||
recommendedOperation: '',
|
||||
alarmDetail: `控制模式转换:${this.operate.name}由中控转为站控模式!`
|
||||
};
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
if (this.dialogShow) {
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
}
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.alarm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.alarm.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
isClose() {
|
||||
return this.dialogShow;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.alarm-type .el-input {
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
.alarm-detail-description {
|
||||
padding-left: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
109
src/jmapNew/theme/datie_jd1a/menus/passiveDialog/timeout.vue
Normal file
109
src/jmapNew/theme/datie_jd1a/menus/passiveDialog/timeout.vue
Normal file
@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm cmd-notice"
|
||||
title="操作命令提示"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<span>{{ name }},{{ msg }}!</span>
|
||||
<el-row class="button-group">
|
||||
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确认</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
export default {
|
||||
name: 'CmdNotice',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
name: '',
|
||||
msg: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// '$store.state.socket.msgHead': function (elem) {
|
||||
// if (elem && (elem.hasOwnProperty('success') || elem.hasOwnProperty('timeout'))) {
|
||||
// let operate = this.$store.state.training.operate;
|
||||
// let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
||||
// let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||
// let newOperate = {
|
||||
// type: operate.type,
|
||||
// name: station.name,
|
||||
// }
|
||||
|
||||
// if (elem.timeout) {
|
||||
// newOperate['msg'] = '请求超时';
|
||||
// this.doShow(newOperate);
|
||||
// } else if (!elem.success) {
|
||||
// newOperate['msg'] = '请求拒绝';
|
||||
// this.doShow(newOperate);
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.name = this.operate.name || '';
|
||||
this.msg = this.operate.msg || '';
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
if (this.dialogShow) {
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
}
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.notice.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.notice.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
isClose() {
|
||||
return this.dialogShow;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
1125
src/jmapNew/theme/datie_jd1a/menus/runplanPane.vue
Normal file
1125
src/jmapNew/theme/datie_jd1a/menus/runplanPane.vue
Normal file
File diff suppressed because it is too large
Load Diff
74
src/jmapNew/theme/datie_jd1a/planConfig.js
Normal file
74
src/jmapNew/theme/datie_jd1a/planConfig.js
Normal file
@ -0,0 +1,74 @@
|
||||
import { convertSheetToList } from '../parser/util';
|
||||
|
||||
export default {
|
||||
/** 运行图解析方式*/
|
||||
type: 'Ratio',
|
||||
|
||||
/** 边缘高度*/
|
||||
edge: 600,
|
||||
|
||||
/** 间隔高度*/
|
||||
multiple: 1,
|
||||
|
||||
/** 偏移时间*/
|
||||
translation: 60 * 60 * 2,
|
||||
|
||||
/** excel解析配置*/
|
||||
excelConfig: {
|
||||
beginRow: 1,
|
||||
beginCol: 0,
|
||||
fieldNum: 8,
|
||||
sepField: '车次',
|
||||
columns: {
|
||||
'车站名称': { key: 'stationName', formatter: (val) => { return val; } },
|
||||
'到点': { key: 'arriveTime', formatter: (val) => { return val; } },
|
||||
'发点': { key: 'departureTime', formatter: (val) => { return val; } }
|
||||
}
|
||||
},
|
||||
|
||||
/** 解析excel数据转换为Json后台数据*/
|
||||
importData(Sheet, JsonData) {
|
||||
var dataList = convertSheetToList(Sheet, false);
|
||||
var needList = Object.keys(this.excelConfig.columns);
|
||||
if (dataList && dataList.length) {
|
||||
for (var rowIndex = this.excelConfig.beginRow; rowIndex < dataList.length; rowIndex += 1) {
|
||||
for (var colIndex = this.excelConfig.beginCol; colIndex < dataList[this.excelConfig.beginCol].length; colIndex += this.excelConfig.fieldNum + 1) {
|
||||
var tripNew, tripObj;
|
||||
var stationObj = {};
|
||||
|
||||
tripNew = tripObj = { code: '', arrivalList: [] };
|
||||
for (var index = 0; index < this.excelConfig.fieldNum; index += 1) {
|
||||
var title = dataList[0][colIndex + index];
|
||||
var value = dataList[rowIndex][colIndex + index];
|
||||
|
||||
if (title && value) {
|
||||
var titleStr = `${title}`.trim();
|
||||
var valueStr = `${value}`.trim();
|
||||
|
||||
if (titleStr.includes(this.excelConfig.sepField)) {
|
||||
tripObj.code = valueStr;
|
||||
JsonData.forEach(elem => {
|
||||
if (elem.code == valueStr) {
|
||||
tripObj = elem;
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 取需要的字段
|
||||
if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) {
|
||||
stationObj[this.excelConfig.columns[titleStr].key] = this.excelConfig.columns[titleStr].formatter(valueStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tripObj.arrivalList.push(stationObj);
|
||||
if (tripObj.code && tripObj == tripNew) {
|
||||
JsonData.push(tripObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return JsonData;
|
||||
}
|
||||
};
|
@ -29,7 +29,7 @@ export function handlerUrl(data) {
|
||||
// BASE_API = 'http://114.116.51.125/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.152:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.94:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.15:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.201:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
|
Loading…
Reference in New Issue
Block a user