Commit afc70db8 by liudx

添加返回记录保存记录

parent 95dd3cf7
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
</div> </div>
<router-view/> --> <router-view/> -->
<router-view/> <router-view/>
</template> </template>
<style lang="less"> <style lang="less">
...@@ -15,7 +16,7 @@ ...@@ -15,7 +16,7 @@
// text-align: center; // text-align: center;
color: #2c3e50; color: #2c3e50;
box-sizing: border-box !important; box-sizing: border-box !important;
background-color: #F2F3F5; background-color: #f2f3f5;
} }
@font-face { @font-face {
font-family: "jiangcheng"; font-family: "jiangcheng";
...@@ -24,28 +25,26 @@ ...@@ -24,28 +25,26 @@
font-style: normal; font-style: normal;
} }
html,body,#app{ html,
// height: 100%; body,
// min-height:980px; #app {
// height: 100%;
// min-height:1020px;
} }
::-webkit-scrollbar ::-webkit-scrollbar {
{
width: 10px; width: 10px;
} }
/*定义滚动条轨道 内阴影+圆角*/ /*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track ::-webkit-scrollbar-track {
{
border-radius: 10px; border-radius: 10px;
background-color: rgba(0,0,0,0.1); background-color: rgba(0, 0, 0, 0.1);
} }
/*定义滑块 内阴影+圆角*/ /*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb ::-webkit-scrollbar-thumb {
{
border-radius: 10px; border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
background-color: rgba(0,0,0,0.1); background-color: rgba(0, 0, 0, 0.1);
} }
</style> </style>
...@@ -49,20 +49,22 @@ export default { ...@@ -49,20 +49,22 @@ export default {
}, },
mounted() { mounted() {
this.init(); this.init();
}, },
methods: { methods: {
init() { init() {
if (document.getElementById(this.id) == null) { if (document.getElementById(this.id) == null) {
return; return;
} }
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);
}, },
}, },
}; };
......
import { createRouter, createWebHistory ,createWebHashHistory } from 'vue-router' import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
// import HomeView from '../views/HomeView.vue' // import HomeView from '../views/HomeView.vue'
import login from "../views/login/index.vue" import login from "../views/login/index.vue"
...@@ -50,7 +50,7 @@ const routes = [ ...@@ -50,7 +50,7 @@ const routes = [
name: 'AdminLogin', name: 'AdminLogin',
component: AdminLogin, component: AdminLogin,
//如果登录的是管理员页面,那么不允许查看用户 //如果登录的是管理员页面,那么不允许查看用户
beforeEach:(to,from,next)=>{ beforeEach: (to, from, next) => {
console.log(to) console.log(to)
} }
}, },
...@@ -73,12 +73,35 @@ const routes = [ ...@@ -73,12 +73,35 @@ const routes = [
{ {
path: '/company', path: '/company',
name: 'company', name: 'company',
component: company component: company,
beforeEnter: (to, from, next) => {
// console.log(from)
if (from.path != '/companyDetails') {
sessionStorage.setItem("currentpageqy", 1);
sessionStorage.setItem("searchqy", '');
next()
} else {
next()
}
}
}, },
{ {
path: '/patent', path: '/patent',
name: 'patent', name: 'patent',
component: patent, component: patent,
beforeEnter: (to, from, next) => {
// console.log(from)
if (from.path != '/patentDetails') {
sessionStorage.setItem("currentpagezl", 1);
sessionStorage.setItem("searchzl", '');
next()
} else {
next()
}
}
}, },
{ {
path: '/history', path: '/history',
...@@ -165,21 +188,21 @@ const routes = [ ...@@ -165,21 +188,21 @@ const routes = [
] ]
const router = createRouter({ const router = createRouter({
history: createWebHashHistory(process.env.BASE_URL), history: createWebHashHistory(process.env.BASE_URL),
mode:'hash', mode: 'hash',
routes, routes,
}) })
router.beforeEach((to,from,next)=>{ router.beforeEach((to, from, next) => {
if (to.path === '/login' || to.path === '/adminLogin' ||to.path === '/forget') { if (to.path === '/login' || to.path === '/adminLogin' || to.path === '/forget') {
next(); next();
} }
else{ else {
let token = localStorage.getItem('token'); let token = localStorage.getItem('token');
if (!token) { if (!token) {
message.error('请先登录') message.error('请先登录')
next('/login'); next('/login');
}else{ } else {
next(); next();
} }
} }
......
...@@ -231,7 +231,8 @@ export default { ...@@ -231,7 +231,8 @@ export default {
}, },
//返回上一页 //返回上一页
backbtn() { backbtn() {
this.$router.go(-1); // this.$router.go(-1);
this.$router.back();
}, },
//页面初始化 //页面初始化
init(id) { init(id) {
...@@ -697,8 +698,6 @@ export default { ...@@ -697,8 +698,6 @@ export default {
//添加数据 //添加数据
if (this.jointData.joint_application.length != 0) { if (this.jointData.joint_application.length != 0) {
this.jointData.joint_application.forEach((item, index) => { this.jointData.joint_application.forEach((item, index) => {
if (index == 0) {
} else {
points.push({ points.push({
name: item.name, name: item.name,
symbolSize: 40, symbolSize: 40,
...@@ -710,7 +709,6 @@ export default { ...@@ -710,7 +709,6 @@ export default {
: -300 * Math.ceil(index / 2), : -300 * Math.ceil(index / 2),
y: 80 * (10 - index), y: 80 * (10 - index),
}); });
}
links.push({ links.push({
source: this.baseinfo.company_name, source: this.baseinfo.company_name,
......
...@@ -9,32 +9,44 @@ ...@@ -9,32 +9,44 @@
在遇到技术创新难题时,企业往往会借助外部机构的研究优势和实力来共同研发解决。在某个技术领域企业的产学研合作次数越多,可以反映企业在该技术领域布局的意愿更强烈。同时,关注产学研合作的主要伙伴,可进一步分析企业在主要布局领域的技术依赖程度和权属纠纷可能性。该企业与其他单位共进行了<span 在遇到技术创新难题时,企业往往会借助外部机构的研究优势和实力来共同研发解决。在某个技术领域企业的产学研合作次数越多,可以反映企业在该技术领域布局的意愿更强烈。同时,关注产学研合作的主要伙伴,可进一步分析企业在主要布局领域的技术依赖程度和权属纠纷可能性。该企业与其他单位共进行了<span
class="color" class="color"
>{{ joint.all_nums }}</span >{{ joint.all_nums }}</span
>次产学研合作。其中,与<span class="color">{{ >次产学研合作。
joint.max_name_apply <template v-if="!joint.all_nums"> </template>
}}</span <template v-else>
其中,与<span class="color">{{ joint.max_name_apply }}</span
>最为密切,合作次数为<span class="color">{{ >最为密切,合作次数为<span class="color">{{
joint.max_value_apply joint.max_value_apply
}}</span }}</span
>次,与该企业合作次数最多的申请人如下图所示。 >次,与该企业合作次数最多的申请人如下图所示。
</template>
</p> </p>
<EchartsCon :option="option1" :id="'echarts1'"></EchartsCon> <EchartsCon
:option="option1"
:id="'echarts1'"
v-if="joint.all_nums"
></EchartsCon>
</div> </div>
<!-- 专利购买 --> <!-- 专利购买 -->
<div class="company_con1" id="PatentPurchase"> <div class="company_con1" id="PatentPurchase">
<h2 class="title">专利购买</h2> <h2 class="title">专利购买</h2>
<p> <p>
分析该企业专利购买历史,了解该企业向哪些专利权人购买了专利,以及购买了哪些专利。如果该企业购买专利数量较多,需要关注这些外购专利是否为企业的核心专利,进而分析企业的研发能力。该企业向<span 分析该企业专利购买历史,了解该企业向哪些专利权人购买了专利,以及购买了哪些专利。如果该企业购买专利数量较多,需要关注这些外购专利是否为企业的核心专利,进而分析企业的研发能力。
class="color" <template v-if="patentPurchase.max_value_purchase">
>{{ patentPurchase.max_name_purchase }}</span 该企业向<span class="color">{{
patentPurchase.max_name_purchase
}}</span
>购买专利最多,为<span class="color">{{ >购买专利最多,为<span class="color">{{
patentPurchase.max_value_purchase patentPurchase.max_value_purchase
}}</span }}</span
>件。 >件。
</template>
<template v-else>
该企业购买专利为<span class="color">{{
patentPurchase.max_value_purchase
}}</span
>件。
</template>
</p> </p>
<a-empty v-if="empty2"/> <EchartsCon :option="option2" :id="'echarts2'" v-if="patentPurchase.max_value_purchase"></EchartsCon>
<EchartsCon :option="option2" :id="'echarts2'" v-else></EchartsCon>
</div> </div>
</div> </div>
<div class="company_con_anchor"> <div class="company_con_anchor">
...@@ -71,7 +83,7 @@ export default { ...@@ -71,7 +83,7 @@ export default {
option2: null, option2: null,
joint: {}, joint: {},
company_name: "", company_name: "",
empty2:false empty2: false,
}; };
}, },
props: { props: {
...@@ -113,8 +125,7 @@ export default { ...@@ -113,8 +125,7 @@ export default {
//添加数据 //添加数据
if (this.joint.joint_application.length != 0) { if (this.joint.joint_application.length != 0) {
this.joint.joint_application.forEach((item, index) => { this.joint.joint_application.forEach((item, index) => {
if (index == 0) {
} else {
points.push({ points.push({
name: item.name, name: item.name,
symbolSize: 40, symbolSize: 40,
...@@ -124,9 +135,9 @@ export default { ...@@ -124,9 +135,9 @@ export default {
index % 2 == 1 index % 2 == 1
? 300 * Math.ceil(index / 2) ? 300 * Math.ceil(index / 2)
: -300 * Math.ceil(index / 2), : -300 * Math.ceil(index / 2),
y:80*(10-index) y: 80 * (10 - index),
}); });
}
links.push({ links.push({
source: this.company_name, source: this.company_name,
...@@ -221,8 +232,8 @@ export default { ...@@ -221,8 +232,8 @@ export default {
}, },
getOptions2() { getOptions2() {
const dataList = this.patentPurchase.patent_purchase; const dataList = this.patentPurchase.patent_purchase;
if(dataList.length == 0){ if (dataList.length == 0) {
this.empty2 = true this.empty2 = true;
} }
this.option2 = { this.option2 = {
tooltip: { tooltip: {
......
...@@ -65,20 +65,22 @@ ...@@ -65,20 +65,22 @@
<a-col :span="11"> <a-col :span="11">
<a-form-item name="capital_nums_min"> <a-form-item name="capital_nums_min">
<a-input <a-input
v-model="formState.capital_nums_min" v-model:value="formState.capital_nums_min"
style="width: 80%" style="width: 80%"
placeholder="请输入数值" placeholder="请输入数值"
></a-input>&nbsp; ></a-input
>&nbsp;
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="1">-</a-col> <a-col :span="1">-</a-col>
<a-col :span="11"> <a-col :span="11">
<a-form-item name="capital_nums_max"> <a-form-item name="capital_nums_max">
<a-input <a-input
v-model="formState.capital_nums_max" v-model:value="formState.capital_nums_max"
style="width: 80%" style="width: 80%"
placeholder="请输入数值" placeholder="请输入数值"
></a-input>&nbsp; ></a-input
>&nbsp;
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
...@@ -126,7 +128,7 @@ ...@@ -126,7 +128,7 @@
class="card" class="card"
v-for="item in companylist" v-for="item in companylist"
:key="item" :key="item"
@click="openCompany(item.mysql_id,item.company_name)" @click="openCompany(item.mysql_id, item.company_name)"
> >
<div class="card_title">{{ item.company_name }}</div> <div class="card_title">{{ item.company_name }}</div>
<!-- 关注 --> <!-- 关注 -->
...@@ -183,6 +185,7 @@ ...@@ -183,6 +185,7 @@
</div> </div>
<br /> <br />
<a-pagination <a-pagination
v-model:current="currentPage"
@change="onChange" @change="onChange"
:total="total" :total="total"
:showSizeChanger="false" :showSizeChanger="false"
...@@ -210,6 +213,7 @@ export default { ...@@ -210,6 +213,7 @@ export default {
return { return {
zh_CN, zh_CN,
total: 0, total: 0,
currentPage: 1,
keyword: "", keyword: "",
type: "", type: "",
valueArea: [], valueArea: [],
...@@ -229,8 +233,8 @@ export default { ...@@ -229,8 +233,8 @@ export default {
industryvalue: [], industryvalue: [],
valueType: [], valueType: [],
formState: { formState: {
capital_nums_min: null, capital_nums_min: "",
capital_nums_max: null, capital_nums_max: "",
rangetime1: [], rangetime1: [],
}, },
filter: [], filter: [],
...@@ -273,6 +277,8 @@ export default { ...@@ -273,6 +277,8 @@ export default {
}, },
//改变页码 //改变页码
onChange(page) { onChange(page) {
//获取当前页码数
this.currentPage = page;
//修改省份的格式 //修改省份的格式
let area = []; let area = [];
if (this.valueArea.length != 0) { if (this.valueArea.length != 0) {
...@@ -314,9 +320,9 @@ export default { ...@@ -314,9 +320,9 @@ export default {
capital_nums_max: Number(this.formState.capital_nums_max), capital_nums_max: Number(this.formState.capital_nums_max),
innovate: this.valueInnovation, innovate: this.valueInnovation,
}; };
//请求接口 //请求接口
enterpriseSelect({ ...params }).then((res) => { enterpriseSelect({ ...params }).then((res) => {
console.log(res);
if (res.code == 0) { if (res.code == 0) {
this.companylist = res.data.list; this.companylist = res.data.list;
this.total = res.data.total; this.total = res.data.total;
...@@ -326,7 +332,7 @@ export default { ...@@ -326,7 +332,7 @@ export default {
//重置筛选 //重置筛选
clearvalue() { clearvalue() {
this.valueArea = []; this.valueArea = [];
this.valueInnovation = []; this.valueInnovation = "";
this.valueType = []; this.valueType = [];
this.formState = { this.formState = {
capital_nums_min: "", capital_nums_min: "",
...@@ -364,7 +370,7 @@ export default { ...@@ -364,7 +370,7 @@ export default {
//企业结果 //企业结果
this.companylist = []; this.companylist = [];
let params = { let params = {
page: 1, page: this.currentPage,
size: 10, size: 10,
keyword: this.keyword ? this.keyword : null, keyword: this.keyword ? this.keyword : null,
area: area, area: area,
...@@ -378,7 +384,7 @@ export default { ...@@ -378,7 +384,7 @@ export default {
: null, : null,
capital_nums_min: Number(this.formState.capital_nums_min), capital_nums_min: Number(this.formState.capital_nums_min),
capital_nums_max: Number(this.formState.capital_nums_max), capital_nums_max: Number(this.formState.capital_nums_max),
innovate: this.valueInnovation?this.valueInnovation:null, innovate: this.valueInnovation ? this.valueInnovation : null,
}; };
//将筛选条件渲染到页面上//搜索结果标签 //将筛选条件渲染到页面上//搜索结果标签
let filter = []; let filter = [];
...@@ -393,14 +399,14 @@ export default { ...@@ -393,14 +399,14 @@ export default {
if (key == "keyword") { if (key == "keyword") {
params.keyword ? filter.push(params.keyword) : ""; params.keyword ? filter.push(params.keyword) : "";
} }
if(key == "innovate"){ if (key == "innovate") {
params.innovate?filter.push(params.innovate) : ""; params.innovate ? filter.push(params.innovate) : "";
} }
} }
this.filter = filter; this.filter = filter;
//请求接口 //请求接口
enterpriseSelect({ ...params }).then((res) => { enterpriseSelect({ ...params }).then((res) => {
console.log(res); // console.log(res);
if (res.code == 0) { if (res.code == 0) {
this.companylist = res.data.list; this.companylist = res.data.list;
this.total = res.data.total; this.total = res.data.total;
...@@ -408,12 +414,25 @@ export default { ...@@ -408,12 +414,25 @@ export default {
}); });
}, },
//打开企业详情 //打开企业详情
openCompany(id,company_name) { openCompany(id, company_name) {
//保留历史搜索记录
let historysearch = {
keyword: this.keyword,
valueArea: this.valueArea,
industryvalue: this.industryvalue,
valueType: this.valueType,
rangetime1: this.formState.rangetime1,
capital_nums_min: this.formState.capital_nums_min,
capital_nums_max: this.formState.capital_nums_max,
valueInnovation: this.valueInnovation,
};
sessionStorage.setItem("currentpageqy", this.currentPage);
sessionStorage.setItem("searchqy", JSON.stringify(historysearch));
this.$router.push({ this.$router.push({
path: "/companyDetails", path: "/companyDetails",
query: { query: {
id: id, id: id,
name:company_name name: company_name,
}, },
}); });
}, },
...@@ -425,9 +444,13 @@ export default { ...@@ -425,9 +444,13 @@ export default {
this.getindustryType(); this.getindustryType();
this.optionsArea = arealist; this.optionsArea = arealist;
this.keyword = this.$route.query.keyword; this.keyword = this.$route.query.keyword;
if (!sessionStorage.getItem("searchqy")) {
this.getCompanyList(this.keyword); this.getCompanyList(this.keyword);
}
this.valueInnovation = this.$route.query.valueInnovation; this.valueInnovation = this.$route.query.valueInnovation;
this.type = "企业"; this.type = "企业";
}, },
watch: { watch: {
type: function (newV, oldV) { type: function (newV, oldV) {
...@@ -439,6 +462,21 @@ export default { ...@@ -439,6 +462,21 @@ export default {
} }
}, },
}, },
beforeMount() {
this.currentPage = sessionStorage.getItem("currentpageqy");
if (sessionStorage.getItem("searchqy")) {
let searchValue = JSON.parse(sessionStorage.getItem("searchqy"));
this.valueArea = searchValue.valueArea;
this.industryvalue = searchValue.industryvalue;
this.valueType = searchValue.valueType;
this.formState.rangetime1 = searchValue.rangetime1;
this.formState.capital_nums_min = searchValue.capital_nums_min;
this.formState.capital_nums_max = searchValue.capital_nums_max;
this.valueInnovation = searchValue.valueInnovation;
this.keyword = searchValue.keyword;
this.Filter();
}
},
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<!-- 研发可持续性 --> <!-- 研发可持续性 -->
<div class="company_con1" id="ResearchSustainable"> <div class="company_con1" id="ResearchSustainable">
<h2 class="title">研发可持续性</h2> <h2 class="title">研发可持续性</h2>
<p> <p v-if="deveSustainData.patent_application_num">
企业的总专利申请量为<span class="color">{{ 企业的总专利申请量为<span class="color">{{
deveSustainData.patent_application_num deveSustainData.patent_application_num
}}</span }}</span
...@@ -47,18 +47,24 @@ ...@@ -47,18 +47,24 @@
}}</span }}</span
> >
</p> </p>
<a-radio-group v-model:value="tabchange" style="margin: 8px"> <p v-else>
企业的总专利申请量为<span class="color">{{
deveSustainData.patent_application_num
}}</span
>
</p>
<a-radio-group v-model:value="tabchange" style="margin: 8px" v-if="deveSustainData.patent_application_num">
<a-radio-button value="1">专利申请年份趋势</a-radio-button> <a-radio-button value="1">专利申请年份趋势</a-radio-button>
<a-radio-button value="2">历年专利申请及授权</a-radio-button> <a-radio-button value="2">历年专利申请及授权</a-radio-button>
</a-radio-group> </a-radio-group>
<EchartsCon <EchartsCon
v-if="tabchange == 1" v-if="tabchange == 1 &&deveSustainData.patent_application_num"
:id="'applyTrend'" :id="'applyTrend'"
:option="option1" :option="option1"
:style="'height:300px'" :style="'height:300px'"
></EchartsCon> ></EchartsCon>
<EchartsCon <EchartsCon
v-if="tabchange == 2" v-if="tabchange == 2&& deveSustainData.patent_application_num"
:id="'patentAuthorize'" :id="'patentAuthorize'"
:option="option2" :option="option2"
:style="'height:300px;width:100%;'" :style="'height:300px;width:100%;'"
...@@ -90,16 +96,19 @@ ...@@ -90,16 +96,19 @@
:style="'width:33%;'" :style="'width:33%;'"
:id="'echartsone'" :id="'echartsone'"
:option="option3" :option="option3"
v-if="devstructureData.patent_application_num"
></EchartsCon> ></EchartsCon>
<EchartsCon <EchartsCon
:style="'width:33%;'" :style="'width:33%;'"
:id="'echartstwo'" :id="'echartstwo'"
:option="option4" :option="option4"
v-if="devstructureData.patent_application_num"
></EchartsCon> ></EchartsCon>
<EchartsCon <EchartsCon
:style="'width:33%;'" :style="'width:33%;'"
:id="'echartsthree'" :id="'echartsthree'"
:option="option5" :option="option5"
v-if="devstructureData.patent_application_num"
></EchartsCon> ></EchartsCon>
</div> </div>
</div> </div>
......
...@@ -180,11 +180,13 @@ export default { ...@@ -180,11 +180,13 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.home { .home {
height: calc(100%); height: calc(100%);
min-height: 960px;
width: calc(100%); width: calc(100%);
position: relative; position: relative;
.home_main { .home_main {
height: calc(100% - 80px); height: 100%;
min-height: 960px;
width: 100%; width: 100%;
background-color: #ebebeb; background-color: #ebebeb;
display: flex; display: flex;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<a-select-option value="专利">查专利</a-select-option> <a-select-option value="专利">查专利</a-select-option>
</a-select> </a-select>
</template> </template>
<template #addonAfter > <template #addonAfter>
<div @click="onsearch"> <div @click="onsearch">
<img <img
style="padding-right: 5px" style="padding-right: 5px"
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
alt="" alt=""
/>搜索 />搜索
</div> </div>
</template> </template>
</a-input> </a-input>
</div> </div>
...@@ -28,7 +27,7 @@ ...@@ -28,7 +27,7 @@
<div class="patent_con"> <div class="patent_con">
<div class="patent_con_left"> <div class="patent_con_left">
<h3>筛选器</h3> <h3>筛选器</h3>
<a-form style="height: 90%" :layout="'vertical'" :model="formState"> <a-form style="height: 80%" :layout="'vertical'" :model="formState">
<a-form-item label="专利类型"> <a-form-item label="专利类型">
<a-select <a-select
v-model:value="value1" v-model:value="value1"
...@@ -42,7 +41,6 @@ ...@@ -42,7 +41,6 @@
<a-range-picker <a-range-picker
v-model:value="formState['rangetime1']" v-model:value="formState['rangetime1']"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
/> />
</a-config-provider> </a-config-provider>
</a-form-item> </a-form-item>
...@@ -51,7 +49,6 @@ ...@@ -51,7 +49,6 @@
<a-range-picker <a-range-picker
v-model:value="formState['rangetime2']" v-model:value="formState['rangetime2']"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
/> />
</a-config-provider> </a-config-provider>
</a-form-item> </a-form-item>
...@@ -66,18 +63,10 @@ ...@@ -66,18 +63,10 @@
</a-form-item> </a-form-item>
</a-form> </a-form>
<a-button <a-button type="default" size="large" class="btn" @click="clearvalue"
type="default"
size="large"
class="btn"
@click="clearvalue"
>重置</a-button >重置</a-button
>&nbsp; >&nbsp;
<a-button <a-button type="primary" size="large" class="btn" @click="Filter"
type="primary"
size="large"
class="btn"
@click="Filter"
>筛选</a-button >筛选</a-button
> >
</div> </div>
...@@ -108,6 +97,7 @@ ...@@ -108,6 +97,7 @@
</a-table> </a-table>
<br /> <br />
<a-pagination <a-pagination
v-model:current="currentPage"
@change="onChange" @change="onChange"
:total="total" :total="total"
:showSizeChanger="false" :showSizeChanger="false"
...@@ -115,8 +105,6 @@ ...@@ -115,8 +105,6 @@
<br /> <br />
</div> </div>
</div> </div>
</div> </div>
<router-view></router-view> <router-view></router-view>
...@@ -134,7 +122,8 @@ export default { ...@@ -134,7 +122,8 @@ export default {
data() { data() {
return { return {
zh_CN, zh_CN,
type:'', type: "",
currentPage:1,
value1: [], value1: [],
value2: [], value2: [],
keyword: "", keyword: "",
...@@ -186,7 +175,7 @@ export default { ...@@ -186,7 +175,7 @@ export default {
], ],
patentdata: [], patentdata: [],
filter: [], filter: [],
total:0 total: 0,
}; };
}, },
components: {}, components: {},
...@@ -194,29 +183,27 @@ export default { ...@@ -194,29 +183,27 @@ export default {
//获取页面的表格 //获取页面的表格
getList(keyword) { getList(keyword) {
let params = { let params = {
keyword: keyword|| '', keyword: keyword || "",
page: 1, page: this.currentPage,
size: 10, size: 10,
}; };
patents({ ...params }).then((res) => { patents({ ...params }).then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.patentdata = res.data.list; this.patentdata = res.data.list;
this.total = res.data.total; this.total = res.data.total;
} } else {
else{ message.error(res.data.msg);
message.error(res.data.msg)
} }
}); });
}, },
onsearch(){ onsearch() {
this.getList(this.keyword) this.getList(this.keyword);
}, },
//改变页码 //改变页码
onChange(page) { onChange() {
this.patentdata = []; this.patentdata = [];
let params = { let params = {
page: page, page: this.currentPage,
size: 10, size: 10,
keyword: this.keyword ? this.keyword : null, keyword: this.keyword ? this.keyword : null,
zl_type: this.value1, zl_type: this.value1,
...@@ -258,7 +245,7 @@ export default { ...@@ -258,7 +245,7 @@ export default {
//专利列表 //专利列表
this.patentdata = []; this.patentdata = [];
let parma = { let parma = {
page: 1, page: this.currentPage,
size: 10, size: 10,
keyword: this.keyword ? this.keyword : null, keyword: this.keyword ? this.keyword : null,
zl_type: this.value1, zl_type: this.value1,
...@@ -298,9 +285,8 @@ export default { ...@@ -298,9 +285,8 @@ export default {
} }
} }
} }
} } else {
else{ this.$message(res.msg);
this.$message(res.msg)
} }
}); });
}, },
...@@ -308,13 +294,22 @@ export default { ...@@ -308,13 +294,22 @@ export default {
rowClick(record, index) { rowClick(record, index) {
return { return {
onClick: (event) => { onClick: (event) => {
console.log(record); //保留历史搜索记录
let historysearch = {
keyword: this.keyword,
value1:this.value1,
rangetime1:this.formState.rangetime1,
rangetime2:this.formState.rangetime2,
value2:this.value2,
};
sessionStorage.setItem("currentpagezl", this.currentPage);
sessionStorage.setItem("searchzl", JSON.stringify(historysearch));
this.$router.push({ this.$router.push({
path: "/patentDetails", path: "/patentDetails",
query: { query: {
id: record.mysql_id, id: record.mysql_id,
zlcode:record.gkh, zlcode: record.gkh,
title:record.title title: record.title,
}, },
}); });
}, },
...@@ -337,6 +332,18 @@ export default { ...@@ -337,6 +332,18 @@ export default {
this.getList(this.keyword); this.getList(this.keyword);
this.type = "专利"; this.type = "专利";
}, },
beforeMount(){
this.currentPage = sessionStorage.getItem("currentpagezl");
if (sessionStorage.getItem("searchzl")) {
let searchValue = JSON.parse(sessionStorage.getItem("searchzl"));
this.value1 = searchValue.value1;
this.formState.rangetime1 = searchValue.rangetime1;
this.formState.rangetime2 = searchValue.rangetime2;
this.value2 = searchValue.value2;
this.keyword = searchValue.keyword;
this.Filter();
}
},
computed: {}, computed: {},
}; };
</script> </script>
...@@ -409,7 +416,7 @@ export default { ...@@ -409,7 +416,7 @@ export default {
// height: 90%; // height: 90%;
padding: 25px 20px; padding: 25px 20px;
background-color: #fff; background-color: #fff;
.btn{ .btn {
width: 100px; width: 100px;
margin-top: -40px; margin-top: -40px;
} }
......
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