refactor(richedit): 重构信号规则选择逻辑,优化表单绑定和交互
- 将信号规则选择从两个独立列表合并为共享列表 - 使用includeRuleIds和excludeRuleIds替代原来的signalId1/signalId2 - 添加互斥选择逻辑,选择包含规则时禁用排除规则,反之亦然 - 更新API调用参数以匹配新的数据结构
This commit is contained in:
parent
21a5412237
commit
0f04c859e2
|
|
@ -3,12 +3,17 @@
|
|||
<div class="colHeader">
|
||||
<div class="page_title">资讯精选</div>
|
||||
|
||||
<div style="width: 100%; display: flex;margin-top: 20px;">
|
||||
<div style="width: 100%; display: flex; margin-top: 20px">
|
||||
<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>
|
||||
|
|
@ -16,81 +21,151 @@
|
|||
|
||||
<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>
|
||||
</el-input>
|
||||
</el-space>
|
||||
|
||||
|
||||
<div class="colHeader-right-2" style="gap: 10px">
|
||||
<span>信号规则:</span>
|
||||
<el-select v-model="signalId1" clearable placeholder="含任一信号规则" multiple size="large"
|
||||
style="width: 180px" filterable @change="signalChange($event, 1)">
|
||||
|
||||
<el-option v-for="item in signalRulesList1" :key="item.value" :value="item.value"
|
||||
:label="item.label"></el-option>
|
||||
<el-select
|
||||
v-model="form.includeRuleIds"
|
||||
:disabled="excludeRuleIds?.length > 0"
|
||||
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" :label="item.ruleName"></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="form.excludeRuleIds"
|
||||
:disabled="includeRuleIds?.length > 0"
|
||||
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" :label="item.ruleName"></el-option>
|
||||
</el-select>
|
||||
|
||||
<el-select v-model="signalId2" clearable placeholder="不含任一信号规则" multiple size="large"
|
||||
style="width: 180px" filterable @change="signalChange($event, 2)">
|
||||
<el-option v-for="item in signalRulesList2" :key="item.value" :value="item.value"
|
||||
:label="item.label"></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>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="colHeader-right-2" style="gap: 10px;">
|
||||
<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" clearable placeholder="请选择" multiple size="large"
|
||||
style="width: 180px" filterable @change="handleSearch">
|
||||
<el-select
|
||||
v-model="form.companyName"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
multiple
|
||||
size="large"
|
||||
style="width: 180px"
|
||||
filterable
|
||||
@change="handleSearch"
|
||||
>
|
||||
<el-option>是</el-option>
|
||||
<el-option>否</el-option>
|
||||
</el-select>
|
||||
|
||||
<span>独家资源:</span>
|
||||
<el-select v-model="form.exclusive" clearable placeholder="是否独家搜索" multiple size="large"
|
||||
style="width: 180px" filterable @change="handleSearch">
|
||||
<el-select
|
||||
v-model="form.exclusive"
|
||||
clearable
|
||||
placeholder="是否独家搜索"
|
||||
multiple
|
||||
size="large"
|
||||
style="width: 180px"
|
||||
filterable
|
||||
@change="handleSearch"
|
||||
>
|
||||
<el-option>是</el-option>
|
||||
<el-option>否</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>
|
||||
|
|
@ -101,32 +176,34 @@
|
|||
</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 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; 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>
|
||||
<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">
|
||||
<div class="label_item" v-if="scope.row.companyName && scope.row.companyName.length > 0">
|
||||
{{ scope.row.companyName }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="labels">
|
||||
<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>
|
||||
|
|
@ -136,7 +213,7 @@
|
|||
|
||||
<el-table-column label="信号规则" align="center" width="120">
|
||||
<template v-slot="scope">
|
||||
<div v-for="item in scope.row.signalNames" :key="item" class="label_item">
|
||||
<div v-for="item in scope.row.ruleName" :key="item" class="label_item">
|
||||
{{ item }}
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -165,8 +242,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)">未发布</text>
|
||||
<text v-if="scope.row.status == 2" style="color: rgba(0, 0, 0, 0.65)">已发布</text>
|
||||
|
|
@ -210,8 +286,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>
|
||||
|
|
@ -220,16 +295,14 @@
|
|||
<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 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>
|
||||
<!--
|
||||
<el-button v-if="scope.row.deleted" type="text" style="margin-left: 10px"
|
||||
@click="doRecoverFn(scope.row)">
|
||||
|
|
@ -265,9 +338,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>
|
||||
|
|
@ -278,8 +358,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>
|
||||
|
|
@ -289,8 +370,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>
|
||||
|
|
@ -300,20 +382,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>
|
||||
|
|
@ -321,9 +404,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>
|
||||
|
|
@ -354,7 +435,8 @@ import {
|
|||
getColumn,
|
||||
getNewsScore,
|
||||
getIndustryHierarchy,
|
||||
getTagSource, getSignalRules,
|
||||
getTagSource,
|
||||
getSignalRules,
|
||||
doRecover,
|
||||
} from '/@/api/api';
|
||||
import { highlightTitle } from '/@/utils/highlight';
|
||||
|
|
@ -422,7 +504,7 @@ async function doDeleteNewsFn(item) {
|
|||
getData();
|
||||
}
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
function handleSearch() {
|
||||
|
|
@ -458,6 +540,8 @@ async function getData() {
|
|||
size: tableData.size,
|
||||
dateline_from: _sdate || undefined,
|
||||
dateline_to: _edate || undefined,
|
||||
includeRuleIds: includeRuleIds.value,
|
||||
excludeRuleIds: excludeRuleIds.value,
|
||||
});
|
||||
tableLoading.value = false;
|
||||
if (code == 200) {
|
||||
|
|
@ -512,18 +596,18 @@ async function doApprovalFn(item, status) {
|
|||
let { code } =
|
||||
status == 3
|
||||
? await doNewRevoke({
|
||||
id: item.id,
|
||||
})
|
||||
id: item.id,
|
||||
})
|
||||
: await doNewSubmit({
|
||||
id: item.id,
|
||||
});
|
||||
id: item.id,
|
||||
});
|
||||
if (code == 200) {
|
||||
ElMessage.success('操作成功');
|
||||
drawer.value = false;
|
||||
getData();
|
||||
}
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -547,20 +631,20 @@ async function doNewsPublishFn(item, status) {
|
|||
let { code } =
|
||||
status == 1
|
||||
? await doNewRevoke({
|
||||
id: item.id,
|
||||
status: status,
|
||||
})
|
||||
id: item.id,
|
||||
status: status,
|
||||
})
|
||||
: await doNewsPublish({
|
||||
id: item.id,
|
||||
status: status,
|
||||
});
|
||||
id: item.id,
|
||||
status: status,
|
||||
});
|
||||
if (code == 200) {
|
||||
ElMessage.success('操作成功');
|
||||
drawer.value = false;
|
||||
getData();
|
||||
}
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -780,76 +864,34 @@ async function doRecoverFn(item) {
|
|||
getData();
|
||||
}
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
function recordDialogClose() { }
|
||||
|
||||
|
||||
function recordDialogClose() {}
|
||||
|
||||
// 含任一信号规则
|
||||
const signalRulesList1 = ref([
|
||||
{
|
||||
label: '全部',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '全部1',
|
||||
value: 2,
|
||||
},
|
||||
])
|
||||
const signalRulesList = ref();
|
||||
|
||||
// 不含任一信号规则
|
||||
const signalRulesList2 = ref([
|
||||
{
|
||||
label: '全部',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '全部1',
|
||||
value: 2,
|
||||
},
|
||||
])
|
||||
|
||||
async function getSignalRulesFn(type) {
|
||||
let { code, data } = await getSignalRules({
|
||||
});
|
||||
async function getSignalRulesFn() {
|
||||
let { code, data } = await getSignalRules({});
|
||||
if (code == 200) {
|
||||
if (type == 1) {
|
||||
signalRulesList1.value = data.map((item: any) => {
|
||||
return {
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
};
|
||||
});
|
||||
} else {
|
||||
signalRulesList2.value = data.map((item: any) => {
|
||||
return {
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
signalRulesList.value = data;
|
||||
}
|
||||
}
|
||||
|
||||
const signalId1 = ref([])
|
||||
const signalId2 = ref([])
|
||||
const includeRuleIds = ref('');
|
||||
const excludeRuleIds = ref('');
|
||||
|
||||
function signalChange(event, type) {
|
||||
console.log("🚀 ~ signalChange ~ event:", event)
|
||||
console.log('🚀 ~ signalChange ~ event:', event);
|
||||
if (type == 1) {
|
||||
form.value.signalId1 = signalId1.value;
|
||||
includeRuleIds.value = event.join(',');
|
||||
} else {
|
||||
form.value.signalId2 = signalId2.value;
|
||||
excludeRuleIds.value = event.join(',');
|
||||
}
|
||||
|
||||
getData()
|
||||
getData();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 页面加载时
|
||||
onMounted(async () => {
|
||||
if (isMobileByWidth() && Session.get('userInfoLocal').userType == '01') {
|
||||
|
|
@ -877,9 +919,7 @@ onMounted(async () => {
|
|||
});
|
||||
}
|
||||
|
||||
getSignalRulesFn(0);
|
||||
getSignalRulesFn(1);
|
||||
|
||||
getSignalRulesFn();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -992,9 +1032,9 @@ onMounted(async () => {
|
|||
|
||||
.label_item {
|
||||
height: 24px;
|
||||
background: #F6F6F6;
|
||||
background: #f6f6f6;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #E2E2E2;
|
||||
border: 1px solid #e2e2e2;
|
||||
padding: 0 5px;
|
||||
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
|
|
|
|||
|
|
@ -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,44 +58,74 @@
|
|||
</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>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 普通管理员的筛选 end -->
|
||||
<div style="width: 100%; display: flex;margin-top: 20px;" v-else>
|
||||
<div style="width: 100%; display: flex; margin-top: 20px" v-else>
|
||||
<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>
|
||||
|
|
@ -82,81 +133,151 @@
|
|||
|
||||
<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>
|
||||
</el-input>
|
||||
</el-space>
|
||||
|
||||
|
||||
<div class="colHeader-right-2" style="gap: 10px">
|
||||
<span>信号规则:</span>
|
||||
<el-select v-model="signalId1" clearable placeholder="含任一信号规则" multiple size="large"
|
||||
style="width: 180px" filterable @change="signalChange($event, 1)">
|
||||
|
||||
<el-option v-for="item in signalRulesList1" :key="item.value" :value="item.value"
|
||||
:label="item.label"></el-option>
|
||||
<el-select
|
||||
v-model="form.includeRuleIds"
|
||||
:disabled="excludeRuleIds?.length > 0"
|
||||
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" :label="item.ruleName"></el-option>
|
||||
</el-select>
|
||||
|
||||
<el-select v-model="signalId2" clearable placeholder="不含任一信号规则" multiple size="large"
|
||||
style="width: 180px" filterable @change="signalChange($event, 2)">
|
||||
<el-option v-for="item in signalRulesList2" :key="item.value" :value="item.value"
|
||||
:label="item.label"></el-option>
|
||||
<el-select
|
||||
v-model="form.excludeRuleIds"
|
||||
:disabled="includeRuleIds?.length > 0"
|
||||
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" :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>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="colHeader-right-2" style="gap: 10px;">
|
||||
<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" clearable placeholder="请选择" multiple size="large"
|
||||
style="width: 180px" filterable @change="handleSearch">
|
||||
<el-select
|
||||
v-model="form.companyName"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
multiple
|
||||
size="large"
|
||||
style="width: 180px"
|
||||
filterable
|
||||
@change="handleSearch"
|
||||
>
|
||||
<el-option>是</el-option>
|
||||
<el-option>否</el-option>
|
||||
</el-select>
|
||||
|
||||
<span>独家资源:</span>
|
||||
<el-select v-model="form.exclusive" clearable placeholder="是否独家搜索" multiple size="large"
|
||||
style="width: 180px" filterable @change="handleSearch">
|
||||
<el-select
|
||||
v-model="form.exclusive"
|
||||
clearable
|
||||
placeholder="是否独家搜索"
|
||||
multiple
|
||||
size="large"
|
||||
style="width: 180px"
|
||||
filterable
|
||||
@change="handleSearch"
|
||||
>
|
||||
<el-option>是</el-option>
|
||||
<el-option>否</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>
|
||||
|
|
@ -167,16 +288,21 @@
|
|||
</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 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; 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>
|
||||
<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'">
|
||||
|
|
@ -189,31 +315,32 @@
|
|||
</div>
|
||||
|
||||
<div class="labels" v-if="Session.get('userInfoLocal').userType == '00'">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</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-for="item in scope.row.signalNames" :key="item" class="label_item">
|
||||
<div v-for="item in scope.row.ruleName" :key="item" class="label_item">
|
||||
{{ item }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="媒体来源" align="center" width="120" prop="sourceName"
|
||||
v-if="Session.get('userInfoLocal').userType == '00'"></el-table-column>
|
||||
<el-table-column
|
||||
label="媒体来源"
|
||||
align="center"
|
||||
width="120"
|
||||
prop="sourceName"
|
||||
v-if="Session.get('userInfoLocal').userType == '00'"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column prop="status" align="center" width="120">
|
||||
<template #header>
|
||||
|
|
@ -236,16 +363,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>
|
||||
|
|
@ -254,8 +383,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 ? '已删除' : '未发布' }}
|
||||
|
|
@ -275,8 +403,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>
|
||||
|
|
@ -310,8 +437,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>
|
||||
|
|
@ -320,72 +446,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)">
|
||||
|
|
@ -395,7 +520,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>
|
||||
|
|
@ -404,9 +532,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>
|
||||
|
|
@ -417,8 +552,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>
|
||||
|
|
@ -428,8 +564,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>
|
||||
|
|
@ -439,20 +576,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>
|
||||
|
|
@ -460,9 +598,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>
|
||||
|
|
@ -497,7 +633,7 @@ import {
|
|||
doRecover,
|
||||
doNewCheck,
|
||||
doNewReturn,
|
||||
getSignalRules
|
||||
getSignalRules,
|
||||
} from '/@/api/api';
|
||||
import { highlightTitle } from '/@/utils/highlight';
|
||||
import clipboard from 'clipboard';
|
||||
|
|
@ -564,7 +700,7 @@ async function doDeleteNewsFn(item) {
|
|||
getData();
|
||||
}
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
function handleSearch() {
|
||||
|
|
@ -601,6 +737,8 @@ async function getData() {
|
|||
dateline_from: _sdate || undefined,
|
||||
dateline_to: _edate || undefined,
|
||||
range: Session.get('userInfoLocal').userType == '01' ? 'review' : Session.get('userInfoLocal').userType == '02' ? 'secondReview' : 'all',
|
||||
includeRuleIds: includeRuleIds.value,
|
||||
excludeRuleIds: excludeRuleIds.value,
|
||||
});
|
||||
tableLoading.value = false;
|
||||
if (code == 200) {
|
||||
|
|
@ -633,8 +771,6 @@ async function getData() {
|
|||
// "信号规则2",
|
||||
// ]
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
tableLoading.value = false;
|
||||
|
|
@ -657,18 +793,18 @@ async function doApprovalFn(item, status) {
|
|||
let { code } =
|
||||
status == 3 || status == 4
|
||||
? await doNewRevoke({
|
||||
id: item.id,
|
||||
})
|
||||
id: item.id,
|
||||
})
|
||||
: await doNewSubmit({
|
||||
id: item.id,
|
||||
});
|
||||
id: item.id,
|
||||
});
|
||||
if (code == 200) {
|
||||
ElMessage.success('操作成功');
|
||||
drawer.value = false;
|
||||
getData();
|
||||
}
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -692,20 +828,20 @@ async function doNewsPublishFn(item, status) {
|
|||
let { code } =
|
||||
status == 1
|
||||
? await doNewRevoke({
|
||||
id: item.id,
|
||||
status: status,
|
||||
})
|
||||
id: item.id,
|
||||
status: status,
|
||||
})
|
||||
: await doNewsPublish({
|
||||
id: item.id,
|
||||
status: status,
|
||||
});
|
||||
id: item.id,
|
||||
status: status,
|
||||
});
|
||||
if (code == 200) {
|
||||
ElMessage.success('操作成功');
|
||||
drawer.value = false;
|
||||
getData();
|
||||
}
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -840,7 +976,9 @@ const isScoreShow = ref(false);
|
|||
const curScore = ref(0);
|
||||
const scoreDetail = ref<any>({});
|
||||
const isAdmin = computed(() => {
|
||||
return route.query.admin == 'superman' || Session.get('userInfoLocal').userType == '02' || Session.get('userInfoLocal').userType == '01' ? true : false;
|
||||
return route.query.admin == 'superman' || Session.get('userInfoLocal').userType == '02' || Session.get('userInfoLocal').userType == '01'
|
||||
? true
|
||||
: false;
|
||||
});
|
||||
async function getScoreDetail(id: any) {
|
||||
if (!isAdmin.value) return;
|
||||
|
|
@ -925,7 +1063,7 @@ async function doRecoverFn(item) {
|
|||
getData();
|
||||
}
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
// 复审
|
||||
|
|
@ -949,8 +1087,7 @@ async function doNewReturnFn(item) {
|
|||
}
|
||||
}
|
||||
|
||||
// 含任一信号规则
|
||||
const signalRulesList1 = ref([
|
||||
const signalRulesList = ref([
|
||||
{
|
||||
label: '全部',
|
||||
value: 1,
|
||||
|
|
@ -959,58 +1096,32 @@ const signalRulesList1 = ref([
|
|||
label: '全部1',
|
||||
value: 2,
|
||||
},
|
||||
])
|
||||
]);
|
||||
|
||||
// 不含任一信号规则
|
||||
const signalRulesList2 = ref([
|
||||
{
|
||||
label: '全部',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '全部1',
|
||||
value: 2,
|
||||
},
|
||||
])
|
||||
|
||||
async function getSignalRulesFn(type) {
|
||||
let { code, data } = await getSignalRules({
|
||||
});
|
||||
async function getSignalRulesFn() {
|
||||
let { code, data } = await getSignalRules({});
|
||||
if (code == 200) {
|
||||
if (type == 1) {
|
||||
signalRulesList1.value = data.map((item: any) => {
|
||||
return {
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
};
|
||||
});
|
||||
} else {
|
||||
signalRulesList2.value = data.map((item: any) => {
|
||||
return {
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
signalRulesList.value = data;
|
||||
}
|
||||
}
|
||||
|
||||
const signalId1 = ref([])
|
||||
const signalId2 = ref([])
|
||||
const includeRuleIds = ref('');
|
||||
const excludeRuleIds = ref('');
|
||||
|
||||
function signalChange(event, type) {
|
||||
console.log("🚀 ~ signalChange ~ event:", event)
|
||||
console.log('🚀 ~ signalChange ~ event:', event);
|
||||
if (type == 1) {
|
||||
form.value.signalId1 = signalId1.value;
|
||||
// form.value.signalId1 = signalId1.value;
|
||||
includeRuleIds.value = event.join(',');
|
||||
excludeRuleIds.value = null;
|
||||
} else {
|
||||
form.value.signalId2 = signalId2.value;
|
||||
// form.value.signalId2 = signalId2.value;
|
||||
excludeRuleIds.value = event.join(',');
|
||||
includeRuleIds.value = null;
|
||||
}
|
||||
|
||||
getData()
|
||||
getData();
|
||||
}
|
||||
|
||||
|
||||
// 页面加载时
|
||||
onMounted(async () => {
|
||||
if (isMobileByWidth() && (Session.get('userInfoLocal').userType == '01' || Session.get('userInfoLocal').userType == '02')) {
|
||||
|
|
@ -1038,8 +1149,7 @@ onMounted(async () => {
|
|||
});
|
||||
}
|
||||
if (Session.get('userInfoLocal').userType == '00') {
|
||||
getSignalRulesFn(0);
|
||||
getSignalRulesFn(1);
|
||||
getSignalRulesFn();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
@ -1153,9 +1263,9 @@ onMounted(async () => {
|
|||
|
||||
.label_item {
|
||||
height: 24px;
|
||||
background: #F6F6F6;
|
||||
background: #f6f6f6;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #E2E2E2;
|
||||
border: 1px solid #e2e2e2;
|
||||
padding: 0 5px;
|
||||
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
|
|
|
|||
Loading…
Reference in New Issue