diff --git a/src/components/PopMenu/index.vue b/src/components/PopMenu/index.vue index d8b1e1529..5b504f164 100644 --- a/src/components/PopMenu/index.vue +++ b/src/components/PopMenu/index.vue @@ -107,19 +107,19 @@ export default { }, computed: { width() { - let fontNum = 0; - let newLabel=""; + let fontNum = 0; + let newLabel=''; this.menu.forEach(elem => { - newLabel=elem.label.replace(/[^\u0000-\u00ff]/g,"aa"); + newLabel = elem.label && elem.label.replace(/[^\u0000-\u00ff]/g, 'aa'); if (elem.label && newLabel.length > fontNum) { - fontNum=newLabel.length; + fontNum=newLabel.length; // fontNum = elem.label.length; } - }); - var width = fontNum/2 * this.defaultFontSize + 60 + 'px'; - // if(this.$t('global.lanuage')==='en'){ - // width = fontNum/2 * this.defaultFontSize + 40 + 'px'; - // } + }); + var width = fontNum/2 * this.defaultFontSize + 60 + 'px'; + // if(this.$t('global.lanuage')==='en'){ + // width = fontNum/2 * this.defaultFontSize + 40 + 'px'; + // } return width; } }, @@ -193,7 +193,6 @@ export default { } }, calculateSubWidth(item) { - // debugger; const children = item.children; let width = 0; let fontNum = 0; @@ -204,7 +203,7 @@ export default { }); width = fontNum * this.defaultFontSize + 20 + 'px'; return width; - }, + }, openLoadFile(item) { const obj = this.$refs[item.label][0]; if (obj.files) { diff --git a/src/jmap/config/skinCode/batong_01.js b/src/jmap/config/skinCode/batong_01.js index 49cc9388e..8decc0920 100644 --- a/src/jmap/config/skinCode/batong_01.js +++ b/src/jmap/config/skinCode/batong_01.js @@ -149,6 +149,7 @@ class SkinCode extends defaultStyle { checkColor: '#00FF00' // 信号字体 }, lamp: { + guidName: 'defult', // 默认引导类型 stopWidth: 2, // 禁止线宽度 borderVariable: true, // 信号灯边框可变 borderWidth: 0.5, // 信号灯边框线宽度 diff --git a/src/jmap/config/skinCode/bejing_01.js b/src/jmap/config/skinCode/bejing_01.js index bf0e09d05..9056d330f 100644 --- a/src/jmap/config/skinCode/bejing_01.js +++ b/src/jmap/config/skinCode/bejing_01.js @@ -149,6 +149,7 @@ class SkinCode extends defaultStyle { checkColor: '#00FF00' // 信号字体 }, lamp: { + guidName: 'defult', // 默认引导类型 stopWidth: 2, // 禁止线宽度 borderVariable: true, // 信号灯边框可变 borderWidth: 0.5, // 信号灯边框线宽度 diff --git a/src/jmap/config/skinCode/chengdu_03.js b/src/jmap/config/skinCode/chengdu_03.js index caecf92b4..37688b14a 100644 --- a/src/jmap/config/skinCode/chengdu_03.js +++ b/src/jmap/config/skinCode/chengdu_03.js @@ -152,6 +152,7 @@ class SkinCode extends defaultStyle { checkColor: '#00FF00' // 信号保护区段检查颜色 }, lamp: { + guidName: 'chengdu_03', // 成都三号线引导类型 borderVariable: true, // 信号灯边框可变 stopWidth: 2, // 禁止线宽度 borderWidth: 2, // 信号灯边框线宽度 diff --git a/src/jmap/config/skinCode/chengdu_04.js b/src/jmap/config/skinCode/chengdu_04.js index 7fad28b82..782e25209 100644 --- a/src/jmap/config/skinCode/chengdu_04.js +++ b/src/jmap/config/skinCode/chengdu_04.js @@ -149,6 +149,7 @@ class SkinCode extends defaultStyle { checkColor: '#00FF00' // 信号保护区段检查颜色 }, lamp: { + guidName: 'defult', // 默认引导类型 borderVariable: true, // 信号灯边框可变 stopWidth: 2, // 禁止线宽度 borderWidth: 2, // 信号灯边框线宽度 diff --git a/src/jmap/config/skinCode/fuzhou_01.js b/src/jmap/config/skinCode/fuzhou_01.js index e96d5cc30..ac215b7ee 100644 --- a/src/jmap/config/skinCode/fuzhou_01.js +++ b/src/jmap/config/skinCode/fuzhou_01.js @@ -143,6 +143,7 @@ class SkinCode extends defaultStyle { nameBorderShow: true // 信号机名字边框显示 }, lamp: { + guidName: 'defult', // 默认引导类型 stopWidth: 2, // 禁止线宽度 borderWidth: 1, // 信号灯边框线宽度 borderColor: '#3149C3', // 信号灯边框线颜色 diff --git a/src/jmap/shape/Signal/ESigLamp.js b/src/jmap/shape/Signal/ESigLamp.js index 1e38cdba6..df106cdda 100644 --- a/src/jmap/shape/Signal/ESigLamp.js +++ b/src/jmap/shape/Signal/ESigLamp.js @@ -89,6 +89,10 @@ class ESigLamp extends Group { this.lamp.setStyle({stroke: color}); } + setStyle(data) { + this.lamp.setStyle(data); + } + setStop(has) { if (has) { this.lstop.show(); diff --git a/src/jmap/shape/Signal/index.js b/src/jmap/shape/Signal/index.js index 1bfffc3e7..a5c82b989 100644 --- a/src/jmap/shape/Signal/index.js +++ b/src/jmap/shape/Signal/index.js @@ -318,7 +318,7 @@ class Signal extends Group { // 引导 guid() { - if (this.count == 2 && this.model.lightType == '01') { // 双灯 物理点灯 允许引导信号 + if (this.count == 2 && this.model.lightType == '01' && this.style.Signal.lamp.guidName != 'chengdu_03') { // 双灯 物理点灯 允许引导信号 if (this.lamps[0]) { this.lamps[0].setStop(false); this.lamps[0].setColor(this.style.Signal.lamp.redColor); @@ -327,6 +327,9 @@ class Signal extends Group { this.lamps[1].setStop(false); this.lamps[1].setColor(this.style.Signal.lamp.yellowColor); } + } else if (this.count == 1 && this.model.lightType == '01' && this.style.Signal.lamp.guidName == 'chengdu_03') { + this.lamps[0].setStop(false); + this.lamps[0].setStyle({ fill: this.style.Signal.lamp.yellowColor, stroke: this.style.Signal.lamp.redColor, lineWidth: 2.5 }); } } @@ -433,6 +436,9 @@ class Signal extends Group { this.sigDelay.hide(); this.sigAuto.animationRecover(); this.sigName.setColor(this.style.Signal.text.defaultColor); + if (this.style.Signal.lamp.guidName == 'chengdu_03') { + this.lamps[0].setStyle({ lineWidth: this.style.Signal.lamp.borderWidth }); + } } setState(model) { diff --git a/src/jmap/theme/beijing_01/menus/dialog/routeCmdControl.vue b/src/jmap/theme/beijing_01/menus/dialog/routeCmdControl.vue index ca24232c4..d53952a42 100644 --- a/src/jmap/theme/beijing_01/menus/dialog/routeCmdControl.vue +++ b/src/jmap/theme/beijing_01/menus/dialog/routeCmdControl.vue @@ -1,432 +1,439 @@ \ No newline at end of file + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.doClose(); + } + }).catch(error => { + this.doClose(); + }); + }, + getOperate(operate) { + /** 弹框返回值处理*/ + if (this.operation == OperationEvent.Signal.unlock.menu.operation) { + /** 信号解封*/ + this.backOperate = operate; + this.setButtonEnable(operate); + if (operate.success) { + this.timeCountCommand = 30; + this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '确认成功' }); + } else { + this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '取消成功' }); + } + } + }, + setButtonEnable(param) { + this.cmdDisabled = [true, true, true]; + if (param && param.step >= 0) { + this.cmdDisabled[param.step] = false; + } + }, + setMessage(message) { + this.message = message; + }, + writeRecord(param) { + this.tempData.push(param); + }, + editRecord(param) { + this.tempData.forEach(elem => { + if (elem.order == param.order) { + for (var prop in param) { + elem[prop] = param[prop]; + } + } + }); + } + } +}; + diff --git a/src/jmap/theme/beijing_01/menus/statusDownTrainDetail.vue b/src/jmap/theme/beijing_01/menus/statusDownTrainDetail.vue index 14f092b23..b0c086739 100644 --- a/src/jmap/theme/beijing_01/menus/statusDownTrainDetail.vue +++ b/src/jmap/theme/beijing_01/menus/statusDownTrainDetail.vue @@ -1,31 +1,26 @@ \ No newline at end of file + + diff --git a/src/jmap/theme/chengdu_03/menus/dialog/childDialog/passwordInputBox.vue b/src/jmap/theme/chengdu_03/menus/dialog/childDialog/passwordInputBox.vue index 7fed4b130..68a8db975 100644 --- a/src/jmap/theme/chengdu_03/menus/dialog/childDialog/passwordInputBox.vue +++ b/src/jmap/theme/chengdu_03/menus/dialog/childDialog/passwordInputBox.vue @@ -107,7 +107,11 @@ export default { } }, domIdConfirm() { - return this.dialogShow ? getDomIdByOperation(this.operate.operateCode) : ''; + if (this.operate && this.operate.operateCode) { + return this.dialogShow ? getDomIdByOperation(this.operate.operateCode) : ''; + } else { + return this.dialogShow ? OperationEvent.Command.close.confirm.domId : ''; + } } }, mounted() { @@ -132,11 +136,14 @@ export default { }, commit() { const operate = { - send: true, + send: this.operate.operateCode != null, type: this.operate.type, - operation: this.operate.operateCode, - val: this.operate.val + operation: this.operate.operateCode != null ? this.operate.operateCode : OperationEvent.Command.close.confirm.operation }; + if (this.operate.val) { + operate['val'] = this.operate.val; + } + if (this.passwordCheck === this.correctPassword) { this.$store.dispatch('training/next', operate).then(({ valid }) => { this.loading = false; @@ -149,7 +156,7 @@ export default { } }).catch(() => { this.loading = false; - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate); }); } else { this.showMistake = true; @@ -192,7 +199,7 @@ export default { } }).catch(() => { this.loading = false; - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate); }); } } diff --git a/src/jmap/theme/chengdu_03/menus/dialog/routeControl.vue b/src/jmap/theme/chengdu_03/menus/dialog/routeControl.vue index 003a0b7d6..d959ba7e3 100644 --- a/src/jmap/theme/chengdu_03/menus/dialog/routeControl.vue +++ b/src/jmap/theme/chengdu_03/menus/dialog/routeControl.vue @@ -203,12 +203,14 @@ export default { humanTrainRoute() { const operate = { type: MapDeviceType.Signal.type, - operation: OperationEvent.Signal.humanTrainRoute.menu.operation + operation: OperationEvent.Signal.humanTrainRoute.menu.operation, + operateCode: OperationEvent.Signal.humanTrainRoute.confirm.operation }; this.$store.dispatch('training/next', operate).then(({ valid }) => { if (valid) { - this.$refs.password.doShow(); + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.password.doShow(operate); } }).catch(() => { this.loading = false; @@ -271,7 +273,6 @@ export default { // 进路收人工控 humanControl() { const operate = { - // send: true, type: MapDeviceType.Signal.type, operation: OperationEvent.Signal.humanControl.menu.operation, operateCode: OperationEvent.Signal.humanControl.confirm.operation, diff --git a/src/jmap/theme/chengdu_03/menus/index.vue b/src/jmap/theme/chengdu_03/menus/index.vue index 849fe2334..0b5dbc723 100644 --- a/src/jmap/theme/chengdu_03/menus/index.vue +++ b/src/jmap/theme/chengdu_03/menus/index.vue @@ -5,6 +5,7 @@ + @@ -24,6 +25,7 @@ import { mapGetters } from 'vuex'; import MenuCancel from './menuCancel'; import MenuSignal from './menuSignal'; +import MenuButton from './menuButton'; import MenuStationControl from './menuStationControl'; import MenuStationStand from './menuStationStand'; import MenuSwitch from './menuSwitch'; @@ -40,6 +42,7 @@ export default { name: 'Menus', components: { MenuBar, + MenuButton, MenuCancel, MenuSignal, MenuSwitch, diff --git a/src/jmap/theme/chengdu_03/menus/menuBar.vue b/src/jmap/theme/chengdu_03/menus/menuBar.vue index 29f4231cd..296a52a59 100644 --- a/src/jmap/theme/chengdu_03/menus/menuBar.vue +++ b/src/jmap/theme/chengdu_03/menus/menuBar.vue @@ -8,13 +8,7 @@