fileDetails.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <div >
  3. <div v-if="!showEvidence">
  4. <div>
  5. <img src="@/assets/visual/fixed.png" width="20px" height="20px" @click="qx" v-if="fix===true" />
  6. <img src="@/assets/visual/unfixed.png" width="20px" height="20px" @click="gd" v-if="fix===false" />
  7. </div>
  8. <el-tabs v-model="activeName" @tab-click="handleClick">
  9. <el-tab-pane label="标的专利" name="patent">
  10. <ContrastIndex v-bind="$attrs" v-on="$listeners" :reportId="reportId" :evidenceFlieId="getEvidenceId()" :evidence="evidence1" @on-change='changefix' :patentNo="signPatentNo" :signPatentNo="signPatentNo" :reportType="reportType" :showEvidence="!showEvidence" @openOpinioncontrast="openOpinioncontrast"></ContrastIndex>
  11. </el-tab-pane>
  12. <el-tab-pane label="无效请求书" name="InvalidRequest">
  13. <check-File ref="checkFile"></check-File>
  14. </el-tab-pane>
  15. </el-tabs>
  16. </div>
  17. <div v-else>
  18. <div>
  19. <img src="@/assets/visual/fixed.png" width="20px" height="20px" @click="qx" v-if="fix===true" />
  20. <img src="@/assets/visual/unfixed.png" width="20px" height="20px" @click="gd" v-if="fix===false" />
  21. </div>
  22. <ContrastIndex v-if="type == 1" v-bind="$attrs" v-on="$listeners" :reportId="reportId" :evidenceFlieId="getEvidenceId()" :evidence="evidence1" @on-change='changefix' :patentNo="evidence1.proofConditions" :signPatentNo="signPatentNo" :reportType="reportType" :showEvidence="showEvidence" @openOpinioncontrast="openOpinioncontrast"></ContrastIndex>
  23. <check-File v-else ref="checkFile1"></check-File>
  24. </div>
  25. <Add-Opinion ref="addOpinion"></Add-Opinion>
  26. </div>
  27. </template>
  28. <script>
  29. import ContrastIndex from '@/views/components/articles/ContrastIndex.vue';
  30. import checkFile from '@/views/report/InvalidResponse/components/checkFile.vue';
  31. import AddOpinion from '@/views/report/InvalidResponse/components/addOpinion.vue'
  32. export default {
  33. components: {
  34. ContrastIndex,
  35. checkFile,
  36. AddOpinion
  37. },
  38. props: ['isEvidence','evidence','reportId','signPatentNo','reportType','EvidenceList'],
  39. data() {
  40. return {
  41. activeName:'patent',
  42. fix:false,
  43. showEvidence:this.isEvidence,
  44. type:1,
  45. url:'',
  46. evidence1:{},
  47. };
  48. },
  49. watch: {
  50. isEvidence(val){
  51. if(!this.fix){
  52. this.showEvidence = val
  53. }
  54. },
  55. 'evidence'(val){
  56. if(!this.fix){
  57. this.evidence1 = JSON.parse(JSON.stringify(val))
  58. this.type = val.type
  59. this.showEvidence = true
  60. this.getDetails(val)
  61. }
  62. },
  63. },
  64. computed: {},
  65. created() {
  66. },
  67. mounted() {
  68. // this.$nextTick(()=>{
  69. // if(this.evidence.id){
  70. // this.getDetails(this.evidence)
  71. // }
  72. // })
  73. },
  74. methods: {
  75. //获取证据文献id
  76. getEvidenceId(){
  77. // var row = this.EvidenceList.find(item=>{
  78. // if(!this.fix){
  79. // console.log(12)
  80. // return item.proofConditions == this.evidence1.proofConditions
  81. // }else{
  82. // console.log(1)
  83. // return item.proofConditions == this.evidence.proofConditions
  84. // }
  85. // })
  86. if(!this.fix){
  87. var row = this.EvidenceList.find(item=>{
  88. return item.proofConditions == this.evidence1.proofConditions
  89. })
  90. }else{
  91. var row = this.EvidenceList.find(item=>{
  92. return item.proofConditions == this.evidence1.proofConditions
  93. })
  94. }
  95. if(row){
  96. return row.id
  97. }
  98. },
  99. // 划词陈述意见
  100. openOpinioncontrast(val) {
  101. var form = {}
  102. form=val
  103. form.reportId=this.reportId
  104. form.signPatentNo = this.signPatentNo
  105. this.$refs.addOpinion.open(form,false)
  106. },
  107. qx() {
  108. this.fix = false
  109. },
  110. gd() {
  111. this.fix = true
  112. },
  113. //获取证据详情
  114. getDetails(val){
  115. // 1是文献2是非文献
  116. if (val.type == 1) {
  117. // this.getPatent(val.proofConditions)
  118. // this.getPiZhuContrastList(val.proofConditions)
  119. } else if (val.type == 2){
  120. let url = `http://${this.$c.hostname}:8012/onlinePreview?url=` + btoa(encodeURIComponent(this.$p + val.proofConditions))
  121. this.$nextTick(() => {
  122. this.$refs.checkFile1.open(url)
  123. })
  124. }
  125. },
  126. //切换tab栏
  127. handleClick(){
  128. if(this.activeName == 'InvalidRequest'){
  129. if (this.url) {
  130. let url = `http://${this.$c.hostname}:8012/onlinePreview?url=` + btoa(encodeURIComponent(this.url))
  131. this.$refs.checkFile.open(url)
  132. } else {
  133. var params = {
  134. reportId: this.reportId,
  135. type:1,
  136. }
  137. this.$api.queryInvalidProcess(params).then((res) => {
  138. if (res.code==200) {
  139. this.url = this.$p + res.data[0].reportFile.url
  140. let url = `http://${this.$c.hostname}:8012/onlinePreview?url=` + btoa(encodeURIComponent(this.url))
  141. this.$refs.checkFile.open(url)
  142. }
  143. }).catch((error) => {
  144. })
  145. }
  146. }
  147. },
  148. //是否定住
  149. changefix(val){
  150. this.fix = val
  151. },
  152. },
  153. };
  154. </script>
  155. <style lang="scss" scoped>
  156. </style>