Browse Source

业务空间台账 空间内设备 服务空间的设备 竖井接口

haojianlong 4 years ago
parent
commit
5525c7f064

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

@@ -397,9 +397,6 @@ export default {
           this.myDialog.uploadImgs = true;
         }
       }
-      console.log('=============');
-      console.log(inputData);
-      console.log('=============');
       if (!this.onlyRead && !inputData.editable) {
         this.$message("该信息点的值为自动生成,不可人工维护!");
         return false;

+ 11 - 11
src/components/ledger/cenote/relatedSpaceList.vue

@@ -73,32 +73,32 @@ export default {
       this.loading = true;
       let params = {
         data: {
-          Filters: "not RoomID isNull",
-          Orders: "localName desc",
-          PageNumber: this.page.pageNumber,
-          PageSize: this.page.pageSize
+          filters: "not id isNull",
+          orders: "localName desc",
+          pageNumber: this.page.pageNumber,
+          pageSize: this.page.pageSize
         },
         ShaftId: this.$route.query.ShaftId
       };
       if (this.Buildfloor[0] == "noKnow") {
-        params.data.Filters += `;buildingId isNull`;
+        params.data.filters += `;buildingId isNull`;
       } else if (this.Buildfloor[0] && this.Buildfloor[0] != "all") {
-        params.data.Filters += `;buildingId='${this.Buildfloor[0]}'`;
+        params.data.filters += `;buildingId='${this.Buildfloor[0]}'`;
       }
       if (this.Buildfloor[1] == "noKnow") {
-        params.data.Filters += `;floorId isNull`;
+        params.data.filters += `;floorId isNull`;
       } else if (this.Buildfloor[1] && this.Buildfloor[1] != "all") {
-        params.data.Filters += `;floorId='${this.Buildfloor[1]}'`;
+        params.data.filters += `;floorId='${this.Buildfloor[1]}'`;
       }
       if (this.space) {
-        params.data.Filters += `;ObjectType='${this.space}'`;
+        params.data.filters += `;objectType='${this.space}'`;
       }
       if (this.keyword) {
-        params.data.Filters += `;RoomName contain '${this.keyword}' or RoomLocalName contain '${this.keyword}'`;
+        params.data.filters += `;name contain '${this.keyword}' or localName contain '${this.keyword}'`;
       }
       shaftSpaceQuery(params, res => {
         this.loading = false;
-        this.tableData = res.Content
+        this.tableData = res.content
       })
     },
     //切换楼层

+ 17 - 15
src/views/ledger/cenotelist/relatedSpace.vue

@@ -3,7 +3,7 @@
     <div class="condition">
       <div class="header">
         <el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
-        <div class="edit-tool" v-if="!cenoteObj.onlyRead">
+        <div class="edit-tool" v-if="!(cenoteObj.onlyRead == 'true')">
           <el-button v-if="isMyTab == 2" size="small" style="float:right" @click="dialogVisible = true">添加</el-button>
           <div v-else>
             <el-button v-show="!isEdit" @click="changeEditType" size="small" style="float:right">编辑</el-button>
@@ -36,7 +36,7 @@
                        :value="item.BuildID"></el-option>
           </el-select>
         </el-badge>
-        <el-switch v-if="!cenoteObj.onlyRead" style="margin-left:15px;" v-model="isAI" @change="handleChangeAI"
+        <el-switch v-if="!(cenoteObj.onlyRead == 'true')" style="margin-left:15px;" v-model="isAI" @change="handleChangeAI"
                    active-text="打开AI">
         </el-switch>
         <div style="height:calc(100% - 42px);margin:10px 0 0 0;width:100%;">
@@ -59,7 +59,7 @@
             </el-col>
           </el-row>
           <div class="elevation-box">
-            <elevation-map ref="elevationMap" :onlyRead="cenoteObj.onlyRead" :isEdit="isEdit" :isAI="isAI"
+            <elevation-map ref="elevationMap" :onlyRead="cenoteObj.onlyRead=='true'" :isEdit="isEdit" :isAI="isAI"
                            @elevationChecked="handleCheckedSpace"
                            @elevationUncheck="handleUncheckSpace"
                            :params="{BuildingId: building, ObjectType: ObjectType, ShaftId: $route.query.ShaftId}">
@@ -84,7 +84,6 @@ import elevationMap from "@/components/ledger/cenote/elevationMap";
 import addSpaceDialog from '@/components/ledger/cenote/dialog/addSpaceDialog';
 import {
   queryAllZoneType,
-  // buildingQuery,
   shaftSpaceTypeQuery,
   shaftSpaceBuildingQuery,
   verticalSpace
@@ -120,10 +119,10 @@ export default {
       return this.$route.query;
     },
     showSpaceDot() {
-      return this.spaceList.length > 1 && this.cenoteObj.onlyRead ? true : false;
+      return this.spaceList.length > 1 && this.cenoteObj.onlyRead == 'true' ? true : false;
     },
     showBuildDot() {
-      return this.buildingList.length > 1 && this.cenoteObj.onlyRead ? true : false;
+      return this.buildingList.length > 1 && this.cenoteObj.onlyRead == 'true' ? true : false;
     },
     ...mapGetters("layout", ["projectId"])
   },
@@ -136,13 +135,14 @@ export default {
     elevationMap
   },
   created() {
-    this.isAI = this.$route.query.onlyRead ? false : true;
+    console.log(this.cenoteObj.onlyRead == 'true');
+    this.isAI = this.$route.query.onlyRead == 'true' ? false : true;
     this.getSpaceData();
   },
   methods: {
     //获取空间信息
     getSpaceData() {
-      if (this.cenoteObj.onlyRead) {
+      if (this.cenoteObj.onlyRead == 'true') {
         let pa = {
           shaftId: this.$route.query.ShaftId
         }
@@ -174,7 +174,13 @@ export default {
             }
             return t;
           });
-          this.space = [val2.content[0].objectType];
+          if (val2.content.length) {
+            this.space = [val2.content[0].objectType];
+          } else {
+            this.space = this.spaceList.find((item) => {
+              return item.Code == "GeneralZone"
+            }) ? ["GeneralZone"] : [this.spaceList[0].Code];
+          }
           this.ObjectType = this.space[0];
           //加载楼层信息
           this.loadBuildingData();
@@ -183,7 +189,7 @@ export default {
     },
     //默认显示默认分区,无默认分区显示第一个分区
     showDefaultSpace() {
-      if (this.spaceList.length && this.cenoteObj.onlyRead) {
+      if (this.spaceList.length && this.cenoteObj.onlyRead == 'true') {
         this.space = this.spaceList.find((item) => {
           return item.Code == "GeneralZone"
         }) ? ["GeneralZone"] : [this.spaceList[0].Code];
@@ -200,7 +206,7 @@ export default {
     },
     //获取楼层信息
     loadBuildingData() {
-      if (this.cenoteObj.onlyRead) {
+      if (this.cenoteObj.onlyRead == 'true') {
         let param = {
           ShaftId: this.$route.query.ShaftId,
           ObjectType: this.ObjectType
@@ -245,15 +251,11 @@ export default {
         this.$refs.relatedSpacelist.setFloorData(this.buildingList);
       }
       if (this.buildingList.length) {
-        // if (this.buildingList.length > 1 && this.cenoteObj.onlyRead) {
-        //   this.showBuildDot = true;
-        // }
         this.changeBuilding(this.buildingList[0].id);
       } else {
         this.buildingList = [];
         this.building = '';
         this.floor = '';
-        // this.showBuildDot = false;
       }
       this.buildingList.map(item => {
         if (item.id && item.BuildLocalName) {