Commit 81ed31db by liudx

联调科创能力、首页科创榜单、专利联想、企业联想

parent 0926c470
No preview for this file type
No preview for this file type
...@@ -29,6 +29,17 @@ export const jointApplication = p=>get('/api/enterprise/jointApplication/'+p.id) ...@@ -29,6 +29,17 @@ export const jointApplication = p=>get('/api/enterprise/jointApplication/'+p.id)
export const patentPurchase = p=>get('/api/enterprise/patentPurchase/'+p.id) export const patentPurchase = p=>get('/api/enterprise/patentPurchase/'+p.id)
//首页-企业技术合作榜单 //首页-企业技术合作榜单
export const technicalCooperation = p =>get('/api/enterprise/technicalCooperation',{}) export const technicalCooperation = p =>get('/api/enterprise/technicalCooperation',{})
//首页-企业科创能力榜单
export const scientificEvaluationTop = p =>get('/api/enterprise/scientificEvaluationTop',{})
//企业详情 科创能力评价
export const scientificEvaluation = p =>get('/api/enterprise/scientificEvaluation/'+p.id)
//企业搜索联想
export const enterpriseLenovo = p=>get('/api/enterprise/enterpriseLenovo?keyword='+p.keyword)
//专利搜索联想
export const patentLenovo = p=>get('/api/patent/patentLenovo?keyword='+p.keyword)
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
></cooperation> ></cooperation>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="科创能力评价" tab="科创能力评价"> <a-tab-pane key="科创能力评价" tab="科创能力评价">
<technology></technology> <technology :technologyData="technologyData"></technology>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
<a-modal <a-modal
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
<Loading v-if="loading"></Loading> <Loading v-if="loading"></Loading>
</template> </template>
<script> <script>
import Loading from "../../components/LoadAnimation.vue" import Loading from "../../components/LoadAnimation.vue";
import * as echarts from "echarts"; import * as echarts from "echarts";
import EchartsCon from "../../components/EchartsCon"; import EchartsCon from "../../components/EchartsCon";
import EchartsCloud from "../../components/EchartsCloud"; import EchartsCloud from "../../components/EchartsCloud";
...@@ -133,6 +133,7 @@ import { ...@@ -133,6 +133,7 @@ import {
structure, structure,
jointApplication, jointApplication,
patentPurchase, patentPurchase,
scientificEvaluation,
} from "../../utils/indexApi.js"; } from "../../utils/indexApi.js";
import overview from "./overview.vue"; import overview from "./overview.vue";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
...@@ -168,7 +169,7 @@ export default { ...@@ -168,7 +169,7 @@ export default {
name: "companyDetails", name: "companyDetails",
data() { data() {
return { return {
loading:false, loading: false,
id: "", id: "",
option1: {}, option1: {},
option2: {}, option2: {},
...@@ -185,6 +186,8 @@ export default { ...@@ -185,6 +186,8 @@ export default {
}, },
visible: false, visible: false,
max_value_purchase: 0, max_value_purchase: 0,
max_value_apply:0,
max_list_apply:[],
email: "", email: "",
value: undefined, value: undefined,
activeKey: "企业概况", activeKey: "企业概况",
...@@ -197,6 +200,7 @@ export default { ...@@ -197,6 +200,7 @@ export default {
structureData: {}, structureData: {},
jointData: {}, jointData: {},
patentPurchaseData: {}, patentPurchaseData: {},
technologyData: {},
}; };
}, },
components: { components: {
...@@ -206,7 +210,7 @@ export default { ...@@ -206,7 +210,7 @@ export default {
technology, technology,
EchartsCon, EchartsCon,
EchartsCloud, EchartsCloud,
Loading Loading,
}, },
methods: { methods: {
//取消关注 //取消关注
...@@ -315,8 +319,11 @@ export default { ...@@ -315,8 +319,11 @@ export default {
jointApplication({ id: id }).then((res) => { jointApplication({ id: id }).then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.jointData = res.data; this.jointData = res.data;
this.jointData.max_name_apply = this.jointData.max_name; this.max_list_apply = this.jointData.max_list
this.jointData.max_value_apply = this.jointData.max_value; this.max_value_apply =
this.jointData.max_list.length > 0
? this.jointData.max_list[0].max_value
: 0;
this.getOptions1(); this.getOptions1();
} else { } else {
message.error(res.msg); message.error(res.msg);
...@@ -335,6 +342,131 @@ export default { ...@@ -335,6 +342,131 @@ export default {
message.error(res.msg); message.error(res.msg);
} }
}); });
//科创能力分析
scientificEvaluation({ id: id }).then((res) => {
if (res.code == 0) {
this.technologyData = res.data;
this.option9 = {
tooltip: {
trigger: "item",
},
legend: {
show: true,
bottom: 10,
},
radar: [
{
indicator: [
{ name: "公司竞争力", max: 30 },
{ name: "技术质量", max: 30 },
{ name: "技术体量", max: 40 },
],
center: ["50%", "50%"],
radius: 120,
triggerEvent: true,
},
{
indicator: [
{ name: "公司竞争力", max: 30 },
{ name: "技术质量", max: 30 },
{ name: "技术体量", max: 40 },
],
center: ["50%", "50%"],
radius: 120,
},
],
series: [
{
type: "radar",
radarIndex: 0,
symbol: "none",
data: [
{
value: [20, 10, 25],
value: [
this.technologyData.company_competitiveness_avg,
this.technologyData.technical_quality_avg,
this.technologyData.technical_volume_avg,
],
name: "均值",
areaStyle: {
color: "#F7B46A",
},
lineStyle: {
color: "#F7B46A",
},
itemStyle: {
color: "#F7B46A",
},
},
],
},
{
type: "radar",
radarIndex: 0,
symbol: "none",
data: [
{
// value: [10, 15, 15],
value: [
this.technologyData.company_competitiveness,
this.technologyData.technical_quality,
this.technologyData.technical_volume,
],
name: "科创能力分值",
areaStyle: {
color: "#5A95F7",
},
lineStyle: {
color: "#5A95F7",
},
itemStyle: {
color: "#5A95F7",
},
},
],
},
],
};
this.option10 = {
tooltip: {
formatter: "{a} <br/>{b} : {c}",
},
series: [
{
name: "总分",
startAngle: 180,
endAngle: 0,
min: 0,
max: 100,
radius: "160",
center: ["50%", "60%"],
type: "gauge",
progress: {
show: true,
},
detail: {
valueAnimation: true,
formatter: "{value}",
},
data: [
{
// value:50,
value: this.technologyData.total_score,
name: "科创能力总分值",
},
],
},
],
};
} else {
message.error(res.msg);
}
});
}, },
//获取专利申请年份趋势 //获取专利申请年份趋势
getTrend() { getTrend() {
...@@ -857,137 +989,8 @@ export default { ...@@ -857,137 +989,8 @@ export default {
}, },
], ],
}; };
this.option9 = {
tooltip: {
trigger: "item",
// formatter: function (params) {
// console.log(params);
// },
},
radar: [
{
indicator: [
{ name: "公司竞争力", max: 30 },
{ name: "技术质量", max: 30 },
{ name: "技术体量", max: 40 },
],
center: ["50%", "50%"],
radius: 120,
triggerEvent: true,
},
{
indicator: [
{ name: "公司竞争力", max: 30 },
{ name: "技术质量", max: 30 },
{ name: "技术体量", max: 40 },
],
center: ["50%", "50%"],
radius: 120,
},
],
series: [
{
type: "radar",
radarIndex: 0,
symbol: "none",
data: [
{
value: [20, 10, 25],
name: "均值",
areaStyle: {
color: "#F7B46A",
},
lineStyle: {
color: "#F7B46A",
},
itemStyle: {
color: "#F7B46A",
},
},
],
},
{
type: "radar",
radarIndex: 0,
symbol: "none",
data: [
{
value: [10, 20, 10],
name: "科创能力分值",
areaStyle: {
color: "#5A95F7",
},
lineStyle: {
color: "#5A95F7",
},
itemStyle: {
color: "#5A95F7",
},
},
],
},
],
};
var data = [
{
name: "技术体量",
value: 30,
},
{
name: "技术质量",
value: 30,
},
{
name: "公司竞争力",
value: 30,
},
]; //已排序好的数组
var ydata = [];
for (var i = 0; i < data.length; i++) {
ydata.push(data[i].name);
}
var datalength = [];
for (var i = 0; i < data.length; i++) {
datalength.push(0);
}
this.option10 = {
tooltip: {
formatter: "{a} <br/>{b} : {c}",
},
series: [
{
name: "总分",
startAngle: 180,
endAngle: 0,
min: 0,
max: 100,
radius: "160",
center: ["50%", "60%"],
type: "gauge",
progress: {
show: true,
},
detail: {
valueAnimation: true,
formatter: "{value}",
},
data: [
{
value: 50,
name: "科创能力总分值",
},
],
},
],
};
}, },
//导出.overview //导出overview
daochu() { daochu() {
this.$refs.form this.$refs.form
.validate("email") .validate("email")
...@@ -1008,6 +1011,8 @@ export default { ...@@ -1008,6 +1011,8 @@ export default {
//融资信息 //融资信息
let company_finance = that.baseinfo.company_finance; let company_finance = that.baseinfo.company_finance;
let max_value_purchase = that.max_value_purchase; let max_value_purchase = that.max_value_purchase;
let max_list_apply = that.max_list_apply;
let max_value_apply = that.max_value_apply
let date = new Date(); let date = new Date();
var year = date.getFullYear(); var year = date.getFullYear();
var month = date.getMonth() + 1; var month = date.getMonth() + 1;
...@@ -1142,6 +1147,8 @@ export default { ...@@ -1142,6 +1147,8 @@ export default {
doc.setData({ doc.setData({
...that.baseinfo, ...that.baseinfo,
max_value_purchase, max_value_purchase,
max_list_apply,
max_value_apply,
share_holders, share_holders,
company_marjor, company_marjor,
company_invest, company_invest,
...@@ -1227,7 +1234,12 @@ export default { ...@@ -1227,7 +1234,12 @@ export default {
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
}); });
//formData文件流 //formData文件流
that.blobToBase64(out, that.formState.email,that.baseinfo.company_name,that.id); that.blobToBase64(
out,
that.formState.email,
that.baseinfo.company_name,
that.id
);
// 将目标文件对象保存为目标类型的文件,并命名 // 将目标文件对象保存为目标类型的文件,并命名
// saveAs(out, `企业科创能力报告.docx`); // saveAs(out, `企业科创能力报告.docx`);
} }
...@@ -1240,26 +1252,24 @@ export default { ...@@ -1240,26 +1252,24 @@ export default {
// 处理验证失败的情况 // 处理验证失败的情况
}); });
}, },
blobToBase64(blob, email,name,id) { blobToBase64(blob, email, name, id) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const fileReader = new FileReader(); const fileReader = new FileReader();
fileReader.onload = (e) => { fileReader.onload = (e) => {
exportword({ exportword({
report_data: e.target.result, report_data: e.target.result,
email: email, email: email,
name:name, name: name,
f_type:'enterprise', f_type: "enterprise",
ent_or_pat_id:id ent_or_pat_id: id,
}).then((res) => { }).then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.loading = false this.loading = false;
message.success(res.msg); message.success(res.msg);
} else { } else {
message.error(res.msg); message.error(res.msg);
} }
}); });
}; };
// readAsDataURL // readAsDataURL
fileReader.readAsDataURL(blob); fileReader.readAsDataURL(blob);
......
...@@ -14,9 +14,17 @@ ...@@ -14,9 +14,17 @@
<a-empty></a-empty> <a-empty></a-empty>
</template> </template>
<template v-else> <template v-else>
其中,与<span class="color">{{ joint.max_name_apply }}</span 其中,与<span
class="color"
v-for="(item, index) in joint.max_list"
:key="item.max_name"
>{{
index == joint.max_list.length - 1
? item.max_name
: item.max_name + ","
}}</span
>最为密切,合作次数为<span class="color">{{ >最为密切,合作次数为<span class="color">{{
joint.max_value_apply joint.max_list[0].max_value
}}</span }}</span
>次,与该企业合作次数最多的申请人如下图所示。 >次,与该企业合作次数最多的申请人如下图所示。
</template> </template>
......
<template> <template>
<!-- 头部搜索关键词字段 --> <!-- 头部搜索关键词字段 -->
<div class="header_con"> <div class="header_con">
<a-input v-model:value="keyword" :bordered="false"> <a-input
v-model:value="keyword"
:bordered="false"
allowClear
@input="onInput"
>
<template #addonBefore> <template #addonBefore>
<a-select v-model:value="type" class="type"> <a-select v-model:value="type" class="type">
<a-select-option value="企业">查企业</a-select-option> <a-select-option value="企业">查企业</a-select-option>
...@@ -18,13 +23,31 @@ ...@@ -18,13 +23,31 @@
</div> </div>
</template> </template>
</a-input> </a-input>
<!-- 联想搜索 -->
<div class="search_result" v-show="search_result_show"> <div class="search_result" v-show="search_result_show">
<div <div
class="search_result_item" class="search_result_item"
v-for="(item, index) in search_result" v-for="(item, index) in search_result"
:key="item" :key="item"
> >
<div v-html="item" @click="openDetails"></div> <div style="position: relative">
<div
v-if="company_cate == 'company_name'"
style="cursor: pointer"
v-html="item.company_name"
@click="lenovnoCompanyDetails(item)"
></div>
<div
v-else
style="cursor: pointer"
v-html="item.company_name"
@click="lenovnoCompanyDetails(item)"
></div>
<a-tag class="cate" color="blue" v-if="company_cate == 'company_name'"
>公司名称</a-tag
>
<a-tag class="cate" color="blue" v-else>法人信息匹配</a-tag>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -225,6 +248,7 @@ import { ...@@ -225,6 +248,7 @@ import {
enterpriseList, enterpriseList,
industryType, industryType,
enterpriseSelect, enterpriseSelect,
enterpriseLenovo,
} from "../../utils/indexApi.js"; } from "../../utils/indexApi.js";
import "dayjs/locale/zh-cn"; import "dayjs/locale/zh-cn";
import zh_CN from "ant-design-vue/lib/locale-provider/zh_CN"; import zh_CN from "ant-design-vue/lib/locale-provider/zh_CN";
...@@ -234,8 +258,9 @@ export default { ...@@ -234,8 +258,9 @@ export default {
name: "company", name: "company",
data() { data() {
return { return {
search_result_show:false, search_result_show: false,
zh_CN, zh_CN,
search_result:[],
total: 0, total: 0,
currentPage: 1, currentPage: 1,
keyword: "", keyword: "",
...@@ -544,30 +569,35 @@ export default { ...@@ -544,30 +569,35 @@ export default {
}); });
}, },
onsearch() { onsearch() {
this.keyword ? (this.filter = [this.keyword]) : (this.filter = []);
this.getCompanyList(this.keyword); this.getCompanyList(this.keyword);
}, },
//联想搜索 //联想搜索
onInput() { onInput() {
if (this.keyword == "") { enterpriseLenovo({ keyword: this.keyword }).then((res) => {
if (res.code == 0) {
this.search_result = [];
this.search_result_show = true;
this.company_cate = res.data.name_or_legal;
this.search_result = JSON.parse(JSON.stringify(res.data.list));
// this.search_result = res.data.list;
console.log(this.search_result)
if (this.search_result.length == 0) {
this.search_result_show = false; this.search_result_show = false;
}
} else { } else {
this.search_result_show = true; this.search_result_show = false;
this.search_result = [
"山煤国际能源集团股份有限公司1",
"山煤国际能源集团股份有限公司2",
"山煤国际能源集团股份有限公司3",
];
this.search_result.map((item, index) => {
if (this.keyword) {
const reg = new RegExp(this.keyword, "g"); // 动态正则表达式
this.search_result[index] = this.search_result[index].replace(
reg,
`<span style="color: #ed4014">${this.keyword}</span>`
);
console.log(this.search_result[index]);
} }
}); });
} },
//从联想结果打开公司页面
lenovnoCompanyDetails(item) {
this.$router.push({
path: "/companyDetails",
query: {
id: item.mysql_id,
},
});
}, },
}, },
created() { created() {
...@@ -639,7 +669,7 @@ export default { ...@@ -639,7 +669,7 @@ export default {
} }
:deep(.ant-input) { :deep(.ant-input) {
border-color: transparent; border-color: transparent;
padding-top: 10px; padding-top: 4px;
} }
:deep(.ant-input-group-addon:first-child) { :deep(.ant-input-group-addon:first-child) {
border-color: transparent; border-color: transparent;
...@@ -783,4 +813,12 @@ export default { ...@@ -783,4 +813,12 @@ export default {
} }
} }
} }
.cate {
right: 2%;
position: absolute;
top: 10%;
}
:deep(b) {
color: rgba(191, 36, 40, 1);
}
</style> </style>
...@@ -6,11 +6,14 @@ ...@@ -6,11 +6,14 @@
<div class="company_con1" id="Ability"> <div class="company_con1" id="Ability">
<h2 class="title">科创能力分析</h2> <h2 class="title">科创能力分析</h2>
<div style="display: flex; position: relative"> <div style="display: flex; position: relative">
<div style="width: 50%;">
<EchartsCon <EchartsCon
:option="option1" :option="option1"
:id="'echartsraodar'" :id="'echartsraodar'"
class="echarts" class="echarts"
></EchartsCon> ></EchartsCon>
</div>
<div style="width: 50%; position: relative"> <div style="width: 50%; position: relative">
<EchartsCon :option="option2" :id="'echartsscatter'"></EchartsCon> <EchartsCon :option="option2" :id="'echartsscatter'"></EchartsCon>
<a-popover title="科创能力分析指标"> <a-popover title="科创能力分析指标">
...@@ -68,29 +71,39 @@ export default { ...@@ -68,29 +71,39 @@ export default {
}, },
data() { data() {
return { return {
option1: null,
option2: null, option2: null,
hover: false, hover: false,
con: "", con: "",
}; };
}, },
mounted() { props: {
this.getOption1(); technologyData: Object,
},
beforeMount() {
this.init()
}, },
created() { created() {
this.getOption2(); this.technology = this.$props.technologyData;
console.log()
}, },
methods: { methods: {
init(){
this.getOption1();
this.getOption2();
},
handleAnchorClick(e,link){ handleAnchorClick(e,link){
e.preventDefault(); e.preventDefault();
}, },
getOption1() { getOption1() {
let chart = echarts.init(document.getElementById("echartsraodar")); this.option1 = {
let option1 = {
tooltip: { tooltip: {
trigger: "item", trigger: "item",
// formatter: function (params) { },
// console.log(params); legend:{
// }, show:true,
bottom:10
}, },
radar: [ radar: [
{ {
...@@ -122,7 +135,8 @@ export default { ...@@ -122,7 +135,8 @@ export default {
symbol: 'none', symbol: 'none',
data: [ data: [
{ {
value: [20, 10, 25], // value: [20, 10, 25],
value:[this.technology.company_competitiveness_avg,this.technology.technical_quality_avg,this.technology.technical_volume_avg],
name: "均值", name: "均值",
areaStyle: { areaStyle: {
...@@ -143,7 +157,8 @@ export default { ...@@ -143,7 +157,8 @@ export default {
symbol: 'none', symbol: 'none',
data: [ data: [
{ {
value: [10, 20, 10], // value: [10, 15, 15],
value:[this.technology.company_competitiveness,this.technology.technical_quality,this.technology.technical_volume],
name: "科创能力分值", name: "科创能力分值",
areaStyle: { areaStyle: {
...@@ -160,33 +175,8 @@ export default { ...@@ -160,33 +175,8 @@ export default {
}, },
], ],
}; };
chart.setOption(option1);
}, },
getOption2() { getOption2() {
var data = [
{
name: "技术体量",
value: 30,
},
{
name: "技术质量",
value: 30,
},
{
name: "公司竞争力",
value: 30,
},
]; //已排序好的数组
var ydata = [];
for (var i = 0; i < data.length; i++) {
ydata.push(data[i].name);
}
var datalength = [];
for (var i = 0; i < data.length; i++) {
datalength.push(0);
}
this.option2 = { this.option2 = {
tooltip: { tooltip: {
formatter: "{a} <br/>{b} : {c}", formatter: "{a} <br/>{b} : {c}",
...@@ -210,7 +200,8 @@ export default { ...@@ -210,7 +200,8 @@ export default {
}, },
data: [ data: [
{ {
value: 50, // value:50,
value: this.technology.total_score,
name: "科创能力总分值", name: "科创能力总分值",
}, },
], ],
......
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
>查企业</span >查企业</span
> >
</div> </div>
<div class="search"> <div class="search" v-if="tab_id == 1">
<a-input-search <a-input-search
v-model:value="searchValue" v-model:value="searchValue"
placeholder="请输入关键词" placeholder="请输入关键词"
@search="onSearch" @search="onSearch"
@input="onInput(tab_id)"
> >
<!-- @input="onInput" -->
<template #enterButton> <template #enterButton>
<img <img
style="padding-right: 5px" style="padding-right: 5px"
...@@ -40,7 +40,70 @@ ...@@ -40,7 +40,70 @@
v-for="(item, index) in search_result" v-for="(item, index) in search_result"
:key="item" :key="item"
> >
<div v-html="item" @click="openDetails"></div> <div style="position: relative">
<div
v-if="patent_cate == 'title'"
style="cursor: pointer"
v-html="item.title"
@click="lenovnoPatentDetails(item)"
></div>
<div
v-else
style="cursor: pointer"
v-html="item.gkh"
@click="lenovnoPatentDetails(item)"
></div>
<a-tag class="cate" color="blue" v-if="patent_cate == 'title'"
>专利名称</a-tag
>
<a-tag class="cate" color="blue" v-else>专利号</a-tag>
</div>
</div>
</div>
</div>
<div class="search" v-else>
<a-input-search
v-model:value="searchValue"
placeholder="请输入关键词"
@search="onSearch"
@input="onInput(tab_id)"
>
<template #enterButton>
<img
style="padding-right: 5px"
src="@/static/home/index/icon-search.png"
alt=""
/>搜索
</template>
</a-input-search>
<!-- 联想搜索 -->
<div class="search_result" v-show="search_result_show">
<div
class="search_result_item"
v-for="(item, index) in search_result"
:key="item"
>
<div style="position: relative">
<div
v-if="company_cate == 'company_name'"
style="cursor: pointer"
v-html="item.company_name"
@click="lenovnoCompanyDetails(item)"
></div>
<div
v-else
style="cursor: pointer"
v-html="item.company_name"
@click="lenovnoCompanyDetails(item)"
></div>
<a-tag
class="cate"
color="blue"
v-if="company_cate == 'company_name'"
>公司名称</a-tag
>
<a-tag class="cate" color="blue" v-else>法人信息匹配</a-tag>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -160,24 +223,27 @@ ...@@ -160,24 +223,27 @@
</template> </template>
<script> <script>
import { followList, userBrowse } from "../../utils/userAPI"; import { followList, userBrowse } from "../../utils/userAPI";
import { technicalCooperation } from "../../utils/indexApi"; import {
technicalCooperation,
scientificEvaluationTop,
enterpriseLenovo,
patentLenovo,
} from "../../utils/indexApi";
export default { export default {
name: "home", name: "home",
data() { data() {
return { return {
tab_id: "1", tab_id: "1",
patent_cate: "",
company_cate: "",
search_result_show: false, search_result_show: false,
searchValue: "", searchValue: "",
followList: [], followList: [],
historyList: [], historyList: [],
innovateList: [], innovateList: [],
scientificInnovation:[], scientificInnovation: [],
search_result: [ search_result: [],
"山煤国际能源集团股份有限公司1",
"山煤国际能源集团股份有限公司2",
"山煤国际能源集团股份有限公司3",
],
}; };
}, },
components: {}, components: {},
...@@ -187,6 +253,7 @@ export default { ...@@ -187,6 +253,7 @@ export default {
this.getFollow(); this.getFollow();
this.getHistory(); this.getHistory();
this.getTechnicalCooperation(); this.getTechnicalCooperation();
this.getScientificEvaluationTop();
}, },
getFollow() { getFollow() {
followList({ followList({
...@@ -220,6 +287,14 @@ export default { ...@@ -220,6 +287,14 @@ export default {
} }
}); });
}, },
//获取科创能能力榜单
getScientificEvaluationTop() {
scientificEvaluationTop().then((res) => {
if (res.code == 0) {
this.scientificInnovation = res.data;
}
});
},
//打开历史记录 //打开历史记录
openHistory() { openHistory() {
this.$router.push({ this.$router.push({
...@@ -253,8 +328,26 @@ export default { ...@@ -253,8 +328,26 @@ export default {
}); });
} }
}, },
//从联想结果打开专利页面
lenovnoPatentDetails(item) {
this.$router.push({
path: "/patentDetails",
query: {
id: item.mysql_id,
},
});
},
//从联想结果打开公司页面
lenovnoCompanyDetails(item) {
this.$router.push({
path: "/companyDetails",
query: {
id: item.mysql_id,
},
});
},
//打开企业技术/科创详情页面 //打开企业技术/科创详情页面
openCompany(item){ openCompany(item) {
this.$router.push({ this.$router.push({
path: "/companyDetails", path: "/companyDetails",
query: { query: {
...@@ -303,25 +396,34 @@ export default { ...@@ -303,25 +396,34 @@ export default {
} }
}, },
//联想搜索 //联想搜索
onInput() { onInput(tab_id) {
if (this.searchValue == "") { //专利联想搜索
if (tab_id == 1) {
patentLenovo({ keyword: this.searchValue }).then((res) => {
if (res.code == 0) {
this.search_result_show = true;
this.patent_cate = res.data.title_or_gkh;
this.search_result = res.data.list;
if (this.search_result.length == 0) {
this.search_result_show = false;
}
} else {
this.search_result_show = false; this.search_result_show = false;
}
});
// }
} else { } else {
this.search_result_show = true; this.search_result_show = true;
this.search_result = [ enterpriseLenovo({ keyword: this.searchValue }).then((res) => {
"山煤国际能源集团股份有限公司1", if (res.code == 0) {
"山煤国际能源集团股份有限公司2", this.search_result_show = true;
"山煤国际能源集团股份有限公司3", this.company_cate = res.data.name_or_legal;
]; this.search_result = res.data.list;
this.search_result.map((item, index) => { if (this.search_result.length == 0) {
if (this.searchValue) { this.search_result_show = false;
console.log(this.searchValue); }
const reg = new RegExp(this.searchValue, "g"); // 动态正则表达式 } else {
this.search_result[index] = this.search_result[index].replace( this.search_result_show = false;
reg,
`<span style="color: #ed4014">${this.searchValue}</span>`
);
console.log(this.search_result[index]);
} }
}); });
} }
...@@ -526,4 +628,12 @@ export default { ...@@ -526,4 +628,12 @@ export default {
} }
} }
} }
:deep(b) {
color: rgba(191, 36, 40, 1);
}
.cate {
right: 2%;
position: absolute;
top: 10%;
}
</style> </style>
<template> <template>
<!-- 头部搜索关键词字段 --> <!-- 头部搜索关键词字段 -->
<div class="header_con"> <div class="header_con">
<a-input v-model:value="keyword" :bordered="false" > <a-input
v-model:value="keyword"
:bordered="false"
allowClear
@input="onInput"
>
<template #addonBefore> <template #addonBefore>
<a-select v-model:value="type" class="type"> <a-select v-model:value="type" class="type">
<a-select-option value="企业">查企业</a-select-option> <a-select-option value="企业">查企业</a-select-option>
...@@ -18,13 +23,31 @@ ...@@ -18,13 +23,31 @@
</div> </div>
</template> </template>
</a-input> </a-input>
<!-- 联想搜索 -->
<div class="search_result" v-show="search_result_show"> <div class="search_result" v-show="search_result_show">
<div <div
class="search_result_item" class="search_result_item"
v-for="(item, index) in search_result" v-for="(item, index) in search_result"
:key="item" :key="item"
> >
<div v-html="item" @click="openDetails"></div> <div style="position: relative">
<div
v-if="patent_cate == 'title'"
style="cursor: pointer"
v-html="item.title"
@click="lenovnoPatentDetails(item)"
></div>
<div
v-else
style="cursor: pointer"
v-html="item.gkh"
@click="lenovnoPatentDetails(item)"
></div>
<a-tag class="cate" color="blue" v-if="patent_cate == 'title'"
>专利名称</a-tag
>
<a-tag class="cate" color="blue" v-else>专利号</a-tag>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -126,7 +149,11 @@ ...@@ -126,7 +149,11 @@
<router-view></router-view> <router-view></router-view>
</template> </template>
<script> <script>
import { patents, patentselect } from "../../utils/indexApi"; import {
patents,
patentselect,
patentLenovo,
} from "../../utils/indexApi";
import dayjs from "dayjs"; import dayjs from "dayjs";
import "dayjs/locale/zh-cn"; import "dayjs/locale/zh-cn";
import zh_CN from "ant-design-vue/lib/locale-provider/zh_CN"; import zh_CN from "ant-design-vue/lib/locale-provider/zh_CN";
...@@ -139,11 +166,7 @@ export default { ...@@ -139,11 +166,7 @@ export default {
return { return {
zh_CN, zh_CN,
search_result_show: false, search_result_show: false,
search_result: [ search_result: [],
"山煤国际能源集团股份有限公司1",
"山煤国际能源集团股份有限公司2",
"山煤国际能源集团股份有限公司3",
],
type: "", type: "",
currentPage: 1, currentPage: 1,
value1: [], value1: [],
...@@ -171,21 +194,21 @@ export default { ...@@ -171,21 +194,21 @@ export default {
title: "专利号", title: "专利号",
dataIndex: "gkh", dataIndex: "gkh",
key: "gkh", key: "gkh",
width:180 width: 180,
}, },
{ {
title: "专利标题", title: "专利标题",
dataIndex: "title", dataIndex: "title",
key: "title", key: "title",
ellipsis: true, ellipsis: true,
width:240 width: 240,
}, },
{ {
title: "申请人", title: "申请人",
dataIndex: "zlr", dataIndex: "zlr",
key: "zlr", key: "zlr",
ellipsis: true, ellipsis: true,
width:180 width: 180,
}, },
{ {
title: "公开日", title: "公开日",
...@@ -226,6 +249,7 @@ export default { ...@@ -226,6 +249,7 @@ export default {
}); });
}, },
onsearch() { onsearch() {
this.keyword ? (this.filter = [this.keyword]) : (this.filter = []);
this.getList(this.keyword); this.getList(this.keyword);
}, },
//改变页码 //改变页码
...@@ -348,27 +372,29 @@ export default { ...@@ -348,27 +372,29 @@ export default {
}, },
//联想搜索 //联想搜索
onInput() { onInput() {
if (this.keyword == "") { patentLenovo({ keyword: this.keyword }).then((res) => {
if (res.code == 0) {
this.search_result_show = true;
this.patent_cate = res.data.title_or_gkh;
this.search_result = res.data.list;
if (this.search_result.length == 0) {
this.search_result_show = false; this.search_result_show = false;
}
} else { } else {
this.search_result_show = true; this.search_result_show = false;
this.search_result = [
"山煤国际能源集团股份有限公司1",
"山煤国际能源集团股份有限公司2",
"山煤国际能源集团股份有限公司3",
];
this.search_result.map((item, index) => {
if (this.keyword) {
const reg = new RegExp(this.keyword, "g"); // 动态正则表达式
this.search_result[index] = this.search_result[index].replace(
reg,
`<span style="color: #ed4014">${this.keyword}</span>`
);
console.log(this.search_result[index]);
} }
}); });
}
}, },
//从联想结果打开专利页面
lenovnoPatentDetails(item) {
this.$router.push({
path: "/patentDetails",
query: {
id: item.mysql_id,
},
});
},
}, },
watch: { watch: {
type: function (newV, oldV) { type: function (newV, oldV) {
...@@ -381,12 +407,13 @@ export default { ...@@ -381,12 +407,13 @@ export default {
}, },
}, },
created() { created() {
this.type = "专利";
this.keyword = this.$route.query.keyword; this.keyword = this.$route.query.keyword;
if (!this.keyword && sessionStorage.getItem("searchzl") == "") {
this.getList(this.keyword); this.getList(this.keyword);
this.type = "专利"; }
},
beforeMount() { //历史记录
this.currentPage = sessionStorage.getItem("currentpagezl"); this.currentPage = sessionStorage.getItem("currentpagezl");
if (sessionStorage.getItem("searchzl")) { if (sessionStorage.getItem("searchzl")) {
let searchValue = JSON.parse(sessionStorage.getItem("searchzl")); let searchValue = JSON.parse(sessionStorage.getItem("searchzl"));
...@@ -398,6 +425,7 @@ export default { ...@@ -398,6 +425,7 @@ export default {
this.Filter(); this.Filter();
} }
}, },
beforeMount() {},
computed: {}, computed: {},
}; };
</script> </script>
...@@ -429,7 +457,7 @@ export default { ...@@ -429,7 +457,7 @@ export default {
} }
:deep(.ant-input) { :deep(.ant-input) {
border-color: transparent; border-color: transparent;
padding-top: 10px; padding-top: 5px;
} }
:deep(.ant-input-group-addon:first-child) { :deep(.ant-input-group-addon:first-child) {
border-color: transparent; border-color: transparent;
...@@ -520,4 +548,12 @@ export default { ...@@ -520,4 +548,12 @@ export default {
:deep(.ant-table-tbody) { :deep(.ant-table-tbody) {
cursor: pointer; cursor: pointer;
} }
.cate {
right: 2%;
position: absolute;
top: 10%;
}
:deep(b) {
color: rgba(191, 36, 40, 1);
}
</style> </style>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
class="card_title" class="card_title"
@click="openCompany(item.id, item.company_name)" @click="openCompany(item.id, item.company_name)"
> >
{{ item.company_name }} <div v-html="item.company_name"></div>
</div> </div>
<a-tag class="tags" color="#56CA95">{{ item.status }}</a-tag> <a-tag class="tags" color="#56CA95">{{ item.status }}</a-tag>
<a-tag <a-tag
...@@ -297,9 +297,9 @@ ...@@ -297,9 +297,9 @@
label="专利信息" label="专利信息"
v-if="item.patents.length > 3" v-if="item.patents.length > 3"
> >
{{ item.patents[0] }}<br /> <div v-html="item.patents[0]"></div>
{{ item.patents[1] }}<br /> <div v-html="item.patents[1]"></div>
{{ item.patents[2] }} <div v-html="item.patents[2]"></div>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item <a-descriptions-item
:span="3" :span="3"
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item :span="3" label="专利信息" v-else> <a-descriptions-item :span="3" label="专利信息" v-else>
<template v-for="patent in item.patents"> <template v-for="patent in item.patents">
{{ patent }}<br /> <div v-html="patent"></div>
</template> </template>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item :span="3" label="经营范围"> <a-descriptions-item :span="3" label="经营范围">
...@@ -661,6 +661,15 @@ export default { ...@@ -661,6 +661,15 @@ export default {
"" ""
); );
}); });
item.patents_clone = [...item.patents];
item.patents_clone.forEach((it, index) => {
item.patents_clone[index] = it.replace(/<[^<>]+>/g, "");
});
item.company_name_clone = item.company_name;
item.company_name_clone = item.company_name_clone.replace(
/<[^<>]+>/g,
""
);
}); });
// 设置模板变量的值 // 设置模板变量的值
...@@ -944,10 +953,10 @@ export default { ...@@ -944,10 +953,10 @@ export default {
.tags { .tags {
margin: 5px; margin: 5px;
} }
.card_desc {
:deep(b) { :deep(b) {
color: rgba(191, 36, 40, 1); color: rgba(191, 36, 40, 1);
} }
.card_desc {
:deep(.ant-descriptions-item-label) { :deep(.ant-descriptions-item-label) {
color: #666; color: #666;
font-family: Microsoft YaHei UI-Regular, Microsoft YaHei UI; font-family: Microsoft YaHei UI-Regular, Microsoft YaHei UI;
...@@ -973,4 +982,7 @@ export default { ...@@ -973,4 +982,7 @@ export default {
:deep(.ant-pagination) { :deep(.ant-pagination) {
text-align: center; text-align: center;
} }
:deep(.ant-descriptions-item-container .ant-descriptions-item-content) {
display: block;
}
</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