Explorar el Código

feat: 增加 gis目录

zhangys36 hace 2 años
padre
commit
880e266151

+ 1 - 0
.drone.yml

@@ -54,6 +54,7 @@ steps:
       debug: true
       script:
         - cp -r /www/wwwroot/railway-web.iamsee.com/工区DXF /www/wwwroot/railway-web.iamsee.com/release/dist/static/
+        - cp -r /www/wwwroot/railway-web.iamsee.com/工区所亭DXF /www/wwwroot/railway-web.iamsee.com/release/dist/static/
         - cd /www/wwwroot/railway-web.iamsee.com/release
         - docker build -t iamsee/railway-web:1.0.0 .
         - docker save -o railway-web@1.0.0.tar iamsee/railway-web:1.0.0

+ 11 - 11
src/views/dashboard-screen/chart-map/chartMap.vue

@@ -5,7 +5,7 @@
 
 </template>
 <script>
-import {chartMap} from '@/api/dashboard-json'
+import { chartMap } from '@/api/dashboard-json'
 
 export default {
   name: 'ChartMap',
@@ -45,7 +45,7 @@ export default {
           })
           return ret
         })
-        window['mapData'] = data;
+        window['mapData'] = data
         this.$refs.mapFrame.contentWindow.postMessage(
           {
             data: data
@@ -61,7 +61,7 @@ export default {
           if (findConfig && (renderType === 1 || renderType === 2)) {
             this.loadImage(findConfig['文件路径'])
           } else if (findConfig && renderType === 0) {
-            this.loadDXF(findConfig['名称'], findConfig['文件路径'])
+            this.loadDXF(findConfig['名称'], findConfig['文件路径'], findConfig['所亭路径'])
           }
         })
         console.log('data', data)
@@ -69,24 +69,24 @@ export default {
       console.log('loadDone')
     },
     async getConfig() {
-      const response = await fetch('/static/config.json');
-      const json = await response.json();
+      const response = await fetch('/static/config.json')
+      const json = await response.json()
       console.log('json', json)
-      this.config = json;
+      this.config = json
     },
 
     loadImage(path) {
       console.log('loadImage', path)
       if (!this.imgViewer?.isShown) {
         this.imgViewer = this.$viewerApi({
-          images: [`/static${path}`],
+          images: [`/static${path}`]
         })
       }
     },
-    loadDXF(name, path) {
-      console.log('loadDXF', name, path)
-      const url = `/static${path}`;
-      this.openDrawer('变电-电力异常信息', {name, path})
+    loadDXF(name, path, stPath) {
+      console.log('loadDXF', name, path, stPath)
+      const url = `/static${path}`
+      this.openDrawer('变电-电力异常信息', { name, path, stPath })
     }
   }
 }

+ 12 - 1
src/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/ScreenBdDlYcxx.vue

@@ -12,6 +12,7 @@
             v-if="activeKey === item.name"
             :selectedGQ="selectedGQ"
             :gqPath="params.path"
+            :gqStPath="params.stPath"
           />
         </a-tab-pane>
       </a-tabs>
@@ -26,6 +27,7 @@ import Bd from "@/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/bd.vue";
 import ZzBd from "@/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/zzBd.vue";
 import ZzDl from "@/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/zzdl.vue";
 import GqImg from "@/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/gqImg.vue";
+import GqSTImg from "@/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/gqStImg.vue";
 import request from "@/utils/request";
 
 export default {
@@ -35,7 +37,8 @@ export default {
     Dl,
     ZzBd,
     ZzDl,
-    GqImg
+    GqImg,
+    GqSTImg
   },
   props: {
     params: {
@@ -76,6 +79,14 @@ export default {
       const selectList = res.data || []
       this.selectedGQ = selectList.find(item => item.dictLabel.includes(this.params?.name))
       if (this.selectedGQ && this.params?.path) {
+
+        const stCadName = this.params.name + '(所亭CAD)'
+        this.tabs.unshift(
+          {
+            title: stCadName,
+            name: 'GqSTImg'
+          }
+        )
         const cadName = this.params.name + '(CAD)'
         this.tabs.unshift(
           {

+ 55 - 0
src/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/gqStImg.vue.vue

@@ -0,0 +1,55 @@
+<template>
+  <div class="iframe-wrap" v-if="gqStPath">
+    <iframe id="gqImgFrame" :src="'/geminiRender/render_dxf_project.html?path=/static'+gqStPath" frameborder="none" :onload="loadDone"/>
+  </div>
+
+</template>
+<script>
+import {chartMap} from '@/api/dashboard-json'
+
+export default {
+  name: 'GqStImg',
+  props: {
+    gqStPath: {
+      type: String,
+      default: null
+    }
+  },
+  data() {
+    return {
+    }
+  },
+  created() {
+    window['GqStImgIs'] = this
+  },
+  mounted() {
+    // this.$refs.gqImgFrame.onload = () => {
+    //   this.loadDone()
+    // }
+  },
+  methods: {
+    loadDone() {
+      console.log('loadDone')
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.iframe-wrap {
+  width: 100%;
+  height: calc(100vh - 220px);
+
+  iframe {
+    width: 100%;
+    height: 100%;
+  }
+}
+
+::v-deep {
+  #container {
+    background-image: none !important;
+  }
+}
+
+</style>