From 9d42aac8fa5e43c6c156b16d9a63645454298953 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Tue, 8 Sep 2020 16:41:38 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=81=E6=B3=A2=E4=B8=89?=
=?UTF-8?q?=E8=8F=9C=E5=8D=95&=E8=B0=83=E6=95=B4=E5=8A=A0=E8=BD=BD?=
=?UTF-8?q?=E5=8A=A8=E7=94=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.vue | 13 ++++++++--
src/jmapNew/theme/ningbo_03/menus/menuBar.vue | 21 +++++++++++++---
.../menus/menuDialog/trainDepart.vue | 25 ++++++++++++++++---
src/scripts/cmdPlugin/OperationHandler.js | 6 +++++
4 files changed, 55 insertions(+), 10 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index d9f26b20c..d572ed6eb 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -25,7 +25,8 @@ export default {
data() {
return {
loadingImg: LoadingImg,
- loading: false
+ loading: false,
+ loadingStartTime: 0
};
},
computed: {
@@ -58,10 +59,18 @@ export default {
},
'$store.state.app.transitionAnimationsCount': function(val) {
this.loading = true;
+ this.loadingStartTime = +new Date();
},
'$route' () {
this.$nextTick(function() {
- this.loading = false;
+ const distance = +new Date() - this.loadingStartTime;
+ if (distance > 100 && distance < 300 ) {
+ setTimeout(() => {
+ this.loading = false;
+ }, 500);
+ } else {
+ this.loading = false;
+ }
});
}
},
diff --git a/src/jmapNew/theme/ningbo_03/menus/menuBar.vue b/src/jmapNew/theme/ningbo_03/menus/menuBar.vue
index 83a210ba7..2e7d8425a 100644
--- a/src/jmapNew/theme/ningbo_03/menus/menuBar.vue
+++ b/src/jmapNew/theme/ningbo_03/menus/menuBar.vue
@@ -294,7 +294,7 @@ export default {
},
{
title: '复位',
- click: this.undeveloped
+ click: this.setTrainReset
},
{
title: '跳停',
@@ -761,7 +761,7 @@ export default {
},
{
title: '复位',
- click: this.undeveloped
+ click: this.setTrainReset
},
{
title: '跳停',
@@ -1739,7 +1739,7 @@ export default {
setTrainDepart() {
const operate = {
type: 'bar',
- operation: OperationEvent.Train.setTrainDeparture.menu
+ operation: OperationEvent.Train.setTrainDeparture.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@@ -1752,7 +1752,20 @@ export default {
breakAway() {
const operate = {
type: 'bar',
- operation: OperationEvent.Train.breakAwayPlan.menu
+ operation: OperationEvent.Train.breakAwayPlan.menu.operation
+ };
+ this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
+ if (valid) {
+ this.closeMenu(true);
+ this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
+ this.$refs.trainDepart.doShow(operate);
+ }
+ });
+ },
+ setTrainReset() {
+ const operate = {
+ type: 'bar',
+ operation: OperationEvent.Train.setTrainReset.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/trainDepart.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/trainDepart.vue
index 153e1ae50..59f3cca46 100644
--- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/trainDepart.vue
+++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/trainDepart.vue
@@ -4,9 +4,9 @@
-
-
-
+
+
+
@@ -60,6 +60,15 @@ export default {
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
+ isDepart() {
+ return this.operate.operation === OperationEvent.Train.setTrainDeparture.menu.operation;
+ },
+ isBreakAway() {
+ return this.operate.operation === OperationEvent.Train.breakAwayPlan.menu.operation;
+ },
+ isReset() {
+ return this.operate.operation === OperationEvent.Train.setTrainReset.menu.operation;
+ },
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
@@ -67,7 +76,15 @@ export default {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
- return '列车发车';
+ if (this.isDepart) {
+ return '列车发车';
+ } else if (this.isBreakAway) {
+ return '列车脱离班次';
+ } else if (this.isReset) {
+ return '列车复位';
+ } else {
+ return '';
+ }
}
},
watch: {
diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js
index 77cdb8020..5bd7011eb 100644
--- a/src/scripts/cmdPlugin/OperationHandler.js
+++ b/src/scripts/cmdPlugin/OperationHandler.js
@@ -2297,6 +2297,12 @@ export const OperationEvent = {
operation: '70n',
domId: '_Tips-Train-breakAwayPlan-Menu'
}
+ },
+ setTrainReset: {
+ menu: {
+ operation: '70o',
+ domId: '_Tips-Train-setTrainReset-Menu'
+ }
}
},