index.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  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" size="small" @click="checkInvalid" style="margin-right:10px;height:32px;"> 查看无效请求书/标的专利 </el-button> -->
  5. <el-button type="primary" size="small" @click="addOpinion" style="margin-right:10px;height:32px;" v-if=" $reportPermission(params.reportId,[0,1])"> 陈述意见 </el-button>
  6. <el-switch
  7. v-model="value"
  8. :disabled="!$permission('/workspace/details/comparison')"
  9. inactive-text="对比"
  10. active-color="#00BFFF"
  11. inactive-color="#D3D3D3">
  12. </el-switch>
  13. <div class="evidence" style="max-width: 300px;height: 50px;;overflow: auto;margin-left:10px">
  14. <span style="margin-right:5px">
  15. <el-tooltip class="item" effect="dark" content="无效请求书/标的专利" placement="top">
  16. <el-link @click="checkInvalid" :type="evidence.id === -1 ? 'primary' : undefined">T</el-link>
  17. </el-tooltip>
  18. </span>
  19. <span v-for="item in EvidenceList" :key="item.sortStr" style="margin-right:5px">
  20. <el-tooltip class="item" effect="dark" :content="item.proofName" placement="top">
  21. <el-link @click="evidenceBtn(item)" :type="item.id === evidence.id ? 'primary' : undefined">{{ item.sortStr }}</el-link>
  22. </el-tooltip>
  23. </span>
  24. </div>
  25. </div>
  26. <div class="box1" v-dragControllerDiv1 style="display:flex;flex-direction:column;width:100%;">
  27. <div class="left1 fileDetails" style="width:100%;padding-bottom:10px" :style="{height:height}">
  28. <div class="box" ref="box" v-dragControllerDiv :style="{height:'100%'}">
  29. <div class="left" :style="{width:width}" v-loading="loading" style="height:100%"><!--左侧div内容-->
  30. <FileDetails :isEvidence="isEvidence" style="overflow-y:auto;overflow-x: hidden;" :style="{height:'100%'}" :evidence="evidence" :EvidenceList="EvidenceList1" :reportId="params.reportId" :height="height" :signPatentNo="params.signPatentNo" :reportType="params.reportType" :type="params.reportType"></FileDetails>
  31. </div>
  32. <div class="resize" title="收缩侧边栏" v-show="width!='100%'" style="height:100%">⋮</div>
  33. <div class="mid" v-show="width!='100%'" :style="{width:width}" style="height:100%"><!--右侧div内容-->
  34. <FileDetails :isEvidence="isEvidence" style="overflow-y:auto;overflow-x: hidden;" :style="{height:'100%'}" :evidence="evidence" :EvidenceList="EvidenceList1" :reportId="params.reportId" :height="height" :signPatentNo="params.signPatentNo" :reportType="params.reportType" :type="params.reportType"></FileDetails>
  35. </div>
  36. </div>
  37. </div>
  38. <div class="resize2" title="收缩侧边栏" v-show="showPosition"><p><span>˙</span><span>˙</span><span>˙</span></p></div>
  39. <div class="resize1" title="收缩侧边栏" v-show="false"><span>⋮</span></div>
  40. <div class="mid1" v-show="showPosition" style="height:280px;border:1px solid #E4E7ED;margin:10px;overflow-y:auto;overflow-x: hidden;">
  41. <addOpinion :reportId="params.reportId" :signPatentNo="params.signPatentNo"></addOpinion>
  42. </div>
  43. </div>
  44. </div>
  45. </template>
  46. <script>
  47. import PatentDetail from './patentDetail.vue';
  48. import FileDetails from './fileDetails.vue';
  49. import addOpinion from './addOpinions.vue'
  50. export default {
  51. components: {
  52. PatentDetail,
  53. FileDetails,
  54. addOpinion
  55. },
  56. props: {},
  57. data() {
  58. return {
  59. ban:0,
  60. value: false,
  61. width:'100%',
  62. height:null,
  63. applicationNo:this.$route.query.applicationNo || null,
  64. patentNo:this.$route.query.patentNo || null,
  65. FileVisible: false,
  66. EvidenceList:[],
  67. EvidenceList1:[],
  68. params:{},
  69. evidence:{},//证据文献
  70. // literatureType:1,//文献类型1是专利文献
  71. loading:false,
  72. isEvidence:true,
  73. showPosition:false,
  74. };
  75. },
  76. watch: {
  77. value(val){
  78. if(val==true){
  79. this.width='50%'
  80. }else{
  81. this.width='100%'
  82. }
  83. },
  84. },
  85. computed: {
  86. piZhuContrastList() {
  87. return this.$store.state.report.piZhuContrastList
  88. }
  89. },
  90. created() {
  91. // var that = this
  92. //监听指定DOM变化
  93. // this.resizeObserver = new ResizeObserver(function( entries ) {
  94. // entries.forEach((item, index) =>{
  95. // that.$set(that,'height',item.target.clientHeight)
  96. // // item.target.childNodes[0].style.height= item.target.clientHeight + 'px'
  97. // // console.log(item.target.childNodes)
  98. // })
  99. // })
  100. },
  101. mounted() {
  102. this.params = this.$s.getSession('params')
  103. this.evidence.id = this.params.aid
  104. if(!this.evidence.id ||this.evidence.id == -1){
  105. this.isEvidence = false
  106. }else{
  107. this.loading = true
  108. this.queryScratchs()//获取陈述意见列表
  109. }
  110. this.getQueryProofList()//获取证据列表
  111. this.$nextTick(()=>{
  112. this.$set(this,'height',document.getElementsByClassName('el-main')[0].offsetHeight-60 + 'px')
  113. if(this.$reportPermission(this.params.reportId,[0,1])){
  114. this.addOpinion()
  115. }
  116. })
  117. },
  118. methods: {
  119. //打开无效请求书/标的专利
  120. async checkInvalid(){
  121. this.isEvidence = false
  122. this.$set(this.evidence,'id',-1)
  123. // this.evidence.id = -1
  124. this.params.aid = -1
  125. this.$s.setSession('params',this.params)
  126. // this.getPiZhuContrastList(this.params.signPatentNo)
  127. await this.$router.push({
  128. path: '/checkFileDetails/' + -1,
  129. })
  130. },
  131. //打开陈述意见
  132. addOpinion(){
  133. this.showPosition = !this.showPosition
  134. if(this.showPosition){
  135. // 监听dom
  136. // this.resizeObserver.observe(document.getElementsByClassName('fileDetails')[0])
  137. this.$set(this,'height',document.getElementsByClassName('el-main')[0].offsetHeight-260 + 'px')
  138. }else{
  139. // resizeObserver.disconnect()
  140. this.$set(this,'height',document.getElementsByClassName('el-main')[0].offsetHeight-60 + 'px')
  141. }
  142. },
  143. // 查询划词陈述意见
  144. queryScratchs() {
  145. this.$api.queryScratchs({proofId:this.evidence.id}).then((res) => {
  146. if (res.code == 200) {
  147. this.$store.commit('SET_PATENT_OPINION_CONTRAST', res.data)
  148. }
  149. })
  150. },
  151. // 文献点击事件
  152. async evidenceBtn(val) {
  153. this.isEvidence = true
  154. this.$set(this,'evidence',JSON.parse(JSON.stringify(val)))
  155. // this.literatureType = val.type
  156. // this.evidenceFlieId = val.id
  157. this.params.aid = val.id
  158. this.$s.setSession('params',this.params)
  159. this.loading = false
  160. // 1是文献2是非文献
  161. if (val.type == 1) {
  162. this.queryScratchs()
  163. // this.getPatent(val.proofConditions)
  164. // this.getPiZhuContrastList(val.proofConditions)
  165. } else {
  166. // let url = `http://${this.$c.hostname}:8012/onlinePreview?url=` + btoa(encodeURIComponent(this.$p + val.proofConditions))
  167. // this.$nextTick(() => {
  168. // this.$refs.checkFile1.open(url)
  169. // })
  170. }
  171. await this.$router.push({
  172. path: '/checkFileDetails/' + val.id,
  173. })
  174. },
  175. //查询证据文献
  176. getQueryProofList() {
  177. let params = {
  178. reportId:this.params.reportId,
  179. signPatentNo:this.params.signPatentNo,
  180. size: 99,
  181. current: 1,
  182. }
  183. this.$api.queryProof(params).then((res) => {
  184. if (res.code==200) {
  185. this.EvidenceList = res.data
  186. this.EvidenceList1 = JSON.parse(JSON.stringify(res.data))
  187. var index = this.EvidenceList.findIndex(item => {
  188. return item.id == this.evidence.id
  189. })
  190. if (index != -1) {
  191. this.evidenceBtn(this.EvidenceList[index])
  192. }
  193. }
  194. }).catch((error) => {
  195. })
  196. },
  197. //修改定住
  198. changefix(){
  199. },
  200. //切换专利
  201. async onChange(val){
  202. this.applicationNo = val.applicationNo
  203. this.patentNo = val.patentNo
  204. this.changePageTitle(val.patentNo,val.name)
  205. this.getContrastList(val.patentNo)
  206. await this.$router.push({
  207. path: '/search/patentDetail',
  208. query: {
  209. applicationNo: val.applicationNo,
  210. patentNo: val.patentNo,
  211. }
  212. })
  213. },
  214. // 查询批注
  215. getPiZhuContrastList(val) {
  216. if (val) {
  217. var index = this.piZhuContrastList.findIndex(item => {
  218. item.patentNo == val
  219. })
  220. if (index != -1) {
  221. return false;
  222. }
  223. }
  224. let params = {
  225. patentNo: val,
  226. id: this.params.reportId,
  227. createFrom:this.params.reportId?2:0
  228. }
  229. this.$api.scratchWordsQuery(params).then(response => {
  230. if (response.code==200) {
  231. if (this.piZhuContrastList.length > 0) {
  232. var a = this.piZhuContrastList.filter(item => {
  233. return item.patentNo != params.patentNo
  234. }).concat(response.data)
  235. } else {
  236. var a = response.data
  237. }
  238. this.$store.commit('SET_PATENT_PIZHU_CONTRAST', a)
  239. }
  240. })
  241. },
  242. //修改title
  243. changePageTitle(patentNo,name) {
  244. document.title = `${patentNo} ${name || ''}`
  245. },
  246. },
  247. };
  248. </script>
  249. <style lang="scss" scoped>
  250. @import '@/assets/css/activeDiv.scss';
  251. </style>