wangtao 1 рік тому
батько
коміт
abee3f264f

+ 5 - 0
.env.development

@@ -6,10 +6,15 @@ ENV = 'development'
 
 # 东信设备设施管理系统/开发环境
 VUE_APP_BASE_API = 'https://smartpark.caih.com/dmapi/'
+
 # 实时告警信息获取
 VUE_APP_WEBSOCKET_API = '10.21.39.1:8084'
+# 实时告警信息获取2
+VUE_APP_WEBSOCKET_API2 = 'iot.usky.cn'
+
 # thingJs地址
 VUE_APP_THINGJS_API = 'https://www.thingjs.com/s/ef7ee6a73896c01bda77e679?params=105b0f77fd24654d4eebc434e9'
+
 # 消防物联网视频拉流
 VUE_APP_VIDEO_API = 'https://iot.usky.cn'
 

+ 5 - 0
.env.production

@@ -6,9 +6,14 @@ ENV = 'production'
 
 # 管理系统/生产环境
 VUE_APP_BASE_API = 'https://smartpark.caih.com/dmapi/'
+
 # 实时告警信息获取
 VUE_APP_WEBSOCKET_API = '10.21.39.1:8084'
+# 实时告警信息获取2
+VUE_APP_WEBSOCKET_API2 = 'iot.usky.cn'
+
 # thingJs地址
 VUE_APP_THINGJS_API = 'https://www.thingjs.com/s/ef7ee6a73896c01bda77e679?params=105b0f77fd24654d4eebc434e9'
+
 # 消防物联网视频拉流
 VUE_APP_VIDEO_API = 'https://iot.usky.cn'

+ 5 - 0
.env.staging

@@ -8,9 +8,14 @@ ENV = 'staging'
 
 # 管理系统/测试环境
 VUE_APP_BASE_API = 'http://10.95.2.31:3084/dmapi/'
+
 # 实时告警信息获取
 VUE_APP_WEBSOCKET_API = '10.95.2.31:3084'
+# 实时告警信息获取2
+VUE_APP_WEBSOCKET_API2 = 'iot.usky.cn'
+
 # thingJs地址
 VUE_APP_THINGJS_API = 'https://www.thingjs.com/s/ef7ee6a73896c01bda77e679?params=105b0f77fd24654d4eebc434e9'
+
 # 消防物联网视频拉流
 VUE_APP_VIDEO_API = 'https://iot.usky.cn'

+ 1 - 1
src/assets/js/common.js

