Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
6a5227353f
@ -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();
|
||||
});
|
||||
|
@ -8,7 +8,7 @@
|
||||
<div class="panelLeftSelect">
|
||||
<span style="font-size:13px;">当前剧本角色:</span>
|
||||
<!-- :disabled="!backDisabled||isPause" -->
|
||||
<el-select v-model="memberId" filterable placeholder="请选择" @change="changeRole">
|
||||
<el-select ref="changeScriptRole" v-model="memberId" filterable placeholder="请选择" @change="changeRole">
|
||||
<el-option v-for="member in memberList" :key="member.id" :label="member.name" :value="member.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
@ -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', '');
|
||||
|
Loading…
Reference in New Issue
Block a user