index.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054
  1. <template>
  2. <div class="height_100">
  3. <el-container>
  4. <!-- 统计 -->
  5. <el-aside class="height_100" :width="showLeft ? '300px' : '0px'" v-show="showLeft">
  6. <div class="height_100">
  7. <customFields ref="customFields" :projectId="projectId" :searchOption="searchStr" :customFields="customFields"
  8. @customTab="handleCustomFields" :searchPatentCheck="searchPatentCheck" :groupField="queryParams.groupField">
  9. </customFields>
  10. </div>
  11. </el-aside>
  12. <!-- 专利列表 -->
  13. <el-container>
  14. <el-header style="display:flex;justify-content:space-between">
  15. <div style="display:flex">
  16. <el-tooltip class="item" effect="dark" :content="(showLeft ? '隐藏' : '显示') + '左侧菜单'" placement="top">
  17. <i :class="showLeft ? 'el-icon-s-fold' : 'el-icon-s-unfold'"
  18. style="font-size: 25px;position: relative; top: 5px; color: #2f2f2f; cursor: pointer"
  19. @click="showLeft = !showLeft"></i>
  20. </el-tooltip>
  21. <searchPatent ref="searchPatent" :searchFiled="searchFiled" :searchPatentCheck="searchPatentCheck"
  22. @searchValue="handleSearchValue"></searchPatent>
  23. <!-- <mySearch :SearchFields="searchFiled" @search="search" :searchValue="searchOption"></mySearch> -->
  24. <el-popover placement="bottom" title="关键词高亮" width="320" trigger="click">
  25. <patent-keywords-highlight :project-id="projectId" />
  26. <el-button slot="reference" size="small" type="primary" class="margin-right_10 margin-left_10">
  27. 高亮<i class="el-icon-arrow-down el-icon--right"></i>
  28. </el-button>
  29. </el-popover>
  30. <el-button size="small" type="success" @click="handleAnalyses" style="font-size:16px;padding:0px 9px;font-wight:0"><i class="el-icon-s-data" style="font-size:18px;"></i> 图表分析</el-button>
  31. </div>
  32. <div style="display:flex;align-items:center;">
  33. <div id="step2">
  34. <span>分组:</span>
  35. <el-select v-model="queryParams.groupField" size="small"
  36. @change="onChangeFamily" style="width:200px">
  37. <el-option v-for="(item, key) in familyObj" :key="key" :label="item" :value="key">
  38. </el-option>
  39. </el-select>
  40. </div>
  41. <el-button-group class="margin-left_10">
  42. <el-tooltip v-for="item in viewList" :key="item.value" class="item" effect="dark" :content="item.title"
  43. placement="top">
  44. <el-button @click="handleChangeView(item)" size="small"
  45. :type="viewSelected === item.value ? 'primary' : ''">
  46. <i :class="item.btn" style="font-size: 12px !important;"></i>
  47. </el-button>
  48. </el-tooltip>
  49. </el-button-group>
  50. <el-button class="margin-left_10" type="primary" size="small" @click="handleFieldManage" v-if="toProjectId && toProjectName">显示栏位管理</el-button>
  51. <el-dropdown v-else ref="myDropdown" trigger="click" :hide-on-click="false" split-button type="primary" size="small" @command="clickMyDropdown($event)">
  52. <span @click="handleFieldManage">显示栏位管理</span>
  53. <el-dropdown-menu slot="dropdown" class="text-align_center">
  54. <el-dropdown-item @click.native="handleFile">报告文档</el-dropdown-item>
  55. <!-- <el-dropdown-item @click.native="handleQuestion" v-if="$permission('/workspace/event')">事
  56. 件</el-dropdown-item> -->
  57. <el-dropdown-item @click.native="handleField" v-disabled="false">自定义栏位管理</el-dropdown-item>
  58. <!-- <el-dropdown-item @click.native="exportPDF">导出PDF首页</el-dropdown-item> -->
  59. <el-dropdown-item command="e">
  60. <el-dropdown @command="patentImport($event)" trigger="hover" placement="right-start">
  61. <p>
  62. 专利导入<i class="el-icon-arrow-right el-icon--right"></i>
  63. </p>
  64. <el-dropdown-menu slot="dropdown">
  65. <el-dropdown-item command="1"> Excel导入 </el-dropdown-item>
  66. <el-dropdown-item command="2">专利号导入 </el-dropdown-item>
  67. <el-dropdown-item command="4">检索条件导入 </el-dropdown-item>
  68. </el-dropdown-menu>
  69. </el-dropdown>
  70. </el-dropdown-item>
  71. <el-dropdown-item>
  72. <el-dropdown trigger="hover" placement="right-start">
  73. <p>
  74. 导出PDF首页<i class="el-icon-arrow-right el-icon--right"></i>
  75. </p>
  76. <el-dropdown-menu slot="dropdown">
  77. <el-dropdown-item @click.native="exportPDF(false)">当前全部</el-dropdown-item>
  78. <el-dropdown-item @click.native="exportPDF(true)">当前所选</el-dropdown-item>
  79. </el-dropdown-menu>
  80. </el-dropdown>
  81. </el-dropdown-item>
  82. <!-- <el-dropdown-item @click.native="handleBatch"
  83. :disabled="!($permission('/workspace/folder/batchUploadSpecification') && $r(projectId, [1, 2]))">批量上传说明书</el-dropdown-item>
  84. <el-dropdown-item> -->
  85. <el-dropdown trigger="hover" placement="right-start">
  86. <p>
  87. 导出Excel档<i class="el-icon-arrow-right el-icon--right"></i>
  88. </p>
  89. <el-dropdown-menu slot="dropdown">
  90. <el-dropdown-item @click.native="handleExport(false)">当前全部</el-dropdown-item>
  91. <el-dropdown-item @click.native="handleExport(true)">当前所选</el-dropdown-item>
  92. </el-dropdown-menu>
  93. </el-dropdown>
  94. <!-- <el-dropdown-item>
  95. <el-dropdown trigger="hover" placement="right-start">
  96. <p>
  97. {{ familyObj[queryParams.groupField] }}<i class="el-icon-arrow-right el-icon--right"></i>
  98. </p>
  99. <el-dropdown-menu slot="dropdown">
  100. <el-dropdown-item v-for="(item, key) in familyObj" :key="key" @click.native="onChangeFamily(key)">{{
  101. item }}</el-dropdown-item>
  102. </el-dropdown-menu>
  103. </el-dropdown>
  104. </el-dropdown-item> -->
  105. <el-dropdown-item>
  106. <el-dropdown trigger="hover" placement="right-start">
  107. <p>
  108. 合并<i class="el-icon-arrow-right el-icon--right"></i>
  109. </p>
  110. <el-dropdown-menu slot="dropdown">
  111. <el-dropdown-item @click.native="handleMerge(2)">发明人</el-dropdown-item>
  112. <el-dropdown-item @click.native="handleMerge(0)">申请人/权利人</el-dropdown-item>
  113. </el-dropdown-menu>
  114. </el-dropdown>
  115. </el-dropdown-item>
  116. <el-dropdown-item>
  117. <el-dropdown trigger="hover" placement="right-start">
  118. <p>
  119. 创建报告<i class="el-icon-arrow-right el-icon--right"></i>
  120. </p>
  121. <el-dropdown-menu slot="dropdown" style="margin-top:0px">
  122. <!-- 遍历按钮 -->
  123. <el-dropdown-item @click.native="handleAnalysesFto">FTO调查</el-dropdown-item>
  124. </el-dropdown-menu>
  125. </el-dropdown>
  126. </el-dropdown-item>
  127. <!-- <el-dropdown-item @click.native="handleAnalyses">图表分析</el-dropdown-item> -->
  128. <el-dropdown-item @click.native="toNoveltySearch">查新检索</el-dropdown-item>
  129. <el-dropdown-item @click.native="handleAllocation">任务分配</el-dropdown-item>
  130. <el-dropdown-item @click.native="taskList">任务清单</el-dropdown-item>
  131. <el-dropdown-item @click.native="importAndExportHistory">导入导出历史</el-dropdown-item>
  132. </el-dropdown-menu>
  133. </el-dropdown>
  134. </div>
  135. </el-header>
  136. <el-main v-loading="loading">
  137. <div class="height_100">
  138. <component ref="patentViewList" :is="viewSelected" @download="handleDownload" @change-read="handleChangeRead"
  139. :projectId="projectId" :patentNoList.sync="patentNoList" @addSelect="getChoosePatentNo"
  140. @clickPatentNo="handleClick" :column="customList" @index-setting="handleIndexSetting" @on-sort="handleSort"
  141. :queryParams="queryParams" :tableData="tableData" :refresh='refresh'></component>
  142. </div>
  143. </el-main>
  144. <el-footer class="pagination" style="display:flex;justify-content:space-between;align-items:center">
  145. <div style="display:flex;align-items:center">
  146. <span v-if="selectedTotal > 0">
  147. 已勾选 <b>{{ selectedTotal }}</b> 条
  148. </span>
  149. <el-popover placement="bottom" title="" width="220" trigger="click">
  150. <el-main class="patent-fast-edit-popover" v-loading="selectNumberLoading">
  151. <div class="btn" @click="handleCancelSelectNumber">取消选择</div>
  152. <div class="btn" @click="handleSelectNumber(0)">本页选择</div>
  153. <div class="btn" @click="handleSelectNumber(1)">全部选择</div>
  154. <el-divider></el-divider>
  155. <div class="select-number">
  156. <span>从</span>
  157. <el-input size="mini" v-model="queryParams.startNumber" @change="change1"></el-input>
  158. <span>到</span>
  159. <el-input size="mini" v-model="queryParams.endNumber" @change="change2"></el-input>
  160. <el-button type="text" size="" @click="handleSelectNumber(2)">确定</el-button>
  161. </div>
  162. </el-main>
  163. <el-button type="info" size="small" class="margin-left_10" slot="reference"> 选择专利<i
  164. class="el-icon-arrow-down el-icon--right"></i></el-button>
  165. </el-popover>
  166. <div v-show="selectedTotal > 0" class="margin-left_10">
  167. <el-dropdown size="medium">
  168. <el-button type="primary" size="small">
  169. 批量操作<i class="el-icon-arrow-down el-icon--right"></i>
  170. </el-button>
  171. <el-dropdown-menu slot="dropdown">
  172. <!-- <el-dropdown-item @click.native="handleRead(1)"
  173. :disabled="!$permission('/workspace/folder/isRead')">已读</el-dropdown-item>
  174. <el-dropdown-item @click.native="handleRead(0)"
  175. :disabled="!$permission('/workspace/folder/isRead')">未读</el-dropdown-item> -->
  176. <el-dropdown-item v-if="toProjectId && toProjectName" @click.native="addPatentToReport(toProjectId)">加入到报告({{ toProjectName }})中</el-dropdown-item>
  177. <template v-else>
  178. <el-dropdown-item @click.native="handleIndex">批量标引</el-dropdown-item>
  179. <el-dropdown-item @click.native="checkPatentWorth">价值曲线</el-dropdown-item>
  180. <el-dropdown-item @click.native="deletePatents">删除</el-dropdown-item>
  181. </template>
  182. </el-dropdown-menu>
  183. </el-dropdown>
  184. </div>
  185. <!-- 编辑暂时隐藏,默认置为true -->
  186. <!-- <div class="margin-left_10">
  187. <el-checkbox @change="changeRefresh" :checked="refresh">
  188. <span>编辑</span>
  189. </el-checkbox>
  190. </div> -->
  191. </div>
  192. <div>
  193. <el-pagination background layout="total, sizes, prev, pager, next, jumper"
  194. :current-page.sync="queryParams.current" :page-sizes="sizeArr" :page-size.sync="queryParams.size"
  195. @current-change="handleCurrentChange" @size-change="changeSize" :total="total">
  196. </el-pagination>
  197. </div>
  198. </el-footer>
  199. </el-container>
  200. </el-container>
  201. <Field-Drawer ref="FieldDrawer"></Field-Drawer>
  202. <field ref="field" type="patent" :projectId="projectId" @getFieldList="getFieldList"></field>
  203. <!-- 报告文档 -->
  204. <reportFileDrawer ref="reportFileDrawer"></reportFileDrawer>
  205. <!-- 创建FTO报告 -->
  206. <addAndEditReport ref="addAndEditReport" @addPatentToReport="addPatentToReport"></addAndEditReport>
  207. <!-- 批量那个标引 -->
  208. <PatentBatchIndexVue ref="PatentBatchIndexVue" @submit="submitIndex(true)" :projectId="projectId"></PatentBatchIndexVue>
  209. <!-- 单个栏位标引 -->
  210. <patent-index-setting @submit="submitIndex(false)" :projectId="projectId" ref="patentIndexSetting" />
  211. <!-- 合并发明人/合并权利人、申请人 -->
  212. <patentMergeDrawer ref="patentMergeDrawer" :projectId="projectId" @mergeClose="mergeClose"></patentMergeDrawer>
  213. </div>
  214. </template>
  215. <script>
  216. import { downLoad2, getTreeDataList, getTreeLastChildren, getPatentCountry } from "@/utils"
  217. import { fastSelectPatent } from './components/mixins/fastSelectPatent'
  218. import FieldDrawer from '@/views/components/drawer/Field.vue'
  219. import PatentAbstractListView from './components/views/Abstract'
  220. import PatentTableListView from './components/views/Table.vue'
  221. import PatentPictureListView from './components/views/Picture'
  222. // import PatentPDFListView from './components/views/PDF.vue'
  223. import field from '@/views/components/dialog/fields.vue';
  224. import customFields from '@/views/report/components/patentList/components/customFields/index.vue';
  225. import searchPatent from '@/views/report/components/patentList/components/searchPatent.vue';
  226. import reportFileDrawer from '@/views/report/components/drawer/reportFileDrawer.vue'
  227. import addAndEditReport from '@/views/report/components/dialog/addAndEditReport.vue'
  228. import PatentBatchIndexVue from './components/dialog/PatentBatchIndex.vue'
  229. import patentMergeDrawer from './components/drawer/merge.vue'
  230. import PatentIndexSetting from "./components/dialog/PatentIndexSetting"
  231. import PatentKeywordsHighlight from '../components/PatentKeywordsHighlight.vue'
  232. export default {
  233. mixins: [fastSelectPatent],
  234. components: {
  235. FieldDrawer,
  236. PatentAbstractListView,
  237. PatentTableListView,
  238. PatentPictureListView,
  239. field,
  240. customFields,
  241. searchPatent,
  242. reportFileDrawer,
  243. addAndEditReport,
  244. PatentBatchIndexVue,
  245. patentMergeDrawer,
  246. PatentIndexSetting,
  247. PatentKeywordsHighlight
  248. },
  249. props: {},
  250. data() {
  251. return {
  252. //是否隐藏左侧
  253. showLeft: true,
  254. //检索字段
  255. searchFiled: [],
  256. // //检索条件
  257. // searchOption: {
  258. // name: localStorage.searchContent,
  259. // },
  260. //视图方式
  261. viewList: [
  262. {
  263. value: 'patent-table-list-view',
  264. title: '表格视图',
  265. btn: 'el-icon-tickets',
  266. },
  267. {
  268. value: 'patent-abstract-list-view',
  269. title: '摘要视图',
  270. btn: 'el-icon-news',
  271. },
  272. {
  273. value: 'patent-picture-list-view',
  274. title: '图片视图',
  275. btn: 'el-icon-picture-outline',
  276. },
  277. // {
  278. // value: 'PatentPDFListView',
  279. // title: 'PDF视图',
  280. // btn: 'iconfont icon-pdf',
  281. // }
  282. ],
  283. //选择的视图
  284. viewSelected: "patent-abstract-list-view",
  285. //显示栏位
  286. customList: [],
  287. //同族
  288. familyObj: {
  289. '0': '不区分同族',
  290. // 'simpleFamilyId': '简单同族',
  291. 'inpadocFamilyId': '同族',
  292. // 'patsnapFamilyId': '扩展同族',
  293. },
  294. //页大小
  295. sizeArr: [10, 20, 30, 40, 50, 100],
  296. //排序
  297. sort: [],
  298. //加载
  299. loading: false,
  300. // 统计勾选的值(专利著录(专利本身))
  301. searchPatentCheck: [],
  302. // 存放专利本身检索条件
  303. searchStr: '',
  304. // 存放自定义栏位的检索条件
  305. customFields: [],
  306. };
  307. },
  308. watch: {},
  309. computed: {
  310. // 专题库id
  311. projectId() {
  312. return this.$route.query.id
  313. },
  314. projectName() {
  315. return this.$route.query.projectName
  316. },
  317. toProjectId(){
  318. return this.$route.query.toProjectId
  319. },
  320. toProjectName(){
  321. return this.$route.query.toProjectName
  322. },
  323. },
  324. created() { },
  325. async mounted() {
  326. this.customList = await this.$commonJS.getCustomField('patent', { projectId: this.projectId, taskId: this.taskId })
  327. await this.getColumn()
  328. // 获取专利信息
  329. this.getList()
  330. },
  331. methods: {
  332. // 处理后的条件
  333. handleSearchValue({ searchStr, customFields }) {
  334. this.searchStr = searchStr
  335. this.customFields = customFields
  336. this.queryParams.current = 1
  337. this.handleCancelSelectNumber()
  338. this.getList()
  339. this.$nextTick(()=>{
  340. this.$refs.customFields.close()
  341. })
  342. },
  343. // 统计组件传的值
  344. handleCustomFields(val) {
  345. this.searchPatentCheck = val
  346. this.$nextTick(() => {
  347. this.$refs.searchPatent.search2()
  348. })
  349. },
  350. // 点击专利号进行跳转
  351. handleClick(row, location) {
  352. var search = {
  353. searchOption: {
  354. searchQuery: this.searchStr || '',
  355. customFields: this.customFields,
  356. groupField:this.queryParams.groupField,
  357. orderDTOList: this.sort,
  358. moreConditions:true
  359. },
  360. location: location,
  361. }
  362. this.$s.setSession('search', search)
  363. this.$router.push(
  364. {
  365. path: '/patentDetails/' + row.patentNo,
  366. query: {
  367. projectId: this.projectId,
  368. projectType:'1',//判断是不是从专题库进入专利详情1为专题库2为报告(报告未传2)
  369. projectName:this.projectName
  370. }
  371. }
  372. )
  373. },
  374. //获取table栏位及分组字段、检索字段
  375. //获取检索字段
  376. async getColumn() {
  377. // let params = ['patent']//原获取检索字段
  378. // await this.$api.getParamsCommon(params).then(res => {
  379. // if (res.code == 200) {
  380. // let conditionDTOList = JSON.parse(JSON.stringify(res.data[0].conditionDTOList))
  381. // // 搜索字段
  382. // this.searchFiled = this.$commonJS.getField(conditionDTOList, (u) => u.ifSearch == true, {
  383. // label: 'name',
  384. // value: 'value',
  385. // type: 'type',
  386. // })
  387. // }
  388. // })
  389. let params = [{
  390. tableName: 'patent',
  391. projectId: this.projectId,
  392. }]
  393. await this.$api.getQueryFields(params).then(res => {
  394. if (res.code == 200) {
  395. let conditionDTOList = JSON.parse(JSON.stringify(res.data.data[0].conditionDTOList))
  396. let field = conditionDTOList.filter(item => {
  397. return item.group == 'nos'
  398. })
  399. let custom = conditionDTOList.filter(item => {
  400. return item.group == 'customField'
  401. })
  402. let customField = custom.filter(item => {
  403. return item.type != 'tree' && item.type != 'Array'
  404. })
  405. let arr = field.concat(customField)
  406. // 搜索字段
  407. this.searchFiled = this.$commonJS.getField(arr, (u) => u.ifSearch == true, {
  408. label: 'name',
  409. value: 'field',
  410. type: 'type',
  411. group: 'group',
  412. fieldType: 'fieldType',
  413. groupBy: 'groupBy',
  414. children:'children'
  415. })
  416. }
  417. })
  418. },
  419. //检索
  420. // search(val) {
  421. // let params = {}
  422. // val.forEach(item => {
  423. // if (item.type == 3) {
  424. // params[item.value] = item.searchValue.map(itemValue => {
  425. // return itemValue.value
  426. // })
  427. // } else {
  428. // params[item.value] = item.searchValue.label
  429. // }
  430. // })
  431. // // 返回字符串
  432. // this.searchOption = params
  433. // // 调用查询接口
  434. // this.queryParams.current = 1
  435. // this.getList()
  436. // },
  437. //切换视图
  438. async handleChangeView(item) {
  439. this.viewSelected = item.value
  440. this.queryParams.current = 1
  441. // if (this.viewSelected == 'PatentPDFListView') {
  442. // return false
  443. // }
  444. if (this.viewSelected === 'patent-picture-list-view') {
  445. this.$set(this.queryParams, 'size', 20)
  446. } else {
  447. this.queryParams.size = 10
  448. }
  449. this.getList()
  450. },
  451. //查询专利自定义字段对应的值
  452. getPatentFields(){
  453. var arr = this.customList.filter(item=>{
  454. return item.ifPersonal && !item.ifHidden
  455. })
  456. if(arr.length == 0){
  457. return false
  458. }
  459. if(this.tableData.length == 0){
  460. return false
  461. }
  462. var patent = this.tableData[0]
  463. var customFields = patent.customFields
  464. if(customFields){
  465. for(var i = 0;i<customFields.length;i++){
  466. var index = arr.find(item=>{
  467. return item.value == customFields[i].value
  468. })
  469. if(index != -1){
  470. arr.splice(index,1)
  471. }
  472. }
  473. }
  474. var patentNos = this.tableData.map(item=>{
  475. return item.patentNo
  476. })
  477. var params = {
  478. projectId:this.projectId,
  479. patentNos:patentNos,
  480. innerFields:arr.map(item=>{
  481. return {
  482. fieldType:item.type,
  483. fieldId:item.value
  484. }
  485. })
  486. }
  487. this.$api.getPatentFields(params).then(response=>{
  488. if(response.code == 200){
  489. var data = response.data.data
  490. for(var i = 0;i<data.length;i++){
  491. var index = patentNos.findIndex(item=>{
  492. return item == data[i].patentNo
  493. })
  494. if(index!=-1){
  495. this.$set(this.tableData[index],'customFields',data[i].innerClassFields)
  496. }
  497. }
  498. }
  499. })
  500. },
  501. //获取专利信息
  502. getList(size) {
  503. if (size) {
  504. this.queryParams.size = size
  505. }
  506. let params = {
  507. ...this.queryParams,//分页信息及区分同族类型
  508. projectId: this.projectId,
  509. searchQuery: this.searchStr || '',//检索条件
  510. customFields: this.customFields,
  511. orderDTOList: this.sort,//排序信息
  512. }
  513. this.loading = true
  514. // this.$store.commit("SET_PATENT_PARAMS", params);
  515. this.$store.commit("SET_PATENT_RECORDS", []);
  516. this.$api.QueryPatent(params).then(res => {
  517. if (res.code == 200) {
  518. this.tableData = res.data.data
  519. this.total = res.data.total
  520. this.$set(this.queryParams, 'startNumber', this.endNumber > 0 ? this.startNumber : 1)
  521. this.$set(this.queryParams, 'endNumber', this.endNumber > 0 ? this.endNumber : this.total)
  522. // this.$store.commit("SET_PATENT_PARAMS", params);
  523. this.$store.commit("SET_PATENT_RECORDS", res.data.data);
  524. if (this.quickSelect) {
  525. this.commonSwitch()
  526. }
  527. this.isRefresh()
  528. this.getPatentFields()
  529. this.loading = false
  530. }
  531. }).catch(error => {
  532. this.tableData = []
  533. this.total = 0
  534. this.loading = false
  535. })
  536. },
  537. //排序
  538. handleSort({ column, prop, order }) {
  539. //如需要多个字段排序,则不需要清空
  540. var params = {
  541. sort: this.sort,
  542. column,
  543. prop,
  544. order,
  545. }
  546. this.sort = this.$commonJS.getSortData(params)
  547. this.queryParams.current = 1
  548. this.getList()
  549. },
  550. //分页
  551. handleCurrentChange(val) {
  552. this.queryParams.current = val;
  553. this.getList();
  554. },
  555. //切换页大小
  556. changeSize(val){
  557. this.queryParams.size = val
  558. this.queryParams.current = 1
  559. this.getList()
  560. },
  561. //自定义栏位管理
  562. async handleField() {
  563. if(!(await this.$permission.projectPermission(this.projectId))){
  564. this.$showPermissionDialog()
  565. return false
  566. }
  567. this.$refs.FieldDrawer.open(this.projectId)
  568. },
  569. //获取显示栏位
  570. getFieldList(data) {
  571. this.customList = []
  572. this.$nextTick(()=>{
  573. this.customList = data
  574. this.getPatentFields()
  575. })
  576. },
  577. //显示栏位管理
  578. async handleFieldManage() {
  579. this.$refs.field.open(this.customList)
  580. },
  581. //报告文档
  582. handleFile() {
  583. this.$refs.reportFileDrawer.open(this.projectId)
  584. },
  585. //创建FTO报告
  586. handleAnalysesFto() {
  587. if(!this.$permission.FunPermissions('xiaoshi/report/FTO')){
  588. this.$showPermissionDialog()
  589. return false
  590. }
  591. var form = {
  592. reportType: 3,
  593. signPatentNo: '',
  594. matterId: [],
  595. scenarioId: [],
  596. assoReportId: this.projectId,
  597. }
  598. var havePatent = this.selectedTotal>0
  599. this.$refs.addAndEditReport.open(form,havePatent)
  600. },
  601. //添加专利到报告中
  602. addPatentToReport(reportId){
  603. if(!reportId){
  604. return
  605. }
  606. var params = {
  607. stringRequest:{
  608. projectId: this.projectId,
  609. searchQuery: this.searchStr,
  610. customFields: this.customFields,
  611. orderDTOList:this.sort,
  612. groupField:this.queryParams.groupField
  613. },
  614. fromProjectId:this.projectId, //来源专题库项目id
  615. startNumber:this.startNumber, //开始位置
  616. endNumber:this.endNumber,//结束位置
  617. toProjectId:reportId, //目标报告项目id
  618. isAdd:this.queryParams.isAdd, //去除专利号
  619. isDelete:this.queryParams.isDelete, //附加专利号
  620. }
  621. var message = this.$message({
  622. type:'warning',
  623. message: '正在将专利导入报告中...',
  624. duration: 0 // 设置为0表示不自动关闭
  625. })
  626. this.$api.addProjectPatentToReport(params).then(res=>{
  627. if(res.code == 200){
  628. message.close()
  629. this.$message(
  630. {
  631. type:'success',
  632. message:'导入成功'
  633. }
  634. )
  635. }
  636. }).catch(error=>{
  637. message.close()
  638. this.$message(
  639. {
  640. type:'error',
  641. message:'导入失败'
  642. }
  643. )
  644. })
  645. },
  646. //切换同族
  647. onChangeFamily(key) {
  648. this.queryParams.current = 1
  649. this.queryParams.groupField = key
  650. this.handleCancelSelectNumber()
  651. this.getList()
  652. this.$nextTick(()=>{
  653. this.$refs.customFields.refreshOptions(1)
  654. })
  655. },
  656. //价值曲线
  657. async checkPatentWorth(){
  658. if(!(await this.$permission.projectPermission(this.projectId))){
  659. this.$showPermissionDialog()
  660. return false
  661. }
  662. let obj = {
  663. isAdd: this.queryParams.isAdd,
  664. isDelete: this.queryParams.isDelete,
  665. startNumber: this.startNumber,
  666. endNumber: this.endNumber,
  667. searchQuery: this.searchStr,
  668. customFields: this.customFields,
  669. groupField:this.queryParams.groupField,
  670. orderDTOList:this.sort,
  671. projectId: this.projectId,
  672. }
  673. let router = this.$router.resolve({
  674. path: '/patentWorth',
  675. query: {
  676. searchData:JSON.stringify(obj)
  677. }
  678. })
  679. window.open(router.href, '_blank')
  680. },
  681. //导出专利
  682. async handleExport(val) {
  683. if (val) {
  684. if ( this.endNumber < 1 && this.queryParams.isAdd.length == 0) {
  685. this.$message.error('请先选择专利')
  686. return false
  687. }
  688. }
  689. let obj = {
  690. isAdd: this.queryParams.isAdd,
  691. isDelete: this.queryParams.isDelete,
  692. startNumber: this.startNumber,
  693. endNumber: this.endNumber,
  694. searchQuery: this.searchStr,
  695. customFields: this.customFields,
  696. groupField:this.queryParams.groupField,
  697. orderDTOList:this.sort,
  698. }
  699. if (!val) {
  700. // 如果是导出全部,endNumber是当前的全部专利
  701. obj.endNumber=this.total
  702. }
  703. let router = this.$router.resolve({
  704. path: '/exportPatent',
  705. query: {
  706. projectId: this.projectId,
  707. condition: JSON.stringify(obj)
  708. }
  709. })
  710. window.open(router.href, '_blank')
  711. },
  712. //PDF首页导出
  713. exportPDF(sign) {
  714. if (sign) {
  715. if ( this.endNumber < 1 && this.queryParams.isAdd.length == 0) {
  716. this.$message.error('请先选择专利')
  717. return false
  718. }
  719. }
  720. if(sign){
  721. var params = {
  722. projectId: this.projectId,
  723. searchQuery: this.searchStr || '',//检索条件
  724. customFields: this.customFields || [],//自定义字段的检索
  725. groupField:this.queryParams.groupField,
  726. isAdd: this.queryParams.isAdd,
  727. isDelete: this.queryParams.isDelete,
  728. startNumber: this.startNumber,
  729. endNumber: this.endNumber,
  730. orderDTOList:this.sort,
  731. }
  732. }else{
  733. var params = {
  734. projectId: this.projectId,
  735. searchQuery: this.searchStr || '',//检索条件
  736. customFields: this.customFields || [],//自定义字段的检索
  737. groupField:this.queryParams.groupField,
  738. isAdd: [],
  739. isDelete: [],
  740. startNumber: 1,
  741. endNumber: this.total,//默认是当前全部
  742. orderDTOList:this.sort,
  743. }
  744. }
  745. this.$api.exportPDFFirstPage(params).then(res => {
  746. if (res.code == 200) {
  747. const h = this.$createElement;
  748. this.$msgbox({
  749. title: '提示',
  750. message: h('p', null, [
  751. h('span', null, '任务正在导入,查看任务进度请前往 '),
  752. h('span', {
  753. style: 'color: #ff7d38;cursor: pointer;',
  754. on: {
  755. click: () => {//
  756. let router = this.$router.resolve({
  757. path: '/taskList',
  758. query: {
  759. importToId: this.projectId,
  760. }
  761. })
  762. window.open(router.href, '_blank')
  763. this.$msgbox.close(false)
  764. }
  765. }
  766. }, '立即前往',)
  767. ]),
  768. type: 'warning',
  769. showConfirmButton: false,
  770. }).then(action => {
  771. });
  772. }
  773. })
  774. },
  775. //图表分析
  776. async handleAnalyses() {
  777. var params = {
  778. searchQuery: this.searchStr || '',//检索条件
  779. customFields: this.customFields || [],
  780. groupField:this.queryParams.groupField,
  781. orderDTOList: this.sort,//排序信息
  782. projectId:this.projectId
  783. }
  784. const router = this.$router.resolve({
  785. path: '/customChart',
  786. query: {
  787. projectId: this.projectId,
  788. search:JSON.stringify(params),
  789. patentNum:this.total
  790. }
  791. })
  792. window.open(router.href, '_blank');
  793. },
  794. //去查新检索
  795. toNoveltySearch(){
  796. const router = this.$router.resolve({
  797. path: '/conditionImport',
  798. query:{
  799. noveltySearch:true,
  800. innerProjectId:this.projectId
  801. }
  802. })
  803. window.open(router.href, '_blank');
  804. },
  805. // 跳转分配任务页面
  806. async handleAllocation() {
  807. if(!(await this.$permission.projectPermission(this.projectId))){
  808. this.$showPermissionDialog()
  809. return false
  810. }
  811. this.$router.push(
  812. {
  813. path: '/allocationTask',
  814. query: {
  815. projectId: this.projectId,
  816. searchOption: this.searchStr,//输入框检索条件
  817. groupField:this.queryParams.groupField,
  818. customFields: JSON.stringify(this.customFields),//右侧勾选自定义栏位的条件
  819. projectType:1
  820. }
  821. }
  822. )
  823. },
  824. //任务清单
  825. async taskList(){
  826. if(!(await this.$permission.projectPermission(this.projectId))){
  827. this.$showPermissionDialog()
  828. return false
  829. }
  830. this.$router.push(
  831. {
  832. path:'/myTask',
  833. query:{
  834. projectId:this.projectId
  835. }
  836. }
  837. )
  838. },
  839. //导入导出历史
  840. async importAndExportHistory(){
  841. if(!(await this.$permission.projectPermission(this.projectId))){
  842. this.$showPermissionDialog()
  843. return false
  844. }
  845. this.$router.push({
  846. path: "/taskList",
  847. query:{
  848. importToId:this.projectId
  849. }
  850. });
  851. },
  852. clickMyDropdown(e){
  853. if(e == undefined){
  854. this.$refs.myDropdown.hide()
  855. }
  856. },
  857. //专利导入
  858. async patentImport(type){
  859. if(!(await this.$permission.projectPermission(this.projectId))){
  860. this.$showPermissionDialog()
  861. return false
  862. }
  863. var form = {
  864. importToId:this.projectId,
  865. importToType:0,
  866. type:type,
  867. }
  868. this.$commonJS.toImportParent(form,type)
  869. },
  870. //合并发明人//合并申请人、权利人
  871. async handleMerge(type) {
  872. if(!(await this.$permission.projectPermission(this.projectId))){
  873. this.$showPermissionDialog()
  874. return false
  875. }
  876. let obj = {
  877. projectId: this.projectId,
  878. mergeType: type
  879. }
  880. let title = type == 2?'合并发明人':'合并申请人/权利人'
  881. this.$refs.patentMergeDrawer.open(obj,title)
  882. },
  883. // 合并发明人、申请人、权利人后子组件发送的消息
  884. mergeClose() {
  885. this.getList()
  886. this.$refs.customFields.refreshOptions(1)
  887. },
  888. //自定义栏位以及标签设置值
  889. async handleIndexSetting(patent, field) {
  890. if(!(await this.$permission.projectPermission(this.projectId))){
  891. // this.$showPermissionDialog()
  892. return false
  893. }
  894. let obj = {
  895. isAdd: [patent.patentNo],
  896. isDelete: [],
  897. startNumber: 1,
  898. endNumber: 0,
  899. searchQuery: this.searchStr,
  900. customFields: this.customFields,
  901. groupField:this.queryParams.groupField,
  902. orderDTOList:this.sort,
  903. }
  904. if (field) {
  905. this.$refs.patentIndexSetting.open(obj,patent, field)
  906. }
  907. },
  908. submitIndex(value){
  909. if(value){
  910. this.handleCancelSelectNumber()
  911. }
  912. this.getList()
  913. this.$refs.customFields.refreshOptions(1)
  914. },
  915. //下载PDF
  916. async handleDownload(patent) {
  917. const { data } = await this.$api.getPatentInstructionList({ current: 1, size: 9999, patentNo: patent.patentNo })
  918. if (data.records.length !== 0) {
  919. downLoad2(data.records[0].url)
  920. } else {
  921. this.$alert('专利暂未上传说明书文档', '请求错误', {
  922. confirmButtonText: '确定',
  923. type: 'error',
  924. callback: action => { }
  925. });
  926. }
  927. },
  928. //切换已读未读
  929. handleChangeRead(ids, status) {
  930. let params = {
  931. patentIds: ids,
  932. projectId: this.projectId,
  933. status: status,
  934. folder: this.queryParams.folder
  935. }
  936. this.fastEditLoading = true
  937. this.$api.updatePatentReadStatus(params).then(response => {
  938. this.$refs.patentQueryFilter.getPatentReadTotal()
  939. this.fastEditLoading = false
  940. this.getList()
  941. }).catch(error => {
  942. this.fastEditLoading = false
  943. })
  944. },
  945. //自定义栏位以及标签设置值
  946. // handleIndexSetting(patent, field) {
  947. // if (field) {
  948. // this.$refs.patentIndexSetting.open(this.queryParams.projectId, patent, field)
  949. // }
  950. // },
  951. //取消编辑
  952. // changeRefresh() {
  953. // this.patentNoList = []
  954. // // this.refresh = !this.refresh
  955. // },
  956. },
  957. };
  958. </script>
  959. <style lang="scss" scoped>
  960. .patent-fast-edit-popover {
  961. padding: 0 !important;
  962. .btn {
  963. color: #000;
  964. line-height: 30px;
  965. border-radius: 5px;
  966. padding-left: 10px;
  967. text-align: left;
  968. font-size: 14px;
  969. cursor: pointer;
  970. &:hover {
  971. background: #adadad;
  972. color: #fff;
  973. }
  974. }
  975. .disabled {
  976. cursor: not-allowed !important;
  977. }
  978. .bottom {
  979. text-align: right;
  980. color: #1e9fff;
  981. line-height: 40px;
  982. padding-left: 10px;
  983. font-size: 18px;
  984. }
  985. .el-divider--horizontal {
  986. margin: 10px 0 !important;
  987. }
  988. .select-number {
  989. .el-input {
  990. width: 70px;
  991. }
  992. span {
  993. padding: 0 3px;
  994. }
  995. }
  996. }
  997. </style>