2021-08-10 17:15:42 +08:00
|
|
|
|
<template>
|
2021-08-25 11:37:15 +08:00
|
|
|
|
<div class="portrait_page">
|
|
|
|
|
<headerPage />
|
|
|
|
|
<div class="padding-top content min_h_241">
|
|
|
|
|
<div class="search">
|
|
|
|
|
<div class="search_input" style="display:flex">
|
2021-09-15 09:52:37 +08:00
|
|
|
|
<span v-if="type == 'policy'">企业画像检索</span>
|
2021-08-25 11:37:15 +08:00
|
|
|
|
<span v-if="type == 'policyRead'">政策解读检索</span>
|
|
|
|
|
<span v-if="type == 'information'">资讯快报检索</span>
|
2021-10-22 14:49:18 +08:00
|
|
|
|
<span v-if="type == 'policyNotice'">公示公告检索</span>
|
2021-08-25 11:37:15 +08:00
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.title"
|
|
|
|
|
placeholder="请输入搜索关键字"
|
|
|
|
|
@keyup.enter.native="getPortraitList"
|
2021-09-14 10:47:08 +08:00
|
|
|
|
clearable
|
|
|
|
|
@clear="getPortraitList"
|
2021-08-25 11:37:15 +08:00
|
|
|
|
></el-input>
|
|
|
|
|
<el-button type="warning" @click="getPortraitList">搜索</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="header" v-if="type == 'policy'">
|
|
|
|
|
<span class="span">{{ val }}:</span>
|
|
|
|
|
<el-radio
|
2021-10-26 15:58:47 +08:00
|
|
|
|
size="small"
|
2021-08-25 11:37:15 +08:00
|
|
|
|
v-model="queryParams.labelId"
|
|
|
|
|
v-for="item in portraitList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.id"
|
|
|
|
|
border
|
|
|
|
|
@change="handleClick"
|
2022-04-06 11:35:58 +08:00
|
|
|
|
>{{ item.name }}</el-radio>
|
2021-08-25 11:37:15 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="header" v-else-if="type == 'policyRead'">
|
|
|
|
|
<span class="span">{{ val }}:</span>
|
|
|
|
|
<el-radio
|
2021-10-26 15:58:47 +08:00
|
|
|
|
size="small"
|
2021-08-25 11:37:15 +08:00
|
|
|
|
v-model="queryParams.attribute"
|
|
|
|
|
v-for="item in attributeOptions"
|
|
|
|
|
:key="item.value"
|
|
|
|
|
:label="item.value"
|
|
|
|
|
border
|
|
|
|
|
@change="handleClick"
|
2022-04-06 11:35:58 +08:00
|
|
|
|
>{{ item.label }}</el-radio>
|
2021-08-10 17:15:42 +08:00
|
|
|
|
</div>
|
2021-09-15 09:52:37 +08:00
|
|
|
|
<div class="header" v-else-if="type == 'policyNotice'">
|
|
|
|
|
<span class="span">{{ val }}:</span>
|
|
|
|
|
<el-radio
|
2021-10-26 15:58:47 +08:00
|
|
|
|
size="small"
|
2021-09-15 09:52:37 +08:00
|
|
|
|
v-model="queryParams.labelId"
|
|
|
|
|
v-for="item in policyNoticeOptions"
|
|
|
|
|
:key="item.value"
|
|
|
|
|
:label="item.value"
|
|
|
|
|
border
|
|
|
|
|
@change="handleClick"
|
2022-04-06 11:35:58 +08:00
|
|
|
|
>{{ item.label }}</el-radio>
|
2021-09-15 09:52:37 +08:00
|
|
|
|
</div>
|
2021-08-25 11:37:15 +08:00
|
|
|
|
<div class="screen_l_b" v-for="item in portraitData" :key="item.id">
|
2021-10-21 13:32:51 +08:00
|
|
|
|
<div class="title pointer">
|
|
|
|
|
<div class="con">
|
|
|
|
|
<router-link
|
|
|
|
|
class="text_hidden_one"
|
|
|
|
|
target="_blank"
|
|
|
|
|
:to="{
|
|
|
|
|
path: '/result',
|
|
|
|
|
query: {
|
|
|
|
|
key: type == 'policyNotice' ? 'policy' : type,
|
|
|
|
|
id: item.id
|
|
|
|
|
}
|
|
|
|
|
}"
|
2022-04-11 21:20:23 +08:00
|
|
|
|
>{{ removeBr(item.title) }}</router-link>
|
2021-10-21 13:32:51 +08:00
|
|
|
|
<span class="info">
|
|
|
|
|
<span v-if="type != 'information'">{{ item.listDate }}</span>
|
|
|
|
|
<span v-else>{{ item.createTime }}</span>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2021-08-25 11:37:15 +08:00
|
|
|
|
</div>
|
2021-10-21 13:32:51 +08:00
|
|
|
|
<!-- <div class="info" v-if="type != 'information'">
|
2021-08-25 11:37:15 +08:00
|
|
|
|
<span>来源:{{ item.source }}</span>
|
|
|
|
|
<span>发布:{{ item.listDate }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info" style="justify-content: flex-end;" v-else>
|
|
|
|
|
<span>发布:{{ item.createTime }}</span>
|
2022-04-06 11:35:58 +08:00
|
|
|
|
</div>-->
|
2021-08-10 17:15:42 +08:00
|
|
|
|
</div>
|
2021-08-25 11:37:15 +08:00
|
|
|
|
<div style="text-align: center;margin:30px 0" v-show="!total">
|
|
|
|
|
<div style="height:210px;display: inline-block;color:#999">
|
2022-04-06 11:35:58 +08:00
|
|
|
|
<img style="width:100%;height:100%;" src="@/assets/image/empty.png" alt />
|
2021-08-25 11:37:15 +08:00
|
|
|
|
暂无数据
|
|
|
|
|
</div>
|
2021-08-12 16:21:59 +08:00
|
|
|
|
</div>
|
2021-08-25 11:37:15 +08:00
|
|
|
|
<!-- 分页 -->
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="total > 0"
|
|
|
|
|
:total="total"
|
|
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
|
|
@pagination="getPortraitList"
|
|
|
|
|
/>
|
2021-08-10 17:15:42 +08:00
|
|
|
|
</div>
|
2021-08-25 11:37:15 +08:00
|
|
|
|
<footerPage />
|
2021-08-10 17:15:42 +08:00
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { getPolicyMatch } from '@/api/home/notice';
|
|
|
|
|
import { mapGetters } from 'vuex';
|
|
|
|
|
import { userInfo, getLabelSetting } from '@/api/home/info';
|
2021-09-15 09:52:37 +08:00
|
|
|
|
import { getPolicy, getPolicyRead2, getInformation2 } from '@/api/home/home';
|
2021-08-25 11:37:15 +08:00
|
|
|
|
import footerPage from './components/footer';
|
|
|
|
|
import headerPage from './components/header';
|
2021-08-10 17:15:42 +08:00
|
|
|
|
export default {
|
2021-08-25 11:37:15 +08:00
|
|
|
|
components: {
|
|
|
|
|
footerPage,
|
|
|
|
|
headerPage
|
|
|
|
|
},
|
2021-08-10 17:15:42 +08:00
|
|
|
|
data() {
|
|
|
|
|
return {
|
2021-08-12 16:21:59 +08:00
|
|
|
|
type: '',
|
|
|
|
|
val: '',
|
2021-08-10 17:15:42 +08:00
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
2021-10-26 15:58:47 +08:00
|
|
|
|
pageSize: 15
|
2021-08-10 17:15:42 +08:00
|
|
|
|
},
|
|
|
|
|
total: 0,
|
|
|
|
|
portraitList: [], // 企业画像
|
2021-09-15 09:52:37 +08:00
|
|
|
|
policyNoticeOptions: [
|
|
|
|
|
{
|
|
|
|
|
value: '1415156808053559296',
|
|
|
|
|
label: '政策法规'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '1415156963146338304',
|
|
|
|
|
label: '申报通知'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '1415157002090450944',
|
|
|
|
|
label: '政府公示'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '1415157026115424256',
|
|
|
|
|
label: '公告'
|
|
|
|
|
}
|
2021-10-28 14:18:12 +08:00
|
|
|
|
// {
|
|
|
|
|
// value: '1415157049267982336',
|
|
|
|
|
// label: '其他'
|
|
|
|
|
// }
|
2021-09-15 09:52:37 +08:00
|
|
|
|
],
|
2021-08-12 16:21:59 +08:00
|
|
|
|
// 归口选项
|
|
|
|
|
attributeOptions: [
|
2021-11-05 15:28:59 +08:00
|
|
|
|
{
|
|
|
|
|
value: '',
|
|
|
|
|
label: '不限'
|
|
|
|
|
},
|
2021-08-12 16:21:59 +08:00
|
|
|
|
{
|
|
|
|
|
value: 'KJJ',
|
|
|
|
|
label: '科技'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'JXJ',
|
|
|
|
|
label: '经信'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'FGW',
|
|
|
|
|
label: '发改'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'OTHER',
|
|
|
|
|
label: '其他'
|
|
|
|
|
}
|
|
|
|
|
],
|
2021-08-10 17:15:42 +08:00
|
|
|
|
portraitData: [], // 企业画像绑定的政策列表
|
|
|
|
|
portraitTotal: 0
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
...mapGetters(['token'])
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2022-04-11 21:20:23 +08:00
|
|
|
|
removeBr(str) {
|
|
|
|
|
return str && str.replaceAll('<br>', '')
|
|
|
|
|
},
|
2021-08-10 17:15:42 +08:00
|
|
|
|
// 获取企业画像数据列表
|
|
|
|
|
getPortraitList() {
|
2021-08-12 16:21:59 +08:00
|
|
|
|
if (this.type == 'policy') {
|
|
|
|
|
getPolicyMatch(this.queryParams).then(({ data }) => {
|
|
|
|
|
this.portraitData = data.list;
|
|
|
|
|
this.total = data.total;
|
|
|
|
|
});
|
|
|
|
|
} else if (this.type == 'policyRead') {
|
2021-08-25 11:37:15 +08:00
|
|
|
|
getPolicyRead2(this.queryParams).then(({ data }) => {
|
2021-08-12 16:21:59 +08:00
|
|
|
|
this.portraitData = data.list;
|
|
|
|
|
this.total = data.total;
|
|
|
|
|
});
|
|
|
|
|
} else if (this.type == 'information') {
|
2021-08-25 11:37:15 +08:00
|
|
|
|
getInformation2(this.queryParams).then(({ data }) => {
|
2021-08-12 16:21:59 +08:00
|
|
|
|
this.portraitData = data.list;
|
|
|
|
|
this.total = data.total;
|
|
|
|
|
});
|
2021-09-15 09:52:37 +08:00
|
|
|
|
} else if (this.type == 'policyNotice') {
|
|
|
|
|
getPolicy(this.queryParams).then(({ data }) => {
|
|
|
|
|
this.portraitData = data.list;
|
|
|
|
|
this.total = data.total;
|
|
|
|
|
});
|
2021-08-12 16:21:59 +08:00
|
|
|
|
}
|
2021-08-10 17:15:42 +08:00
|
|
|
|
},
|
|
|
|
|
handleClick() {
|
|
|
|
|
this.getPortraitList();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
2021-08-23 16:31:40 +08:00
|
|
|
|
// if (this.token) {
|
|
|
|
|
const { key, val } = this.$route.query;
|
|
|
|
|
this.type = key;
|
|
|
|
|
this.val = val;
|
|
|
|
|
if (key == 'policy') {
|
|
|
|
|
userInfo().then(({ data }) => {
|
|
|
|
|
if (data.companyId) {
|
|
|
|
|
getLabelSetting({ companyId: data.companyId }).then(({ data }) => {
|
|
|
|
|
if (data.length) {
|
|
|
|
|
console.log(data);
|
2021-08-24 14:18:22 +08:00
|
|
|
|
// this.portraitList = data.map(item =>
|
|
|
|
|
// item.labelList
|
|
|
|
|
// ? item.labelList.filter(v => v.isHas)[0]
|
|
|
|
|
// ? item.labelList.filter(v => v.isHas)[0]
|
|
|
|
|
// : ''
|
|
|
|
|
// : undefined
|
|
|
|
|
// );
|
|
|
|
|
const arrs = data.map(item =>
|
|
|
|
|
item.labelList ? item.labelList.filter(v => v.isHas) : undefined
|
2021-08-23 16:31:40 +08:00
|
|
|
|
);
|
2021-08-24 14:18:22 +08:00
|
|
|
|
arrs.map(item => {
|
|
|
|
|
this.portraitList = [...this.portraitList, ...item];
|
|
|
|
|
});
|
2021-08-23 16:31:40 +08:00
|
|
|
|
this.queryParams.labelId = this.portraitList[0].id;
|
|
|
|
|
this.getPortraitList();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else if (key == 'policyRead') {
|
2021-08-25 11:37:15 +08:00
|
|
|
|
this.queryParams.attribute = this.attributeOptions[0].value;
|
2021-08-23 16:31:40 +08:00
|
|
|
|
this.getPortraitList();
|
|
|
|
|
} else if (key == 'information') {
|
|
|
|
|
this.getPortraitList();
|
2021-09-15 09:52:37 +08:00
|
|
|
|
} else if (key == 'policyNotice') {
|
2022-04-11 21:20:23 +08:00
|
|
|
|
if (this.$route.query.labelId) {
|
|
|
|
|
this.queryParams.labelId = this.$route.query.labelId
|
|
|
|
|
} else {
|
|
|
|
|
this.queryParams.labelId = this.policyNoticeOptions[0].value;
|
|
|
|
|
}
|
2021-09-15 09:52:37 +08:00
|
|
|
|
this.getPortraitList();
|
2021-08-10 17:15:42 +08:00
|
|
|
|
} else {
|
2021-08-23 16:31:40 +08:00
|
|
|
|
this.msgError('非法进入');
|
2021-08-10 17:15:42 +08:00
|
|
|
|
}
|
2021-08-23 16:31:40 +08:00
|
|
|
|
// } else {
|
|
|
|
|
// this.msgError('请先登录');
|
|
|
|
|
// }
|
2021-08-10 17:15:42 +08:00
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.portrait_page {
|
2021-08-25 11:37:15 +08:00
|
|
|
|
.padding-top {
|
2021-10-21 13:32:51 +08:00
|
|
|
|
padding-top: 25px;
|
2021-08-25 11:37:15 +08:00
|
|
|
|
.search {
|
|
|
|
|
text-align: center;
|
2021-10-21 18:24:18 +08:00
|
|
|
|
margin-bottom: 25px;
|
2021-08-25 11:37:15 +08:00
|
|
|
|
.search_input {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
/deep/.el-input--medium .el-input__inner {
|
|
|
|
|
height: 40px;
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
border-radius: 6px 0 0 6px;
|
|
|
|
|
border: 1px solid #ffa32c;
|
|
|
|
|
border-right: 0;
|
|
|
|
|
}
|
|
|
|
|
span:nth-child(1) {
|
|
|
|
|
color: #333;
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
margin-right: 21px;
|
|
|
|
|
}
|
|
|
|
|
.el-input {
|
|
|
|
|
width: 304px;
|
|
|
|
|
}
|
|
|
|
|
.el-button {
|
|
|
|
|
border-radius: 0 6px 6px 0;
|
|
|
|
|
background-color: #ffa32c;
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
}
|
2021-08-10 17:15:42 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2021-08-25 11:37:15 +08:00
|
|
|
|
.header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2021-10-26 15:58:47 +08:00
|
|
|
|
height: 50px;
|
|
|
|
|
padding: 0 30px;
|
2021-08-25 11:37:15 +08:00
|
|
|
|
background-color: #f5f5f5;
|
|
|
|
|
.el-tabs {
|
|
|
|
|
margin-left: 20px;
|
|
|
|
|
/deep/.el-tabs__nav-wrap::after {
|
|
|
|
|
height: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/deep/.el-radio__input {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
2021-10-26 15:58:47 +08:00
|
|
|
|
/deep/.el-radio {
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
}
|
2021-08-10 17:15:42 +08:00
|
|
|
|
}
|
2021-08-25 11:37:15 +08:00
|
|
|
|
|
|
|
|
|
.screen_l_b {
|
|
|
|
|
padding: 0 20px;
|
2021-10-26 15:58:47 +08:00
|
|
|
|
height: 44px;
|
|
|
|
|
line-height: 44px;
|
2021-10-21 13:32:51 +08:00
|
|
|
|
// display: flex;
|
2021-08-25 11:37:15 +08:00
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
border-bottom: 1px solid #e3e3e3;
|
|
|
|
|
|
|
|
|
|
.title {
|
2021-10-21 13:32:51 +08:00
|
|
|
|
height: 100%;
|
2021-08-25 11:37:15 +08:00
|
|
|
|
font-size: 18px;
|
|
|
|
|
color: #333;
|
2021-10-21 13:32:51 +08:00
|
|
|
|
// margin-bottom: 16px;
|
2021-08-25 11:37:15 +08:00
|
|
|
|
text-align: left;
|
2021-10-21 13:32:51 +08:00
|
|
|
|
.con {
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
2021-08-25 11:37:15 +08:00
|
|
|
|
}
|
|
|
|
|
.info {
|
2021-10-21 13:32:51 +08:00
|
|
|
|
float: right;
|
|
|
|
|
flex: 0 0 150px;
|
2021-08-25 11:37:15 +08:00
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: #999;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
}
|
2021-08-10 17:15:42 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|