Jelajahi Sumber

需采集信息点优化

zhangyu 4 tahun lalu
induk
melakukan
224527a2c3

+ 16 - 22
src/components/ledger/cenote/relatedSpaceList.vue

@@ -140,30 +140,24 @@ export default {
       if (val && val.length) {
         let bL = val.concat();
         bL.map(item => {
-          if (item.floor && item.floor.length) {
-
-          } else {
-            item.floor = []
-          }
-          if (!this.$route.query.onlyRead) {
-            item.floor.unshift({
-              id: "noKnow",
-              localName: "未明确建筑"
-            },{
-              id: "all",
-              localName: "全部"
-            })
-            bL.unshift({
-              id: "all",
-              localName: "全部"
-            }, {
-              id: "noKnow",
-              localName: "未明确建筑"
-            });
-          }
+          if (!(item.floor && item.floor.length))
+					item.floor = []
+					item.floor.unshift({
+						id: "all",
+						localName: "全部"
+					}, {
+						id: "noKnow",
+						localName: "未明确楼层"
+					})
         });
+				bL.unshift({
+					id: "all",
+					localName: "全部"
+				}, {
+					id: "noKnow",
+					localName: "未明确建筑"
+				})
         this.buildingData = bL;
-        console.log(this.buildingData);
       }
       else {
         this.buildingData = [];

+ 1 - 1
src/components/ledger/lib/cenoteGraphy.vue

@@ -73,7 +73,7 @@ export default {
   methods: {
     //获取楼层map
     getFloorMap(buildfloor, space) {
-      if (buildfloor.length == 2 && space && buildfloor[1] && buildfloor[0]) {
+      if (buildfloor.length == 2 && space && buildfloor[0] && buildfloor[1] && buildfloor[1] !== 'all' && buildfloor[1] !== 'noKnow') {
         this.buildingData = buildfloor
         let pa = {
           filters: `id='${this.buildingData[1]}'`

+ 14 - 26
src/views/ledger/cenotelist/relatedSpace.vue

@@ -206,30 +206,18 @@ export default {
     //获取楼层信息
     loadBuildingData() {
       if (this.cenoteObj.onlyRead == 'true') {
-        let param = {
-          shaftId: this.$route.query.ShaftId,
-          objectType: this.ObjectType
-        };
-        this.buildingLoading = true;
-        shaftSpaceBuildingQuery(param, res => {
-          this.buildingLoading = false;
-          this.buildingList = res.content;
-          this.buildingList = this.buildingList.map(item => {
-						debugger
-            item.floor = item.floorList;
-            item.BuildID = item.BuildingId;
-            item.BuildLocalName = item.BuildingLocalName;
-            if (item.Floor) {
-              item.Floor = item.Floor.map(item => {
-                item.FloorID = item.FloorId;
-                item.FloorLocalName = item.FloorLocalName;
-                return item;
-              })
-            }
-            return item;
-          })
-          this.handleBuildingData();
-        });
+				if (this.ObjectType) {
+					let param = {
+						shaftId: this.$route.query.ShaftId,
+						objectType: this.ObjectType
+					};
+					this.buildingLoading = true;
+					shaftSpaceBuildingQuery(param, res => {
+						this.buildingLoading = false;
+						this.buildingList = res.content;
+						this.handleBuildingData();
+					});
+				}
       } else {
         let param = {
           cascade: [
@@ -289,7 +277,7 @@ export default {
     },
     //更改业务空间类型
     changeSpace(val) {
-      this.ObjectType = val[0];
+      this.ObjectType = val[val.length - 1];
       this.floor = '';
       this.buildingList = [];
       this.building = '';
@@ -354,7 +342,7 @@ export default {
         }
       }
       if (this.spaceList.length) {
-        this.changeSpace(this.spaceList[0].code);
+        this.changeSpace([this.spaceList[0].code]);
         this.space = [this.spaceList[0].code]
       }
       this.isMyTab = val;

+ 16 - 31
src/views/ready/collectsetting/index.vue

@@ -84,16 +84,16 @@
               v-for="(tag,tagIndex) in item.details"
               :key="tagIndex"
             >
-              <p v-if="tag.SecondName">{{ tag.SecondName }}</p>
+              <p v-if="tag.secondName">{{ tag.secondName }}</p>
               <ul
-                v-for="(detail,detailInd) in tag.details"
-                :key="detailInd"
+                v-for="detail in tag.details"
+                :key="detail.code"
               >
                 <el-checkbox
-                  :title="detail.InfoPointName"
-                  :disabled="!detail.UnDisabled"
-                  v-model="detail.Visible"
-                  @change="boxChange(detail)">{{ detail.InfoPointName }}
+                  :title="detail.name"
+                  :disabled="!detail.unDisabled"
+                  v-model="detail.visible"
+                  @change="boxChange(detail)">{{ detail.name }}
                 </el-checkbox>
               </ul>
             </div>
@@ -677,9 +677,9 @@ export default {
     boxChange(detail) {
       let param = {
         content: [{
-          classCode: this.code,
-          code: detail.InfoPointCode,
-          visible: detail.Visible,
+          classCode: detail.classCode,
+          code: detail.code,
+          visible: detail.visible,
           groupCode: detail.groupCode,
           id: detail.id,
           projectId: detail.projectId,
@@ -773,15 +773,7 @@ export default {
           first[item.firstName] = []
         }
         first[item.firstName].push({
-          InfoPointName: item.name,
-          InfoPointCode: item.code,
-          Visible: item.visible,
-          UnDisabled: item.unDisabled,
-          SecondName: item.secondName ? item.secondName : '',
-          type: item.type,
-          classCode: item.classCode,
-          id: item.id,
-          groupCode: item.groupCode,
+          ...item
         })
       })
       //循环出第二级标签
@@ -792,19 +784,12 @@ export default {
           details: {}
         }
         first[key].map(item => {
-          if (!!obj.details[item.SecondName] && obj.details[item.SecondName].length) {
+          if (obj.details[item.secondName] && obj.details[item.secondName].length) {
           } else {
-            obj.details[item.SecondName] = []
+            obj.details[item.secondName] = []
           }
-          obj.details[item.SecondName].push({
-            InfoPointName: item.InfoPointName,
-            InfoPointCode: item.InfoPointCode,
-            Visible: item.Visible,
-            UnDisabled: item.UnDisabled,
-            type: item.type,
-            classCode: item.classCode,
-            id: item.id,
-            groupCode: item.groupCode,
+          obj.details[item.secondName].push({
+            ...item
           })
         })
         sound.push(obj)
@@ -818,7 +803,7 @@ export default {
             item.details = []
           }
           item.details.push({
-            SecondName: k,
+            secondName: k !== 'undefined'? k : '',
             details: copyarr[k]
           })
         }