From 6c5469ec90214f664f4e05a3896a8350aaa14b15 Mon Sep 17 00:00:00 2001
From: zyy <1787816799@qq.com>
Date: Thu, 8 Aug 2019 16:47:34 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81=E6=A0=BC?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/jmap/theme/beijing_01/menus/index.vue | 3 +-
src/jmap/theme/beijing_01/menus/menuBar.vue | 4 +-
.../theme/beijing_01/menus/menuButton.vue | 677 ++++++------
.../theme/beijing_01/menus/menuCancel.vue | 4 +-
src/jmap/theme/beijing_01/menus/menuLimit.vue | 226 ++--
.../theme/beijing_01/menus/menuSection.vue | 803 +++++++--------
.../theme/beijing_01/menus/menuSignal.vue | 973 +++++++++---------
.../theme/beijing_01/menus/menuStation.vue | 3 +-
.../beijing_01/menus/menuStationControl.vue | 6 +-
.../beijing_01/menus/menuStationStand.vue | 3 +-
.../theme/beijing_01/menus/menuSwitch.vue | 865 ++++++++--------
src/jmap/theme/beijing_01/menus/menuTool.vue | 276 +++--
src/jmap/theme/beijing_01/menus/menuTrain.vue | 3 +-
src/jmap/theme/beijing_01/menus/statusBar.vue | 43 +-
src/views/components/progressBar/index.vue | 230 +++--
src/views/display/tipScriptRecord.vue | 318 +++---
16 files changed, 2235 insertions(+), 2202 deletions(-)
diff --git a/src/jmap/theme/beijing_01/menus/index.vue b/src/jmap/theme/beijing_01/menus/index.vue
index d3cc0ad9f..534ed4a09 100644
--- a/src/jmap/theme/beijing_01/menus/index.vue
+++ b/src/jmap/theme/beijing_01/menus/index.vue
@@ -63,7 +63,8 @@ export default {
},
props: {
selected: {
- type: Object
+ type: Object,
+ required: true
}
},
computed: {
diff --git a/src/jmap/theme/beijing_01/menus/menuBar.vue b/src/jmap/theme/beijing_01/menus/menuBar.vue
index 93bb6dbe5..475e2e953 100644
--- a/src/jmap/theme/beijing_01/menus/menuBar.vue
+++ b/src/jmap/theme/beijing_01/menus/menuBar.vue
@@ -99,7 +99,6 @@
\ No newline at end of file
+
diff --git a/src/jmap/theme/beijing_01/menus/menuCancel.vue b/src/jmap/theme/beijing_01/menus/menuCancel.vue
index f92ddd305..5c03e47ef 100644
--- a/src/jmap/theme/beijing_01/menus/menuCancel.vue
+++ b/src/jmap/theme/beijing_01/menus/menuCancel.vue
@@ -6,12 +6,10 @@
\ No newline at end of file
+export default {
+ name: 'MenuLimit',
+ components: {
+ PopMenu,
+ CancelAllLimit
+ },
+ props: {
+ selected: {
+ type: Object,
+ required: true
+ }
+ },
+ 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/beijing_01/menus/menuSection.vue b/src/jmap/theme/beijing_01/menus/menuSection.vue
index 7a30d5680..d7e82e9f4 100644
--- a/src/jmap/theme/beijing_01/menus/menuSection.vue
+++ b/src/jmap/theme/beijing_01/menus/menuSection.vue
@@ -1,410 +1,411 @@
-
+
\ No newline at end of file
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.sectionCmdControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ undeveloped() {
+ this.doClose();
+ this.$alert('实现中......', '提示', {
+ confirmButtonText: '确定',
+ callback: action => {
+ }
+ });
+ },
+ // 切除
+ split() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Section.type,
+ label: MapDeviceType.Section.label,
+ operation: OperationEvent.Section.split.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.sectionControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ alxeEffective() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Section.type,
+ label: MapDeviceType.Section.label,
+ operation: OperationEvent.Section.alxeEffective.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.alxeEffective.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 激活
+ active() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Section.type,
+ label: MapDeviceType.Section.label,
+ operation: OperationEvent.Section.active.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.sectionControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 区段计轴预复位
+ axlePreReset() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Section.type,
+ label: MapDeviceType.Section.label,
+ operation: OperationEvent.Section.axlePreReset.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.sectionCmdControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 区段解锁
+ lock() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Section.type,
+ label: MapDeviceType.Section.label,
+ operation: OperationEvent.Section.lock.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.sectionControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 区段封锁
+ unlock() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Section.type,
+ label: MapDeviceType.Section.label,
+ operation: OperationEvent.Section.unlock.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.sectionCmdControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 设置速度
+ setSpeed() {
+ // let operate = {
+ // start: true,
+ // code: this.selected.code,
+ // type: MapDeviceType.Section.type,
+ // label: MapDeviceType.Section.label,
+ // operation: OperationEvent.Section.setLimitSpeed.menu.operation
+ // };
+ // this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ // if (valid) {
+ // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ // this.$refs.speedCmdControl.doShow(operate, this.selected);
+ // }
+ // });
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Section.type,
+ label: MapDeviceType.Section.label,
+ operation: OperationEvent.Section.setSpeed.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.speedLimitControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 取消速度
+ // cancelSpeed() {
+ // let operate = {
+ // start: true,
+ // send: true,
+ // code: this.selected.code,
+ // type: MapDeviceType.Section.type,
+ // label: MapDeviceType.Section.label,
+ // operation: OperationEvent.Section.cancelSpeed.menu.operation
+ // };
+ // this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
+ // if (valid) {
+ // let tempData = response.data;
+ // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ // this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
+ // }
+ // });
+ // },
+ // 新建列车
+ newTrain() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Section.type,
+ label: MapDeviceType.Section.label,
+ operation: OperationEvent.Section.newtrain.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.trainCreate.doShow(operate, this.selected);
+ }
+ });
+ }
+ }
+};
+
diff --git a/src/jmap/theme/beijing_01/menus/menuSignal.vue b/src/jmap/theme/beijing_01/menus/menuSignal.vue
index 23c962947..b346c3faf 100644
--- a/src/jmap/theme/beijing_01/menus/menuSignal.vue
+++ b/src/jmap/theme/beijing_01/menus/menuSignal.vue
@@ -1,498 +1,499 @@
-
+
\ No newline at end of file
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.routeLock.doShow(operate.operation, this.selected);
+ }
+ }).catch(() => {
+ this.$refs.noticeInfo.doShow(operate);
+ });
+ },
+ // 信号解封
+ unlock() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Signal.type,
+ label: MapDeviceType.Signal.label,
+ operation: OperationEvent.Signal.unlock.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.routeCmdControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 信号重开
+ reopenSignal() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Signal.type,
+ label: MapDeviceType.Signal.label,
+ operation: OperationEvent.Signal.reopenSignal.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.routeControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 进路引导
+ guide() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Signal.type,
+ label: MapDeviceType.Signal.label,
+ operation: OperationEvent.Signal.guide.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ if (valid) {
+ this.$refs.routeCmdControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 设置联锁自动进路
+ setAutoInterlock() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Signal.type,
+ label: MapDeviceType.Signal.label,
+ operation: OperationEvent.Signal.setAutoInterlock.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.routeControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 取消联锁自动进路
+ cancelAutoInterlock() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Signal.type,
+ label: MapDeviceType.Signal.label,
+ operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.routeControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 设置联锁自动触发
+ setAutoTrigger() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Signal.type,
+ label: MapDeviceType.Signal.label,
+ operation: OperationEvent.Signal.setAutoTrigger.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.routeControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 取消联锁自动触发
+ cancelAutoTrigger() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Signal.type,
+ label: MapDeviceType.Signal.label,
+ operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.routeControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 信号关灯
+ signalClose() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Signal.type,
+ label: MapDeviceType.Signal.label,
+ operation: OperationEvent.Signal.signalClose.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.routeControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 进路交人工控
+ humanControl() {
+ const operate = {
+ start: true,
+ send: true,
+ code: this.selected.code,
+ type: MapDeviceType.Signal.type,
+ label: MapDeviceType.Signal.label,
+ operation: OperationEvent.Signal.humanControl.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
+ if (valid) {
+ let tempData = null;
+ if (response) {
+ tempData = response.data;
+ }
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
+ }
+ });
+ },
+ // 进路交自动控
+ atsAutoControl() {
+ const operate = {
+ start: true,
+ send: true,
+ code: this.selected.code,
+ type: MapDeviceType.Signal.type,
+ label: MapDeviceType.Signal.label,
+ operation: OperationEvent.Signal.atsAutoControl.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
+ if (valid) {
+ let tempData = null;
+ if (response) {
+ tempData = response.data;
+ }
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
+ }
+ });
+ },
+ // 查询进路状态
+ detail() {
+ const operate = {
+ start: true,
+ send: true,
+ code: this.selected.code,
+ type: MapDeviceType.Signal.type,
+ label: MapDeviceType.Signal.label,
+ operation: OperationEvent.Signal.detail.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.routeDetail.doShow(operate, this.selected, response.data);
+ }
+ });
+ }
+ }
+};
+
diff --git a/src/jmap/theme/beijing_01/menus/menuStation.vue b/src/jmap/theme/beijing_01/menus/menuStation.vue
index 51933e50d..4f5a09826 100644
--- a/src/jmap/theme/beijing_01/menus/menuStation.vue
+++ b/src/jmap/theme/beijing_01/menus/menuStation.vue
@@ -31,7 +31,8 @@ export default {
},
props: {
selected: {
- type: Object
+ type: Object,
+ required: true
}
},
data() {
diff --git a/src/jmap/theme/beijing_01/menus/menuStationControl.vue b/src/jmap/theme/beijing_01/menus/menuStationControl.vue
index ef97a1ab4..92a3aceeb 100644
--- a/src/jmap/theme/beijing_01/menus/menuStationControl.vue
+++ b/src/jmap/theme/beijing_01/menus/menuStationControl.vue
@@ -5,10 +5,7 @@
\ No newline at end of file
+ // 区段切除
+ split() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Switch.type,
+ label: MapDeviceType.Switch.label,
+ operation: OperationEvent.Switch.split.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.switchControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 区段激活
+ active() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Switch.type,
+ label: MapDeviceType.Switch.label,
+ operation: OperationEvent.Switch.active.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.switchControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 道岔计轴预复位
+ axlePreReset() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Switch.type,
+ label: MapDeviceType.Switch.label,
+ operation: OperationEvent.Switch.axlePreReset.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.switchCmdControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 设置临时限速
+ setSpeed() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Switch.type,
+ label: MapDeviceType.Switch.label,
+ operation: OperationEvent.Switch.setSpeed.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.speedLimitControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 确认计轴有效
+ alxeEffective() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.Switch.type,
+ label: MapDeviceType.Switch.label,
+ operation: OperationEvent.Switch.alxeEffective.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.alxeEffective.doShow(operate, this.selected);
+ }
+ });
+ },
+ undeveloped() {
+ this.doClose();
+ this.$alert('实现中......', '提示', {
+ confirmButtonText: '确定',
+ callback: action => {
+ }
+ });
+ }
+ }
+};
+
diff --git a/src/jmap/theme/beijing_01/menus/menuTool.vue b/src/jmap/theme/beijing_01/menus/menuTool.vue
index 17ecde773..dc2bb9858 100644
--- a/src/jmap/theme/beijing_01/menus/menuTool.vue
+++ b/src/jmap/theme/beijing_01/menus/menuTool.vue
@@ -1,148 +1,145 @@
-