index.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932
  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="$permission.FunPermissions('xiaoshi/IPREmail')" type="primary" class="margin-right_10" size="small" @click="IPREmail">联系邮箱</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. <!-- 联系邮箱 -->
  67. <IPREmailDialog ref="IPREmailDialog"></IPREmailDialog>
  68. <!-- 配案人员/实际处理人 -->
  69. <handlePersonDialog ref="handlePersonDialog" @updateHandlePerson="updateHandlePerson"></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. actTypes:[
  177. {
  178. label:'主动',
  179. value:1
  180. },
  181. {
  182. label:'被动',
  183. value:0
  184. },
  185. ]
  186. };
  187. },
  188. watch: {
  189. async componentType(){
  190. await this.tabChange(this.componentType)
  191. }
  192. },
  193. computed: {
  194. dictMessage() {
  195. var a = this.$store.state.dictMessage.dictMessage
  196. if (a.REPORT_TYPE) {
  197. a.REPORT_TYPE.forEach(item => {
  198. if (['0', '1', '2'].includes(item.value)) {
  199. item.permission = 'invalid'
  200. } else if (item.value == 3) {
  201. item.permission = 'FTO'
  202. } else if (item.value == 4) {
  203. item.permission = 'tort'
  204. } else if (item.value == 5) {
  205. item.permission = 'avoidDesign'
  206. } else if (item.value == 7) {
  207. item.permission = 'reInvalid'
  208. }
  209. })
  210. }
  211. return a
  212. },
  213. state() {
  214. var a = this.$store.state.dictMessage.dictMessage.REPORT_STATE
  215. var b = {}
  216. if (a) {
  217. a.forEach(item => {
  218. b[item.value] = item.label
  219. });
  220. return b
  221. }
  222. return []
  223. },
  224. scene() {
  225. var a = this.$store.state.dictMessage.scenario.map(item => {
  226. return {
  227. label: item.name,
  228. value: item.id
  229. }
  230. })
  231. var obj = this.searchFiled.find(item => { return item.label == '应用场景' })
  232. if (obj) {
  233. obj.options = a
  234. }
  235. return this.$store.state.dictMessage.scenario
  236. },
  237. matter() {
  238. var a = this.$store.state.dictMessage.matter.map(item => {
  239. return {
  240. label: item.name,
  241. value: item.id
  242. }
  243. })
  244. var obj = this.searchFiled.find(item => { return item.label == '调查类型' })
  245. if (obj) {
  246. obj.options = a
  247. }
  248. return this.$store.state.dictMessage.matter || []
  249. },
  250. userinfo(){
  251. return this.$s.getObj('userinfo')
  252. },
  253. },
  254. created() { },
  255. async mounted() {
  256. if(this.componentType){
  257. await this.tabChange(this.componentType)
  258. }
  259. // 获取搜索/分组
  260. // await this.getColumn()
  261. //获取报告清单
  262. this.getList()
  263. this.showViews()
  264. },
  265. methods: {
  266. //更新配案人员
  267. updateHandlePerson(projectId){
  268. let index = this.dataList.findIndex(item=>{
  269. return item.id == projectId
  270. })
  271. if(index==-1){
  272. return
  273. }
  274. let params = {
  275. searchQuery: `id=${projectId}`,//检索条件
  276. orderDTOList: [],
  277. }
  278. this.$api.queryReportProject(params).then(res => {
  279. if (res.code == 200) {
  280. if (res.data.data.length > 0) {
  281. this.$set(this.dataList,index,res.data.data[0])
  282. }
  283. }
  284. }).catch(error => {
  285. })
  286. },
  287. //联系邮箱
  288. IPREmail(){
  289. this.$refs.IPREmailDialog.open()
  290. },
  291. //标签页点击
  292. async tabChange(name){
  293. var type = Number(name)
  294. switch(type){
  295. case 1:
  296. this.fixedSearch={}
  297. this.type = 'reportProject'
  298. if(!this.columnType.columnList1){
  299. // 获取table栏位
  300. this.columnList = await this.$commonJS.getCustomField('reportProject')
  301. this.columnType.columnList1 = this.columnList
  302. }
  303. break;
  304. case 2:
  305. this.type = 'invalidReportProject'
  306. if(!this.columnType['columnList' + 2]){
  307. //获取显示栏位
  308. this.columnType.columnList2 = await this.$commonJS.getCustomField('invalidReportProject')
  309. }
  310. this.fixedSearch = {
  311. reportType:[7]
  312. }
  313. break;
  314. }
  315. this.columnList = this.columnType['columnList' + type]
  316. // 获取搜索/分组
  317. await this.getColumn()
  318. this.queryParams.current = 1
  319. this.isGrouping()
  320. },
  321. //显示视图?
  322. showViews() {
  323. this.showView = false
  324. this.$nextTick(() => {
  325. this.showView = true
  326. })
  327. },
  328. // 显示栏位管理组件返回数据
  329. getFieldList(val) {
  330. this.columnList = []
  331. this.$nextTick(()=>{
  332. this.columnList = val
  333. })
  334. },
  335. // 显示栏位管理
  336. showField() {
  337. this.$refs.field.open(this.columnList)
  338. },
  339. //获取table栏位及分组字段、检索字段
  340. async getColumn() {
  341. // let params = ['reportProject']
  342. let params = [this.type]
  343. await this.$api.getParamsCommon(params).then(res => {
  344. if (res.code == 200) {
  345. let conditionDTOList = JSON.parse(JSON.stringify(res.data[0].conditionDTOList))
  346. // 分组字段
  347. this.groupingOption = this.$commonJS.getField(conditionDTOList, (u) => u.ifGroup == true, {
  348. name: 'name',
  349. value: 'value',
  350. })
  351. // 搜索字段
  352. this.searchFiled = this.$commonJS.getField(conditionDTOList, (u) => u.ifSearch == true, {
  353. label: 'name',
  354. value: 'value',
  355. type: 'type',
  356. })
  357. //先获取报告类型,报告状态,相关事件,再为报告类型,报告状态,相关事件添加选项
  358. let arr = ['reportType', 'status', 'cronNames','scenarioNames','matterNames','conclusion','actType']
  359. arr.forEach(item => {
  360. let obj = this.searchFiled.find(item2 => {
  361. return item2.value == item
  362. })
  363. if (obj) {
  364. this.handleSearchArray(obj)
  365. }
  366. })
  367. //为应用场景添加选项
  368. // var obj = this.searchFiled.find(item => { return item.value == 'scenarioNames' })
  369. // if (obj) {
  370. // obj.options = this.scene.map(item => {
  371. // return {
  372. // label: item.name,
  373. // value: item.id
  374. // }
  375. // })
  376. // }
  377. // var obj = this.searchFiled.find(item => { return item.value == 'matterNames' })
  378. // if (obj) {
  379. // obj.options = this.matter.map(item => {
  380. // return {
  381. // label: item.name,
  382. // value: item.id
  383. // }
  384. // })
  385. // }
  386. }
  387. })
  388. this.showViews()
  389. },
  390. // 处理检索字段为array类型的问题
  391. handleSearchArray(obj) {
  392. switch (obj.value) {
  393. case 'reportType':
  394. if (this.dictMessage.REPORT_TYPE && this.dictMessage.REPORT_TYPE.length > 0) {
  395. let dict = this.dictMessage.REPORT_TYPE.filter(item => !['6'].includes(item.value))
  396. obj.options = dict.map(item => {
  397. return {
  398. label: item.label,
  399. value: item.value,
  400. }
  401. })
  402. }
  403. break;
  404. case 'status':
  405. if (this.dictMessage.REPORT_STATE && this.dictMessage.REPORT_STATE.length > 0) {
  406. let dict = this.dictMessage.REPORT_STATE
  407. obj.options = dict.map(item => {
  408. return {
  409. label: item.label,
  410. value: item.value,
  411. }
  412. })
  413. }
  414. break;
  415. case 'cronNames':
  416. this.$api.queryCrons().then(res => {
  417. if (res.code == 200) {
  418. obj.options = res.data.data
  419. }
  420. })
  421. break;
  422. case 'scenarioNames':
  423. obj.options = this.scene.map(item => {
  424. return {
  425. label: item.name,
  426. value: item.id
  427. }
  428. })
  429. break;
  430. case 'matterNames':
  431. obj.options = this.matter.map(item => {
  432. return {
  433. label: item.name,
  434. value: item.id
  435. }
  436. })
  437. break;
  438. case 'conclusion':
  439. let litigationResult = this.$constants.litigationResult
  440. let options = []
  441. for(let key in litigationResult){
  442. options.push(
  443. {
  444. label: litigationResult[key],
  445. value: key
  446. }
  447. )
  448. }
  449. obj.options = options
  450. case 'actType':
  451. obj.type = '4'
  452. obj.options = this.actTypes
  453. default:
  454. break;
  455. }
  456. },
  457. //接收检索条件
  458. search(val) {
  459. let params = {}
  460. val.forEach(item => {
  461. if (item.type == 3) {
  462. params[item.value] = item.searchValue.map(itemValue => {
  463. return itemValue.value
  464. })
  465. } else {
  466. params[item.value] = item.searchValue.value
  467. }
  468. })
  469. // 返回字符串
  470. this.searchOption = this.$commonJS.ArrayToArray(val)
  471. // 调用查询接口
  472. this.queryParams.current = 1
  473. this.getList()
  474. },
  475. //获取报告列表
  476. getList() {
  477. let params = {
  478. ...this.queryParams,//分页信息
  479. searchQuery: this.$commonJS.objectToString(this.searchOption),//检索条件
  480. orderDTOList: this.sort,//排序信息
  481. }
  482. params.ifInvalidReport = 0
  483. if(this.fixedSearch.reportType){
  484. params.ifInvalidReport = 1
  485. if(params.searchQuery){
  486. params.searchQuery = params.searchQuery + ' and reportType=(' + this.fixedSearch.reportType.join(' OR ') + ')'
  487. }else{
  488. params.searchQuery ='reportType=(' + this.fixedSearch.reportType.join(' OR ') + ')'
  489. }
  490. }
  491. this.loading = true
  492. this.$api.queryReportProject(params).then(res => {
  493. if (res.code == 200) {
  494. this.dataList = res.data.data
  495. this.total = res.data.total
  496. this.loading = false
  497. }
  498. }).catch(error => {
  499. this.dataList = []
  500. this.total = 0
  501. this.loading = false
  502. this.$message.error(error.message)
  503. })
  504. },
  505. // 获取分组数据
  506. getGrouping() {
  507. let params = {
  508. ...this.queryParams,//分页信息
  509. searchQuery: this.$commonJS.objectToString(this.searchOption),//检索条件
  510. orderDTOList: [
  511. {
  512. orderBy: this.groupingValue,
  513. orderType: this.sort&&this.sort.length>0?this.sort[0].orderType : 0
  514. }
  515. ],//排序
  516. groupBy: this.groupingValue,//分组信息
  517. }
  518. params.ifInvalidReport = 0
  519. if(this.fixedSearch.reportType){
  520. params.ifInvalidReport = 1
  521. if(params.searchQuery){
  522. params.searchQuery = params.searchQuery + ' and reportType=(' + this.fixedSearch.reportType.join(' OR ') + ')'
  523. }else{
  524. params.searchQuery ='reportType=(' + this.fixedSearch.reportType.join(' OR ') + ')'
  525. }
  526. }
  527. this.$api.groupReportProject(params).then(res => {
  528. if (res.code == 200) {
  529. this.commonData = res.data.data.values
  530. this.total = res.data.total
  531. }
  532. }).catch(error => {
  533. this.commonData = []
  534. this.total = 0
  535. this.$message.error(error.message)
  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. if(!this.sort || this.sort.length == 0){
  549. this.sort = [
  550. {
  551. "orderBy": "createTime",
  552. "orderType": 1
  553. }
  554. ]
  555. }
  556. this.queryParams.current = 1
  557. this.isGrouping()
  558. },
  559. //分页
  560. handleCurrentChange(val) {
  561. this.queryParams.current = val;
  562. this.isGrouping()
  563. },
  564. //切换页大小
  565. handleSizeChange(val) {
  566. this.queryParams.size = val
  567. this.queryParams.current = 1
  568. this.isGrouping()
  569. // this.getList()
  570. },
  571. //切换视图
  572. onChange(type) {
  573. this.viewType = type
  574. if (type == 'visual') {
  575. this.$nextTick(() => {
  576. this.reportVisual()
  577. })
  578. return false
  579. }
  580. this.queryParams.size = this.viewType === 'Table' ? 10 : 12
  581. this.groupingValue = ''
  582. this.queryParams.current = 1
  583. this.getList()
  584. },
  585. //展示报告可视化
  586. reportVisual() {
  587. this.$api.reportVisual(this.queryParams).then(response => {
  588. if (response.code == 200) {
  589. // this.$refs.reportVisual.open(response.data)
  590. }
  591. })
  592. },
  593. //切换分组值
  594. changeGrouping(val) {
  595. if (val != '') {
  596. this.viewType = 'mergeTable'
  597. } else {
  598. this.viewType = 'Table'
  599. }
  600. this.queryParams.current = 1
  601. this.groupingValue = val
  602. this.isGrouping()
  603. },
  604. // 区分是否为分组
  605. isGrouping() {
  606. if (this.groupingValue != '') {//分组
  607. this.getGrouping()
  608. } else {//不分组
  609. this.getList()
  610. }
  611. },
  612. //打开创建报告弹窗
  613. handleAnalyse(id) {
  614. var permission = {
  615. 1:'analysisAndOpinion',
  616. 2:'analysisAndOpinion',
  617. 3:'FTO',
  618. 4:'tort',
  619. 5:'avoidDesign',
  620. 7:'officiallyInvalid'
  621. }
  622. if(!this.$permission.FunPermissions('xiaoshi/report/'+permission[id])){
  623. this.$showPermissionDialog()
  624. return false
  625. }
  626. var form = {
  627. reportType: id,
  628. eventId: this.eventId,
  629. eventName: this.eventName,
  630. matterId: this.matterId || [],
  631. scenarioId: this.scenarioId || [],
  632. }
  633. this.$refs.ReportForm.open(form)
  634. },
  635. //操作列
  636. async handleOption({ option, row, isLast }) {
  637. let roles = null
  638. if(option == 7){
  639. roles = ['0','1']
  640. }
  641. if(!(await this.$permission.projectPermission(row.id,roles))){
  642. this.$showPermissionDialog()
  643. return false
  644. }
  645. this.$s.setSession('params', row)
  646. switch (option) {
  647. case '0'://分享
  648. this.share(row)
  649. break
  650. case '1'://导出报告
  651. this.exportReport(row)
  652. break
  653. case '2'://报告文档
  654. this.handleFile(row)
  655. break
  656. case '5'://拆分特征
  657. // this.handleDetails(row)
  658. break
  659. case '3'://自定义字段
  660. this.handleField(row)
  661. break
  662. case '4'://任务分配
  663. this.handleTask(row)
  664. break
  665. case '6'://导入专利
  666. this.handleImportPatent(row)
  667. break
  668. case '7'://删除
  669. this.handleDelete(row, isLast)
  670. break;
  671. case '8'://侵权分析技术特征对比
  672. // this.$s.setSession('reportMessage1', row)
  673. this.toTortIndex(row)
  674. break
  675. case '9'://回避设计
  676. this.handleDetails(row, '回避设计')
  677. break;
  678. case '10'://对比文件
  679. this.patentList(row)
  680. break
  681. case '11'://完成报告
  682. this.completeReport(row)
  683. break
  684. case '12'://追踪报告
  685. this.trackReport(row)
  686. break
  687. case '13'://添加无效理由和证据
  688. this.toInvalidIndex(row)
  689. break;
  690. case '14'://导入无效证据
  691. this.toInvalidEvidence(row)
  692. break;
  693. case '15'://录入产品信息
  694. this.toInformationEntry(row)
  695. break;
  696. case '16'://检索记录
  697. this.searchRecords(row)
  698. break;
  699. case '17'://导入导出历史
  700. this.importAndExportHistory(row)
  701. break;
  702. case 'e'://编辑
  703. this.handleEdit(row)
  704. break;
  705. case 'matchCase'://实际处理人/配案人员
  706. this.matchCase(row)
  707. break
  708. }
  709. },
  710. //实际处理人/配案人员
  711. matchCase(row){
  712. this.$refs.handlePersonDialog.open(row.id)
  713. },
  714. //导入导出历史
  715. importAndExportHistory(row){
  716. this.$router.push({
  717. path: "/taskList",
  718. query:{
  719. importToId:row.id
  720. }
  721. });
  722. },
  723. //检索记录
  724. searchRecords(row){
  725. this.$router.push({
  726. path:'/searchRecord',
  727. query:{
  728. projectId:row.id,
  729. }
  730. })
  731. },
  732. //分享
  733. share(row){
  734. this.$refs.patentShare.open(row.id)
  735. },
  736. //导出报告
  737. exportReport(row){
  738. this.$refs.exportReport.open(row)
  739. },
  740. //追踪报告
  741. trackReport(row){
  742. var form = JSON.parse(JSON.stringify(row))
  743. this.$set(form,'associateReportName',row.volumeNumber?row.volumeNumber:row.name)
  744. this.$set(form,'associateReportId',row.id)
  745. this.$set(form,'status',2)
  746. this.$set(form,'cronIds',[])
  747. this.$set(form,'cronDescription','')
  748. if(isNaN((row.name).substring((row.name).length-1))){
  749. form.name = row.name + '-V1'
  750. }else{
  751. var a= Number((row.name).substring((row.name).length-1)) + 1
  752. form.name = (row.name).substring(0,(row.name).length-1) + a
  753. }
  754. // form.status = 1
  755. form.id = null
  756. form.track = true
  757. this.$refs.ReportForm.open(form)
  758. },
  759. //完成报告
  760. completeReport(row){
  761. this.$refs.cronConclusion.open(row)
  762. },
  763. //无效证据
  764. toInvalidEvidence(row){
  765. this.$router.push({
  766. path:'/evidence',
  767. query:{
  768. projectId:row.id,
  769. projectName:row.name,
  770. projectType:2,
  771. assProjectId:row.assoReportId,
  772. reportType:row.reportType,
  773. signPatentNo:row.signPatentNo,
  774. patentNo:row.signPatentNo
  775. }
  776. })
  777. },
  778. // 报告文档
  779. handleFile(row) {
  780. this.$refs.reportFileDrawer.open(row.id)
  781. },
  782. //自定义栏位管理
  783. handleField(row) {
  784. this.$refs.FieldDrawer.open(row.id)
  785. },
  786. //跳转到专利列表页面
  787. patentList(row){
  788. this.$router.push(
  789. {
  790. path:'/reportPatentList',
  791. query:{
  792. projectId:row.id,
  793. patentNo:row.signPatentNo,
  794. signPatentNo:row.signPatentNo,
  795. reportType: row.reportType,
  796. status:row.status,
  797. projectName:row.name,
  798. projectType:2,
  799. assProjectId:row.assoReportId
  800. }
  801. }
  802. )
  803. },
  804. // 跳转录入产品信息页面
  805. toInformationEntry(row) {
  806. var routerReport = this.$router.resolve({
  807. path: "/informationEntry",
  808. query: {
  809. patentNo: row.signPatentNo,
  810. projectId: row.id,
  811. reportType: row.reportType
  812. }
  813. })
  814. window.open(routerReport.href, '_blank');
  815. },
  816. // 跳转专利与产品关联比对
  817. toTortIndex(row) {
  818. var routerReport = this.$router.resolve(
  819. {
  820. path: '/patentDetails/' + row.signPatentNo,
  821. query: {
  822. projectId: row.id,
  823. reportType: row.reportType,
  824. taskType:'3'
  825. }
  826. }
  827. )
  828. // var routerReport = this.$router.resolve({
  829. // path: "/tortIndex",
  830. // query: {
  831. // patentNo: row.signPatentNo,
  832. // projectId: row.id,
  833. // reportType: row.reportType
  834. // }
  835. // })
  836. window.open(routerReport.href, '_blank');
  837. },
  838. // 跳转回避设计或拆分特征
  839. handleDetails(row, type) {
  840. if (type == '回避设计') {
  841. var router = this.$router.resolve({
  842. path: "/avoid",
  843. query: {
  844. patentNo: row.signPatentNo,
  845. reportId: row.id,
  846. }
  847. })
  848. window.open(router.href, '_blank');
  849. }
  850. },
  851. // 删除
  852. handleDelete(row, isLast) {
  853. this.handleDeletes([row.id], isLast)
  854. },
  855. // 批量删除报告
  856. handleDeletes(ids, isLast) {
  857. this.$confirm('此操作将永久删除该报告, 是否继续?', '提示', {
  858. confirmButtonText: '确定',
  859. cancelButtonText: '取消',
  860. type: 'warning'
  861. }).then(() => {
  862. this.$api.deleteReportProject(ids).then(res => {
  863. if (res.code == 200) {
  864. if (isLast) {
  865. this.isGrouping()
  866. } else {
  867. this.getList()
  868. }
  869. this.handleMessage = '删除成功'
  870. this.clearMessage()
  871. this.$message.success('删除报告成功')
  872. }
  873. }).catch(err => {
  874. this.$message.error(err.message)
  875. })
  876. }).catch(() => {
  877. this.$message.info("已取消删除")
  878. });
  879. },
  880. //编辑报告
  881. handleEdit(row) {
  882. this.$refs.ReportForm.open(row)
  883. },
  884. //接收可视化的参数
  885. getParams(params) {
  886. if (params.conclusionType == '-1') {
  887. this.searchOption.statuses = ['0', '1', '2', '4', '5']
  888. this.searchOption.types = [params.type]
  889. } else {
  890. this.searchOption.cronIds = [params.conclusionType]
  891. }
  892. var a = JSON.parse(JSON.stringify(this.searchOption))
  893. this.searchOption = a
  894. this.viewType = 'Table'
  895. this.queryParams.current = 1
  896. this.getList()
  897. },
  898. //创建报告子组件返回值
  899. isGetList(val) {
  900. this.handleMessage = val
  901. this.queryParams.current = 1
  902. this.isGrouping()
  903. this.clearMessage()
  904. },
  905. //清空信息
  906. clearMessage() {
  907. this.$emit('submit', true)
  908. this.$nextTick(() => {
  909. this.handleMessage = ''
  910. })
  911. },
  912. },
  913. };
  914. </script>
  915. <style lang="scss" scoped></style>