Commit 88fd0d86 by liudx

联调专利搜索接口

parent 8716cb8b
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"ant-design-vue": "^3.2.20", "ant-design-vue": "^3.2.20",
"axios": "^1.4.0", "axios": "^1.4.0",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"dayjs": "^1.11.9",
"echarts": "^5.4.2", "echarts": "^5.4.2",
"echarts-wordcloud": "^2.1.0", "echarts-wordcloud": "^2.1.0",
"postcss-px2rem": "^0.3.0", "postcss-px2rem": "^0.3.0",
......
...@@ -3,7 +3,8 @@ import { createStore } from 'vuex' ...@@ -3,7 +3,8 @@ import { createStore } from 'vuex'
export default createStore({ export default createStore({
state: { state: {
username:'', username:'',
token:'' token:'',
current:'首页'
}, },
mutations: { mutations: {
setTOKEN(state,payload){ setTOKEN(state,payload){
...@@ -12,7 +13,11 @@ export default createStore({ ...@@ -12,7 +13,11 @@ export default createStore({
setname(state,payload){ setname(state,payload){
// console.log(state,payload) // console.log(state,payload)
this.state.username = payload this.state.username = payload
} },
setcurrent(state,payload){
// console.log(state,payload)
this.state.current = payload
},
}, },
actions: { actions: {
}, },
......
import { get, post,put } from './request'
export const patents = p => get('/api/patent/patents?keyword='+p.keyword+'&page='+p.page+'&size='+p.size);
export const patentselect = p => post('/api/patent/patents',p);
...@@ -11,6 +11,7 @@ import { get, post,put } from './request' ...@@ -11,6 +11,7 @@ import { get, post,put } from './request'
export const sendSms = p => post('/api/common/sendSms',p); export const sendSms = p => post('/api/common/sendSms',p);
export const users = p => get('/api/backup/users?page='+p.page+'&size='+p.size); export const users = p => get('/api/backup/users?page='+p.page+'&size='+p.size);
export const changeStatus = p => put('/api/backup/users/'+p.id,{status:p.status}); export const changeStatus = p => put('/api/backup/users/'+p.id,{status:p.status});
......
<template> <template>
<router-link to="/companyDetails">企业详情</router-link> <div class="company">
<a-breadcrumb class="nav_bread">
<a-breadcrumb-item>首页</a-breadcrumb-item>
<a-breadcrumb-item>企业</a-breadcrumb-item>
</a-breadcrumb>
<div class="company_con">
<div class="company_con_left">
<h3>筛选器</h3>
<a-form :layout="'vertical'" :model="formState">
<a-form-item label="关键词">
<a-input
v-model:value="formState.fieldA"
placeholder="请输入关键词"
/>
</a-form-item>
<a-form-item label="区域">
<a-cascader
v-model:value="value"
multiple
:options="optionsArea"
placeholder="请选择"
></a-cascader>
</a-form-item>
<a-form-item label="国民经济行业">
<a-cascader
v-model:value="value"
multiple
:options="optionsArea"
placeholder="请选择"
></a-cascader>
</a-form-item>
<a-form-item label="科技型企业">
<a-cascader
v-model:value="value"
multiple
:options="optionsArea"
placeholder="请选择"
></a-cascader>
</a-form-item>
<a-form-item
name="range-picker"
label="注册时间"
v-bind="rangeConfig"
>
<a-config-provider :locale="zh_CN">
<a-range-picker
v-model:value="formState['range-picker']"
value-format="YYYY-MM-DD"
/>
</a-config-provider>
</a-form-item>
<a-form-item label="企业创新">
<a-select
v-model:value="value2"
mode="multiple"
placeholder="请选择"
:options="optionsStatus"
></a-select>
</a-form-item>
<a-form-item label="注册资本">
<a-input
v-model:value="formState.fieldA"
style="width: 40%"
placeholder="请输入关键词"
/>
-
<a-input
style="width: 40%"
v-model:value="formState.fieldA"
placeholder="请输入关键词"
/>
</a-form-item>
</a-form>
<a-button
type="default"
size="large"
style="width: 100px"
@click="clearvalue"
>重置</a-button
>&nbsp;
<a-button
type="primary"
size="large"
style="width: 100px"
@click="Filter"
>筛选</a-button
>
</div>
</div>
</div>
<router-link to="/companyDetails">企业详情</router-link>
<router-view></router-view> <router-view></router-view>
</template> </template>
<script> <script>
import dayjs from "dayjs";
import "dayjs/locale/zh-cn";
import zh_CN from "ant-design-vue/lib/locale-provider/zh_CN";
dayjs.locale("zh-cn");
export default { export default {
name:'company', name: "company",
data(){ data() {
return{ return {
zh_CN,
} value: [],
}, value2: [],
components: { optionsArea: [
{
}, label: "Light",
methods:{ value: "light",
children: [
{
label: "Little",
value: "little",
},
],
},
{
label: "Bamboo",
value: "bamboo",
children: [
{
label: "Toy Fish",
value: "fish",
},
{
label: "Toy Cards",
value: "cards",
},
{
label: "Toy Bird",
value: "bird",
},
],
},
],
optionsStatus: [
{ label: "有效", value: "有效" },
{ label: "审查中", value: "审查中" },
],
formState: {
layout: "horizontal",
fieldA: "",
fieldB: "",
},
};
}, },
created(){ components: {},
methods: {},
} created() {},
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.company {
</style> padding: 0 30px;
\ No newline at end of file width: calc(100%);
background-color: #ebebeb;
position: relative;
.nav_bread {
height: 50px;
padding: 20px 3px;
background-color: #ebebeb;
}
.company_con {
background-color: #f3f3f6;
width: 100%;
height: 100%;
display: flex;
.company_con_left {
width: 20%;
height: 90%;
padding: 25px 20px;
background-color: #fff;
}
}
}
</style>
...@@ -4,125 +4,135 @@ ...@@ -4,125 +4,135 @@
<a-breadcrumb class="nav_bread"> <a-breadcrumb class="nav_bread">
<a-breadcrumb-item>首页</a-breadcrumb-item> <a-breadcrumb-item>首页</a-breadcrumb-item>
</a-breadcrumb> </a-breadcrumb>
<!-- 搜索部分 --> <!-- 搜索部分 -->
<div class="home_search"> <div class="home_search">
<div class="search_tab"> <div class="search_tab">
<span>查专利</span> <span
<span>查企业</span> :class="[tab_id == '1' ? 'patent_active' : 'patent']"
</div> @click="changetab('1')"
<div class="search"> >查专利</span
<a-input-search >
v-model:value="searchValue" <span
placeholder="请输入专利名称、专利号等关键词" :class="[tab_id == '1' ? 'company' : 'company_active']"
@search="onSearch" @click="changetab('2')"
> >查企业</span
<template #enterButton> >
<img
style="padding-right: 5px"
src="@/static/home/index/icon-search.png"
alt=""
/>搜索
</template>
</a-input-search>
</div>
<div class="search_info">
<div class="search_tips">
<div class="num">1200w+</div>
<div class="" style="font-family: 'jiangcheng'">企业数量</div>
</div>
<div class="split"></div>
<div class="search_tips">
<div class="num">2400w+</div>
<div class="" style="font-family: 'jiangcheng'">专利数量</div>
</div>
<div class="split"></div>
<div class="search_tips">
<div class="num">3300w+</div>
<div class="" style="font-family: 'jiangcheng'">专利授权数量</div>
</div>
<div class="split"></div>
<div class="search_tips">
<div class="num">20000w+</div>
<div class="" style="font-family: 'jiangcheng'">专利转让数量</div>
</div>
</div>
</div>
<div class="home_list">
<!-- 列表 -->
<div class="ranking">
<div class="ranking_title">
<img src="@/static/home/index/icon-list01.png" alt="" />
<span class="title">&nbsp;企业科创能力榜单</span>
<span class="more">更多</span>
</div>
<!-- 判断是否有数据 -->
<ul v-if="innovateList.length !== 0">
<li class="rank_item" v-for="item in innovateList">
{{ item }}
</li>
</ul>
<div class="empty_img" v-else>
<img src="@/static/home/index/img-empty.png" alt="" />
<div class="nodata">暂无数据</div>
</div> </div>
</div> <div class="search">
<div class="ranking"> <a-input-search
<div class="ranking_title"> v-model:value="searchValue"
<img src="@/static/home/index/icon-list02.png" alt="" /> placeholder="请输入关键词"
<span class="title">&nbsp;企业技术合作榜单</span> @search="onSearch"
<span class="more">更多</span> >
<template #enterButton>
<img
style="padding-right: 5px"
src="@/static/home/index/icon-search.png"
alt=""
/>搜索
</template>
</a-input-search>
</div> </div>
<ul v-if="innovateList.length !== 0"> <div class="search_info">
<li class="rank_item" v-for="item in innovateList"> <div class="search_tips">
{{ item }} <div class="num">1200w+</div>
</li> <div class="" style="font-family: 'jiangcheng'">企业数量</div>
</ul> </div>
<div class="empty_img" v-else> <div class="split"></div>
<img src="@/static/home/index/img-empty.png" alt="" /> <div class="search_tips">
<div class="nodata">暂无数据</div> <div class="num">2400w+</div>
<div class="" style="font-family: 'jiangcheng'">专利数量</div>
</div>
<div class="split"></div>
<div class="search_tips">
<div class="num">3300w+</div>
<div class="" style="font-family: 'jiangcheng'">专利授权数量</div>
</div>
<div class="split"></div>
<div class="search_tips">
<div class="num">20000w+</div>
<div class="" style="font-family: 'jiangcheng'">专利转让数量</div>
</div>
</div> </div>
</div> </div>
<div class="ranking"> <div class="home_list">
<div class="ranking_title"> <!-- 列表 -->
<img src="@/static/home/index/icon-list02.png" alt="" /> <div class="ranking">
<span class="title">&nbsp;浏览记录</span> <div class="ranking_title">
<span class="more">更多</span> <img src="@/static/home/index/icon-list01.png" alt="" />
<span class="title">&nbsp;企业科创能力榜单</span>
<span class="more">更多</span>
</div>
<!-- 判断是否有数据 -->
<ul v-if="innovateList.length !== 0">
<li class="rank_item" v-for="item in innovateList">
{{ item }}
</li>
</ul>
<div class="empty_img" v-else>
<img src="@/static/home/index/img-empty.png" alt="" />
<div class="nodata">暂无数据</div>
</div>
</div> </div>
<ul v-if="followList.length !== 0"> <div class="ranking">
<li class="rank_item" v-for="item in followList"> <div class="ranking_title">
{{ item }} <img src="@/static/home/index/icon-list02.png" alt="" />
</li> <span class="title">&nbsp;企业技术合作榜单</span>
</ul> <span class="more">更多</span>
<div class="empty_img" v-else> </div>
<img src="@/static/home/index/img-empty.png" alt="" /> <ul v-if="innovateList.length !== 0">
<div class="nodata">暂无浏览记录</div> <li class="rank_item" v-for="item in innovateList">
{{ item }}
</li>
</ul>
<div class="empty_img" v-else>
<img src="@/static/home/index/img-empty.png" alt="" />
<div class="nodata">暂无数据</div>
</div>
</div> </div>
</div> <div class="ranking">
<div class="ranking"> <div class="ranking_title">
<div class="ranking_title"> <img src="@/static/home/index/icon-list02.png" alt="" />
<img src="@/static/home/index/icon-list02.png" alt="" /> <span class="title">&nbsp;浏览记录</span>
<span class="title">&nbsp;我的关注</span> <span class="more">更多</span>
<span class="more">更多</span> </div>
<ul v-if="followList.length !== 0">
<li class="rank_item" v-for="item in followList">
{{ item }}
</li>
</ul>
<div class="empty_img" v-else>
<img src="@/static/home/index/img-empty.png" alt="" />
<div class="nodata">暂无浏览记录</div>
</div>
</div> </div>
<ul v-if="followList.length !== 0"> <div class="ranking">
<li class="rank_item" v-for="item in followList"> <div class="ranking_title">
{{ item }} <img src="@/static/home/index/icon-list02.png" alt="" />
</li> <span class="title">&nbsp;我的关注</span>
</ul> <span class="more">更多</span>
<div class="empty_img" v-else> </div>
<img src="@/static/home/index/img-empty.png" alt="" /> <ul v-if="followList.length !== 0">
<div class="nodata">暂无关注数据</div> <li class="rank_item" v-for="item in followList">
{{ item }}
</li>
</ul>
<div class="empty_img" v-else>
<img src="@/static/home/index/img-empty.png" alt="" />
<div class="nodata">暂无关注数据</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
export default { export default {
name: "home", name: "home",
data() { data() {
return { return {
tab_id: "1",
searchValue: "", searchValue: "",
followList: [], followList: [],
innovateList: [ innovateList: [
...@@ -133,8 +143,26 @@ export default { ...@@ -133,8 +143,26 @@ export default {
}; };
}, },
components: {}, components: {},
methods: {}, methods: {
changetab(id) {
// console.log(id)
this.tab_id = id;
},
onSearch() {
if (this.tab_id == "1") {
this.$router.push({
path: "/patent",
params:{
keyword:this.searchValue
}
});
this.$store.commit('setcurrent','专利')
} else {
}
},
},
mounted() {}, mounted() {},
created() {},
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
...@@ -168,18 +196,40 @@ export default { ...@@ -168,18 +196,40 @@ export default {
left: 50px; left: 50px;
span { span {
color: #fff; // color: #fff;
font-family: "jiangcheng"; font-family: "jiangcheng";
display: inline-block; display: inline-block;
width: 140px; width: 140px;
height: 54px; height: 54px;
border-radius: 27px; // border-radius: 27px;
background-color: #4079ff; // background-color: #4079ff;
text-align: center; text-align: center;
line-height: 54px; line-height: 54px;
font-size: 18px; font-size: 18px;
margin-right: 10px; margin-right: 10px;
} }
.patent {
background: url("../../static/home/index/icon-czl-normal.png")
no-repeat;
background-size: 100% 100%;
}
.patent_active {
background: url("../../static/home/index/icon-czl-select.png")
no-repeat;
background-size: 100% 100%;
color: #fff;
}
.company {
background: url("../../static/home/index/icon-cqy-normal.png")
no-repeat;
background-size: 100% 100%;
}
.company_active {
background: url("../../static/home/index/icon-cqy-select.png")
no-repeat;
background-size: 100% 100%;
color: #fff;
}
} }
.search { .search {
position: absolute; position: absolute;
......
...@@ -4,22 +4,22 @@ ...@@ -4,22 +4,22 @@
<HeaderCon></HeaderCon> <HeaderCon></HeaderCon>
<div class="home_main"> <div class="home_main">
<div class="sider"> <div class="sider">{{ this.$store.state.current }}
<div <div
:class="[current == item.name ? 'sider_item active' : 'sider_item ']" :class="[this.$store.state.current == item.name ? 'sider_item active' : 'sider_item ']"
v-for="item in siderArr" v-for="item in siderArr"
:key="item.name" :key="item.name"
@click="changepage(item.name)" @click="changepage(item.name)"
> >
<img <img
:src="current == item.name ? item.img_select : item.img" :src="this.$store.state.current == item.name ? item.img_select : item.img"
alt="" alt=""
class="sider_item_img" class="sider_item_img"
/> />
<div <div
:class="[ :class="[
current == item.name this.$store.state.current == item.name
? ' sider_item_name active ' ? 'sider_item_name active '
: 'sider_item_name', : 'sider_item_name',
]" ]"
> >
...@@ -27,10 +27,9 @@ ...@@ -27,10 +27,9 @@
</div> </div>
</div> </div>
</div> </div>
<router-view /> <router-view />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
...@@ -84,49 +83,55 @@ export default { ...@@ -84,49 +83,55 @@ export default {
methods: { methods: {
changepage(name) { changepage(name) {
// console.log(name) // console.log(name)
switch (name) { switch (name) {
case "企业": case "企业":
this.$router.push({ this.$router.push({
path: "/company", path: "/company",
}); });
this.$store.commit("setcurrent", "企业");
break; break;
case "首页": case "首页":
this.$router.push({ this.$router.push({
path: "/home", path: "/home",
}); });
this.$store.commit("setcurrent", "首页");
break; break;
case "专利": case "专利":
this.$router.push({ this.$router.push({
path: "/patent", path: "/patent",
}); });
this.$store.commit("setcurrent", "专利");
break; break;
case "历史记录": case "历史记录":
this.$store.commit("setcurrent", "历史记录");
this.$router.push({ this.$router.push({
path: "/history", path: "/history",
}); });
this.$store.commit("setcurrent", "历史记录");
break; break;
case "我的关注": case "我的关注":
this.$store.commit("setcurrent", "我的关注");
this.$router.push({ this.$router.push({
path: "/follow", path: "/follow",
}); });
break; break;
} }
this.current = name; this.current = this.$store.state.current;
}, },
}, },
mounted() {}, mounted() {},
created() { created() {
this.username = this.$store.state.username; this.username = this.$store.state.username;
this.current = this.$store.state.current;
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.home { .home {
// height: calc(100% - 80px); height: calc(100%);
width: calc(100% ); width: calc(100%);
.home_main { .home_main {
// height: 100%; height: calc(100% - 80px);
width: 100%; width: 100%;
background-color: #ebebeb; background-color: #ebebeb;
display: flex; display: flex;
......
<template> <template>
<div class="patent">
<a-breadcrumb class="nav_bread">
<a-breadcrumb-item>首页</a-breadcrumb-item>
<a-breadcrumb-item>专利</a-breadcrumb-item>
</a-breadcrumb>
<div class="patent_con">
<div class="patent_con_left">
<h3>筛选器</h3>
<a-form style="height: 90%" :layout="'vertical'" :model="formState">
<a-form-item label="关键词">
<a-input
v-model:value="formState.keyword"
placeholder="请输入关键词"
/>
</a-form-item>
<a-form-item label="专利类型">
<a-select
v-model:value="value1"
mode="multiple"
placeholder="请选择"
:options="optionsType"
></a-select>
</a-form-item>
<a-form-item name="range-picker" label="申请日" v-bind="rangeConfig">
<a-config-provider :locale="zh_CN">
<a-range-picker
v-model:value="formState['rangetime1']"
value-format="YYYY-MM-DD"
/>
</a-config-provider>
</a-form-item>
<a-form-item name="range-picker" label="公开日" v-bind="rangeConfig">
<a-config-provider :locale="zh_CN">
<a-range-picker
v-model:value="formState['rangetime2']"
value-format="YYYY-MM-DD"
/>
</a-config-provider>
</a-form-item>
<a-form-item label="专利状态">
<a-select
v-model:value="value2"
mode="multiple"
:token-separators="[',']"
placeholder="请选择"
:options="optionsStatus"
></a-select>
</a-form-item>
</a-form>
<a-button
type="default"
size="large"
style="width: 100px"
@click="clearvalue"
>重置</a-button
>&nbsp;
<a-button
type="primary"
size="large"
style="width: 100px"
@click="Filter"
>筛选</a-button
>
</div>
<!-- 专利表格结果 -->
<div class="patent_con_right">
<h2>
推荐<span>{{ total }}</span
>条相关结果
<!-- 筛选的标签展示 -->
<div class="filter">
<a-tag color="blue" v-for="item in filter">
{{ item }}
</a-tag>
</div>
</h2>
<a-table
:columns="columns"
:data-source="patentdata"
:pagination="false"
>
<template #bodyCell="{ column, text }">
<template v-if="column.dataIndex === 'name'">
<a>{{ text }}</a>
</template>
</template>
</a-table>
<br />
<a-pagination
@change="onChange"
:total="total"
:showSizeChanger="false"
/>
<br />
</div>
</div>
</div>
<router-link to="/patentDetails">专利</router-link> <router-link to="/patentDetails">专利</router-link>
<router-view></router-view> <router-view></router-view>
</template> </template>
<script> <script>
import { patents, patentselect } from "../../utils/indexApi";
import dayjs from "dayjs";
import "dayjs/locale/zh-cn";
import zh_CN from "ant-design-vue/lib/locale-provider/zh_CN";
dayjs.locale("zh-cn");
export default { export default {
name: "patent", name: "patent",
data() { data() {
return {}; return {
zh_CN,
value1: [],
value2: [],
optionsType: [
{ label: "发明授权", value: "发明授权" },
{ label: "发明申请", value: "发明申请" },
{ label: "外观设计", value: "外观设计" },
{ label: "实用新型", value: "实用新型" },
{ label: "其他", value: "其他" },
],
optionsStatus: [
{ label: "有效", value: "有效" },
{ label: "审查中", value: "审查中" },
],
formState: {
// layout: "horizontal",
keyword: "",
rangetime1: "",
rangetime2: "",
},
columns: [
{
title: "专利号",
dataIndex: "gkh",
key: "gkh",
},
{
title: "专利标题",
dataIndex: "title",
key: "title",
ellipsis: true,
},
{
title: "申请人",
dataIndex: "zlr",
key: "zlr",
},
{
title: "当前权利人",
dataIndex: "zlqrdq",
key: "zlqrdq",
ellipsis: true,
},
{
title: "专利类型",
dataIndex: "zl_type",
key: "zl_type",
},
],
patentdata: [],
filter: [],
};
}, },
components: {}, components: {},
methods: {}, methods: {
created() {}, //获取页面的表格
getList() {
let params = {
keyword: this.$route.params.keyword || "",
page: 1,
size: 10,
};
patents({ ...params }).then((res) => {
console.log(res);
if (res.code == 0) {
this.patentdata = res.data.list;
this.total = res.data.total;
}
});
},
//改变页码
onChange(page) {
let params = {
keyword: this.$route.params.keyword || "",
page: page,
size: 10,
};
patents({ ...params }).then((res) => {
console.log(res);
if (res.code == 0) {
this.patentdata = res.data.list;
this.total = res.data.total;
}
});
},
//重置筛选
clearvalue() {
this.value1 = [];
this.value2 = [];
this.formState = {
keyword: "",
rangetime1: "",
rangetime2: "",
};
},
//点击筛选
Filter() {
this.filter = [];
let parma = {
page: 1,
size: 10,
keyword: this.formState.keyword ? this.formState.keyword : "",
zl_type: this.value1,
sqrq_start: this.formState.rangetime1[0]
? this.formState.rangetime1[0]
: "",
sqrq_end: this.formState.rangetime1[1]
? this.formState.rangetime1[1]
: "",
gkrq_start: this.formState.rangetime2[0]
? this.formState.rangetime2[0]
: "",
gkrq_start: this.formState.rangetime2[1]
? this.formState.rangetime2[1]
: "",
zl_status: this.value2,
};
patentselect({ parma }).then((res) => {
//将筛选条件渲染到页面上
for (var key in parma) {
if (key == "keyword") {
parma.keyword? this.filter.push(parma.keyword):'';
} else if (key == "zl_type") {
if (this.value1.length != 0) {
this.value1.forEach((item) => {
this.filter.push(item);
});
}
} else if (key == "zl_status") {
if (this.value2.length != 0) {
this.value2.forEach((item) => {
this.filter.push(item);
});
}
}
}
});
},
},
created() {
this.getList();
// console.log(this.$route)
},
computed: {},
}; };
</script> </script>
<style lang="less" scoped></style> <style lang="less" scoped>
.patent {
padding: 0 30px;
width: calc(100%);
background-color: #ebebeb;
position: relative;
.nav_bread {
height: 50px;
padding: 20px 3px;
background-color: #ebebeb;
}
.patent_con {
background-color: #f3f3f6;
width: 100%;
height: 100%;
display: flex;
justify-content: space-evenly;
.patent_con_left {
width: 20%;
height: 90%;
padding: 25px 20px;
background-color: #fff;
}
.patent_con_right {
background-color: #fff;
width: 78%;
padding: 25px 20px;
span {
font-size: 20px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-weight: bold;
color: #4079ff;
}
.filter {
font-size: 15px;
display: inline-block;
span {
font-size: 15px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 400;
}
}
}
}
}
</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