Commit fb7d3e6c authored by 以墨为白's avatar 以墨为白 🎧

状态优化,聊天室优化,只有进行中的才给订阅

parent 9b9dc179
......@@ -80,10 +80,10 @@
<el-button size="mini" type="info" @click="showPeopleList">人员列表</el-button>
</div>
<div>
<el-button size="mini" type="info" @click="showChatRoom">聊天室</el-button>
<el-button size="mini" type="info" @click="showChatRoom" v-if="currentChatRoomInfo.status.value=='ONGOING'">聊天室</el-button>
</div>
<div>
<el-button size="mini" type="info" @click="sendNotice">发送公告</el-button>
<el-button size="mini" type="info" @click="sendNotice" v-if="currentChatRoomInfo.status.value=='ONGOING'">发送公告</el-button>
<el-button size="mini" type="info" @click="sendEmail">邮箱</el-button>
</div>
</div>
......@@ -138,6 +138,9 @@ export default {
this.$router.push({ name: '导调控制模块' });
},
subscribe(item) {
if(item.status.value != "ONGOING"){//未开始的聊天室禁止订阅
return;
}
//取消大群聊的订阅和导演部的订阅
for (const sub in this.stompClient.subscriptions) {
if (sub.startsWith("multicastMeeting") || sub.startsWith("multicastApproveNotice")) {
......
......@@ -16,9 +16,10 @@
<div slot="tip" class="el-upload__tip">支持导入word,pdf,ppt,mlf,xls!!!</div>
</el-upload>
</el-form-item>
<el-form-item style="text-align: center;">
<el-form-item style="text-align: center">
<el-button type="default" @click="handleClose">取消</el-button>
<el-button type="success" @click="sendNotice">发送</el-button>
<el-button type="success" @click="end" v-if="currentChatRoomInfo.teamInfo.teamType=='DIRECTOR'">结束会议</el-button>
</el-form-item>
</el-form>
</div>
......@@ -98,6 +99,9 @@ export default {
};
this.handleRemove();
this.dialogVisible = false;
},
end() {
},
handleDialogOpen() {
this.myStompClient = this.$props.stompClient;
......
......@@ -31,8 +31,8 @@
@click="showInfo(item)">
<div class="card-title" :title="item.nickname">{{ item.nickname
}}<span
:style="{ fontSize: '14px', color: item.status.name == '待开始' ? '#85ce61' : (item.status.name == '进行中' ? '#409eff' : (item.status.name == '已结束' ? '#f78989' : '')) }">{{
'' + item.status.name + '' }}</span></div>
:style="{ fontSize: '14px', color: item.status.value == 'CREATED' ? '#85ce61' : (item.status.value == 'ONGOING' ? '#409eff' : (item.status.value == 'CLOSED' ? '#f78989' : '')) }">{{
'[' + item.status.name + ']' }}</span></div>
<div class="card-date" v-text="item.createTime"></div>
<div class="card-text" v-text="item.conRemark" :title="item.conRemark"></div>
<div class="card-tags">
......
......@@ -124,29 +124,7 @@ export default {
nickname: '',
director: [],
chatroomHeadPic: '',
teams: [
{
createTime: '',
member: [],
teamName: '',
teamType: null,
invoking: {
checkedCities: [],
selected_num: 0,
isIndeterminate: false,
checkAll: false
},
parameter: {
isIndeterminate: false,
checkAll: false,
checkedCities: [],
selected_num: 0,
dataAll: []
},
wpinfo: [],
leader: null
}
]
teams: []
},
value: [],
teamType: [
......@@ -176,33 +154,34 @@ export default {
wpinfo: []
}
],
userList: []
userList: [],
teamItem: {
createTime: '',
member: [],
teamName: '',
teamType: null,
invoking: {
checkedCities: [],
selected_num: 0,
isIndeterminate: false,
checkAll: false
},
parameter: {
isIndeterminate: false,
checkAll: false,
checkedCities: [],
selected_num: 0,
dataAll: []
},
wpinfo: [],
leader: null
}
};
},
methods: {
addTeam() {
this.formData.teams.push(
{
createTime: '',
member: [],
teamName: '',
teamType: null,
invoking: {
checkedCities: [],
selected_num: 0,
isIndeterminate: false,
checkAll: false
},
parameter: {
isIndeterminate: false,
checkAll: false,
checkedCities: [],
selected_num: 0,
dataAll: []
},
wpinfo: [],
leader: null
}
JSON.parse(JSON.stringify(this.teamItem))
);
},
addPeopleToMeeting(index) { //参会
......@@ -297,6 +276,7 @@ export default {
createChatRoom(this.formData).then(res => {
if (res == '创建成功') {
this.$message.success('聊天室创建成功!');
this.formData.teams = [];
}
}).catch(error => {
this.$message.error(error);
......@@ -334,6 +314,7 @@ export default {
},
mounted() {
this.getUserList();
// this.formData.teams.push(Object.assign({}, this.teamItem));
}
}
</script>
......
......@@ -25,11 +25,11 @@
<el-table-column prop="result" label="演习结果" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button v-if="scope.row.status.name !== '进行中'" size="mini" type="danger"
<el-button v-if="scope.row.status.value !== 'ONGOING'" size="mini" type="danger"
@click="deleteExercise(scope.row)">删除</el-button>
<el-button v-if="scope.row.status.name == '待开始'" size="mini" type="success"
<el-button v-if="scope.row.status.value == 'CREATED'" size="mini" type="success"
@click="startExercise(scope.row)">启动</el-button>
<el-button v-if="scope.row.status.name == '进行中'" size="mini" type="warning"
<el-button v-if="scope.row.status.value == 'ONGOING'" size="mini" type="warning"
@click="stopExercise(scope.row)">结束</el-button>
<el-button v-if="scope.row.status.value == 'CREATED'" size="mini" type="primary" @click="configExercise(scope.row)">配置</el-button>
</template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment