Bläddra i källkod

修改业务空间创建接口

haojianlong 5 år sedan
förälder
incheckning
77170ffca4
2 ändrade filer med 13 tillägg och 7 borttagningar
  1. 1 1
      src/api/scan/request.js
  2. 12 6
      src/components/business_space/business/handsontable.vue

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

@@ -1316,7 +1316,7 @@ export function buildingQueryAndCount(param, success) {
 //创建分区信息
 export function createZone(param, success) {
     let data = param.data
-    let url = `${baseUrl}/datacenter/${zone[param.zone]}/create`;
+    let url = `${baseUrl}/datacenter/${zone[param.zone]}/create-bd-fl`;
     http.postJson(url, data, success)
 }
 

+ 12 - 6
src/components/business_space/business/handsontable.vue

@@ -344,13 +344,19 @@ export default {
         this.$message("新添加业务空间内容不能为空!")
         return
       }
-      if (this.buildFloorSelectd && this.buildFloorSelectd[0] && this.buildFloorSelectd[1]) {
-        param.BuildingId = this.buildFloorSelectd[0]
-        param.FloorId = this.buildFloorSelectd[1]
+      if (param.flowBuild) {
+        param.BuildingId = param.flowBuild.split('-')[0]
+        param.FloorId = param.flowBuild.split('-')[1] || null
+      } else {
+        if (this.buildFloorSelectd) {
+          if (this.buildFloorSelectd[0] != 'all' && this.buildFloorSelectd[0] != 'noKnow') {
+            param.BuildingId = this.buildFloorSelectd[0]
+          }
+          if (this.buildFloorSelectd[1] && this.buildFloorSelectd[1] != 'all' && this.buildFloorSelectd[1] != 'noKnow') {
+            param.FloorId = this.buildFloorSelectd[1]
+          }
+        }
       }
-      //  else if (this.buildMess.selectd && this.buildMess.selectd[0] && !this.buildMess.selectd[1]) {
-      //   param.BuildingId = this.buildMess.selectd[0]
-      // }
       let params = {
         zone: this.zoneCode,
         data: {