notPatentDetails.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <div class="height_100">
  3. <el-container>
  4. <el-header style="height: auto;">
  5. <div style="width:100%">
  6. <div style="display:flex;justify-content: space-between;padding:0 10px;">
  7. <div>
  8. <div style="text-align: start;padding-left: 10px;position: relative;">
  9. <img src="@/assets/visual/fixed.png" width="20px" height="20px" v-if="fix === true && value == true" @click="qx" style="" />
  10. <img src="@/assets/visual/unfixed.png" width="20px" height="20px" v-if="fix === false && value == true" @click="gd" style="" />
  11. </div>
  12. <div style="text-align:center">
  13. <span>
  14. {{ evidence.name }}
  15. </span>
  16. </div>
  17. </div>
  18. <div>
  19. <div v-if="reportType == 1 || reportType == 2">
  20. <el-button type="primary" size="small" @click="addContrast">添加对比记录</el-button>
  21. </div>
  22. </div>
  23. </div>
  24. </div>
  25. </el-header>
  26. <el-main>
  27. <div class="height_100" style="width:100%" v-loading="loading">
  28. <myIframe id="checkIframe" :src="url" height="100%" frameborder="0" width="100%"></myIframe>
  29. </div>
  30. </el-main>
  31. </el-container>
  32. <contrast ref="contrast"></contrast>
  33. </div>
  34. </template>
  35. <script>
  36. import contrast from '@/views/components/dialog/menuDialog/contrast.vue'
  37. export default {
  38. components: {
  39. contrast
  40. },
  41. props: {
  42. evidence:{
  43. default:()=>{
  44. return {}
  45. }
  46. },
  47. reportType:{
  48. },
  49. projectId:{
  50. },
  51. signPatentNo:{
  52. },
  53. },
  54. data() {
  55. return {
  56. url:'',
  57. loading:false,
  58. fix:false,
  59. value: false,
  60. };
  61. },
  62. watch: {
  63. evidence(val){
  64. if(val){
  65. this.getUrl()
  66. this.load()
  67. }
  68. }
  69. },
  70. computed: {},
  71. created() {},
  72. mounted() {
  73. if(this.evidence){
  74. this.getUrl()
  75. this.load()
  76. }
  77. },
  78. methods: {
  79. getUrl(){
  80. if(Object.keys(this.evidence).length>0){
  81. var guid = this.evidence.literatureNo
  82. this.url = this.$commonJS.checkGuid(guid,this.evidence.systemFile.type)
  83. }
  84. },
  85. load(){
  86. var that = this
  87. this.$nextTick(()=>{
  88. var a = document.getElementById('checkIframe')
  89. a.onload = function() {
  90. that.loading = true
  91. };
  92. if(a.contentDocument && a.contentDocument.readyState &&a.contentDocument.readyState == 'complete'){
  93. that.loading = false
  94. }
  95. })
  96. },
  97. addContrast(){
  98. var a = {}
  99. // a.patentNo = currentSelectObj.patentNo//专利号
  100. a.signPatentNo = this.signPatentNo//标的专利号
  101. a.text = ''//选中的文本
  102. a.projectId = this.projectId//项目Id
  103. a.column = ''//选中文本所在栏位
  104. a.position = ''//选中文本开始位置
  105. a.id = null//对比记录Id
  106. a.remark = null//备注
  107. a.markType = 2//高亮类型
  108. a.markColor = '#ff0000'//高亮颜色
  109. a.permissionType = 1//高亮权限
  110. // a.color = this.currentSelectObj.color
  111. a.createFrom = this.outside ? 0 : this.projectType//来源0默认(专利)1专题库2报告
  112. a.literatureId = this.evidence ? this.evidence.id : null
  113. a.patentTitle=this.evidence.name
  114. this.$store.commit("SET_PATENT_INDEX", a)
  115. this.$refs.contrast.open()
  116. }
  117. },
  118. };
  119. </script>
  120. <style lang="scss" scoped>
  121. </style>