zhuliu 1 سال پیش
والد
کامیت
5adcc53a0c

+ 1 - 1
src/utils/common.js

@@ -365,7 +365,7 @@ treeToArray(data,prop={children:children}){
     }
     var src = this.checkViewer(guid)
     var previewUrl = src + '&fullfilename='+guid +'.'+type
-    return `http://${Config.staticURL}:8012/onlinePreview?url=` + encodeURIComponent(Base64.encode(window.location.origin+previewUrl))
+    return `${Config.staticURL}/onlinePreview?url=` + encodeURIComponent(Base64.encode(Config.staticURL+previewUrl))
   },
 
   //跳转预览界面

+ 4 - 1
src/utils/model/iframe/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="myIframe" v-loading="loadLoading" ref="myIframe">
-    <iframe ref="iframe" :src="src" v-bind="$attrs" height="100%" width="100%"></iframe>
+    <iframe ref="iframe" :src="src" v-bind="$attrs" :height="height" width="100%"></iframe>
   </div>
 </template>
 
@@ -10,6 +10,9 @@ export default {
   props: {
     src:{
         default:''
+    },
+    height:{
+      default:'100%'
     }
   },
   data() {

+ 2 - 2
src/views/components/view/checkFile.vue

@@ -7,7 +7,7 @@
             </div>
         </div>
         <div style="display:flex;justify-content: center;height: calc(100% - 30px);">
-            <div v-if="isPicture == 0"  v-loading="loadLoading" style="width:100%">
+            <div v-if="isPicture == 0"  v-loading="loadLoading" style="width:100%;height:100%">
                 <iframe id="checkIframe" :src="FileUrl" frameborder="0" width="100%" :height="height"></iframe>
             </div>
             <el-image v-else :src="FileUrl" width="100%" :preview-src-list="srcList"></el-image>
@@ -22,7 +22,7 @@ export default {
         return {
             loadLoading:true,
             // FileName:'',
-            height:document.documentElement.clientHeight - 200,
+            height:document.documentElement.clientHeight - 100,
             // srcList:[],
         }
     },

+ 1 - 1
src/views/layout/mixins/index.js

@@ -5,7 +5,7 @@ export const webSocket = {
   methods: {
     connectWebSocket(userId) {
       // let webSocket = new WebSocket(`ws://192.168.1.3:8877/api/xiaoshi/ws/` + userId)
-      let webSocket = new WebSocket(`ws://${this.$c.WebSocketPath}/api/xiaoshi/ws/` + userId)
+      let webSocket = new WebSocket(`${this.$c.WebSocketPath}/api/xiaoshi/ws/` + userId)
       Store.commit('SET_WEB_SOCKET', webSocket)
       webSocket.onopen = () => {
         console.log('WebSocket连接成功')

+ 4 - 4
src/views/project/patentDetails/components/patentMessage/PatentPDF.vue

@@ -15,7 +15,7 @@
         <div slot="tip" class="el-upload__tip"></div>
       </el-upload> -->
     </div>
-    <div style="height:calc(100% - 120px)" v-loading="loading">
+    <div style="height:calc(100% - 0px)" v-loading="loading">
       <myIframe v-if="show" :src="src" frameborder="0" :height="height" width="100%"></myIframe>
       <div v-else class="no-pdf-file">
         <span>暂无文档</span>
@@ -67,7 +67,7 @@ export default {
     // 获取外部的pdf地址
     getData() {
       
-      this.height = (this.fullHeight - 230) + 'px'
+      this.height = (this.fullHeight - 240) + 'px'
       if (this.patent.pdf && this.patent.pdf.length > 0) {
         this.getSrc()
         return false
@@ -147,7 +147,7 @@ export default {
     // 请求内部pdf的guid
     refreshData() {
       this.show = false
-      this.height = (this.fullHeight - 230) + 'px'
+      this.height = (this.fullHeight - 240) + 'px'
       if(this.patent.pdf && this.patent.pdf.length>0){
         this.getSrc()
         return
@@ -183,7 +183,7 @@ export default {
     text-align: center;
     width: 100%;
     background: #e3e2e2;
-    height: calc(100% - 120px);
+    height: calc(100% - 50px);
     padding-top: 50px;
 
     span {