浏览代码

1、配置 MQTT_SERVICE 的使用暂时屏蔽掉,即厂商库的使用屏蔽掉
2、BASE_URL 的配置放到 static/systemConf.js里

niuheng 3 年之前
父节点
当前提交
fb953b9288

+ 3 - 3
config/dev.env.js

@@ -10,8 +10,8 @@ module.exports = merge(prodEnv, {
   //   SSO_SERVER: '"http://192.168.64.18:9988/persagysso/"', //单点登录开发测试环境地址(自研)
   //   BASE_URL: '"http://192.168.64.18"', //iframe开发测试环境地址
   //   MQTT_SERVICE: '"ws://192.168.64.18:61614/stomp/"', //MQ开发测试环境地址
-  SSO_SERVER: '"http://39.102.40.239/persagysso/"', //单点登录生产环境地址(自研)
-  BASE_URL: '"http://39.102.40.239"', //iframe生产地址
-  MQTT_SERVICE: '"ws://39.102.40.239/stomp/"', //MQ生产环境地址
+  // SSO_SERVER: '"http://39.102.40.239/persagysso/"', //单点登录生产环境地址(自研)
+  // BASE_URL: '"http://39.102.40.239"', //iframe生产地址
+  // MQTT_SERVICE: '"ws://39.102.40.239/stomp/"', //MQ生产环境地址
   NO_LOGIN: '"false"' //是否免登陆(true/false)
 })

+ 3 - 3
config/prod.env.js

@@ -4,8 +4,8 @@ module.exports = {
 //   SSO_SERVER: '"http://192.168.64.18:9988/persagysso/"', //单点登录开发测试环境地址(自研)
 //   BASE_URL: '"http://192.168.64.18"', //iframe开发测试环境地址
 //   MQTT_SERVICE: '"ws://192.168.64.18:61614/stomp/"', //MQ开发测试环境地址
-    SSO_SERVER: '"http://39.102.40.239/persagysso/"', //单点登录生产环境地址(自研)
-    BASE_URL: '"http://39.102.40.239"', //iframe生产地址
-    MQTT_SERVICE: '"ws://39.102.40.239/stomp/"', //MQ生产环境地址
+    // SSO_SERVER: '"http://39.102.40.239/persagysso/"', //单点登录生产环境地址(自研)
+    // BASE_URL: '"http://39.102.40.239"', //iframe生产地址
+    // MQTT_SERVICE: '"ws://39.102.40.239/stomp/"', //MQ生产环境地址
   NO_LOGIN: '"false"' //是否免登陆(true/false)
 }

+ 209 - 181
src/components/business_space/dialogs/detailsDialog.vue

@@ -1,191 +1,219 @@
 <template>
-    <el-dialog :visible.sync="isShow.details" :width="width">
-        <span slot="title">
-          <span v-show="step == 1">{{title}}</span>
-        <span v-show="step == 2 || step == 3">
-            <el-button type="text" @click="goBack" icon="el-icon-arrow-left"></el-button>
-          </span>
+  <el-dialog :visible.sync="isShow.details" :width="width">
+    <span slot="title">
+      <span v-show="step == 1">{{ title }}</span>
+      <span v-show="step == 2 || step == 3">
+        <el-button
+          type="text"
+          @click="goBack"
+          icon="el-icon-arrow-left"
+        ></el-button>
+      </span>
+    </span>
+    <div id="detailsDialog" v-show="step == 1">
+      <p class="influence-p">{{ list.name }}</p>
+      <el-tabs type="border-card">
+        <el-tab-pane label="空间详情">
+          <div class="saga-details">
+            <iframe
+              height="400px"
+              v-if="isShow.details"
+              width="100%"
+              :src="iframeSrc"
+            ></iframe>
+          </div>
+        </el-tab-pane>
+        <el-tab-pane label="与空间相关联的设备">
+          <div>
+            <equip-table ref="myEquip"></equip-table>
+          </div>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+    <div v-show="step == 2">
+      <add-equip :activeTabType="activeTabType" ref="addEquip"></add-equip>
+    </div>
+    <div id="detailsDialog" v-if="step == 3">
+      <iframe
+        v-if="step == 3"
+        height="400px"
+        width="100%"
+        :src="iframeSrc2"
+      ></iframe>
+    </div>
+    <div v-show="step == 1" style="line-height: 50px">
+      <el-button @click="step = 3">编辑信息</el-button>
+      <el-button type="danger" @click="delSpace" plain
+        >删除该业务空间</el-button
+      >
+      <el-dropdown
+        style="margin-left: 10px"
+        :hide-on-click="false"
+        @command="addMyEquip"
+      >
+        <span class="el-dropdown-link">
+          添加设备<i class="el-icon-arrow-down el-icon--right"></i>
         </span>
