fixed some bugs
This commit is contained in:
BIN
jiace(414).zip
Normal file
BIN
jiace(414).zip
Normal file
Binary file not shown.
@ -2,26 +2,26 @@ import { handlePic } from '@/api/home/notice';
|
||||
export let urlList = [
|
||||
'http://ahchjkq.hefei.gov.cn/',
|
||||
'http://bhkxc.hefei.gov.cn/',
|
||||
'http://cxjsj.hefei.gov.cn/index.html',
|
||||
'http://cxjsj.hefei.gov.cn/',
|
||||
'http://drc.hefei.gov.cn/',
|
||||
'http://gxq.hefei.gov.cn/',
|
||||
'http://hetda.hefei.gov.cn/',
|
||||
'http://hfxz.hefei.gov.cn/index.html',
|
||||
'http://jxj.hefei.gov.cn/index.html',
|
||||
'http://hfxz.hefei.gov.cn/',
|
||||
'http://jxj.hefei.gov.cn/',
|
||||
'http://kjj.hefei.gov.cn/',
|
||||
'http://rsj.hefei.gov.cn/',
|
||||
'http://swj.hefei.gov.cn/',
|
||||
'http://sjzyj.hefei.gov.cn/',
|
||||
'http://www.ahfeixi.gov.cn/',
|
||||
'http://www.ahhfly.gov.cn/index.html',
|
||||
'http://www.baohe.gov.cn/index.html',
|
||||
'http://www.ahhfly.gov.cn/',
|
||||
'http://www.baohe.gov.cn/',
|
||||
'http://www.changfeng.gov.cn/',
|
||||
'http://www.chaohu.gov.cn/',
|
||||
'http://www.feidong.gov.cn/index.html',
|
||||
'http://www.feidong.gov.cn/',
|
||||
'http://www.hefei.gov.cn/',
|
||||
'http://wlj.hefei.gov.cn/index.html',
|
||||
'http://wlj.hefei.gov.cn/',
|
||||
'http://www.hfyaohai.gov.cn/',
|
||||
'http://www.hfss.gov.cn/index.html',
|
||||
'http://www.hfss.gov.cn/',
|
||||
'http://www.lj.gov.cn/'
|
||||
];
|
||||
export function formatRichText(dowUrl, id, url) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
<headerPage />
|
||||
<div class="padding-top content min_h_241">
|
||||
<div class="search">
|
||||
<div class="search_input" style="display:flex">
|
||||
<div class="search_input" style="display: flex">
|
||||
<span v-if="type == 'policy'">企业画像检索</span>
|
||||
<span v-if="type == 'policyRead'">政策解读检索</span>
|
||||
<span v-if="type == 'information'">资讯快报检索</span>
|
||||
@ -28,7 +28,8 @@
|
||||
:label="item.id"
|
||||
border
|
||||
@change="handleClick"
|
||||
>{{ item.name }}</el-radio>
|
||||
>{{ item.name }}</el-radio
|
||||
>
|
||||
</div>
|
||||
<div class="header" v-else-if="type == 'policyRead'">
|
||||
<span class="span">{{ val }}:</span>
|
||||
@ -40,7 +41,8 @@
|
||||
:label="item.value"
|
||||
border
|
||||
@change="handleClick"
|
||||
>{{ item.label }}</el-radio>
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
</div>
|
||||
<div class="header" v-else-if="type == 'policyNotice'">
|
||||
<span class="span">{{ val }}:</span>
|
||||
@ -52,7 +54,8 @@
|
||||
:label="item.value"
|
||||
border
|
||||
@change="handleClick"
|
||||
>{{ item.label }}</el-radio>
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
</div>
|
||||
<div class="screen_l_b" v-for="item in portraitData" :key="item.id">
|
||||
<div class="title pointer">
|
||||
@ -64,10 +67,11 @@
|
||||
path: '/result',
|
||||
query: {
|
||||
key: type == 'policyNotice' ? 'policy' : type,
|
||||
id: item.id
|
||||
}
|
||||
id: item.id,
|
||||
},
|
||||
}"
|
||||
>{{ removeBr(item.title) }}</router-link>
|
||||
>{{ removeBr(item.title) }}</router-link
|
||||
>
|
||||
<span class="info">
|
||||
<span v-if="type != 'information'">{{ item.listDate }}</span>
|
||||
<span v-else>{{ item.createTime }}</span>
|
||||
@ -82,9 +86,13 @@
|
||||
<span>发布:{{ item.createTime }}</span>
|
||||
</div>-->
|
||||
</div>
|
||||
<div style="text-align: center;margin:30px 0" v-show="!total">
|
||||
<div style="height:210px;display: inline-block;color:#999">
|
||||
<img style="width:100%;height:100%;" src="@/assets/image/empty.png" alt />
|
||||
<div style="text-align: center; margin: 30px 0" v-show="!total">
|
||||
<div style="height: 210px; display: inline-block; color: #999">
|
||||
<img
|
||||
style="width: 100%; height: 100%"
|
||||
src="@/assets/image/empty.png"
|
||||
alt
|
||||
/>
|
||||
暂无数据
|
||||
</div>
|
||||
</div>
|
||||
@ -108,10 +116,11 @@ import { userInfo, getLabelSetting } from '@/api/home/info';
|
||||
import { getPolicy, getPolicyRead2, getInformation2 } from '@/api/home/home';
|
||||
import footerPage from './components/footer';
|
||||
import headerPage from './components/header';
|
||||
import { Stream } from 'stream';
|
||||
export default {
|
||||
components: {
|
||||
footerPage,
|
||||
headerPage
|
||||
headerPage,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -119,27 +128,27 @@ export default {
|
||||
val: '',
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 15
|
||||
pageSize: 15,
|
||||
},
|
||||
total: 0,
|
||||
portraitList: [], // 企业画像
|
||||
policyNoticeOptions: [
|
||||
{
|
||||
value: '1415156808053559296',
|
||||
label: '政策法规'
|
||||
label: '政策法规',
|
||||
},
|
||||
{
|
||||
value: '1415156963146338304',
|
||||
label: '申报通知'
|
||||
label: '申报通知',
|
||||
},
|
||||
{
|
||||
value: '1415157002090450944',
|
||||
label: '政府公示'
|
||||
label: '政府公示',
|
||||
},
|
||||
{
|
||||
value: '1415157026115424256',
|
||||
label: '公告'
|
||||
}
|
||||
label: '公告',
|
||||
},
|
||||
// {
|
||||
// value: '1415157049267982336',
|
||||
// label: '其他'
|
||||
@ -149,35 +158,41 @@ export default {
|
||||
attributeOptions: [
|
||||
{
|
||||
value: '',
|
||||
label: '不限'
|
||||
label: '不限',
|
||||
},
|
||||
{
|
||||
value: 'KJJ',
|
||||
label: '科技'
|
||||
label: '科技',
|
||||
},
|
||||
{
|
||||
value: 'JXJ',
|
||||
label: '经信'
|
||||
label: '经信',
|
||||
},
|
||||
{
|
||||
value: 'FGW',
|
||||
label: '发改'
|
||||
label: '发改',
|
||||
},
|
||||
{
|
||||
value: 'OTHER',
|
||||
label: '其他'
|
||||
}
|
||||
label: '其他',
|
||||
},
|
||||
],
|
||||
portraitData: [], // 企业画像绑定的政策列表
|
||||
portraitTotal: 0
|
||||
portraitTotal: 0,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['token'])
|
||||
...mapGetters(['token']),
|
||||
},
|
||||
methods: {
|
||||
removeBr(str) {
|
||||
return str && str.replaceAll('<br>', '')
|
||||
if (str) {
|
||||
str = str
|
||||
.replaceAll('<br>', '')
|
||||
.replaceAll('[', '【')
|
||||
.replaceAll(']', '】');
|
||||
}
|
||||
return str;
|
||||
},
|
||||
// 获取企业画像数据列表
|
||||
getPortraitList() {
|
||||
@ -205,7 +220,7 @@ export default {
|
||||
},
|
||||
handleClick() {
|
||||
this.getPortraitList();
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
// if (this.token) {
|
||||
@ -225,10 +240,12 @@ export default {
|
||||
// : ''
|
||||
// : undefined
|
||||
// );
|
||||
const arrs = data.map(item =>
|
||||
item.labelList ? item.labelList.filter(v => v.isHas) : undefined
|
||||
const arrs = data.map((item) =>
|
||||
item.labelList
|
||||
? item.labelList.filter((v) => v.isHas)
|
||||
: undefined
|
||||
);
|
||||
arrs.map(item => {
|
||||
arrs.map((item) => {
|
||||
this.portraitList = [...this.portraitList, ...item];
|
||||
});
|
||||
this.queryParams.labelId = this.portraitList[0].id;
|
||||
@ -244,7 +261,7 @@ export default {
|
||||
this.getPortraitList();
|
||||
} else if (key == 'policyNotice') {
|
||||
if (this.$route.query.labelId) {
|
||||
this.queryParams.labelId = this.$route.query.labelId
|
||||
this.queryParams.labelId = this.$route.query.labelId;
|
||||
} else {
|
||||
this.queryParams.labelId = this.policyNoticeOptions[0].value;
|
||||
}
|
||||
@ -255,7 +272,7 @@ export default {
|
||||
// } else {
|
||||
// this.msgError('请先登录');
|
||||
// }
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -35,10 +35,14 @@
|
||||
|
||||
<div class="my_main content p0-100 min_h_285" style="display: flex">
|
||||
<div class="l" style="width: 77%; background-color: #fff; padding: 30px">
|
||||
<h2 style="text-align:center">{{ removeBr(formData.title) }}</h2>
|
||||
<h2 style="text-align: center">{{ removeBr(formData.title) }}</h2>
|
||||
<div class="info" v-if="type != 'information'">
|
||||
<span v-if="type != 'companyNeed' && type != 'scienceResult'">来源:{{ formData.source }}</span>
|
||||
<span v-if="type == 'companyNeed'">价格:{{ setNumber(formData.price) }}</span>
|
||||
<span v-if="type != 'companyNeed' && type != 'scienceResult'"
|
||||
>来源:{{ formData.source }}</span
|
||||
>
|
||||
<span v-if="type == 'companyNeed'"
|
||||
>价格:{{ setNumber(formData.price) }}</span
|
||||
>
|
||||
<el-image
|
||||
v-if="type == 'scienceResult'"
|
||||
style="width: 100px; height: 100px"
|
||||
@ -52,11 +56,21 @@
|
||||
}}
|
||||
</span>
|
||||
<span v-if="token && type == 'policy'">
|
||||
<el-button type="primary" size="mini" v-if="formData.collected == 0" @click="addItem">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="formData.collected == 0"
|
||||
@click="addItem"
|
||||
>
|
||||
<i class="el-icon-star-on"></i>
|
||||
<span>收藏</span>
|
||||
</el-button>
|
||||
<el-button type="info" size="mini" v-if="formData.collected == 1" @click="cancelItem">
|
||||
<el-button
|
||||
type="info"
|
||||
size="mini"
|
||||
v-if="formData.collected == 1"
|
||||
@click="cancelItem"
|
||||
>
|
||||
<i class="el-icon-star-on"></i>
|
||||
<span>取消收藏</span>
|
||||
</el-button>
|
||||
@ -97,12 +111,16 @@
|
||||
</div>
|
||||
<div class="list">
|
||||
<ul>
|
||||
<li class="text_hidden_one pointer" v-for="item in noticeList" :key="item.id">
|
||||
<li
|
||||
class="text_hidden_one pointer"
|
||||
v-for="item in noticeList"
|
||||
:key="item.id"
|
||||
>
|
||||
<router-link
|
||||
target="_blank"
|
||||
:to="{
|
||||
path: '/result',
|
||||
query: { key: 'policy', id: item.id }
|
||||
query: { key: 'policy', id: item.id },
|
||||
}"
|
||||
>
|
||||
<span>•</span>
|
||||
@ -126,7 +144,7 @@ import {
|
||||
getPolicyReadInfo,
|
||||
getInfo,
|
||||
getInfo2,
|
||||
getInfo3
|
||||
getInfo3,
|
||||
} from '@/api/search';
|
||||
import { getPolicyList, getRead } from '@/api/home/notice';
|
||||
import { mapGetters } from 'vuex';
|
||||
@ -140,7 +158,7 @@ export default {
|
||||
components: {
|
||||
Editor,
|
||||
headerPage,
|
||||
footerPage
|
||||
footerPage,
|
||||
// headerPage2
|
||||
},
|
||||
data() {
|
||||
@ -149,7 +167,7 @@ export default {
|
||||
type: '',
|
||||
formData: {},
|
||||
noticeList: [],
|
||||
total: {}
|
||||
total: {},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -166,12 +184,23 @@ export default {
|
||||
} else {
|
||||
this.formData.text = this.formData.text.replaceAll(' ', ' ');
|
||||
}
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (this.formData.captureSource === 'TL_FGW') {
|
||||
document
|
||||
.getElementById('text')
|
||||
.querySelectorAll('img')
|
||||
.forEach((item) => {
|
||||
// console.log(item.src);
|
||||
item.src = item.src.replace('./', '/');
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
deep: true
|
||||
deep: true,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['token'])
|
||||
...mapGetters(['token']),
|
||||
},
|
||||
methods: {
|
||||
setNumber(val) {
|
||||
@ -181,26 +210,26 @@ export default {
|
||||
if (!this.input.length) return this.msgError('请输入搜索关键字');
|
||||
let routerJump = this.$router.resolve({
|
||||
path: '/search',
|
||||
query: { val: this.input }
|
||||
query: { val: this.input },
|
||||
});
|
||||
window.open(routerJump.href, '_blank');
|
||||
},
|
||||
addItem() {
|
||||
add({ policyId: this.formData.id }).then(res => {
|
||||
add({ policyId: this.formData.id }).then((res) => {
|
||||
this.formData.collected = 1;
|
||||
this.msgSuccess('操作成功');
|
||||
});
|
||||
},
|
||||
cancelItem() {
|
||||
cancel({ policyId: this.formData.id }).then(res => {
|
||||
cancel({ policyId: this.formData.id }).then((res) => {
|
||||
this.formData.collected = 0;
|
||||
this.msgSuccess('操作成功');
|
||||
});
|
||||
},
|
||||
removeBr(str) {
|
||||
console.log(str);
|
||||
return str && str.replaceAll('<br>', '')
|
||||
}
|
||||
return str && str.replaceAll('<br>', '');
|
||||
},
|
||||
},
|
||||
created() {
|
||||
let { key, id } = this.$route.query;
|
||||
@ -242,7 +271,7 @@ export default {
|
||||
getPolicyList({ pageNum: 1, pageSize: 5 }).then(({ data }) => {
|
||||
this.noticeList = data.list;
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user