@@ -95,6 +95,9 @@ export default {
computed:{
isShow() {
return this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' && !this.isHasCoversition;
+ },
+ isButtonShow() {
+ return this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' && this.isHasCoversition;
}
},
mounted() {
@@ -118,8 +121,12 @@ export default {
this.$refs.chatCoversitionList.initPage(false);
},
setCurrentCoversition(coversition) {
- this.currentCoversition = coversition;
- this.headerTitle = coversition.name;
+ if (coversition) {
+ this.currentCoversition = coversition;
+ this.headerTitle = coversition.name;
+ } else {
+ this.headerTitle = '';
+ }
if (this.recordSending) {
this.cancleRecording();
}
diff --git a/src/views/newMap/jointTrainingNew/chatView/chatContent.vue b/src/views/newMap/jointTrainingNew/chatView/chatContent.vue
index c524a2950..0186ebc77 100644
--- a/src/views/newMap/jointTrainingNew/chatView/chatContent.vue
+++ b/src/views/newMap/jointTrainingNew/chatView/chatContent.vue
@@ -94,20 +94,22 @@ export default {
},
methods:{
inintData() {
- getSimulationContextListNew(this.$route.query.group, this.coversition.id).then(res=>{
- const userId = this.$store.state.user.id;
- const coversitionList = res.data.map(coversition=>{
- coversition.self = false;
- if (coversition.member.userId == userId) {
- coversition.self = true;
- }
- coversition.src = coversition.isAudio ? `/jlcloud/audio/${coversition.audioPath}` : '';
- coversition.targetUser = coversition.targetMember ? coversition.targetMember : 'All';
- return coversition;
+ if (this.coversition) {
+ getSimulationContextListNew(this.$route.query.group, this.coversition.id).then(res=>{
+ const userId = this.$store.state.user.id;
+ const coversitionList = res.data.map(coversition=>{
+ coversition.self = false;
+ if (coversition.member.userId == userId) {
+ coversition.self = true;
+ }
+ coversition.src = coversition.isAudio ? `/audio/${coversition.audioPath}` : '';
+ coversition.targetUser = coversition.targetMember ? coversition.targetMember : 'All';
+ return coversition;
+ });
+ this.chatContentList = coversitionList;
+ this.scrollTop();
});
- this.chatContentList = coversitionList;
- this.scrollTop();
- });
+ }
// const coversitionListAll = Object.assign({}, this.$store.state.socket.coversitionList);
// const coversitionList = coversitionListAll[this.coversition.id] || [];
// // console.log('inintData---coversitionList' + JSON.stringify(this.$store.state.socket.coversitionList[this.coversition.id]));
diff --git a/src/views/newMap/jointTrainingNew/chatView/chatCoversitionList.vue b/src/views/newMap/jointTrainingNew/chatView/chatCoversitionList.vue
index a64faae8e..44a67867a 100644
--- a/src/views/newMap/jointTrainingNew/chatView/chatCoversitionList.vue
+++ b/src/views/newMap/jointTrainingNew/chatView/chatCoversitionList.vue
@@ -9,7 +9,7 @@
@click="changeCoversition(coversition)"
>
{{ coversition.name }}
-
+
@@ -22,6 +22,10 @@ export default {
group: {
type: String,
required: true
+ },
+ userRole: {
+ type: String,
+ required: true
}
},
data() {
@@ -30,21 +34,40 @@ export default {
currentCoversition:{}
};
},
+ watch:{
+ 'userRole':function(val) {
+ this.initPage(true);
+ }
+ },
mounted() {
- this.initPage(true);
+ // this.initPage(true);
},
methods:{
initPage(status) {
getSimulationConversationListNew(this.$route.query.group).then(resp=>{
if (resp.data) {
const data = resp.data;
- this.coversitionList = data;
- if (resp.data.length >= 2) {
- this.$emit('hideAddCoversition');
+ if (this.userRole == 'ADMIN' || this.userRole == 'AUDIENCE') {
+ this.coversitionList = data;
+ } else {
+ this.coversitionList = data.filter(coversition=>{ return coversition.all == false; });
+ if (this.coversitionList.length >= 1) {
+ this.$emit('hideAddCoversition');
+ }
}
if (resp.data && resp.data.length && resp.data.length > 0 && status) {
- this.currentCoversition = data[0];
- this.$emit('setCurrentCoversition', resp.data[0]);
+ if (this.userRole == 'ADMIN' || this.userRole == 'AUDIENCE') {
+ this.currentCoversition = data[0];
+ this.$emit('setCurrentCoversition', resp.data[0]);
+ } else {
+ if (this.coversitionList.length >= 1) {
+ this.currentCoversition = data[0];
+ this.$emit('setCurrentCoversition', resp.data[0]);
+ } else {
+ this.currentCoversition = null;
+ this.$emit('setCurrentCoversition', this.currentCoversition);
+ }
+ }
} else if (resp.data && resp.data.length && resp.data.length > 0 && !status) {
const coversition = data.filter(coversition=>{ return coversition.all == false; });
this.currentCoversition = coversition[0];
diff --git a/src/views/newMap/jointTrainingNew/chatView/chatMemberList.vue b/src/views/newMap/jointTrainingNew/chatView/chatMemberList.vue
index 06a9bb6c1..e33d4e005 100644
--- a/src/views/newMap/jointTrainingNew/chatView/chatMemberList.vue
+++ b/src/views/newMap/jointTrainingNew/chatView/chatMemberList.vue
@@ -59,27 +59,29 @@ export default {
methods:{
getSimulationMembers() {
this.memberList = [];
- getSimulationChatMemberNew(this.$route.query.group, this.currentCoversition.id).then(resp => {
- let lastData = JSON.stringify(resp.data);
- const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
- roleTypeList.forEach(function(element) {
- const rolename = element.value;
- if (Cookies.get('user_lang') == 'en') {
- lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
- } else {
- lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
- }
+ if (this.currentCoversition) {
+ getSimulationChatMemberNew(this.$route.query.group, this.currentCoversition.id).then(resp => {
+ let lastData = JSON.stringify(resp.data);
+ const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
+ roleTypeList.forEach(function(element) {
+ const rolename = element.value;
+ if (Cookies.get('user_lang') == 'en') {
+ lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
+ } else {
+ lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
+ }
+ });
+ lastData = JSON.parse(lastData);
+ lastData = lastData.filter(memberIn=>{ return memberIn.role != '观众'; });
+ lastData.map(member=>{
+ const deviceName = member.deviceName ? '-' + member.deviceName : '';
+ const memberName = member.name ? '-' + member.name : '';
+ member.memberName = member.role + deviceName + memberName;
+ return member;
+ });
+ this.memberList = lastData;
});
- lastData = JSON.parse(lastData);
- lastData = lastData.filter(memberIn=>{ return memberIn.role != '观众'; });
- lastData.map(member=>{
- const deviceName = member.deviceName ? '-' + member.deviceName : '';
- const memberName = member.name ? '-' + member.name : '';
- member.memberName = member.role + deviceName + memberName;
- return member;
- });
- this.memberList = lastData;
- });
+ }
}
}
};
diff --git a/src/views/newMap/jointTrainingNew/menuTrainList.vue b/src/views/newMap/jointTrainingNew/menuTrainList.vue
index 7345e8f7a..47ea8ab03 100644
--- a/src/views/newMap/jointTrainingNew/menuTrainList.vue
+++ b/src/views/newMap/jointTrainingNew/menuTrainList.vue
@@ -69,30 +69,25 @@ export default {
}
},
watch:{
- '$store.state.map.trainListUpdate': function (val) {
+ '$store.state.map.activeTrainListUpdate': function (val) {
+ const trainList = Object.values(this.$store.state.map.activeTrainList);
if (this.lineCode == '10' || this.lineCode == '11') {
- this.topTrainList = this.$store.state.map.map.trainList.filter((train)=>{
- return train.serviceNumber != '' && train.serviceNumber != undefined && !train.right;
+ this.topTrainList = trainList.filter((train)=>{
+ return train.serviceNumber != '' && train.serviceNumber != undefined && !train.right && train.sectionCode;
});
- this.bottomTrainList = this.$store.state.map.map.trainList.filter((train)=>{
- return train.serviceNumber != '' && train.serviceNumber != undefined && train.right;
+ this.bottomTrainList = trainList.filter((train)=>{
+ return train.serviceNumber != '' && train.serviceNumber != undefined && train.right && train.sectionCode;
});
} else {
- this.trainList = this.$store.state.map.map.trainList.filter((train)=>{
- return train.serviceNumber != '' && train.serviceNumber != undefined;
+ this.trainList = trainList.filter((train)=>{
+ return train.serviceNumber != '' && train.serviceNumber != undefined && train.sectionCode;
});
}
},
'$store.state.map.runPlanStatus': function (val) {
if (!val) {
- if (this.lineCode == '10' || this.lineCode == '11') {
- this.topTrainList = [];
- this.bottomTrainList = [];
- } else {
- this.trainList = [];
- }
-
+ this.$store.dispatch('map/resetActiveTrainList');
}
}
},
@@ -114,11 +109,13 @@ export default {
this.$emit('setCenter', code);
},
covert(data) {
- let min = (Math.abs(data) - Math.abs(data) % 60) / 60;
- let seconds = Math.abs(data) % 60;
+ const hours = Math.floor(data / 3600);
+ let min = Math.floor((data % 3600) / 60);
+ let seconds = (data % 3600) % 60;
min = min > 9 ? min : '0' + min;
seconds = seconds > 9 ? seconds : '0' + seconds;
- return data == 0 ? '00:00' : (data > 0 ? min + ':' + seconds + 'E' : min + ':' + seconds + 'L');
+ const time = hours + ':' + min + ':' + seconds;
+ return data == 0 ? '00:00:00' : (data > 0 ? time + 'E' : time + 'L');
}
}
};
diff --git a/src/views/system/commandDictionary/editCondition.vue b/src/views/system/commandDictionary/editCondition.vue
index 2ec5b0c92..be4535cb0 100644
--- a/src/views/system/commandDictionary/editCondition.vue
+++ b/src/views/system/commandDictionary/editCondition.vue
@@ -27,9 +27,9 @@ export default {
expression:''
},
expressionList:[
- {label:'等于',value:'eq'},
- {label:'不等于', value:'neq'},
- ]
+ {label:'等于', value:'eq'},
+ {label:'不等于', value:'neq'}
+ ]
};
},
computed: {
@@ -38,7 +38,7 @@ export default {
labelWidth: '100px',
items: [
{ prop: 'name', label: '参数名', type: 'text' },
- { prop: 'expression', label:'操作符', type: 'select',options:this.expressionList},
+ { prop: 'expression', label:'操作符', type: 'select', options:this.expressionList},
{ prop: 'value', label: '参数值', type: 'text' }
]
};
@@ -90,7 +90,7 @@ export default {
return {
name: this.formModel.name,
value: this.formModel.value,
- expression:this.formModel.expression,
+ expression:this.formModel.expression
};
},
create() {