From 2c23ec76e959ade58615a53cca82dd62dc6349f5 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Tue, 22 Dec 2020 10:03:17 +0800 Subject: [PATCH] =?UTF-8?q?ZC=E6=95=85=E9=9A=9C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/beijing_01/menus/menuStation.vue | 14 ++++++++++---- .../theme/chengdu_01/menus/menuStation.vue | 14 ++++++++++---- .../theme/chengdu_03/menus/menuStation.vue | 14 ++++++++++---- .../theme/components/menus/dialog/setFault.vue | 11 +---------- .../theme/foshan_01/menus/menuStation.vue | 14 ++++++++++---- .../theme/fuzhou_01/menus/menuStation.vue | 14 ++++++++++---- .../theme/haerbin_01/menus/menuStation.vue | 18 ++++++++++++------ .../theme/ningbo_01/menus/menuStation.vue | 14 ++++++++++---- .../theme/ningbo_03/menus/menuStation.vue | 14 ++++++++++---- .../theme/race_01/menus/menuStation.vue | 14 ++++++++++---- .../theme/xian_01/menus/menuStation.vue | 14 ++++++++++---- .../theme/xian_02/menus/menuStation.vue | 14 ++++++++++---- 12 files changed, 113 insertions(+), 56 deletions(-) diff --git a/src/jmapNew/theme/beijing_01/menus/menuStation.vue b/src/jmapNew/theme/beijing_01/menus/menuStation.vue index 6df4d386c..b2be05be5 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuStation.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuStation.vue @@ -172,16 +172,22 @@ export default { // 设置故障 setStoppage() { commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, // 取消故障 cancelStoppage() { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, diff --git a/src/jmapNew/theme/chengdu_01/menus/menuStation.vue b/src/jmapNew/theme/chengdu_01/menus/menuStation.vue index 7fa4cd43f..5ba266370 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuStation.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuStation.vue @@ -108,16 +108,22 @@ export default { // 设置故障 setStoppage() { commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, // 取消故障 cancelStoppage() { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, diff --git a/src/jmapNew/theme/chengdu_03/menus/menuStation.vue b/src/jmapNew/theme/chengdu_03/menus/menuStation.vue index 9ad0f7c26..bc35bc24c 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuStation.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuStation.vue @@ -110,16 +110,22 @@ export default { // 设置故障 setStoppage() { commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, // 取消故障 cancelStoppage() { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, diff --git a/src/jmapNew/theme/components/menus/dialog/setFault.vue b/src/jmapNew/theme/components/menus/dialog/setFault.vue index 2dc837948..2d2dea089 100644 --- a/src/jmapNew/theme/components/menus/dialog/setFault.vue +++ b/src/jmapNew/theme/components/menus/dialog/setFault.vue @@ -175,21 +175,12 @@ export default { hover(field) { this.field = field == this.field ? '' : field; }, - doShow(operate, selected, judge, flag) { + doShow(operate, selected, judge) { if (!this.dialogShow) { this.switchName = ''; this.stationName = ''; this.operation = operate.operation; this.cmdType = operate.cmdType; - if (selected._type == 'Station') { - if (flag) { - // hou - } else if (selected.zcCode) { - selected = this.$store.getters['map/getDeviceByCode'](selected.zcCode); - } else { - selected._type = ''; - } - } let name = selected.name; if (selected._type == 'Train') { name = selected.serviceNumber; diff --git a/src/jmapNew/theme/foshan_01/menus/menuStation.vue b/src/jmapNew/theme/foshan_01/menus/menuStation.vue index 7c94b6988..edb23e922 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuStation.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuStation.vue @@ -146,16 +146,22 @@ export default { // 设置故障 setStoppage() { commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, // 取消故障 cancelStoppage() { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue index fd13b7267..1ffebd905 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue @@ -164,16 +164,22 @@ export default { // 设置故障 setStoppage() { commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, // 取消故障 cancelStoppage() { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, diff --git a/src/jmapNew/theme/haerbin_01/menus/menuStation.vue b/src/jmapNew/theme/haerbin_01/menus/menuStation.vue index ddc6d01d5..3aa307a9a 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuStation.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuStation.vue @@ -121,30 +121,36 @@ export default { // 设置故障 setStoppage() { commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, setStationStoppage() { commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected, false, true); + this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); } }); }, cancelStationStoppage() { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected, false, true); + this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); } }); }, // 取消故障 cancelStoppage() { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStation.vue b/src/jmapNew/theme/ningbo_01/menus/menuStation.vue index 1e5d01a90..c720b89a9 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuStation.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuStation.vue @@ -151,16 +151,22 @@ export default { // 设置故障 setStoppage() { commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, // 取消故障 cancelStoppage() { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, diff --git a/src/jmapNew/theme/ningbo_03/menus/menuStation.vue b/src/jmapNew/theme/ningbo_03/menus/menuStation.vue index 18c2895bb..012833aff 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuStation.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuStation.vue @@ -146,16 +146,22 @@ export default { // 设置故障 setStoppage() { commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, // 取消故障 cancelStoppage() { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, diff --git a/src/jmapNew/theme/race_01/menus/menuStation.vue b/src/jmapNew/theme/race_01/menus/menuStation.vue index 439ca2747..a7870ddd0 100644 --- a/src/jmapNew/theme/race_01/menus/menuStation.vue +++ b/src/jmapNew/theme/race_01/menus/menuStation.vue @@ -151,16 +151,22 @@ export default { // 设置故障 setStoppage() { commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, // 取消故障 cancelStoppage() { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, diff --git a/src/jmapNew/theme/xian_01/menus/menuStation.vue b/src/jmapNew/theme/xian_01/menus/menuStation.vue index 471cc4bbe..da49659de 100644 --- a/src/jmapNew/theme/xian_01/menus/menuStation.vue +++ b/src/jmapNew/theme/xian_01/menus/menuStation.vue @@ -165,16 +165,22 @@ export default { // 设置故障 setStoppage() { commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, // 取消故障 cancelStoppage() { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, diff --git a/src/jmapNew/theme/xian_02/menus/menuStation.vue b/src/jmapNew/theme/xian_02/menus/menuStation.vue index e3d51f6bb..b26baf146 100644 --- a/src/jmapNew/theme/xian_02/menus/menuStation.vue +++ b/src/jmapNew/theme/xian_02/menus/menuStation.vue @@ -231,16 +231,22 @@ export default { // 设置故障 setStoppage() { commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); }, // 取消故障 cancelStoppage() { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); + if (valid && this.selected.zcCode) { + const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode); + this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected); + } else if (!this.selected.zcCode) { + console.error('该车站无zc设备'); } }); },