Commit e2d7a3fb by liudx

联调智能推荐接口

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