From 4d4c10f2d5d86060765ba83968c47a840f1ed873 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Thu, 27 Feb 2020 20:37:35 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E5=93=88=E5=B0=94=E6=BB=A8=E7=BA=BF?= =?UTF-8?q?=E8=B7=AF=20=E4=BF=A1=E5=8F=B7=E6=9C=BA=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dialog/childDialog/confirmControl.vue | 56 ++++++------ .../menus/dialog/routeCmdControl.vue | 12 +-- .../haerbin_01/menus/dialog/routeControl.vue | 18 ++-- .../haerbin_01/menus/dialog/routeLock.vue | 10 +-- .../theme/haerbin_01/menus/menuSignal.vue | 85 ++++++++++--------- src/utils/stomp.js | 1 + 6 files changed, 92 insertions(+), 90 deletions(-) diff --git a/src/jmapNew/theme/haerbin_01/menus/dialog/childDialog/confirmControl.vue b/src/jmapNew/theme/haerbin_01/menus/dialog/childDialog/confirmControl.vue index 6ef44707a..cf2e8cd93 100644 --- a/src/jmapNew/theme/haerbin_01/menus/dialog/childDialog/confirmControl.vue +++ b/src/jmapNew/theme/haerbin_01/menus/dialog/childDialog/confirmControl.vue @@ -162,15 +162,15 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); } - }).catch(() => { + }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 信号关灯 @@ -182,15 +182,15 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); } - }).catch(() => { + }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 信号重开 @@ -202,15 +202,15 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); } - }).catch(() => { + }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 取消进路 @@ -222,15 +222,15 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); } - }).catch(() => { + }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 进路交人工控 @@ -242,15 +242,15 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); } - }).catch(() => { + }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 进路交ATS自动控 @@ -262,15 +262,15 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); } - }).catch(() => { + }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 设置运行等级 @@ -283,15 +283,15 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); } - }).catch(() => { + }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 停站时间 @@ -304,15 +304,15 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); } - }).catch(() => { + }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 设置折返策略 @@ -325,15 +325,15 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); } - }).catch(() => { + }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, cancel() { @@ -341,7 +341,7 @@ export default { operation: OperationEvent.Command.cancel.menu.operation }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } diff --git a/src/jmapNew/theme/haerbin_01/menus/dialog/routeCmdControl.vue b/src/jmapNew/theme/haerbin_01/menus/dialog/routeCmdControl.vue index cdc42faa3..064111fc2 100644 --- a/src/jmapNew/theme/haerbin_01/menus/dialog/routeCmdControl.vue +++ b/src/jmapNew/theme/haerbin_01/menus/dialog/routeCmdControl.vue @@ -279,7 +279,7 @@ export default { this.setMessage(this.$t('tip.firstConfirmTip')); this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' }); - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); if (this.operation == OperationEvent.Signal.unlock.menu.operation) { @@ -299,7 +299,7 @@ export default { this.setMessage(this.$t('tip.firstConfirmTip')); this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' }); - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.setButtonEnable({ step: 1 }); @@ -325,7 +325,7 @@ export default { this.setMessage(this.$t('tip.secondConfirmTip')); this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' }); - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.timeCountCommand = -1; @@ -355,7 +355,7 @@ export default { } this.setMessage(''); this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' }); - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.timeCountCommand = -1; this.timeCountConfirm = -1; this.setButtonEnable({ step: -1 }); @@ -385,7 +385,7 @@ export default { } this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' }); - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.setButtonEnable({ step: 0 }); @@ -402,7 +402,7 @@ export default { operation: OperationEvent.Command.close.menu.operation }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } diff --git a/src/jmapNew/theme/haerbin_01/menus/dialog/routeControl.vue b/src/jmapNew/theme/haerbin_01/menus/dialog/routeControl.vue index 5675ce39a..4612aba1e 100644 --- a/src/jmapNew/theme/haerbin_01/menus/dialog/routeControl.vue +++ b/src/jmapNew/theme/haerbin_01/menus/dialog/routeControl.vue @@ -161,7 +161,7 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); @@ -182,7 +182,7 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); @@ -201,7 +201,7 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); @@ -220,7 +220,7 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); @@ -240,7 +240,7 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); @@ -260,7 +260,7 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); @@ -280,7 +280,7 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); @@ -301,7 +301,7 @@ export default { this.doClose(); this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); @@ -318,7 +318,7 @@ export default { operation: OperationEvent.Command.close.menu.operation }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } diff --git a/src/jmapNew/theme/haerbin_01/menus/dialog/routeLock.vue b/src/jmapNew/theme/haerbin_01/menus/dialog/routeLock.vue index cb3a749e9..22f36f24c 100644 --- a/src/jmapNew/theme/haerbin_01/menus/dialog/routeLock.vue +++ b/src/jmapNew/theme/haerbin_01/menus/dialog/routeLock.vue @@ -110,8 +110,8 @@ export default { } /** status 04:封锁*/ - const signal = (selected || {}).status; - this.tempData = [{ code: selected.code, name: selected.name, status: signal.status != '04' ? this.$t('menu.unblocked') : this.$t('menu.blocked') }]; + const signal = selected; + this.tempData = [{ code: selected.code, name: selected.name, status: signal.blockade ? this.$t('menu.blocked') : this.$t('menu.unblocked') }]; const timer = setInterval(() => { if (this.$refs.table) { this.$refs.table.setCurrentRow(this.tempData[0]); @@ -138,15 +138,15 @@ export default { }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); } - }).catch(() => { + }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, cancel() { diff --git a/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue b/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue index 34a9dcc31..4d8b6811c 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue @@ -230,10 +230,10 @@ export default { operation: OperationEvent.Signal.stoppage.menu.operation, cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT, param: { - Signal_Code: `${this.selected.code}` + signalCode: `${this.selected.code}` } }; - this.$store.dispatch('training/next', step).then(({ valid }) => { + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } else { @@ -251,10 +251,10 @@ export default { operation: OperationEvent.Signal.cancelStoppage.menu.operation, cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT, param: { - Signal_Code: `${this.selected.code}` + signalCode: `${this.selected.code}` } }; - this.$store.dispatch('training/next', step).then(({ valid }) => { + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } else { @@ -271,11 +271,11 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.Signal.arrangementRoute.menu.operation, param: { - Signal_Code: `${this.selected.code}` + signalCode: `${this.selected.code}` } }; - this.$store.dispatch('training/next', step).then(({ valid }) => { + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); if (valid) { querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => { @@ -294,10 +294,10 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.Signal.cancelTrainRoute.menu.operation, param: { - Signal_Code: `${this.selected.code}` + signalCode: `${this.selected.code}` } }; - this.$store.dispatch('training/next', step).then(({ valid }) => { + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); if (valid) { this.$refs.routeControl.doShow(step, this.selected); @@ -308,17 +308,17 @@ export default { lock() { const step = { start: true, - code: `${this.selected.code}`, + code: this.selected.code, operation: OperationEvent.Signal.lock.menu.operation, param: { - Signal_Code: `${this.selected.code}` + signalCode: this.selected.code } }; - this.$store.dispatch('training/next', step).then(({ valid }) => { + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeLock.doShow(step.operation, this.selected); + this.$refs.routeLock.doShow(step, this.selected); } }).catch(() => { this.$refs.noticeInfo.doShow(step); @@ -331,10 +331,10 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.Signal.unlock.menu.operation, param: { - Signal_Code: `${this.selected.code}` + signalCode: `${this.selected.code}` } }; - this.$store.dispatch('training/next', step).then(({ valid }) => { + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.routeCmdControl.doShow(step, this.selected); @@ -348,10 +348,10 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.Signal.reopenSignal.menu.operation, param: { - Signal_Code: `${this.selected.code}` + signalCode: `${this.selected.code}` } }; - this.$store.dispatch('training/next', step).then(({ valid }) => { + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.routeControl.doShow(step, this.selected); @@ -365,10 +365,10 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.Signal.guide.menu.operation, param: { - Signal_Code: `${this.selected.code}` + signalCode: `${this.selected.code}` } }; - this.$store.dispatch('training/next', step).then(({ valid }) => { + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); if (valid) { this.$refs.routeCmdControl.doShow(step, this.selected); @@ -382,10 +382,10 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.Signal.setAutoInterlock.menu.operation, param: { - Signal_Code: `${this.selected.code}` + signalCode: `${this.selected.code}` } }; - this.$store.dispatch('training/next', step).then(({ valid }) => { + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.routeControl.doShow(step, this.selected); @@ -399,10 +399,10 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation, param: { - Signal_Code: `${this.selected.code}` + signalCode: `${this.selected.code}` } }; - this.$store.dispatch('training/next', step).then(({ valid }) => { + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.routeControl.doShow(step, this.selected); @@ -413,13 +413,15 @@ export default { setAutoTrigger() { const step = { start: true, + over: true, code: `${this.selected.code}`, operation: OperationEvent.Signal.setAutoTrigger.menu.operation, param: { - Signal_Code: `${this.selected.code}` - } + signalCode: `${this.selected.code}` + }, + cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER }; - this.$store.dispatch('training/next', step).then(({ valid }) => { + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.routeControl.doShow(step, this.selected); @@ -433,10 +435,10 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation, param: { - Signal_Code: `${this.selected.code}` + signalCode: `${this.selected.code}` } }; - this.$store.dispatch('training/next', step).then(({ valid }) => { + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.routeControl.doShow(step, this.selected); @@ -450,10 +452,10 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.Signal.signalClose.menu.operation, param: { - Signal_Code: `${this.selected.code}` + signalCode: `${this.selected.code}` } }; - this.$store.dispatch('training/next', step).then(({ valid }) => { + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.routeControl.doShow(step, this.selected); @@ -467,16 +469,16 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.Signal.humanControl.menu.operation, param: { - Signal_Code: `${this.selected.code}` + signalCode: `${this.selected.code}` } }; - this.$store.dispatch('training/next', step).then(({ valid, response }) => { + this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => { - const tempData = resp.data; - this.$refs.routeHandControl.doShow(step, this.selected, tempData); - }); + // querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => { + // const tempData = resp.data; + // this.$refs.routeHandControl.doShow(step, this.selected, tempData); + // }); } }); }, @@ -484,20 +486,19 @@ export default { atsAutoControl() { const step = { start: true, - Signal_Code: `${this.selected.code}`, code: `${this.selected.code}`, operation: OperationEvent.Signal.atsAutoControl.menu.operation, param: { - Signal_Code: `${this.selected.code}` + signalCode: `${this.selected.code}` } }; - this.$store.dispatch('training/next', step).then(({ valid, response }) => { + this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => { - const tempData = resp.data; - this.$refs.routeHandControl.doShow(step, this.selected, tempData); - }); + // querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => { + // const tempData = resp.data; + // this.$refs.routeHandControl.doShow(step, this.selected, tempData); + // }); } }); } diff --git a/src/utils/stomp.js b/src/utils/stomp.js index cc46671df..5adb484fa 100644 --- a/src/utils/stomp.js +++ b/src/utils/stomp.js @@ -22,6 +22,7 @@ export function creatSubscribe(topic, header) { function callback(Response) { if (store) { var data = JSON.parse(Response.body); + console.log(data); store.dispatch('socket/setStomp', data); } else { callback(Response); From 04878f54ba77cf80dc8736754bf0a4c590048775 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 28 Feb 2020 10:41:36 +0800 Subject: [PATCH 02/14] =?UTF-8?q?=E5=93=88=E5=B0=94=E6=BB=A8=E7=BA=BF?= =?UTF-8?q?=E8=B7=AF=20=E4=BF=A1=E5=8F=B7=E6=9C=BA=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../menus/dialog/routeHandControl.vue | 5 +- .../menus/dialog/routeHandControl.vue | 85 +++++++++---------- .../theme/haerbin_01/menus/menuSignal.vue | 19 ++++- .../menus/dialog/routeHandControl.vue | 2 +- 4 files changed, 59 insertions(+), 52 deletions(-) diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/routeHandControl.vue index f9f65fdbe..290ac9487 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/routeHandControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/routeHandControl.vue @@ -148,7 +148,6 @@ export default { }, methods: { doShow(operate, selected, tempData) { - debugger; this.selected = selected; this.allSelect = false; this.changeList = []; @@ -169,7 +168,7 @@ export default { if (tempData && tempData.length > 0) { tempData.forEach(elem => { - elem.check = false; + this.changeList.push(false); elem.disabled = false; // 设置禁用状态 if (operate.operation === OperationEvent.Signal.humanControl.menu.operation && @@ -339,7 +338,7 @@ export default { operation: OperationEvent.Command.cancel.menu.operation }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } diff --git a/src/jmapNew/theme/haerbin_01/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/haerbin_01/menus/dialog/routeHandControl.vue index b8073f4aa..3915bdbfe 100644 --- a/src/jmapNew/theme/haerbin_01/menus/dialog/routeHandControl.vue +++ b/src/jmapNew/theme/haerbin_01/menus/dialog/routeHandControl.vue @@ -34,9 +34,14 @@ highlight-current-row :height="140" > - + @@ -95,11 +100,14 @@ export default { return { dialogShow: false, loading: false, + selected: null, tempData: [], operation: null, selection: [], stationName: '', - signalName: '' + signalName: '', + changeList:[], + commitDisabled: true }; }, computed: { @@ -132,24 +140,9 @@ export default { return this.$t('menu.menuSignal.atsAutoControl'); } return ''; - }, - commitDisabled() { - let disabled = true; - if (this.selection && this.selection.length) { - disabled = false; - } - - return disabled; } }, watch: { - // 深度数据状态 - tempData: { - handler(val, oldVal) { - this.checkTableDataSelction(val); - }, - deep: true - } }, mounted() { this.$nextTick(() => { @@ -158,6 +151,10 @@ export default { }, methods: { doShow(operate, selected, tempData) { + this.selected = selected; + this.changeList = []; + this.commitDisabled = true; + this.selection = []; // 如果不是断点激活,而是第一次显示则初始化 if (!this.dialogShow) { this.signalName = ''; @@ -172,14 +169,14 @@ export default { if (tempData && tempData.length > 0) { tempData.forEach(elem => { - elem.check = false; + this.changeList.push(false); elem.disabled = false; // 设置禁用状态 if (operate.operation === OperationEvent.Signal.humanControl.menu.operation && - elem.controlType != '01') { + (elem.atsControl == '0')) { elem.disabled = true; } if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation && - elem.controlType == '01') { + (elem.atsControl == '1')) { elem.disabled = true; } }); @@ -199,19 +196,16 @@ export default { this.$refs.tempTable.setCurrentRow(); this.$store.dispatch('training/emitTipFresh'); }, - checkTableDataSelction(data) { - const selection = []; - if (data && data.length > 0) { - data.forEach(row => { - if (row.check && !row.disabled) { - selection.push(row); - } - }); + changeCheck(check, code) { + if (check) { + this.selection.push(code); + } else { + this.selection.splice(this.selection.indexOf(code), 1); } - - if (JSON.stringify(selection) !== JSON.stringify(this.selection)) { - this.handleChooseChange(selection); - this.selection = selection; + if (this.selection.length > 0) { + this.commitDisabled = false; + } else { + this.commitDisabled = true; } }, handleChooseChange(selection) { @@ -252,58 +246,55 @@ export default { }, // 自排关 humanControl() { - const codeList = this.selection.map(elem => { return elem.code; }); const operate = { over: true, operation: OperationEvent.Signal.humanControl.menu.operation, cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, - param: { - Route_Code_List: codeList + param:{ + routeCodeList:this.selection } }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, error.message); }); }, // 自排开 atsAutoControl() { - const codeList = this.selection.map(elem => { return elem.code; }); const operate = { over: true, operation: OperationEvent.Signal.atsAutoControl.menu.operation, cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, - param: { - Route_Code_List: codeList + param:{ + routeCodeList:this.selection } }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, error.message); }); }, cancel() { const operate = { operation: OperationEvent.Command.cancel.menu.operation }; - - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } diff --git a/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue b/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue index 4d8b6811c..9e8bfc189 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue @@ -183,6 +183,9 @@ export default { ...mapGetters('menuOperation', [ 'buttonOperation' ]), + ...mapGetters('map', [ + 'routeList' + ]), group() { return this.$route.query.group; } @@ -474,7 +477,14 @@ export default { }; this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => { if (valid) { + const routes = []; + this.routeList.forEach(elem => { + if (elem.startSignalCode === this.selected.code) { + routes.push(elem); + } + }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.routeHandControl.doShow(step, this.selected, routes); // querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => { // const tempData = resp.data; // this.$refs.routeHandControl.doShow(step, this.selected, tempData); @@ -482,7 +492,7 @@ export default { } }); }, - // 自排关(进路交ATS自动控) + // 自排开(进路交ATS自动控) atsAutoControl() { const step = { start: true, @@ -494,7 +504,14 @@ export default { }; this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => { if (valid) { + const routes = []; + this.routeList.forEach(elem => { + if (elem.startSignalCode === this.selected.code) { + routes.push(elem); + } + }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.routeHandControl.doShow(step, this.selected, routes); // querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => { // const tempData = resp.data; // this.$refs.routeHandControl.doShow(step, this.selected, tempData); diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue index bad99d939..25420d630 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue @@ -162,7 +162,7 @@ export default { if (tempData && tempData.length > 0) { tempData.forEach(elem => { - elem.check = false; + this.changeList.push(false); elem.disabled = false; // 设置禁用状态 if (operate.operation === OperationEvent.Signal.humanControl.menu.operation && From d5539a986b402aa1af11a93b49f72f3f202a3778 Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Fri, 28 Feb 2020 11:25:36 +0800 Subject: [PATCH 03/14] =?UTF-8?q?=E6=8C=89=E8=AE=A1=E5=88=92=E8=A1=8C?= =?UTF-8?q?=E8=BD=A6=E6=8E=A5=E5=8F=A3=E6=8A=A5=E9=94=99=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 1abad25) --- src/i18n/langs/en/error.js | 9 ++++++++- src/i18n/langs/zh/error.js | 9 ++++++++- src/jmapNew/theme/beijing_01/planConvert.js | 16 ++++++++-------- src/jmapNew/theme/chengdu_03/planConvert.js | 16 ++++++++-------- src/jmapNew/theme/ningbo_01/planConvert.js | 16 ++++++++-------- src/utils/baseUrl.js | 2 +- .../newMap/displayNew/demon/runPlanView.vue | 5 +++-- src/views/newMap/displayNew/menuDemon.vue | 14 ++++++++++++++ src/views/newMap/displayNew/menuScript.vue | 14 ++++++++++++++ src/views/newMap/jointTrainingNew/menuDemon.vue | 14 ++++++++++++++ 10 files changed, 86 insertions(+), 29 deletions(-) diff --git a/src/i18n/langs/en/error.js b/src/i18n/langs/en/error.js index 280bc3515..0936ed8b0 100644 --- a/src/i18n/langs/en/error.js +++ b/src/i18n/langs/en/error.js @@ -108,5 +108,12 @@ export default { getRealDeviceFailed: 'Failed to get real device failed', mapDataError: 'Map data error', runningChartDataError: 'Running chart data error', - runningChartIsNotLoaded: 'Running chart is not loaded' + runningChartIsNotLoaded: 'Running chart is not loaded', + runningDataError: 'Running data error', + systemError: 'System error', + simulationDoesNotExist: 'Simulation does not exist', + simulationOperationIsNotDefined: 'The simulation operation is not defined', + simulationOperationFailed: 'The simulation operation failed', + operationConflict: 'Operation conflict', + simulationOperationProcessingMethodNotFound: 'Simulation operation processing method not found' }; diff --git a/src/i18n/langs/zh/error.js b/src/i18n/langs/zh/error.js index 266f43af4..c9f694983 100644 --- a/src/i18n/langs/zh/error.js +++ b/src/i18n/langs/zh/error.js @@ -108,5 +108,12 @@ export default { getRealDeviceFailed: '获取真实设备失败!', mapDataError: '地图数据错误', runningChartDataError: '运行图数据错误', - runningChartIsNotLoaded: '运行图未加载' + runningChartIsNotLoaded: '运行图未加载', + runningDataError: '运行数据错误', + systemError: '系统错误', + simulationDoesNotExist: '仿真不存在', + simulationOperationIsNotDefined: '仿真操做未定义', + simulationOperationFailed: '仿真操做执行失败', + operationConflict: '操做冲突', + simulationOperationProcessingMethodNotFound: '仿真操做处理方法未找到' }; diff --git a/src/jmapNew/theme/beijing_01/planConvert.js b/src/jmapNew/theme/beijing_01/planConvert.js index f105f3c41..dfbd15bb6 100644 --- a/src/jmapNew/theme/beijing_01/planConvert.js +++ b/src/jmapNew/theme/beijing_01/planConvert.js @@ -113,7 +113,7 @@ export default { pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; pointdata.color = '#000' || lineStyle.color; pointdata.directionCode = train.directionCode; - pointdata.coord = [train.stationTimeList[1].secondTime || train.stationTimeList[1].second, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; + pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; /** 给服务对象添加服务名称和标记点*/ opt.markPointData.push(createMartPoint(pointdata)); @@ -125,10 +125,10 @@ export default { train.stationTimeList.forEach((elem, index) => { idx = index; if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || - index == train.stationTimeList.length - 2 && (train.stationTimeList[index].secondTime || train.stationTimeList[index].second) != (train.stationTimeList[index + 1].secondTime|| train.stationTimeList[index + 1].secondTime) || + index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || index > 0 && index < train.stationTimeList.length - 1) { const aa = `${train.directionCode}${train.tripNumber}`; - opt.data.push([elem.secondTime || elem.second, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]); + opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]); } }); @@ -138,8 +138,8 @@ export default { nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1]; num = this.computedReentryNumber(train.tripNumber); const aa = `${train.directionCode}${train.tripNumber}`; - opt.data.push([lastPoint.secondTime || lastPoint.second, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]); - opt.data.push([nextPoint.secondTime || nextPoint.second, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]); + opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]); + opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]); } /** 如果是备用车,按车次添加线*/ @@ -201,21 +201,21 @@ export default { runPlanData[elem.serviceNumber][elem.tripNumber].push(elem); runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => { - return parseInt(a.secondTime || a.second) - parseInt(b.secondTime || b.second); + return parseInt(a.secondTime) - parseInt(b.secondTime); }); /** 如果此记录车组号的数据为第一条时,则打上标签*/ if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { serie.markPoint.data.push(createMartPoint({ directionCode: elem.directionCode, - coord: [parseInt(elem.secondTime || elem.second), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], + coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], name: `(${elem.groupNumber})${elem.serviceNumber}${elem.directionCode}${elem.tripNumber}`, color: lineStyle.color || '#000' })); } /** 计算折返点*/ - var nextPoint = [parseInt(elem.secondTime || elem.second), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode]; + var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode]; if (serie.data.length > 0) { var lastPoint = serie.data[serie.data.length - 1]; if (lastPoint[2] !== nextPoint[2]) { diff --git a/src/jmapNew/theme/chengdu_03/planConvert.js b/src/jmapNew/theme/chengdu_03/planConvert.js index 2834ae7a8..495dc4e68 100644 --- a/src/jmapNew/theme/chengdu_03/planConvert.js +++ b/src/jmapNew/theme/chengdu_03/planConvert.js @@ -93,7 +93,7 @@ export default { pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; pointdata.color = '#000' || lineStyle.color; pointdata.directionCode = train.directionCode; - pointdata.coord = [train.stationTimeList[1].secondTime || train.stationTimeList[1].second, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; + pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; /** 给服务对象添加服务名称和标记点*/ opt.markPointData.push(createMartPoint(pointdata)); @@ -105,10 +105,10 @@ export default { train.stationTimeList.forEach((elem, index) => { idx = index; if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || - index == train.stationTimeList.length - 2 && (train.stationTimeList[index].secondTime || train.stationTimeList[index].second) != (train.stationTimeList[index + 1].secondTime || train.stationTimeList[index + 1].second) || + index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || index > 0 && index < train.stationTimeList.length - 1) { const aa = `${train.directionCode}${train.tripNumber}`; - opt.data.push([elem.secondTime || elem.second, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]); + opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]); } }); @@ -118,8 +118,8 @@ export default { nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1]; num = this.computedReentryNumber(train.tripNumber); const aa = `${train.directionCode}${train.tripNumber}`; - opt.data.push([lastPoint.secondTime || lastPoint.second, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]); - opt.data.push([nextPoint.secondTime || nextPoint.second, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]); + opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]); + opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]); } /** 如果是备用车,按车次添加线*/ @@ -179,21 +179,21 @@ export default { runPlanData[elem.serviceNumber][elem.tripNumber].push(elem); runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => { - return parseInt(a.secondTime || a.second) - parseInt(b.secondTime || b.second); + return parseInt(a.secondTime) - parseInt(b.secondTime); }); /** 如果此记录车组号的数据为第一条时,则打上标签*/ if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { serie.markPoint.data.push(createMartPoint({ directionCode: elem.directionCode, - coord: [parseInt(elem.secondTime || elem.second), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], + coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], name: `(${elem.groupNumber})${elem.serviceNumber}${elem.directionCode}${elem.tripNumber}`, color: lineStyle.color || '#000' })); } /** 计算折返点*/ - var nextPoint = [parseInt(elem.secondTime || elem.second), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode]; + var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode]; if (serie.data.length > 0) { var lastPoint = serie.data[serie.data.length - 1]; if (lastPoint[2] !== nextPoint[2]) { diff --git a/src/jmapNew/theme/ningbo_01/planConvert.js b/src/jmapNew/theme/ningbo_01/planConvert.js index 84a0e00d3..cd986201b 100644 --- a/src/jmapNew/theme/ningbo_01/planConvert.js +++ b/src/jmapNew/theme/ningbo_01/planConvert.js @@ -138,7 +138,7 @@ export default { pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; pointdata.color = '#000' || lineStyle.color; pointdata.directionCode = train.directionCode; - pointdata.coord = [train.stationTimeList[1].secondTime || train.stationTimeList[1].second, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; + pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; /** 给服务对象添加服务名称和标记点*/ opt.markPointData.push(createMartPoint(pointdata)); @@ -150,10 +150,10 @@ export default { train.stationTimeList.forEach((elem, index) => { idx = index; if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || - index == train.stationTimeList.length - 2 && (train.stationTimeList[index].second||train.stationTimeList[index].secondTime) != (train.stationTimeList[index + 1].second || train.stationTimeList[index + 1].secondTime) || + index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || index > 0 && index < train.stationTimeList.length - 1) { const aa = `${train.directionCode}${train.tripNumber}`; - opt.data.push([elem.secondTime || elem.second, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]); + opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]); } }); @@ -162,8 +162,8 @@ export default { lastPoint = train.stationTimeList[idx - 1]; nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1]; num = this.computedReentryNumber(train.tripNumber); - opt.data.push([lastPoint.secondTime || lastPoint.second, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode]); - opt.data.push([nextPoint.secondTime || nextPoint.second, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode]); + opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode]); + opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode]); } /** 如果是备用车,按车次添加线*/ @@ -222,21 +222,21 @@ export default { runPlanData[elem.serviceNumber][elem.tripNumber].push(elem); runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => { - return parseInt(a.second || a.secondTime) - parseInt(b.second || b.secondTime); + return parseInt(a.secondTime) - parseInt(b.secondTime); }); /** 如果此记录车组号的数据为第一条时,则打上标签*/ if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { serie.markPoint.data.push(createMartPoint({ directionCode: elem.directionCode, - coord: [parseInt(elem.second || elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], + coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], name: `(${elem.groupNumber})${elem.serviceNumber}${elem.directionCode}${elem.tripNumber}`, color: lineStyle.color || '#000' })); } /** 计算折返点*/ - var nextPoint = [parseInt(elem.second || elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode]; + var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode]; if (serie.data.length > 0) { var lastPoint = serie.data[serie.data.length - 1]; if (lastPoint[2] !== nextPoint[2]) { diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 93d80dbd2..506eafc22 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,7 +3,7 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; + BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 diff --git a/src/views/newMap/displayNew/demon/runPlanView.vue b/src/views/newMap/displayNew/demon/runPlanView.vue index 77e5df00d..8ac7d5f2d 100644 --- a/src/views/newMap/displayNew/demon/runPlanView.vue +++ b/src/views/newMap/displayNew/demon/runPlanView.vue @@ -235,7 +235,6 @@ if (this.myChart && this.myChart.isDisposed) { this.myChart.clear(); } - let startValue = 3600 + this.PlanConvert.TranslationTime; const offsetTime = 3600; const initTime = toTimeStamp(formatDuring(this.$store.state.training.initTime)); @@ -254,7 +253,6 @@ reject(error); } }); - }, updateRunPlanData(data) { const stations = this.$store.state.runPlan.stations; @@ -267,6 +265,9 @@ } }); } + if (data[0]) { + data[0].secondTime = data[0].second; + } this.series = this.PlanConvert.updateDataToModels(data, stations, this.kmRangeCoordMap, planData, this.series, { color: '#FF00DE', width: 0.5 } ); diff --git a/src/views/newMap/displayNew/menuDemon.vue b/src/views/newMap/displayNew/menuDemon.vue index 85d6c5219..02eb77f64 100644 --- a/src/views/newMap/displayNew/menuDemon.vue +++ b/src/views/newMap/displayNew/menuDemon.vue @@ -173,6 +173,20 @@ export default { this.$messageBox(this.$t('error.runningChartDataError') + ',' + this.$t('error.startSimulationFailed')); } else if (error.code == '5003') { this.$messageBox(this.$t('error.runningChartIsNotLoaded') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '5004') { + this.$messageBox(this.$t('error.runningDataError') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '5000') { + this.$messageBox(this.$t('error.systemError') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '4000') { + this.$messageBox(this.$t('error.simulationDoesNotExist') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '4001') { + this.$messageBox(this.$t('error.simulationOperationIsNotDefined') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '4002') { + this.$messageBox(this.$t('error.simulationOperationProcessingMethodNotFound') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '4003') { + this.$messageBox(this.$t('error.simulationOperationFailed') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '4004') { + this.$messageBox(this.$t('error.operationConflict') + ',' + this.$t('error.startSimulationFailed')); } }); }, diff --git a/src/views/newMap/displayNew/menuScript.vue b/src/views/newMap/displayNew/menuScript.vue index ea9551efa..9ee7c62c3 100644 --- a/src/views/newMap/displayNew/menuScript.vue +++ b/src/views/newMap/displayNew/menuScript.vue @@ -114,6 +114,20 @@ export default { this.$messageBox(this.$t('error.runningChartDataError') + ',' + this.$t('error.startSimulationFailed')); } else if (error.code == '5003') { this.$messageBox(this.$t('error.runningChartIsNotLoaded') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '5004') { + this.$messageBox(this.$t('error.runningDataError') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '5000') { + this.$messageBox(this.$t('error.systemError') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '4000') { + this.$messageBox(this.$t('error.simulationDoesNotExist') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '4001') { + this.$messageBox(this.$t('error.simulationOperationIsNotDefined') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '4002') { + this.$messageBox(this.$t('error.simulationOperationProcessingMethodNotFound') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '4003') { + this.$messageBox(this.$t('error.simulationOperationFailed') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '4004') { + this.$messageBox(this.$t('error.operationConflict') + ',' + this.$t('error.startSimulationFailed')); } }); }, diff --git a/src/views/newMap/jointTrainingNew/menuDemon.vue b/src/views/newMap/jointTrainingNew/menuDemon.vue index 94bd72bea..c3e3fdc82 100644 --- a/src/views/newMap/jointTrainingNew/menuDemon.vue +++ b/src/views/newMap/jointTrainingNew/menuDemon.vue @@ -296,6 +296,20 @@ export default { this.$messageBox(this.$t('error.runningChartDataError') + ',' + this.$t('error.startSimulationFailed')); } else if (error.code == '5003') { this.$messageBox(this.$t('error.runningChartIsNotLoaded') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '5004') { + this.$messageBox(this.$t('error.runningDataError') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '5000') { + this.$messageBox(this.$t('error.systemError') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '4000') { + this.$messageBox(this.$t('error.simulationDoesNotExist') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '4001') { + this.$messageBox(this.$t('error.simulationOperationIsNotDefined') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '4002') { + this.$messageBox(this.$t('error.simulationOperationProcessingMethodNotFound') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '4003') { + this.$messageBox(this.$t('error.simulationOperationFailed') + ',' + this.$t('error.startSimulationFailed')); + } else if (error.code == '4004') { + this.$messageBox(this.$t('error.operationConflict') + ',' + this.$t('error.startSimulationFailed')); } }); }, From 7038ec12a88053ae2805aa976a902ee983029edc Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 28 Feb 2020 13:07:49 +0800 Subject: [PATCH 04/14] =?UTF-8?q?=E5=93=88=E5=B0=94=E6=BB=A8=E7=BA=BF?= =?UTF-8?q?=E8=B7=AF=E4=BF=A1=E5=8F=B7=E6=9C=BA=E6=93=8D=E4=BD=9C=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../haerbin_01/menus/dialog/routeControl.vue | 4 +- .../menus/dialog/routeHandControl.vue | 4 +- .../menus/dialog/routeSelection.vue | 97 ++++++++----------- .../theme/haerbin_01/menus/menuSignal.vue | 33 ++++--- .../ningbo_01/menus/dialog/routeSelection.vue | 22 +---- 5 files changed, 65 insertions(+), 95 deletions(-) diff --git a/src/jmapNew/theme/haerbin_01/menus/dialog/routeControl.vue b/src/jmapNew/theme/haerbin_01/menus/dialog/routeControl.vue index 4612aba1e..c64d1d11c 100644 --- a/src/jmapNew/theme/haerbin_01/menus/dialog/routeControl.vue +++ b/src/jmapNew/theme/haerbin_01/menus/dialog/routeControl.vue @@ -166,10 +166,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 行调工作站取消进路 diff --git a/src/jmapNew/theme/haerbin_01/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/haerbin_01/menus/dialog/routeHandControl.vue index 3915bdbfe..f8c795ea2 100644 --- a/src/jmapNew/theme/haerbin_01/menus/dialog/routeHandControl.vue +++ b/src/jmapNew/theme/haerbin_01/menus/dialog/routeHandControl.vue @@ -264,7 +264,7 @@ export default { }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate, error.message); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 自排开 @@ -287,7 +287,7 @@ export default { }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate, error.message); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, cancel() { diff --git a/src/jmapNew/theme/haerbin_01/menus/dialog/routeSelection.vue b/src/jmapNew/theme/haerbin_01/menus/dialog/routeSelection.vue index 8046c996c..55ec245a8 100644 --- a/src/jmapNew/theme/haerbin_01/menus/dialog/routeSelection.vue +++ b/src/jmapNew/theme/haerbin_01/menus/dialog/routeSelection.vue @@ -1,5 +1,5 @@