index.vue 38 KB

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