index.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953
  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.getList()
  322. this.$nextTick(()=>{
  323. this.$refs.customFields.close()
  324. })
  325. },
  326. // 统计组件传的值
  327. handleCustomFields(val) {
  328. this.searchPatentCheck = []
  329. val.forEach(item => {
  330. if (item.check && item.check.length > 0) {
  331. if (item.filedKind == -1) {
  332. this.searchPatentCheck.push(item)
  333. } else {
  334. var checkName = []
  335. if (item.type == 'Array' || item.type == 'tree' || item.type == 'DateTime') {
  336. checkName = item.options.filter(item2 => item.check.includes(item2.id || item2.name)).map(item3 => item3.name);
  337. }
  338. var obj = {
  339. value: item.value,
  340. name: item.name,
  341. filedKind: item.filedKind,
  342. check: item.check,
  343. checkName: checkName,//自定义栏位多选
  344. type: item.type,
  345. ifHaveChild: this.ifHaveChild
  346. }
  347. // return
  348. this.searchPatentCheck.push(obj)
  349. }
  350. }
  351. })
  352. this.$nextTick(() => {
  353. this.$refs.searchPatent.search2()
  354. })
  355. },
  356. // 点击专利号进行跳转
  357. handleClick(row, location) {
  358. var search = {
  359. searchOption: {
  360. searchQuery: this.searchStr || '',
  361. customFields: this.customFields,
  362. orderDTOList: this.sort,
  363. moreConditions:true
  364. },
  365. location: location,
  366. }
  367. this.$s.setSession('search', search)
  368. this.$router.push(
  369. {
  370. path: '/patentDetails/' + row.patentNo,
  371. query: {
  372. projectId: this.projectId,
  373. projectType:'1',//判断是不是从专题库进入专利详情1为专题库2为报告(报告未传2)
  374. }
  375. }
  376. )
  377. },
  378. //获取table栏位及分组字段、检索字段
  379. //获取检索字段
  380. async getColumn() {
  381. // let params = ['patent']//原获取检索字段
  382. // await this.$api.getParamsCommon(params).then(res => {
  383. // if (res.code == 200) {
  384. // let conditionDTOList = JSON.parse(JSON.stringify(res.data[0].conditionDTOList))
  385. // // 搜索字段
  386. // this.searchFiled = this.$commonJS.getField(conditionDTOList, (u) => u.ifSearch == true, {
  387. // label: 'name',
  388. // value: 'value',
  389. // type: 'type',
  390. // })
  391. // }
  392. // })
  393. let params = [{
  394. tableName: 'patent',
  395. projectId: this.projectId,
  396. }]
  397. await this.$api.getQueryFields(params).then(res => {
  398. if (res.code == 200) {
  399. let conditionDTOList = JSON.parse(JSON.stringify(res.data.data[0].conditionDTOList))
  400. let field = conditionDTOList.filter(item => {
  401. return item.group == 'nos'
  402. })
  403. let custom = conditionDTOList.filter(item => {
  404. return item.group == 'customField'
  405. })
  406. let customField = custom.filter(item => {
  407. return item.type != 'tree' && item.type != 'Array'
  408. })
  409. let arr = field.concat(customField)
  410. // 搜索字段
  411. this.searchFiled = this.$commonJS.getField(arr, (u) => u.ifSearch == true, {
  412. label: 'name',
  413. value: 'field',
  414. type: 'type',
  415. group: 'group',
  416. fieldType: 'fieldType',
  417. groupBy: 'groupBy',
  418. children:'children'
  419. })
  420. }
  421. })
  422. },
  423. //检索
  424. // search(val) {
  425. // let params = {}
  426. // val.forEach(item => {
  427. // if (item.type == 3) {
  428. // params[item.value] = item.searchValue.map(itemValue => {
  429. // return itemValue.value
  430. // })
  431. // } else {
  432. // params[item.value] = item.searchValue.label
  433. // }
  434. // })
  435. // // 返回字符串
  436. // this.searchOption = params
  437. // // 调用查询接口
  438. // this.queryParams.current = 1
  439. // this.getList()
  440. // },
  441. //切换视图
  442. async handleChangeView(item) {
  443. this.viewSelected = item.value
  444. this.queryParams.current = 1
  445. // if (this.viewSelected == 'PatentPDFListView') {
  446. // return false
  447. // }
  448. if (this.viewSelected === 'patent-picture-list-view') {
  449. this.$set(this.queryParams, 'size', 20)
  450. } else {
  451. this.queryParams.size = 10
  452. }
  453. this.getList()
  454. },
  455. //查询专利自定义字段对应的值
  456. getPatentFields(){
  457. var arr = this.customList.filter(item=>{
  458. return item.ifPersonal && !item.ifHidden
  459. })
  460. if(arr.length == 0){
  461. return false
  462. }
  463. if(this.tableData.length == 0){
  464. return false
  465. }
  466. var patent = this.tableData[0]
  467. var customFields = patent.customFields
  468. if(customFields){
  469. for(var i = 0;i<customFields.length;i++){
  470. var index = arr.find(item=>{
  471. return item.value == customFields[i].value
  472. })
  473. if(index != -1){
  474. arr.splice(index,1)
  475. }
  476. }
  477. }
  478. var patentNos = this.tableData.map(item=>{
  479. return item.patentNo
  480. })
  481. var params = {
  482. projectId:this.projectId,
  483. patentNos:patentNos,
  484. innerFields:arr.map(item=>{
  485. return {
  486. fieldType:item.type,
  487. fieldId:item.value
  488. }
  489. })
  490. }
  491. this.$api.getPatentFields(params).then(response=>{
  492. if(response.code == 200){
  493. var data = response.data.data
  494. for(var i = 0;i<data.length;i++){
  495. var index = patentNos.findIndex(item=>{
  496. return item == data[i].patentNo
  497. })
  498. if(index!=-1){
  499. this.$set(this.tableData[index],'customFields',data[i].innerClassFields)
  500. }
  501. }
  502. }
  503. })
  504. },
  505. //获取专利信息
  506. getList(size) {
  507. if (size) {
  508. this.queryParams.size = size
  509. }
  510. let params = {
  511. ...this.queryParams,//分页信息及区分同族类型
  512. projectId: this.projectId,
  513. searchQuery: this.searchStr || '',//检索条件
  514. customFields: this.customFields,
  515. orderDTOList: this.sort,//排序信息
  516. }
  517. // this.$store.commit("SET_PATENT_PARAMS", params);
  518. this.$store.commit("SET_PATENT_RECORDS", []);
  519. this.$api.QueryPatent(params).then(res => {
  520. if (res.code == 200) {
  521. this.tableData = res.data.data
  522. this.total = res.data.total
  523. this.$set(this.queryParams, 'startNumber', this.endNumber > 0 ? this.startNumber : 1)
  524. this.$set(this.queryParams, 'endNumber', this.endNumber > 0 ? this.endNumber : this.total)
  525. // this.$store.commit("SET_PATENT_PARAMS", params);
  526. this.$store.commit("SET_PATENT_RECORDS", res.data.data);
  527. if (this.quickSelect) {
  528. this.commonSwitch()
  529. }
  530. this.isRefresh()
  531. this.getPatentFields()
  532. }
  533. }).catch(error => {
  534. this.tableData = []
  535. this.total = 0
  536. })
  537. },
  538. //排序
  539. handleSort({ column, prop, order }) {
  540. //如需要多个字段排序,则不需要清空
  541. var params = {
  542. sort: this.sort,
  543. column,
  544. prop,
  545. order,
  546. }
  547. this.sort = this.$commonJS.getSortData(params)
  548. this.queryParams.current = 1
  549. this.getList()
  550. },
  551. //分页
  552. handleCurrentChange(val) {
  553. this.queryParams.current = val;
  554. this.getList();
  555. },
  556. //自定义栏位管理
  557. handleField() {
  558. this.$refs.FieldDrawer.open(this.projectId)
  559. },
  560. //获取显示栏位
  561. getFieldList(data) {
  562. this.customList = []
  563. this.$nextTick(()=>{
  564. this.customList = data
  565. this.getPatentFields()
  566. })
  567. },
  568. //显示栏位管理
  569. async handleFieldManage() {
  570. this.$refs.field.open(this.customList)
  571. },
  572. //报告文档
  573. handleFile() {
  574. this.$refs.reportFileDrawer.open(this.projectId)
  575. },
  576. //创建FTO报告
  577. handleAnalysesFto() {
  578. if(!this.$permission.FunPermissions('xiaoshi/report/FTO')){
  579. this.$showPermissionDialog()
  580. return false
  581. }
  582. var form = {
  583. reportType: 3,
  584. signPatentNo: '',
  585. matterId: [],
  586. scenarioId: [],
  587. }
  588. this.$refs.addAndEditReport.open(form)
  589. },
  590. //切换同族
  591. onChangeFamily(key) {
  592. this.queryParams.current = 1
  593. this.queryParams.groupField = key
  594. this.getList()
  595. },
  596. // 批量标引
  597. handleIndex() {
  598. let obj = {
  599. selectQuery: {
  600. isAdd: this.queryParams.isAdd,
  601. isDelete: this.queryParams.isDelete,
  602. startNumber: this.startNumber,
  603. endNumber: this.endNumber,
  604. },
  605. searchQuery: this.searchStr,
  606. customFields: this.customFields,
  607. orderDTOList:this.sort,
  608. }
  609. this.$refs.PatentBatchIndexVue.open(obj)
  610. },
  611. //价值曲线
  612. checkPatentWorth(){
  613. let obj = {
  614. isAdd: this.queryParams.isAdd,
  615. isDelete: this.queryParams.isDelete,
  616. startNumber: this.startNumber,
  617. endNumber: this.endNumber,
  618. searchQuery: this.searchStr,
  619. customFields: this.customFields,
  620. orderDTOList:this.sort,
  621. projectId: this.projectId,
  622. }
  623. let router = this.$router.resolve({
  624. path: '/patentWorth',
  625. query: {
  626. searchData:JSON.stringify(obj)
  627. }
  628. })
  629. window.open(router.href, '_blank')
  630. },
  631. //导出专利
  632. async handleExport(val) {
  633. if (val) {
  634. if ( this.endNumber < 1 && this.queryParams.isAdd.length == 0) {
  635. this.$message.error('请先选择专利')
  636. return false
  637. }
  638. }
  639. let obj = {
  640. isAdd: this.queryParams.isAdd,
  641. isDelete: this.queryParams.isDelete,
  642. startNumber: this.startNumber,
  643. endNumber: this.endNumber,
  644. searchQuery: this.searchStr,
  645. customFields: this.customFields,
  646. orderDTOList:this.sort,
  647. }
  648. if (!val) {
  649. // 如果是导出全部,endNumber是当前的全部专利
  650. obj.endNumber=this.total
  651. }
  652. let router = this.$router.resolve({
  653. path: '/exportPatent',
  654. query: {
  655. projectId: this.projectId,
  656. condition: JSON.stringify(obj)
  657. }
  658. })
  659. window.open(router.href, '_blank')
  660. },
  661. //PDF首页导出
  662. exportPDF(sign) {
  663. if (sign) {
  664. if ( this.endNumber < 1 || this.queryParams.isAdd.length == 0) {
  665. this.$message.error('请先选择专利')
  666. return false
  667. }
  668. }
  669. if(sign){
  670. var params = {
  671. projectId: this.projectId,
  672. searchQuery: this.searchStr || '',//检索条件
  673. customFields: this.customFields || [],//自定义字段的检索
  674. isAdd: this.queryParams.isAdd,
  675. isDelete: this.queryParams.isDelete,
  676. startNumber: this.startNumber,
  677. endNumber: this.endNumber,
  678. orderDTOList:this.sort,
  679. }
  680. }else{
  681. var params = {
  682. projectId: this.projectId,
  683. searchQuery: this.searchStr || '',//检索条件
  684. customFields: this.customFields || [],//自定义字段的检索
  685. isAdd: [],
  686. isDelete: [],
  687. startNumber: 1,
  688. endNumber: this.total,//默认是当前全部
  689. orderDTOList:this.sort,
  690. }
  691. }
  692. this.$api.exportPDFFirstPage(params).then(res => {
  693. if (res.code == 200) {
  694. const h = this.$createElement;
  695. this.$msgbox({
  696. title: '提示',
  697. message: h('p', null, [
  698. h('span', null, '任务正在导入,查看任务进度请前往 '),
  699. h('span', {
  700. style: 'color: #ff7d38;cursor: pointer;',
  701. on: {
  702. click: () => {//
  703. let router = this.$router.resolve({
  704. path: '/taskList',
  705. query: {
  706. importToId: this.projectId,
  707. }
  708. })
  709. window.open(router.href, '_blank')
  710. this.$msgbox.close(false)
  711. }
  712. }
  713. }, '立即前往',)
  714. ]),
  715. type: 'warning',
  716. showConfirmButton: false,
  717. }).then(action => {
  718. });
  719. }
  720. })
  721. },
  722. //图表分析
  723. async handleAnalyses() {
  724. var params = {
  725. searchQuery: this.searchStr || '',//检索条件
  726. customFields: this.customFields || [],
  727. orderDTOList: this.sort,//排序信息
  728. projectId:this.projectId
  729. }
  730. const router = this.$router.resolve({
  731. path: '/customChart',
  732. query: {
  733. projectId: this.projectId,
  734. search:JSON.stringify(params),
  735. patentNum:this.total
  736. }
  737. })
  738. window.open(router.href, '_blank');
  739. },
  740. // 跳转分配任务页面
  741. handleAllocation() {
  742. this.$router.push(
  743. {
  744. path: '/allocationTask',
  745. query: {
  746. projectId: this.projectId,
  747. searchOption: JSON.stringify(this.searchStr),//输入框检索条件
  748. customFields: JSON.stringify(this.customFields),//右侧勾选自定义栏位的条件
  749. projectType:1
  750. }
  751. }
  752. )
  753. },
  754. //任务清单
  755. taskList(){
  756. this.$router.push(
  757. {
  758. path:'/myTask',
  759. query:{
  760. projectId:this.projectId
  761. }
  762. }
  763. )
  764. },
  765. //导入导出历史
  766. importAndExportHistory(){
  767. this.$router.push({
  768. path: "/taskList",
  769. query:{
  770. importToId:this.projectId
  771. }
  772. });
  773. },
  774. //专利导入
  775. patentImport(type){
  776. var form = {
  777. importToId:this.projectId,
  778. importToType:0,
  779. type:type,
  780. }
  781. this.$commonJS.toImportParent(form,type)
  782. },
  783. //合并发明人//合并申请人、权利人
  784. handleMerge(type) {
  785. let obj = {
  786. projectId: this.projectId,
  787. mergeType: type
  788. }
  789. let title = type == 2?'合并发明人':'合并申请人/权利人'
  790. this.$refs.patentMergeDrawer.open(obj,title)
  791. },
  792. // 合并发明人、申请人、权利人后子组件发送的消息
  793. mergeClose() {
  794. this.getList()
  795. },
  796. //自定义栏位以及标签设置值
  797. async handleIndexSetting(patent, field) {
  798. if(!(await this.$permission.projectPermission(this.projectId))){
  799. // this.$showPermissionDialog()
  800. return false
  801. }
  802. let obj = {
  803. isAdd: [patent.patentNo],
  804. isDelete: [],
  805. startNumber: 1,
  806. endNumber: 0,
  807. searchQuery: this.searchStr,
  808. customFields: this.customFields,
  809. orderDTOList:this.sort,
  810. }
  811. if (field) {
  812. this.$refs.patentIndexSetting.open(obj,patent, field)
  813. }
  814. },
  815. submitIndex(){
  816. this.getList()
  817. this.$refs.customFields.refreshOptions(1)
  818. },
  819. //下载PDF
  820. async handleDownload(patent) {
  821. const { data } = await this.$api.getPatentInstructionList({ current: 1, size: 9999, patentNo: patent.patentNo })
  822. if (data.records.length !== 0) {
  823. downLoad2(data.records[0].url)
  824. } else {
  825. this.$alert('专利暂未上传说明书文档', '请求错误', {
  826. confirmButtonText: '确定',
  827. type: 'error',
  828. callback: action => { }
  829. });
  830. }
  831. },
  832. //切换已读未读
  833. handleChangeRead(ids, status) {
  834. let params = {
  835. patentIds: ids,
  836. projectId: this.projectId,
  837. status: status,
  838. folder: this.queryParams.folder
  839. }
  840. this.fastEditLoading = true
  841. this.$api.updatePatentReadStatus(params).then(response => {
  842. this.$refs.patentQueryFilter.getPatentReadTotal()
  843. this.fastEditLoading = false
  844. this.getList()
  845. }).catch(error => {
  846. this.fastEditLoading = false
  847. })
  848. },
  849. //自定义栏位以及标签设置值
  850. // handleIndexSetting(patent, field) {
  851. // if (field) {
  852. // this.$refs.patentIndexSetting.open(this.queryParams.projectId, patent, field)
  853. // }
  854. // },
  855. //取消编辑
  856. // changeRefresh() {
  857. // this.patentNoList = []
  858. // // this.refresh = !this.refresh
  859. // },
  860. },
  861. };
  862. </script>
  863. <style lang="scss" scoped>
  864. .patent-fast-edit-popover {
  865. padding: 0 !important;
  866. .btn {
  867. color: #000;
  868. line-height: 30px;
  869. border-radius: 5px;
  870. padding-left: 10px;
  871. text-align: left;
  872. font-size: 14px;
  873. cursor: pointer;
  874. &:hover {
  875. background: #adadad;
  876. color: #fff;
  877. }
  878. }
  879. .disabled {
  880. cursor: not-allowed !important;
  881. }
  882. .bottom {
  883. text-align: right;
  884. color: #1e9fff;
  885. line-height: 40px;
  886. padding-left: 10px;
  887. font-size: 18px;
  888. }
  889. .el-divider--horizontal {
  890. margin: 10px 0 !important;
  891. }
  892. .select-number {
  893. .el-input {
  894. width: 70px;
  895. }
  896. span {
  897. padding: 0 3px;
  898. }
  899. }
  900. }
  901. </style>