feat(richedit): 新增聚类资讯展示功能并优化表格组件
- 在tableComponents组件中添加树形表格功能,支持展示聚类资讯 - 新增zTable组件用于展示聚类资讯子表 - 优化表格样式和布局,添加聚类资讯标题展示 - 添加showHeader属性控制表格头部显示
This commit is contained in:
parent
9e740a4780
commit
9d07061ea6
|
|
@ -1,6 +1,14 @@
|
|||
<template>
|
||||
<div class="cu_table">
|
||||
<el-table ref="tableRef" :data="tableData.data" v-loading="tableLoading" style="font-size: 12px"
|
||||
<!-- :cell-class-name="cellClassName" -->
|
||||
<!-- :tree-props="{ children: 'clusterNews', hasChildren: true }" -->
|
||||
|
||||
<el-table
|
||||
:show-header="showHeader"
|
||||
ref="tableRef"
|
||||
:data="tableData.data"
|
||||
v-loading="tableLoading"
|
||||
style="font-size: 12px"
|
||||
:cell-style="{ fontWeight: '400', fontSize: '14px', color: 'rgba(0,0,0,0.65)', height: '46px' }"
|
||||
:header-cell-style="{
|
||||
height: '46px',
|
||||
|
|
@ -9,12 +17,27 @@
|
|||
fontWeight: '400',
|
||||
fontSize: '14px',
|
||||
color: ' rgba(0,0,0,0.85)',
|
||||
}" @selection-change="selectionChange" @sort-change="sortChange" size="small">
|
||||
}"
|
||||
@selection-change="selectionChange"
|
||||
@sort-change="sortChange"
|
||||
size="small"
|
||||
row-key="id"
|
||||
:cell-class-name="cellClassName"
|
||||
:tree-props="{ children: 'clusterNews', hasChildren: true }"
|
||||
>
|
||||
<slot></slot>
|
||||
</el-table>
|
||||
<el-pagination background style="margin-top: 24px" layout="slot, ->,sizes,prev, pager, next, jumper"
|
||||
:page-sizes="[10, 20, 50, 100]" v-model:page-size="tableData.size" :total="tableData.total"
|
||||
v-model:current-page="tableData.page" @current-change="currentChange" @size-change="sizeChange">
|
||||
<el-pagination
|
||||
background
|
||||
style="margin-top: 24px"
|
||||
layout="slot, ->,sizes,prev, pager, next, jumper"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
v-model:page-size="tableData.size"
|
||||
:total="tableData.total"
|
||||
v-model:current-page="tableData.page"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
>
|
||||
<div style="font-size: 14px; color: rgba(0, 0, 0, 0.6)">共 {{ tableData.total }} 项数据</div>
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
|
@ -27,7 +50,7 @@ const props = defineProps({
|
|||
// 列表内容
|
||||
tableData: {
|
||||
type: Object,
|
||||
default: () => { },
|
||||
default: () => {},
|
||||
},
|
||||
tableLoading: {
|
||||
type: Boolean,
|
||||
|
|
@ -37,6 +60,10 @@ const props = defineProps({
|
|||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
showHeader: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['currentChange', 'selectionChange', 'sizeChange', 'sortChange']);
|
||||
|
|
@ -68,20 +95,27 @@ function toggleRowSelection(row, isCheck) {
|
|||
}
|
||||
|
||||
function clearSort() {
|
||||
console.log("🚀 ~ clearSort ~ clearSort:", clearSort)
|
||||
console.log('🚀 ~ clearSort ~ clearSort:', clearSort);
|
||||
tableRef.value.clearSort();
|
||||
}
|
||||
|
||||
function cellClassName({ row, column, rowIndex, columnIndex }) {
|
||||
console.log('🚀 ~ cellClassName ~ rowIndex:', rowIndex);
|
||||
console.log('🚀 ~ cellClassName ~ row:', row.title);
|
||||
if (row.isChild) {
|
||||
return 'first-cell';
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
clearSelection,
|
||||
toggleRowSelection,
|
||||
clearSort
|
||||
clearSort,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.cu_table {
|
||||
|
||||
// border-radius: 10px;
|
||||
// margin: 10px;
|
||||
&::after {
|
||||
|
|
@ -124,4 +158,12 @@ defineExpose({
|
|||
border: 1px solid #dcdcdc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
// .el-table :deep(.first-cell) {
|
||||
// background-color: red;
|
||||
// }
|
||||
|
||||
:deep(.el-table__row--level-1) {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -6,14 +6,18 @@
|
|||
|
||||
<!-- 普通管理员和审核人员的筛选条件不一样,普通管理员是资讯精选、其他是资讯审核 -->
|
||||
<!-- 普通管理员的筛选 start -->
|
||||
<div style="width: 100%; display: flex; align-items: flex-end"
|
||||
v-if="Session.get('userInfoLocal').userType != '00'">
|
||||
<div style="width: 100%; display: flex; align-items: flex-end" v-if="Session.get('userInfoLocal').userType != '00'">
|
||||
<el-button type="primary" style="margin-bottom: 10px" @click="restData">清空条件</el-button>
|
||||
|
||||
<div class="colHeader-right" :style="{ alignItems: 'flex-end', minWidth: '700px' }">
|
||||
<el-space :size="12" class="colHeader-right-1">
|
||||
<el-input v-model="form.keyword" placeholder="输入标题/内容关键字进行搜索(以空格隔开)" class="input-with-select"
|
||||
@keyup.enter="handleSearch" style="width: 455px">
|
||||
<el-input
|
||||
v-model="form.keyword"
|
||||
placeholder="输入标题/内容关键字进行搜索(以空格隔开)"
|
||||
class="input-with-select"
|
||||
@keyup.enter="handleSearch"
|
||||
style="width: 455px"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="handleSearch" />
|
||||
</template>
|
||||
|
|
@ -21,15 +25,32 @@
|
|||
|
||||
<div>
|
||||
<span>行业分类:</span>
|
||||
<el-tree-select v-model="form.industry" :data="industryList" multiple
|
||||
:render-after-expand="false" filterable show-checkbox style="width: 240px"
|
||||
@check="handleCheckChange" @clear="handleSearch" node-key="id" collapse-tags
|
||||
collapse-tags-tooltip clearable :props="defaultProps">
|
||||
<el-tree-select
|
||||
v-model="form.industry"
|
||||
:data="industryList"
|
||||
multiple
|
||||
:render-after-expand="false"
|
||||
filterable
|
||||
show-checkbox
|
||||
style="width: 240px"
|
||||
@check="handleCheckChange"
|
||||
@clear="handleSearch"
|
||||
node-key="id"
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
clearable
|
||||
:props="defaultProps"
|
||||
>
|
||||
</el-tree-select>
|
||||
</div>
|
||||
|
||||
<el-input v-model="form.tag" placeholder="匹配多个概念标签(以空格隔开)" class="input-with-select"
|
||||
@keyup.enter="handleSearch" style="width: 280px">
|
||||
<el-input
|
||||
v-model="form.tag"
|
||||
placeholder="匹配多个概念标签(以空格隔开)"
|
||||
class="input-with-select"
|
||||
@keyup.enter="handleSearch"
|
||||
style="width: 280px"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="handleSearch" />
|
||||
</template>
|
||||
|
|
@ -37,27 +58,54 @@
|
|||
</el-space>
|
||||
|
||||
<div class="colHeader-right-2">
|
||||
<el-date-picker v-model="daterange" type="daterange" range-separator="至"
|
||||
value-format="YYYY-MM-DD" start-placeholder="选择报道时间" end-placeholder="选择报道时间"
|
||||
style="margin-right: 12px" @change="handleSearch" />
|
||||
<el-date-picker
|
||||
v-model="daterange"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="选择报道时间"
|
||||
end-placeholder="选择报道时间"
|
||||
style="margin-right: 12px"
|
||||
@change="handleSearch"
|
||||
/>
|
||||
|
||||
<el-select-v2 v-model="form.mediaId" :options="tagSourceList" clearable placeholder="媒体来源"
|
||||
size="large" style="width: 240px" filterable @change="handleSearch" />
|
||||
<el-select-v2
|
||||
v-model="form.mediaId"
|
||||
:options="tagSourceList"
|
||||
clearable
|
||||
placeholder="媒体来源"
|
||||
size="large"
|
||||
style="width: 240px"
|
||||
filterable
|
||||
@change="handleSearch"
|
||||
/>
|
||||
|
||||
<el-select clearable v-model="form.deleted" size="large" style="width: 150px; margin-left: 10px"
|
||||
v-if="Session.get('userInfoLocal').userType == '00'" placeholder="筛选删除状态"
|
||||
@change="handleSearch">
|
||||
<el-select
|
||||
clearable
|
||||
v-model="form.deleted"
|
||||
size="large"
|
||||
style="width: 150px; margin-left: 10px"
|
||||
v-if="Session.get('userInfoLocal').userType == '00'"
|
||||
placeholder="筛选删除状态"
|
||||
@change="handleSearch"
|
||||
>
|
||||
<el-option :value="1" label="已删除资讯"></el-option>
|
||||
<el-option :value="0" label="未删除资讯"></el-option>
|
||||
</el-select>
|
||||
|
||||
<div style="margin-left: 12px; display: flex; flex-wrap: nowrap; align-items: center">
|
||||
<span>评分范围:</span>
|
||||
<el-input type="number" v-model="form.minScore" style="width: 80px" placeholder="最低"
|
||||
:min="0" :max="100" @keyup.enter="handleSearch" />
|
||||
<el-input
|
||||
type="number"
|
||||
v-model="form.minScore"
|
||||
style="width: 80px"
|
||||
placeholder="最低"
|
||||
:min="0"
|
||||
:max="100"
|
||||
@keyup.enter="handleSearch"
|
||||
/>
|
||||
<i style="color: #ccc"> - </i>
|
||||
<el-input type="number" v-model="form.maxScore" style="width: 140px" placeholder="最高"
|
||||
:min="0" :max="100" @keyup.enter="handleSearch">
|
||||
<el-input type="number" v-model="form.maxScore" style="width: 140px" placeholder="最高" :min="0" :max="100" @keyup.enter="handleSearch">
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="handleSearch" />
|
||||
</template>
|
||||
|
|
@ -71,8 +119,13 @@
|
|||
<div class="colHeader-right">
|
||||
<el-space :size="12" class="colHeader-right-1">
|
||||
<span>标题检索:</span>
|
||||
<el-input v-model="form.keyword" placeholder="输入标题/内容关键字进行搜索(以空格隔开)" class="input-with-select"
|
||||
@keyup.enter="handleSearch" style="width: 500px">
|
||||
<el-input
|
||||
v-model="form.keyword"
|
||||
placeholder="输入标题/内容关键字进行搜索(以空格隔开)"
|
||||
class="input-with-select"
|
||||
@keyup.enter="handleSearch"
|
||||
style="width: 500px"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="handleSearch" />
|
||||
</template>
|
||||
|
|
@ -80,15 +133,32 @@
|
|||
|
||||
<div>
|
||||
<span>行业分类:</span>
|
||||
<el-tree-select v-model="form.industry" :data="industryList" multiple
|
||||
:render-after-expand="false" filterable show-checkbox style="width: 240px"
|
||||
@check="handleCheckChange" @clear="handleSearch" node-key="id" collapse-tags
|
||||
collapse-tags-tooltip clearable :props="defaultProps">
|
||||
<el-tree-select
|
||||
v-model="form.industry"
|
||||
:data="industryList"
|
||||
multiple
|
||||
:render-after-expand="false"
|
||||
filterable
|
||||
show-checkbox
|
||||
style="width: 240px"
|
||||
@check="handleCheckChange"
|
||||
@clear="handleSearch"
|
||||
node-key="id"
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
clearable
|
||||
:props="defaultProps"
|
||||
>
|
||||
</el-tree-select>
|
||||
</div>
|
||||
|
||||
<el-input v-model="form.tag" placeholder="匹配多个概念标签(以空格隔开)" class="input-with-select"
|
||||
@keyup.enter="handleSearch" style="width: 280px">
|
||||
<el-input
|
||||
v-model="form.tag"
|
||||
placeholder="匹配多个概念标签(以空格隔开)"
|
||||
class="input-with-select"
|
||||
@keyup.enter="handleSearch"
|
||||
style="width: 280px"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="handleSearch" />
|
||||
</template>
|
||||
|
|
@ -97,30 +167,68 @@
|
|||
|
||||
<div class="colHeader-right-2" style="gap: 10px">
|
||||
<span>信号规则:</span>
|
||||
<el-select v-model="form.includeRuleIds" clearable placeholder="含任一信号规则" multiple size="large"
|
||||
style="width: 180px" filterable @change="signalChange($event, 1)">
|
||||
<el-option v-for="item in signalRulesList" :key="item.id" :value="item.id"
|
||||
:disabled="form.excludeRuleIds?.includes(item.id)" :label="item.ruleName"></el-option>
|
||||
<el-select
|
||||
v-model="form.includeRuleIds"
|
||||
clearable
|
||||
placeholder="含任一信号规则"
|
||||
multiple
|
||||
size="large"
|
||||
style="width: 180px"
|
||||
filterable
|
||||
@change="signalChange($event, 1)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in signalRulesList"
|
||||
:key="item.id"
|
||||
:value="item.id"
|
||||
:disabled="form.excludeRuleIds?.includes(item.id)"
|
||||
:label="item.ruleName"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select v-model="form.excludeRuleIds" clearable placeholder="不含任一信号规则" multiple size="large"
|
||||
style="width: 180px" filterable @change="signalChange($event, 2)">
|
||||
<el-option v-for="item in signalRulesList" :key="item.id" :value="item.id"
|
||||
:disabled="form.includeRuleIds?.includes(item.id)" :label="item.ruleName"></el-option>
|
||||
<el-select
|
||||
v-model="form.excludeRuleIds"
|
||||
clearable
|
||||
placeholder="不含任一信号规则"
|
||||
multiple
|
||||
size="large"
|
||||
style="width: 180px"
|
||||
filterable
|
||||
@change="signalChange($event, 2)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in signalRulesList"
|
||||
:key="item.id"
|
||||
:value="item.id"
|
||||
:disabled="form.includeRuleIds?.includes(item.id)"
|
||||
:label="item.ruleName"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<span>报道时间:</span>
|
||||
<div>
|
||||
<el-date-picker v-model="daterange" type="daterange" range-separator="-"
|
||||
value-format="YYYY-MM-DD" start-placeholder="选择报道时间" end-placeholder="选择报道时间"
|
||||
@change="handleSearch" />
|
||||
<el-date-picker
|
||||
v-model="daterange"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="选择报道时间"
|
||||
end-placeholder="选择报道时间"
|
||||
@change="handleSearch"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; flex-wrap: nowrap; align-items: center">
|
||||
<span>评分范围:</span>
|
||||
<el-input type="number" v-model="form.minScore" style="width: 80px" placeholder="最低"
|
||||
:min="0" :max="100" @keyup.enter="handleSearch" />
|
||||
<el-input
|
||||
type="number"
|
||||
v-model="form.minScore"
|
||||
style="width: 80px"
|
||||
placeholder="最低"
|
||||
:min="0"
|
||||
:max="100"
|
||||
@keyup.enter="handleSearch"
|
||||
/>
|
||||
<i style="color: #ccc"> - </i>
|
||||
<el-input type="number" v-model="form.maxScore" style="width: 140px" placeholder="最高"
|
||||
:min="0" :max="100" @keyup.enter="handleSearch">
|
||||
<el-input type="number" v-model="form.maxScore" style="width: 140px" placeholder="最高" :min="0" :max="100" @keyup.enter="handleSearch">
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="handleSearch" />
|
||||
</template>
|
||||
|
|
@ -130,8 +238,16 @@
|
|||
|
||||
<div class="colHeader-right-2" style="gap: 10px">
|
||||
<span>媒体来源:</span>
|
||||
<el-select-v2 v-model="form.mediaId" :options="tagSourceList" clearable placeholder="媒体来源"
|
||||
size="large" style="width: 180px" filterable @change="handleSearch" />
|
||||
<el-select-v2
|
||||
v-model="form.mediaId"
|
||||
:options="tagSourceList"
|
||||
clearable
|
||||
placeholder="媒体来源"
|
||||
size="large"
|
||||
style="width: 180px"
|
||||
filterable
|
||||
@change="handleSearch"
|
||||
/>
|
||||
<span>企业检索:</span>
|
||||
<!-- <el-select
|
||||
v-model="form.companyName"
|
||||
|
|
@ -147,24 +263,49 @@
|
|||
<el-option>否</el-option>
|
||||
</el-select> -->
|
||||
|
||||
<el-select class="search-input" popper-class="option-box" v-model="form.companyName" clearable
|
||||
filterable remote reserve-keyword remote-show-suffix default-first-option
|
||||
:suffix-icon="Search" placeholder="输入企业名称/企业简称/证券编码进行搜索" :loading="loading"
|
||||
:remote-method="getCompany" @change="getData" style="width: 180px">
|
||||
<el-option v-for="item in companyList" :key="item.companyName" :label="item.companyName"
|
||||
:value="item.companyName"> </el-option>
|
||||
<el-select
|
||||
class="search-input"
|
||||
popper-class="option-box"
|
||||
v-model="form.companyName"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
reserve-keyword
|
||||
remote-show-suffix
|
||||
default-first-option
|
||||
:suffix-icon="Search"
|
||||
placeholder="输入企业名称/企业简称/证券编码进行搜索"
|
||||
:loading="loading"
|
||||
:remote-method="getCompany"
|
||||
@change="getData"
|
||||
style="width: 180px"
|
||||
>
|
||||
<el-option v-for="item in companyList" :key="item.companyName" :label="item.companyName" :value="item.companyName"> </el-option>
|
||||
</el-select>
|
||||
|
||||
<span>独家资讯:</span>
|
||||
<el-select v-model="form.exclusive" clearable placeholder="是否独家搜索" size="large"
|
||||
style="width: 180px" filterable @change="handleSearch">
|
||||
<el-select
|
||||
v-model="form.exclusive"
|
||||
clearable
|
||||
placeholder="是否独家搜索"
|
||||
size="large"
|
||||
style="width: 180px"
|
||||
filterable
|
||||
@change="handleSearch"
|
||||
>
|
||||
<el-option :value="1" label="是"></el-option>
|
||||
<el-option :value="0" label="否"></el-option>
|
||||
</el-select>
|
||||
|
||||
<span>删除状态:</span>
|
||||
<el-select clearable v-model="form.deleted" size="large" style="width: 150px; margin-left: 10px"
|
||||
placeholder="筛选删除状态" @change="handleSearch">
|
||||
<el-select
|
||||
clearable
|
||||
v-model="form.deleted"
|
||||
size="large"
|
||||
style="width: 150px; margin-left: 10px"
|
||||
placeholder="筛选删除状态"
|
||||
@change="handleSearch"
|
||||
>
|
||||
<el-option :value="1" label="已删除资讯"></el-option>
|
||||
<el-option :value="0" label="未删除资讯"></el-option>
|
||||
</el-select>
|
||||
|
|
@ -175,16 +316,32 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<tableComponents ref="tableRef" :tableData="tableData" style="margin-top: 20px" @sortChange="sortChange"
|
||||
:tableLoading="tableLoading" @currentChange="currentChange" @sizeChange="sizeChange">
|
||||
<tableComponents
|
||||
ref="tableRef"
|
||||
:tableData="tableData"
|
||||
style="margin-top: 20px"
|
||||
@sortChange="sortChange"
|
||||
:tableLoading="tableLoading"
|
||||
@currentChange="currentChange"
|
||||
@sizeChange="sizeChange"
|
||||
>
|
||||
<!-- <el-table-column type="expand">
|
||||
<template v-slot="scope">
|
||||
<z-table :tableData="{ data: scope.row.clusterNews }" style="margin-left: 50px; width: 100%"></z-table>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="title" label="标题" align="left" width="380">
|
||||
<template v-slot="scope">
|
||||
<div style="display: flex; flex-direction: column; gap: 5px; padding: 10px 0">
|
||||
<div style="display: flex; flex-direction: column; justify-content: flex-start; align-items: start; gap: 5px; padding: 10px 0">
|
||||
<div
|
||||
v-if="scope.row.isChild && scope.row.clusterIndex == 0"
|
||||
style="font-size: 14px; font-weight: bold; margin-left: -20px; margin-bottom: 30px"
|
||||
>
|
||||
聚类资讯({{ scope.row.childLength }}条)
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: red; font-weight: bold; margin-right: 3px"
|
||||
v-if="scope.row.exclusive == 1">[独家]</span>
|
||||
<span class="cursor-pointer" @click="goDetail(1, scope.row, true)"
|
||||
v-html="scope.row.title"></span>
|
||||
<span style="color: red; font-weight: bold; margin-right: 3px; flex-wrap: nowrap" v-if="scope.row.exclusive == 1">[独家]</span>
|
||||
<span class="cursor-pointer" @click="goDetail(1, scope.row, true)" v-html="scope.row.title"></span>
|
||||
</div>
|
||||
|
||||
<div class="labels" v-if="Session.get('userInfoLocal').userType == '00'">
|
||||
|
|
@ -209,12 +366,10 @@
|
|||
</div>
|
||||
</div> -->
|
||||
|
||||
<div style="background-color: #eee6cd" class="label_item"
|
||||
v-if="scope.row.conceptLabels && scope.row.conceptLabels.length > 0">
|
||||
<div style="background-color: #eee6cd" class="label_item" v-if="scope.row.conceptLabels && scope.row.conceptLabels.length > 0">
|
||||
{{ scope.row.conceptLabels[0] }}
|
||||
</div>
|
||||
<div style="background-color: #cfdcf3" class="label_item"
|
||||
v-if="scope.row.industryLabels && scope.row.industryLabels.length > 0">
|
||||
<div style="background-color: #cfdcf3" class="label_item" v-if="scope.row.industryLabels && scope.row.industryLabels.length > 0">
|
||||
{{ scope.row.industryLabels[0] }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -222,8 +377,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="信号规则" align="center" width="120"
|
||||
v-if="Session.get('userInfoLocal').userType == '00'">
|
||||
<el-table-column label="信号规则" align="center" width="120" v-if="Session.get('userInfoLocal').userType == '00'">
|
||||
<template v-slot="scope">
|
||||
<div v-if="scope.row.ruleName && scope.row.ruleName.length > 0">
|
||||
<div v-for="item in scope.row.ruleName" :key="item" class="label_item">
|
||||
|
|
@ -234,8 +388,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="媒体来源" align="center" width="120"
|
||||
v-if="Session.get('userInfoLocal').userType == '00'">
|
||||
<el-table-column label="媒体来源" align="center" width="120" v-if="Session.get('userInfoLocal').userType == '00'">
|
||||
<template v-slot="scope">
|
||||
<div v-if="scope.row.sourceName">
|
||||
{{ scope.row.sourceName }}
|
||||
|
|
@ -265,16 +418,18 @@
|
|||
<div v-else>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item :command="null">全部</el-dropdown-item>
|
||||
<el-dropdown-item :command="1"
|
||||
v-if="Session.get('userInfoLocal').userType == '00'">未发布</el-dropdown-item>
|
||||
<el-dropdown-item :command="1" v-if="Session.get('userInfoLocal').userType == '00'">未发布</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item :command="3"
|
||||
v-if="Session.get('userInfoLocal').userType != '01'">审核中</el-dropdown-item>
|
||||
<el-dropdown-item :command="4"
|
||||
v-if="Session.get('userInfoLocal').userType == '02' || Session.get('userInfoLocal').userType == '01'">已二审</el-dropdown-item>
|
||||
<el-dropdown-item :command="3" v-if="Session.get('userInfoLocal').userType != '01'">审核中</el-dropdown-item>
|
||||
<el-dropdown-item :command="4" v-if="Session.get('userInfoLocal').userType == '02' || Session.get('userInfoLocal').userType == '01'"
|
||||
>已二审</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item :command="2">已发布</el-dropdown-item>
|
||||
<el-dropdown-item :command="-1"
|
||||
v-if="Session.get('userInfoLocal').userType == '02' || Session.get('userInfoLocal').userType == '01'">退改中</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="-1"
|
||||
v-if="Session.get('userInfoLocal').userType == '02' || Session.get('userInfoLocal').userType == '01'"
|
||||
>退改中</el-dropdown-item
|
||||
>
|
||||
</el-dropdown-menu>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -283,8 +438,7 @@
|
|||
<template v-slot="scope">
|
||||
<!-- 新闻状态 0-草稿 1-未发布 2-已发布 -->
|
||||
<div class="r_point" :style="{ color: '#000' }">
|
||||
<div class="point" :style="{ backgroundColor: scope.row.status == 2 ? '#52C41A' : '#D9D9D9' }">
|
||||
</div>
|
||||
<div class="point" :style="{ backgroundColor: scope.row.status == 2 ? '#52C41A' : '#D9D9D9' }"></div>
|
||||
<text v-if="scope.row.status == 0" style="color: rgba(0, 0, 0, 0.65)">草稿</text>
|
||||
<text v-if="scope.row.status == 1" style="color: rgba(0, 0, 0, 0.65)">
|
||||
{{ scope.row.deleted ? '已删除' : '未发布' }}
|
||||
|
|
@ -304,8 +458,7 @@
|
|||
{{ scope.row.submitter ? scope.row.submitter : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" width="120" prop="submitter" label="二校"
|
||||
v-if="Session.get('userInfoLocal').userType == '01'">
|
||||
<el-table-column align="center" width="120" prop="submitter" label="二校" v-if="Session.get('userInfoLocal').userType == '01'">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.submitterSecond ? scope.row.submitterSecond : '-' }}
|
||||
</template>
|
||||
|
|
@ -339,8 +492,7 @@
|
|||
|
||||
<el-table-column prop="score" label="资讯评分" sortable="custom" align="center" width="100">
|
||||
<template v-slot="scope">
|
||||
<div @click="getScoreDetail(scope.row.id)"
|
||||
:class="[{ 'score-active': isAdmin && curScore === scope.row.id }, { 'score-hover': isAdmin }]">
|
||||
<div @click="getScoreDetail(scope.row.id)" :class="[{ 'score-active': isAdmin && curScore === scope.row.id }, { 'score-hover': isAdmin }]">
|
||||
{{ scope.row.score }}
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -349,72 +501,71 @@
|
|||
<el-table-column prop="updateTime" label="状态变动时间" sortable="custom" align="center">
|
||||
<template v-slot="scope">
|
||||
<div>
|
||||
<div>{{ formatTime(scope.row.updateTime) == formatTime(scope.row.createTime) ?
|
||||
scope.row.publishTime : scope.row.updateTime }}</div>
|
||||
<div>{{ formatTime(scope.row.updateTime) == formatTime(scope.row.createTime) ? scope.row.publishTime : scope.row.updateTime }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250" fixed="right">
|
||||
<template v-slot="scope">
|
||||
<div class="option">
|
||||
<el-button v-if="scope.row.deleted" type="text" style="margin-left: -10px"
|
||||
@click="doRecoverFn(scope.row)">
|
||||
<el-button v-if="scope.row.deleted" type="text" style="margin-left: -10px" @click="doRecoverFn(scope.row)">
|
||||
<text>恢复</text>
|
||||
</el-button>
|
||||
<div v-else style="display: flex; gap: 10px; align-items: center">
|
||||
<el-button type="text" :disabled="scope.row.status != 2" class="copyBtn"
|
||||
@click="copyUrl(scope.row)">复制</el-button>
|
||||
<el-button type="text" :disabled="scope.row.status != 2" class="copyBtn" @click="copyUrl(scope.row)">复制</el-button>
|
||||
|
||||
<!-- 新闻状态 0-草稿 | 1-未发布 | 2-已发布 | 3-送审 | 4-已二审 | -1-退改中 -->
|
||||
<div v-if="Session.get('userInfoLocal').userType == '00'">
|
||||
<!-- 普通账号 -->
|
||||
<el-button
|
||||
v-if="scope.row.status == 0 || scope.row.status == 1 || scope.row.status == -1"
|
||||
type="text" @click="goDetail(1, scope.row, false)">编辑</el-button>
|
||||
type="text"
|
||||
@click="goDetail(1, scope.row, false)"
|
||||
>编辑</el-button
|
||||
>
|
||||
|
||||
<el-button
|
||||
v-if="scope.row.status == 0 || scope.row.status == 1 || scope.row.status == -1"
|
||||
type="text" @click="doApprovalFn(scope.row, scope.row.status)">送审</el-button>
|
||||
<el-button v-else-if="scope.row.status == 3" type="text"
|
||||
@click="doApprovalFn(scope.row, scope.row.status)">撤审</el-button>
|
||||
type="text"
|
||||
@click="doApprovalFn(scope.row, scope.row.status)"
|
||||
>送审</el-button
|
||||
>
|
||||
<el-button v-else-if="scope.row.status == 3" type="text" @click="doApprovalFn(scope.row, scope.row.status)">撤审</el-button>
|
||||
|
||||
<el-button
|
||||
v-if="scope.row.status == 0 || scope.row.status == 1 || scope.row.status == -1"
|
||||
type="text" style="color: #ff1818" @click="doDeleteNewsFn(scope.row)">删除</el-button>
|
||||
type="text"
|
||||
style="color: #ff1818"
|
||||
@click="doDeleteNewsFn(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</div>
|
||||
<div v-if="Session.get('userInfoLocal').userType == '02'">
|
||||
<el-button v-if="scope.row.status == 4" type="text"
|
||||
@click="doApprovalFn(scope.row, scope.row.status)">撤审</el-button>
|
||||
<el-button v-if="scope.row.status == 4" type="text" @click="doApprovalFn(scope.row, scope.row.status)">撤审</el-button>
|
||||
|
||||
<!-- 二审账号 -->
|
||||
<el-button v-if="scope.row.status == 3" type="text" style="color: #ff1818"
|
||||
@click="doNewReturnFn(scope.row)">退改</el-button>
|
||||
<el-button v-if="scope.row.status == 3" type="text" style="color: #ff1818" @click="doNewReturnFn(scope.row)">退改</el-button>
|
||||
|
||||
<el-button v-if="scope.row.status == 3" type="text"
|
||||
@click="goDetail(1, scope.row, false)">编辑</el-button>
|
||||
<el-button v-if="scope.row.status == 3" type="text" @click="goDetail(1, scope.row, false)">编辑</el-button>
|
||||
|
||||
<el-button v-if="scope.row.status == 3" type="text"
|
||||
@click="doNewCheckFn(scope.row)">复审</el-button>
|
||||
<el-button v-if="scope.row.status == 3" type="text" @click="doNewCheckFn(scope.row)">复审</el-button>
|
||||
|
||||
<el-button type="text" v-if="scope.row.status == 4"
|
||||
@click="doNewsPublishFn(scope.row, 2)">发布</el-button>
|
||||
<el-button type="text" v-if="scope.row.status == 4" @click="doNewsPublishFn(scope.row, 2)">发布</el-button>
|
||||
</div>
|
||||
<div v-if="Session.get('userInfoLocal').userType == '01'">
|
||||
<!-- 终审账号 -->
|
||||
<el-button v-if="scope.row.status == 3 || scope.row.status == 4" type="text"
|
||||
@click="goDetail(1, scope.row, false)">编辑</el-button>
|
||||
<el-button v-if="scope.row.status == 3 || scope.row.status == 4" type="text" @click="goDetail(1, scope.row, false)">编辑</el-button>
|
||||
|
||||
<el-button v-if="scope.row.status == 4" type="text" style="color: #ff1818"
|
||||
@click="doNewReturnFn(scope.row)">退改</el-button>
|
||||
<el-button v-if="scope.row.status == 4" type="text" style="color: #ff1818" @click="doNewReturnFn(scope.row)">退改</el-button>
|
||||
|
||||
<el-button type="text" v-if="scope.row.status == 2"
|
||||
@click="doNewsPublishFn(scope.row, 1)">撤稿</el-button>
|
||||
<el-button type="text" v-else-if="scope.row.status != -1 && scope.row.status == 4"
|
||||
@click="doNewsPublishFn(scope.row, 2)">发布</el-button>
|
||||
<el-button type="text" v-if="scope.row.status == 2" @click="doNewsPublishFn(scope.row, 1)">撤稿</el-button>
|
||||
<el-button type="text" v-else-if="scope.row.status != -1 && scope.row.status == 4" @click="doNewsPublishFn(scope.row, 2)"
|
||||
>发布</el-button
|
||||
>
|
||||
|
||||
<el-button v-if="scope.row.status == 3" type="text"
|
||||
style="color: #ff1818; margin-left: 5px"
|
||||
@click="doNewReturnFn(scope.row)">退改</el-button>
|
||||
<el-button v-if="scope.row.status == 3" type="text" style="color: #ff1818; margin-left: 5px" @click="doNewReturnFn(scope.row)"
|
||||
>退改</el-button
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- <el-icon size="16" @click="goRecord(scope.row)">
|
||||
|
|
@ -424,7 +575,10 @@
|
|||
<!-- v-if="isAdmin" -->
|
||||
<el-icon
|
||||
v-if="isAdmin || Session.get('userInfoLocal').userType == '02' || Session.get('userInfoLocal').userType == '01'"
|
||||
size="16" @click="goRecord(scope.row)" style="margin-left: 10px">
|
||||
size="16"
|
||||
@click="goRecord(scope.row)"
|
||||
style="margin-left: 10px"
|
||||
>
|
||||
<Tickets />
|
||||
</el-icon>
|
||||
</div>
|
||||
|
|
@ -433,9 +587,16 @@
|
|||
</tableComponents>
|
||||
|
||||
<keep-alive>
|
||||
<DetailDrawer v-model="drawer" :data="newsData" :readOnly="readOnly" :type="newstype"
|
||||
@handleEditStatus="handleEditStatus" @doNewsPublishFn="doNewsPublishFn" @doDeleteNewsFn="doDeleteNewsFn"
|
||||
@getData="getData" />
|
||||
<DetailDrawer
|
||||
v-model="drawer"
|
||||
:data="newsData"
|
||||
:readOnly="readOnly"
|
||||
:type="newstype"
|
||||
@handleEditStatus="handleEditStatus"
|
||||
@doNewsPublishFn="doNewsPublishFn"
|
||||
@doDeleteNewsFn="doDeleteNewsFn"
|
||||
@getData="getData"
|
||||
/>
|
||||
</keep-alive>
|
||||
|
||||
<el-dialog v-model="isScoreShow" title="资讯评分详情" width="680" center>
|
||||
|
|
@ -446,8 +607,9 @@
|
|||
<el-row>[{{ scoreDetail.industryLabel.join(',') }}]</el-row>
|
||||
<el-row justify="space-between">
|
||||
<el-col :span="12">置信度:[{{ scoreDetail.industryConfidence.join(',') }}]</el-col>
|
||||
<el-col :span="12" style="text-align: right">分类评分:<span style="color: #36a4f8">[{{
|
||||
scoreDetail.industryScore.join(',') }}]</span></el-col>
|
||||
<el-col :span="12" style="text-align: right"
|
||||
>分类评分:<span style="color: #36a4f8">[{{ scoreDetail.industryScore.join(',') }}]</span></el-col
|
||||
>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -457,8 +619,9 @@
|
|||
<el-row>[{{ scoreDetail.conceptLabel.join(',') }}]</el-row>
|
||||
<el-row justify="space-between">
|
||||
<el-col :span="12">置信度:[{{ scoreDetail.conceptConfidence.join(',') }}]</el-col>
|
||||
<el-col :span="12" style="text-align: right">概念评分:<span style="color: #36a4f8">[{{
|
||||
scoreDetail.conceptScore.join(',') }}]</span></el-col>
|
||||
<el-col :span="12" style="text-align: right"
|
||||
>概念评分:<span style="color: #36a4f8">[{{ scoreDetail.conceptScore.join(',') }}]</span></el-col
|
||||
>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -468,20 +631,21 @@
|
|||
</el-row>
|
||||
<el-row class="score-detail-row">
|
||||
<el-col :span="12">媒体影响力</el-col>
|
||||
<el-col :span="12" style="text-align: right">评分:<span style="color: #36a4f8">{{
|
||||
scoreDetail.sourceImpact
|
||||
}}</span></el-col>
|
||||
<el-col :span="12" style="text-align: right"
|
||||
>评分:<span style="color: #36a4f8">{{ scoreDetail.sourceImpact }}</span></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row class="score-detail-row">
|
||||
<el-col :span="12">中国股市相关性</el-col>
|
||||
<el-col :span="12" style="text-align: right">置信度:<span style="color: #36a4f8">{{
|
||||
scoreDetail.chinaFactor
|
||||
}}</span></el-col>
|
||||
<el-col :span="12" style="text-align: right"
|
||||
>置信度:<span style="color: #36a4f8">{{ scoreDetail.chinaFactor }}</span></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row class="score-detail-row">
|
||||
<el-col :span="12">资讯质量</el-col>
|
||||
<el-col :span="12" style="text-align: right">评分:<span style="color: #36a4f8">{{
|
||||
scoreDetail.publicOpinionScore }}</span></el-col>
|
||||
<el-col :span="12" style="text-align: right"
|
||||
>评分:<span style="color: #36a4f8">{{ scoreDetail.publicOpinionScore }}</span></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row class="score-detail-row rule">
|
||||
<el-col :span="24">*计算规则</el-col>
|
||||
|
|
@ -489,9 +653,7 @@
|
|||
</el-row>
|
||||
<el-row class="score-detail-row" justify="space-between">
|
||||
<el-col :span="12">资讯评分</el-col>
|
||||
<el-col :span="12" style="color: #36a4f8; text-align: right; font-weight: 700">{{
|
||||
scoreDetail.newsScore
|
||||
}}</el-col>
|
||||
<el-col :span="12" style="color: #36a4f8; text-align: right; font-weight: 700">{{ scoreDetail.newsScore }}</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<template #footer>
|
||||
|
|
@ -534,6 +696,7 @@ import clipboard from 'clipboard';
|
|||
import { Session } from '/@/utils/storage';
|
||||
import recordDialog from './dialog/recordDialog.vue';
|
||||
import { isMobileByWidth } from '/@/utils/Utils';
|
||||
import zTable from './zTable.vue';
|
||||
|
||||
const recordDialogRef = ref();
|
||||
/** 管理后台需求文件0519(V1.1) start */
|
||||
|
|
@ -594,7 +757,7 @@ async function doDeleteNewsFn(item) {
|
|||
getData();
|
||||
}
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
function handleSearch() {
|
||||
|
|
@ -650,20 +813,12 @@ async function getData() {
|
|||
});
|
||||
item.title = highlightTitle(item.title, form.value.keyword);
|
||||
|
||||
// item.companys = [
|
||||
// "英伟达",
|
||||
// "微软",
|
||||
// ]
|
||||
|
||||
// item.labels = [
|
||||
// "新科技-人工智能",
|
||||
// "新科技-人工智能",
|
||||
// ]
|
||||
|
||||
// item.signalNames = [
|
||||
// "信号规则1",
|
||||
// "信号规则2",
|
||||
// ]
|
||||
if (item.clusterNews && item.clusterNews?.length > 0) {
|
||||
item.clusterNews.forEach((clusterItem, clusterIndex) => {
|
||||
clusterItem.childLength = item.clusterNews?.length || 0;
|
||||
clusterItem.clusterIndex = clusterIndex;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
@ -698,7 +853,7 @@ async function doApprovalFn(item, status) {
|
|||
getData();
|
||||
}
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -735,7 +890,7 @@ async function doNewsPublishFn(item, status) {
|
|||
getData();
|
||||
}
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -966,7 +1121,7 @@ async function doRecoverFn(item) {
|
|||
getData();
|
||||
}
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
// 复审
|
||||
|
|
@ -1219,4 +1374,9 @@ onMounted(async () => {
|
|||
display: flex;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
:deep(.el-table td.el-table__cell div) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,300 @@
|
|||
<template>
|
||||
<tableComponents
|
||||
ref="tableRef"
|
||||
:tableData="tableData"
|
||||
style="margin-top: 20px"
|
||||
@sortChange="sortChange"
|
||||
:tableLoading="tableLoading"
|
||||
@currentChange="currentChange"
|
||||
@sizeChange="sizeChange"
|
||||
:showHeader="false"
|
||||
>
|
||||
<el-table-column prop="title" label="标题" align="left" width="480">
|
||||
<template v-slot="scope">
|
||||
<div style="display: flex; flex-direction: column; gap: 5px; padding: 10px 0">
|
||||
<div>
|
||||
<span style="color: red; font-weight: bold; margin-right: 3px" v-if="scope.row.exclusive == 1">[独家]</span>
|
||||
<span class="cursor-pointer" @click="goDetail(1, scope.row, true)" v-html="scope.row.title"></span>
|
||||
</div>
|
||||
|
||||
<div class="labels" v-if="Session.get('userInfoLocal').userType == '00'">
|
||||
<div class="label_item" v-if="scope.row.companyName && scope.row.companyName.length > 0">
|
||||
{{ scope.row.companyName }}
|
||||
</div>
|
||||
<!-- <div v-for="company in scope.row.companys" :key="company" class="label_item">
|
||||
{{ company }}
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div class="labels" v-if="Session.get('userInfoLocal').userType == '00'">
|
||||
<!-- <div v-if="scope.row.conceptLabels && scope.row.conceptLabels.length > 0" class="label_item_box">
|
||||
<div v-for="item in scope.row.conceptLabels" :key="item" class="label_item" style="background-color: #eee6cd">
|
||||
{{ item }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="scope.row.industryLabels && scope.row.industryLabels.length > 0" class="label_item_box">
|
||||
<div v-for="item in scope.row.industryLabels" :key="item" class="label_item" style="background-color: #cfdcf3">
|
||||
{{ item }}
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div style="background-color: #eee6cd" class="label_item" v-if="scope.row.conceptLabels && scope.row.conceptLabels.length > 0">
|
||||
{{ scope.row.conceptLabels[0] }}
|
||||
</div>
|
||||
<div style="background-color: #cfdcf3" class="label_item" v-if="scope.row.industryLabels && scope.row.industryLabels.length > 0">
|
||||
{{ scope.row.industryLabels[0] }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="信号规则" align="center" width="120" v-if="Session.get('userInfoLocal').userType == '00'">
|
||||
<template v-slot="scope">
|
||||
<div v-if="scope.row.ruleName && scope.row.ruleName.length > 0">
|
||||
<div v-for="item in scope.row.ruleName" :key="item" class="label_item">
|
||||
{{ item }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>-</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="媒体来源" align="center" width="120" v-if="Session.get('userInfoLocal').userType == '00'">
|
||||
<template v-slot="scope">
|
||||
<div v-if="scope.row.sourceName">
|
||||
{{ scope.row.sourceName }}
|
||||
</div>
|
||||
<div v-else>-</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="status" align="center" width="120">
|
||||
<template #header>
|
||||
<el-dropdown trigger="click" @command="handleCommand">
|
||||
<div class="el-dropdown-link">
|
||||
<text style="color: rgba(0, 0, 0, 0.85); font-size: 14px">发布状态</text>
|
||||
<el-image :src="icon_table_filter" style="width: 20px; height: 20px"></el-image>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<div v-if="Session.get('userInfoLocal').userType == '00'">
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item :command="null">全部</el-dropdown-item>
|
||||
<el-dropdown-item :command="1">未发布</el-dropdown-item>
|
||||
<el-dropdown-item :command="3">审核中</el-dropdown-item>
|
||||
<el-dropdown-item :command="4">已二审</el-dropdown-item>
|
||||
<el-dropdown-item :command="2">已发布</el-dropdown-item>
|
||||
<el-dropdown-item :command="-1">退改中</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item :command="null">全部</el-dropdown-item>
|
||||
<el-dropdown-item :command="1" v-if="Session.get('userInfoLocal').userType == '00'">未发布</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item :command="3" v-if="Session.get('userInfoLocal').userType != '01'">审核中</el-dropdown-item>
|
||||
<el-dropdown-item :command="4" v-if="Session.get('userInfoLocal').userType == '02' || Session.get('userInfoLocal').userType == '01'"
|
||||
>已二审</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item :command="2">已发布</el-dropdown-item>
|
||||
<el-dropdown-item :command="-1" v-if="Session.get('userInfoLocal').userType == '02' || Session.get('userInfoLocal').userType == '01'"
|
||||
>退改中</el-dropdown-item
|
||||
>
|
||||
</el-dropdown-menu>
|
||||
</div>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
<template v-slot="scope">
|
||||
<!-- 新闻状态 0-草稿 1-未发布 2-已发布 -->
|
||||
<div class="r_point" :style="{ color: '#000' }">
|
||||
<div class="point" :style="{ backgroundColor: scope.row.status == 2 ? '#52C41A' : '#D9D9D9' }"></div>
|
||||
<text v-if="scope.row.status == 0" style="color: rgba(0, 0, 0, 0.65)">草稿</text>
|
||||
<text v-if="scope.row.status == 1" style="color: rgba(0, 0, 0, 0.65)">
|
||||
{{ scope.row.deleted ? '已删除' : '未发布' }}
|
||||
</text>
|
||||
<text v-if="scope.row.status == 2" style="color: rgba(0, 0, 0, 0.65)">已发布</text>
|
||||
<text v-if="scope.row.status == 3" style="color: rgba(0, 0, 0, 0.65)">审核中</text>
|
||||
<text v-if="scope.row.status == 4" style="color: rgba(0, 0, 0, 0.65)">已二审</text>
|
||||
|
||||
<text v-if="scope.row.status == -1 && !scope.row.deleted" style="color: red"> 退改中 </text>
|
||||
<text v-if="scope.row.status == -1 && scope.row.deleted"> 已删除 </text>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" width="120" prop="submitter" label="编辑">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.submitter ? scope.row.submitter : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" width="120" prop="submitter" label="二校" v-if="Session.get('userInfoLocal').userType == '01'">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.submitterSecond ? scope.row.submitterSecond : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" width="120">
|
||||
<template #header>
|
||||
<el-dropdown trigger="click" @command="handleCommandRating">
|
||||
<div class="el-dropdown-link">
|
||||
<text style="color: rgba(0, 0, 0, 0.85); font-size: 14px">编辑评分</text>
|
||||
<el-image :src="icon_table_filter" style="width: 20px; height: 20px"></el-image>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item :command="null">全部</el-dropdown-item>
|
||||
<el-dropdown-item :command="0">无评分</el-dropdown-item>
|
||||
<el-dropdown-item :command="5">5</el-dropdown-item>
|
||||
<el-dropdown-item :command="4">4</el-dropdown-item>
|
||||
<el-dropdown-item :command="3">3</el-dropdown-item>
|
||||
<el-dropdown-item :command="2">2</el-dropdown-item>
|
||||
<el-dropdown-item :command="1">1</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.rating != 0 && scope.row.rating != null ? scope.row.rating : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="score" label="资讯评分" sortable="custom" align="center" width="100">
|
||||
<template v-slot="scope">
|
||||
<div @click="getScoreDetail(scope.row.id)" :class="[{ 'score-active': isAdmin && curScore === scope.row.id }, { 'score-hover': isAdmin }]">
|
||||
{{ scope.row.score }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="publishTime" label="报道时间" sortable="custom" align="center" />
|
||||
<el-table-column prop="updateTime" label="状态变动时间" sortable="custom" align="center">
|
||||
<template v-slot="scope">
|
||||
<div>
|
||||
<div>{{ formatTime(scope.row.updateTime) == formatTime(scope.row.createTime) ? scope.row.publishTime : scope.row.updateTime }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250" fixed="right">
|
||||
<template v-slot="scope">
|
||||
<div class="option">
|
||||
<el-button v-if="scope.row.deleted" type="text" style="margin-left: -10px" @click="doRecoverFn(scope.row)">
|
||||
<text>恢复</text>
|
||||
</el-button>
|
||||
<div v-else style="display: flex; gap: 10px; align-items: center">
|
||||
<el-button type="text" :disabled="scope.row.status != 2" class="copyBtn" @click="copyUrl(scope.row)">复制</el-button>
|
||||
|
||||
<!-- 新闻状态 0-草稿 | 1-未发布 | 2-已发布 | 3-送审 | 4-已二审 | -1-退改中 -->
|
||||
<div v-if="Session.get('userInfoLocal').userType == '00'">
|
||||
<!-- 普通账号 -->
|
||||
<el-button
|
||||
v-if="scope.row.status == 0 || scope.row.status == 1 || scope.row.status == -1"
|
||||
type="text"
|
||||
@click="goDetail(1, scope.row, false)"
|
||||
>编辑</el-button
|
||||
>
|
||||
|
||||
<el-button
|
||||
v-if="scope.row.status == 0 || scope.row.status == 1 || scope.row.status == -1"
|
||||
type="text"
|
||||
@click="doApprovalFn(scope.row, scope.row.status)"
|
||||
>送审</el-button
|
||||
>
|
||||
<el-button v-else-if="scope.row.status == 3" type="text" @click="doApprovalFn(scope.row, scope.row.status)">撤审</el-button>
|
||||
|
||||
<el-button
|
||||
v-if="scope.row.status == 0 || scope.row.status == 1 || scope.row.status == -1"
|
||||
type="text"
|
||||
style="color: #ff1818"
|
||||
@click="doDeleteNewsFn(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</div>
|
||||
<div v-if="Session.get('userInfoLocal').userType == '02'">
|
||||
<el-button v-if="scope.row.status == 4" type="text" @click="doApprovalFn(scope.row, scope.row.status)">撤审</el-button>
|
||||
|
||||
<!-- 二审账号 -->
|
||||
<el-button v-if="scope.row.status == 3" type="text" style="color: #ff1818" @click="doNewReturnFn(scope.row)">退改</el-button>
|
||||
|
||||
<el-button v-if="scope.row.status == 3" type="text" @click="goDetail(1, scope.row, false)">编辑</el-button>
|
||||
|
||||
<el-button v-if="scope.row.status == 3" type="text" @click="doNewCheckFn(scope.row)">复审</el-button>
|
||||
|
||||
<el-button type="text" v-if="scope.row.status == 4" @click="doNewsPublishFn(scope.row, 2)">发布</el-button>
|
||||
</div>
|
||||
<div v-if="Session.get('userInfoLocal').userType == '01'">
|
||||
<!-- 终审账号 -->
|
||||
<el-button v-if="scope.row.status == 3 || scope.row.status == 4" type="text" @click="goDetail(1, scope.row, false)">编辑</el-button>
|
||||
|
||||
<el-button v-if="scope.row.status == 4" type="text" style="color: #ff1818" @click="doNewReturnFn(scope.row)">退改</el-button>
|
||||
|
||||
<el-button type="text" v-if="scope.row.status == 2" @click="doNewsPublishFn(scope.row, 1)">撤稿</el-button>
|
||||
<el-button type="text" v-else-if="scope.row.status != -1 && scope.row.status == 4" @click="doNewsPublishFn(scope.row, 2)"
|
||||
>发布</el-button
|
||||
>
|
||||
|
||||
<el-button v-if="scope.row.status == 3" type="text" style="color: #ff1818; margin-left: 5px" @click="doNewReturnFn(scope.row)"
|
||||
>退改</el-button
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- <el-icon size="16" @click="goRecord(scope.row)">
|
||||
<Tickets />
|
||||
</el-icon> -->
|
||||
</div>
|
||||
<!-- v-if="isAdmin" -->
|
||||
<el-icon
|
||||
v-if="isAdmin || Session.get('userInfoLocal').userType == '02' || Session.get('userInfoLocal').userType == '01'"
|
||||
size="16"
|
||||
@click="goRecord(scope.row)"
|
||||
style="margin-left: 10px"
|
||||
>
|
||||
<Tickets />
|
||||
</el-icon>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</tableComponents>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import tableComponents from '/@/components/tableComponents/index.vue';
|
||||
import { Session } from '/@/utils/storage';
|
||||
|
||||
const props = defineProps({
|
||||
// 列表内容
|
||||
tableData: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
tableLoading: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
defaultCurrentPage: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
/*表格全选框去除空框*/
|
||||
|
||||
.el-table >>> .DisabledSelection .cell .el-checkbox__inner {
|
||||
display: none;
|
||||
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/*表格全选框改为:选择*/
|
||||
|
||||
.el-table >>> .DisabledSelection .cell:before {
|
||||
content: '选择';
|
||||
|
||||
position: absolute;
|
||||
|
||||
left: 7px;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue