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