hongrunxia 1 rok pred
rodič
commit
fb10598bc5

+ 2 - 2
.env.development

@@ -6,7 +6,7 @@ VITE_PUBLIC_PATH = /
 
 # 跨域代理,您可以配置多个 ,请注意,没有换行符
 #VITE_PROXY = [["/jeecgboot","http://localhost:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]]
-VITE_PROXY = [["/jeecgsystem","http://182.92.126.35:9999"],["/upload","http://localhost:3300/upload"],["/documents", "http://182.92.126.35:9050"],["/modelreq", "http://182.92.126.35:9999"]]
+VITE_PROXY = [["/jeecgsystem","http://182.92.126.35:9999"],["/upload","http://localhost:3300/upload"],["/documents", "http://182.92.126.35:9050"],["/modelreq", "http://182.92.126.35:9999"],["/webRtc", "http://192.168.183.216:8000"]]
 #VITE_PROXY = [["/jeecgsystem","http://192.168.1.8:9999"],["/upload","http://localhost:3300/upload"]]
 
 # 控制台不输出
@@ -14,7 +14,7 @@ VITE_DROP_CONSOLE = false
 
 #后台接口父地址(必填)
 #VITE_GLOB_API_URL=/jeecgboot
-VITE_GLOB_API_URL=/jeecgsystem
+VITE_GLOB_API_URL=/modelreq
 
 
 #后台接口全路径地址(必填)

+ 6 - 6
.env.production

@@ -2,7 +2,7 @@
 VITE_USE_MOCK = true
 
 # 发布路径
-VITE_PUBLIC_PATH = /
+VITE_PUBLIC_PATH = ./
 
 # 控制台不输出
 VITE_DROP_CONSOLE = true
@@ -17,7 +17,7 @@ VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
 #VITE_PROXY = [["/jeecgsystem","http://10.248.223.116:9999"],["/upload","http://localhost:3300/upload"]]
 #VITE_PROXY = [["/jeecgsystem","http://10.248.210.152:9999"],["/upload","http://10.248.210.152:9999/upload"]]
 #VITE_PROXY = [["/jeecgsystem","http://182.92.126.35:9999"],["/upload","http://182.92.126.35:9999/upload"]]
-VITE_PROXY = [["/jeecgsystem","http://172.16.41.171:9999"],["/upload","http://172.16.41.171:9999/upload"], ["/documents", "http://182.92.126.35:9050"]]
+VITE_PROXY = [["/modelreq","http://172.16.41.171:9999"],["/upload","http://172.16.41.171:9999/upload"], ["/documents", "http://182.92.126.35:9050"]]
 #VITE_PROXY = [["/jeecgsystem","http://172.16.41.171:9999"],["/upload","http://172.16.41.171:9999/upload"]]
 #VITE_PROXY = [["/jeecgsystem","http://10.120.120.163:9999"],["/upload","http://10.120.120.163:9999/upload"]]
 #VITE_PROXY = [["/jeecgsystem","http://192.168.1.4:9999"],["/upload","http://localhost:3300/upload"]]
