Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
b804f78dae
@ -241,7 +241,8 @@ class SkinCode extends defaultStyle {
|
||||
borderColor:'', // 字体边框颜色
|
||||
textBorderWidth:0, // 字体边框宽度
|
||||
isSpecialType:true, // 特雷兹特殊类型
|
||||
noneModeColor:'#ff0' // 无模式时字体颜色
|
||||
noneModeColor:'#ff0', // 无模式时字体颜色
|
||||
currentModeColor:'#0f0' // 当前被控制时字体颜色
|
||||
},
|
||||
|
||||
kmPostShow: false, // 公里标显示
|
||||
|
@ -31,10 +31,10 @@ export default class EMouse extends Group {
|
||||
if (e.target && e.target._subType == 'Text') {
|
||||
this.text.show();
|
||||
} else {
|
||||
this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor);
|
||||
this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor);
|
||||
this.device.control.setTextBorder(true);
|
||||
this.device.control.setArcBorder(true);
|
||||
// this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor);
|
||||
// this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor);
|
||||
// this.device.control.setTextBorder(true);
|
||||
// this.device.control.setArcBorder(true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,10 +43,10 @@ export default class EMouse extends Group {
|
||||
if (e.target && e.target._subType == 'Text') {
|
||||
this.text.hide();
|
||||
} else {
|
||||
this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor);
|
||||
this.device.control.setTextColor('#FFFFFF');
|
||||
this.device.control.setTextBorder(false);
|
||||
this.device.control.setArcBorder(false);
|
||||
// this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor);
|
||||
// this.device.control.setTextColor('#FFFFFF');
|
||||
// this.device.control.setTextBorder(false);
|
||||
// this.device.control.setArcBorder(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -414,9 +414,7 @@ export default class Station extends Group {
|
||||
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.greenColor);
|
||||
this.centerControl && this.centerControl.setTextColor(this.style.Station.StationControl.lamp.greenColor); // 文字颜色
|
||||
if (this.style.Station.stationText.isSpecialType) {
|
||||
// simulationRoleList
|
||||
} else {
|
||||
if (!this.style.Station.stationText.isSpecialType) {
|
||||
this.stationText.setColor('#1fdc1f');
|
||||
}
|
||||
|
||||
@ -445,9 +443,7 @@ export default class Station extends Group {
|
||||
// this.subheadText && this.subheadText.setStyle('textFill', '#fff');
|
||||
// }
|
||||
// }
|
||||
if (this.style.Station.stationText.isSpecialType) {
|
||||
|
||||
} else {
|
||||
if (!this.style.Station.stationText.isSpecialType) {
|
||||
this.stationText.setColor('#fff');
|
||||
}
|
||||
}
|
||||
@ -465,9 +461,7 @@ export default class Station extends Group {
|
||||
// this.subheadText && this.subheadText.setStyle('textFill', '#fff');
|
||||
// }
|
||||
// }
|
||||
if (this.style.Station.stationText.isSpecialType) {
|
||||
|
||||
} else {
|
||||
if (!this.style.Station.stationText.isSpecialType) {
|
||||
this.stationText.setColor('#fff');
|
||||
}
|
||||
}
|
||||
@ -490,9 +484,6 @@ export default class Station extends Group {
|
||||
if (this.style.Station.stationText.noneModeFlash) {
|
||||
this.stationText.setAnimateStyle(this.noneBeforeMode);
|
||||
}
|
||||
if (this.style.Station.stationText.isSpecialType) {
|
||||
this.stationText.setColor(this.style.Station.stationText.noneModeColor);
|
||||
}
|
||||
}
|
||||
|
||||
recover() {
|
||||
@ -508,7 +499,8 @@ export default class Station extends Group {
|
||||
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
if (this.style.Station.stationText.isSpecialType) {
|
||||
|
||||
this.stationText.setColor(this.style.Station.stationText.noneModeColor);
|
||||
// sationEle.controller
|
||||
} else {
|
||||
this.stationText && this.stationText.stopAnimate();
|
||||
}
|
||||
@ -519,6 +511,8 @@ export default class Station extends Group {
|
||||
if (!this.isShowShape) return;
|
||||
this.recover();
|
||||
model.controlMode && this['handle' + model.controlMode]();
|
||||
model.controller && this.handleComplexControl(model.controller);
|
||||
|
||||
if (this.style.Station.syncCentralizeStation && model.controlMode && model.centralized) {
|
||||
model.chargeStationCodeList.forEach(item => {
|
||||
const device = store.getters['map/getDeviceByCode'](item);
|
||||
@ -537,6 +531,16 @@ export default class Station extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
handleComplexControl(controller) {
|
||||
// debugger;
|
||||
// store.state.user.id
|
||||
// if (controller == ) {
|
||||
// this.stationText.setColor(this.style.Station.stationText.currentModeColor);
|
||||
// } else {
|
||||
// debugger;
|
||||
// }
|
||||
}
|
||||
|
||||
// setState(model) {
|
||||
// if (!this.isShowShape) return;
|
||||
// // // 新版地图使用新版状态变更方式
|
||||
|
@ -152,7 +152,10 @@ export default {
|
||||
/** 如果是备用车,按车次添加线*/
|
||||
if (train.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
opt.name += j;
|
||||
// opt.name += j;
|
||||
const length = opt.name.length;
|
||||
const optName = parseInt(opt.name) + j;
|
||||
opt.name = optName.toString().padStart(length, '0');
|
||||
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
if (model) {
|
||||
models.push(model);
|
||||
|
@ -152,7 +152,10 @@ export default {
|
||||
/** 如果是备用车,按车次添加线*/
|
||||
if (train.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
opt.name += j;
|
||||
// opt.name += j;
|
||||
const length = opt.name.length;
|
||||
const optName = parseInt(opt.name) + j;
|
||||
opt.name = optName.toString().padStart(length, '0');
|
||||
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
if (model) {
|
||||
models.push(model);
|
||||
|
@ -127,7 +127,10 @@ export default {
|
||||
/** 如果是备用车,按车次添加线*/
|
||||
if (train.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
opt.name += j;
|
||||
// opt.name += j;
|
||||
const length = opt.name.length;
|
||||
const optName = parseInt(opt.name) + j;
|
||||
opt.name = optName.toString().padStart(length, '0');
|
||||
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
if (model) {
|
||||
models.push(model);
|
||||
|
@ -421,6 +421,11 @@ export const menuOperate = {
|
||||
setPreReset: {
|
||||
operation: OperationEvent.Station.setPreReset.menu.operation,
|
||||
cmdType: CMD.Station.CMD_STATION_PRE_RESET
|
||||
},
|
||||
// 取消计轴预复位
|
||||
cancelPreReset: {
|
||||
operation: OperationEvent.Station.cancelPreReset.menu.operation,
|
||||
cmdType: CMD.Station.CMD_STATION_PRE_RESET
|
||||
}
|
||||
},
|
||||
// 设置/取消强制点灯
|
||||
|
@ -147,7 +147,10 @@ export default {
|
||||
/** 如果是备用车,按车次添加线*/
|
||||
if (train.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
opt.name += j;
|
||||
// opt.name += j;
|
||||
const length = opt.name.length;
|
||||
const optName = parseInt(opt.name) + j;
|
||||
opt.name = optName.toString().padStart(length, '0');
|
||||
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
if (model) {
|
||||
models.push(model);
|
||||
|
@ -327,7 +327,10 @@ export default {
|
||||
/** 如果是备用车,按车次添加线*/
|
||||
if (train.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
opt.name += j;
|
||||
// opt.name += j;
|
||||
const length = opt.name.length;
|
||||
const optName = parseInt(opt.name) + j;
|
||||
opt.name = optName.toString().padStart(length, '0');
|
||||
// var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
|
||||
if (model) {
|
||||
|
@ -209,7 +209,10 @@ export default {
|
||||
/** 如果是备用车,按车次添加线*/
|
||||
if (train.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
opt.name += j;
|
||||
// opt.name += j;
|
||||
const length = opt.name.length;
|
||||
const optName = parseInt(opt.name) + j;
|
||||
opt.name = optName.toString().padStart(length, '0');
|
||||
// var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
|
||||
if (model) {
|
||||
|
@ -217,7 +217,10 @@ export default {
|
||||
/** 如果是备用车,按车次添加线*/
|
||||
if (train.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
opt.name += j;
|
||||
// opt.name += j;
|
||||
const length = opt.name.length;
|
||||
const optName = parseInt(opt.name) + j;
|
||||
opt.name = optName.toString().padStart(length, '0');
|
||||
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
// var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
|
||||
if (model) {
|
||||
|
@ -9,44 +9,44 @@
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-row>
|
||||
<el-col></el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-button @click="commit">确定</el-button>
|
||||
<el-button @click="doClose">关闭</el-button>
|
||||
<el-col :span="8" style="font-size: 16px;color: #000;">集中站</el-col>
|
||||
<el-col :span="16" style="font-size: 16px;" class="shadow-box">{{ stationName }}</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="8" style="font-size: 16px;color: #000;">按钮</el-col>
|
||||
<el-col :span="16" style="font-size: 16px;" class="shadow-box">{{ buttonName }}</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="12">
|
||||
<el-button @click="confirm">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button @click="doClose">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-tip ref="confirmTip" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import ConfirmTip from './childDialog/confirmTip';
|
||||
export default {
|
||||
name: 'ConfirmTip',
|
||||
name: 'ButtonDown',
|
||||
components: {
|
||||
ConfirmTip
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
message: '',
|
||||
operation: '',
|
||||
title: '按钮按下',
|
||||
value1: '',
|
||||
value2: '',
|
||||
options: [
|
||||
{ label: '车站折返变通', value: '1' },
|
||||
{ label: '站遥控按钮', value: '2' },
|
||||
{ label: 'FSA', value: '3'},
|
||||
{ label: 'NJYXLZ', value: '4'},
|
||||
{ label: '强制点灯', value: '5' }
|
||||
],
|
||||
time: '',
|
||||
status: '',
|
||||
confirmIndex: false,
|
||||
timer: null,
|
||||
selected: null
|
||||
stationName: '',
|
||||
buttonName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -61,48 +61,33 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
doShow(operate,selected) {
|
||||
this.message = operate.message || '';
|
||||
this.selected = selected;
|
||||
doShow(operate, selected) {
|
||||
this.dialogShow = true;
|
||||
this.confirmIndex = false;
|
||||
this.operation = operate.operation;
|
||||
if (this.operation === OperationEvent.StationLight.SetOrCancelForceLight.confirm1.operation) {
|
||||
this.value1 = '5';
|
||||
this.stationName = selected.name;
|
||||
if (this.operation === OperationEvent.Station.setPreReset.confirm.operation || this.operation === OperationEvent.Station.cancelPreReset.confirm.operation) {
|
||||
this.buttonName = '计轴复位';
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
if (this.timer) { clearInterval(this.timer); }
|
||||
},
|
||||
confirm1() {
|
||||
this.status = '发送First request消息成功,请等待服务器!';
|
||||
setTimeout(() => {
|
||||
this.confirmIndex = true;
|
||||
this.time = 30;
|
||||
this.status = '收到First request消息!';
|
||||
this.timer = setInterval(() => {
|
||||
this.time = this.time - 1;
|
||||
if (this.time < 0) { this.doClose(); }
|
||||
}, 1000);
|
||||
}, 1000);
|
||||
},
|
||||
confirm2() {
|
||||
if (this.value1 !== this.value2) {
|
||||
this.status = '确认操作失败!';
|
||||
return;
|
||||
}
|
||||
if (this.operation === OperationEvent.StationLight.SetOrCancelForceLight.confirm1.operation) {
|
||||
commitOperate({operate: this.operation, cmdType: CMD.Station.CMD_STATION_SET_OR_CANCEL_FORCE_PHYSICAL_SIGNAL}, {}, 2).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.status = '发送 Second Confirm消息成功,请等待服务器!';
|
||||
setTimeout(() => {
|
||||
this.doClose();
|
||||
}, 1000);
|
||||
|
||||
confirm() {
|
||||
commitOperate({operation: this.operation}, {}, 1).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
const nextOperate = {
|
||||
operation: this.operation
|
||||
};
|
||||
if (this.operation === OperationEvent.Station.setPreReset.confirm.operation) {
|
||||
nextOperate.message = `命令:按钮按下/设置操作<br/>集中站:${this.stationName}<br/>按钮:计轴复位`;
|
||||
} else if (this.operation === OperationEvent.Station.cancelPreReset.confirm.operation) {
|
||||
nextOperate.message = `命令:按钮按下/取消操作<br/>集中站:${this.stationName}<br/>按钮:计轴复位`;
|
||||
}
|
||||
});
|
||||
}
|
||||
this.doClose();
|
||||
this.$refs.confirmTip.doShow(nextOperate);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -117,12 +102,11 @@ export default {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.status-box {
|
||||
width: 100%;
|
||||
height: 70px;
|
||||
border-top: #928F92 1px solid;
|
||||
border-left: #928F92 1px solid;
|
||||
border-right: #E6E3E6 1px solid;
|
||||
border-bottom: #E6E3E6 1px solid;
|
||||
.shadow-box {
|
||||
padding: 2px;
|
||||
border-top: #7E7B7E 2px solid ;
|
||||
border-right: #F9F6F9 2px solid;
|
||||
border-left: #7E7B7E 2px solid;
|
||||
border-bottom: #F9F6F9 2px solid;
|
||||
}
|
||||
</style>
|
||||
|
@ -52,9 +52,9 @@ export default {
|
||||
return '确认对话框';
|
||||
},
|
||||
confirmId() {
|
||||
return this.show
|
||||
? OperationEvent.Command.common.affirm.domId
|
||||
: '';
|
||||
return this.show
|
||||
? OperationEvent.Command.common.affirm.domId
|
||||
: '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -258,11 +258,31 @@ export default {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
|
||||
} else if (this.operation === OperationEvent.Station.setPreReset.confirm.operation) {
|
||||
const step = {
|
||||
operation: OperationEvent.Command.common.affirm.operation,
|
||||
cmdType: CMD.Station.CMD_STATION_PRE_RESET
|
||||
};
|
||||
commitOperate(step, {}, 2).then(({valid}) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
|
||||
} else if (this.operation === OperationEvent.Station.cancelPreReset.confirm.operation) {
|
||||
const step = {
|
||||
operation: OperationEvent.Command.common.affirm.operation,
|
||||
cmdType: CMD.Station.CMD_STATION_CANCEL_PRE_RESET
|
||||
};
|
||||
commitOperate(step, {}, 2).then(({valid}) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$emit('close');
|
||||
this.$emit('close');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -13,6 +13,7 @@
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<menu-limit ref="menuLimit" :selected="selected" />
|
||||
<menu-station-light ref="menuStationLight" :selected="selected" />
|
||||
<menu-station-pre-reset ref="menuStationPreReset" />
|
||||
<!--<passive-alarm ref="passiveAlarm" />-->
|
||||
<passive-contorl ref="passiveControl" pop-class="ningbo-01__systerm" />
|
||||
<!--<passive-Timeout ref="passiveTimeout" />-->
|
||||
@ -34,6 +35,7 @@ import MenuBar from './menuBar';
|
||||
import MenuLimit from './menuLimit';
|
||||
import MenuStationTurnBack from './menuStationTurnBack';
|
||||
import MenuStationLight from './menuStationLight';
|
||||
import MenuStationPreReset from './menuStationPreReset';
|
||||
// import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||
// import PassiveTimeout from './passiveDialog/timeout';
|
||||
@ -55,7 +57,8 @@ export default {
|
||||
MenuLimit,
|
||||
// PassiveAlarm,
|
||||
PassiveContorl,
|
||||
MenuStationLight
|
||||
MenuStationLight,
|
||||
MenuStationPreReset
|
||||
// PassiveTimeout
|
||||
},
|
||||
props: {
|
||||
|
@ -1,31 +1,25 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<password-input ref="passwordInput" @confirm="forceLightConfirm" />
|
||||
<operateConfirm ref="operateConfirm" @executeConfirm="forceLightConfirm1" />
|
||||
<button-confirm ref="buttonConfirm" />
|
||||
<button-down ref="buttonDown" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import PasswordInput from './dialog/passwordInput';
|
||||
import { mapGetters } from 'vuex';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperateConfirm from './dialog/childDialog/operateConfirm';
|
||||
import ButtonConfirm from './dialog/childDialog/buttonConfirm';
|
||||
import ButtonDown from './dialog/buttonDown';
|
||||
|
||||
export default {
|
||||
name: 'StationControlLight',
|
||||
components: {
|
||||
PopMenu,
|
||||
PasswordInput,
|
||||
OperateConfirm,
|
||||
ButtonConfirm
|
||||
ButtonDown
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -40,7 +34,7 @@ export default {
|
||||
{
|
||||
label: '取消',
|
||||
handler: this.cancelPreReset,
|
||||
cmdType: CMD.Station.CMD_STATION_PRE_RESET
|
||||
cmdType: CMD.Station.CMD_STATION_CANCEL_PRE_RESET
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
@ -52,7 +46,7 @@ export default {
|
||||
{
|
||||
label: '取消',
|
||||
handler: this.cancelPreReset,
|
||||
cmdType: CMD.Station.CMD_STATION_PRE_RESET
|
||||
cmdType: CMD.Station.CMD_STATION_CANCEL_PRE_RESET
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -71,7 +65,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationLight) && !this.buttonOperation) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationPreReset) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
@ -97,6 +91,7 @@ export default {
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
console.log(this.menu, this.$refs.popMenu);
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
@ -114,14 +109,22 @@ export default {
|
||||
commitOperate(menuOperate.Station.setPreReset, {stationCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
const nextOperate = {
|
||||
operation: OperationEvent.StationLight.SetOrCancelForceLight.password.operation
|
||||
operation: OperationEvent.Station.setPreReset.confirm.operation
|
||||
};
|
||||
this.$refs.passwordInput.doShow(nextOperate, this.selected);
|
||||
this.$refs.buttonDown.doShow(nextOperate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
cancelPreReset() {
|
||||
|
||||
// 取消计轴复位
|
||||
commitOperate(menuOperate.Station.cancelPreReset, {stationCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
const nextOperate = {
|
||||
operation: OperationEvent.Station.cancelPreReset.confirm.operation
|
||||
};
|
||||
this.$refs.buttonDown.doShow(nextOperate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
forceLightConfirm() {
|
||||
const nextOperate = {
|
||||
|
@ -174,7 +174,9 @@ export default {
|
||||
/** 如果是备用车,按车次添加线*/
|
||||
if (train.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
opt.name += j;
|
||||
const length = opt.name.length;
|
||||
const optName = parseInt(opt.name) + j;
|
||||
opt.name = optName.toString().padStart(length, '0');
|
||||
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
if (model) {
|
||||
models.push(model);
|
||||
|
@ -1311,7 +1311,10 @@ export default {
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
])
|
||||
]),
|
||||
userId() {
|
||||
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tempClassA() {
|
||||
@ -1336,12 +1339,29 @@ export default {
|
||||
},
|
||||
'$store.state.training.prdType': function () {
|
||||
this.initMenu();
|
||||
},
|
||||
'$store.state.socket.simulationRoleList':function(list) {
|
||||
if (list && list.length) {
|
||||
this.checkRoleChange(list);
|
||||
}
|
||||
},
|
||||
'$store.state.training.simulationUserList':function(list) {
|
||||
debugger;
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.initMenu();
|
||||
},
|
||||
methods: {
|
||||
checkRoleChange(list) {
|
||||
list.forEach(item => {
|
||||
if ((item.messageType === 'PLAY_CHANGE' || item.messageType == 'ONLINE') && item.userId == this.userId ) {
|
||||
// this.switchShowStation(this.centralizedMap[item.deviceCode]);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
handleShow(item) {
|
||||
if (item.hide) {
|
||||
return false;
|
||||
|
@ -186,8 +186,13 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (isClose) {
|
||||
this.$store.dispatch('menuOperation/setSelected', {device: {}});
|
||||
this.doClose();
|
||||
} else {
|
||||
if (this.activeName == 'second') {
|
||||
// this.judgeStatus();
|
||||
this.status = !this.status;
|
||||
}
|
||||
}
|
||||
isClose && this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
isClose && this.doClose();
|
||||
|
@ -21,10 +21,10 @@
|
||||
<div class="message" style="color:#ff0000;font-size:14px;margin-left:10px">{{ message }}</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="status==''" @click="commit(true)">确定(O)</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="status" @click="commit(true)">确定(O)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdApply" :disabled="status==''" @click="commit(false)">应用(A)</el-button>
|
||||
<el-button :id="domIdApply" :disabled="status" @click="commit(false)">应用(A)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
||||
@ -50,7 +50,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
status: '',
|
||||
status: true,
|
||||
operate: null,
|
||||
loading: false,
|
||||
dialogShow: false,
|
||||
@ -107,16 +107,13 @@ export default {
|
||||
'selected': function(val) {
|
||||
if (val) {
|
||||
const sationEle = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||
if (this.prdType == '01' && sationEle && sationEle.controlMode == 'Center') {
|
||||
this.status = 'Center';
|
||||
} else if (this.prdType == '02' && sationEle && sationEle.controlMode != 'Center') {
|
||||
this.status = 'Local';
|
||||
if (sationEle) {
|
||||
if (sationEle.controller != this.$store.state.user.id) {
|
||||
this.status = false;
|
||||
} else {
|
||||
this.status = true;
|
||||
}
|
||||
}
|
||||
// if (this.prdType == '02') {
|
||||
//
|
||||
// } else {
|
||||
// this.status = sationEle && sationEle.controlMode == 'Center';
|
||||
// }
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -165,20 +162,24 @@ export default {
|
||||
});
|
||||
},
|
||||
commit(isClose = true) {
|
||||
debugger;
|
||||
const val = this.selected || {};
|
||||
const steps = {
|
||||
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
||||
over: true,
|
||||
param: {stationCodes:[val.code]}
|
||||
};
|
||||
|
||||
// CMD_STATION_CONTROL_TRANSFER
|
||||
// CMD_STATION_CONTROL_DEVOLVE
|
||||
// CMD_STATION_CONTROL_REVOKE
|
||||
// steps.cmdType = this.status ? CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL : CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL;
|
||||
steps.cmdType = this.status == 'Center' ? CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL : CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
|
||||
steps.cmdType = CMD.Station.CMD_STATION_CONTROL_APPLY;
|
||||
|
||||
this.$store.dispatch('training/nextNew', steps).then(({ valid }) => {
|
||||
if (valid) {
|
||||
isClose && this.doClose();
|
||||
if (isClose) {
|
||||
this.$store.dispatch('menuOperation/setSelected', {device: {}});
|
||||
this.doClose();
|
||||
}
|
||||
this.$emit('commandSuccess', val.code);
|
||||
}
|
||||
}).catch(() => {
|
||||
|
@ -212,7 +212,10 @@ export default {
|
||||
/** 如果是备用车,按车次添加线*/
|
||||
if (train.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
opt.name += j;
|
||||
// opt.name += j;
|
||||
const length = opt.name.length;
|
||||
const optName = parseInt(opt.name) + j;
|
||||
opt.name = optName.toString().padStart(length, '0');
|
||||
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
if (model) {
|
||||
models.push(model);
|
||||
|
@ -149,7 +149,10 @@ export default {
|
||||
/** 如果是备用车,按车次添加线*/
|
||||
if (train.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
opt.name += j;
|
||||
// opt.name += j;
|
||||
const length = opt.name.length;
|
||||
const optName = parseInt(opt.name) + j;
|
||||
opt.name = optName.toString().padStart(length, '0');
|
||||
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
if (model) {
|
||||
models.push(model);
|
||||
|
@ -162,7 +162,10 @@ export default {
|
||||
/** 如果是备用车,按车次添加线*/
|
||||
if (train.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
opt.name += j;
|
||||
// opt.name += j;
|
||||
const length = opt.name.length;
|
||||
const optName = parseInt(opt.name) + j;
|
||||
opt.name = optName.toString().padStart(length, '0');
|
||||
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
if (model) {
|
||||
models.push(model);
|
||||
|
@ -216,7 +216,10 @@ export default {
|
||||
/** 如果是备用车,按车次添加线*/
|
||||
if (train.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
opt.name += j;
|
||||
// opt.name += j;
|
||||
const length = opt.name.length;
|
||||
const optName = parseInt(opt.name) + j;
|
||||
opt.name = optName.toString().padStart(length, '0');
|
||||
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
if (model) {
|
||||
models.push(model);
|
||||
|
@ -80,6 +80,7 @@ export const DeviceMenu = {
|
||||
StationTurnBack: '14',
|
||||
Power:'15',
|
||||
StationLight: '16',
|
||||
StationPreReset: '17',
|
||||
|
||||
Map: '100',
|
||||
PrdCategory: '101',
|
||||
@ -190,7 +191,7 @@ export const UrlConfig = {
|
||||
trainingPlatform: {
|
||||
prodDetail: '/trainingPlatform/detail',
|
||||
teachDetail: '/trainingPlatform/teach',
|
||||
runPlan: '/trainingPlatform/runPlan',
|
||||
runPlan: '/trainingPlatform/runPlan',
|
||||
teachHome: '/trainingPlatform/teachHome',
|
||||
examHome: '/trainingPlatform/examHome',
|
||||
course: '/trainingPlatform/course',
|
||||
|
@ -230,16 +230,18 @@ export default {
|
||||
CMD_STATION_CANCEL_CI_AUTO: {value: 'Station_Cancel_CI_Auto', label: '全站取消自动通过'},
|
||||
/** 设置/取消强制点灯 */
|
||||
CMD_STATION_SET_OR_CANCEL_FORCE_PHYSICAL_SIGNAL: {value: 'Station_Set_Or_Cancel_Force_Physical_Signal', label: '设置/取消强制点灯'},
|
||||
/** 区域选择(请求区域控制权【泰雷兹】) */
|
||||
/** 区域选择(请求区域控制权【泰雷兹】、【宁波一】) */
|
||||
CMD_STATION_CONTROL_APPLY: {value: 'Station_Control_Apply', label: '请求区域控制权'},
|
||||
/** 授权转移 (【泰雷兹】) */
|
||||
CMD_STATION_CONTROL_TRANSFER: {value: 'Station_Control_Transfer', label: '授权转移'},
|
||||
/** 下放站控 (【泰雷兹】) */
|
||||
/** 下放站控 (【泰雷兹】、【宁波一】) */
|
||||
CMD_STATION_CONTROL_DEVOLVE: {value: 'Station_Control_Devolve', label: '下放站控'},
|
||||
/** 收回站控 (【泰雷兹】) */
|
||||
/** 收回站控 (【泰雷兹】、【宁波一】) */
|
||||
CMD_STATION_CONTROL_REVOKE: {value: 'Station_Control_Revoke', label: '收回站控'},
|
||||
/** 计轴预复位 */
|
||||
CMD_STATION_PRE_RESET : {value: 'Station_Pre_Reset', label: '计轴预复位'}
|
||||
/** 设置计轴预复位 */
|
||||
CMD_STATION_PRE_RESET : {value: 'Station_Pre_Reset', label: '计轴预复位'},
|
||||
/** 取消计轴预复位 */
|
||||
CMD_STATION_CANCEL_PRE_RESET: {value: 'Station_Cancel_Pre_Reset', label: '取消计轴预复位'}
|
||||
},
|
||||
|
||||
// 列车
|
||||
|
@ -65,10 +65,10 @@ export const OperationEvent = {
|
||||
operation: 'com15',
|
||||
domId: '_Tips-Cmd-Common-Close2'
|
||||
},
|
||||
affirm: {
|
||||
affirm: {
|
||||
operation: 'com16',
|
||||
domId: '_Tips-Cmd-Common-Affirm'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 取消操作
|
||||
@ -2518,6 +2518,17 @@ export const OperationEvent = {
|
||||
operation: '6171',
|
||||
domId: '_Tips-Station-setPreReset-Confirm'
|
||||
}
|
||||
},
|
||||
// 取消计轴复位
|
||||
cancelPreReset: {
|
||||
menu: {
|
||||
operation: '618',
|
||||
domId: '_Tips-Station-cancelPreReset-Menu'
|
||||
},
|
||||
confirm: {
|
||||
operation: '6181',
|
||||
domId: '_Tips-Station-cancelPreReset-Confirm'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -88,13 +88,13 @@ const menuOperation = {
|
||||
state.buttonOperation = operation;
|
||||
},
|
||||
setSelected: (state, obj) => {
|
||||
if (obj.subType) state.subType = obj.subType;
|
||||
if (obj.subType) state.subType = obj.subType;
|
||||
state.selected = obj.device;
|
||||
},
|
||||
setMenuChange: (state, obj) => {
|
||||
state.selected = obj.device;
|
||||
state.subType = obj.subType;
|
||||
},
|
||||
},
|
||||
mbmpCountIncrement: (state) => {
|
||||
state.mbmpCount += 1;
|
||||
},
|
||||
@ -182,7 +182,7 @@ const menuOperation = {
|
||||
*/
|
||||
mbmPositionChange: ({ commit }) => {
|
||||
commit('mbmpCountIncrement');
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 设置按钮菜单按钮
|
||||
@ -195,12 +195,12 @@ const menuOperation = {
|
||||
* 设置选中model
|
||||
*/
|
||||
setSelected: ({ commit, state }, selected) => {
|
||||
commit('setSelected', selected);
|
||||
commit('setSelected', selected);
|
||||
state.selectedCount += 1;
|
||||
},
|
||||
// 改变哈尔滨底部菜单
|
||||
setMenuChange: ({ commit, state }, selected) => {
|
||||
commit('setMenuChange', selected);
|
||||
commit('setMenuChange', selected);
|
||||
state.setMenuChangeCount += 1;
|
||||
},
|
||||
|
||||
@ -210,7 +210,7 @@ const menuOperation = {
|
||||
setPopMenu: ({ commit, state }, payLoad) => {
|
||||
commit('setMenu', payLoad.menu);
|
||||
commit('setMenuParam', payLoad.param);
|
||||
commit('setMenuPosition', payLoad.position);
|
||||
commit('setMenuPosition', payLoad.position);
|
||||
state.menuCount += 1;
|
||||
},
|
||||
|
||||
|
@ -143,6 +143,13 @@ export default {
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
return;
|
||||
} else if (em.subType == 'preReset' && em.deviceType == 'Station') { // 宁波一号线右键显示计轴复位
|
||||
const equipment = this.getDeviceByEm(em);
|
||||
this.$store.dispatch('menuOperation/setSelected', { device: equipment, subType: em.subType });
|
||||
menu = getDeviceMenuByDeviceType('StationPreReset');
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
return;
|
||||
} else if (em.subType == 'enabled' && em.deviceType == 'Switch') {
|
||||
menu = getDeviceMenuByDeviceType('Enabled');
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
|
||||
|
Loading…
Reference in New Issue
Block a user