Commit e2d7a3fb by liudx

联调智能推荐接口

parent afc70db8
No preview for this file type
......@@ -8,6 +8,7 @@
</template>
<style lang="less">
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
......
......@@ -59,9 +59,6 @@ export default {
echarts.dispose(document.getElementById(this.id));
let chart = echarts.init(document.getElementById(this.id));
if (chart) {
chart.dispose(); //销毁
}
chart.setOption(this.option);
// let that = this;
window.addEventListener("resize", chart.resize);
......
......@@ -7,6 +7,8 @@ export const patentselect = p => post('/api/patent/patents',p);
export const patentDetail = p => get('/api/patent/patentDetail/'+p.id);
//导出word给后端传递base64
export const exportword = p => post('/api/patent/patentDetail/125',p);
//专利智能推荐
export const Recommend = p => post('/api/patent/intelligentRecommendation/'+p.id,p);
// 企业搜索接口
export const enterpriseList = p => get('/api/enterprise/list?keyword='+p.keyword+'&page='+p.page+'&size='+p.size);
//企业国民经济行业接口
......
......@@ -95,9 +95,9 @@ export default {
radar: [
{
indicator: [
{ text: "公司竞争力", max: 30 },
{ text: "技术质量", max: 30 },
{ text: "技术体量", max: 40 },
{ name: "公司竞争力", max: 30 },
{ name: "技术质量", max: 30 },
{ name: "技术体量", max: 40 },
],
center: ["50%", "50%"],
......@@ -106,9 +106,9 @@ export default {
},
{
indicator: [
{ text: "公司竞争力", max: 30 },
{ text: "技术质量", max: 30 },
{ text: "技术体量", max: 40 },
{ name: "公司竞争力", max: 30 },
{ name: "技术质量", max: 30 },
{ name: "技术体量", max: 40 },
],
center: ["50%", "50%"],
......
......@@ -140,40 +140,48 @@ export default {
watch: {
$route() {
let path = this.$route.path;
console.log(path);
switch (path) {
case "/company" || "/companyDetails":
localStorage.setItem('current','企业')
this.current =localStorage.getItem("current");
case "/company":
localStorage.setItem("current", "企业");
this.current = localStorage.getItem("current");
break;
case "/companyDetails":
localStorage.setItem("current", "企业");
this.current = localStorage.getItem("current");
break;
case "/home":
// this.current = "首页";
localStorage.setItem('current','首页')
this.current =localStorage.getItem("current");
localStorage.setItem("current", "首页");
this.current = localStorage.getItem("current");
break;
case "/patent":
// this.current = "专利";
localStorage.setItem("current", "专利");
this.current = localStorage.getItem("current");
break;
case "/patent" || "/patentDetails":
case "/patentDetails":
// this.current = "专利";
localStorage.setItem('current','专利')
this.current =localStorage.getItem("current");
localStorage.setItem("current", "专利");
this.current = localStorage.getItem("current");
break;
case "/history":
this.current = "历史记录";
localStorage.setItem('current','历史记录')
this.current =localStorage.getItem("current");
localStorage.setItem("current", "历史记录");
this.current = localStorage.getItem("current");
break;
case "/follow":
localStorage.setItem('current','我的关注')
this.current =localStorage.getItem("current");
localStorage.setItem("current", "我的关注");
this.current = localStorage.getItem("current");
break;
}
},
},
mounted() {
this.current =localStorage.getItem("current");
this.current = localStorage.getItem("current");
},
created() {
this.username = this.$store.state.username;
},
};
</script>
......
......@@ -325,6 +325,7 @@ export default {
});
}
},
},
created() {
this.keyword = this.$route.query.keyword;
......
......@@ -11,14 +11,14 @@
<div class="patent_title">{{ title }}</div>
</div>
<div class="btn_group">
<span style="cursor: pointer;" @click="openModal"
<span style="cursor: pointer" @click="openModal"
><img src="@/static/patent/icon-dc.png" alt="" />导出</span
>
<span style="cursor: pointer;" v-if="follow"
<span style="cursor: pointer" v-if="follow"
><img src="@/static/patent/icon-gz.png" alt="" />关注</span
>
<span style="cursor: pointer;" v-else
<span style="cursor: pointer" v-else
><img src="@/static/patent/icon-gz-select.png" alt="" />关注</span
>
</div>
......@@ -236,43 +236,89 @@
placeholder="请选择"
style="width: 300px"
></a-select
><a-button type="primary">搜索</a-button>
><a-button type="primary" @click="searchRemend">搜索</a-button>
<div class="result">
推荐
<span style="color: #4079ff; font-weight: bold">{{ count }}</span
>条相关结果
</div>
<div class="card" v-for="item in list" :key="item">
<div class="card_title">{{ item.name }}</div>
<div
class="card_title"
@click="openCompany(item.id, item.company_name)"
>
{{ item.company_name }}
</div>
<a-tag color="#56CA95">{{ item.status }}</a-tag>
<a-tag color="#6096E6">{{ item.type }}</a-tag>
<a-tag color="#6096E6" v-if="item.high_new == 1">{{
"高新技术企业"
}}</a-tag>
<a-tag color="#6096E6" v-if="item.zjtg == 1">{{
"专精特新中小企业"
}}</a-tag>
<a-tag color="#6096E6" v-if="item.zjtg_sjxjr == 1">{{
"专精特新小巨人"
}}</a-tag>
<a-tag color="#6096E6" v-if="item.quoted_company == 1">{{
"上市挂牌企业"
}}</a-tag>
<a-divider />
<div class="card_desc">
<a-descriptions layout="vertical">
<a-descriptions-item label="法定代表人">{{
item.legalRepresentative
item.legal
}}</a-descriptions-item>
<a-descriptions-item label="注册时间">{{
item.registrationTime
item.build_date.substring(0, item.build_date.indexOf("T"))
}}</a-descriptions-item>
<a-descriptions-item label="注册资本">{{
item.money
item.capital
}}</a-descriptions-item>
<a-descriptions-item label="国民经济行业">
{{ item.industry }}
{{
item.company_industry_parent
? item.company_industry_parent + ">"
: ""
}}{{ item.company_industry }}
</a-descriptions-item>
<a-descriptions-item :span="2" label="注册地址">{{
item.address
}}</a-descriptions-item>
<a-descriptions-item :span="3" label="专利信息">{{
item.info
}}</a-descriptions-item>
<a-descriptions-item :span="2" label="经营范围">{{
item.range
}}</a-descriptions-item>
<a-descriptions-item
:span="3"
label="专利信息"
v-if="item.patents.length > 3"
>
{{ item.patents[0] }}<br />
{{ item.patents[1] }}<br />
{{ item.patents[2] }}
</a-descriptions-item>
<a-descriptions-item
:span="3"
label="专利信息"
v-else-if="item.patents.length == 0"
>
</a-descriptions-item>
<a-descriptions-item :span="3" label="专利信息" v-else>
<template v-for="patent in item.patents">
{{ patent }}<br />
</template>
</a-descriptions-item>
<a-descriptions-item :span="3" label="经营范围">
<div v-html="item.business_scope"></div>
</a-descriptions-item>
</a-descriptions>
</div>
</div>
<a-pagination
v-model:current="currentPage"
@change="onChange"
:total="count"
v-model:pageSize="pageSize"
:showSizeChanger="false"
/>
</div>
</div>
</div>
......@@ -304,7 +350,7 @@
import * as echarts from "echarts";
import "echarts-wordcloud";
import { DownOutlined } from "@ant-design/icons-vue";
import { patentDetail, exportword } from "../../utils/indexApi";
import { patentDetail, exportword, Recommend } from "../../utils/indexApi";
import EchartsCloud from "../../components/EchartsCloud.vue";
import docxtemplater from "docxtemplater";
import PizZip from "pizzip";
......@@ -339,10 +385,13 @@ export default {
formState: {
email: "",
},
id: "",
pageSize: 3,
currentPage: 1,
visible: false,
email: "",
value: undefined,
count: 161,
count: 0,
zlcode: "",
title: "",
follow: true,
......@@ -384,8 +433,38 @@ export default {
value: word_cloud[key],
});
}
}else{
message.error(res.msg)
} else {
message.error(res.msg);
}
});
this.getRecommend();
},
//打开企业页面
openCompany(id, company_name) {
this.$router.push({
path: "/companyDetails",
query: {
id: id,
name: company_name,
},
});
},
//智能推荐翻页
onChange() {
this.getRecommend();
},
getRecommend() {
Recommend({
id: this.id,
page: this.currentPage,
size: 3,
qualifications: this.value1,
}).then((res) => {
if (res.code == 0) {
this.list = res.data.list;
this.count = res.data.total;
} else {
message.error(res.msg);
}
});
},
......@@ -393,6 +472,10 @@ export default {
backbtn() {
this.$router.go(-1);
},
//搜索筛选智能推荐
searchRemend() {
this.getRecommend();
},
//导出word
daochu(details) {
var that = this;
......@@ -480,10 +563,30 @@ export default {
// 设置图片模块
doc.attachModule(new ImageModule(opts));
let list = that.list;
let qualif = []
list.forEach((item) => {
if (item.high_new == 1) {
qualif.push('高新技术企业')
} else if (item.zjtg == 1) {
qualif.push('专精特新企业')
}else if (item.zjtg_sjxjr == 1) {
qualif.push('专精特新小巨人企业')
}
else if (item.quoted_company == 1) {
qualif.push('上市企业')
}
});
that.list.qualif = qualif
// that.list.patents = this.submitInfo.auditResult.split('\n')
// 设置模板变量的值
doc.setData({
...details,
today,
list,
qualif,
// business_scope,
// patent,
image1: myChart1.getDataURL({
pixelRatio: 5, //导出的图片分辨率比率,默认是1
backgroundColor: "#fff", //图表背景色
......@@ -508,7 +611,7 @@ export default {
// that.blobToBase64(out);
// 将目标文件对象保存为目标类型的文件,并命名
saveAs(out, `专利成果转移转化智能推荐报告.docx`);
this.visible = false
that.visible = false;
});
}, 1000);
},
......@@ -533,12 +636,12 @@ export default {
created() {
// this.$store.commit("setcurrent", "专利");
localStorage.setItem("current", "专利");
let id = this.$route.query.id;
this.id = this.$route.query.id;
this.zlcode = this.$route.query.zlcode;
this.title = this.$route.query.title;
//初始化专利详情
this.init(id);
this.init(this.id);
},
};
</script>
......@@ -744,8 +847,11 @@ export default {
font-size: 20px;
}
.card_desc {
:deep(b) {
color: rgba(191, 36, 40, 1);
}
:deep(.ant-descriptions-item-label) {
color: #999999;
color: #666;
font-family: Microsoft YaHei UI-Regular, Microsoft YaHei UI;
font-weight: 400;
}
......@@ -757,10 +863,16 @@ export default {
:deep(.ant-descriptions-row > th) {
padding-bottom: 4px;
}
// b{
// color:#1890ff;
// }
}
}
}
}
}
}
:deep(.ant-pagination) {
text-align: center;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment