patentIndex.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <div style="height:calc(100% - 50px)">
  3. <div style="background:white;display:flex; justify-content:flex-end;align-items: center;">
  4. <el-button type="primary" class="margin-right_10" @click="importToProject">导入到报告</el-button>
  5. <el-switch
  6. v-model="value"
  7. inactive-text="对比"
  8. active-color="#00BFFF">
  9. </el-switch>
  10. <PatentList @on-change="onChange" :ban='ban'/>
  11. </div>
  12. <div class="box" ref="box" v-dragControllerDiv>
  13. <div class="left" :style="{width:width}"><!--左侧div内容-->
  14. <PatentDetail :applicationNo="applicationNo" @on-change='changefix' />
  15. </div>
  16. <div class="resize" title="收缩侧边栏" v-show="width!='100%'">⋮</div>
  17. <div class="mid" v-show="width!='100%'" :style="{width:width}"><!--右侧div内容-->
  18. <PatentDetail :applicationNo="applicationNo" @on-change='changefix' />
  19. </div>
  20. </div>
  21. <Project-List-Dialog ref="projectListDialog"></Project-List-Dialog>
  22. </div>
  23. </template>
  24. <script>
  25. import PatentDetail from './patentDetail.vue';
  26. import PatentList from './PatentList.vue'
  27. import ProjectListDialog from '../components/projectListDialog.vue'
  28. export default {
  29. components: {
  30. PatentDetail,
  31. PatentList,
  32. ProjectListDialog
  33. },
  34. props: {},
  35. data() {
  36. return {
  37. ban:0,
  38. value: false,
  39. width:'100%',
  40. applicationNo:this.$route.query.applicationNo || null,
  41. patentNo:this.$route.query.patentNo || null,
  42. };
  43. },
  44. watch: {
  45. value(val){
  46. if(val==true){
  47. this.width='50%'
  48. }else{
  49. this.width='100%'
  50. }
  51. },
  52. },
  53. computed: {
  54. contrastList() {
  55. return this.$store.state.report.contrastList
  56. }
  57. },
  58. created() {},
  59. mounted() {
  60. this.getContrastList(this.patentNo)
  61. },
  62. methods: {
  63. //导入到专题库
  64. importToProject(){
  65. var params =this.$s.getSession('params').params
  66. var form = {
  67. conditions:"AN="+ this.applicationNo ,
  68. DBType:params.DBType,
  69. orderBy:params.OrderBy,
  70. orderByType:params.OrderByType,
  71. startNumber:1,
  72. endNumber:0,
  73. isAddPatentNos:[this.applicationNo],
  74. isDeletePatentNos:[],
  75. reportId:this.$s.getSession('params').reportId,
  76. asCompare:this.$s.getSession('params').asCompare
  77. }
  78. this.$refs.projectListDialog.open(form)
  79. },
  80. //修改定住
  81. changefix(){
  82. },
  83. //切换专利
  84. async onChange(val){
  85. this.applicationNo = val.applicationNo
  86. this.patentNo = val.patentNo
  87. this.changePageTitle(val.patentNo,val.name)
  88. this.getContrastList(val.patentNo)
  89. await this.$router.push({
  90. path: '/search/patentDetail',
  91. query: {
  92. applicationNo: val.applicationNo,
  93. patentNo: val.patentNo,
  94. }
  95. })
  96. },
  97. // 查询批注
  98. getContrastList(val) {
  99. if (val) {
  100. var index = this.contrastList.findIndex(item => {
  101. item.patentNo == val
  102. })
  103. if (index != -1) {
  104. return false;
  105. }
  106. }
  107. let params = {
  108. patentNo: val?val:this.patentNo,
  109. id: this.reportId,
  110. createFrom:this.reportId?2:0
  111. }
  112. this.$api.scratchWordsQuery(params).then(response => {
  113. if (response.code==200) {
  114. if (this.contrastList.length > 0) {
  115. var a = this.contrastList.filter(item => {
  116. return item.patentNo != params.patentNo
  117. }).concat(response.data)
  118. } else {
  119. var a = response.data
  120. }
  121. this.$store.commit('SET_PATENT_PIZHU_CONTRAST', a)
  122. }
  123. })
  124. },
  125. //修改title
  126. changePageTitle(patentNo,name) {
  127. document.title = `${patentNo} ${name || ''}`
  128. },
  129. },
  130. };
  131. </script>
  132. <style lang="scss" scoped>
  133. @import '@/assets/css/activeDiv.scss';
  134. </style>