index.vue 32 KB

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