index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867
  1. <template>
  2. <div class="height_100">
  3. <el-container v-if="showView">
  4. <el-header>
  5. <div id="step1">
  6. <mySearch style="width:500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption">
  7. </mySearch>
  8. </div>
  9. <div style="display:flex;">
  10. <div id="step2" v-if="[2].indexOf(isOperate) == -1" class="margin-right_10">
  11. <span>分组查询:</span>
  12. <el-select v-model="groupingValue" size="small" @change="changeGrouping" clearable style="width: 120px">
  13. <el-option v-for="item in groupingOption" :key="item.value" :label="item.name" :value="item.value">
  14. </el-option>
  15. </el-select>
  16. </div>
  17. <el-button-group id="step3" style="display:flex;justify-content:flex-start" v-if="[2].indexOf(isOperate) == -1">
  18. <el-button v-for="item in viewTypes" :key="item.component" size="small"
  19. :type="viewType == item.component ? 'primary' : ''" @click="onChange(item.component)">{{ item.name
  20. }}</el-button>
  21. </el-button-group>
  22. <div id="step4" class="margin-left_10">
  23. <el-dropdown size="small">
  24. <el-button type="primary" size="small">
  25. 创建报告<i class="el-icon-arrow-down el-icon--right"></i>
  26. </el-button>
  27. <el-dropdown-menu slot="dropdown" style="margin-top:0px"
  28. v-if="dictMessage.REPORT_TYPE && dictMessage.REPORT_TYPE.length > 0">
  29. <!-- 遍历按钮 -->
  30. <el-dropdown-item v-for="item in dictMessage.REPORT_TYPE.filter(item => !['6'].includes(item.value))"
  31. :key="item.label" @click.native="handleAnalyse(item.value)">{{ item.label }}</el-dropdown-item>
  32. </el-dropdown-menu>
  33. </el-dropdown>
  34. <el-button type="primary" class="margin-left_10 margin-right_10" size="small" @click="showField">显示栏位管理</el-button>
  35. <el-button v-if="componentType == 2" type="primary" class="margin-right_10" size="small" @click="IPREmail">IPR邮箱</el-button>
  36. </div>
  37. </div>
  38. </el-header>
  39. <el-main id="patent-list-container" class="main" v-loading="loading" style="display: flex;">
  40. <!-- <div>
  41. <el-tabs v-model="tab" tab-position="left" @tab-click="(tab)=>tabChange(tab.name)" style="height:100%">
  42. <el-tab-pane label="总表" name="1"></el-tab-pane>
  43. <el-tab-pane label="官方无效" name='2'></el-tab-pane>
  44. </el-tabs>
  45. </div> -->
  46. <div style="width:100%;padding-right:5px">
  47. <component :is="viewType" v-bind="$attrs" v-on="$listeners" :isOperate="isOperate" :tableData="dataList" @tabChange="tabChange" :fixedSearch="fixedSearch"
  48. :state="state" :queryParams="queryParams" @option="handleOption" @on-sort="handleSort" :groupBy="groupingValue"
  49. :groupingOption="groupingOption" :commonData="commonData" :searchOption="searchOption" :column="columnList" @params="getParams"></component>
  50. </div>
  51. </el-main>
  52. <el-footer class="pagination" v-if="viewType != 'visual'">
  53. <el-pagination background layout="total,sizes, prev, pager, next, jumper" :current-page.sync="queryParams.current"
  54. :page-sizes="pageSize" :page-size.sync="queryParams.size" @current-change="handleCurrentChange" @size-change="handleSizeChange" :total="total">
  55. </el-pagination>
  56. </el-footer>
  57. </el-container>
  58. <CreateReport ref="ReportForm" @getList="isGetList"></CreateReport>
  59. <fields ref="field" :type="type" @getFieldList="getFieldList"></fields>
  60. <Field-Drawer ref="FieldDrawer"></Field-Drawer>
  61. <reportFileDrawer ref="reportFileDrawer"></reportFileDrawer>
  62. <cronConclusion ref="cronConclusion" @save="getList"></cronConclusion>
  63. <exportReport ref="exportReport"></exportReport>
  64. <!-- 项目分享 -->
  65. <patentShare ref="patentShare"></patentShare>
  66. <!-- IPR邮箱 -->
  67. <IPREmailDialog ref="IPREmailDialog"></IPREmailDialog>
  68. <!-- 配案人员/实际处理人 -->
  69. <handlePersonDialog ref="handlePersonDialog"></handlePersonDialog>
  70. </div>
  71. </template>
  72. <script>
  73. import Table from './view/table.vue'
  74. import Card from './view/card.vue'
  75. import visual from './view/visual.vue'
  76. import mergeTable from './view/mergeTable.vue'
  77. import CreateReport from './dialog/addAndEditReport.vue'
  78. import fields from '@/views/components/dialog/fields.vue';
  79. import FieldDrawer from '@/views/components/drawer/Field.vue'
  80. import reportFileDrawer from './drawer/reportFileDrawer.vue'
  81. import cronConclusion from './dialog/cronConclusion.vue'
  82. import exportReport from './dialog/exportReport.vue'
  83. import patentShare from '@/views/components/drawer/Share.vue';
  84. import IPREmailDialog from '../InvalidResponse/components/dialog/IPREmail.vue'
  85. import handlePersonDialog from './dialog/handlePerson.vue'
  86. export default {
  87. components: {
  88. Table,
  89. Card,
  90. visual,
  91. CreateReport,
  92. mergeTable,
  93. fields,
  94. FieldDrawer,
  95. reportFileDrawer,
  96. cronConclusion,
  97. exportReport,
  98. patentShare,
  99. IPREmailDialog,
  100. handlePersonDialog
  101. },
  102. props: {
  103. isOperate: '',
  104. matterId: {},
  105. scenarioId: {},
  106. eventName: '',
  107. eventId: '',
  108. componentType:{
  109. default:1
  110. }
  111. },
  112. data() {
  113. return {
  114. tab:'1',
  115. //视图类型
  116. viewTypes: [
  117. // {
  118. // name: '可视化',
  119. // component: 'visual'
  120. // },
  121. {
  122. name: '列表',
  123. component: 'Table'
  124. },
  125. {
  126. name: '卡片',
  127. component: 'Card'
  128. },
  129. ],
  130. //当前视图类型
  131. viewType: 'Table',
  132. //检索字段
  133. searchFiled: [],
  134. //检索条件
  135. searchOption: {
  136. name: localStorage.searchContent,
  137. reportType: localStorage.reportType ? [localStorage.reportType] : '',
  138. scenarioNames: this.scenarioId,
  139. matterNames: this.matterId,
  140. eventNames: this.eventName
  141. },
  142. //分组的值
  143. groupingValue: '',
  144. //分组
  145. groupingOption: [],
  146. //分页信息
  147. queryParams: {
  148. current: 1,
  149. size: 10,
  150. },
  151. //总数
  152. total: 0,
  153. //分页数量
  154. pageSize: [10, 20],
  155. //排序字段
  156. sort: [
  157. {
  158. "orderBy": "createTime",
  159. "orderType": 1
  160. }
  161. ],
  162. //加载
  163. loading: false,
  164. //报告数据集合
  165. dataList: [],
  166. // 报告分组数据集合
  167. commonData: [],
  168. // 栏位信息数组
  169. columnList: [],
  170. columnType:{},
  171. fixedSearch:{},
  172. // 子组件新增、编辑报告成功发送的字符串
  173. handleMessage: '',
  174. showView: false,
  175. type:'reportProject'
  176. };
  177. },
  178. watch: {
  179. async componentType(){
  180. await this.tabChange(this.componentType)
  181. }
  182. },
  183. computed: {
  184. dictMessage() {
  185. var a = this.$store.state.dictMessage.dictMessage
  186. if (a.REPORT_TYPE) {
  187. a.REPORT_TYPE.forEach(item => {
  188. if (['0', '1', '2'].includes(item.value)) {
  189. item.permission = 'invalid'
  190. } else if (item.value == 3) {
  191. item.permission = 'FTO'
  192. } else if (item.value == 4) {
  193. item.permission = 'tort'
  194. } else if (item.value == 5) {
  195. item.permission = 'avoidDesign'
  196. } else if (item.value == 7) {
  197. item.permission = 'reInvalid'
  198. }
  199. })
  200. }
  201. return a
  202. },
  203. state() {
  204. var a = this.$store.state.dictMessage.dictMessage.REPORT_STATE
  205. var b = {}
  206. if (a) {
  207. a.forEach(item => {
  208. b[item.value] = item.label
  209. });
  210. return b
  211. }
  212. return []
  213. },
  214. scene() {
  215. var a = this.$store.state.dictMessage.scenario.map(item => {
  216. return {
  217. label: item.name,
  218. value: item.id
  219. }
  220. })
  221. var obj = this.searchFiled.find(item => { return item.label == '应用场景' })
  222. if (obj) {
  223. obj.options = a
  224. }
  225. return this.$store.state.dictMessage.scenario
  226. },
  227. matter() {
  228. var a = this.$store.state.dictMessage.matter.map(item => {
  229. return {
  230. label: item.name,
  231. value: item.id
  232. }
  233. })
  234. var obj = this.searchFiled.find(item => { return item.label == '调查类型' })
  235. if (obj) {
  236. obj.options = a
  237. }
  238. return this.$store.state.dictMessage.matter || []
  239. }
  240. },
  241. created() { },
  242. async mounted() {
  243. if(this.componentType){
  244. await this.tabChange(this.componentType)
  245. }
  246. // 获取搜索/分组
  247. await this.getColumn()
  248. //获取报告清单
  249. this.getList()
  250. this.showViews()
  251. },
  252. methods: {
  253. //IPR邮箱
  254. IPREmail(){
  255. this.$refs.IPREmailDialog.open()
  256. },
  257. //标签页点击
  258. async tabChange(name){
  259. var type = Number(name)
  260. switch(type){
  261. case 1:
  262. this.fixedSearch={}
  263. this.type = 'reportProject'
  264. if(!this.columnType.columnList1){
  265. // 获取table栏位
  266. this.columnList = await this.$commonJS.getCustomField('reportProject')
  267. this.columnType.columnList1 = this.columnList
  268. }
  269. break;
  270. case 2:
  271. this.type = 'invalidReportProject'
  272. if(!this.columnType['columnList' + 2]){
  273. //获取显示栏位
  274. this.columnType.columnList2 = await this.$commonJS.getCustomField('invalidReportProject')
  275. }
  276. this.fixedSearch = {
  277. reportType:[7]
  278. }
  279. break;
  280. }
  281. this.columnList = this.columnType['columnList' + type]
  282. this.queryParams.current = 1
  283. this.isGrouping()
  284. },
  285. //显示视图?
  286. showViews() {
  287. this.showView = false
  288. this.$nextTick(() => {
  289. this.showView = true
  290. })
  291. },
  292. // 显示栏位管理组件返回数据
  293. getFieldList(val) {
  294. this.columnList = []
  295. this.$nextTick(()=>{
  296. this.columnList = val
  297. })
  298. },
  299. // 显示栏位管理
  300. showField() {
  301. this.$refs.field.open(this.columnList)
  302. },
  303. //获取table栏位及分组字段、检索字段
  304. async getColumn() {
  305. let params = ['reportProject']
  306. await this.$api.getParamsCommon(params).then(res => {
  307. if (res.code == 200) {
  308. let conditionDTOList = JSON.parse(JSON.stringify(res.data[0].conditionDTOList))
  309. // 分组字段
  310. this.groupingOption = this.$commonJS.getField(conditionDTOList, (u) => u.ifGroup == true, {
  311. name: 'name',
  312. value: 'value',
  313. })
  314. // 搜索字段
  315. this.searchFiled = this.$commonJS.getField(conditionDTOList, (u) => u.ifSearch == true, {
  316. label: 'name',
  317. value: 'value',
  318. type: 'type',
  319. })
  320. //先获取报告类型,报告状态,相关事件,再为报告类型,报告状态,相关事件添加选项
  321. let arr = ['reportType', 'status', 'cronNames','scenarioNames','matterNames']
  322. arr.forEach(item => {
  323. let obj = this.searchFiled.find(item2 => {
  324. return item2.value == item
  325. })
  326. if (obj) {
  327. this.handleSearchArray(obj)
  328. }
  329. })
  330. //为应用场景添加选项
  331. // var obj = this.searchFiled.find(item => { return item.value == 'scenarioNames' })
  332. // if (obj) {
  333. // obj.options = this.scene.map(item => {
  334. // return {
  335. // label: item.name,
  336. // value: item.id
  337. // }
  338. // })
  339. // }
  340. // var obj = this.searchFiled.find(item => { return item.value == 'matterNames' })
  341. // if (obj) {
  342. // obj.options = this.matter.map(item => {
  343. // return {
  344. // label: item.name,
  345. // value: item.id
  346. // }
  347. // })
  348. // }
  349. }
  350. })
  351. this.showViews()
  352. },
  353. // 处理检索字段为array类型的问题
  354. handleSearchArray(obj) {
  355. switch (obj.value) {
  356. case 'reportType':
  357. if (this.dictMessage.REPORT_TYPE && this.dictMessage.REPORT_TYPE.length > 0) {
  358. let dict = this.dictMessage.REPORT_TYPE.filter(item => !['6'].includes(item.value))
  359. obj.options = dict.map(item => {
  360. return {
  361. label: item.label,
  362. value: item.value,
  363. }
  364. })
  365. }
  366. break;
  367. case 'status':
  368. if (this.dictMessage.REPORT_STATE && this.dictMessage.REPORT_STATE.length > 0) {
  369. let dict = this.dictMessage.REPORT_STATE
  370. obj.options = dict.map(item => {
  371. return {
  372. label: item.label,
  373. value: item.value,
  374. }
  375. })
  376. }
  377. break;
  378. case 'cronNames':
  379. this.$api.queryCrons().then(res => {
  380. if (res.code == 200) {
  381. obj.options = res.data.data
  382. }
  383. })
  384. break;
  385. case 'scenarioNames':
  386. obj.options = this.scene.map(item => {
  387. return {
  388. label: item.name,
  389. value: item.id
  390. }
  391. })
  392. break;
  393. case 'matterNames':
  394. obj.options = this.matter.map(item => {
  395. return {
  396. label: item.name,
  397. value: item.id
  398. }
  399. })
  400. break;
  401. default:
  402. break;
  403. }
  404. },
  405. //接收检索条件
  406. search(val) {
  407. let params = {}
  408. val.forEach(item => {
  409. if (item.type == 3) {
  410. params[item.value] = item.searchValue.map(itemValue => {
  411. return itemValue.value
  412. })
  413. } else {
  414. params[item.value] = item.searchValue.label
  415. }
  416. })
  417. // 返回字符串
  418. this.searchOption = this.$commonJS.ArrayToArray(val)
  419. // 调用查询接口
  420. this.queryParams.current = 1
  421. this.getList()
  422. },
  423. //获取报告列表
  424. getList() {
  425. let params = {
  426. ...this.queryParams,//分页信息
  427. searchQuery: this.$commonJS.objectToString(this.searchOption),//检索条件
  428. orderDTOList: this.sort,//排序信息
  429. }
  430. params.ifInvalidReport = 0
  431. if(this.fixedSearch.reportType){
  432. params.ifInvalidReport = 1
  433. if(params.searchQuery){
  434. params.searchQuery = params.searchQuery + ' and reportType=(' + this.fixedSearch.reportType.join(' OR ') + ')'
  435. }else{
  436. params.searchQuery ='reportType=(' + this.fixedSearch.reportType.join(' OR ') + ')'
  437. }
  438. }
  439. this.loading = true
  440. this.$api.queryReportProject(params).then(res => {
  441. if (res.code == 200) {
  442. this.dataList = res.data.data
  443. this.total = res.data.total
  444. this.loading = false
  445. }
  446. }).catch(error => {
  447. this.dataList = []
  448. this.total = 0
  449. this.loading = false
  450. this.$message.error(error.message)
  451. })
  452. },
  453. // 获取分组数据
  454. getGrouping() {
  455. let params = {
  456. ...this.queryParams,//分页信息
  457. searchQuery: this.$commonJS.objectToString(this.searchOption),//检索条件
  458. orderDTOList: [
  459. {
  460. orderBy: this.groupingValue,
  461. orderType: this.sort&&this.sort.length>0?this.sort[0].orderType : 0
  462. }
  463. ],//排序
  464. groupBy: this.groupingValue,//分组信息
  465. }
  466. params.ifInvalidReport = 0
  467. if(this.fixedSearch.reportType){
  468. params.ifInvalidReport = 1
  469. if(params.searchQuery){
  470. params.searchQuery = params.searchQuery + ' and reportType=(' + this.fixedSearch.reportType.join(' OR ') + ')'
  471. }else{
  472. params.searchQuery ='reportType=(' + this.fixedSearch.reportType.join(' OR ') + ')'
  473. }
  474. }
  475. this.$api.groupReportProject(params).then(res => {
  476. if (res.code == 200) {
  477. this.commonData = res.data.data.values
  478. this.total = res.data.total
  479. }
  480. }).catch(error => {
  481. this.commonData = []
  482. this.total = 0
  483. this.$message.error(error.message)
  484. })
  485. },
  486. //排序
  487. handleSort({ column, prop, order }) {
  488. //如需要多个字段排序,则不需要清空
  489. var params = {
  490. sort: this.sort,
  491. column,
  492. prop,
  493. order,
  494. }
  495. this.sort = this.$commonJS.getSortData(params)
  496. this.queryParams.current = 1
  497. this.isGrouping()
  498. },
  499. //分页
  500. handleCurrentChange(val) {
  501. this.queryParams.current = val;
  502. this.isGrouping()
  503. },
  504. //切换页大小
  505. handleSizeChange(val) {
  506. this.queryParams.size = val
  507. this.queryParams.current = 1
  508. this.isGrouping()
  509. // this.getList()
  510. },
  511. //切换视图
  512. onChange(type) {
  513. this.viewType = type
  514. if (type == 'visual') {
  515. this.$nextTick(() => {
  516. this.reportVisual()
  517. })
  518. return false
  519. }
  520. this.queryParams.size = this.viewType === 'Table' ? 10 : 12
  521. this.groupingValue = ''
  522. this.queryParams.current = 1
  523. this.getList()
  524. },
  525. //展示报告可视化
  526. reportVisual() {
  527. this.$api.reportVisual(this.queryParams).then(response => {
  528. if (response.code == 200) {
  529. // this.$refs.reportVisual.open(response.data)
  530. }
  531. })
  532. },
  533. //切换分组值
  534. changeGrouping(val) {
  535. if (val != '') {
  536. this.viewType = 'mergeTable'
  537. } else {
  538. this.viewType = 'Table'
  539. }
  540. this.queryParams.current = 1
  541. this.groupingValue = val
  542. this.isGrouping()
  543. },
  544. // 区分是否为分组
  545. isGrouping() {
  546. if (this.groupingValue != '') {//分组
  547. this.getGrouping()
  548. } else {//不分组
  549. this.getList()
  550. }
  551. },
  552. //打开创建报告弹窗
  553. handleAnalyse(id) {
  554. var permission = {
  555. 1:'analysisAndOpinion',
  556. 2:'analysisAndOpinion',
  557. 3:'FTO',
  558. 4:'tort',
  559. 5:'avoidDesign',
  560. 7:'officiallyInvalid'
  561. }
  562. if(!this.$permission.FunPermissions('xiaoshi/report/'+permission[id])){
  563. this.$showPermissionDialog()
  564. return false
  565. }
  566. var form = {
  567. reportType: id,
  568. eventId: this.eventId,
  569. eventName: this.eventName,
  570. matterId: this.matterId || [],
  571. scenarioId: this.scenarioId || [],
  572. }
  573. this.$refs.ReportForm.open(form)
  574. },
  575. //操作列
  576. async handleOption({ option, row, isLast }) {
  577. if(!(await this.$permission.projectPermission(row.id))){
  578. this.$showPermissionDialog()
  579. return false
  580. }
  581. this.$s.setSession('params', row)
  582. switch (option) {
  583. case '0'://分享
  584. this.share(row)
  585. break
  586. case '1'://导出报告
  587. this.exportReport(row)
  588. break
  589. case '2'://报告文档
  590. this.handleFile(row)
  591. break
  592. case '5'://拆分特征
  593. // this.handleDetails(row)
  594. break
  595. case '3'://自定义字段
  596. this.handleField(row)
  597. break
  598. case '4'://任务分配
  599. this.handleTask(row)
  600. break
  601. case '6'://导入专利
  602. this.handleImportPatent(row)
  603. break
  604. case '7'://删除
  605. this.handleDelete(row, isLast)
  606. break;
  607. case '8'://侵权分析技术特征对比
  608. // this.$s.setSession('reportMessage1', row)
  609. this.toTortIndex(row)
  610. break
  611. case '9'://回避设计
  612. this.handleDetails(row, '回避设计')
  613. break;
  614. case '10'://对比文件
  615. this.patentList(row)
  616. break
  617. case '11'://完成报告
  618. this.completeReport(row)
  619. break
  620. case '12'://追踪报告
  621. this.trackReport(row)
  622. break
  623. case '13'://添加无效理由和证据
  624. this.toInvalidIndex(row)
  625. break;
  626. case '14'://导入无效证据
  627. this.toInvalidEvidence(row)
  628. break;
  629. case '15'://录入产品信息
  630. this.toInformationEntry(row)
  631. break;
  632. case '16'://检索记录
  633. this.searchRecords(row)
  634. break;
  635. case '17'://导入导出历史
  636. this.importAndExportHistory(row)
  637. break;
  638. case 'e'://编辑
  639. this.handleEdit(row)
  640. break;
  641. case 'matchCase'://实际处理人/配案人员
  642. this.matchCase(row)
  643. break
  644. }
  645. },
  646. //实际处理人/配案人员
  647. matchCase(row){
  648. this.$refs.handlePersonDialog.open(row.id)
  649. },
  650. //导入导出历史
  651. importAndExportHistory(row){
  652. this.$router.push({
  653. path: "/taskList",
  654. query:{
  655. importToId:row.id
  656. }
  657. });
  658. },
  659. //检索记录
  660. searchRecords(row){
  661. this.$router.push({
  662. path:'/searchRecord',
  663. query:{
  664. projectId:row.id,
  665. }
  666. })
  667. },
  668. //分享
  669. share(row){
  670. this.$refs.patentShare.open(row.id)
  671. },
  672. //导出报告
  673. exportReport(row){
  674. this.$refs.exportReport.open(row)
  675. },
  676. //追踪报告
  677. trackReport(row){
  678. var form = JSON.parse(JSON.stringify(row))
  679. this.$set(form,'associateReportName',row.volumeNumber?row.volumeNumber:row.name)
  680. this.$set(form,'associateReportId',row.id)
  681. this.$set(form,'status',2)
  682. this.$set(form,'cronIds',[])
  683. this.$set(form,'cronDescription','')
  684. if(isNaN((row.name).substring((row.name).length-1))){
  685. form.name = row.name + '-V1'
  686. }else{
  687. var a= Number((row.name).substring((row.name).length-1)) + 1
  688. form.name = (row.name).substring(0,(row.name).length-1) + a
  689. }
  690. // form.status = 1
  691. form.id = null
  692. form.track = true
  693. this.$refs.ReportForm.open(form)
  694. },
  695. //完成报告
  696. completeReport(row){
  697. this.$refs.cronConclusion.open(row)
  698. },
  699. //无效证据
  700. toInvalidEvidence(row){
  701. this.$router.push({
  702. path:'/evidence',
  703. query:{
  704. projectId:row.id,
  705. projectName:row.name,
  706. projectType:2,
  707. assProjectId:row.assoReportId,
  708. reportType:row.reportType,
  709. signPatentNo:row.signPatentNo,
  710. patentNo:row.signPatentNo
  711. }
  712. })
  713. },
  714. // 报告文档
  715. handleFile(row) {
  716. this.$refs.reportFileDrawer.open(row.id)
  717. },
  718. //自定义栏位管理
  719. handleField(row) {
  720. this.$refs.FieldDrawer.open(row.id)
  721. },
  722. //跳转到专利列表页面
  723. patentList(row){
  724. this.$router.push(
  725. {
  726. path:'/reportPatentList',
  727. query:{
  728. projectId:row.id,
  729. patentNo:row.signPatentNo,
  730. signPatentNo:row.signPatentNo,
  731. reportType: row.reportType,
  732. status:row.status,
  733. projectName:row.name,
  734. projectType:2,
  735. assProjectId:row.assoReportId
  736. }
  737. }
  738. )
  739. },
  740. // 跳转录入产品信息页面
  741. toInformationEntry(row) {
  742. var routerReport = this.$router.resolve({
  743. path: "/informationEntry",
  744. query: {
  745. patentNo: row.signPatentNo,
  746. projectId: row.id,
  747. reportType: row.reportType
  748. }
  749. })
  750. window.open(routerReport.href, '_blank');
  751. },
  752. // 跳转专利与产品关联比对
  753. toTortIndex(row) {
  754. var routerReport = this.$router.resolve(
  755. {
  756. path: '/patentDetails/' + row.signPatentNo,
  757. query: {
  758. projectId: row.id,
  759. reportType: row.reportType,
  760. taskType:'3'
  761. }
  762. }
  763. )
  764. // var routerReport = this.$router.resolve({
  765. // path: "/tortIndex",
  766. // query: {
  767. // patentNo: row.signPatentNo,
  768. // projectId: row.id,
  769. // reportType: row.reportType
  770. // }
  771. // })
  772. window.open(routerReport.href, '_blank');
  773. },
  774. // 跳转回避设计或拆分特征
  775. handleDetails(row, type) {
  776. if (type == '回避设计') {
  777. var router = this.$router.resolve({
  778. path: "/avoid",
  779. query: {
  780. patentNo: row.signPatentNo,
  781. reportId: row.id,
  782. }
  783. })
  784. window.open(router.href, '_blank');
  785. }
  786. },
  787. // 删除
  788. handleDelete(row, isLast) {
  789. this.handleDeletes([row.id], isLast)
  790. },
  791. // 批量删除报告
  792. handleDeletes(ids, isLast) {
  793. this.$confirm('此操作将永久删除该报告, 是否继续?', '提示', {
  794. confirmButtonText: '确定',
  795. cancelButtonText: '取消',
  796. type: 'warning'
  797. }).then(() => {
  798. this.$api.deleteReportProject(ids).then(res => {
  799. if (res.code == 200) {
  800. if (isLast) {
  801. this.isGrouping()
  802. } else {
  803. this.getList()
  804. }
  805. this.handleMessage = '删除成功'
  806. this.clearMessage()
  807. this.$message.success('删除报告成功')
  808. }
  809. }).catch(err => {
  810. this.$message.error(err.message)
  811. })
  812. }).catch(() => {
  813. this.$message.info("已取消删除")
  814. });
  815. },
  816. //编辑报告
  817. handleEdit(row) {
  818. this.$refs.ReportForm.open(row)
  819. },
  820. //接收可视化的参数
  821. getParams(params) {
  822. if (params.conclusionType == '-1') {
  823. this.searchOption.statuses = ['0', '1', '2', '4', '5']
  824. this.searchOption.types = [params.type]
  825. } else {
  826. this.searchOption.cronIds = [params.conclusionType]
  827. }
  828. var a = JSON.parse(JSON.stringify(this.searchOption))
  829. this.searchOption = a
  830. this.viewType = 'Table'
  831. this.queryParams.current = 1
  832. this.getList()
  833. },
  834. //创建报告子组件返回值
  835. isGetList(val) {
  836. this.handleMessage = val
  837. this.queryParams.current = 1
  838. this.isGrouping()
  839. this.clearMessage()
  840. },
  841. //清空信息
  842. clearMessage() {
  843. this.$emit('submit', true)
  844. this.$nextTick(() => {
  845. this.handleMessage = ''
  846. })
  847. },
  848. },
  849. };
  850. </script>
  851. <style lang="scss" scoped></style>