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', '');