-        <div id="detailsDialog" v-show="step == 1">
-            <p class="influence-p">{{list.name}}</p>
-            <el-tabs type="border-card">
-                <el-tab-pane label="空间详情">
-                    <div class="saga-details">
-                        <iframe height="400px" v-if="isShow.details" width="100%" :src="iframeSrc"></iframe>
-                    </div>
-                </el-tab-pane>
-                <el-tab-pane label="与空间相关联的设备">
-                    <div>
-                        <equip-table ref="myEquip"></equip-table>
-                    </div>
-                </el-tab-pane>
-            </el-tabs>
-        </div>
-        <div v-show="step == 2">
-            <add-equip :activeTabType="activeTabType" ref="addEquip"></add-equip>
-        </div>
-        <div id="detailsDialog" v-if="step == 3">
-            <iframe v-if="step == 3" height="400px" width="100%" :src="iframeSrc2"></iframe>
-        </div>
-        <div v-show="step == 1" style="line-height: 50px;">
-            <el-button @click="step = 3">编辑信息</el-button>
-            <el-button type="danger" @click="delSpace" plain>删除该业务空间</el-button>
-            <el-dropdown style="margin-left: 10px;" :hide-on-click="false" @command="addMyEquip">
-                <span class="el-dropdown-link">
-                    添加设备<i class="el-icon-arrow-down el-icon--right"></i>
-                </span>
-                <el-dropdown-menu slot="dropdown">
-                    <el-dropdown-item command="EquipinSpace">空间内的设备</el-dropdown-item>
-                    <el-dropdown-item command="EquipforSpace">服务于空间的设备</el-dropdown-item>
-                    <el-dropdown-item command="EquipXSpace">其他关系的设备</el-dropdown-item>
-                </el-dropdown-menu>
-            </el-dropdown>
-        </div>
-    </el-dialog>
+        <el-dropdown-menu slot="dropdown">
+          <el-dropdown-item command="EquipinSpace"
+            >空间内的设备</el-dropdown-item
+          >
+          <el-dropdown-item command="EquipforSpace"
+            >服务于空间的设备</el-dropdown-item
+          >
+          <el-dropdown-item command="EquipXSpace"
+            >其他关系的设备</el-dropdown-item
+          >
+        </el-dropdown-menu>
+      </el-dropdown>
+    </div>
+  </el-dialog>
 </template>
 
 <script>
