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

只有导演部的才能启动和停止演习

parent fa71dadf
......@@ -119,7 +119,7 @@ export default {
},
options: [],
optionsFrom: [],
currentChatRoomInfo: {},
currentChatRoomInfo: {status: {}, teamInfo: {}},
newsList: [],
publicNoticeList: [],
stompClient: { connected: false },
......
......@@ -14,6 +14,7 @@
<span class="isOnline" :style="{ backgroundColor: item1.online ? 'green' : 'gray' }"></span>
<span class="username" :style="{ color: item1.online ? 'green' : 'white' }"
v-text="item1.userId"></span>
<span title="组长" :style="{ color: item1.online ? 'green' : 'white' }" :class="[item1.userId == item.leader ? 'el-icon-user-solid' : '']"></span>
</div>
</div>
</div>
......
......@@ -74,7 +74,7 @@ export default {
},
methods: {
showInfo(item) {
if (item.status.name !== '待开始') {
if (item.status.value !== 'CREATED') {
this.$router.push({ name: '聊天室详情' + this.$route.meta.type_name, params: { data: item, client: this.stompClient } });
} else {
this.$message.warning('此演习暂未开启,不能进入!');
......
......@@ -27,9 +27,9 @@
<template slot-scope="scope">
<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.value == 'CREATED'" size="mini" type="success"
<el-button v-if="scope.row.status.value == 'CREATED' && scope.row.teamInfo.teamType == 'DIRECTOR'" size="mini" type="success"
@click="startExercise(scope.row)">启动</el-button>
<el-button v-if="scope.row.status.value == 'ONGOING'" size="mini" type="warning"
<el-button v-if="scope.row.status.value == 'ONGOING' && scope.row.teamInfo.teamType == 'DIRECTOR'" 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