2021-08-10 11:00:58 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<!-- 预览弹出层 -->
|
2021-08-12 16:21:59 +08:00
|
|
|
|
<div class="result_page">
|
|
|
|
|
|
<el-backtop target=".result_page" :visibility-height="500"></el-backtop>
|
2021-08-25 11:37:15 +08:00
|
|
|
|
<!-- <div class="my_header">
|
2021-08-12 16:21:59 +08:00
|
|
|
|
<div class="title content p0-100">
|
|
|
|
|
|
<el-row :gutter="20">
|
2021-08-20 17:36:05 +08:00
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<img
|
|
|
|
|
|
src="@/assets/logo/logo2.png"
|
|
|
|
|
|
alt=""
|
|
|
|
|
|
style="vertical-align: middle;"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="16">
|
|
|
|
|
|
<el-row
|
|
|
|
|
|
style="justify-content: flex-end;height: 100%;align-items: center;padding-right: 30px;"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<div class="search">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model.trim="input"
|
|
|
|
|
|
placeholder="请输入搜索关键字"
|
|
|
|
|
|
@keyup.enter.native="toSearch"
|
|
|
|
|
|
></el-input>
|
|
|
|
|
|
<el-button type="warning" @click="toSearch">一站搜</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-col>
|
2021-08-12 16:21:59 +08:00
|
|
|
|
</el-row>
|
|
|
|
|
|
</div>
|
2021-08-25 11:37:15 +08:00
|
|
|
|
</div> -->
|
|
|
|
|
|
<headerPage />
|
2021-08-12 16:21:59 +08:00
|
|
|
|
|
2021-08-25 11:37:15 +08:00
|
|
|
|
<div class="my_main content p0-100 min_h_285" style="display: flex">
|
2021-09-14 17:42:28 +08:00
|
|
|
|
<div class="l" style="width: 77%; background-color: #fff; padding: 30px">
|
2021-10-26 15:58:47 +08:00
|
|
|
|
<h2 style="text-align:center">{{ formData.title }}</h2>
|
2021-08-12 16:21:59 +08:00
|
|
|
|
<div class="info" v-if="type != 'information'">
|
|
|
|
|
|
<span v-if="type != 'companyNeed' && type != 'scienceResult'"
|
|
|
|
|
|
>来源:{{ formData.source }}</span
|
|
|
|
|
|
>
|
2021-10-22 14:49:18 +08:00
|
|
|
|
<span v-if="type == 'companyNeed'"
|
|
|
|
|
|
>价格:{{ setNumber(formData.price) }}</span
|
|
|
|
|
|
>
|
2021-08-12 16:21:59 +08:00
|
|
|
|
<el-image
|
|
|
|
|
|
v-if="type == 'scienceResult'"
|
|
|
|
|
|
style="width: 100px; height: 100px"
|
|
|
|
|
|
:src="formData.picList ? formData.picList[0] : ''"
|
|
|
|
|
|
fit="cover"
|
|
|
|
|
|
:preview-src-list="formData.picList"
|
|
|
|
|
|
></el-image>
|
|
|
|
|
|
<span
|
|
|
|
|
|
>发布:{{
|
|
|
|
|
|
formData.listDate || parseTime(formData.createTime, '{y}-{m}-{d}')
|
|
|
|
|
|
}}</span
|
|
|
|
|
|
>
|
|
|
|
|
|
<span v-if="token && type == 'policy'">
|
|
|
|
|
|
<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"
|
|
|
|
|
|
>
|
|
|
|
|
|
<i class="el-icon-star-on"></i><span>取消收藏</span>
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!-- <div v-html="formData.text"></div> -->
|
2021-08-24 14:18:22 +08:00
|
|
|
|
<div
|
|
|
|
|
|
id="text"
|
|
|
|
|
|
:class="type == 'policy' && formData.method == 1 ? '' : 'ql-editor'"
|
|
|
|
|
|
>
|
2021-08-12 16:21:59 +08:00
|
|
|
|
<!-- <editor v-model="formData.text" :min-height="192" /> -->
|
|
|
|
|
|
<div v-html="formData.text" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div
|
|
|
|
|
|
class="r"
|
2021-08-17 08:41:33 +08:00
|
|
|
|
style="
|
2021-09-14 17:42:28 +08:00
|
|
|
|
width: 22%;
|
2021-08-17 08:41:33 +08:00
|
|
|
|
margin-left: 1%;
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
padding: 20px 10px;
|
|
|
|
|
|
"
|
2021-08-10 11:00:58 +08:00
|
|
|
|
>
|
2021-08-12 16:21:59 +08:00
|
|
|
|
<!-- 公告模块 -->
|
|
|
|
|
|
<div class="notice">
|
|
|
|
|
|
<div class="title">
|
2021-10-22 14:49:18 +08:00
|
|
|
|
<div>公示公告</div>
|
2021-08-12 16:21:59 +08:00
|
|
|
|
<router-link target="_blank" :to="{ path: '/notice' }">
|
2021-08-17 08:41:33 +08:00
|
|
|
|
<div class="pointer" style="color: #999">
|
2021-08-12 16:21:59 +08:00
|
|
|
|
更多<i class="el-icon-arrow-right"></i>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</router-link>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="list">
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li
|
|
|
|
|
|
class="text_hidden_one pointer"
|
|
|
|
|
|
v-for="item in noticeList"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
>
|
|
|
|
|
|
<router-link
|
|
|
|
|
|
target="_blank"
|
|
|
|
|
|
:to="{
|
|
|
|
|
|
path: '/result',
|
2021-08-20 17:36:05 +08:00
|
|
|
|
query: { key: 'policy', id: item.id }
|
2021-08-12 16:21:59 +08:00
|
|
|
|
}"
|
|
|
|
|
|
>
|
|
|
|
|
|
<span>•</span>{{ item.title }}
|
|
|
|
|
|
</router-link>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2021-08-10 11:00:58 +08:00
|
|
|
|
</div>
|
2021-08-12 16:21:59 +08:00
|
|
|
|
|
2021-10-25 17:00:38 +08:00
|
|
|
|
<footerPage :totalNum="total.count" :goldNum="total.today" :flag="false" />
|
2021-08-10 11:00:58 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import {
|
|
|
|
|
|
search,
|
|
|
|
|
|
getPolicyInfo,
|
|
|
|
|
|
getPolicyReadInfo,
|
|
|
|
|
|
getInfo,
|
|
|
|
|
|
getInfo2,
|
2021-08-20 17:36:05 +08:00
|
|
|
|
getInfo3
|
2021-08-10 11:00:58 +08:00
|
|
|
|
} from '@/api/search';
|
2021-08-18 11:40:20 +08:00
|
|
|
|
import { getPolicyList, getRead } from '@/api/home/notice';
|
2021-08-10 11:00:58 +08:00
|
|
|
|
import { mapGetters } from 'vuex';
|
|
|
|
|
|
import { add, cancel } from '@/api/search';
|
2021-10-22 14:49:18 +08:00
|
|
|
|
import { numberFormat } from '@/utils';
|
2021-08-10 11:00:58 +08:00
|
|
|
|
import Editor from '@/components/Editor';
|
2021-08-25 11:37:15 +08:00
|
|
|
|
import headerPage from './components/header';
|
2021-10-25 17:00:38 +08:00
|
|
|
|
import footerPage from './components/footer';
|
2021-09-14 16:02:04 +08:00
|
|
|
|
// import headerPage2 from './components/header2';
|
2021-08-10 11:00:58 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
components: {
|
2021-08-25 11:37:15 +08:00
|
|
|
|
Editor,
|
2021-10-25 17:00:38 +08:00
|
|
|
|
headerPage,
|
|
|
|
|
|
footerPage
|
2021-09-14 16:02:04 +08:00
|
|
|
|
// headerPage2
|
2021-08-10 11:00:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2021-08-12 16:21:59 +08:00
|
|
|
|
input: '',
|
2021-08-10 11:00:58 +08:00
|
|
|
|
type: '',
|
2021-08-12 16:21:59 +08:00
|
|
|
|
formData: {},
|
2021-08-17 08:41:33 +08:00
|
|
|
|
noticeList: [],
|
2021-08-20 17:36:05 +08:00
|
|
|
|
total: {}
|
2021-08-10 11:00:58 +08:00
|
|
|
|
};
|
|
|
|
|
|
},
|
2021-08-10 17:15:42 +08:00
|
|
|
|
watch: {
|
|
|
|
|
|
formData: {
|
2021-08-20 17:36:05 +08:00
|
|
|
|
handler: function() {
|
2021-08-23 16:31:40 +08:00
|
|
|
|
if (this.type == 'policy') {
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
this.formatRichText(this.formData.downloadUrl, this.formData.id);
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.formData.text = this.formData.text.replaceAll(' ', ' ');
|
|
|
|
|
|
}
|
2021-08-20 17:36:05 +08:00
|
|
|
|
}
|
2021-08-10 17:15:42 +08:00
|
|
|
|
},
|
2021-08-20 17:36:05 +08:00
|
|
|
|
deep: true
|
2021-08-10 17:15:42 +08:00
|
|
|
|
},
|
2021-08-10 11:00:58 +08:00
|
|
|
|
computed: {
|
2021-08-20 17:36:05 +08:00
|
|
|
|
...mapGetters(['token'])
|
2021-08-10 11:00:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2021-10-22 14:49:18 +08:00
|
|
|
|
setNumber(val) {
|
|
|
|
|
|
return numberFormat(val);
|
|
|
|
|
|
},
|
2021-08-12 16:21:59 +08:00
|
|
|
|
toSearch() {
|
|
|
|
|
|
if (!this.input.length) return this.msgError('请输入搜索关键字');
|
|
|
|
|
|
let routerJump = this.$router.resolve({
|
|
|
|
|
|
path: '/search',
|
2021-08-20 17:36:05 +08:00
|
|
|
|
query: { val: this.input }
|
2021-08-12 16:21:59 +08:00
|
|
|
|
});
|
|
|
|
|
|
window.open(routerJump.href, '_blank');
|
|
|
|
|
|
},
|
2021-08-10 11:00:58 +08:00
|
|
|
|
addItem() {
|
2021-08-20 17:36:05 +08:00
|
|
|
|
add({ policyId: this.formData.id }).then(res => {
|
2021-08-10 11:00:58 +08:00
|
|
|
|
this.formData.collected = 1;
|
|
|
|
|
|
this.msgSuccess('操作成功');
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
cancelItem() {
|
2021-08-20 17:36:05 +08:00
|
|
|
|
cancel({ policyId: this.formData.id }).then(res => {
|
2021-08-10 11:00:58 +08:00
|
|
|
|
this.formData.collected = 0;
|
|
|
|
|
|
this.msgSuccess('操作成功');
|
|
|
|
|
|
});
|
2021-08-20 17:36:05 +08:00
|
|
|
|
}
|
2021-08-10 11:00:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
|
|
|
let { key, id } = this.$route.query;
|
|
|
|
|
|
this.type = key;
|
|
|
|
|
|
if (this.type == 'policy') {
|
|
|
|
|
|
// 政策
|
|
|
|
|
|
getPolicyInfo({ policyId: id }).then(({ data }) => {
|
|
|
|
|
|
this.formData = data;
|
|
|
|
|
|
});
|
|
|
|
|
|
} else if (this.type == 'policyRead') {
|
|
|
|
|
|
// 政策解读
|
|
|
|
|
|
getPolicyReadInfo({ readId: id }).then(({ data }) => {
|
|
|
|
|
|
this.formData = data;
|
|
|
|
|
|
});
|
|
|
|
|
|
} else if (this.type == 'information') {
|
|
|
|
|
|
// 资讯快报
|
|
|
|
|
|
getInfo({ id }).then(({ data }) => {
|
|
|
|
|
|
this.formData = data;
|
|
|
|
|
|
});
|
|
|
|
|
|
} else if (this.type == 'companyNeed') {
|
2021-10-22 14:49:18 +08:00
|
|
|
|
// 产业需求
|
2021-08-10 11:00:58 +08:00
|
|
|
|
getInfo2({ id }).then(({ data }) => {
|
|
|
|
|
|
this.formData = data;
|
|
|
|
|
|
});
|
|
|
|
|
|
} else if (this.type == 'scienceResult') {
|
|
|
|
|
|
// 科学成功
|
|
|
|
|
|
getInfo3({ id }).then(({ data }) => {
|
|
|
|
|
|
this.formData = data;
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
2021-08-18 11:40:20 +08:00
|
|
|
|
getRead({ id }).then(({ data }) => {
|
|
|
|
|
|
this.total = data;
|
|
|
|
|
|
});
|
2021-08-12 16:21:59 +08:00
|
|
|
|
getPolicyList({ pageNum: 1, pageSize: 5 }).then(({ data }) => {
|
|
|
|
|
|
this.noticeList = data.list;
|
|
|
|
|
|
});
|
2021-08-20 17:36:05 +08:00
|
|
|
|
}
|
2021-08-10 11:00:58 +08:00
|
|
|
|
};
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
/deep/.el-dialog__body {
|
|
|
|
|
|
padding-top: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.result_page {
|
2021-08-12 16:21:59 +08:00
|
|
|
|
height: 100vh;
|
|
|
|
|
|
overflow: auto;
|
|
|
|
|
|
background-color: #f1f1f1;
|
2021-08-10 11:00:58 +08:00
|
|
|
|
.info {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
}
|
|
|
|
|
|
#text {
|
|
|
|
|
|
margin-top: 30px;
|
|
|
|
|
|
/deep/.ql-toolbar {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
/deep/.editor {
|
|
|
|
|
|
border: 0;
|
|
|
|
|
|
}
|
2021-08-23 16:31:40 +08:00
|
|
|
|
/deep/p {
|
|
|
|
|
|
img {
|
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-08-10 11:00:58 +08:00
|
|
|
|
}
|
2021-08-12 16:21:59 +08:00
|
|
|
|
.my_main {
|
2021-09-14 16:02:04 +08:00
|
|
|
|
margin: 30px auto;
|
2021-08-12 16:21:59 +08:00
|
|
|
|
.r {
|
|
|
|
|
|
.title {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
}
|
|
|
|
|
|
.list {
|
|
|
|
|
|
ul {
|
|
|
|
|
|
padding-left: 0;
|
|
|
|
|
|
line-height: 35px;
|
|
|
|
|
|
li {
|
|
|
|
|
|
color: #999;
|
|
|
|
|
|
span {
|
|
|
|
|
|
margin-right: 5px;
|
|
|
|
|
|
}
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
color: #ffa32c;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-08-10 11:00:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
</style>
|