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 @@ - - - - 命令信息 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{message}} - - - 下达({{timeCountCommand}}) - - - 确认1 - - - - 确认2({{timeCountConfirm}}) - - - 中止 - - - 关闭 - - - - - + + + + 命令信息 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ message }} + + + 下达({{ timeCountCommand }}) + + + 确认1 + + + + 确认2({{ timeCountConfirm }}) + + + 中止 + + + 关闭 + + + + + \ 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 @@ - + {{ item.title }} @@ -23,13 +17,7 @@ - + @@ -42,13 +30,7 @@ - + @@ -65,13 +47,7 @@ - + @@ -812,7 +788,7 @@ export default { this.clickEvent(); const operate = { type: 'bar', - operation: item.operate.operation + operation: item.operate }; this.tempClassA = index; this.tempClassB = -1; @@ -834,7 +810,7 @@ export default { this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null }); const operate = { type: 'bar', - operation: item.operate.operation + operation: item.operate }; this.tempClassB = index; this.$store.dispatch('training/next', operate).then(({ valid }) => { @@ -850,151 +826,11 @@ export default { this.closeMenu(true); } }, - // 转为站控 - turnToStationControl(order) { - const operate = { - type: 'bar', - operation: order.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.closeMenu(true); - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.stationControlConvert.doShow(operate); - } - }); - }, - // 强制转为站控 - mandatoryStationControl(order) { - const operate = { - type: 'bar', - operation: order.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.closeMenu(true); - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.passwordBox.doShow(operate); - } - }); - }, - // 请求中控 - conterStationControl(order) { - const operate = { - type: 'bar', - operation: order.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.closeMenu(true); - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.stationControlConvert.doShow(operate); - } - }); - }, - // 设置列车识别号显示 - setTrainIdDisplay(order) { - const operate = { - type: 'bar', - operation: order.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.closeMenu(true); - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.viewTrainId.doShow(operate); - } - }); - }, - // 设置设备显示 - setNameDisplay(order) { - const operate = { - type: 'bar', - operation: order.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.closeMenu(true); - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.viewName.doShow(operate); - } - }); - }, - // 设置名称显示 - setDeviceDisplay(order) { - const operate = { - type: 'bar', - operation: order.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.closeMenu(true); - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.viewDevice.doShow(operate); - } - }); - }, - // 添加计划车 - addPlanTrain(order) { - const operate = { - type: 'bar', - operation: order.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.closeMenu(true); - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.trainAdd.doShow(operate); - } - }); - }, - // 平移计划车 - translatPlanTrain(order) { - const operate = { - type: 'bar', - operation: order.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.closeMenu(true); - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.trainTranstalet.doShow(operate); - } - }); - }, - // 删除计划车 - delPlanTrain(order) { - const operate = { - type: 'bar', - operation: order.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.closeMenu(true); - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.trainDelete.doShow(operate); - } - }); - }, - // 用户管理 - userManage(order) { - const operate = { - type: 'bar', - operation: order.operation - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.closeMenu(true); - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.manageUser.doShow(operate); - } - }); - }, // 关于 about(order) { const operate = { type: 'bar', - operation: order.operation + operation: order.operate }; this.$store.dispatch('training/next', operate).then(({ valid }) => { if (valid) { @@ -1021,7 +857,7 @@ export default { setLimitSpeed(order) { const operate = { type: 'bar', - operation: order.operation + operation: order.operate }; this.$store.dispatch('training/next', operate).then(({ valid }) => { if (valid) { @@ -1034,7 +870,7 @@ export default { cancleLimitSpeed(order) { const operate = { type: 'bar', - operation: order.operation + operation: order.operate }; this.$store.dispatch('training/next', operate).then(({ valid }) => { if (valid) { diff --git a/src/jmap/theme/chengdu_03/menus/menuButton.vue b/src/jmap/theme/chengdu_03/menus/menuButton.vue new file mode 100644 index 000000000..71ec3a9e7 --- /dev/null +++ b/src/jmap/theme/chengdu_03/menus/menuButton.vue @@ -0,0 +1,279 @@ + + + + + 排列 + 进路 + + + + + 总 + 取消 + + + + + 引导 + 进路 + + + + + 引导 + 总锁 + + + + + 总 + 人解 + + + + + 区 + 故解 + + + + + 道岔 + 定操 + + + + + 道岔 + 反操 + + + + + 道岔 + 单锁 + + + + + 道岔 + 解锁 + + + + + 封 + 锁 + + + + + 解 + 封 + + + + + + 功 + 能 + + + 按 + 钮 + + + + + + 自 + 动控 + + + + + 人 + 工控 + + + + + 清 + 除 + + + + + + + + diff --git a/src/jmap/theme/chengdu_03/menus/menuLimit.vue b/src/jmap/theme/chengdu_03/menus/menuLimit.vue index d8600220a..938e1b368 100644 --- a/src/jmap/theme/chengdu_03/menus/menuLimit.vue +++ b/src/jmap/theme/chengdu_03/menus/menuLimit.vue @@ -1,118 +1,120 @@ - - - - + + + + \ No newline at end of file +export default { + name: 'MenuLimit', + components: { + PopMenu, + CancelAllLimit + }, + props: { + selected: { + type: Object, + default() { + return null; + } + } + }, + data() { + return { + menu: [{ + label: '取消全线临时限速', + handler: this.cancelSpeed, + disabledCallback: '', + auth: { station: true, center: false } + }], + menuNormal: { + local: [ + { + label: '取消全线临时限速', + handler: this.cancelSpeed, + disabledCallback: MenuDisabledState.Section.cancelSpeed, + auth: { station: true, center: false } + } + ], + central: [ + { + label: '取消全线临时限速', + handler: this.cancelSpeed, + disabledCallback: MenuDisabledState.Section.cancelSpeed, + auth: { station: false, center: true } + } + ] + } + }; + }, + computed: { + ...mapGetters('training', [ + 'mode', + 'operatemode' + ]), + ...mapGetters('menuOperation', [ + 'buttonOperation' + ]) + }, + watch: { + '$store.state.menuOperation.menuCount': function (val) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) { + this.doShow(this.$store.state.menuOperation.menuPosition); + } else { + this.doClose(); + } + } + }, + methods: { + clickEvent() { + const self = this; + window.onclick = function (e) { + self.doClose(); + }; + }, + initMenu() { + // 编辑模式菜单列表 + if (this.operatemode === OperateMode.ADMIN) { + this.menu = [...this.menu]; + } + }, + doShow(point) { + this.clickEvent(); + 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(); + } + }, + // 取消速度 + cancelSpeed() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.LimitControl.type, + label: MapDeviceType.LimitControl.label, + operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.cancelAllLimit.doShow(operate, this.selected); + } + }); + } + } +}; + diff --git a/src/jmap/theme/chengdu_03/menus/menuSection.vue b/src/jmap/theme/chengdu_03/menus/menuSection.vue index 6ee2a8376..9c8e43d64 100644 --- a/src/jmap/theme/chengdu_03/menus/menuSection.vue +++ b/src/jmap/theme/chengdu_03/menus/menuSection.vue @@ -51,18 +51,12 @@ export default { menu: [], menuNormal: { local: [ - { - label: '区故解', - handler: this.fault, - disabledCallback: MenuDisabledState.Section.fault, - auth: { station: true, center: false } - }, - { - label: '属性', - handler: this.detail, - disabledCallback: MenuDisabledState.Section.setSpeed, - auth: { station: false, center: true } - } + // { + // label: '区故解', + // handler: this.fault, + // disabledCallback: MenuDisabledState.Section.fault, + // auth: { station: true, center: false } + // } ], central: [ { @@ -91,6 +85,16 @@ export default { label: '设置计轴失效', handler: this.alxeFailure, disabledCallback: MenuDisabledState.Section.alxeFailure + }, + { + label: this.$t('menu.menuSection.setFault'), + handler: this.setStoppage, + disabledCallback: MenuDisabledState.Section.setStoppage + }, + { + label: this.$t('menu.menuSection.cancelFault'), + handler: this.cancelStoppage, + disabledCallback: MenuDisabledState.Section.cancelStoppage } ] }; @@ -216,6 +220,46 @@ export default { } }); }, + // 设置故障 + setStoppage() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.stoppage.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } else { + this.$refs.noticeInfo.doShow(operate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 取消故障 + cancelStoppage() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.cancelStoppage.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } else { + this.$refs.noticeInfo.doShow(operate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, undeveloped() { this.doClose(); this.$alert('实现中......', '提示', { diff --git a/src/jmap/theme/chengdu_03/menus/menuSignal.vue b/src/jmap/theme/chengdu_03/menus/menuSignal.vue index 7c6f70b3d..68c496dc9 100644 --- a/src/jmap/theme/chengdu_03/menus/menuSignal.vue +++ b/src/jmap/theme/chengdu_03/menus/menuSignal.vue @@ -64,29 +64,29 @@ export default { auth: { station: true, center: false } }, { - label: '总人解', + label: '总人解', // 取消引导进路 handler: this.humanTrainRoute, disabledCallback: MenuDisabledState.Signal.humanTrainRoute, auth: { station: true, center: false } }, - { - label: '信号重开', - handler: this.reopenSignal, - disabledCallback: MenuDisabledState.Signal.reopenSignal, - auth: { station: true, center: false } - }, - { - label: '信号封锁', - handler: this.lock, - disabledCallback: MenuDisabledState.Signal.lock, - auth: { station: true, center: false } - }, - { - label: '信号解封', - handler: this.unlock, - disabledCallback: MenuDisabledState.Signal.unlock, - auth: { station: true, center: false } - }, + // { + // label: '信号重开', + // handler: this.reopenSignal, + // disabledCallback: MenuDisabledState.Signal.reopenSignal, + // auth: { station: true, center: false } + // }, + // { + // label: '信号封锁', + // handler: this.lock, + // disabledCallback: MenuDisabledState.Signal.lock, + // auth: { station: true, center: false } + // }, + // { + // label: '信号解封', + // handler: this.unlock, + // disabledCallback: MenuDisabledState.Signal.unlock, + // auth: { station: true, center: false } + // }, { label: '进路收人工控', handler: this.humanControl, @@ -98,12 +98,6 @@ export default { handler: this.atsAutoControl, disabledCallback: MenuDisabledState.Signal.atsAutoControl, auth: { station: false, center: true } - }, - { - label: '查询进路控制状态', - handler: this.detail, - disabledCallback: MenuDisabledState.Signal.detail, - auth: { station: true, center: true } } ], central: [ @@ -337,7 +331,6 @@ export default { operation: OperationEvent.Signal.guide.menu.operation }; this.$store.dispatch('training/next', operate).then(({ valid, response }) => { - debugger; this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); if (valid) { var tempData = null; diff --git a/src/jmap/theme/chengdu_03/menus/menuStation.vue b/src/jmap/theme/chengdu_03/menus/menuStation.vue index 6c27312ea..f865e6cc3 100644 --- a/src/jmap/theme/chengdu_03/menus/menuStation.vue +++ b/src/jmap/theme/chengdu_03/menus/menuStation.vue @@ -51,15 +51,6 @@ export default { ] }; }, - 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(); - } - } - }, computed: { ...mapGetters('training', [ 'mode', @@ -69,6 +60,15 @@ export default { '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(); + } + } + }, methods: { clickEvent() { const self = this; diff --git a/src/jmap/theme/chengdu_03/menus/menuStationControl.vue b/src/jmap/theme/chengdu_03/menus/menuStationControl.vue index b569ec165..6e394cecd 100644 --- a/src/jmap/theme/chengdu_03/menus/menuStationControl.vue +++ b/src/jmap/theme/chengdu_03/menus/menuStationControl.vue @@ -1,69 +1,69 @@ - + \ No newline at end of file +export default { + name: 'StationControlMenu', + components: { + PopMenu + }, + props: { + selected: { + type: Object, + default() { + return null; + } + } + }, + data() { + return { + menu: [], + menuNormal: [ + ], + menuForce: [ + ] + }; + }, + computed: { + ...mapGetters('training', [ + 'mode', + 'operatemode' + ]), + ...mapGetters('menuOperation', [ + 'buttonOperation' + ]) + }, + watch: { + '$store.state.menuOperation.menuCount': function (val) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) { + this.doShow(this.$store.state.menuOperation.menuPosition); + } else { + this.doClose(); + } + } + }, + methods: { + clickEvent() { + const self = this; + window.onclick = function (e) { + self.doClose(); + }; + }, + doShow(point) { + if (this.$refs && this.$refs.popMenu) { + this.$refs.popMenu.close(); + } + }, + doClose() { + if (this.$refs && this.$refs.popMenu) { + this.$refs.popMenu.close(); + } + } + } +}; + diff --git a/src/jmap/theme/chengdu_03/menus/menuStationStand.vue b/src/jmap/theme/chengdu_03/menus/menuStationStand.vue index 0951baf3f..1ca52fccf 100644 --- a/src/jmap/theme/chengdu_03/menus/menuStationStand.vue +++ b/src/jmap/theme/chengdu_03/menus/menuStationStand.vue @@ -39,18 +39,6 @@ export default { menu: [], menuNormal: { local: [ - { - label: '设置扣车', - handler: this.setDetainTrain, - disabledCallback: MenuDisabledState.StationStand.setDetainTrain, - auth: { station: true, center: true } - }, - { - label: '取消扣车', - handler: this.cancelDetainTrain, - disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain, - auth: { station: true, center: true } - }, { label: '设置跳停', handler: this.setJumpStop, @@ -62,24 +50,6 @@ export default { handler: this.cancelJumpStop, disabledCallback: MenuDisabledState.StationStand.cancelJumpStop, auth: { station: true, center: true } - }, - { - label: '设置停站时间', - handler: this.setStopTime, - disabledCallback: MenuDisabledState.StationStand.setStopTime, - auth: { station: true, center: true } - }, - { - label: '设置站间运行等级', - handler: this.setRunLevel, - disabledCallback: MenuDisabledState.StationStand.setRunLevel, - auth: { station: true, center: true } - }, - { - label: '属性', - handler: this.detail, - disabledCallback: MenuDisabledState.StationStand.detail, - auth: { station: true, center: true } } ], central: [ diff --git a/src/jmap/theme/chengdu_03/menus/menuSwitch.vue b/src/jmap/theme/chengdu_03/menus/menuSwitch.vue index a1193427c..e12a1e0ce 100644 --- a/src/jmap/theme/chengdu_03/menus/menuSwitch.vue +++ b/src/jmap/theme/chengdu_03/menus/menuSwitch.vue @@ -39,54 +39,42 @@ export default { menu: [], menuNormal: { local: [ - { - label: '单操到定位', - handler: this.locate, - disabledCallback: MenuDisabledState.Switch.locate, - auth: { station: true, center: true } - }, - { - label: '单操到反位', - handler: this.reverse, - disabledCallback: MenuDisabledState.Switch.reverse, - auth: { station: true, center: true } - }, - { - label: '道岔单锁', - handler: this.lock, - disabledCallback: MenuDisabledState.Switch.lock, - auth: { station: true, center: false } - }, - { - label: '道岔解锁', - handler: this.unlock, - disabledCallback: MenuDisabledState.Switch.unlock, - auth: { station: true, center: true } - }, - { - label: '道岔封锁', - handler: this.block, - disabledCallback: MenuDisabledState.Switch.block, - auth: { station: true, center: true } - }, - { - label: '道岔解封', - handler: this.unblock, - disabledCallback: MenuDisabledState.Switch.unblock, - auth: { station: true, center: true } - }, - { - label: '区故解', - handler: this.fault, - disabledCallback: MenuDisabledState.Switch.fault, - auth: { station: true, center: true } - }, - { - label: '属性', - handler: this.undeveloped, - disabledCallback: MenuDisabledState.Switch.property, - auth: { station: true, center: true } - } + // { + // label: '单操到定位', + // handler: this.locate, + // disabledCallback: MenuDisabledState.Switch.locate, + // auth: { station: true, center: true } + // }, + // { + // label: '单操到反位', + // handler: this.reverse, + // disabledCallback: MenuDisabledState.Switch.reverse, + // auth: { station: true, center: true } + // }, + // { + // label: '道岔单锁', + // handler: this.lock, + // disabledCallback: MenuDisabledState.Switch.lock, + // auth: { station: true, center: false } + // }, + // { + // label: '道岔解锁', + // handler: this.unlock, + // disabledCallback: MenuDisabledState.Switch.unlock, + // auth: { station: true, center: true } + // }, + // { + // label: '道岔封锁', + // handler: this.block, + // disabledCallback: MenuDisabledState.Switch.block, + // auth: { station: true, center: true } + // }, + // { + // label: '道岔解封', + // handler: this.unblock, + // disabledCallback: MenuDisabledState.Switch.unblock, + // auth: { station: true, center: true } + // } ], central: [ { diff --git a/src/jmap/theme/chengdu_03/menus/menuTool.vue b/src/jmap/theme/chengdu_03/menus/menuTool.vue index dc32a9673..8c96fd532 100644 --- a/src/jmap/theme/chengdu_03/menus/menuTool.vue +++ b/src/jmap/theme/chengdu_03/menus/menuTool.vue @@ -1,149 +1,159 @@ - - - - - - - - + + + + + + + + - \ No newline at end of file + diff --git a/src/jmap/theme/chengdu_03/menus/statusBar.vue b/src/jmap/theme/chengdu_03/menus/statusBar.vue deleted file mode 100644 index 46a07d747..000000000 --- a/src/jmap/theme/chengdu_03/menus/statusBar.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/jmap/theme/chengdu_03/menus/statusDownTrainDetail.vue b/src/jmap/theme/chengdu_03/menus/statusDownTrainDetail.vue deleted file mode 100644 index 14f092b23..000000000 --- a/src/jmap/theme/chengdu_03/menus/statusDownTrainDetail.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/jmap/theme/chengdu_03/menus/statusUpTrainDetail.vue b/src/jmap/theme/chengdu_03/menus/statusUpTrainDetail.vue deleted file mode 100644 index afafa39cf..000000000 --- a/src/jmap/theme/chengdu_03/menus/statusUpTrainDetail.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/jmap/theme/chengdu_03/menus/utils/menuItemStatus.js b/src/jmap/theme/chengdu_03/menus/utils/menuItemStatus.js index 44d3cbb9a..c1f62d7f4 100644 --- a/src/jmap/theme/chengdu_03/menus/utils/menuItemStatus.js +++ b/src/jmap/theme/chengdu_03/menus/utils/menuItemStatus.js @@ -77,6 +77,20 @@ export const MenuDisabledState = { if (device && device.status == deviceState.Section.status.State13) { return true; } + }, + // 设置故障 + setStoppage() { + const device = getCurrentStateObject(); + if (device && device.fault) { + return true; + } + }, + // 取消故障 + cancelStoppage() { + const device = getCurrentStateObject(); + if (device && !device.fault) { + return true; + } } }, Signal: { diff --git a/src/jmap/theme/chengdu_03/planConvert.js b/src/jmap/theme/chengdu_03/planConvert.js index e0d37ebda..b2ad80657 100644 --- a/src/jmap/theme/chengdu_03/planConvert.js +++ b/src/jmap/theme/chengdu_03/planConvert.js @@ -27,7 +27,6 @@ export default { importData(Sheet, JsonData) { var dataList = convertSheetToList(Sheet, false); var needList = Object.keys(this.ExcelConfig.columns); - debugger; 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) { diff --git a/src/scripts/ConstDic.js b/src/scripts/ConstDic.js index 825aa3f80..f6b51cc68 100644 --- a/src/scripts/ConstDic.js +++ b/src/scripts/ConstDic.js @@ -351,7 +351,7 @@ export const OperationEvent = { event: '1', button: { operation: '1010', - domId: '_Tips-Switch-Locate-Mbm' + domId: '_Tips-Switch-Locate-Mbm{TOP}' }, menu: { operation: '101', @@ -363,7 +363,7 @@ export const OperationEvent = { event: '2', button: { operation: '1020', - domId: '_Tips-Switch-Reverse-Mbm' + domId: '_Tips-Switch-Reverse-Mbm{TOP}' }, menu: { operation: '102', @@ -375,7 +375,7 @@ export const OperationEvent = { event: '3', button: { operation: '1030', - domId: '_Tips-Switch-Lock-Mbm' + domId: '_Tips-Switch-Lock-Mbm{TOP}' }, menu: { operation: '103', @@ -387,7 +387,7 @@ export const OperationEvent = { event: '4', button: { operation: '1040', - domId: '_Tips-Switch-Unlock-Mbm' + domId: '_Tips-Switch-Unlock-Mbm{TOP}' }, menu: { operation: '104', @@ -649,6 +649,14 @@ export const OperationEvent = { operation: '1174', domId: '_Tips-Switch-Alxe-Effective-Confirm-2' } + }, + // 引导总锁 + guideLock: { + event: '18', + button: { + operation: '1180', + domId: '_Tips-Switch-GuideLock-Button{TOP}' + } } }, @@ -803,7 +811,7 @@ export const OperationEvent = { event: { query: '1', confirm: '2' }, button: { operation: '3010', - domId: '_Tips-Signal-ArrangementRoute-Mbm' + domId: '_Tips-Signal-ArrangementRoute-Mbm{TOP}' }, menu: { operation: '301', @@ -823,7 +831,7 @@ export const OperationEvent = { event: '3', button: { operation: '3030', - domId: '_Tips-Signal-CancelTrainRoute-Mbm' + domId: '_Tips-Signal-CancelTrainRoute-Mbm{TOP}' }, menu: { operation: '303', @@ -855,14 +863,14 @@ export const OperationEvent = { event: '5', button: { operation: '3050', - domId: '_Tips-Signal-HumanTrainRoute-Mbm' + domId: '_Tips-Signal-HumanTrainRoute-Mbm{TOP}' }, menu: { - operation: '3051', + operation: '305', domId: '_Tips-Signal-HumanTrainRoute-Menu' }, confirm: { - operation: '3052', + operation: '3051', domId: '_Tips-Signal-HumanTrainRoute-Confirm' } }, @@ -911,7 +919,7 @@ export const OperationEvent = { event: { query: '1', confirm: '8' }, button: { operation: '3080', - domId: '_Tips-Signal-Guide-Mbm' + domId: '_Tips-Signal-Guide-Mbm{TOP}' }, menu: { operation: '308', @@ -993,6 +1001,10 @@ export const OperationEvent = { // 进路交人工控 humanControl: { event: { query: '1', confirm: '14' }, + button: { + operation: '3140', + domId: '_Tips-Signal-HumanControl-Button{TOP}' + }, menu: { operation: '314', domId: '_Tips-Signal-HumanControl-Menu' @@ -1006,9 +1018,13 @@ export const OperationEvent = { domId: '_Tips-Signal-HumanControl-Confirm' } }, - // 进路交ATS自动工控 + // 进路交自动控 atsAutoControl: { event: { query: '1', confirm: '15' }, + button: { + operation: '3150', + domId: '_Tips-Signal-AtsAutoControl-Button{TOP}' + }, menu: { operation: '315', domId: '_Tips-Signal-AtsAutoControl-Menu' @@ -1069,7 +1085,7 @@ export const OperationEvent = { event: '2', button: { operation: '4020', - domId: '_Tips-Section-Fault-Mbm' + domId: '_Tips-Section-Fault-Mbm{TOP}' }, menu: { operation: '402', @@ -2068,9 +2084,32 @@ export const OperationEvent = { operation: '2999', domId: '_Tips-Control-StationControl-Mbar' } + }, + // 封锁 + block: { + event: '90', + button: { + operation: '2991', + domId: '_Tips-Block-Button{TOP}' + } + }, + // 解封 + unblock: { + event: '91', + button: { + operation: '2992', + domId: '_Tips-Unblock-Button{TOP}' + } + }, + // 功能按钮 + functionButton: { + button: { + operation: '2993', + domId: '_Tips-FunctionButton-Button{TOP}' + } } } - // 密码输入框指令 + }; /** diff --git a/src/scripts/OperationConfig.js b/src/scripts/OperationConfig.js index 88f0f6c7d..7a98b2191 100644 --- a/src/scripts/OperationConfig.js +++ b/src/scripts/OperationConfig.js @@ -1304,7 +1304,7 @@ export const OperationList = { trainingName: '办理引导进路({3})', trainingRemark: '进路办理信号引导', trainingType: '02', - productTypes: ['02'], + productTypes: ['01,02'], stepVOList: [ { deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【办理引导进路】' }, { deviceType: '04', orderNum: 2, operateCode: '3085', tip: '鼠标左键选择进路名称【{3}】' }, @@ -1320,12 +1320,27 @@ export const OperationList = { trainingName: '取消进路({3} 进路)', trainingRemark: '取消进路功能', trainingType: '02', - productTypes: ['02'], + productTypes: ['01,02'], stepVOList: [ { deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' }, { deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' } ] }, + { + maxDuration: 15, + minDuration: 8, + operateType: '0207', + skinCode: '04', + trainingName: '总人解({3})', + trainingRemark: '总人解', + trainingType: '02', + productTypes: ['01,02'], + stepVOList: [ + { deviceType: '04', orderNum: 1, operateCode: '305', tip: '鼠标右键菜单选择【总人解】' }, + { deviceType: '04', orderNum: 2, operateCode: '305', tip: '鼠标左键点击【确定】按钮' }, + { deviceType: '04', orderNum: 3, operateCode: '3051', tip: '输入密码123456,点击【确定】按钮' } + ] + }, { maxDuration: 8, minDuration: 5, @@ -1374,11 +1389,11 @@ export const OperationList = { maxDuration: 15, minDuration: 8, operateType: '0208', - skinCode: '02', + skinCode: '04', trainingName: '进路收人工控({5})', trainingRemark: '进路收人工控', trainingType: '02', - productTypes: ['02'], + productTypes: ['01,02'], stepVOList: [ { deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【自排开】' }, { deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择控制状态为"人工"的进路', val: '{6}' }, @@ -1389,11 +1404,11 @@ export const OperationList = { maxDuration: 15, minDuration: 8, operateType: '0209', - skinCode: '02', + skinCode: '04', trainingName: '进路交自动控({5})', trainingRemark: '进路交自动控', trainingType: '02', - productTypes: ['02'], + productTypes: ['01,02'], stepVOList: [ { deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【自排关】' }, { deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择第一条进路', val: '{6}' }, @@ -1509,7 +1524,7 @@ export const OperationList = { trainingName: '区故解({7})', trainingRemark: '道岔区段故障解锁功能', trainingType: '03', - productTypes: ['01,02'], + productTypes: ['02'], stepVOList: [ { deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【区故解】' }, { deviceType: '02', orderNum: 2, operateCode: '109', tip: '鼠标左键点击【确认】按钮' }, @@ -1540,7 +1555,7 @@ export const OperationList = { trainingName: '属性({8}{9})', trainingRemark: '区段详情({8}{9})', trainingType: '04', - productTypes: ['01,02'], + productTypes: ['02'], stepVOList: [ { deviceType: '03', orderNum: 1, operateCode: '410', tip: '鼠标右键菜单选择【属性】' }, { deviceType: '03', orderNum: 2, operateCode: '410', tip: '鼠标左键点击【确认】按钮' } @@ -1555,7 +1570,7 @@ export const OperationList = { trainingName: '设置扣车({10}-{12}站台)', trainingRemark: '设置扣车功能', trainingType: '05', - productTypes: ['01,02'], + productTypes: ['02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】' }, { deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' } @@ -1569,7 +1584,7 @@ export const OperationList = { trainingName: '取消扣车({10}-{12}站台)', trainingRemark: '设置取消扣车功能', trainingType: '05', - productTypes: ['01,02'], + productTypes: ['02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' }, { deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' } @@ -1583,7 +1598,7 @@ export const OperationList = { trainingName: '取消扣车({10}-{12}站台)', trainingRemark: '设置取消扣车功能(上行全线)', trainingType: '05', - productTypes: ['01,02'], + productTypes: ['02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' }, { deviceType: '06', orderNum: 2, operateCode: '5051', tip: '鼠标左键点击【上行全线】按钮', val: '02' }, @@ -1720,7 +1735,7 @@ export const OperationList = { trainingName: '属性({10}-{12}站台)', trainingRemark: '查询站台状态功能', trainingType: '05', - productTypes: ['01,02'], + productTypes: ['02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【属性】' }, { deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' } diff --git a/src/scripts/plugin/converter/CancelLimitOperationConverter.js b/src/scripts/plugin/converter/CancelLimitOperationConverter.js index eabb64f66..aaad1b8c7 100644 --- a/src/scripts/plugin/converter/CancelLimitOperationConverter.js +++ b/src/scripts/plugin/converter/CancelLimitOperationConverter.js @@ -6,7 +6,7 @@ const CancelLimitType = MapDeviceType.LimitControl.type; export default { test: function (operates) { - let operateType = getOperateTypeBy('LimitControl', operates[0].operation); + const operateType = getOperateTypeBy('LimitControl', operates[0].operation); if (operateType) { return true; } else { @@ -15,7 +15,7 @@ export default { }, convert: function (operates) { if (operates && operates.length) { - let operation = operates[0].operation; + const operation = operates[0].operation; switch (operation) { case CancelLimitOperation.CancelAllLimit.menu.operation: return handleMenuCancelAllLimit(operates); @@ -26,11 +26,11 @@ export default { /** * 处理右键菜单 取消故障 操作 - * @param {*} operates + * @param {*} operates */ function handleMenuCancelAllLimit(operates) { if (operates.length >= 2) { - let operate = operates[0]; + const operate = operates[0]; if (operate.type === CancelLimitType && operate.code) { return { type: operate.type, diff --git a/src/scripts/plugin/converter/MixinOperationConverter.js b/src/scripts/plugin/converter/MixinOperationConverter.js index 752159f19..22fb04144 100644 --- a/src/scripts/plugin/converter/MixinOperationConverter.js +++ b/src/scripts/plugin/converter/MixinOperationConverter.js @@ -1,43 +1,80 @@ import { OperationEvent, getOperateTypeBy, checkOperationIsCurrentOperate } from '@/scripts/ConstDic'; import { handleMenuRequestCentralControl, handleMenuRequestStationControl, handleMenuEmergencyStationControl } from './StationControlOperationConverter'; -const MixinCommandOperation = OperationEvent.MixinCommand +const MixinCommandOperation = OperationEvent.MixinCommand; const StationControlOperation = OperationEvent.StationControl; export default { - test: function (operates) { - let operateType = getOperateTypeBy('MixinCommand', operates[0].operation); - if (operateType) { - return true; - } else { - return false; - } - }, - convert: function (operates) { - if (operates && operates.length) { - switch (operates[0].operation) { - case MixinCommandOperation.remoteControl.mbar.operation: return handleMenuRemoteControl(operates); - } - } - } + test: function (operates) { + const operateType = getOperateTypeBy('MixinCommand', operates[0].operation); + if (operateType) { + return true; + } else { + return false; + } + }, + convert: function (operates) { + if (operates && operates.length) { + switch (operates[0].operation) { + case MixinCommandOperation.remoteControl.mbar.operation: return handleMenuRemoteControl(operates); + case MixinCommandOperation.block.button.operation: return handleBlockButton(operates); + case MixinCommandOperation.unblock.button.operation: return handleUnblockButton(operates); + // case MixinCommandOperation.remoteControl.mbar.operation: return handleMenuRemoteControl(operates); + // case MixinCommandOperation.remoteControl.mbar.operation: return handleMenuRemoteControl(operates); + } + } + } }; - -/** - * 控制模式操作 +/** + * 控制模式操作 */ function handleMenuRemoteControl(operates) { - if (operates.length >= 1) { - let operate = operates[operates.length - 1]; - if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.requestStationControl)) { - return handleMenuRequestCentralControl(operates); - } else if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.requestCentralControl)) { - return handleMenuRequestStationControl(operates); - } else if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.emergencyStationControl)) { - return handleMenuEmergencyStationControl(operates); - } + if (operates.length >= 1) { + const operate = operates[operates.length - 1]; + if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.requestStationControl)) { + return handleMenuRequestCentralControl(operates); + } else if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.requestCentralControl)) { + return handleMenuRequestStationControl(operates); + } else if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.emergencyStationControl)) { + return handleMenuEmergencyStationControl(operates); + } - return { error: true }; - } - return null; -} \ No newline at end of file + return { error: true }; + } + return null; +} + +// 封锁操作 +function handleBlockButton(operates) { + if (operates.length >= 2) { + const operate = operates[operates.length - 1]; + if (operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: MixinCommandOperation.block.event + }; + } + return { error: true }; + } + return null; +} + +// 解封操作 +function handleUnblockButton(operates) { + if (operates.length >= 2) { + const operate = operates[operates.length - 1]; + if (operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: MixinCommandOperation.unblock.event + }; + } + return { error: true }; + } + return null; +} diff --git a/src/scripts/plugin/converter/SignalRouteOperationConverter.js b/src/scripts/plugin/converter/SignalRouteOperationConverter.js index cda788326..4c29b472a 100644 --- a/src/scripts/plugin/converter/SignalRouteOperationConverter.js +++ b/src/scripts/plugin/converter/SignalRouteOperationConverter.js @@ -1,6 +1,6 @@ import { OperationEvent, getOperateTypeBy, MapDeviceType } from '@/scripts/ConstDic'; -import localStore from 'storejs'; -import store from '@/store'; +// import localStore from 'storejs'; +// import store from '@/store'; const SignalOperation = OperationEvent.Signal; @@ -56,16 +56,16 @@ export default { case SignalOperation.stoppage.menu.operation: return handleMenuStoppage(operates); - case SignalOperation.arrangementRoute.button.operation: return handleButtonArrangementRoute(operates); + case SignalOperation.arrangementRoute.button.operation: return handleButtonArrangementRoute(operates); // 排列进路按钮操作 case SignalOperation.arrangementRoute.menu.operation: return handleMenuArrangementRoute(operates); - case SignalOperation.cancelTrainRoute.button.operation: return handleButtonCancelTrainRoute(operates); + case SignalOperation.cancelTrainRoute.button.operation: return handleButtonCancelTrainRoute(operates); // 取消进路按钮操作 case SignalOperation.cancelTrainRoute.menu.operation: return handleMenuCancelTrainRoute(operates); - case SignalOperation.reopenSignal.button.operation: return handleButtonReopenSignal(operates); + case SignalOperation.reopenSignal.button.operation: return handleButtonReopenSignal(operates); // 信号重开按钮操作 case SignalOperation.reopenSignal.menu.operation: return handleMenuReopenSignal(operates); - case SignalOperation.humanTrainRoute.button.operation: return handleButtonHumanTrainRoute(operates); + case SignalOperation.humanTrainRoute.button.operation: return handleButtonHumanTrainRoute(operates); // 人解列车进路按钮操作 case SignalOperation.humanTrainRoute.menu.operation: return handleMenuHumanTrainRoute(operates); case SignalOperation.lock.menu.operation: return handleMenuLock(operates); @@ -73,12 +73,12 @@ export default { case SignalOperation.unlock.menu.operation: return handleMenuUnlock(operates); case SignalOperation.guide.menu.operation: return handleMenuGuideRoute(operates); - case SignalOperation.guide.button.operation: return handleButtonGuideRoute(operates); + case SignalOperation.guide.button.operation: return handleButtonGuideRoute(operates); // 引导进路按钮操作 case SignalOperation.signalClose.menu.operation: return handleMenuSignalClose(operates); case SignalOperation.setAutoInterlock.menu.operation: return handleMenuSetAutoInterlock(operates); - case SignalOperation.setAutoInterlock.button.operation: return handleButtonSetAutoInterlock(operates); + case SignalOperation.setAutoInterlock.button.operation: return handleButtonSetAutoInterlock(operates); // 设置联锁自动进路按钮 case SignalOperation.cancelAutoInterlock.menu.operation: return handleMenuCancelAutoInterlock(operates); @@ -87,8 +87,10 @@ export default { case SignalOperation.cancelAutoTrigger.menu.operation: return handleMenuCancelAutoTrigger(operates); case SignalOperation.humanControl.menu.operation: return handleMenuHumanControl(operates); + case SignalOperation.humanControl.button.operation: return handleButtonHumanControl(operates); // 人工控按钮操作 case SignalOperation.atsAutoControl.menu.operation: return handleMenuAtsAutoControl(operates); + case SignalOperation.atsAutoControl.button.operation: return handleButtonAtsAutoControl(operates); // 自动控按钮操作 case SignalOperation.detail.menu.operation: return handleMenuDetail(operates); } @@ -186,19 +188,17 @@ function handleButtonHumanTrainRoute(operates) { const operate = operates[operates.length - 1]; if (operate.type === SignalType && operate.code) { if (operate.code) { - const counter = store.getters['map/getCounterBySingalCode'](operate.code, '02'); - if (counter) { - const val = localStore.get(counter.code) || ''; - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.humanTrainRoute.event, - val: val - }; - } + // const counter = store.getters['map/getCounterBySingalCode'](operate.code, '02'); + // if (counter) { + // const val = localStore.get(counter.code) || ''; + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.humanTrainRoute.event + }; + // } } - } return { error: true }; } @@ -326,17 +326,17 @@ function handleMenuHumanTrainRoute(operates) { const operate = operates[0]; if (operate.type === SignalType && operate.code) { if (operate.code) { - const counter = store.getters['map/getCounterBySingalCode'](operate.code, '02'); - if (counter) { - const val = localStore.get(counter.code) || ''; - return { - type: operate.type, - code: operate.code, - over: true, - operation: SignalOperation.humanTrainRoute.event, - val: val - }; - } + // const counter = store.getters['map/getCounterBySingalCode'](operate.code, '02'); + // if (counter) { + // const val = localStore.get(counter.code) || ''; + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.humanTrainRoute.event + // val: val + }; + // } } } return { error: true }; @@ -547,6 +547,23 @@ function handleMenuHumanControl(operates) { return null; } +// 人工控按钮 操作 +function handleButtonHumanControl(operates) { + if (operates.length >= 2) { + const operate = operates[operates.length - 1]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.humanControl.event.confirm + }; + } + return { error: true }; + } + return null; +} + /** * 处理右键菜单 进路交ATS自动工控 操作 * @param {*} operates @@ -583,6 +600,23 @@ function handleMenuAtsAutoControl(operates) { return null; } +// 自动控 按钮操作 +function handleButtonAtsAutoControl(operates) { + if (operates.length >= 2) { + const operate = operates[operates.length - 1]; + if (operate.type === SignalType && operate.code) { + return { + type: operate.type, + code: operate.code, + over: true, + operation: SignalOperation.atsAutoControl.event.confirm + }; + } + return { error: true }; + } + return null; +} + /** * 处理右键菜单 查询进路状态 操作 * @param {*} operates @@ -634,7 +668,7 @@ function handleButtonGuideRoute(operates) { type: operate.type, code: operate.code, over: true, - operation: SignalOperation.guide.event + operation: SignalOperation.guide.event.confirm }; } return { error: true }; diff --git a/src/scripts/plugin/converter/manager.js b/src/scripts/plugin/converter/manager.js index 1b19e8c9e..7fb4c490e 100644 --- a/src/scripts/plugin/converter/manager.js +++ b/src/scripts/plugin/converter/manager.js @@ -8,7 +8,6 @@ import StationStandOperationConverter from './StationStandOperationConverter'; import CancelLimitOperationConverter from './CancelLimitOperationConverter'; import MixinOperationConverter from './MixinOperationConverter'; - export function getConverter(operates) { if (SwitchOperationConverter.test(operates)) { return SwitchOperationConverter; @@ -33,7 +32,9 @@ export function getConverter(operates) { } else if (CancelLimitOperationConverter.test(operates)) { return CancelLimitOperationConverter; + } else if (MixinOperationConverter.test(operates)) { return MixinOperationConverter; + } -} \ No newline at end of file +} diff --git a/src/views/demonstration/detail/index.vue b/src/views/demonstration/detail/index.vue index 28b3d5762..3e086f79e 100644 --- a/src/views/demonstration/detail/index.vue +++ b/src/views/demonstration/detail/index.vue @@ -4,22 +4,9 @@ {{ $t('demonstration.simulationName') + courseModel.name }} {{ $t('demonstration.noSimulationProducts') }} - - + + - {{ $t('demonstration.productDescription') }} {{ courseModel.remarks }} @@ -28,7 +15,6 @@ {{ $t('global.permissionList') }} - diff --git a/src/views/display/tipExamList.vue b/src/views/display/tipExamList.vue index a9dadd41f..00a62c000 100644 --- a/src/views/display/tipExamList.vue +++ b/src/views/display/tipExamList.vue @@ -5,8 +5,8 @@ - {{$t('display.exam.examTime')}} - + {{ $t('display.exam.examTime') }} + {{ formatRemainTime }} @@ -34,35 +34,35 @@ - {{$t('display.exam.questionTitle')}} + {{ $t('display.exam.questionTitle') }} {{ courseModel.name }} - {{$t('display.exam.bestTime')}} - {{ courseModel.minDuration }} {{$t('display.seconds')}} + {{ $t('display.exam.bestTime') }} + {{ courseModel.minDuration }} {{ $t('display.seconds') }} - {{$t('display.exam.maximumTime')}} - {{ courseModel.maxDuration }} {{$t('display.seconds')}} + {{ $t('display.exam.maximumTime') }} + {{ courseModel.maxDuration }} {{ $t('display.seconds') }} - {{$t('display.exam.trainingInstructions')}} + {{ $t('display.exam.trainingInstructions') }} {{ courseModel.remarks }} - {{$t('display.exam.viewQuestions')}} - {{$t('display.exam.prev')}} - {{$t('display.exam.next')}} - {{$t('display.exam.submitExaminationPaper')}} + {{ $t('display.exam.viewQuestions') }} + {{ $t('display.exam.prev') }} + {{ $t('display.exam.next') }} + {{ $t('display.exam.submitExaminationPaper') }} - {{$t('display.exam.submitExaminationPaper')}} + {{ $t('display.exam.submitExaminationPaper') }} - {{$t('display.exam.examTime')}} + {{ $t('display.exam.examTime') }} {{ formatRemainTime }} @@ -194,7 +194,7 @@ export default { this.$router.replace({ path: `/exam/result/${this.$route.params.userExamId}` }); } else { this.$messageBox(this.$t('display.exam.refreshListError')); - + } }); diff --git a/src/views/display/tipTrainingDetail.vue b/src/views/display/tipTrainingDetail.vue index f175a7843..550d83865 100644 --- a/src/views/display/tipTrainingDetail.vue +++ b/src/views/display/tipTrainingDetail.vue @@ -1,5 +1,6 @@ - + + @@ -12,19 +13,19 @@ - {{$t('display.training.trainingName')}} + {{ $t('display.training.trainingName') }} {{ courseModel.name }} - {{$t('display.training.bestTime')}} - {{ courseModel.minDuration }} {{$t('display.seconds')}} + {{ $t('display.training.bestTime') }} + {{ courseModel.minDuration }} {{ $t('display.seconds') }} - {{$t('display.training.maximumTime')}} - {{ courseModel.maxDuration }} {{$t('display.seconds')}} + {{ $t('display.training.maximumTime') }} + {{ courseModel.maxDuration }} {{ $t('display.seconds') }} - {{$t('display.training.trainingInstructions')}} + {{ $t('display.training.trainingInstructions') }} {{ courseModel.remarks }} @@ -154,10 +155,14 @@ export default { height: 260px; } + .reminder-drag{ + position: relative; + } + .reminder-box { position: absolute; float: left; - left: 15x; + left: 15px; bottom: 15px; width: 500px; height: 300px; diff --git a/src/views/jlmap3d/drive/sceneview/mmiview.vue b/src/views/jlmap3d/drive/sceneview/mmiview.vue index a9abb1b25..75104d90a 100644 --- a/src/views/jlmap3d/drive/sceneview/mmiview.vue +++ b/src/views/jlmap3d/drive/sceneview/mmiview.vue @@ -435,7 +435,7 @@ export default { width:90%; height:25px; bottom:30%; - left:5%; + left:0; font-size:20px; position:absolute; } @@ -444,7 +444,7 @@ export default { width:65%; height:20px; bottom:0; - left:10%; + left:0; position:absolute; text-align: center; } diff --git a/src/views/jointTraining/chatWindow.vue b/src/views/jointTraining/chatWindow.vue index a6a710fe5..9f893156e 100644 --- a/src/views/jointTraining/chatWindow.vue +++ b/src/views/jointTraining/chatWindow.vue @@ -36,17 +36,11 @@ - {{ speak }} - {{$t('joinTraining.sending')}} + {{ speak }} + {{ $t('joinTraining.sending') }} - {{$t('joinTraining.autoplay')}} + {{ $t('joinTraining.autoplay') }} @@ -59,12 +53,9 @@
{{ $t('demonstration.productDescription') }} {{ courseModel.remarks }} @@ -28,7 +15,6 @@ {{ $t('global.permissionList') }}
- {{$t('display.exam.examTime')}} - + {{ $t('display.exam.examTime') }} + {{ formatRemainTime }}
@@ -34,35 +34,35 @@
- {{$t('display.exam.questionTitle')}} + {{ $t('display.exam.questionTitle') }} {{ courseModel.name }}
- {{$t('display.exam.bestTime')}} - {{ courseModel.minDuration }} {{$t('display.seconds')}} + {{ $t('display.exam.bestTime') }} + {{ courseModel.minDuration }} {{ $t('display.seconds') }}
- {{$t('display.exam.maximumTime')}} - {{ courseModel.maxDuration }} {{$t('display.seconds')}} + {{ $t('display.exam.maximumTime') }} + {{ courseModel.maxDuration }} {{ $t('display.seconds') }}
- {{$t('display.exam.trainingInstructions')}} + {{ $t('display.exam.trainingInstructions') }} {{ courseModel.remarks }}
- {{$t('display.exam.examTime')}} + {{ $t('display.exam.examTime') }} {{ formatRemainTime }}
- {{$t('display.training.trainingName')}} + {{ $t('display.training.trainingName') }} {{ courseModel.name }}
- {{$t('display.training.bestTime')}} - {{ courseModel.minDuration }} {{$t('display.seconds')}} + {{ $t('display.training.bestTime') }} + {{ courseModel.minDuration }} {{ $t('display.seconds') }}
- {{$t('display.training.maximumTime')}} - {{ courseModel.maxDuration }} {{$t('display.seconds')}} + {{ $t('display.training.maximumTime') }} + {{ courseModel.maxDuration }} {{ $t('display.seconds') }}
- {{$t('display.training.trainingInstructions')}} + {{ $t('display.training.trainingInstructions') }} {{ courseModel.remarks }}