剧本仿真代码调整

This commit is contained in:
joylink_cuiweidong 2020-08-21 14:55:28 +08:00
parent 72ca8ed962
commit 43207730bf
5 changed files with 22 additions and 17 deletions

View File

@ -63,6 +63,7 @@ export default {
},
computed:{
isShow() {
debugger;
return this.userRole != '' &&
this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' &&
!this.isHasCoversition && this.createCoversition;
@ -324,21 +325,23 @@ export default {
},
clearAllData() {
this.resetCoversition();
this.createCoversition = false;
this.createCoversition = true;
this.$refs.scriptTip.resetScriptTip();
},
setMembers(roleId) {
this.memberData.map(member=>{
if (member.userId) {
member.userId = '';
member.name = '';
member.disabled = false;
}
if (member.id == roleId) {
member.userId = this.$store.state.user.id;
member.name = this.$store.state.user.nickname;
member.userName = this.$store.state.user.nickname;
member.disabled = true;
} else {
member.userId = '';
member.userName = '';
member.disabled = false;
}
const userName = member.userName ? '-' + member.userName : '';
const name = member.name == undefined ? '' : '-' + member.name;
member.label = member.type + member.deviceName + name + userName;
});
},
resetCoversition() {

View File

@ -358,6 +358,7 @@ export default {
quitQuest() {
this.isScriptRun = false;
let userRole = '';
debugger;
if (this.$route.query.prdType) {
if (this.$route.query.prdType == '02') {
userRole = 'DISPATCHER';

View File

@ -214,12 +214,14 @@ export default {
this.userRole = 'AUDIENCE';
this.$store.dispatch('training/setRoles', 'AUDIENCE');
this.memberData.map(member=>{
member.userId = '';
member.userName = '';
member.disabled = false;
const userName = member.userName ? '-' + member.userName : '';
const name = member.name == undefined ? '' : '-' + member.name;
member.label = member.type + member.deviceName + name + userName;
if (member.userId) {
member.userId = '';
member.userName = '';
member.disabled = false;
const userName = member.userName ? '-' + member.userName : '';
const name = member.name == undefined ? '' : '-' + member.name;
member.label = member.type + member.deviceName + name + userName;
}
});
this.switchMode('');
}

View File

@ -70,7 +70,6 @@ export default {
watch:{
//
'$store.state.socket.createConversition':function(val) {
debugger;
if (this.memberData.length > 0) {
const member = this.memberData.find(member=>{ return member.id == val.creatorId; });
if (member && member.userId == this.$store.state.user.id) {

View File

@ -45,10 +45,10 @@ export default {
rules: {
type: [
{ required: true, message: '请选择成员类型', trigger: 'change' }
],
name:[
{ required: true, message: '请输入成员名称', trigger: 'blur' }
]
// name:[
// { required: true, message: '', trigger: 'blur' }
// ]
},
typeList: [{label: '行调', value: 'DISPATCHER'}, {label: '通号', value: 'MAINTAINER'}]
};