From 3f11212183c39f8026a2b70c36a8ef9d4d95f31f Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Fri, 14 Aug 2020 10:29:33 +0800
Subject: [PATCH] =?UTF-8?q?=E5=89=A7=E6=9C=AC=E5=BD=95=E5=88=B6=E9=BB=98?=
=?UTF-8?q?=E8=AE=A4=E8=A1=8C=E8=B0=83=E6=93=8D=E4=BD=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/newMap/displayNew/menuScript.vue | 6 +++---
src/views/scriptManage/tipScriptRecord.vue | 21 ++++++++++++++++-----
2 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/src/views/newMap/displayNew/menuScript.vue b/src/views/newMap/displayNew/menuScript.vue
index ad12fc38c..2b48b8db2 100644
--- a/src/views/newMap/displayNew/menuScript.vue
+++ b/src/views/newMap/displayNew/menuScript.vue
@@ -117,9 +117,9 @@ export default {
mounted() {
// this.$store.state.training.prdType
this.isScriptCommand = this.$store.state.scriptRecord.bgSet;
- if (!this.isScriptCommand) {
- this.$store.dispatch('training/setPrdType', '01');
- }
+ // if (!this.isScriptCommand) {
+ // this.$store.dispatch('training/setPrdType', '02');
+ // }
this.$nextTick(() => {
this.menuClick();
});
diff --git a/src/views/scriptManage/tipScriptRecord.vue b/src/views/scriptManage/tipScriptRecord.vue
index 9f4c19472..16db3365f 100644
--- a/src/views/scriptManage/tipScriptRecord.vue
+++ b/src/views/scriptManage/tipScriptRecord.vue
@@ -8,7 +8,7 @@
当前剧本角色:
-
+
@@ -89,9 +89,9 @@ export default {
const newMapLocation = {'offsetX': this.mapLocation.x, 'offsetY': this.mapLocation.y, 'scaleRate': this.mapLocation.scale};
Vue.prototype.$jlmap.setOptions(newMapLocation);
}
- if (this.$store.state.scriptRecord.bgSet) {
- this.$store.dispatch('training/setPrdType', null);
- }
+ // if (this.$store.state.scriptRecord.bgSet) {
+ // this.$store.dispatch('training/setPrdType', null);
+ // }
this.initData();
},
'$store.state.scriptRecord.bgSet': function (val) {
@@ -126,6 +126,14 @@ export default {
this.$store.dispatch('training/setMemberList', {memberList:resp.data, userId:this.$store.state.user.id});
this.allMemberList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
this.changeRunPlanStatus();
+ const member = this.memberList.find(mem=>{
+ return mem.type == '行调';
+ });
+ if (member) {
+ this.memberId = member.id;
+ }
+ this.$store.dispatch('training/setPrdType', '02');
+ this.$store.dispatch('training/setRoles', 'DISPATCHER');
}).catch(error => {
this.$message(error.message);
});
@@ -160,6 +168,7 @@ export default {
if (member) {
// this.$store.dispatch('scriptRecord/updateIsScriptCommand', true);
this.switchMode(member);
+
}
},
switchMode(role) {
@@ -213,8 +222,10 @@ export default {
this.$store.dispatch('scriptRecord/updateRole', each.value + ':' + role);
}
});
+ this.$refs.changeScriptRole.blur();
}).catch(()=>{
this.$messageBox('切换角色失败');
+ this.$refs.changeScriptRole.blur();
});
},
covert(data, roleTypeList) {
@@ -332,7 +343,7 @@ export default {
this.$refs['getAction'].loadInitData();
this.changeRunPlanStatus();
this.memberId = '';
- this.$store.dispatch('training/setPrdType', '01');
+ this.$store.dispatch('training/setPrdType', '02');
this.$store.dispatch('map/resetActiveTrainList');
// this.initAutoSaveScript();
this.$store.dispatch('scriptRecord/updateRole', '');