소스 검색

添加项目监听

chuwu 5 년 전
부모
커밋
89738759ea

+ 12 - 3
src/components/business_space/business/handsontable.vue

@@ -85,12 +85,15 @@
              };
          },
          created() {
-             this.param.ProjId = this.projectId
-             this.param.UserId = this.userId
-             this.param.secret = this.secret
+             this.setData()
          },
          mounted() {},
          methods: {
+             setData(){
+                 this.param.ProjId = this.projectId
+                this.param.UserId = this.userId
+                this.param.secret = this.secret
+             },
              //获取表头
              getHeader(headers, activeTabType) {
                  this.headers = headers.map(item => {
@@ -617,6 +620,12 @@
                      array.slice(offset, array.length) :
                      array.slice(offset, offset + pageSize);
              }
+         },
+         watch: {
+             projectId(){
+                 this.setData()
+                 this.main = null
+             }
          }
      };
 </script>

+ 9 - 0
src/components/business_space/graphy/business.vue

@@ -1243,6 +1243,15 @@
                     return str || "--";
                 }
             }
+        },
+        watch: {
+            projectId(){
+                this.buildMess = null
+                this.param.ProjId = this.projectId
+                this.param.secret = this.secret
+                this.param.UserId = this.userId
+                this.hasMap = false
+            }
         }
     };
 </script>

+ 11 - 11
src/views/business_space/business_list/index.vue

@@ -124,7 +124,7 @@
                     name: "--",
                     code: "",
                     selectd: [],
-                    map: "Fl110108000327d8f006c39f49feb40e24a7ef223232181009102258bim.json",
+                    map: "",
                     isChild: true,
                     buildName: "--",
                     buildCode: ""
@@ -146,14 +146,17 @@
             };
         },
         created() {
-            this.param.ProjId = this.projectId
-            this.param.UserId = this.userId
-            this.param.secret = this.secret
-            this.getFloor()
-            this.getTypes()
+            this.changeData()
         },
         mounted() {},
         methods: {
+            changeData(){
+                this.param.ProjId = this.projectId
+                this.param.UserId = this.userId
+                this.param.secret = this.secret
+                this.getFloor()
+                this.getTypes()
+            },
             changeRadio(){
                 if(!this.buildMess.selectd.length){
                     this.$message("请选择楼层")
@@ -281,6 +284,7 @@
             },
             close() {
                 this.buildMess = this.changeBuildMess(this.buildMess,this.options)
+                console.log(this.buildMess,'this.buildMess')
                 if (this.buildMess.affected) {
                     this.floor.influence = true;
                     this.$nextTick(() => {
@@ -404,11 +408,7 @@
                 }
             },
             projectId(){
-                this.param.ProjId = this.projectId
-                this.param.UserId = this.userId
-                this.param.secret = this.secret
-                this.getFloor()
-                this.getTypes()
+                this.changeData()
             }
         }
     };

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 899 - 918
src/views/data_admin/buildGraphy/graphyCanvas.vue


+ 5 - 0
src/views/data_admin/buildGraphy/graphyTabs.vue

@@ -375,6 +375,11 @@ getLocation 定位
                         this.getPointList();
                     }
                 }
+            },
+            projectId(){
+                this.pointData= []
+                this.pointNoData= []
+                this.activeName2 = "point"
             }
         }
     };

+ 10 - 0
src/views/data_admin/buildGraphy/index.vue

@@ -186,6 +186,16 @@
             getDetails(item) {
                 this.$refs.tabs.getDetails(item);
             }
+        },
+        watch: {
+            projectId(){
+                this. map = null
+                this.show = false
+                this.options = []
+                this.buildVlaue = []
+                this.changeValue()
+                this.getList()
+            }
         }
     };
 </script>

+ 8 - 1
src/views/point/config_point/edit_origin/index.vue