@@ -1,5 +1,5 @@
 function BASEPATH() {
-    return "https://smartpark.caih.com/dmapi/archive/";
+    return process.env.VUE_APP_BASE_API+'archive';
 }
 
 export {

+ 5 - 4
src/views/business/OM/MochaITOM/point/index.vue

@@ -50,8 +50,8 @@
           <el-image
             v-if="scope.row.spotLabelRoute"
             style="width: 24px; height: 24px"
-            :preview-src-list="['https://smartpark.caih.com/dmapi/archive/' + scope.row.spotLabelRoute]"
-            :src="'https://smartpark.caih.com/dmapi/archive/' + scope.row.spotLabelRoute">
+            :preview-src-list="[baseApi+'archive/' + scope.row.spotLabelRoute]"
+            :src="baseApi+'archive/' + scope.row.spotLabelRoute">
           </el-image>
       </template>
       </el-table-column>
@@ -60,8 +60,8 @@
           <el-image
             v-if="scope.row.pictureRoute"
             style="width: 24px; height: 24px"
-            :preview-src-list="['https://smartpark.caih.com/dmapi/archive/' + scope.row.pictureRoute]"
-            :src="'https://smartpark.caih.com/dmapi/archive/' + scope.row.pictureRoute">
+            :preview-src-list="[baseApi+'archive/' + scope.row.pictureRoute]"
+            :src="baseApi+'archive/' + scope.row.pictureRoute">
           </el-image>
       </template>
       </el-table-column>
@@ -185,6 +185,7 @@ export default {
   name: "Floor",
   data() {
     return {
+      baseApi:process.env.VUE_APP_BASE_API,
       exportLoading:false,
       // 显示搜索条件
       showSearch: true,

+ 3 - 2
src/views/business/OM/MochaITOM/route/index.vue

@@ -66,8 +66,8 @@
                 <el-image
                   v-if="scope.row.pictureRoute"
                   style="width: 24px; height: 24px"
-                  :preview-src-list="['https://smartpark.caih.com/dmapi/archive/' + scope.row.pictureRoute]"
-                  :src="'https://smartpark.caih.com/dmapi/archive/' + scope.row.pictureRoute">
+                  :preview-src-list="[baseApi+'/archive/' + scope.row.pictureRoute]"
+                  :src="baseApi+'archive/' + scope.row.pictureRoute">
                 </el-image>
             </template>
             </el-table-column>
@@ -105,6 +105,7 @@ export default {
   name: "Floor",
   data() {
     return {
+      baseApi:process.env.VUE_APP_BASE_API,
       loading:true,
       loading2:true,
       exportLoading:false,

+ 1 - 1
src/views/business/deviceMange/deviceApi/index.vue

@@ -432,7 +432,7 @@ export default {
     FileDownload(row){
       row.loading = true;
       let link = document.createElement('a')
-      fetch(`https://smartpark.caih.com/dmapi/archive/${row.interfaceFileRoute}`).then(res => res.blob()).then(blob => { // 将链接地址字符内容转变成blob地址
+      fetch(`${process.env.VUE_APP_BASE_API}archive/${row.interfaceFileRoute}`).then(res => res.blob()).then(blob => { // 将链接地址字符内容转变成blob地址
           link.href = URL.createObjectURL(blob)
           link.download = ''
           document.body.appendChild(link)

+ 3 - 2
src/views/business/propertyMange/index.vue

@@ -62,8 +62,8 @@
           <el-image
             v-if="scope.row.qrurl"
             style="width: 24px; height: 24px"
-            :preview-src-list="['https://smartpark.caih.com/dmapi/archive/' + scope.row.qrurl]"
-            :src="'https://smartpark.caih.com/dmapi/archive/' + scope.row.qrurl">
+            :preview-src-list="[baseApi+'archive/' + scope.row.qrurl]"
+            :src="baseApi+'archive/' + scope.row.qrurl">
           </el-image>
     </template>
     </el-table-column>
@@ -252,6 +252,7 @@ export default {
   name: "admin",
   data() {
     return {
+     baseApi:process.env.VUE_APP_BASE_API,
       base64:undefined,
       // 导出遮罩层
       exportLoading: false,

+ 1 - 1
src/views/components/index/index4.vue

@@ -36,7 +36,7 @@ export default {
   methods: {
     initWebSocket() {
       let arrData = [];
-      let wsUri = "wss://iot.usky.cn:55120";
+      let wsUri = "wss://'+process.env.VUE_APP_WEBSOCKET_API2+':55120";
       try {
           // if (typeof MozWebSocket == 'function')
               // WebSocket = MozWebSocket;

+ 2 - 2
src/views/index.vue

@@ -583,7 +583,7 @@ export default {
         this.getList();
         this.getCollect();
         this.yhTable();
-        // this.initWebSocket();
+        this.initWebSocket();
         this.getBuild();
     },
     mounted() {},
@@ -979,7 +979,7 @@ export default {
                     //console.log("连接已关闭...");
                     //断线重新连接
                     setTimeout(() => {
-                        // this.initWebSocket();
+                        this.initWebSocket();
                     }, 2000);
                 };
             } else {

+ 3 - 2
src/views/system/product/index.vue

@@ -34,8 +34,8 @@
           <el-image
             v-if="scope.row.logo"
             style="width: 50px; height: 50px"
-            :preview-src-list="['https://smartpark.caih.com/dmapi/archive/' + scope.row.logo]"
-            :src="'https://smartpark.caih.com/dmapi/archive/' + scope.row.logo">
+            :preview-src-list="[baseApi+'archive/' + scope.row.logo]"
+            :src="baseApi+'archive/' + scope.row.logo">
           </el-image>
     </template>
       </el-table-column>
@@ -115,6 +115,7 @@ export default {
   name: "admin",
   data() {
     return {
+      baseApi:process.env.VUE_APP_BASE_API,
       // 遮罩层
       loading: true,
       // 导出遮罩层

+ 1 - 1
src/views/system/user/profile/userAvatar.vue

@@ -86,7 +86,7 @@ export default {
   created(){
     let index=this.options.img.lastIndexOf("dxtop/");
     index=this.options.img.substring(index+5,index.length);
-    this.options.img = "https://smartpark.caih.com" + index
+    this.options.img = process.env.VUE_APP_BASE_API.substring(0,process.env.VUE_APP_BASE_API.length-7) + index
   },
   methods: {
     // 编辑头像