浏览代码

zzy 图片查看修改

zhiyuan-007 8 月之前
父节点
当前提交
6dd4966b20

+ 18 - 2
src/components/SmallBig.vue

@@ -1,10 +1,12 @@
 <template>
   <div class="small-big" @click="$emit('update:isSmallImgShow',false)">
-    <img @click.stop="" :src="src"  alt="">
+    <img @click.stop="" :src="url"  alt="">
   </div>
 </template>
 
 <script>
+import {getPreviewImg, loadIframeDmContent} from "@/service/show-platform";
+
 export default {
   name: "SmallBig",
   props:{
@@ -15,7 +17,21 @@ export default {
 
     }
   },
-
+  data(){
+    return {
+      url: null
+    }
+  },
+  mounted() {
+    debugger
+    getPreviewImg({
+      url:this.src
+    }).then(async res => {
+      const blob = new Blob([res], { type: "image/png" });
+      // 创建URL对象
+      this.url = URL.createObjectURL(blob);
+    })
+  }
 }
 </script>
 

+ 44 - 0
src/service/index.js

@@ -140,4 +140,48 @@ export {
 }
 
 
+const requestInstance_Html = axios.create({
+    baseURL:import.meta.env.VITE_BASE_API,
+    timeout,
+    method:"get",
+    withCredentials,
+    headers:{
+        Systemtype:'ebb42096345340359741dcb9c039f15c'
+    },
+    // headers:{
+    //
+    //     "Content-Type":"application/x-www-form-urlencoded"
+    // },
+    // transformRequest:[(data) => {
+    //
+    //     if(data) {
+    //         let params = new FormData()
+    //         let keys = Object.keys(data)
+    //         keys.forEach(key => {
+    //             params.append(key,data[key])
+    //         })
+    //         return params
+    //     }
+    //     return data
+    // }
+    // ]
+})
+requestInstance_Html.interceptors.request.use((config) => {
+    return config
+},(error) => {
+    return new Error(error)
+})
+
+requestInstance_Html.interceptors.response.use(function (res) {
+    return res
+},function (error) {
+    return new Error(error)
+})
+
+export {
+    requestInstance_Html
+}
+
+
+
 

+ 29 - 0
src/service/show-platform.js

@@ -30,6 +30,16 @@ export function getLoginImg(){
     })
 }
 
