This commit is contained in:
quantulr
2022-10-19 00:22:39 +08:00
parent e2da1fd45b
commit 88e3b00298
44 changed files with 1827 additions and 1324 deletions

View File

@ -1,9 +1,12 @@
<template>
<div class="box">
<div class="wrap">
<div class="img">
<div class="type">
<!-- <img :src="data.image" alt /> -->
<img src="./img/achieve.png" />
<!-- <img src="./img/achieve.png" /> -->
专利
<!-- <div class="type"> -->
<!-- </div> -->
</div>
<div class="content">
<div class="tit" @click="handleDetail(data.id)">{{ data.title }}</div>
@ -14,12 +17,12 @@
<span>{{ data.industrys[data.industrys.length - 1] }}</span>
</div>
<div class="line">
合作模式
<span>{{ data.mode_title }}</span>
公开日
<span>{{ data.openAt }}</span>
</div>
<div class="line">
技术成熟度
<span>{{ data.maturity_title }}</span>
申请人
<span>{{ data.applyName }}</span>
</div>
</div>
<div>
@ -29,13 +32,13 @@
:data="createdData(data.customers)"
></wordcloud>
</div>
<collectAndVisit
<!-- <collectAndVisit
:is_collect="data.is_collect"
:collect_count="data.collect_count"
:visit_count="data.visit_count"
:object_id="data.id"
:kind="1005"
/>
/> -->
</div>
</div>
</div>
@ -54,7 +57,7 @@ const props = defineProps({
});
function handleDetail(id) {
let routeData = router.resolve({ path: `/searchList/1/detail/${id}` });
let routeData = router.resolve({ path: `/searchList/patent/detail/${id}` });
window.open(routeData.href, "_blank");
}
@ -79,16 +82,23 @@ function createdData(arr) {
.wrap {
display: flex;
flex-direction: row;
.img {
.type {
width: 200px;
height: 150px;
margin-right: 10px;
img {
display: block;
margin: 0;
width: 100%;
height: 100%;
}
background-color: #417bff;
color: white;
font-size: 36px;
font-weight: bold;
display: flex;
justify-content: center;
align-items: center;
// img {
// display: block;
// margin: 0;
// width: 100%;
// height: 100%;
// }
}
.keywords {
width: 129px;

View File

@ -97,7 +97,7 @@ const queryParams = reactive({
function handleDetail(id) {
let routeData = router.resolve({
path: `/searchList/0/detail/${id}`,
path: `/searchList/enterprise/detail/${id}`,
query: { keyword: queryParams.query },
});
window.open(routeData.href, "_blank");

View File

@ -103,14 +103,14 @@
</div>
<div class="content">
<div class="tit" @click="handleDetail(item.id)">
<div style="float: right">
<!-- <div style="float: right">
<span>匹配度</span>
<el-rate
style="display: inline-block"
v-model="state.val"
disabled
></el-rate>
</div>
</div> -->
<div class="text" style="flex: 1">
{{ item.name }}
</div>
@ -147,10 +147,12 @@
<script setup>
import webContact from "@/components/webContact/index.vue";
import request from "@/utils/request";
import { onMounted } from "vue";
import { searchEnterpriseDetail } from "@/api/website/home";
import { onMounted, reactive, ref } from "vue";
import searchContainer from "./components/searchContainer.vue";
import wordcloud from "./components/wordcloud.vue";
import productItem from "./components/productItem.vue";
import { useRoute, useRouter } from "vue-router";
const router = useRouter();
const route = useRoute();
const loading = ref(true);
@ -180,8 +182,8 @@ function recommend() {
method: "post",
data: {
mode: 1,
page_num: state.pageNum,
page_size: state.pageSize,
pageNum: state.pageNum,
pageSize: state.pageSize,
keyword: state.keyword,
},
});
@ -240,31 +242,30 @@ function handleQuery(keyword) {
function getDataList() {
loading.value = true;
recommend().then((res) => {
if (200 == res.code) {
//
state.total = res.data.count;
state.list = res.data.data;
console.log(res.data.data);
}
});
// recommend().then((res) => {
// if (200 == res.code) {
// //
// state.total = res.data.count;
// state.list = res.data.data;
// console.log(res.data.data);
// }
// });
let id = route.params.id;
if (!id) return;
company(id)
.then((res) => {
if (200 == res.code) {
state.companyDetail = res.data;
loading.value = false;
}
searchEnterpriseDetail(id)
.then((resp) => {
state.companyDetail = resp.data;
loading.value = false;
})
.catch(() => {
.catch((err) => {
console.log(err);
loading.value = false;
});
companyProduct(id).then((res) => {
if (200 == res.code) {
state.companyProduct = res.data.data;
}
});
// companyProduct(id).then((res) => {
// if (200 == res.code) {
// state.companyProduct = res.data.data;
// }
// });
}
</script>

View File

@ -52,12 +52,14 @@ import webContact from "@/components/webContact/index.vue";
import gainItem from "./components/gainItem.vue";
import loadMore from "./components/loadMore.vue";
import request from "@/utils/request";
const router = useRouter();
const route = useRoute();
import { onMounted } from "vue";
// import { onMounted } from "vue";
import searchContainer from "./components/searchContainer.vue";
import wordcloud from "./components/wordcloud.vue";
import productItem from "./components/productItem.vue";
import { useRoute, useRouter } from "vue-router";
import { reactive, ref } from "vue";
const router = useRouter();
const route = useRoute();
const loading = ref(true);
const state = reactive({
pageNum: 1,
@ -307,4 +309,4 @@ function getDataList() {
color: #666666;
}
}
</style>
</style>

View File

@ -0,0 +1,415 @@
<template>
<div v-loading="loading">
<searchContainer
bannerKey="首页>专利库>专利详情"
title="企业库"
@handleQuery="handleQuery"
>
<template v-slot>
<div class="head">
<el-breadcrumb separator="/">
<el-breadcrumb-item>
<span class="one">找专利</span>
</el-breadcrumb-item>
<el-breadcrumb-item>
<span>专利详情</span>
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<el-row type="flex">
<div style="flex: 1">
<div class="item">
<el-row type="flex" style="padding: 40px 20px">
<div class="img">
<img :src="state.patentDetail.image" alt />
</div>
<div class="content">
<div class="tit">
<!-- <div style="float: right">
<span>匹配度</span>
<el-rate
style="display: inline-block"
v-model="state.val"
disabled
></el-rate>
</div> -->
<div class="text" style="flex: 1">
{{ state.patentDetail.name }}
</div>
</div>
<div class="line">
企业规模:
<span>{{ state.patentDetail.kind_title }}</span>
</div>
<div class="line">
核心产品及应用场景:
<span>{{ state.patentDetail.product }}</span>
</div>
<div class="line">
企业网站:
<a :href="state.patentDetail.url">
<span>{{ state.patentDetail.url }}</span>
</a>
</div>
</div>
<div class="keywords" style="flex: 1">
<wordcloud
v-if="state.patentDetail.keywords"
:data="createdData(state.patentDetail.keywords)"
></wordcloud>
</div>
<div class="btns">
<div class="order">预约对接</div>
<div class="share">一键分享</div>
</div>
</el-row>
</div>
<div class="product">
<div style="padding: 20px 0">
<div class="pointTit">专利描述</div>
</div>
<div class="html" v-html="state.patentDetail.description"></div>
<div style="padding: 20px 0">
<div class="pointTit">生产方向</div>
</div>
<section v-if="state.patentDetail.directions">
<div
v-for="(item, index) in state.patentDetail.directions"
:key="index"
class="describe"
>
{{ item }}
</div>
</section>
<div style="padding: 20px 0">
<div class="pointTit">产品列表</div>
</div>
<section v-for="item in state.companyProduct" :key="item.id">
<div style="border: 1px solid #dcdcdc; margin-bottom: 10px">
<productItem :data="item"></productItem>
</div>
</section>
</div>
<!-- <div style="padding: 20px 0">
<div class="pointTit">企业推荐</div>
</div>
<div>
<div class="item" v-for="item in state.list" :key="item.id">
<el-row type="flex" style="padding: 40px 20px">
<div class="img">
<img :src="item.image" alt />
</div>
<div class="content">
<div class="tit" @click="handleDetail(item.id)">
<div style="float: right">
<span>匹配度</span>
<el-rate
style="display: inline-block"
v-model="state.val"
disabled
></el-rate>
</div>
<div class="text" style="flex: 1">
{{ item.name }}
</div>
</div>
<div class="line">
企业规模
<span>{{ item.kind_title || "后台暂没提供" }}</span>
</div>
<div class="line">
核心产品及应用场景
<span>{{ item.product }}</span>
</div>
<div class="line">
企业网站
<a :href="item.url">
<span>{{ item.url || "后台暂没提供" }}</span>
</a>
</div>
</div>
<div class="keywords" style="flex: 1">
<wordcloud :data="createdData(item.keywords)"></wordcloud>
</div>
</el-row>
</div>
</div> -->
</div>
<div class="r"><webContact /></div>
</el-row>
</template>
</searchContainer>
</div>
</template>
<script setup>
import webContact from "@/components/webContact/index.vue";
import request from "@/utils/request";
import { searchPatentDetail } from "@/api/website/home";
import { onMounted, reactive, ref } from "vue";
import searchContainer from "./components/searchContainer.vue";
import wordcloud from "./components/wordcloud.vue";
import productItem from "./components/productItem.vue";
import { useRoute, useRouter } from "vue-router";
const router = useRouter();
const route = useRoute();
const loading = ref(true);
const state = reactive({
pageNum: 1,
pageSize: 4,
keyword: "",
val: 3,
patentDetail: {},
companyProduct: [],
arr: [
{
name: "Cat",
value: 26,
},
{
name: "fish",
value: 19,
},
],
});
// 建议 列表前4条
function recommend() {
return request({
url: "/v1/search",
method: "post",
data: {
mode: 1,
pageNum: state.pageNum,
pageSize: state.pageSize,
keyword: state.keyword,
},
});
}
// 公司详情
function company(id) {
return request({
url: "/v1/manage/company",
method: "post",
data: { company_id: id },
});
}
function companyProduct(id) {
return request({
url: "/v1/manage/company/product",
method: "post",
data: { company_id: id, page_num: 1, page_size: 10 },
});
}
function createdData(arr) {
let l = [];
let snap = JSON.parse(JSON.stringify(arr));
snap.map((e) => {
l.push({ name: e, value: 30 });
return { name: e, value: 30 };
});
return l;
}
function handleDetail(id) {
let routeData = router.resolve({
path: `/searchList/0/detail/${id}`,
query: { keyword: state.keyword },
});
window.open(routeData.href, "_blank");
}
function handleList(mode, keyword) {
router.push({ path: `/searchList/${mode}`, query: { keyword } });
}
// 首次加载数据,其后跳转页面
let flag = true;
function handleQuery(keyword) {
state.keyword = keyword;
if (flag) {
getDataList();
flag = false;
} else {
handleList(0, keyword);
}
}
function getDataList() {
loading.value = true;
// recommend().then((res) => {
// if (200 == res.code) {
// // 总条数
// state.total = res.data.count;
// state.list = res.data.data;
// console.log(res.data.data);
// }
// });
let id = route.params.id;
if (!id) return;
searchPatentDetail(id)
.then((resp) => {
state.patentDetail = resp.data;
loading.value = false;
})
.catch((err) => {
console.log(err);
loading.value = false;
});
// companyProduct(id).then((res) => {
// if (200 == res.code) {
// state.companyProduct = res.data.data;
// }
// });
}
</script>
<style lang="scss" scoped>
.head {
padding: 15px 0px;
span {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
}
.one {
color: #333333;
}
}
.r {
display: inline-block;
width: 325px;
margin-left: 14px;
min-height: 200px;
}
.product {
width: 661px;
box-sizing: border-box;
padding: 20px;
background: #fff;
.describe {
font-size: 14px;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
margin-bottom: 5px;
}
}
.pointTit {
position: relative;
padding-left: 10px;
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 500;
color: #333333;
&:before {
content: "";
top: 8px;
left: 0px;
position: absolute;
display: block;
width: 5px;
height: 5px;
background: #0054ff;
}
}
.item {
overflow: hidden;
background-color: #fff;
margin-bottom: 16px;
.btns {
overflow: hidden;
padding-top: 20px;
width: 100%;
div {
text-align: center;
float: right;
cursor: pointer;
user-select: none;
width: 101px;
height: 36px;
font-size: 14px;
font-family: Source Han Sans CN;
font-weight: 400;
line-height: 36px;
box-sizing: border-box;
&:hover {
opacity: 0.7;
}
}
.share {
color: #333333;
background: #f2f6ff;
border: 1px solid #dcdcdc;
margin-right: 10px;
}
.order {
background: #0054ff;
color: #ffffff;
border: none;
}
}
.img {
width: 90px;
margin-right: 12px;
display: flex;
align-items: center;
justify-content: center;
img {
width: 90px;
height: 90px;
border-radius: 50%;
}
}
.content {
display: inline-block;
width: 390px;
.line {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
margin: 10px 0;
span {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 500;
color: #333;
}
}
}
.keywords {
flex: 1;
width: 129px;
height: 129px;
}
.tit {
width: 100%;
overflow: hidden;
cursor: pointer;
.text {
margin-right: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 20px;
font-family: Source Han Sans CN;
font-weight: bold;
color: #333333;
}
}
}
</style>