-    import { zoneCreate } from "@/api/scan/request";
-    import equipTable from "@/components/business_space/table/equipTable";
-    import addEquip from "@/components/business_space/table/addEquip";
-    import {
-        mapGetters,
-        mapActions
-    } from "vuex";
-    export default {
-        components: {
-            equipTable,
-            addEquip
-        },
-        computed: {
-            ...mapGetters("layout", [
-                "projectId",
-                "secret",
-                "userId"
-            ])
-        },
-        props: {
-            width: {
-                type: String,
-                default: "1200px"
-            },
-            title: {
-                type: String,
-                default: "头部信息"
-            },
-            isShow: {
-                type: Object
-            },
-            param: {
-                type: Object
-            },
-            activeTabType: {
-                type: Object,
-                default: function() {
-                    return {
-                        "code": "GeneralZone",
-                        "name": "默认分区",
-                        "rel_type": "99"
-                    }
-                }
-            }
-        },
-        data() {
-            return {
-                step: 1,
-                data: null,
-                proj: null,
-                activeName: "1",
-                list: {},
-                iframeSrc: "",
-                iframeSrc2: "",
-                buildMess: ""
-            };
-        },
-        created() {},
-        methods: {
-            handleClick() {},
-            getData(list, buildMess) {
-                this.step = 1;
-                this.list = list;
-                this.buildMess = buildMess;
-                this.$nextTick(() => {
-                    this.$refs.myEquip.getData(list, this.activeTabType);
-                });
-                let perjectId = this.projectId,
-                    secret = this.secret;
-                this.iframeSrc =
-                    process.env.BASE_URL +
-                    ":8889/#/details?perjectId=" +
-                    perjectId +
-                    "&secret=" +
-                    secret +
-                    "&FmId=" +
-                    list.id +
-                    "&type=0&code=" + this.activeTabType.code;
-                this.iframeSrc2 =
-                    process.env.BASE_URL +
-                    ":8889/#/changeMess?perjectId=" +
-                    perjectId +
-                    "&secret=" +
-                    secret +
-                    "&id=" +
-                    list.id +
-                    "&type=" + this.activeTabType.code;
-            },
-            addMyEquip(str) {
-                this.step = 2;
-                this.$nextTick(() => {
-                    console.log(this.activeTabType)
-                    this.$refs.addEquip.getData(this.list, this.buildMess, str, this.activeTabType);
-                });
-            },
-            goBack() {
-                this.step = 1;
-                this.$refs.myEquip.getData(this.list, this.activeTabType);
-            },
-            delSpace() {
-                this.$confirm("此操作将永久删除该业务空间, 是否继续?", "删除", {
-                        confirmButtonText: "确定",
-                        cancelButtonText: "取消",
-                        type: "warning"
-                    })
-                    .then(() => {
-                        let param = [{RoomID: this.list.id}];
-                        zoneCreate(param, res => {
-                            if (res.Result == 'success') {
-                                this.$message({ type: "success",  message: "删除成功!" })
-                                this.$emit("del")
-                            }
-                        })
-                    })
-                    .catch(() => {
-                        this.$message({
-                            type: "info",
-                            message: "已取消删除"
-                        });
-                    });
-            }
-        }
+import { zoneCreate } from "@/api/scan/request";
+import equipTable from "@/components/business_space/table/equipTable";
+import addEquip from "@/components/business_space/table/addEquip";
+import { mapGetters, mapActions } from "vuex";
+export default {
+  components: {
+    equipTable,
+    addEquip,
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
+  props: {
+    width: {
+      type: String,
+      default: "1200px",
+    },
+    title: {
+      type: String,
+      default: "头部信息",
+    },
+    isShow: {
+      type: Object,
+    },
+    param: {
+      type: Object,
+    },
+    activeTabType: {
+      type: Object,
+      default: function () {
+        return {
+          code: "GeneralZone",
+          name: "默认分区",
+          rel_type: "99",
+        };
+      },
+    },
+  },
+  data() {
+    return {
+      step: 1,
+      data: null,
+      proj: null,
+      activeName: "1",
+      list: {},
+      iframeSrc: "",
+      iframeSrc2: "",
+      buildMess: "",
     };
+  },
+  created() {},
+  methods: {
+    handleClick() {},
+    getData(list, buildMess) {
+      this.step = 1;
+      this.list = list;
+      this.buildMess = buildMess;
+      this.$nextTick(() => {
+        this.$refs.myEquip.getData(list, this.activeTabType);
+      });
+      let perjectId = this.projectId,
+        secret = this.secret;
+      this.iframeSrc =
+        // process.env.BASE_URL +
+        window.__systemConf.BASE_URL +
+        ":8889/#/details?perjectId=" +
+        perjectId +
+        "&secret=" +
+        secret +
+        "&FmId=" +
+        list.id +
+        "&type=0&code=" +
+        this.activeTabType.code;
+      this.iframeSrc2 =
+        // process.env.BASE_URL +
+        window.__systemConf.BASE_URL +
+        ":8889/#/changeMess?perjectId=" +
+        perjectId +
+        "&secret=" +
+        secret +
+        "&id=" +
+        list.id +
+        "&type=" +
+        this.activeTabType.code;
+    },
+    addMyEquip(str) {
+      this.step = 2;
+      this.$nextTick(() => {
+        console.log(this.activeTabType);
+        this.$refs.addEquip.getData(
+          this.list,
+          this.buildMess,
+          str,
+          this.activeTabType
+        );
+      });
+    },
+    goBack() {
+      this.step = 1;
+      this.$refs.myEquip.getData(this.list, this.activeTabType);
+    },
+    delSpace() {
+      this.$confirm("此操作将永久删除该业务空间, 是否继续?", "删除", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          let param = [{ RoomID: this.list.id }];
+          zoneCreate(param, (res) => {
+            if (res.Result == "success") {
+              this.$message({ type: "success", message: "删除成功!" });
+              this.$emit("del");
+            }
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+  },
+};
 </script>
 
 <style lang="less">
-    .el-dialog__header{
-        .el-dropdown{
-            font-size: 12px;
-            line-height: 33px;
-        }
-    }
-    #detailsDialog {
-        .el-tabs__content {
-            max-height: 400px;
-        }
-        .influence-p {
-            height: 40px;
-            line-height: 40px;
-            font-size: 17px;
-            margin-bottom: 10px;
-        }
-    }
+.el-dialog__header {
+  .el-dropdown {
+    font-size: 12px;
+    line-height: 33px;
+  }
+}
+#detailsDialog {
+  .el-tabs__content {
+    max-height: 400px;
+  }
+  .influence-p {
+    height: 40px;
+    line-height: 40px;
+    font-size: 17px;
+    margin-bottom: 10px;
+  }
+}
 </style>

+ 2 - 1
src/components/business_space/dialogs/list/systemType.vue

@@ -279,7 +279,8 @@ export default {
     //点击详情
     lookDeatils(infos) {
       this.iframeSrc =
-        process.env.BASE_URL +
+        // process.env.BASE_URL +
+        window.__systemConf.BASE_URL +
         ":8889/#/details?perjectId=" +
         this.projectId +
         "&secret=" +

+ 2 - 1
src/components/business_space/lib/lookImages.vue

@@ -154,7 +154,8 @@ export default {
       }
       if (this.picArrs.length) {
         this.$nextTick(_ => {
-          this.iframeSrc = process.env.BASE_URL + ":8890/photo-View.html"
+          this.iframeSrc = window.__systemConf.BASE_URL +":8890/photo-View.html"
+          // process.env.BASE_URL + ":8890/photo-View.html"
           // this.iframeSrc = process.env.BASE_URL + "/photo-View.html"
           let iframe = document.getElementById("google_ads_frame3")
           console.log(iframe)

+ 2 - 1
src/components/business_space/lib/uploadImgsName.vue

@@ -135,7 +135,8 @@ export default {
     //查看图片
     lookImg() {
       this.dialog.details = true
-      this.iframeSrc = process.env.BASE_URL + ":8890/photo-View.html"
+      this.iframeSrc = window.__systemConf.BASE_URL +":8890/photo-View.html"
+      //process.env.BASE_URL + ":8890/photo-View.html"
       // this.iframeSrc = process.env.BASE_URL + "/photo-View.html"
     },
 

+ 3 - 1
src/components/business_space/table/addEquip.vue

@@ -469,7 +469,9 @@ export default {
     lockDetails(row) {
       this.innerVisible = true;
       this.iframeSrc = this.iframeSrc =
-        process.env.BASE_URL + ":8889/#/details?perjectId=" +
+        // process.env.BASE_URL + 
+        window.__systemConf.BASE_URL +
+        ":8889/#/details?perjectId=" +
         this.projectId +
         "&secret=" +
         this.secret +

+ 3 - 1
src/components/business_space/table/equipTable.vue

@@ -334,7 +334,9 @@
                 this.innerVisible = true;
                 this.iframeSrc = this.iframeSrc =
                     // "http://172.16.0.181:8889/#/details?perjectId=" +
-                    process.env.BASE_URL + ":8889/#/details?perjectId=" +
+                    // process.env.BASE_URL + 
+                    window.__systemConf.BASE_URL +
+                    ":8889/#/details?perjectId=" +
                     this.projectId +
                     "&secret=" +
                     this.secret +

+ 4 - 2
src/components/dialogs/detailsDialog.vue

@@ -117,7 +117,8 @@ export default {
       let perjectId = this.projectId,
         secret = this.secret;
       this.iframeSrc =
-        process.env.BASE_URL +
+        // process.env.BASE_URL +
+        window.__systemConf.BASE_URL +
         ":8889/#/details?perjectId=" +
         perjectId +
         "&secret=" +
@@ -126,7 +127,8 @@ export default {
         list.id +
         "&type=0&code=" + this.activeTabType.code;
       this.iframeSrc2 =
-        process.env.BASE_URL +
+        // process.env.BASE_URL +
+        window.__systemConf.BASE_URL +
         ":8889/#/changeMess?perjectId=" +
         perjectId +
         "&secret=" +

+ 4 - 1
src/components/ledger/details/detail/lookImage.vue

@@ -58,7 +58,10 @@ export default {
     //查看图片
     lookImg() {
       this.dialog.details = true
-      this.iframeSrc = process.env.BASE_URL + ":8890/photo-View.html"
+      this.iframeSrc =
+      //  process.env.BASE_URL +
+      window.__systemConf.BASE_URL +
+       ":8890/photo-View.html"
       // this.iframeSrc = process.env.BASE_URL + "/photo-View.html"
     },
 

+ 4 - 1
src/components/ledger/lib/lookImages.vue

@@ -154,7 +154,10 @@
       }
       if (this.picArrs.length) {
         this.$nextTick(_ => {
-          this.iframeSrc = process.env.BASE_URL + ":8890/photo-View.html"
+          this.iframeSrc = 
+          window.__systemConf.BASE_URL +
+          // process.env.BASE_URL + 
+          ":8890/photo-View.html"
           // this.iframeSrc = process.env.BASE_URL + "/photo-View.html"
           let iframe = document.getElementById("google_ads_frame3")
           console.log(iframe)

+ 4 - 1
src/components/ledger/lib/uploadImgs.vue

@@ -107,7 +107,10 @@ export default {
       //查看图片
       lookImg() {
         this.dialog.details = true
-        this.iframeSrc = process.env.BASE_URL + ":8890/photo-View.html"
+        this.iframeSrc = 
+        // process.env.BASE_URL + 
+        window.__systemConf.BASE_URL +
+        ":8890/photo-View.html"
         // this.iframeSrc = process.env.BASE_URL + "/photo-View.html"
       },
       //删除图片

+ 4 - 1
src/components/ledger/lib/uploadImgsName.vue

@@ -122,7 +122,10 @@ export default {
     //查看图片
     lookImg() {
       this.dialog.details = true
-      this.iframeSrc = process.env.BASE_URL + ":8890/photo-View.html"
+      this.iframeSrc = 
+      // process.env.BASE_URL + 
+      window.__systemConf.BASE_URL +
+      ":8890/photo-View.html"
       // this.iframeSrc = process.env.BASE_URL + "/photo-View.html"
     },
 

+ 7 - 1
src/framework/components/messagesever/index.vue

@@ -83,7 +83,9 @@ export default {
   components: {},
   data() {
     return {
-      client: Stomp.client(MQTT_SERVICE),
+      // client: Stomp.client(MQTT_SERVICE),
+      //---------------------------2021.11.15 改为null nh
+      client: null,
       unreadNum: 0,
       noticeListShow: false,//是否显示消息列表
       sendMessage: '',
@@ -159,6 +161,8 @@ export default {
       }
     },
     connect() {
+      //--------------------------2021.11.15 加上return nh
+      return;
       this.client = Stomp.client(MQTT_SERVICE)
       this.client.reconnect_delay = 5000
       var clientid = `sagaMQ-${this.userInfo.userName}-${new Date().getTime()}`
@@ -170,6 +174,8 @@ export default {
       this.client.connect(headers, this.onConnected, this.onFailed)
     },
     onConnected(frame) {
+      //--------------------------2021.11.15 加上return nh
+      return;
       console.log('Connected: ' + frame)
       //订阅多个消息
       this.topics.forEach(item => {

+ 6 - 2
src/views/data_admin/buildData/index.vue

@@ -1139,7 +1139,9 @@ export default {
       }
       if (this.tablePicArr.Pic && this.tablePicArr.Pic.length) {
         this.dragSrc =
-          process.env.BASE_URL + ":8890/photo-View.html?type=" +
+          // process.env.BASE_URL + 
+          window.__systemConf.BASE_URL +
+          ":8890/photo-View.html?type=" +
           // process.env.BASE_URL + "/photo-View.html?type=" +
           // "http://172.16.0.181:8890/photo-View.html?type=" +
           this.tablePicArr.Pic[0].type +
@@ -1226,7 +1228,9 @@ export default {
     //点击图片查看大图
     seeBig(key, name, type) {
       this.dragSrc =
-        process.env.BASE_URL + ":8890/photo-View.html?type=" +
+        // process.env.BASE_URL + 
+        window.__systemConf.BASE_URL +
+        ":8890/photo-View.html?type=" +
         // process.env.BASE_URL + "/photo-View.html?type=" +
         type +
         "&key=" +

+ 4 - 1
src/views/data_admin/buildGraphy/lib/lookImages.vue

@@ -153,7 +153,10 @@ export default {
       }
       if (this.picArrs.length) {
         this.$nextTick(_ => {
-          this.iframeSrc = process.env.BASE_URL + ":8890/photo-View.html"
+          this.iframeSrc = 
+          // process.env.BASE_URL + 
+          window.__systemConf.BASE_URL +
+          ":8890/photo-View.html"
           // this.iframeSrc = process.env.BASE_URL + "/photo-View.html"
           let iframe = document.getElementById("google_ads_frame3")
           console.log(iframe)

+ 4 - 1
src/views/data_admin/buildGraphy/lib/uploadImgsName.vue

@@ -120,7 +120,10 @@ export default {
     //查看图片
     lookImg() {
       this.dialog.details = true
-      this.iframeSrc = process.env.BASE_URL + ":8890/photo-View.html"
+      this.iframeSrc = 
+      // process.env.BASE_URL + 
+      window.__systemConf.BASE_URL +
+      ":8890/photo-View.html"
       // this.iframeSrc = process.env.BASE_URL + "/photo-View.html"
     },
 

+ 2 - 1
src/views/ledger/spacelist/spaceDetail/index.vue

@@ -551,7 +551,8 @@ export default {
     },
     // 设置iframe
     setFrame() {
-      this.iframeSrc = `${process.env.BASE_URL}:8889/#/changeMess?perjectId=${this.projectId}&secret=${this.secret}&id=${this.params.RoomID}&type=${this.params.zone}`;
+      this.iframeSrc = `${window.__systemConf.BASE_URL}:8889/#/changeMess?perjectId=${this.projectId}&secret=${this.secret}&id=${this.params.RoomID}&type=${this.params.zone}`;
+      // `${process.env.BASE_URL}:8889/#/changeMess?perjectId=${this.projectId}&secret=${this.secret}&id=${this.params.RoomID}&type=${this.params.zone}`;
       // this.iframeSrc = this.params.isMyTab == 2 ?
       //   `${process.env.BASE_URL}:8889/#/details?perjectId=${this.projectId}&secret=${this.secret}&FmId=${this.params.RoomID}&type=0&code=${this.params.zone}`
       //   : `${process.env.BASE_URL}:8889/#/changeMess?perjectId=${this.projectId}&secret=${this.secret}&id=${this.params.RoomID}&type=${this.params.zone}`;

+ 2 - 1
static/systemConf.js

@@ -121,6 +121,7 @@ var __systemConf = {
       pwd: "saga123456",
       group_code: "WD"
     }
-  ]
+  ],
+  BASE_URL: '"http://39.102.40.239"', //iframe生产地址
 };
 window.__systemConf = __systemConf;