<!-- -->
|
<template>
|
<div class="search">
|
<main>
|
<section class="left">
|
<!-- <div class="left_search">
|
<a-input-search
|
v-model="keyWord"
|
placeholder="关键词、公司名等"
|
allowClear
|
size="large"
|
enter-button
|
@search="reloadPageList"
|
/>
|
</div> -->
|
<div style="padding:20px 25px">
|
<ul class="condition-box" v-if="conditionAnd.length">
|
<li v-for="(item, index) in conditionAnd" :key="index">
|
<span :class="item.rule">{{ item.rule == 'in' ? '筛选' : "过滤" }}</span>
|
<span class="label" :title="item.name">{{ item.name }}:</span>
|
<span class="list">
|
<template v-for="it in item.checkedList">
|
{{ it.text || it.code }}
|
</template>
|
</span>
|
<a-icon type="close" @click="conditionRemove(index, item)" />
|
</li>
|
</ul>
|
<a-collapse default-active-key="1" :expand-icon-position="'right'">
|
<template #expandIcon="props">
|
<a-icon type="caret-right" :rotate="props.isActive ? 90 : 0" />
|
</template>
|
<a-collapse-panel key="1" header="受理局">
|
<!-- <div v-show="(loading===false)"> -->
|
<a-checkbox-group v-model="checkedOption.countryCodeCount" v-if="leftOptions.countryCodeCount"
|
style="width:100%">
|
<ul class="option-list" v-if="leftOptions.countryCodeCount">
|
<li v-for="item in leftOptions.countryCodeCount" v-if="item.value !== '0'">
|
<a-checkbox :checked="item.checked" :value="item.code" @change="checkChange(item,)">
|
<img :src="require('../assets/nation_flags/' + item.code.toUpperCase() + '.png')" alt=""
|
style="width:20px;margin-right:10px" />{{ item.text }}
|
</a-checkbox>
|
<span>{{ item.count }}</span>
|
</li>
|
</ul>
|
<p class="option-btn">
|
<!-- v-if="leftOptions.countryCodeCount && leftOptions.countryCodeCount.length" -->
|
<a-button @click="handleCondition('in', 'countryCode', '国家')">筛选</a-button>
|
<a-button @click="handleCondition('not in', 'countryCode', '国家')">过滤</a-button>
|
</p>
|
</a-checkbox-group>
|
<!-- </div> -->
|
|
</a-collapse-panel>
|
<a-collapse-panel key="2" header="公开类型">
|
未知
|
</a-collapse-panel>
|
<a-collapse-panel key="3" header="法律状态">
|
<a-checkbox-group v-model="checkedOption.lawStatusCount" style="width:100%">
|
<ul class="option-list" v-if="leftOptions.lawStatusCount">
|
<li v-for="item in leftOptions.lawStatusCount" v-if="item.count !== '0'">
|
<a-checkbox :value="item.code" :checked="item.checked" @change="checkChange(item)">{{ item.text }}
|
</a-checkbox>
|
<span>{{ item.count }}</span>
|
</li>
|
</ul>
|
<p class="option-btn">
|
<a-button @click="handleCondition('in', 'lawStatus', '法律状态')">筛选</a-button>
|
<a-button @click="handleCondition('not in', 'lawStatus', '法律状态')">过滤</a-button>
|
</p>
|
</a-checkbox-group>
|
</a-collapse-panel>
|
<a-collapse-panel key="4" header="公开日">
|
<a-checkbox-group v-model="checkedOption.publicationDateCount" style="width:100%">
|
<ul class="option-list" v-if="leftOptions.publicationDateCount">
|
<li v-for="item in leftOptions.publicationDateCount" v-if="item.count !== '0'">
|
<a-checkbox :value="item.code" :checked="item.checked" @change="checkChange(item)"
|
:disabled="item.disabled">{{ item.code }}
|
</a-checkbox>
|
<span>{{ item.count }}</span>
|
</li>
|
</ul>
|
<p class="option-btn">
|
<a-button @click="handleCondition('range', 'publicationDate', '公开日')">筛选</a-button>
|
<a-button @click="handleCondition('not range', 'publicationDate', '公开日')">过滤</a-button>
|
</p>
|
</a-checkbox-group>
|
</a-collapse-panel>
|
<a-collapse-panel key="5" header="申请日">
|
<a-checkbox-group v-model="checkedOption.systemCount" style="width:100%">
|
<ul class="option-list" v-if="leftOptions.systemCount">
|
<li v-for="item in leftOptions.systemCount" v-if="item.count !== '0'">
|
<a-checkbox :value="item.code" :checked="item.checked" @change="checkChange(item)"
|
:disabled="item.disabled">{{ item.code }}
|
</a-checkbox>
|
<span>{{ item.count }}</span>
|
</li>
|
</ul>
|
<p class="option-btn">
|
<a-button @click="handleCondition('range', 'system', '申请日')">筛选</a-button>
|
<a-button @click="handleCondition('not range', 'system', '申请日')">过滤</a-button>
|
</p>
|
</a-checkbox-group>
|
</a-collapse-panel>
|
<a-collapse-panel key="6" header="申请人">
|
<a-checkbox-group v-model="checkedOption.assigneeHarmonizedCount" style="width:100%">
|
<ul class="option-list" v-if="leftOptions.assigneeHarmonizedCount">
|
<li v-for="item in leftOptions.assigneeHarmonizedCount" v-if="item.count !== '0'">
|
<a-checkbox :value="item.code || item.text" :checked="item.checked" @change="checkChange(item)">
|
{{ item.text }}</a-checkbox>
|
<span>{{ item.count }}</span>
|
</li>
|
</ul>
|
<p class="option-btn">
|
<a-button @click="handleCondition('in', 'assigneeHarmonized', '申请人')">筛选</a-button>
|
<a-button @click="handleCondition('not in', 'assigneeHarmonized', '申请人')">过滤</a-button>
|
</p>
|
</a-checkbox-group>
|
</a-collapse-panel>
|
<a-collapse-panel key="7" header="发明人">
|
<a-checkbox-group v-model="checkedOption.inventorHarmonizedCount" style="width:100%">
|
<ul class="option-list" v-if="leftOptions.inventorHarmonizedCount">
|
<li v-for="item in leftOptions.inventorHarmonizedCount" v-if="item.count !== '0'">
|
<a-checkbox :value="item.code || item.text" :checked="item.checked" @change="checkChange(item)">
|
{{ item.text }}</a-checkbox>
|
<span>{{ item.count }}</span>
|
</li>
|
</ul>
|
<p class="option-btn">
|
<a-button @click="handleCondition('in', 'inventorHarmonized', '发明人')">筛选</a-button>
|
<a-button @click="handleCondition('not in', 'inventorHarmonized', '发明人')">过滤</a-button>
|
</p>
|
</a-checkbox-group>
|
</a-collapse-panel>
|
<a-collapse-panel key="8" header="IPC分类号">
|
<a-checkbox-group v-model="checkedOption.ipcListCount" style="width:100%">
|
<ul class="option-list" v-if="leftOptions.ipcListCount">
|
<li v-for="item in leftOptions.ipcListCount" v-if="item.count !== '0'">
|
<a-checkbox :value="item.code" :checked="item.checked" @change="checkChange(item)">{{ item.text }}
|
</a-checkbox>
|
<span>{{ item.count }}</span>
|
</li>
|
</ul>
|
<p class="option-btn">
|
<a-button @click="handleCondition('in', 'ipcList', 'IPC分类')">筛选</a-button>
|
<a-button @click="handleCondition('not in', 'ipcList', 'IPC分类')">过滤</a-button>
|
</p>
|
</a-checkbox-group>
|
</a-collapse-panel>
|
|
<a-collapse-panel key="9" header="中国申请人地址">
|
未知
|
</a-collapse-panel>
|
|
<a-collapse-panel key="10" header="战略新兴产业分类">
|
<a-checkbox-group v-model="checkedOption.strategyIndustryCount" style="width:100%">
|
<ul class="option-list" v-if="leftOptions.strategyIndustryCount">
|
<li v-for="item in leftOptions.strategyIndustryCount" v-if="item.count !== '0'">
|
<a-checkbox :value="item.code" :checked="item.checked" @change="checkChange(item)">{{ item.text }}
|
</a-checkbox>
|
<span>{{ item.count }}</span>
|
</li>
|
</ul>
|
<p class="option-btn">
|
<a-button @click="handleCondition('in', 'strategyIndustry', '战略新兴产业分类')">筛选</a-button>
|
<a-button @click="handleCondition('not in', 'strategyIndustry', '战略新兴产业分类')">过滤</a-button>
|
</p>
|
</a-checkbox-group>
|
</a-collapse-panel>
|
<a-collapse-panel key="11" header="国民经济行业分类">
|
<a-checkbox-group v-model="checkedOption.economyIndustryCount" style="width:100%">
|
<ul class="option-list" v-if="leftOptions.economyIndustryCount">
|
<li v-for="item in leftOptions.economyIndustryCount" v-if="item.count !== '0'">
|
<a-checkbox :value="item.code" :checked="item.checked" @change="checkChange(item)">{{ item.text }}
|
</a-checkbox>
|
<span>{{ item.count }}</span>
|
</li>
|
</ul>
|
<p class="option-btn">
|
<a-button @click="handleCondition('or like', 'economyIndustry', '国民经济行业分类')">筛选</a-button>
|
<a-button @click="handleCondition('not in', 'economyIndustry', '国民经济行业分类')">过滤</a-button>
|
</p>
|
</a-checkbox-group>
|
</a-collapse-panel>
|
</a-collapse>
|
</div>
|
</section>
|
<section class="right">
|
<!-- v-if="num" -->
|
<div class="header flex justify-between item-center">
|
<div>
|
共<span>{{ numbar }}</span>条专利
|
</div>
|
<a-button type="link" icon="download" @click="exportShow = true">
|
导出
|
</a-button>
|
</div>
|
<div class="dataList white">
|
<div class="checkAll">
|
<a-checkbox @change="onChangeAll" :indeterminate="indeterminate" :checked="checkAll">
|
全选此页
|
</a-checkbox>
|
<div class="sort">
|
<span style="margin:0 10px">排序:</span>
|
<a-select v-model="sortFields" style="width: 130px" @change="reloadPageList">
|
<a-select-option value="_score">相关度</a-select-option>
|
<a-select-option value="system">申请日</a-select-option>
|
<a-select-option value="publicationDate">公开日</a-select-option>
|
<a-select-option value="citedCount">被引用数量</a-select-option>
|
<a-select-option value="citationCount">引用数量</a-select-option>
|
<a-select-option value="publicationNumber">公开号</a-select-option>
|
<a-select-option value="applicationNumber">申请号</a-select-option>
|
<a-select-option value="priorityDate">最早优先权日</a-select-option>
|
<a-select-option value="sameFamilyCount">同族数量</a-select-option>
|
<a-select-option value="assigneeHarmonizedCount">申请人数量</a-select-option>
|
<a-select-option value="inventorHarmonizedCount">发明人数量</a-select-option>
|
</a-select>
|
<a-radio-group v-model="direction" button-style="solid" style="margin-left:10px" @change="reloadPageList">
|
<a-radio-button value="desc">
|
高→低
|
</a-radio-button>
|
<a-radio-button value="asc">
|
低→高
|
</a-radio-button>
|
</a-radio-group>
|
</div>
|
</div>
|
<a-spin :spinning="spinning">
|
<div class="list" v-show="plainOptions.length" v-for="(item, index) in plainOptions" :key="index">
|
<div class="item">
|
<div class="header">
|
<span class="point">
|
<a-checkbox :checked="item.check" @change="onChange(item)" />
|
</span>
|
<span class="application cm-hover ellipsis" @click="handleItem(item)">
|
<span style="margin-right:16px">{{ item.publicationNumber }}</span>
|
<span>{{ item.title0 || '-' }}</span>
|
</span>
|
<a-tag v-if="item.status_dictText == '失效'" color="#f50">
|
失效
|
</a-tag>
|
<a-tag v-if="item.status_dictText == '有效'" color="green"> 有效 </a-tag>
|
<a-tag v-if="item.status_dictText == '审查中'" color="orange"> 审查中 </a-tag>
|
</div>
|
<div class="title cm-hover ellipsis" @click="handleItem(item)">{{ item.title1 }}</div>
|
<ul>
|
<!-- <li>
|
<span>公开(公告)日:</span
|
><span>{{ $fnFormatDate(item.publicationDate ) }}</span>
|
</li>
|
<li>
|
<span>申请号:</span><span>{{ item.applicationNumber }}</span>
|
</li>
|
<li>
|
<span>申请日:</span><span>{{ $fnFormatDate(item.system) }}</span>
|
</li>
|
<li>
|
<span>申请人:</span
|
><span>{{ item.assigneeHarmonizedName }}</span>
|
</li>
|
<li>
|
<span>IPC分类号:</span><span>{{ item.ipcList ||'-' }}</span>
|
</li> -->
|
|
<li>
|
<!-- <span>申请日:</span><span>{{ $fnFormatDate(item.system) }}</span> -->
|
<span>申请日:</span><span>{{ item.filingDate?$fnFormatDate(item.filingDate) :"-"}}</span>
|
</li>
|
<li>
|
<span>公开日:</span><span>{{ $fnFormatDate(item.publicationDate) }}</span>
|
</li>
|
<li>
|
<span>申请号:</span><span>{{ item.applicationNumber }}</span>
|
</li>
|
<li>
|
<span>发明人:</span><span>{{ item.inventorList || '-' }}</span>
|
</li>
|
<li style="display:flex">
|
<span>申请人:</span><span style="word-break: break-word; white-space: pre-line;">{{ item.assigneeList
|
}}</span>
|
</li>
|
<li style="display:flex">
|
<span>IPC分类号:</span><span style="word-break: break-word; white-space: pre-line;">{{ item.ipcCodeSort
|
|| '-'
|
}}</span>
|
</li>
|
<!-- <li >
|
<span >摘要:</span><span>{{ item.abstract1 }}</span>
|
</li> -->
|
<li>
|
<span>摘要:</span>
|
</li>
|
</ul>
|
<div class="content">{{ item.abstract1 }}</div>
|
</div>
|
</div>
|
<div style="text-align:right" v-if="num > 10">
|
<a-pagination :default-current="1" :total="num" @change="onPageChange" />
|
</div>
|
<a-empty v-show="plainOptions.length == 0 & !spinning" />
|
</a-spin>
|
</div>
|
</section>
|
</main>
|
<a-modal title="数据导出" :visible="exportShow" :width="1200" :footer="null" @cancel="exportShow = false">
|
<export-com v-if="exportShow" :total="num" />
|
</a-modal>
|
</div>
|
</template>
|
|
<script>
|
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
//例如:import 《组件名称》 from '《组件路径》';
|
import { GetPatentListbyAdvance, GetPatentList, GetPatentListbyLaw, GetPatentListCount, GetPatentListbyPatch } from "@/api/url_analyst";
|
import ExportCom from '../components/ExportCom.vue'
|
|
export default {
|
//import引入的组件需要注入到components对象中才能使用
|
components: { ExportCom },
|
data() {
|
//这里存放数据
|
return {
|
loading: true,
|
numbar: 0,
|
ScrollHeight: document.documentElement.scrollTop,
|
siftDialog: false, //筛选弹窗
|
keyWord: "",
|
conditionAnd: [],
|
num: 0,
|
pageNo: 1,
|
spinning: false,
|
indeterminate: false, //全选此页多选
|
checkAll: false, //全选此页全选
|
indeterminatePatent: false, //全部专利多选
|
checkAllPatent: false, //全选专利全选
|
indeterminateCountry: false, //全部专利国家多选
|
checkAllCountry: false, //全选专利国家全选
|
checkCountryList: false, //全选专利国家分类
|
plainOptions: [],
|
leftOptions: {
|
countryCodeCount: []
|
},
|
length: 0, //复选框选中数量
|
exportShow: false,
|
checkedOption: {
|
},
|
currentUrl: null,
|
currentParams: {},
|
direction: 'desc',
|
sortFields: 'publicationDate',
|
firstNm:0,
|
};
|
},
|
//计算属性 类似于data概念
|
computed: {},
|
//监控data中的数据变化
|
watch: {
|
ScrollHeight() { },
|
"$route"() {
|
window.location.reload()
|
},
|
|
//解决this指向问题,在window.addEventListener中this是指向window的。
|
//需要将vue实例赋值给_this,这样在window.addEventListener中通过_this可以为vue实例上data中的变量赋值
|
// let _this=this,
|
//根据自己需要来监听对应的key
|
// window.addEventListener("setItemEvent", function (e) {
|
// //e.key : 是值发生变化的key
|
// //例如 e.key==="token";
|
// //e.newValue : 是可以对应的新值
|
// if (e.key === "namiParams") {
|
// console.log(e.newValue);
|
// // _this.token = e.newValue;
|
// }
|
// })
|
// 'localStorage'(e){
|
// console.log('存储',e);
|
// }
|
// addEventListener("setItemEvent", that.debounce(that.initSearch(),1000)
|
// )
|
|
},
|
//方法集合
|
mounted() {
|
// debugger
|
let that = this;
|
//根据自己需要来监听对应的key
|
|
// window.addEventListener("setItemEvent", function (e) {
|
// //e.key : 是值发生变化的key
|
// //例如 e.key==="token";
|
// //e.newValue : 是可以对应的新值
|
// if (e.key === "namiParams") {
|
// if(that.firstNm===0){
|
// if (e.newValue) {
|
// let namiPOarams = {}
|
// namiPOarams = JSON.parse(e.newValue)
|
// if(namiPOarams.go==='true'){
|
// that.firstNm--
|
// }
|
// let obj = {
|
// field: namiPOarams.field,
|
// rule: namiPOarams.rule,
|
// name: namiPOarams.name,
|
// checkedList: {
|
// typeInfoListCount: []
|
// },
|
// val: namiPOarams.name,
|
// childFieldLevel: 0,
|
// }
|
// that.conditionAnd.push(obj)
|
// that.initSearch()
|
// that.getOptions()
|
// that.conditionAnd = []
|
// that.firstNm++
|
// return false
|
// }
|
// }
|
|
// }
|
// })
|
let from = this.$route.query.from
|
let namiPOarams = ''
|
if (localStorage.getItem('namiParams')) {
|
// console.log(localStorage.getItem('namiParams'));
|
namiPOarams = JSON.parse(localStorage.getItem('namiParams'))
|
}
|
console.log(namiPOarams);
|
|
if (namiPOarams.length === 0) {
|
// console.log(1);
|
this.initSearch(from)
|
this.getOptions()
|
} else {
|
// console.log(2);
|
let obj = {
|
field: namiPOarams.field,
|
rule: namiPOarams.rule,
|
name: namiPOarams.name,
|
checkedList: {
|
typeInfoListCount: []
|
},
|
val: namiPOarams.name,
|
childFieldLevel: 0,
|
}
|
this.conditionAnd.push(obj)
|
this.initSearch()
|
this.getOptions()
|
// console.log(this.conditionAnd);
|
this.conditionAnd = []
|
localStorage.setItem('namiParams', '')
|
}
|
|
|
},
|
methods: {
|
debounce(fn, wait) {
|
var timer = null;
|
return function () {
|
if (timer !== null) {
|
clearTimeout(timer);
|
}
|
timer = setTimeout(fn, wait);
|
}
|
},
|
getDataNM() {
|
|
},
|
keyWordSearch() {
|
if (!this.keyWord) {
|
this.$message.warning('请输入非空的关键词进行智能检索!')
|
} else {
|
this.getPageList()
|
}
|
},
|
checkChange(item) {
|
|
// this.$set(item, 'checked', !item.checked)
|
item.checked = !item.checked
|
// console.log(this.leftOptions.countryCodeCount);
|
// if (item.checked === false) {
|
|
// console.log(this.conditionAnd);
|
// for (let i = 0; i < this.conditionAnd.length; i++) {
|
// if (this.conditionAnd[i].checkedList&&this.conditionAnd[i].checkedList.length>=1) {
|
// for (let k = 0; k < this.conditionAnd[i].checkedList.length; k++) {
|
// if (this.conditionAnd[i].checkedList[k].text == item.text || this.conditionAnd[i].checkedList[k].code == item.code) {
|
// // this.conditionRemove1(i, this.conditionAnd[i], k)
|
// }
|
// }
|
// }
|
// }
|
// }
|
},
|
handleCondition(rule, field, name) {
|
console.log(rule, field, name);
|
let checkedList = []
|
if (field === 'typeInfoList') {
|
checkedList.typeInfoListCount = []
|
}
|
console.log(this.leftOptions);
|
// if(this.leftOptions[field + "Count"]){
|
this.leftOptions[field + "Count"].forEach(item => {
|
if (item.checked) {
|
console.log(item);
|
item.disabled = true
|
checkedList.push(item)
|
// let num=0
|
// for(let i=0;i<checkedList.length;i++){
|
// if(item.code===checkedList[i].code&&item.text===checkedList[i].text){
|
// num++
|
// }
|
// }
|
// if(num===0){
|
// checkedList.push(item)
|
// }
|
}
|
})
|
console.log(checkedList);
|
// }
|
// this.leftOptions[field + "Count"].forEach(item => {
|
// if (item.checked && !item.disabled) {
|
// item.disabled = true
|
// checkedList.push(item)
|
// // let num = 0
|
// // for(let i=0;i<checkedList.length;i++){
|
// // if(item.code===checkedList[i].code&&item.text===checkedList[i].text){
|
// // num++
|
// // }
|
// // }
|
// // if(num===0){
|
// // checkedList.push(item)
|
// // }
|
// }
|
// })
|
// for (let i = 0; i < checkedList.length; i++) {
|
// for (let k = i + 1; k < checkedList.length; k++) {
|
// if(checkedList[k].code==checkedList[i].code&&item.text==checkedList[i].text){
|
// checkedList.splice(k,1)
|
// k--
|
// }
|
// }
|
// }
|
console.log(checkedList);
|
if (checkedList.length == 0) return
|
let conditionItem = this.conditionAnd.find(item => item.field == field && item.rule == rule)
|
|
if (conditionItem) {
|
for (let i = 0; i < conditionItem.checkedList.length; i++) {
|
if (conditionItem.checkedList[i].checked === false) {
|
conditionItem.checkedList.splice(i, 1)
|
i--
|
}
|
}
|
conditionItem.val = ''
|
conditionItem.checkedList.push(...checkedList)
|
conditionItem.val =conditionItem.checkedList.map(item => item.code || item.text).join(',')
|
} else {
|
|
let obj = {
|
field,
|
rule,
|
name,
|
checkedList,
|
val: checkedList.map(item => item.code || item.text).join(','),
|
childFieldLevel: 0,
|
}
|
|
if (field.indexOf('ipcList') > -1) {
|
obj.field = 'ipcListObject'
|
} else if (field.indexOf('assigneeHarmonized') > -1) {
|
obj.field = 'assigneeHarmonizedNameArray'
|
} else if (field.indexOf('inventorHarmonized') > -1) {
|
obj.field = 'inventorHarmonizedNameArray'
|
} else if (field.indexOf('strategyIndustry') > -1) {
|
obj.field = 'straIndustryList'
|
} else if (field.indexOf('economyIndustry') > -1) {
|
obj.field = 'industrycode'
|
// obj.val= (','+obj.val).replaceAll(',','|')
|
let arr=obj.val.split(',')
|
let str=''
|
for(let i=0;i<arr.length;i++){
|
str+='|'+arr[i]+','
|
}
|
obj.val=str.substring(0,str.length-1)
|
|
}
|
console.log(obj);
|
this.conditionAnd.push(obj)
|
}
|
console.log(this.conditionAnd);
|
this.conditionAnd.reverse()
|
for (let i = 0; i < this.conditionAnd.length; i++) {
|
for (let k = i + 1; k < this.conditionAnd.length; k++) {
|
if (this.conditionAnd[k].field == this.conditionAnd[i].field) {
|
// console.log(1);
|
this.conditionAnd.splice(k, 1)
|
k--
|
}
|
}
|
}
|
this.conditionAnd.reverse()
|
|
for (let i = 0; i < this.conditionAnd.length; i++) {
|
if (this.conditionAnd[i].checkedList.length > 1) {
|
for (let k = 0; k < this.conditionAnd[i].checkedList.length; k++) {
|
for (let j = k + 1; j < this.conditionAnd[i].checkedList.length; j++) {
|
if (this.conditionAnd[i].checkedList[k].code == this.conditionAnd[i].checkedList[j].code && this.conditionAnd[i].checkedList[k].text == this.conditionAnd[i].checkedList[j].text) {
|
this.conditionAnd[i].checkedList.splice(j, 1)
|
j--
|
}
|
}
|
}
|
}
|
}
|
console.log(this.conditionAnd);
|
this.initSearch()
|
},
|
conditionRemove(index, item) {
|
console.log(index, item);
|
if (item.field.indexOf('ipcListObject') > -1) {
|
item.field = 'ipcList'
|
} else if (item.field.indexOf('assigneeHarmonizedNameArray') > -1) {
|
item.field = 'assigneeHarmonized'
|
} else if (item.field.indexOf('inventorHarmonizedNameArray') > -1) {
|
item.field = 'inventorHarmonized'
|
} else if (item.field.indexOf('straIndustryList') > -1) {
|
item.field = 'strategyIndustry'
|
} else if (item.field.indexOf('ecoIndustryList') > -1) {
|
item.field = 'economyIndustry'
|
}
|
let val = item.val
|
let checkedCode = []
|
this.leftOptions[item.field + "Count"].forEach(it => {
|
if (val.indexOf(it.code || it.text) >= 0) {
|
it.checked = false
|
it.disabled = false
|
}
|
if (it.checked) checkedCode.push(it.code || it.text)
|
})
|
this.checkedOption[item.field + "Count"] = checkedCode
|
console.log(this.checkedOption);
|
this.conditionAnd.splice(index, 1)
|
this.initSearch()
|
},
|
conditionRemove1(index, item, itemIndex) {
|
console.log(index, item);
|
if (item.field.indexOf('ipcListObject') > -1) {
|
item.field = 'ipcList'
|
} else if (item.field.indexOf('assigneeHarmonizedNameArray') > -1) {
|
item.field = 'assigneeHarmonized'
|
} else if (item.field.indexOf('inventorHarmonizedNameArray') > -1) {
|
item.field = 'inventorHarmonized'
|
} else if (item.field.indexOf('straIndustryList') > -1) {
|
item.field = 'strategyIndustry'
|
} else if (item.field.indexOf('ecoIndustryList') > -1) {
|
item.field = 'economyIndustry'
|
}
|
let val = item.val
|
let checkedCode = []
|
this.leftOptions[item.field + "Count"].forEach(it => {
|
if (val.indexOf(it.code || it.text) >= 0) {
|
// it.checked = false
|
// it.disabled = false
|
}
|
if (it.checked) checkedCode.push(it.code || it.text)
|
})
|
this.checkedOption[item.field + "Count"] = checkedCode
|
console.log(this.checkedOption);
|
// debugger
|
if (this.conditionAnd[index].checkedList.lenght === 1) {
|
this.conditionAnd.splice(index, 1)
|
} else {
|
// if(itemIndex%2==0){
|
this.conditionAnd[index].val = this.conditionAnd[index].val.replace(item.checkedList[itemIndex].code, '')
|
// }else{
|
// this.conditionAnd[index].val=this.conditionAnd[index].val.replace(`,${item.checkedList[itemIndex].code}`,'')
|
// }
|
|
// console.log(this.conditionAnd[index]);
|
this.conditionAnd[index].checkedList.splice(itemIndex, 1)
|
}
|
for (let i = 0; i < this.conditionAnd.length; i++) {
|
if (this.conditionAnd[i].checkedList.length === 0) {
|
this.conditionAnd.splice(i, 1)
|
}
|
}
|
// debugger
|
this.initSearch()
|
return
|
},
|
initSearch(from) {
|
|
this.direction = 'desc'
|
if (from) {
|
this.sortFields = 'publicationDate'
|
this.currentParams = JSON.parse(this.$route.query.params)
|
switch (from) {
|
case 'home':
|
this.currentUrl = GetPatentList
|
break;
|
case 'law':
|
this.currentUrl = GetPatentListbyLaw
|
break;
|
case 'batch':
|
this.currentUrl = GetPatentListbyPatch
|
break;
|
case 'senior':
|
this.currentUrl = GetPatentListbyAdvance
|
this.currentParams = {
|
conditionAnd: JSON.parse(this.$route.query.params),
|
conditionFilter: [
|
{
|
"countryCode": "",
|
"countryText": "",
|
"kindText": ""
|
}
|
],
|
}
|
break;
|
}
|
} else {
|
this.sortFields = '_score'
|
this.currentUrl = GetPatentListbyAdvance
|
// 涉及时间的要特殊处理,多选时间要拆分
|
let conditionAnd = []
|
this.conditionAnd.map(item => {
|
if (item.rule == 'range' || item.rule == 'not range') {
|
item.checkedList.map(it => {
|
conditionAnd.push({
|
field: item.field,
|
rule: item.rule,
|
start: it.code + '-01-01',
|
end: (Number(it.code) + 1) + '-01-01'
|
})
|
})
|
} else {
|
conditionAnd.push(item)
|
}
|
})
|
// console.log(conditionAnd);
|
this.currentParams = {
|
conditionAnd,
|
conditionFilter: [
|
{
|
"countryCode": "",
|
"countryText": "",
|
"kindText": ""
|
}
|
],
|
}
|
}
|
|
this.reloadPageList()
|
},
|
|
reloadPageList() {
|
this.pageNo = 1
|
this.getPageList()
|
},
|
getPageList() {
|
console.log(this.currentParams);
|
// debugger
|
this.spinning = true
|
this.currentUrl({
|
pageNo: this.pageNo,
|
pageSize: 10,
|
sortFields: [{
|
direction: this.direction,
|
field: this.sortFields,
|
}],
|
...this.currentParams
|
}).then((res) => {
|
this.plainOptions = res.Data.records.map(item => {
|
item.check = false
|
return item
|
})
|
// if(this.pageNo*10>res.Data.total){
|
// this.num = res.Data.total;
|
|
// }
|
// debugger
|
if (res.Data.total >= 10000) {
|
this.num = 10000 + this.pageNo * 10 - 10
|
if (this.num >= res.Data.total) {
|
this.num = res.Data.total;
|
}
|
console.log(this.num);
|
} else {
|
// let int = parseInt(res.Data.total / 1000)
|
// this.num = int * 1000
|
// if (this.num > res.Data.total) {
|
// this.num = res.Data.total;
|
// }
|
// console.log(this.num);
|
this.num=res.Data.total
|
|
}
|
// console.log(this.num,this.pageNo,res.Data.total);
|
this.numbar = res.Data.total;
|
this.spinning = false
|
}).catch(() => {
|
this.spinning = false
|
this.plainOptions = []
|
this.num = 0
|
})
|
// console.log(this.pageNo);
|
// console.log(this.num,this.pageNo);
|
},
|
getOptions() {
|
this.loading = true
|
// if (this.$route.query.from === 'senior')
|
let params = {}
|
if (this.$route.query.from === 'batch') {
|
let type = ''
|
if (this.currentParams.keywordField === "assigneeHarmonizedNameArray") {
|
type = '申请人'
|
} else if (this.currentParams.keywordField === "applicationNumber") {
|
type = '申请号'
|
} else if (this.currentParams.keywordField === "publicationNumber") {
|
type = '公开号'
|
}
|
console.log(this.currentParams);
|
params.conditionAnd = [{ childFieldLevel: 0, field: this.currentParams.keywordField, name: type, rule: 'like', val: this.currentParams.content }]
|
params.conditionFilter = [{ "countryCode": "", "countryText": "", "kindText": "" }],
|
console.log(this.conditionFilter);
|
if(this.conditionFilter){
|
params.pageNo = this.conditionFilter.pageNo
|
}else{
|
params.pageNo = 1
|
}
|
|
params.pageSize = 10
|
params.sortFields = [{
|
direction: this.direction,
|
field: this.sortFields,
|
}]
|
} else {
|
params = this.currentParams
|
// params.conditionAnd.childFieldLevel=this.currentParams.childFieldLevel
|
// params.conditionAnd.field=this.currentParams.field
|
// params.conditionAnd.name=this.currentParams.name
|
// params.conditionAnd.rule=this.currentParams.rule
|
// console.log(this.currentParams);
|
// params = this.currentParams
|
for (let i = 0; i < params.conditionAnd.length; i++) {
|
// delete params.conditionAnd[i].typeInfoListCount
|
delete params.conditionAnd[i].name
|
}
|
if (this.currentParams.pageNo) {
|
params.pageNo = this.currentParams.pageNo
|
} else {
|
params.pageNo = this.pageNo
|
}
|
params.pageSize = 10
|
params.sortFields = [{
|
direction: this.direction,
|
field: this.sortFields,
|
}]
|
}
|
// console.log(params);
|
// console.log( JSON.parse(this.$route.query.params))
|
|
|
// pageNo: this.pageNo,
|
// pageSize: 10,
|
// sortFields:
|
// GetPatentListCount({ value: params? params:'' }).then(res => {
|
GetPatentListCount(params).then(res => {
|
// debugger
|
this.leftOptions = res.Data
|
for (let i in this.leftOptions) {
|
for (let k = 0; k < this.leftOptions[i].length; k++) {
|
// console.log(this.leftOptions[i][k].code,this.leftOptions[i][k].text);
|
if (this.leftOptions[i][k].code =='') {
|
this.leftOptions[i].splice(k,1)
|
// this.leftOptions[i][k].code.
|
}
|
// if (this.leftOptions[i][k].code && this.leftOptions[i][k].code.indexOf('AT') > -1) {
|
// this.leftOptions[i][k].code = 'AT'
|
// // this.leftOptions[i][k].code.
|
// }
|
// if (this.leftOptions[i][k].text && this.leftOptions[i][k].text.indexOf('AT') > -1) {
|
// // this.leftOptions[i][k].code='AT'
|
// this.leftOptions[i][k].text = 'AT'
|
// }
|
}
|
// console.log(this.leftOptions[i]);
|
}
|
// for(let i=0;i<this.leftOptions.ipcListCount.lenght;i++){
|
// this.leftOptions.ipcListCount[i].code.trim()
|
// this.leftOptions.ipcListCount[i].text.trim()
|
// }
|
// this.leftOptions.industrycodeCount=this.leftOptions.economyIndustryCount
|
// this.leftOptions.industrycodeCountSum=this.leftOptions.economyIndustryCountSum
|
|
console.log(this.leftOptions);
|
})
|
this.loading = false
|
},
|
handleItem(item) {
|
// localStorage.setItem('searchItem',JSON.stringify(item))
|
window.open('/#/detail/' + item.id)
|
// this.$router.push('/detail/'+item.id)
|
},
|
onPageChange(current) {
|
console.log(current);
|
this.currentParams.pageNo = current
|
this.pageNo = current
|
|
this.getPageList()
|
},
|
onChange(item, e) {
|
console.log(e);
|
this.length = 0;
|
item.check = !item.check;
|
for (let i = 0; i < this.plainOptions.length; i++) {
|
console.log(this.plainOptions[i].check);
|
if (this.plainOptions[i].check === true) {
|
this.length++;
|
}
|
}
|
if (this.length === this.plainOptions.length) {
|
this.checkAll = true;
|
this.indeterminate = false;
|
console.log(this.checkAll, this.indeterminate);
|
} else if (this.length === 0) {
|
this.checkAll = false;
|
this.indeterminate = false;
|
} else if (0 < this.length < this.plainOptions.length) {
|
this.checkAll = false;
|
this.indeterminate = true;
|
}
|
},
|
onChangeAll(e) {
|
this.checkAll = !this.checkAll;
|
this.length = this.plainOptions.length;
|
if (e.target.checked) {
|
for (let i = 0; i < this.plainOptions.length; i++) {
|
this.plainOptions[i].check = true;
|
}
|
} else {
|
for (let i = 0; i < this.plainOptions.length; i++) {
|
this.plainOptions[i].check = false;
|
}
|
this.indeterminate = false
|
}
|
},
|
},
|
beforeCreate() { }, //生命周期 - 创建之前
|
//生命周期 - 创建完成(可以访问当前this实例)
|
created() { },
|
beforeMount() { }, //生命周期 - 挂载之前
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
beforeUpdate() { }, //生命周期 - 更新之前
|
updated() { }, //生命周期 - 更新之后
|
beforeDestroy() { }, //生命周期 - 销毁之前
|
destroyed() { }, //生命周期 - 销毁完成
|
activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
|
};
|
</script>
|
<style lang="scss" scoped>
|
.search {
|
min-width: 1280px;
|
padding: 40px 0;
|
|
header {
|
width: 100%;
|
position: relative;
|
display: flex;
|
justify-content: space-between;
|
|
.logo {
|
width: 40%;
|
height: 62px;
|
position: relative;
|
|
img {
|
position: absolute;
|
left: 50px;
|
top: 0;
|
width: 145px;
|
height: 62px;
|
|
@media screen and (max-width: 1280px) {
|
left: 0;
|
}
|
}
|
}
|
|
.features {
|
width: 60%;
|
display: flex;
|
justify-content: space-between;
|
|
.home_icon,
|
.login,
|
.nav {
|
width: 10%;
|
height: 62px;
|
line-height: 70px;
|
}
|
|
.login {
|
.icon-201yonghu_yonghu2 {
|
font-size: 25px;
|
cursor: pointer;
|
}
|
}
|
|
.home_icon {
|
position: relative;
|
top: 5px;
|
|
a {
|
color: #ef8201;
|
|
.icon-shouye {
|
font-size: 25px;
|
}
|
}
|
}
|
|
.nav {
|
@media (min-width: 1280px) {
|
min-width: 80px;
|
}
|
|
cursor: pointer;
|
background: #ef8201;
|
color: #ffffff;
|
font-size: 16px;
|
position: relative;
|
|
.menuList {
|
width: 100%;
|
position: absolute;
|
top: 60px;
|
background-color: #ffffff;
|
border: 1px solid #c2c2c2;
|
z-index: 999;
|
display: none;
|
|
li {
|
height: 40px;
|
line-height: 40px;
|
text-align: left;
|
font-size: 16px;
|
color: black;
|
text-align: center;
|
}
|
|
a:hover {
|
color: #ef8201;
|
}
|
}
|
}
|
|
.nav:hover .menuList {
|
display: block;
|
}
|
|
.classList {
|
width: 70%;
|
display: flex;
|
justify-content: space-around;
|
|
.item {
|
height: 50px;
|
margin-top: 12px;
|
line-height: 50px;
|
text-align: center;
|
font-family: "微软雅黑";
|
font-weight: 500;
|
font-style: normal;
|
font-size: 20px;
|
cursor: pointer;
|
|
a {
|
color: #333333;
|
}
|
|
a:hover {
|
color: #ef8201;
|
}
|
|
span:hover {
|
color: #ef8201;
|
}
|
}
|
|
.item:hover {
|
border-bottom: 5px solid #ef8201;
|
}
|
|
.secItem {
|
border-bottom: 5px solid #ef8201;
|
|
span {
|
color: #ef8201;
|
}
|
}
|
|
.patent {
|
position: relative;
|
|
.patentShow {
|
display: none;
|
position: absolute;
|
width: 170px;
|
background-color: #ffffff;
|
border: 1px solid #c2c2c2;
|
// box-shadow: 0px 0px 3px 1px;
|
z-index: 999;
|
|
li {
|
margin: 2px 0;
|
text-align: center;
|
font-size: 16px;
|
color: black;
|
}
|
|
li:hover a {
|
color: #ef8201;
|
}
|
}
|
}
|
|
.patent:hover .patentShow {
|
display: block;
|
}
|
|
.Retrieval {
|
position: relative;
|
|
.RetrievalShow {
|
display: none;
|
position: absolute;
|
width: 130px;
|
background-color: #ffffff;
|
border: 1px solid #c2c2c2;
|
// box-shadow: 0px 0px 3px 1px;
|
z-index: 999;
|
|
li {
|
height: 40px;
|
line-height: 40px;
|
text-align: center;
|
font-size: 16px;
|
color: black;
|
|
span {
|
font-size: 20px;
|
}
|
}
|
|
li:hover a {
|
color: #ef8201;
|
}
|
}
|
}
|
|
.Retrieval:hover .RetrievalShow {
|
display: block;
|
}
|
}
|
|
.language {
|
cursor: pointer;
|
width: 10%;
|
display: flex;
|
justify-content: space-around;
|
|
li {
|
height: 62px;
|
line-height: 73px;
|
text-align: center;
|
font-family: "微软雅黑";
|
font-weight: 400;
|
font-style: normal;
|
font-size: 16px;
|
}
|
|
li:nth-child(1) {
|
color: #ef8201;
|
}
|
}
|
|
.home_icon,
|
.classList,
|
.language,
|
.login {
|
@media screen and (max-width: 1280px) {
|
display: none;
|
}
|
}
|
|
.nav {
|
@media screen and (max-width: 1280px) {
|
position: absolute;
|
right: 0;
|
}
|
}
|
}
|
}
|
}
|
|
main {
|
width: 100%;
|
display: flex;
|
|
.left {
|
width: 25%;
|
|
.left_search {
|
padding: 0 25px;
|
}
|
|
.condition-box {
|
border: 1px solid #ef8201;
|
padding: 10px;
|
margin-bottom: 10px;
|
|
li {
|
display: flex;
|
|
// align-items: center;
|
span.in {
|
color: green;
|
|
&.not {
|
color: red;
|
}
|
}
|
|
span.label {
|
max-width: 70px;
|
margin-right: 8px;
|
white-space: nowrap;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
|
}
|
|
span.list {
|
flex: 1;
|
color: #ef8201;
|
}
|
|
.anticon-close {
|
cursor: pointer;
|
padding-top: 3px;
|
|
&:hover {
|
color: #ef8201;
|
}
|
}
|
}
|
}
|
|
.option-list li {
|
display: flex;
|
width: 100%;
|
justify-content: space-between;
|
}
|
|
.option-btn {
|
padding-top: 10px;
|
|
>* {
|
margin-right: 8px;
|
}
|
}
|
|
.siftDialog {
|
margin: 20px auto;
|
width: 90%;
|
text-align: left;
|
border: 1px solid #c2c2c2;
|
|
div {
|
width: 80%;
|
font-family: "微软雅黑";
|
font-weight: 400;
|
font-style: normal;
|
font-size: 12px;
|
margin: 5px auto;
|
}
|
|
span {
|
width: 80%;
|
padding-left: 30px;
|
}
|
}
|
|
.allPatent {
|
width: 100%;
|
padding-left: 25px;
|
margin: 20px auto;
|
display: flex;
|
}
|
|
.countryList {
|
width: 100%;
|
margin: 10px auto;
|
padding-left: 25px;
|
display: flex;
|
flex-direction: column;
|
flex-wrap: nowrap;
|
|
.list {
|
width: 100%;
|
padding-left: 20px;
|
|
.item {
|
display: block;
|
margin: 2px 0;
|
text-align: left;
|
|
}
|
}
|
}
|
|
.more {
|
width: 100%;
|
padding-left: 25px;
|
height: 40px;
|
line-height: 40px;
|
display: flex;
|
|
.sift,
|
.exclude {
|
width: 60px;
|
border: 1px solid #c2c2c2;
|
text-align: center;
|
color: #cccccc;
|
margin-right: 10px;
|
}
|
}
|
}
|
|
.right {
|
width: 75%;
|
padding: 0 20px;
|
|
.header {
|
width: 100%;
|
// height: 60px;
|
// line-height: 60px;
|
text-align: center;
|
display: flex;
|
|
div {
|
margin: 0 20px;
|
}
|
}
|
|
.dataList {
|
width: 100%;
|
margin-top: 20px;
|
padding: 40px;
|
|
.checkAll {
|
width: 100%;
|
text-align: left;
|
margin-bottom: 20px;
|
display: flex;
|
align-items: center;
|
}
|
|
.list {
|
width: 100%;
|
margin-bottom: 40px;
|
display: flex;
|
|
.item {
|
width: 100%;
|
text-align: left;
|
|
.header {
|
width: 100%;
|
align-items: center;
|
|
// background: #ffffff;
|
.point {
|
position: relative;
|
// top: 10px;
|
// width: 10px;
|
// height: 10px;
|
// background: #ef8201;
|
// border-radius: 50%;
|
margin: 0 5px 0 0;
|
}
|
|
.application {
|
font-size: 18px;
|
font-weight: 400;
|
cursor: pointer;
|
}
|
|
.ant-tag {
|
height: 20px;
|
margin-left: 10px;
|
}
|
}
|
|
.title {
|
padding-left: 20px;
|
font-size: 20px;
|
flex-wrap: 500;
|
font-weight: bold;
|
cursor: pointer;
|
}
|
|
ul {
|
width: 100%;
|
padding-left: 20px;
|
|
|
li {
|
margin: 5px 0;
|
|
display: flex;
|
|
span:nth-child(1) {
|
color: #a0a2a0;
|
display: inline-block;
|
width: 120px;
|
}
|
|
// span:nth-child(2) {
|
// // color: #a0a2a0;
|
// // display: inline-block;
|
// // width: 120px;
|
// margin-right: 120px;
|
// }
|
}
|
}
|
|
.content {
|
// color: #a0a2a0;
|
font-size: 14px;
|
margin: 5px 0;
|
padding-left: 20px;
|
word-break: break-all;
|
}
|
}
|
}
|
}
|
}
|
}
|
|
footer {
|
// position: absolute;
|
// bottom: 0;
|
width: 100%;
|
height: 80px;
|
background-color: rgba(102, 102, 102, 1);
|
color: #ffffff;
|
font-family: "微软雅黑";
|
font-weight: 400;
|
font-style: normal;
|
font-size: 14px;
|
text-align: center;
|
|
// @media (max-width: 1280px) {
|
// position: relative;
|
// top: var(--height);
|
// }
|
div {
|
width: 100%;
|
margin: 0 auto;
|
line-height: 80px;
|
justify-content: space-between;
|
|
@media (max-width: 1280px) {
|
width: 90%;
|
}
|
}
|
}
|
</style>
|