评论问题3333111
This commit is contained in:
parent
daa7a00daa
commit
2724bbcef1
@ -44,11 +44,11 @@
|
||||
<a-form-item label="是否外部链接" name="isLink" :colon="false">
|
||||
<a-switch v-model:checked="isLinkChecked" />
|
||||
</a-form-item>
|
||||
<a-form-item label="外部链接地址" name="isLinkUrl" v-if="isLinkChecked">
|
||||
<a-input style="width: 100%" v-model:value="form.isLinkUrl" placeholder="外部链接地址" />
|
||||
<a-form-item label="外部链接地址" name="isLinkUrl" v-if="isLinkChecked" :required="true">
|
||||
<a-input style="width: 100%" v-model:value="form.isLinkUrl" placeholder="请输入外部链接地址" />
|
||||
</a-form-item>
|
||||
<a-form-item label="视频编号" name="videoNo" v-if="!isLinkChecked">
|
||||
<a-input style="width: 100%" v-model:value="form.videoNo" placeholder="视频编号" />
|
||||
<a-form-item label="视频编号" name="videoNo" v-if="!isLinkChecked" :required="true">
|
||||
<a-input style="width: 100%" v-model:value="form.videoNo" placeholder="请输入视频编号" />
|
||||
</a-form-item>
|
||||
<a-form-item label="疾病标签" name="labelList">
|
||||
<div class="label-container">
|
||||
@ -352,9 +352,17 @@
|
||||
if (value) {
|
||||
// 选择外部链接时,清空视频编号
|
||||
form.videoNo = undefined;
|
||||
// 清除视频编号的验证状态
|
||||
nextTick(() => {
|
||||
formRef.value?.clearValidate(['videoNo']);
|
||||
});
|
||||
} else {
|
||||
// 不选择外部链接时,清空外部链接地址
|
||||
form.isLinkUrl = undefined;
|
||||
// 清除外部链接地址的验证状态
|
||||
nextTick(() => {
|
||||
formRef.value?.clearValidate(['isLinkUrl']);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -369,7 +377,7 @@
|
||||
return Promise.resolve();
|
||||
}
|
||||
if (!value || value.trim() === '') {
|
||||
return Promise.reject('视频编号 必填');
|
||||
return Promise.reject('请填写视频编号');
|
||||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
@ -402,7 +410,7 @@
|
||||
return Promise.resolve();
|
||||
}
|
||||
if (!value || value.trim() === '') {
|
||||
return Promise.reject('外部链接地址 必填');
|
||||
return Promise.reject('请填写外部链接地址');
|
||||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
<div class="smart-table-operate">
|
||||
<a-button @click="showAuditModal(record)" type="link" v-if="hasPermission('caseExchange:auditStatusUpdate')">审核</a-button>
|
||||
<a-button @click="showAuditModal(record)" type="link" v-if="hasPermission('caseExchange:auditStatusUpdate')" :disabled="record.auditStatus === 1">审核</a-button>
|
||||
<a-button @click="showForm(record)" type="link">编辑</a-button>
|
||||
<a-button @click="onDelete(record)" danger type="link">删除</a-button>
|
||||
</div>
|
||||
|
||||
@ -71,11 +71,13 @@
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
|
||||
>
|
||||
<template #bodyCell="{ text, record, column }">
|
||||
<template v-if="column.dataIndex === 'commentType'">
|
||||
<a-tag :color="record.parentId ? 'blue' : 'green'">
|
||||
{{ record.parentId ? '回复' : '评论' }}
|
||||
</a-tag>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
<div class="smart-table-operate">
|
||||
<a-button @click="updateStatus(record.commentId, record.status === 1 ? 0 : 1)" type="link">
|
||||
{{ record.status === 1 ? '禁用' : '启用' }}
|
||||
</a-button>
|
||||
<a-button @click="updateTopStatus(record.commentId, record.isTop === 1 ? 0 : 1)" type="link">
|
||||
{{ record.isTop === 1 ? '取消置顶' : '置顶' }}
|
||||
</a-button>
|
||||
@ -132,22 +134,15 @@
|
||||
|
||||
const columns = ref([
|
||||
{ title: '用户名称', dataIndex: 'userName', ellipsis: true, width: 120 },
|
||||
{ title: '类型', dataIndex: 'commentType', ellipsis: true, width: 80 },
|
||||
{ title: '文章标题', dataIndex: 'articleTitle', ellipsis: false, width: 200, customRender: ({ text }) => h('div', { style: { 'white-space': 'pre-wrap', 'word-break': 'break-all', 'line-height': '1.4' } }, text || '-') },
|
||||
{ title: '评论状态', dataIndex: 'status', ellipsis: true, width: 80, customRender: ({ text }) => h('a-tag', {
|
||||
color: text === 1 ? 'success' : 'error'
|
||||
}, text === 1 ? '正常' : '禁用') },
|
||||
{ title: '是否敏感词', dataIndex: 'isSensitive', ellipsis: true, width: 80, customRender: ({ text }) => h('a-tag', {
|
||||
color: text === 1 ? 'error' : 'success'
|
||||
}, text === 1 ? '是' : '否') },
|
||||
{ title: '是否置顶', dataIndex: 'isTop', ellipsis: true, width: 80, customRender: ({ text }) => h('a-tag', {
|
||||
color: text === 1 ? 'processing' : 'default'
|
||||
}, text === 1 ? '是' : '否') },
|
||||
{ title: '点赞数量', dataIndex: 'likeNum', ellipsis: true, width: 80 },
|
||||
{ title: '是否作者评论', dataIndex: 'isAuthor', ellipsis: true, width: 100, customRender: ({ text }) => h('a-tag', {
|
||||
color: text === 1 ? 'magenta' : 'default'
|
||||
}, text === 1 ? '是' : '否') },
|
||||
{ title: '评论内容', dataIndex: 'content', ellipsis: false, width: 200, customRender: ({ text }) => h('div', { style: { 'white-space': 'pre-wrap', 'word-break': 'break-all', 'line-height': '1.4' } }, text || '-') },
|
||||
{ title: '评论内容(原版)', dataIndex: 'contentWord', ellipsis: false, width: 200, customRender: ({ text }) => h('div', { style: { 'white-space': 'pre-wrap', 'word-break': 'break-all', 'line-height': '1.4' } }, text || '-') },
|
||||
{ title: '评论图片', dataIndex: 'commentImage', ellipsis: false, width: 150, customRender: ({ text }) => {
|
||||
if (!text) return h('span', '-');
|
||||
const images = text.split(',').filter(img => img.trim());
|
||||
|
||||
@ -71,11 +71,13 @@
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
|
||||
>
|
||||
<template #bodyCell="{ text, record, column }">
|
||||
<template v-if="column.dataIndex === 'commentType'">
|
||||
<a-tag :color="record.parentId ? 'blue' : 'green'">
|
||||
{{ record.parentId ? '回复' : '评论' }}
|
||||
</a-tag>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
<div class="smart-table-operate">
|
||||
<a-button @click="updateStatus(record.commentId, record.status === 1 ? 0 : 1)" type="link">
|
||||
{{ record.status === 1 ? '禁用' : '启用' }}
|
||||
</a-button>
|
||||
<a-button @click="updateTopStatus(record.commentId, record.isTop === 1 ? 0 : 1)" type="link">
|
||||
{{ record.isTop === 1 ? '取消置顶' : '置顶' }}
|
||||
</a-button>
|
||||
@ -132,22 +134,15 @@
|
||||
|
||||
const columns = ref([
|
||||
{ title: '用户名称', dataIndex: 'userName', ellipsis: true, width: 120 },
|
||||
{ title: '类型', dataIndex: 'commentType', ellipsis: true, width: 80 },
|
||||
{ title: '视频标题', dataIndex: 'videoTitle', ellipsis: false, width: 200, customRender: ({ text }) => h('div', { style: { 'white-space': 'pre-wrap', 'word-break': 'break-all', 'line-height': '1.4' } }, text || '-') },
|
||||
{ title: '评论状态', dataIndex: 'status', ellipsis: true, width: 80, customRender: ({ text }) => h('a-tag', {
|
||||
color: text === 1 ? 'success' : 'error'
|
||||
}, text === 1 ? '正常' : '禁用') },
|
||||
{ title: '是否敏感词', dataIndex: 'isSensitive', ellipsis: true, width: 80, customRender: ({ text }) => h('a-tag', {
|
||||
color: text === 1 ? 'error' : 'success'
|
||||
}, text === 1 ? '是' : '否') },
|
||||
{ title: '是否置顶', dataIndex: 'isTop', ellipsis: true, width: 80, customRender: ({ text }) => h('a-tag', {
|
||||
color: text === 1 ? 'processing' : 'default'
|
||||
}, text === 1 ? '是' : '否') },
|
||||
{ title: '点赞数量', dataIndex: 'likeNum', ellipsis: true, width: 80 },
|
||||
{ title: '是否作者评论', dataIndex: 'isAuthor', ellipsis: true, width: 100, customRender: ({ text }) => h('a-tag', {
|
||||
color: text === 1 ? 'magenta' : 'default'
|
||||
}, text === 1 ? '是' : '否') },
|
||||
{ title: '评论内容', dataIndex: 'content', ellipsis: false, width: 200, customRender: ({ text }) => h('div', { style: { 'white-space': 'pre-wrap', 'word-break': 'break-all', 'line-height': '1.4' } }, text || '-') },
|
||||
{ title: '评论内容(原版)', dataIndex: 'contentWord', ellipsis: false, width: 200, customRender: ({ text }) => h('div', { style: { 'white-space': 'pre-wrap', 'word-break': 'break-all', 'line-height': '1.4' } }, text || '-') },
|
||||
{ title: '评论图片', dataIndex: 'commentImage', ellipsis: false, width: 150, customRender: ({ text }) => {
|
||||
if (!text) return h('span', '-');
|
||||
const images = text.split(',').filter(img => img.trim());
|
||||
|
||||
@ -71,11 +71,13 @@
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
|
||||
>
|
||||
<template #bodyCell="{ text, record, column }">
|
||||
<template v-if="column.dataIndex === 'commentType'">
|
||||
<a-tag :color="record.parentId ? 'blue' : 'green'">
|
||||
{{ record.parentId ? '回复' : '评论' }}
|
||||
</a-tag>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
<div class="smart-table-operate">
|
||||
<a-button @click="updateStatus(record.commentId, record.status === 1 ? 0 : 1)" type="link">
|
||||
{{ record.status === 1 ? '禁用' : '启用' }}
|
||||
</a-button>
|
||||
<a-button @click="updateTopStatus(record.commentId, record.isTop === 1 ? 0 : 1)" type="link">
|
||||
{{ record.isTop === 1 ? '取消置顶' : '置顶' }}
|
||||
</a-button>
|
||||
@ -132,22 +134,15 @@
|
||||
|
||||
const columns = ref([
|
||||
{ title: '用户名称', dataIndex: 'userName', ellipsis: true, width: 120 },
|
||||
{ title: '类型', dataIndex: 'commentType', ellipsis: true, width: 80 },
|
||||
{ title: '交流标题', dataIndex: 'exchangeTitle', ellipsis: false, width: 200, customRender: ({ text }) => h('div', { style: { 'white-space': 'pre-wrap', 'word-break': 'break-all', 'line-height': '1.4' } }, text || '-') },
|
||||
{ title: '评论状态', dataIndex: 'status', ellipsis: true, width: 80, customRender: ({ text }) => h('a-tag', {
|
||||
color: text === 1 ? 'success' : 'error'
|
||||
}, text === 1 ? '正常' : '禁用') },
|
||||
{ title: '是否敏感词', dataIndex: 'isSensitive', ellipsis: true, width: 80, customRender: ({ text }) => h('a-tag', {
|
||||
color: text === 1 ? 'error' : 'success'
|
||||
}, text === 1 ? '是' : '否') },
|
||||
{ title: '是否置顶', dataIndex: 'isTop', ellipsis: true, width: 80, customRender: ({ text }) => h('a-tag', {
|
||||
color: text === 1 ? 'processing' : 'default'
|
||||
}, text === 1 ? '是' : '否') },
|
||||
{ title: '点赞数量', dataIndex: 'likeNum', ellipsis: true, width: 80 },
|
||||
{ title: '是否作者评论', dataIndex: 'isAuthor', ellipsis: true, width: 100, customRender: ({ text }) => h('a-tag', {
|
||||
color: text === 1 ? 'magenta' : 'default'
|
||||
}, text === 1 ? '是' : '否') },
|
||||
{ title: '评论内容', dataIndex: 'content', ellipsis: false, width: 200, customRender: ({ text }) => h('div', { style: { 'white-space': 'pre-wrap', 'word-break': 'break-all', 'line-height': '1.4' } }, text || '-') },
|
||||
{ title: '评论内容(原版)', dataIndex: 'contentWord', ellipsis: false, width: 200, customRender: ({ text }) => h('div', { style: { 'white-space': 'pre-wrap', 'word-break': 'break-all', 'line-height': '1.4' } }, text || '-') },
|
||||
{ title: '评论图片', dataIndex: 'commentImage', ellipsis: false, width: 150, customRender: ({ text }) => {
|
||||
if (!text) return h('span', '-');
|
||||
const images = text.split(',').filter(img => img.trim());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user