ContrastIndex.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  1. <template>
  2. <div class="patent-articles" >
  3. <el-container v-loading="loading">
  4. <!-- <el-aside width="250px" class="patent-articles-menu">
  5. <el-container>
  6. <el-header style="height: 180px;">
  7. <patent-list :patent-id="patentId" :project-id="projectId" @on-change="onChange" />
  8. </el-header>
  9. <el-main>
  10. <patent-image v-if="patent.image" :project-id="projectId" :patent="patent" :patent-id="patentId" @refresh="getPatent(patentId)"></patent-image>
  11. </el-main>
  12. </el-container>
  13. </el-aside> -->
  14. <el-container >
  15. <el-header class="patent-articles-title">
  16. <div class="patent-articles-title-box">
  17. <div style="position:relative">
  18. <img src="@/assets/visual/fixed.png" width="20px" height="20px" v-if="fix===true && !showEvidence" @click="qx" style="position:absolute;top:5px;left:5px"/>
  19. <img src="@/assets/visual/unfixed.png" width="20px" height="20px" v-if="fix===false && !showEvidence" @click="gd" style="position:absolute;top:5px;left:5px"/>
  20. <!-- <div>
  21. <patent-list :patent-id="patentId" :project-id="projectId" @on-change="onChange" />
  22. </div> -->
  23. <div>
  24. <span v-html="getViewDom(patent.publicNo)"></span>
  25. <el-tag type="primary" effect="dark" size="mini" class="margin-left_10">{{ patent.simpleStatus }}</el-tag>
  26. <el-tag v-if="taskId" :type="patentStatus2=='0'?'info':'primary'" effect="dark" size="mini" class="margin-left_10" style="cursor: pointer" @click="changeStatus(patentStatus2)">{{ patentStatus[patentStatus2] }}</el-tag>
  27. </div>
  28. <div style="color: #6b6868; font-size: 15px;border-bottom: 1px solid #e6e6e6;padding-bottom: 5px;">
  29. <span v-html="getViewDom2(patent, 'name')"></span>
  30. <el-link type="primary" @click.native="handleChange(patent, 'name')" style="margin-left: 10px;margin-top: -3px;">
  31. <span v-if="!patent.change">切换译文</span>
  32. <span v-else>切换原文</span>
  33. </el-link>
  34. </div>
  35. <div style="position: absolute;right: 0;top:0;">
  36. <PatentMark :patentNo="patent.patentNo" @biaozhu="getBiaoZhu"></PatentMark>
  37. </div>
  38. </div>
  39. <div style=" position: relative;">
  40. <el-link v-for="item in menuList" :type="activeMenu === item.value ? 'primary' : undefined" @click.native="handleSelect(item.value)" v-if="!item.show" :disabled="item.value === 'PatentExport' ? !$permission('/workspace/details/exportDocument'): false ">
  41. {{ item.label }}
  42. <span v-if="item.value == 'PatentImage'|| item.value=='PatentPDF'" @click.stop="ending(item.value)">
  43. <el-popover
  44. placement="right"
  45. width="400"
  46. trigger="click">
  47. <el-radio v-for="(item, index) in positionList" :key="index" v-model="radio" @input="changePosition" :label="item.value">{{item.label}}</el-radio>
  48. <i class="el-icon-setting" slot="reference"></i>
  49. </el-popover>
  50. </span>
  51. </el-link>
  52. <el-link v-for="item in menuList2" :type="activeMenu === item.value ? 'primary' : undefined" @click.native="handleSelect(item.value)">{{ item.label }}</el-link>
  53. <el-tooltip class="item" effect="dark" :content="(showRight ? '隐藏' : '显示') + '右侧菜单'" placement="top" v-if="showcard==false">
  54. <i :class="showRight ? 'el-icon-s-unfold' : 'el-icon-s-fold'" style="font-size: 25px;position: absolute; right: 10px; margin-top: 5px;color: #2f2f2f; cursor: pointer" @click="showRight = !showRight"></i>
  55. </el-tooltip>
  56. </div>
  57. </div>
  58. </el-header>
  59. <el-main class="patent-articles-content" style="padding-left:30px">
  60. <div class="patent-articles-content-left1" :style="{ width: showRight ? 'calc(100% - 321px)' : 'calc(100% - 21px)' }">
  61. <div class="dom1 box1" v-dragControllerDiv1 style="display:flex;width:100%">
  62. <div class="component left1" style="width:100%;overflow-y:auto;overflow-x: hidden;padding-bottom:10px" :style="{height:height}">
  63. <component :is="componentName" v-bind="$attrs" :type1='type' :isTrue="isTrue" @openContrast='openContrast' :project-id="projectId" :patent="patent" :patent-id="patentId" :signPatentNo="signPatentNo" :patentNo="this.activeMenu == 'patentWorth'?[patentNo?patentNo:productPublicNo]:patentNo" :publicNo="publicNo" :domId="patentNo + '2'" :reportId="reportId" @refresh="getPatent(patent.patentNo)"></component>
  64. </div>
  65. <div class="resize2" title="收缩侧边栏" v-show="(radio == 2 || radio == 3) && activeMenu != activeMenu2"><p><span>˙</span><span>˙</span><span>˙</span></p></div>
  66. <div class="resize1" title="收缩侧边栏" v-show="(radio == 4 || radio == 5) && activeMenu != activeMenu2"><span>⋮</span></div>
  67. <div v-show="radio != 1 && activeMenu != activeMenu2" class="mid1" :style="{height:(radio == 4 || radio == 5)?height:'280px'}" style="width:450px;height:280px;border:1px solid #E4E7ED;margin:10px;overflow-y:auto;overflow-x: hidden;">
  68. <component :is="activeMenu2" v-bind="$attrs" :project-id="projectId" :patent="patent" :patent-id="patentId" :pdfType1="(patent.pdf && patent.pdf.length>0)?patent.pdf[0].type:2" :sign="true"></component>
  69. </div>
  70. </div>
  71. </div>
  72. <div class="patent-articles-content-right" v-if="showRight">
  73. <el-container>
  74. <el-header v-if="showcard==false">
  75. <div class="patent-articles-option">
  76. <el-tabs v-model="activeOption" type="card">
  77. <el-tab-pane label="标引" name="PatentField"></el-tab-pane>
  78. <!-- <el-tab-pane label="高亮" name="PatentKeywordsHighlight"></el-tab-pane> -->
  79. <!-- <el-tab-pane label="注释" name="PatentAnnotation" :disabled="!($permission('/workspace/details/notes') && $r(projectId,[1,2]))"></el-tab-pane> -->
  80. </el-tabs>
  81. </div>
  82. </el-header>
  83. <el-main>
  84. <keep-alive>
  85. <component :is="activeOption" :project-id="projectId" :patent-id="patentId" :publicNo="publicNo" :reportId="reportId" :patentNo1="patentNo"></component>
  86. <component :is="activeOption" :project-id="projectId" :patent-id="patentId" :publicNo="publicNo" :reportId="reportId" :patentNo1="patentNo"></component>
  87. </keep-alive>
  88. </el-main>
  89. </el-container>
  90. </div>
  91. </el-main>
  92. </el-container>
  93. </el-container>
  94. <div class="content-main" style="padding-left:40px"></div>
  95. </div>
  96. </template>
  97. <script>
  98. import { changeTranslation, patentKeywordsHighlight } from '../common/mixins'
  99. import PatentList from './components/PatentList'
  100. import PatentField from './components/PatentField'
  101. import PatentAnnotation from './components/PatentAnnotation'
  102. import PatentBasic from "./components/PatentBasic"
  103. import PatentPDF from "./components/PatentPDF"
  104. import PatentImage from "./components/PatentImage"
  105. import PatentRight from "./components/PatentRight"
  106. import PatentInstruction from "./components/PatentInstruction"
  107. import PatentFamily from "./components/PatentFamily"
  108. import PatentStatus from "./components/PatentStatus"
  109. import PatentKeywordsHighlight from '../common/PatentKeywordsHighlight.vue'
  110. import ContrastIndex from './ContrastIndex'
  111. import Examination from './components/history/examination.vue'
  112. import File from './components/history/file.vue'
  113. import Invalid from './components/history/invalid.vue'
  114. import Litigation from './components/history/litigation.vue'
  115. import Other from './components/history/other.vue'
  116. import { getPatentCountry } from "@/utils";
  117. import Permit from './components/history/permit.vue'
  118. import ProductManage from '@/views/product/components/product.vue'
  119. import PatentWorth from './components/history/components/echarts/components/echarts.vue'
  120. import { splitScreen1 } from '../common/SplitScreen'
  121. import PatentMark from './components/PatentMark.vue'
  122. export default {
  123. mixins: [patentKeywordsHighlight, changeTranslation,splitScreen1],
  124. components: {
  125. ContrastIndex,
  126. PatentList,
  127. PatentField,
  128. PatentAnnotation,
  129. PatentKeywordsHighlight,
  130. PatentBasic,
  131. PatentPDF,
  132. PatentImage,
  133. PatentRight,
  134. PatentFamily,
  135. PatentStatus,
  136. PatentInstruction,
  137. Examination,
  138. File,
  139. Invalid,
  140. Litigation,
  141. Other,
  142. Permit,
  143. ProductManage,
  144. PatentWorth,
  145. PatentMark
  146. },
  147. props:['patentMessage','publicNo','signPatentNo','reportId','type','isTrue',"taskId","patentStatus2A",'showEvidence'],
  148. // props: {
  149. // 'patentMessage':String,
  150. // 'publicNo':String,
  151. // 'signPatentNo':String,
  152. // 'reportId':{
  153. // default:null
  154. // },
  155. // },
  156. data() {
  157. return {
  158. // visible2:false,
  159. patentStatus:{
  160. '0':'未读',
  161. '1':'已读'
  162. },
  163. patentStatus2:'',
  164. showcard: true,
  165. fix: false,
  166. showRight: false,
  167. patentId: parseInt(this.$route.params.id || 0),
  168. projectId: parseInt(this.$route.query.id || 0),
  169. patent: {},
  170. activeMenu: 'PatentBasic',
  171. componentName: 'PatentBasic',
  172. activeOption: 'PatentField',
  173. loading: false,
  174. patentNo:"",
  175. productPublicNo:"",
  176. menuList: [
  177. {
  178. value: 'PatentBasic',
  179. label: '基础信息'
  180. },
  181. {
  182. value: 'PatentRight',
  183. label: '权利要求'
  184. },
  185. {
  186. value: 'PatentImage',
  187. label: '附图'
  188. },
  189. {
  190. value: 'PatentInstruction',
  191. label: '说明书文本'
  192. },
  193. {
  194. value: 'PatentFamily',
  195. label: '同族专利'
  196. },
  197. {
  198. value: 'PatentStatus',
  199. label: '法律状态'
  200. },
  201. {
  202. value: 'PatentPDF',
  203. label: '说明书'
  204. },
  205. // {
  206. // value: 'PatentExport',
  207. // label: '导出文档'
  208. // },
  209. {
  210. value:'Permit',
  211. show:this.$permission('/rms/patent/worth')?false:true,
  212. label:'许可历史'
  213. },
  214. {
  215. value:'ProductManage',
  216. show:this.$permission('/rms/product')?false:true,
  217. label:'商品化'
  218. },
  219. {
  220. value:'patentWorth',
  221. show:this.$permission('/rms/patent/worth')?false:true,
  222. label:'价值曲线'
  223. }
  224. ],
  225. menuList2: [
  226. {
  227. value: 'Examination',
  228. label: '审查历史'
  229. },
  230. // {
  231. // value: 'File',
  232. // label: '申请案卷'
  233. // },
  234. {
  235. value: 'Invalid',
  236. label: '无效记录'
  237. },
  238. {
  239. value: 'Litigation',
  240. label: '诉讼历史'
  241. },
  242. {
  243. value: 'Other',
  244. label: '其他参考资料'
  245. },
  246. ],
  247. }
  248. },
  249. created() {
  250. this.patentNo = this.$route.query.patentNo
  251. // productPublicNo接收产品相关专利的专利号
  252. this.productPublicNo = this.$route.query.publicNo
  253. // console.log(this.patentMessage)
  254. // this.onChange(this.patentMessage)
  255. },
  256. watch: {
  257. publicNo(val) {
  258. // console.log(val);
  259. if (this.fix != true) {
  260. this.getPatent(val)
  261. }
  262. },
  263. patentMessage(val, oldval) {
  264. if (val) {
  265. this.patentId = val
  266. // console.log(val,oldval)
  267. if (val == oldval || this.fix == false) {
  268. this.showcard = false
  269. }
  270. if (val != oldval) {
  271. this.showcard = true
  272. }
  273. if (this.fix != true) {
  274. this.getPatent(val)
  275. }
  276. }
  277. },
  278. fix(val) {
  279. this.$emit('on-change', val)
  280. },
  281. // visible2(val){
  282. // if(val){
  283. // this.$emit('getVisible',true)
  284. // this.visible2 = false
  285. // }
  286. // },
  287. patentStatus2(val) {
  288. let value = {
  289. patentNo: this.publicNo,
  290. patentStatus2:this.patentStatus2
  291. }
  292. this.$emit("patentStatusEmit",value)
  293. },
  294. patentStatus2A(val) {
  295. if (this.publicNo==val.patentNo) {
  296. this.patentStatus2=val.patentStatus2
  297. }
  298. }
  299. },
  300. mounted() {
  301. if(this.publicNo || this.productPublicNo){
  302. let publicNo=this.publicNo?this.publicNo:this.productPublicNo
  303. this.getPatent(publicNo)
  304. }
  305. // if(this.signPatentNo){
  306. // console.log(this.signPatentNo)
  307. // this.getContrastList()
  308. // }
  309. },
  310. methods: {
  311. //获取需要跳转的批注
  312. getBiaoZhu(val) {
  313. if (val.scratchField == '摘要') {
  314. this.activeMenu = 'PatentBasic'
  315. } else {
  316. this.activeMenu = this.menuList.find(item => {
  317. return val.scratchField.indexOf(item.label)!=-1
  318. }).value
  319. if (val.scratchField.indexOf('译文') !=-1) {
  320. this.activeName = '1'
  321. } else {
  322. this.activeName='0'
  323. }
  324. }
  325. this.handleSelect(this.activeMenu)
  326. this.tiaozhuan(val.id,val)
  327. },
  328. tiaozhuan(id) {
  329. const href = `#${id}`
  330. const anchor = document.createElement('a');
  331. anchor.href = href;
  332. anchor.style.display = "none";
  333. document.body.appendChild(anchor);
  334. setTimeout(function () {
  335. anchor.click();
  336. document.body.removeChild(anchor);
  337. }, 66);
  338. return true;
  339. },
  340. openContrast(val){
  341. this.$emit('openContrast',val)
  342. },
  343. // getContrastList(){
  344. // var a = {
  345. // patentNo:this.signPatentNo,
  346. // reportId:this.reportId
  347. // }
  348. // this.$api.selectCompareRecord1(a).then(response=>{
  349. // if(response.code == 200){
  350. // // console.log(response.data)
  351. // var a = this.$store.state.report.contrastList
  352. // response.data.forEach(item => {
  353. // a.push(item)
  354. // });
  355. // this.$store.commit('SET_PATENT_CONTRAST', a)
  356. // }
  357. // })
  358. // },
  359. qx() {
  360. this.fix = false
  361. },
  362. gd() {
  363. this.fix = true
  364. },
  365. changePageTitle() {
  366. document.title = `${this.patent.publicNo} ${this.patent.name || ''}`
  367. },
  368. // async onChange(data) {
  369. // await this.getPatent(data.id)
  370. // await this.$router.push({
  371. // path: '/workspace/folder/' + data.id,
  372. // query: {
  373. // id: this.projectId,
  374. // }
  375. // })
  376. // this.patentId = data.id
  377. // this.changePageTitle()
  378. // },
  379. async getPatent(publicNo) {
  380. // console.log(publicNo)
  381. this.loading = true
  382. const response = await this.$api.PatentByPatentNo({patentNo : publicNo})
  383. // console.log(response)
  384. this.patent = response.data
  385. if(this.taskId){
  386. this.getPatentStatus(response.data.patentNo)
  387. }
  388. // if (this.publicNo == this.patent.publicNo) {
  389. // this.showcard = false
  390. // }
  391. const country = getPatentCountry(this.patent.patentNo)
  392. let change = false
  393. if (country !== 'CN') {
  394. change = true
  395. }
  396. this.$set(this.patent, 'change', change)
  397. this.$set(this.patent, 'change2', change)
  398. this.loading = false
  399. this.changePageTitle()
  400. },
  401. // async getPatent(id) {
  402. // this.loading = true
  403. // const response = await this.$api.getPatentById(id, { projectId: this.projectId })
  404. // // console.log(this.publicNo)
  405. // this.patent = response.data
  406. // if (this.publicNo == this.patent.publicNo) {
  407. // this.showcard = false
  408. // }
  409. // const country = getPatentCountry(this.patent.patentNo)
  410. // let change = false
  411. // if (country !== 'CN') {
  412. // change = true
  413. // }
  414. // this.$set(this.patent, 'change', change)
  415. // this.$set(this.patent, 'change2', change)
  416. // this.loading = false
  417. // this.changePageTitle()
  418. // },
  419. handleSelect2(index, path) {
  420. },
  421. handleSelect(index) {
  422. if (index === 'PatentExport') {
  423. const router = this.$router.resolve({
  424. path: '/export/patent',
  425. query: {
  426. id: this.projectId,
  427. patent: this.patent.id,
  428. }
  429. })
  430. window.open(router.href, '_blank');
  431. return false
  432. }
  433. if(index == this.activeMenu2){
  434. this.activeMenu2 = ''
  435. this.radio = 1
  436. this.changePosition(this.radio)
  437. }
  438. this.activeMenu = index
  439. this.componentName = index
  440. },
  441. //查询任务下专利状态
  442. getPatentStatus(patentNo){
  443. var a = {
  444. taskID:this.taskId,
  445. patentNo:patentNo
  446. }
  447. // console.log(this.patentNo);
  448. this.$api.getPatentStatus(a).then(response=>{
  449. if(response.code == 200){
  450. this.patentStatus2 = response.data
  451. }
  452. })
  453. },
  454. //修改已读未读
  455. changeStatus(val){
  456. if(val == '0'){
  457. var a = {
  458. taskID:this.taskId,
  459. patentNo:this.publicNo
  460. }
  461. this.$api.updatePatentStatus(a).then(response=>{
  462. if(response.code == 200){
  463. this.patentStatus2 = '1'
  464. }
  465. })
  466. }
  467. },
  468. //获取状态
  469. getStatus(val){
  470. this.patentStatus2 = val
  471. },
  472. }
  473. }
  474. </script>
  475. <style lang="scss">
  476. @import '@/assets/css/activeDiv.scss';
  477. .content-main{
  478. width:80% !important ;
  479. background-color: skyblue !important;
  480. }
  481. .patent-articles {
  482. width: 100%;
  483. height: 100% !important;
  484. padding: 0 !important;
  485. .patent-articles-menu {
  486. }
  487. .el-menu-item.is-active {
  488. background: #ecf5ff !important;
  489. color: #409EFF!important;
  490. }
  491. .patent-articles-title {
  492. padding: 0 !important;
  493. height: 100px !important;
  494. .el-link {
  495. margin-right: 20px;
  496. }
  497. .patent-articles-title-box {
  498. font-size: 20px;
  499. width: 100%;
  500. text-align: center;
  501. }
  502. }
  503. .patent-articles-content {
  504. background: #fff;
  505. padding: 0;
  506. height: 100%;
  507. overflow: hidden;
  508. .patent-articles-content-left1 {
  509. float: left;
  510. height: 100%;
  511. overflow-y: auto;
  512. overflow-x: hidden;
  513. padding: 10px;
  514. }
  515. .patent-articles-content-right {
  516. width: 300px;
  517. border-left: 1px solid #e6e6e6;
  518. float: right;
  519. height: 100%;
  520. .el-header {
  521. height: 50px !important;
  522. position: relative !important;
  523. }
  524. .el-main {
  525. padding: 0 12px !important;
  526. }
  527. .el-container, .el-main {
  528. height: 100%;
  529. }
  530. .patent-articles-option {
  531. position: absolute;
  532. bottom: 0;
  533. height: 100%;
  534. left: 50px;
  535. .el-tabs {
  536. margin-top: 9px;
  537. }
  538. .el-tabs__header {
  539. margin-bottom: 0 !important;
  540. }
  541. }
  542. }
  543. }
  544. }
  545. </style>