剧本录制代码调整
This commit is contained in:
parent
9da1e3bbac
commit
b78f90034a
@ -64,7 +64,7 @@ class MenuContextHandler {
|
||||
const control = this.getStationControl(selected);
|
||||
// (!store.state.scriptRecord.bgSet || store.state.scriptRecord.isScriptCommand)
|
||||
if (control) {
|
||||
if (this.getPrdType() != '') {
|
||||
if (this.getPrdType() != '' && this.getPrdType() != null) {
|
||||
const type = State2SimulationMap[this.getPrdType()];
|
||||
const status = State2ControlMap[control.controlMode]; // 判断当前模式
|
||||
menu = [...menuList[type]];
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!-- v-quickMenuDrag -->
|
||||
<div class="chatBox" :style="{'bottom':bottom+'px'}">
|
||||
<div v-show="!minimize" class="chat-box">
|
||||
<chat-member-list ref="chatMemberList" :group="group" :current-coversition="currentCoversition" @addCoversition="addCoversition" />
|
||||
<chat-member-list ref="chatMemberList" :user-role="userRole" :group="group" :current-coversition="memberListCoversition" @addCoversition="addCoversition" />
|
||||
<div class="chat-box-main">
|
||||
<chat-coversition-list ref="chatCoversitionList" :user-role="userRole" @hideAddCoversition="hideAddCoversition" @setCurrentCoversition="setCurrentCoversition" @setHeadTitle="setHeadTitle" />
|
||||
<div class="chat-window">
|
||||
@ -84,6 +84,7 @@ export default {
|
||||
bottom:15,
|
||||
recordSending:false,
|
||||
currentCoversition:{},
|
||||
memberListCoversition:{},
|
||||
seconds:0,
|
||||
inter:null,
|
||||
isHasCoversition:false,
|
||||
@ -100,10 +101,10 @@ export default {
|
||||
},
|
||||
computed:{
|
||||
isShow() {
|
||||
return this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' && !this.isHasCoversition;
|
||||
return this.userRole != '' && this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' && !this.isHasCoversition;
|
||||
},
|
||||
isButtonShow() {
|
||||
return this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' && this.isHasCoversition;
|
||||
return this.userRole != '' && this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' && this.isHasCoversition;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -166,6 +167,7 @@ export default {
|
||||
if (this.recordSending) {
|
||||
this.cancleRecording();
|
||||
}
|
||||
this.memberListCoversition = coversition || {id:null};
|
||||
this.$refs.chatContent.scrollTop();
|
||||
},
|
||||
getCoversitionList() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div :class="showMembers?'memberAnimate chat-box-members':'chat-box-members'">
|
||||
<div class="chat-member-title">成员列表</div>
|
||||
<div class="chat-member-list">
|
||||
<div v-if="userRole!=''" class="chat-member-list">
|
||||
<div
|
||||
v-for="member in memberList"
|
||||
:key="member.id"
|
||||
@ -27,6 +27,10 @@ export default {
|
||||
currentCoversition:{
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
userRole:{
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -52,7 +56,7 @@ export default {
|
||||
methods:{
|
||||
getSimulationMembers() {
|
||||
this.memberList = [];
|
||||
if (this.currentCoversition.id) {
|
||||
if (this.currentCoversition && this.currentCoversition.id) {
|
||||
getSimulationChatMemberNew(this.$route.query.group, this.currentCoversition.id).then(resp => {
|
||||
let lastData = JSON.stringify(resp.data);
|
||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
||||
|
@ -84,6 +84,8 @@ export default {
|
||||
return 'STATION_SUPERVISOR';
|
||||
} else if (this.$store.state.training.prdType == '04') {
|
||||
return 'DRIVER';
|
||||
} else if (this.$store.state.training.prdType == null) {
|
||||
return '';
|
||||
} else {
|
||||
return 'AUDIENCE';
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
<div class="scriptPanelLeft">
|
||||
<div class="panelLeftSelect">
|
||||
<span style="font-size:13px;">当前剧本角色:</span>
|
||||
<el-select v-model="memberId" placeholder="请选择" :disabled="isPause" @change="changeRole">
|
||||
<el-select v-model="memberId" placeholder="请选择" :disabled="!backDisabled||isPause" @change="changeRole">
|
||||
<el-option v-for="member in memberList" :key="member.id" :label="member.name" :value="member.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
@ -64,6 +64,7 @@ export default {
|
||||
backDisabled: false,
|
||||
autoSaveScript: null,
|
||||
isSavingScript: false,
|
||||
mapLocation:null,
|
||||
memberList:[],
|
||||
size: {
|
||||
width: 300,
|
||||
@ -75,6 +76,13 @@ export default {
|
||||
'$store.state.map.mapViewLoadedCount': function (val) {
|
||||
Vue.prototype.$jlmap.setOptions(this.$store.state.scriptRecord.mapLocation);
|
||||
this.isPause = !(this.$store.state.scriptRecord.simulationPause);
|
||||
if (this.mapLocation) {
|
||||
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);
|
||||
}
|
||||
},
|
||||
'$store.state.scriptRecord.bgSet': function (val) {
|
||||
this.backDisabled = val;
|
||||
@ -92,6 +100,7 @@ export default {
|
||||
this.language = this.$route.query.lang == 'en' ? this.$t('scriptRecord.english') : this.$t('scriptRecord.chinese');
|
||||
getDraftScriptByGroupNew(this.group).then(response=>{
|
||||
this.backDisabled = response.data.bgSet;
|
||||
this.mapLocation = response.data.mapLocation;
|
||||
this.$store.dispatch('scriptRecord/updateBgSet', response.data.bgSet);
|
||||
});
|
||||
},
|
||||
@ -130,6 +139,8 @@ export default {
|
||||
prdType = '02';
|
||||
} else if (memberInfo.role == '司机') {
|
||||
prdType = '04';
|
||||
} else {
|
||||
prdType = '';
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('training/setPrdType', prdType);
|
||||
@ -170,7 +181,7 @@ export default {
|
||||
saveScriptDataNew(this.group).then(resp => {
|
||||
this.$message.success(this.$t('scriptRecord.saveDataSucess'));
|
||||
this.isSavingScript = false;
|
||||
// this.initAutoSaveScript();
|
||||
this.initAutoSaveScript();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.saveDataFail')}: ${error.message}`);
|
||||
this.isSavingScript = false;
|
||||
@ -188,6 +199,7 @@ export default {
|
||||
saveScriptScenesNew(this.group).then(resp => {
|
||||
updateMapLocationNew(group, dataZoom).then(response=>{
|
||||
this.$store.dispatch('scriptRecord/updateBgSet', true);
|
||||
this.$store.dispatch('training/setPrdType', null);
|
||||
this.$message.success(this.$t('scriptRecord.saveBackgroundSuceess'));
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.updateLocationFail')}: ${error.message}`);
|
||||
@ -226,7 +238,9 @@ export default {
|
||||
this.$parent.resetBeginTime();
|
||||
this.$refs['getAction'].loadInitData();
|
||||
this.initData();
|
||||
this.initAutoSaveScript();
|
||||
this.memberId = '';
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
// this.initAutoSaveScript();
|
||||
this.$store.dispatch('scriptRecord/updateBgSet', false);
|
||||
this.$message.success(this.$t('scriptRecord.resetDataSuccess'));
|
||||
}).catch(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user