Browse Source

'需采集信息点默认选中设备类别'

zhangyu 4 years ago
parent
commit
19945be5a3
1 changed files with 8 additions and 6 deletions
  1. 8 6
      src/views/ready/collectsetting/index.vue

+ 8 - 6
src/views/ready/collectsetting/index.vue

@@ -134,7 +134,7 @@
     },
     data() {
       return {
-        value: "property",
+        value: "Equipment",
         stepActive: '0',
         options: [{
           label: "设备",
@@ -579,6 +579,7 @@
         this.active = "";
         this.searchVal = "";
         this.allFamily =[];
+        this.isLoading = true;
         if (this.value == "property") {
           queryFamilyAll(res => {
             this.allFamily = res.Content.map((item) => {
@@ -592,7 +593,6 @@
           })
         } else if (this.value == "space") {
           queryDictionaryHead({Filters: "parentId = 'Space';Code != 'Ispace'"}, res => {
-            this.isLoading = false
             this.allFamily = res.Content.map(item => {
               return {
                 "code": item.Code,
@@ -600,21 +600,22 @@
               }
             })
             console.log(this.allFamily)
+            this.isLoading = false
             this.familySort();
           })
         } else if (this.value == "tenant") {
           this.allFamily = [{
             "code": "Tenant",
             "name": "租户"
-          }
-          ]
+          }]
+          this.isLoading = false
           this.familySort()
         } else if (this.value == "shaft") {
           this.allFamily = [{
             "code": "Shaft",
             "name": "竖井"
-          }
-          ]
+          }]
+          this.isLoading = false
           this.familySort()
         } else {
           queryPhysicsAllType(this.value, res => {
@@ -624,6 +625,7 @@
                 name: item.Name
               }
             })
+            this.isLoading = false
             this.familySort()
           })
         }