ソースを参照

旧版接口替换

haojianlong 4 年 前
コミット
8c63218b80

+ 14 - 4
src/api/scan/request.js

@@ -1820,13 +1820,19 @@ export function floorUpdate(param, success) {
 
 //楼层接口-----更新楼层轮廓
 export function floorUpdateOutline(param, success) {
-  let url = `${baseUrl}${floor}/outline/update`;
+  // 上边一个为新接口
+  // let url = `${baseUrl}${floor}/outline/update`;
+  // 这个旧接口,需要改回旧接口12-14
+  let url = `${baseUrl}${floor}/update-outline`;
   http.postJson(url, param, success)
 }
 
 //楼层接口-----查询楼层轮廓
 export function floorQueryOutline(param, success) {
-  let url = `${baseUrl}${floor}/outline/query`;
+  // 上边一个为新接口
+  // let url = `${baseUrl}${floor}/outline/query`;
+  // 这个旧接口,需要改回旧接口12-14
+  let url = `${baseUrl}${floor}/query-outline`;
   http.postJson(url, param, success)
 }
 
@@ -2316,13 +2322,17 @@ export function zoneQuery(param, success) {
 
 //查询分区对象轮廓线
 export function zoneQueryOutline(param, success) {
-  let url = `${baseUrl}${object}/zone/outline/query`
+  let url = `${baseUrl}${object}/zone/query-outline`
+  // 12-14 接口改回之前
+  // let url = `${baseUrl}${object}/zone/outline/query`
   http.postJson(url, param, success)
 }
 
 //更新分区对象轮廓线
 export function zoneUpdateOutline(param, success) {
-  let url = `${baseUrl}${object}/zone/outline/update`
+  // let url = `${baseUrl}${object}/zone/outline/update`
+  // 12-14 接口改回之前
+  let url = `${baseUrl}${object}/zone/update-outline`
   http.postJson(url, param, success)
 }
 

+ 6 - 4
src/components/business_space/newGraphy/graphy.vue

@@ -293,7 +293,7 @@
       zone.selected = true;
       this.curZoneItem = zone;
       this.zoneDisable = false;
-      this.view.fitSelectedToView();
+      this.view.fitSelectedToView(0.1);
     },
     // 父组件调用
     getData(buildFloor, FloorObj, tab) {
@@ -403,7 +403,7 @@
       this.canvasLoading = true
       let ObjectType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
       let pa = {
-        cascader: [{name: 'spaceOutline'}],
+        // cascader: [{name: 'spaceOutline'}],
         zoneType: ObjectType,
         filters: `not id isNull`,
         orders: "createTime desc, id asc",
@@ -413,7 +413,9 @@
         pa.BuildingId = this.buildFloor[0];
         pa.FloorId = this.buildFloor[1];
       }
-      zoneQuery(pa, res => {
+      // zoneQuery 
+      // zoneQueryOutline
+      zoneQueryOutline(pa, res => {
         // 类型需要重新获取,直接取pa.ZoneType
         let tempType = this.tab.code == 'OtherZone' ? this.OtherValue : this.tab.code;
         if (res.floorId == this.buildFloor[1] && res.zoneType == tempType) {
@@ -472,7 +474,7 @@
           this.curZoneItem = item;
           this.scene.clearZoneSelection();
           item.selected = true;
-          this.$emit('copyID', this.curZoneItem.data.id)
+          this.$emit('copyID', this.curZoneItem.data.RoomID)
         }
       }
     },

+ 4 - 4
src/views/ready/buildfloor/drawGraphy/drawFloor.vue

@@ -149,10 +149,10 @@ export default {
     getFloorData() {
       let pa = {
         filters: `id='${this.FloorID}'`,
-        cascader: [{ name: 'floorOutline' }]
+        // 根据接口调整
+        // cascader: [{ name: 'floorOutline' }]
       }
       // 先用 floorQuery 级联 floorOutline  以后与 floorQueryOutline 一块使用
-      console.log(this.urlModelId);
       const temp = this.urlModelId && this.urlModelId.split('.')[1].toLowerCase()
       if (temp == 'png' || temp == 'jpg') { //底图为图片且已经绑定过图片
         floorQueryAndSign(pa, res => {
@@ -163,8 +163,8 @@ export default {
           }
         })
       } else {
-        // floorQueryOutline
-        floorQuery(pa, res => {
+        // floorQuery
+        floorQueryOutline(pa, res => {
           this.floorData = res.content[0];
           if (this.floorData.infos && this.floorData.infos.floorMap) {
             this.getOtherFloorOutLine();