+export function getPreviewImg(params){
+    return requestInstance_Get({
+        url:params.url,
+        params:{
+
+        },
+    })
+}
+
+
 export function editLoginState(usercode,userkeycode,state){
     return requestInstance({
         url:'/user/editUserinfoLoginStates',
@@ -180,3 +190,22 @@ export function deleteBookMark(UUID){
     })
 }
 
+
+export function loadIframeDataContent(){
+    return requestInstance_Get({
+        url:'/LogVisualization/viewExcel',
+        params:{
+
+        },
+    })
+}
+
+export function loadIframeDmContent(){
+    return requestInstance_Get({
+        url:'/LogVisualization/viewDMExcel',
+        params:{
+
+        },
+    })
+}
+

+ 28 - 6
src/view/other/c-views/data-watch/data-sync-handle-watch/data-sync-handle-table/DataSyncHandleTableHome.vue

@@ -59,14 +59,16 @@
      <el-tab-pane label="数据归集统计表" name="data">
        <transition name="fade" mode="out-in">
          <div v-show="activeTab === 'data'">
-           <iframe :src="baseUrl() + '/LogVisualization/viewExcel'"></iframe>
+<!--           <iframe ref="iframe_data"  :src="baseUrl() + '/LogVisualization/viewExcel'"></iframe>-->
+           <iframe ref="iframe_data" ></iframe>
          </div>
        </transition>
      </el-tab-pane>
      <el-tab-pane label="DM业务时间统计表" name="dm">
        <transition name="fade" mode="out-in">
          <div v-show="activeTab === 'dm'">
-           <iframe :src="baseUrl() + '/LogVisualization/viewDMExcel'"></iframe>
+<!--           <iframe ref="iframe_dm"   :src="baseUrl() + '/LogVisualization/viewDMExcel'"></iframe>-->
+           <iframe ref="iframe_dm"  ></iframe>
          </div>
        </transition>
      </el-tab-pane>
@@ -77,16 +79,17 @@
 <script>
 import DiyElForm from "@/components/common/DiyElForm.vue";
 import {dataSyncHandleTableFilterForm} from "@/data/all-forms";
-import {onBeforeMount, ref} from "vue";
+import {onBeforeMount, onMounted, ref} from "vue";
 import {Search} from "@element-plus/icons-vue";
 import MyTable from "@/components/common/MyTable.vue";
 import {useActiveGetTableData, usePagination} from "@/unit/use-method/usePagination";
 import {dataSyncHandleSyncTabTableHeader} from "@/data/all-table-header";
 import ElePagination from "@/components/common/ElePagination.vue";
 import {getDataSyncHandleWatchSheet} from "@/service/data-sync-hanlle-watch/data-sync-handle-watch-sheet";
-import {baseUrl, baseUrl_Address} from "@/service/config";
+import {baseUrl, baseUrl_Address, withCredentials} from "@/service/config";
 import {useRootStore} from "@/stores/useStore";
 import {UserInfo} from "@/unit/UserInfo";
+import {getLoginImg, loadIframeDataContent, loadIframeDmContent} from "@/service/show-platform";
 
 export default {
   name: "DataSyncHandleTableHome",
@@ -106,6 +109,8 @@ export default {
   },
   components: {ElePagination, MyTable, DiyElForm},
   setup() {
+    let iframe_data = ref(null);
+    let iframe_dm = ref(null);
     useActiveGetTableData(getSyncTableData)
     function clickOperationBtn(item) {
       if (item.type === '导出'){
@@ -126,8 +131,24 @@ export default {
 
     }
     const {pageIndex,pageSize,handleSizeChange,totalCount,tableData,refEl}=  usePagination(getSyncTableData)
+    function getLoadIframeDataContent() {
+      loadIframeDataContent().then(async res => {
+        const html = await res.text();
+        iframe_data.value.srcdoc  = html;
+      })
+    }
+    function getLoadIframeDmContent() {
+      loadIframeDmContent().then(async res => {
+        const html = await res.text();
+        iframe_dm.value.srcdoc  = html;
+      })
+    }
     onBeforeMount((item) => {
 
+    })
+    onMounted((item) => {
+      getLoadIframeDataContent();
+      getLoadIframeDmContent();
     })
     const tableControlBtns  = [
 
@@ -146,8 +167,9 @@ export default {
       activeTab,
       pageIndex,pageSize,handleSizeChange,totalCount,tableData,refEl,
       dataSyncHandleSyncTabTableHeader,getSyncTableData,
-      clickOperationBtn
-
+      clickOperationBtn,
+      iframe_data,
+      iframe_dm
     }
   }
 }

+ 1 - 1
src/view/other/c-views/system-manage/interface-manage/interface-manage/InterfaceManageDetail.vue

@@ -1,6 +1,6 @@
 <template>
  <div class="position-re">
-   <small-big v-if="isPreviewDialogIsShow" v-model:is-small-img-show="isPreviewDialogIsShow" :src="baseUrl() + '/fileController/image?path='+currentImgFile[0].resUrl"/>
+   <small-big v-if="isPreviewDialogIsShow" v-model:is-small-img-show="isPreviewDialogIsShow" :src="'/fileController/image?path='+currentImgFile[0].resUrl"/>
    <my-breadcrumb class="my-breadcrumb" :breadcrumb-arr="myBread"></my-breadcrumb>
    <div class="back" @click="$emit('changeOperation','',{})"><span class="fa fa-reply cur-po " >返回</span></div>
    <div class="my-detail-main">

+ 1 - 1
src/view/other/c-views/system-manage/interface-manage/interface-order/InterfaceOrderDetail.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="position-re">
-    <small-big v-if="isPreviewDialogIsShow" v-model:is-small-img-show="isPreviewDialogIsShow" :src="baseUrl() + '/fileController/image?path='+currentImgFile[0].resUrl"/>
+    <small-big v-if="isPreviewDialogIsShow" v-model:is-small-img-show="isPreviewDialogIsShow" :src="'/fileController/image?path='+currentImgFile[0].resUrl"/>
 
     <my-breadcrumb :breadcrumb-arr="myBread" class="my-breadcrumb"/>
     <div class="back" @click="$emit('changeOperation','',{})"><span class="fa fa-reply cur-po " >返回</span></div>

+ 2 - 1
src/view/other/c-views/system-manage/system-manage/user-manage/UnionCheckDetail.vue

@@ -102,7 +102,8 @@ export default {
           ...res.msg[0].Rows[0]
         }
         if (res.msg[0].Rows[0].FILENAME){
-          sjqrdFileSrc.value = baseUrl + '/fileController/image?path=' +  res.msg[0].Rows[0].FILENAME
+          // sjqrdFileSrc.value = baseUrl + '/fileController/image?path=' +  res.msg[0].Rows[0].FILENAME
+          sjqrdFileSrc.value = '/fileController/image?path=' +  res.msg[0].Rows[0].FILENAME
         }
 
       })

+ 0 - 1
vite.config.js

@@ -17,7 +17,6 @@ export default defineConfig({
       '/api': {
         // 代理请求之后的请求地址(你的真实接口地址)
         //target: 'https://datamidplat.zjw.sh.cegn.cn:2011/data-business-prod/',
-        //target: 'https://cimweb.zjw.sh.cegn.cn:2007/data-business-prod/',
         target: 'http://localhost:9250',
         secure: false,
         ws: true,