fix: robot
This commit is contained in:
@@ -127,7 +127,8 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option v-for="item in commentUserList" :key="item.id" :label="item.nickname || item.id" :value="item.id">
|
<el-option v-for="item in commentUserList" :key="item.id" :label="item.nickname || item.id" :value="item.id">
|
||||||
<div style="display: flex; align-items: center">
|
<div style="display: flex; align-items: center; justify-content: space-between">
|
||||||
|
<div style="display: flex; align-items: center; min-width: 0">
|
||||||
<el-image
|
<el-image
|
||||||
v-if="item.avatar"
|
v-if="item.avatar"
|
||||||
:src="getThumbUrl(item.avatar)"
|
:src="getThumbUrl(item.avatar)"
|
||||||
@@ -135,6 +136,10 @@
|
|||||||
/>
|
/>
|
||||||
<span>{{ item.nickname || '未知用户' }}</span>
|
<span>{{ item.nickname || '未知用户' }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<el-tag v-if="item.choose" size="mini" style="margin-left: 12px; flex-shrink: 0" type="info">
|
||||||
|
{{ getCommentUserChooseName(item.choose) }}
|
||||||
|
</el-tag>
|
||||||
|
</div>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -233,6 +238,7 @@
|
|||||||
},
|
},
|
||||||
commentUserTotal: 0,
|
commentUserTotal: 0,
|
||||||
fetchingCommentUsers: false,
|
fetchingCommentUsers: false,
|
||||||
|
currentCommentPk: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -342,8 +348,19 @@
|
|||||||
handleVote(pkId, itemId, itemName) {
|
handleVote(pkId, itemId, itemName) {
|
||||||
this.$refs['voteEdit'].showEdit(pkId, itemId, itemName)
|
this.$refs['voteEdit'].showEdit(pkId, itemId, itemName)
|
||||||
},
|
},
|
||||||
|
getCommentUserChooseName(choose) {
|
||||||
|
if (!choose || !this.currentCommentPk) return '-'
|
||||||
|
if (choose === this.currentCommentPk.leftItemId) {
|
||||||
|
return this.currentCommentPk.leftItemName || '-'
|
||||||
|
}
|
||||||
|
if (choose === this.currentCommentPk.rightItemId) {
|
||||||
|
return this.currentCommentPk.rightItemName || '-'
|
||||||
|
}
|
||||||
|
return '-'
|
||||||
|
},
|
||||||
handleComment(row) {
|
handleComment(row) {
|
||||||
this.commentDialogVisible = true
|
this.commentDialogVisible = true
|
||||||
|
this.currentCommentPk = row
|
||||||
this.commentForm = {
|
this.commentForm = {
|
||||||
pkId: row.id,
|
pkId: row.id,
|
||||||
userId: '',
|
userId: '',
|
||||||
@@ -360,6 +377,7 @@
|
|||||||
this.$refs['commentForm'].resetFields()
|
this.$refs['commentForm'].resetFields()
|
||||||
}
|
}
|
||||||
this.commentDialogVisible = false
|
this.commentDialogVisible = false
|
||||||
|
this.currentCommentPk = null
|
||||||
},
|
},
|
||||||
async fetchCommentUsers() {
|
async fetchCommentUsers() {
|
||||||
if (this.fetchingCommentUsers || !this.commentUserQuery.pkId) return
|
if (this.fetchingCommentUsers || !this.commentUserQuery.pkId) return
|
||||||
|
|||||||
Reference in New Issue
Block a user