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