Browse Source

竖井关联业务空间

haojianlong 4 years ago
parent
commit
b45be24ff4

+ 1 - 1
src/api/scan/request.js

@@ -2114,7 +2114,7 @@ export function shaftZoneLink(param, success) {
 
 //关系-----竖井下的业务空间,竖井一对多,此方法会覆盖以前的记录
 export function shaftZoneLinkReplace(param, success) {
-  let url = `${baseUrl}${shContainSp}/link-shsps-replace?BuildingId=${param.BuildingId}&FloorId=${param.FloorId}&Type=${param.Type}`;
+  let url = `${baseUrl}${shContainSp}/link-shsps-replace?BuildingId=${param.buildingId}&FloorId=${param.floorId}&Type=${param.type}`;
   http.postJson(url, param.data, success)
 }
 

+ 3 - 5
src/components/ledger/cenote/elevationMap.vue

@@ -119,7 +119,6 @@
       })
     },
     handleClickCheck (sapceItem) { //点选推介的业务空间
-      console.log(this.isEdit)
       if (sapceItem.IsAI && this.isEdit && !this.onlyRead) { //是AI推荐并且编辑模式下
         sapceItem.checked = sapceItem.checked? false: true;
         if (sapceItem.checked) {
@@ -138,15 +137,14 @@
     },
     savaEdit () {// 接口保存数据和业务空间的关系
       let params = {
-        type: this.params.ObjectType,
+        type: this.params.objectType,
         data: {
-          ShaftId: this.params.ShaftId,
-          SpaceIdList: this.checkedList.map(item => {
+          shaftId: this.params.ShaftId,
+          spaceIdList: this.checkedList.map(item => {
             return item.RoomID
           })
         }
       }
-      console.log(params);
       shaftZoneLink(params, res =>{
         this.$message.success("保存成功");
         this.init();

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

@@ -137,7 +137,7 @@ export default {
       let promise1 = new Promise((resolve, reject) => {
         let params = {
           data: {
-            filters: `not id isNull;objectType = '${this.space}';buildingId = '${this.buildingData[0]}';floorId = '${this.buildingData[1]}'`,
+            filters: `not id isNull;classCode='${this.space}';buildingId='${this.buildingData[0]}';floorId='${this.buildingData[1]}'`,
             Orders: "localName desc"
           },
           ShaftId: this.$route.query.ShaftId
@@ -162,28 +162,28 @@ export default {
         })
       })
       Promise.all([promise1, promise2]).then(values => {
-        let relatedZone = values[0].Content;
-        let zoneData = values[1].Content;
+        let relatedZone = values[0].content;
+        let zoneData = values[1].content;
         this.relatedSpaceIdList = [];
         relatedZone.map(item => {
-          this.relatedSpaceIdList.push(item.RoomID);
+          this.relatedSpaceIdList.push(item.id);
         })
         // 所有业务空间
         this.businessSpaceList = zoneData;
         // 已关联元空间的业务空间
         this.BSPRelaISPList = [];
         zoneData.map(t => {
-          if (t.Outline && t.Outline.length) {
+          if (t.outline && t.outline.length) {
             this.BSPRelaISPList.push(t)
           }
         })
         // 绘制业务空间
         let tempArr = this.BSPRelaISPList.map((t, i) => {
-          if (t.FloorId == this.buildingData[1] && t.ObjectType == this.space) {
+          if (t.floorId == this.buildingData[1] && t.classCode == this.space) {
             return {
-              RoomLocalName: t.RoomLocalName,
-              OutLine: t.Outline,
-              RoomID: t.RoomID,
+              RoomLocalName: t.localName,
+              OutLine: t.outline,
+              RoomID: t.id,
               Color: colorArr[i % colorArr.length],
               HighLightFlag: relatedZone.findIndex((item) => (item.RoomID == t.RoomID)) > -1,
               Transparency: relatedZone.findIndex((item) => (item.RoomID == t.RoomID)) > -1 ? 20 : 1
@@ -239,15 +239,15 @@ export default {
     saveEdit() {
       let arr = this.scene.getSelectedZone();
       let param = {
-        BuildingId: this.buildingData[0],
-        FloorId: this.buildingData[1],
-        Type: this.space,
+        buildingId: this.buildingData[0],
+        floorId: this.buildingData[1],
+        type: this.space,
         data: {
-          ShaftId: this.$route.query.ShaftId,
-          SpaceIdList: []
+          shaftId: this.$route.query.ShaftId,
+          spaceIdList: []
         }
       }
-      param.data.SpaceIdList = arr.map(t => {
+      param.data.spaceIdList = arr.map(t => {
         return t.data.RoomID;
       })
       shaftZoneLinkReplace(param, res => {