@@ -27,7 +27,7 @@ VITE_PROXY = [["/jeecgsystem","http://172.16.41.171:9999"],["/upload","http://17
 #VITE_PROXY = [["/jeecgsystem","http://127.0.0.1:9999"],["/upload","http://localhost:3300/upload"]]
 
 #后台接口父地址(必填)
-VITE_GLOB_API_URL=/jeecgsystem
+VITE_GLOB_API_URL=/modelreq
 
 #后台接口全路径地址(必填)
 #VITE_GLOB_DOMAIN_URL=http://jeecg-boot-system:8080/jeecg-boot
@@ -61,9 +61,9 @@ VITE_LEGACY = false
 #VITE_APP_SUB_APP = [["micro-need-air", "//10.248.210.152:8093/"], ["micro-vent-3dModal", "//10.248.210.152:8091/"]] #宝德
 #VITE_APP_SUB_APP = [["micro-need-air", "//10.120.120.163:8093/"], ["micro-vent-3dModal", "//10.120.120.163:8091/"]] #查哈素
 #VITE_APP_SUB_APP = [["micro-need-air", "//182.92.126.35:8093/"], ["micro-vent-3dModal", "//182.92.126.35:8091/"]]
-# VITE_APP_SUB_APP = [["micro-need-air", ":8093/"], ["micro-vent-3dModal", ":8091/"]]
-VITE_APP_SUB_APP = [["micro-vent-3dModal", ":8091/", "micro-vent-3dModal"], ["micro-need-air", ":8093/", "micro-need-air"]]
-#VITE_APP_SUB_APP = [["micro-vent-3dModal", "/models/"], ["micro-need-air", "/vent-need-air/"]] #[name, entry, container]
+#VITE_APP_SUB_APP = [["micro-need-air", ":8093/"], ["micro-vent-3dModal", ":8091/"]]
+#VITE_APP_SUB_APP = [["micro-vent-3dModal", ":8091/", "micro-vent-3dModal"], ["micro-need-air", ":8093/", "micro-need-air"]]
+VITE_APP_SUB_APP = [["micro-vent-3dModal", "/models/"], ["micro-need-air", "/vent-need-air/"]] #[name, entry, container]
 #VITE_APP_SUB_APP = [["micro-need-air", "//172.16.41.171:7123/"], ["micro-vent-3dModal", "//172.16.41.171:7121/"]]
 #VITE_APP_SUB_APP = [["micro-vent-3dModal", "//192.168.0.79:7121/"]]
 #VITE_APP_SUB_APP = [["micro-need-air", "//127.0.0.1:20000/"], ["micro-vent-3dModal", "//127.0.0.1:30000/"], ["micro-fire-front", "//127.0.0.1:40000/"]]

+ 1 - 1
index.html

@@ -12,7 +12,7 @@
     <script src="/js/liveplayer-lib.min.js"></script>
     <script src="/js/webrtcstreamer.js"></script>
     <script src="/js/adapter.min.js"></script>
-    <script type="text/javascript" src="/documents/web-apps/apps/api/documents/api.js"></script>
+    <script type="text/javascript" src="<%= VITE_PUBLIC_PATH %>documents/web-apps/apps/api/documents/api.js"></script>
   </head>
   <body>
     <script>

+ 2 - 4
public/js/config.js

@@ -1,8 +1,6 @@
 const VUE_APP_URL = {
-  // baseUrl: "http://182.92.126.35:9999", // 后台地址
-  baseUrl: "/jeecgsystem", // 后台地址
-  // baseUrl: "http://192.168.159.158:9999", // 后台地址
-  webRtcUrl: '//192.168.183.216:8000' // rtsp服务器IP地址
+  baseUrl: "/modelreq", // 后台地址
+  webRtcUrl: '/webRtc' // rtsp服务器IP地址
 }
 const History_Type = {
   // type: 'remote', // remote、vent  (remote 代表的是历史查询走的装备院的接口,vent是走的咱们的,目前神东的项目都用remote, 其他矿用vent)

+ 1 - 4
public/js/webrtcstreamer.js

@@ -63,7 +63,6 @@ WebRtcStreamer.prototype.connect =async function(videourl, audiourl, options, lo
 		this.onReceiveGetIceServers(this.iceServers, videourl, audiourl, options, localstream);
 	}
 	
-	
 }
 
 /** 
@@ -79,9 +78,7 @@ WebRtcStreamer.prototype.disconnect = function() {
 	if (this.pc) {
 		fetch(this.srvurl + "/api/hangup?peerid=" + this.pc.peerid)
 			.then(this._handleHttpErrors)
-			.catch( (error) => this.onError("hangup " + error ))
-
-		
+			.catch( (error) => this.onError("hangup " + error ))		
 		try {
 			this.pc.close();
 		}

+ 9 - 0
src/components/vent/micro/needAir.vue

@@ -1,4 +1,13 @@
 <template>
+  <div v-if="loading" class="app-loading">
+    <div id="loader-wrapper" class="app-loading">
+      <div class="app-loading-wrap">
+        <div class="app-loading-dots">
+          <span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
+        </div>
+      </div>
+    </div>
+  </div>
   <div id="micro-need-air"></div>
 </template>
 <script lang="ts">

+ 146 - 2
src/components/vent/micro/ventModal.vue

@@ -1,23 +1,167 @@
 <template>
+  <div v-if="loading" class="app-loading">
+    <div id="loader-wrapper" class="app-loading">
+      <div class="app-loading-wrap">
+        <div class="app-loading-dots">
+          <span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
+        </div>
+      </div>
+    </div>
+  </div>
   <div id="micro-vent-3dModal"></div>
 </template>
 <script lang="ts">
-  import { onMounted, onBeforeUnmount, defineComponent } from 'vue';
+  import { ref, onMounted, onBeforeUnmount, defineComponent } from 'vue';
   import { unmountMicroApps, mountMicroApp } from '/@/qiankun';
   import { resetMicroContentWH } from '/@/utils/domUtils';
+  import { getActions } from '/@/qiankun/state';
 
   export default defineComponent({
     name: 'VentModel',
     setup() {
+      let actions: any;
+      const loading = ref(true);
+
       onMounted(() => {
         mountMicroApp('/micro-vent-3dModal');
         resetMicroContentWH('micro-vent-3dModal');
+        actions = getActions();
+        actions.onGlobalStateChange((newState, prev) => {
+          debugger;
+          for (const key in newState) {
+            if (key === 'isMounted') {
+              if (newState[key] !== prev[key] && newState[key] === true) {
+                loading.value = false;
+                console.log('首页已经渲染完毕');
+              }
+            }
+          }
+        });
       });
 
       onBeforeUnmount(async () => {
         unmountMicroApps(['/micro-vent-3dModal']);
       });
+      return { loading };
     },
   });
 </script>
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+  @import '/@/design/vent/color.less';
+  .app-loading {
+    position: absolute;
+    display: flex;
+    width: 100%;
+    height: 100%;
+    justify-content: center;
+    align-items: center;
+    flex-direction: column;
+    // background-color: #f4f7f900;
+    background-image: url('/@/assets/images/vent/loading-bg.png');
+    background-size: cover;
+    background-repeat: no-repeat;
+    background-color: var(--vent-base-color);
+  }
+
+  .app-loading .app-loading-wrap {
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    display: flex;
+    -webkit-transform: translate3d(-50%, -50%, 0);
+    transform: translate3d(-50%, -50%, 0);
+    justify-content: center;
+    align-items: center;
+    flex-direction: column;
+  }
+
+  .app-loading .dots {
+    display: flex;
+    padding: 98px;
+    justify-content: center;
+    align-items: center;
+  }
+
+  .app-loading .app-loading-title {
+    display: flex;
+    margin-top: 30px;
+    font-size: 30px;
+    color: rgba(0, 0, 0, 0.85);
+    justify-content: center;
+    align-items: center;
+  }
+
+  .dot {
+    position: relative;
+    display: inline-block;
+    width: 32px;
+    height: 32px;
+    margin-top: 30px;
+    font-size: 32px;
+    transform: rotate(45deg);
+    box-sizing: border-box;
+    animation: antRotate 1.2s infinite linear;
+  }
+
+  .dot i {
+    position: absolute;
+    display: block;
+    width: 14px;
+    height: 14px;
+    background-color: #0065cc;
+    // background-color: #d1d1d1;
+    border-radius: 100%;
+    opacity: 0.3;
+    transform: scale(0.75);
+    animation: antSpinMove 1s infinite linear alternate;
+    transform-origin: 50% 50%;
+  }
+
+  .dot i:nth-child(1) {
+    top: 0;
+    left: 0;
+  }
+
+  .dot i:nth-child(2) {
+    top: 0;
+    right: 0;
+    -webkit-animation-delay: 0.4s;
+    animation-delay: 0.4s;
+  }
+
+  .dot i:nth-child(3) {
+    right: 0;
+    bottom: 0;
+    -webkit-animation-delay: 0.8s;
+    animation-delay: 0.8s;
+  }
+
+  .dot i:nth-child(4) {
+    bottom: 0;
+    left: 0;
+    -webkit-animation-delay: 1.2s;
+    animation-delay: 1.2s;
+  }
+  @keyframes antRotate {
+    to {
+      -webkit-transform: rotate(405deg);
+      transform: rotate(405deg);
+    }
+  }
+  @-webkit-keyframes antRotate {
+    to {
+      -webkit-transform: rotate(405deg);
+      transform: rotate(405deg);
+    }
+  }
+  @keyframes antSpinMove {
+    to {
+      opacity: 1;
+    }
+  }
+  @-webkit-keyframes antSpinMove {
+    to {
+      opacity: 1;
+    }
+  }
+</style>

+ 11 - 12
src/layouts/default/content/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div :class="[prefixCls, getLayoutContentMode, { 'layout-content-full': getShowFullHeader }]" v-loading="getOpenPageLoading && getPageLoading">
-    <PageLayout class="page-box"/>
+    <PageLayout class="page-box" />
     <!-- update-begin-author:zyf date:20211129 for:qiankun 挂载子应用盒子 -->
     <div v-if="getShowFullHeader && loading" class="app-loading">
       <div id="loader-wrapper" class="app-loading">
@@ -28,7 +28,7 @@
   import { useGlobSetting } from '/@/hooks/setting';
   import { getActions } from '/@/qiankun/state';
   import { nextTick } from 'vue';
-  import { noContentLink } from '../layout.data'
+  import { noContentLink } from '../layout.data';
 
   export default defineComponent({
     name: 'LayoutContent',
@@ -59,13 +59,12 @@
         });
       }
       useContentViewHeight();
-      
+
       const getShowFullHeader = computed(() => {
         const route = unref(currentRoute);
-        if(route.path.startsWith('/micro-')){
-        
+        if (route.path.startsWith('/micro-')) {
         }
-        return getShowFullHeaderRef.value || ((route.path.startsWith('/micro-')));
+        return getShowFullHeaderRef.value || route.path.startsWith('/micro-');
       });
 
       onBeforeMount(() => {});
@@ -88,7 +87,7 @@
         getShowFullHeader,
         loading,
         currentRoute,
-        noContentLink
+        noContentLink,
       };
     },
   });
@@ -97,7 +96,7 @@
   @import '/@/design/vent/color.less';
   @prefix-cls: ~'@{namespace}-layout-content';
   @ventSpace: zxm;
-  
+
   .@{prefix-cls} {
     position: relative;
     flex: 1 1 auto;
@@ -113,12 +112,12 @@
       z-index: @page-loading-z-index;
     }
   }
-  .app-view-box{
+  .app-view-box {
     position: fixed;
     width: 100%;
     height: 100%;
     top: 0;
-    left:0;
+    left: 0;
     background: transparent;
   }
 
@@ -126,7 +125,7 @@
     // height: calc(100vh - 48px);
     // margin-top: 48px;
     // overflow-y: auto;
-    height: 100%
+    height: 100%;
   }
   .app-loading {
     display: flex;
@@ -243,7 +242,7 @@
       opacity: 1;
     }
   }
-  :deep(.@{ventSpace}-layout){
+  :deep(.@{ventSpace}-layout) {
     background: transparent !important;
   }
 </style>

+ 8 - 8
src/qiankun/apps.ts

@@ -12,14 +12,14 @@ for (const key in import.meta.env) {
     const appList = JSON.parse(import.meta.env[key].replace(/'/g, '"'));
     appList.forEach((app) => {
       // const name = app[0];
-      let utlStr;
-      if (import.meta.env.PROD) {
-        // 多端口请求
-        utlStr = VUE_APP_URL.baseUrl.split(':')[1] + app[1];
-        // utlStr = app[1];
-      } else {
-        utlStr = app[1];
-      }
+      const utlStr = app[1];
+      // if (import.meta.env.PROD) {
+      //   // 多端口请求
+      //   // utlStr = VUE_APP_URL.baseUrl.split(':')[1] + app[1];
+      //   utlStr = app[1];
+      // } else {
+      //   utlStr = app[1];
+      // }
       const obj = {
         name: app[0],
         entry: utlStr,

+ 2 - 2
src/views/vent/home/clique/index.vue

@@ -3,7 +3,7 @@
     <div class="top-bg">
       <div class="main-title">{{ mainTitle }}</div>
     </div>
-    <!-- <mapComponent @open-detail="showDetail" /> -->
+    <mapComponent @open-detail="showDetail" />
     <div class="company-content">
       <div class="area-content">
         <div class="left-area">
@@ -47,7 +47,7 @@
   import fileShare from './components/file-share.vue';
   import windRoad from './components/wind-road.vue';
   import sceneKey from './components/scene-key.vue';
-  // import mapComponent from './components/3Dmap/index.vue';
+  import mapComponent from './components/3Dmap/index.vue';
 
   let mainTitle = ref('国家能源神东煤炭集团');
   function showDetail(code) {