@@ -47,7 +47,7 @@
     } from "vuex";
     export default {
         computed: {
-            ...mapGetters("project", [
+            ...mapGetters("layout", [
                 "projectId"
             ])
         },
@@ -173,6 +173,13 @@
                     })
                 }
             },
+        },
+        watch: {
+            projectId(){
+                this.$router.push({
+                    path: '/point/pointsetting'
+                })
+            }
         }
     }
 </script>

+ 10 - 1
src/views/point/config_point/index.vue

@@ -17,6 +17,10 @@
                         </div>
                     </data-origin>
                 </div>
+                <div v-if="!list.length" class="center" style="margin-top: 260px;">
+                    <i class="iconwushuju iconfont"></i>
+                    暂无数据
+                </div>
                 <!-- <div class="disIne saga-list-item margin5 center pointer" @click="addItem">
                     <i class="add-icon margin50">+</i>
                 </div> -->
@@ -45,7 +49,7 @@
             }
         },
         computed: {
-            ...mapGetters("project", [
+            ...mapGetters("layout", [
                 "projectId"
             ])
         },
@@ -96,6 +100,11 @@
                     path: "pointSteps",
                 })
             }
+        },
+        watch: {
+            projectId(){
+                this.getList()
+            }
         }
     }
 </script>

+ 10 - 0
src/views/point/config_point/steps/index.vue

@@ -50,6 +50,9 @@
         computed: {
             ...mapGetters("project", [
                 "dataName"
+            ]),
+            ...mapGetters("layout", [
+                "projectId"
             ])
         },
         created() {
@@ -103,6 +106,13 @@
             step3,
             step4
         },
+        watch: {
+            projectId(){
+                this.$router.push({
+                    path: '/point/pointsetting'
+                })
+            }
+        }
     }
 </script>
 <style lang="scss">

+ 24 - 3
src/views/project_setting/collection_setting/index.vue

@@ -43,7 +43,7 @@
                     </div>
                 </div>
             </div>
-            <div class="right_main middle_sty" v-loading="rightLoading">
+            <div class="right_main" v-loading="rightLoading">
                 <el-tabs v-if="labelKey.length && tabsFalg" tab-position="left" style="height: 100%;">
                     <el-tab-pane v-for="(item,index) in labelKey" :key="index">
                         <span slot="label">{{item.FirstTag || '信息'}}</span>
@@ -55,7 +55,7 @@
                         </div>
                     </el-tab-pane>
                 </el-tabs>
-                <div v-else class="center">
+                <div v-else class="center" style="margin-top:260px;">
                     <i class="iconwushuju iconfont"></i> 请选择设备族
                 </div>
             </div>
@@ -80,6 +80,10 @@
         getEqCode,
         getBussTypes
     } from "@/api/scan/request";
+    import {
+         mapGetters,
+         mapActions
+     } from "vuex";
     export default {
         name: "family",
         components: {
@@ -110,7 +114,7 @@
                 code: '',
                 letterArr: [], //出现的a-z字符
                 UserId: "18612660722", //用户id
-                ProjId: "Pj4201050001", //项目id
+                ProjId: "", //项目id
                 labelKey: [], // 右侧主体数据承接数组
                 searchArr: [], // 搜索后的数据
                 searchVal: "", //搜索内容
@@ -496,6 +500,13 @@
                 }
             };
         },
+        computed: {
+             ...mapGetters("layout", [
+                 "projectId",
+                 "secret",
+                 "userId"
+             ])
+         },
         created() {
             this.getAllFamily();
         },
@@ -505,6 +516,7 @@
             },
             //获取所有设备族
             getAllFamily() {
+                this.ProjId = this.projectId
                 if (this.value == "property") {
                     getAllFamily().then(result => {
                         this.isLoading = false
@@ -810,6 +822,15 @@
                 }
                 return arrRslt;
             }
+        },
+        watch: {
+            projectId(){
+                this.getAllFamily()
+                this.main = null
+                this.active = ""
+                this.code = ""
+                this.tabsFalg = false
+            }
         }
     };
 </script>