+
+
{{ $t('display.demon.dispatchingPlan') }}
{{ jl3dpassflow }}
@@ -40,6 +42,7 @@ import { ranAsPlan, exitRunPlan, clearSimulation, getSimulationInfoNew } from '@
import { PermissionType } from '@/scripts/ConstDic';
import { getCountTime } from '@/utils/index';
import { quitScriptNew, scriptRePreview } from '@/api/simulation';
+import { setGoodsTryUse } from '@/api/management/goods';
export default {
name: 'MenuDemon',
@@ -48,10 +51,6 @@ export default {
ChatBox
},
props: {
- group: {
- type: String,
- required: true
- },
offset: {
type: Number,
required: true
@@ -60,27 +59,17 @@ export default {
type: Number,
required: true
},
- questId: {
+ scriptId: {
type: Number,
default() {
return 0;
}
},
- showStation: {
- type: String,
- default() {
- return '';
- }
- },
dataError: {
type: Boolean,
default() {
return false;
}
- },
- userRole: {
- type: String,
- required: true
}
},
data() {
@@ -107,7 +96,7 @@ export default {
},
computed: {
isShowQuest() {
- return this.questId;
+ return this.scriptId;
},
isShowScheduling() {
return this.$route.query.prdType == '05';
@@ -117,6 +106,20 @@ export default {
},
isHebLine() {
return this.$route.query.lineCode === '07';
+ },
+ group() {
+ return this.$route.query.group;
+ },
+ userRole() {
+ if (this.$route.query.prdType == '02') {
+ return 'DISPATCHER';
+ } else if (this.$route.query.prdType == '01') {
+ return 'STATION_SUPERVISOR';
+ } else if (this.$route.query.prdType == '04') {
+ return 'DRIVER';
+ } else {
+ return 'AUDIENCE';
+ }
}
},
watch: {
@@ -236,7 +239,7 @@ export default {
quitScriptNew(this.group).then(resp => {
scriptRePreview(this.group).then(resp=>{
getSimulationInfoNew(this.group).then(()=>{
- this.$emit('quitQuest');
+ this.quitQuest();
this.initLoadPage();
this.clearAllData();
}).catch(()=>{
@@ -251,7 +254,7 @@ export default {
} else {
quitScriptNew(this.group).then(resp => {
getSimulationInfoNew(this.group).then(()=>{
- this.$emit('quitQuest');
+ this.quitQuest();
this.initLoadPage();
this.clearAllData();
}).catch(()=>{
@@ -262,6 +265,10 @@ export default {
});
}
},
+ quitQuest() {
+ this.scriptId = 0;
+ this.$store.dispatch('scriptRecord/updateSimulationPause', false);
+ },
clearAllData() {
this.$refs.chatbox.clearAllData();
},
@@ -289,7 +296,11 @@ export default {
},
setTryTime() {
if (this.try) {
- this.$emit('tryTime', { time: this.tryTime, goodsId: this.goodsId });
+ const data = { time: this.tryTime, goodsId: this.goodsId };
+ if (data.goodsId) {
+ setGoodsTryUse(data);
+ }
+
}
},
change3dname() {
diff --git a/src/views/newMap/displayNew/menuExam.vue b/src/views/newMap/displayNew/menuExam.vue
index 89a7bbcd2..1d82417b0 100644
--- a/src/views/newMap/displayNew/menuExam.vue
+++ b/src/views/newMap/displayNew/menuExam.vue
@@ -33,10 +33,6 @@ export default {
TipExamList
},
props: {
- group: {
- type: String,
- required: true
- },
offset: {
type: Number,
required: true
@@ -82,6 +78,9 @@ export default {
};
},
computed: {
+ group() {
+ return this.$route.query.group;
+ },
formatUsedTime() {
return timeFormat(this.$store.state.training.usedTime);
}
diff --git a/src/views/newMap/displayNew/menuLesson.vue b/src/views/newMap/displayNew/menuLesson.vue
index 8f27a0a1b..a57703b31 100644
--- a/src/views/newMap/displayNew/menuLesson.vue
+++ b/src/views/newMap/displayNew/menuLesson.vue
@@ -22,34 +22,28 @@
+