fix: bug修复
This commit is contained in:
parent
85e9de2ca5
commit
d53555fe06
@ -11,9 +11,9 @@
|
|||||||
<img
|
<img
|
||||||
v-if="item.userType === 1"
|
v-if="item.userType === 1"
|
||||||
:src="item.advisor ? item.advisor.avatar : defaultAvatar.teacher"
|
:src="item.advisor ? item.advisor.avatar : defaultAvatar.teacher"
|
||||||
>
|
/>
|
||||||
<img v-else-if="item.userType === 3" :src="defaultAvatar.assistant">
|
<img v-else-if="item.userType === 3" :src="defaultAvatar.assistant" />
|
||||||
<img v-else-if="item.userType === 2" :src="defaultAvatar.student">
|
<img v-else-if="item.userType === 2" :src="defaultAvatar.student" />
|
||||||
<div class="news-info">
|
<div class="news-info">
|
||||||
<div class="news-info-top">
|
<div class="news-info-top">
|
||||||
<div class="news-user">
|
<div class="news-user">
|
||||||
@ -21,9 +21,13 @@
|
|||||||
<label
|
<label
|
||||||
v-if="[1, 3].includes(item.userType)"
|
v-if="[1, 3].includes(item.userType)"
|
||||||
:class="[item.userType === 1 ? 'blue' : 'orange']"
|
:class="[item.userType === 1 ? 'blue' : 'orange']"
|
||||||
>{{ item.userType === 1 ? "老师" : "助教" }}</label>
|
>{{ item.userType === 1 ? "老师" : "助教" }}</label
|
||||||
|
>
|
||||||
<div v-if="item.userType !== 2">
|
<div v-if="item.userType !== 2">
|
||||||
<span><i v-if="item.readCount">{{ item.readCount }}</i><i v-if="item.totalCount">{{ item.totalCount }}</i></span>
|
<span
|
||||||
|
><i v-if="item.readCount">{{ item.readCount }}</i
|
||||||
|
><i v-if="item.totalCount">{{ item.totalCount }}</i></span
|
||||||
|
>
|
||||||
<span>已读</span>
|
<span>已读</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -32,19 +36,22 @@
|
|||||||
v-if="type !== 5"
|
v-if="type !== 5"
|
||||||
type="success"
|
type="success"
|
||||||
@click="setMessageRecommend(item)"
|
@click="setMessageRecommend(item)"
|
||||||
>{{
|
>{{
|
||||||
item.isRecommend === 1 ? "取消精选" : "设为精选"
|
item.isRecommend === 1 ? "取消精选" : "设为精选"
|
||||||
}}</el-link>
|
}}</el-link
|
||||||
|
>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="item.userType === 2 && type !== 5"
|
v-if="item.userType === 2 && type !== 5"
|
||||||
type="success"
|
type="success"
|
||||||
@click="setReplyMsg(item)"
|
@click="setReplyMsg(item)"
|
||||||
>引用</el-link>
|
>引用</el-link
|
||||||
|
>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="item.userType === 2 && item.status === 1"
|
v-if="item.userType === 2 && item.status === 1"
|
||||||
type="success"
|
type="success"
|
||||||
@click="updateMessageStatus(item)"
|
@click="updateMessageStatus(item)"
|
||||||
>通过审核</el-link>
|
>通过审核</el-link
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p>{{ item.createTime }}</p>
|
<p>{{ item.createTime }}</p>
|
||||||
@ -52,7 +59,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="new-content">
|
<div class="new-content">
|
||||||
<p v-if="item.contentType === 1">{{ item.content }}</p>
|
<p v-if="item.contentType === 1">{{ item.content }}</p>
|
||||||
<img v-else :src="item.content" alt="">
|
<img v-else :src="item.content" alt="" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -119,7 +126,7 @@ export default {
|
|||||||
Object.assign(this.msgIdsObj[msg.id], msg);
|
Object.assign(this.msgIdsObj[msg.id], msg);
|
||||||
} else if (
|
} else if (
|
||||||
this.type === 1 ||
|
this.type === 1 ||
|
||||||
(this.type === 2 && msg.userType === 1) ||
|
(this.type === 2 && msg.userType !== 2) ||
|
||||||
(this.type === 4 && msg.isRecommend === 1)
|
(this.type === 4 && msg.isRecommend === 1)
|
||||||
) {
|
) {
|
||||||
// this.type === 4 && msg.isRecommend === 1 精选
|
// this.type === 4 && msg.isRecommend === 1 精选
|
||||||
|
|||||||
@ -120,6 +120,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSearch">搜索</el-button>
|
<el-button type="primary" @click="onSearch">搜索</el-button>
|
||||||
|
<el-button type="success" @click="onRefresh">刷新</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -380,6 +381,10 @@ export default {
|
|||||||
onSearch() {
|
onSearch() {
|
||||||
this.$refs[`newsListRef${this.msgType}`][0].searchMsg(this.msgKeyWord);
|
this.$refs[`newsListRef${this.msgType}`][0].searchMsg(this.msgKeyWord);
|
||||||
},
|
},
|
||||||
|
onRefresh() {
|
||||||
|
this.msgKeyWord = "";
|
||||||
|
this.onSearch();
|
||||||
|
},
|
||||||
handleGroupChatTopic(msg) {
|
handleGroupChatTopic(msg) {
|
||||||
console.log("handleGroupChatTopic", msg);
|
console.log("handleGroupChatTopic", msg);
|
||||||
const body = JSON.parse(msg.body);
|
const body = JSON.parse(msg.body);
|
||||||
|
|||||||
@ -22,8 +22,8 @@ export default {
|
|||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === "development"
|
||||||
? "ws://8.138.144.54:8080/tgim/chat"
|
? "ws://8.138.144.54:8080/tgim/chat"
|
||||||
: `${location.protocol === "http:" ? "ws://" : "wss://"}${
|
: `${location.protocol === "http:" ? "ws://" : "wss://"}${
|
||||||
location.host
|
location.host
|
||||||
}/tgim/chat`;
|
}/tgim/chat`;
|
||||||
// 后端群组消息
|
// 后端群组消息
|
||||||
const groupChatTopic = `/admin/group/topic/${id}`;
|
const groupChatTopic = `/admin/group/topic/${id}`;
|
||||||
// 私聊消息
|
// 私聊消息
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user