From 47186e0948a1029f4a75d12fab29b694ea2a6fb5 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 1 Jul 2020 16:56:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E9=83=BD=E4=B8=89=E5=8F=B7=E7=BA=BF?= =?UTF-8?q?=E5=8F=B3=E9=94=AE=E6=93=8D=E4=BD=9C=E4=BB=A3=E7=A0=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/chengdu_03/menus/index.vue | 4 + .../theme/chengdu_03/menus/menuSignal.vue | 190 +++--------------- .../theme/chengdu_03/menus/menuStation.vue | 15 +- .../chengdu_03/menus/menuStationControl.vue | 27 ++- 4 files changed, 67 insertions(+), 169 deletions(-) diff --git a/src/jmapNew/theme/chengdu_03/menus/index.vue b/src/jmapNew/theme/chengdu_03/menus/index.vue index a8d3e5806..29faf4093 100644 --- a/src/jmapNew/theme/chengdu_03/menus/index.vue +++ b/src/jmapNew/theme/chengdu_03/menus/index.vue @@ -109,6 +109,10 @@ export default { line-height: 22px; } + .chengdou-03__systerm .el-dialog span .el-icon-arrow-up{ + line-height: 18px; + } + .chengdou-03__systerm .el-dialog .el-dialog__footer { background: #ECE9D8; opacity: 1; diff --git a/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue b/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue index 625c04e36..33f3c6e11 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue @@ -212,21 +212,10 @@ export default { }, // 信号关灯 signalClose() { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.Signal.signalClose.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + commitOperate(menuOperate.Signal.signalClose, {signalCode: this.selected.code}, 0).then(({valid, operate}) => { if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeControl.doShow(step, this.selected); + this.$refs.routeControl.doShow(operate, this.selected); } - }).catch(() => { - this.$refs.noticeInfo.doShow(step); }); }, // 设置故障 @@ -245,208 +234,93 @@ export default { } }); }, + // 获取进路列表 + getRouteList(selectType) { + const routes = []; + this.routeList.forEach(elem => { + if (elem.startSignalCode === selectType.code) { + routes.push(elem); + } + }); + return routes; + }, // 设置进路 arrangementRoute() { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.Signal.arrangementRoute.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + commitOperate(menuOperate.Signal.arrangementRoute, {signalCode: this.selected.code}, 0).then(({valid, operate}) => { if (valid) { - const routes = []; - this.routeList.forEach(elem => { - if (elem.startSignalCode === this.selected.code) { - routes.push(elem); - } - }); - this.$refs.routeSelection.doShow(step.operation, this.selected, routes); + this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected)); } - }).catch(() => { - this.$refs.noticeInfo.doShow(step); }); }, // 进路引导 guide() { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.Signal.guide.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + commitOperate(menuOperate.Signal.guide, {signalCode: this.selected.code}, 0).then(({valid, operate}) => { if (valid) { - const routes = []; - this.routeList.forEach(elem => { - if (elem.startSignalCode === this.selected.code) { - routes.push(elem); - } - }); - this.$refs.passwordBox.doShow({...step, ...{selected: this.selected}, ...{routesList: routes}}); + this.$refs.passwordBox.doShow({...operate, ...{selected: this.selected}, ...{routesList: this.getRouteList(this.selected)}}); } }); }, // 取消进路 cancelTrainRoute() { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.Signal.cancelTrainRoute.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode: this.selected.code}, 0).then(({valid, operate}) => { if (valid) { - this.$refs.routeControl.doShow(step, this.selected); + this.$refs.routeControl.doShow(operate, this.selected); } }); }, // 总人解 humanTrainRoute() { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.Signal.humanTrainRoute.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode: this.selected.code}, 0).then(({valid, operate}) => { if (valid) { - this.$refs.passwordBox.doShow({...step, ...{selected: this.selected}}); + this.$refs.passwordBox.doShow({...operate, ...{selected: this.selected}}); } }); }, // 信号重开 reopenSignal() { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.Signal.reopenSignal.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + commitOperate(menuOperate.Signal.reopenSignal, {signalCode: this.selected.code}, 0).then(({valid, operate}) => { if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeControl.doShow(step, this.selected); + this.$refs.routeControl.doShow(operate, this.selected); } }); }, // 信号封锁 lock() { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.Signal.lock.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + commitOperate(menuOperate.Signal.lock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => { if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeControl.doShow(step, this.selected); + this.$refs.routeControl.doShow(operate, this.selected); } - }).catch(() => { - this.$refs.noticeInfo.doShow(step); }); }, // 信号解封 unlock() { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.Signal.unlock.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + commitOperate(menuOperate.Signal.unlock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => { if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeControl.doShow(step, this.selected); + this.$refs.routeControl.doShow(operate, this.selected); } }); }, // 进路交人工控 humanControl() { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.Signal.humanControl.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + commitOperate(menuOperate.Signal.humanControl, {signalCode: this.selected.code}, 0).then(({valid, operate}) => { if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - const routes = []; - this.routeList.forEach(elem => { - if (elem.startSignalCode === this.selected.code) { - routes.push(elem); - } - }); - this.$refs.routeHandControl.doShow(step, this.selected, routes); + this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected)); } }); }, // 查询进路状态 detail() { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.Signal.detail.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - const routes = []; - this.routeList.forEach(elem => { - if (elem.startSignalCode === this.selected.code) { - routes.push(elem); - } - }); - this.$refs.routeDetail.doShow(step, this.selected, routes); + this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected)); } }); }, // 进路交自动控 atsAutoControl() { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.Signal.atsAutoControl.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + commitOperate(menuOperate.Signal.atsAutoControl, {signalCode: this.selected.code}, 0).then(({valid, operate}) => { if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - const routes = []; - this.routeList.forEach(elem => { - if (elem.startSignalCode === this.selected.code) { - routes.push(elem); - } - }); - this.$refs.routeHandControl.doShow(step, this.selected, routes); + this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected)); } }); }, diff --git a/src/jmapNew/theme/chengdu_03/menus/menuStation.vue b/src/jmapNew/theme/chengdu_03/menus/menuStation.vue index 2fab8edee..4b9d87511 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuStation.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuStation.vue @@ -7,6 +7,7 @@