2021-08-10 17:15:42 +08:00
|
|
|
|
<template>
|
|
|
|
|
<div class="portrait_page content">
|
2021-08-12 16:21:59 +08:00
|
|
|
|
<div class="header" v-if="type == 'policy'">
|
|
|
|
|
<span class="span">{{ val }}:</span>
|
|
|
|
|
<el-radio
|
|
|
|
|
v-model="queryParams.labelId"
|
|
|
|
|
v-for="item in portraitList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.id"
|
|
|
|
|
border
|
|
|
|
|
@change="handleClick"
|
|
|
|
|
>{{ item.name }}</el-radio
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="header" v-else-if="type == 'policyRead'">
|
|
|
|
|
<span class="span">{{ val }}:</span>
|
|
|
|
|
<el-radio
|
|
|
|
|
v-model="queryParams.attributeId"
|
|
|
|
|
v-for="item in attributeOptions"
|
|
|
|
|
:key="item.value"
|
|
|
|
|
:label="item.value"
|
|
|
|
|
border
|
|
|
|
|
@change="handleClick"
|
|
|
|
|
>{{ item.label }}</el-radio
|
|
|
|
|
>
|
2021-08-10 17:15:42 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="screen_l_b" v-for="item in portraitData" :key="item.id">
|
|
|
|
|
<div class="title text_hidden_one pointer">
|
|
|
|
|
<router-link
|
|
|
|
|
target="_blank"
|
|
|
|
|
:to="{
|
|
|
|
|
path: '/result',
|
2021-08-12 16:21:59 +08:00
|
|
|
|
query: { key: type, id: item.id }
|
2021-08-10 17:15:42 +08:00
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
{{ item.title }}
|
|
|
|
|
</router-link>
|
|
|
|
|
</div>
|
2021-08-12 16:21:59 +08:00
|
|
|
|
<div class="info" v-if="type != 'information'">
|
2021-08-10 17:15:42 +08:00
|
|
|
|
<span>来源:{{ item.source }}</span>
|
|
|
|
|
<span>发布:{{ item.listDate }}</span>
|
|
|
|
|
</div>
|
2021-08-12 16:21:59 +08:00
|
|
|
|
<div class="info" style="justify-content: flex-end;" v-else>
|
|
|
|
|
<span>发布:{{ item.createTime }}</span>
|
|
|
|
|
</div>
|
2021-08-10 17:15:42 +08:00
|
|
|
|
</div>
|
|
|
|
|
<!-- 分页 -->
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="total > 0"
|
|
|
|
|
:total="total"
|
|
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
|
|
@pagination="getPortraitList"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { getPolicyMatch } from '@/api/home/notice';
|
|
|
|
|
import { mapGetters } from 'vuex';
|
|
|
|
|
import { userInfo, getLabelSetting } from '@/api/home/info';
|
2021-08-12 16:21:59 +08:00
|
|
|
|
import { getPolicyRead, getInformation } from '@/api/home/home';
|
2021-08-10 17:15:42 +08:00
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2021-08-12 16:21:59 +08:00
|
|
|
|
type: '',
|
|
|
|
|
val: '',
|
2021-08-10 17:15:42 +08:00
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
2021-08-12 16:21:59 +08:00
|
|
|
|
pageSize: 10
|
2021-08-10 17:15:42 +08:00
|
|
|
|
},
|
|
|
|
|
total: 0,
|
|
|
|
|
portraitList: [], // 企业画像
|
2021-08-12 16:21:59 +08:00
|
|
|
|
// 归口选项
|
|
|
|
|
attributeOptions: [
|
|
|
|
|
{
|
|
|
|
|
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: {
|
|
|
|
|
// 获取企业画像数据列表
|
|
|
|
|
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') {
|
|
|
|
|
getPolicyRead(this.queryParams).then(({ data }) => {
|
|
|
|
|
this.portraitData = data.list;
|
|
|
|
|
this.total = data.total;
|
|
|
|
|
});
|
|
|
|
|
} else if (this.type == 'information') {
|
|
|
|
|
getInformation(this.queryParams).then(({ data }) => {
|
|
|
|
|
this.portraitData = data.list;
|
|
|
|
|
this.total = data.total;
|
|
|
|
|
});
|
|
|
|
|
}
|
2021-08-10 17:15:42 +08:00
|
|
|
|
},
|
|
|
|
|
handleClick() {
|
|
|
|
|
this.getPortraitList();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
if (this.token) {
|
2021-08-12 16:21:59 +08:00
|
|
|
|
console.log();
|
|
|
|
|
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);
|
|
|
|
|
this.portraitList = data.map(item =>
|
|
|
|
|
item.labelList
|
2021-08-10 17:15:42 +08:00
|
|
|
|
? item.labelList.filter(v => v.isHas)[0]
|
2021-08-12 16:21:59 +08:00
|
|
|
|
? item.labelList.filter(v => v.isHas)[0]
|
|
|
|
|
: ''
|
|
|
|
|
: undefined
|
|
|
|
|
);
|
|
|
|
|
this.queryParams.labelId = this.portraitList[0].id;
|
|
|
|
|
this.getPortraitList();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else if (key == 'policyRead') {
|
|
|
|
|
this.queryParams.attributeId = this.attributeOptions[0].value;
|
|
|
|
|
this.getPortraitList();
|
|
|
|
|
} else if (key == 'information') {
|
|
|
|
|
this.getPortraitList();
|
|
|
|
|
} else {
|
|
|
|
|
this.msgError('非法进入');
|
|
|
|
|
}
|
2021-08-10 17:15:42 +08:00
|
|
|
|
} else {
|
2021-08-12 16:21:59 +08:00
|
|
|
|
this.msgError('请先登录');
|
2021-08-10 17:15:42 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.portrait_page {
|
|
|
|
|
margin-top: 30px;
|
|
|
|
|
.header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
height: 90px;
|
|
|
|
|
padding: 30px;
|
|
|
|
|
background-color: #f5f5f5;
|
|
|
|
|
.el-tabs {
|
|
|
|
|
margin-left: 20px;
|
|
|
|
|
/deep/.el-tabs__nav-wrap::after {
|
|
|
|
|
height: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-08-12 16:21:59 +08:00
|
|
|
|
/deep/.el-radio__input {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
2021-08-10 17:15:42 +08:00
|
|
|
|
}
|
|
|
|
|
.screen_l_b {
|
|
|
|
|
height: 110px;
|
|
|
|
|
line-height: 45px;
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
border-bottom: 1px solid #e3e3e3;
|
|
|
|
|
.title {
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
color: #333;
|
|
|
|
|
// text-align: left;
|
|
|
|
|
}
|
|
|
|
|
.info {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: #999;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|