Browse Source

替换业务空间接口;删除多余接口

haojianlong 5 years ago
parent
commit
c4c32a9828

+ 0 - 32
src/api/scan/request.js

@@ -1522,12 +1522,6 @@ export function buildingQueryAndCount(param, success) {
   http.postJson(url, param, success)
 }
 
-// 查询分区统计信息
-export function countObjZone(param, success) {
-  let url = `${baseUrl}/datacenter/object/zone/count`;
-  http.postJson(url, param, success)
-}
-
 // 查询建筑楼层-统计业务空间state
 export function queryBFloorWithState(param, success) {
   let url = `${baseUrl}/datacenter/object/zone/building-floor`;
@@ -1575,12 +1569,6 @@ export function countZone(param, success) {
   http.postJson(url, data, success)
 }
 
-//查询所有空间信息
-export function queryAllZone(param, success) {
-  let url = `${baseUrl}/datacenter/object/zone/query`;
-  http.postJson(url, param, success)
-}
-
 //查询空间信息父类
 export function queryParentZone(param, success) {
     let url = `${baseUrl}/datacenter/zonespacebase/query`;
@@ -1990,26 +1978,6 @@ export function zoneCount(param,success) {
   let url = `${baseUrl}/datacenter/object/zone/count`
   http.postJson(url,param,success)
 }
-//更新分区对象信息
-export function handleZoneUpdate(param,success) {
-  let url = `${baseUrl}/datacenter/object/zone/update`
-  http.postJson(url,param,success)
-}
-//查询空间信息
-export function searchZoneQuery(param,success) {
-  let url = `${baseUrl}/datacenter/object/zone/query`
-  http.postJson(url,param,success)
-}
-// 根据id删除分区对象
-export function handleZoneDelete(param,success) {
-  let url = `${baseUrl}/datacenter/object/zone/delete`
-  http.postJson(url,param,success)
-}
-//更新分区对象信息
-export function handleZoneObjectUpdate(param,success) {
-  let url = `${baseUrl}/datacenter/object/zone/update`
-  http.postJson(url,param,success)
-}
 //修改业务空间对象和建筑楼层的关系
 export function handleZoneUpdateBd(param,success) {
   let url = `${baseUrl}/datacenter/object/zone/update-fl-bd`

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

@@ -60,11 +60,11 @@
   import qrcode from "@/components/ledger/lib/qrcode";
   import {
     BeatchQueryParam,
-    handleZoneDelete,
-    handleZoneObjectUpdate,
+    zoneDelete,
+    zoneUpdate,
     handleZoneUpdateBd,
     queryAllZoneType,
-    searchZoneQuery,
+    zoneQuery,
     zoneCreate
   } from "@/api/scan/request";
   import {mapGetters} from "vuex";
@@ -206,7 +206,7 @@
     },
     //查询空间信息
     getZoneMessage(param) {
-      searchZoneQuery(param, res => {
+      zoneQuery(param, res => {
         this.page.total = res.Total;
         this.main = res.Content.map((item) => {
           if (item.hasOwnProperty("BuildingId") && item.hasOwnProperty("FloorId")) {
@@ -444,7 +444,7 @@
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        handleZoneDelete(param, res => {
+        zoneDelete(param, res => {
           this.$message.success("删除成功!")
           this.getData()
         })
@@ -582,7 +582,7 @@
         let updateParam = {
           Content: obj
         };
-        handleZoneObjectUpdate(updateParam, res => {
+        zoneUpdate(updateParam, res => {
           this.$message.success('更新成功')
         })
       }

+ 7 - 7
src/components/business_space/newGraphy/graphy.vue

@@ -123,9 +123,9 @@ import {
   groupCreRelaZoneAndISp,
   queryAllZoneType, // 定制分区类型
   zoneCreate,
-  searchZoneQuery,
-  handleZoneObjectUpdate,
-  countObjZone
+  zoneQuery,
+  zoneUpdate,
+  zoneCount
 } from "@/api/scan/request"
 
 export default {
@@ -372,7 +372,7 @@ export default {
         pa.BuildingId = this.buildFloor[0];
         pa.FloorId = this.buildFloor[1];
       }
-      searchZoneQuery(pa, res => {
+      zoneQuery(pa, res => {
         // 所有业务空间
         this.businessSpaceList = res.Content;
         // 已关联元空间的业务空间
@@ -727,7 +727,7 @@ export default {
         Content: [space],
         Projection: ['State']
       }
-      handleZoneObjectUpdate(pa, res => {
+      zoneUpdate(pa, res => {
         this.curZoneItem.isInfected = false;
         this.$emit('updateState');
         this.$message.success('更新成功');
@@ -988,7 +988,7 @@ export default {
       let pa = {
         Content: [zoneObj]
       }
-      handleZoneObjectUpdate(pa, res => {
+      zoneUpdate(pa, res => {
         this.relationInBSPandISP(zoneObj.RoomID, IspaceIdList)
       })
     },
@@ -997,7 +997,7 @@ export default {
       let pa = {
         Filters: `Outline isNull;ObjectType="${this.tab.code}"`
       }
-      countObjZone(pa, res => {
+      zoneCount(pa, res => {
         this.num = res.Count;
       })
     },

+ 2 - 2
src/components/business_space/newGraphy/unRelateBSP.vue

@@ -39,7 +39,7 @@
 <script>
 import {
   buildingQuery,
-  searchZoneQuery
+  zoneQuery
 } from "@/api/scan/request"
 export default {
   name: "unRelateBSP",
@@ -149,7 +149,7 @@ export default {
       if (this.keycode != '') {
         pa.Filters += `;RoomLocalName contain "${this.keycode}" or RoomName contain "${this.keycode}"`
       }
-      searchZoneQuery(pa, res => {
+      zoneQuery(pa, res => {
         this.page.total = res.Total;
         this.tableData = res.Content.map(t => {
           t.BNAME = this.bfData[t.BuildingId];

+ 2 - 2
src/components/business_space/newTables/syInSpaceTable.vue

@@ -37,7 +37,7 @@
 
 <script>
 import {
-  searchZoneQuery,
+  zoneQuery,
   syInSpaceDelete
 } from "@/api/scan/request";
 import { mapGetters } from "vuex";
@@ -106,7 +106,7 @@ export default {
         Filters: `RoomID="${this.params.RoomID}"`,
         ZoneType: this.params.zone
       }
-      searchZoneQuery(pa, res => {
+      zoneQuery(pa, res => {
         this.loading = false;
         this.tableData = res.Content[0].GeneralSystem || [];
         this.tableData.map(t => {

+ 2 - 2
src/components/point/dynamicdata/delRelationDialog.vue

@@ -83,7 +83,7 @@ import {
   floorQuery, //数据中心查询楼层
   buildingQuery, //数据中心建筑查询
   projectQuery, //数据中心查询项目信息
-  queryAllZone, //数据中心所有空间实例
+  zoneQuery, //数据中心所有空间实例
   queryLinkSys, //数据中心系统查询
   queryTenant, //数据中心查询租户
   partsQuery, //数据中心部件查询
@@ -296,7 +296,7 @@ export default {
               return undefined;
             }).filter(item => item);
             if (tempArr.length) {
-              queryAllZone({
+              zoneQuery({
                 PageSize: 500,
                 Filters: `RoomID in ${JSON.stringify(tempArr)}`,
                 Cascade: [{ Name: 'building' }, { Name: 'floor' }],

+ 4 - 3
src/components/point/dynamicdata/locationCascader.vue

@@ -8,7 +8,7 @@ import {
   buildingQuery, //数据中心查询建筑
   floorQuery, //数据中型查询楼层
   queryDictionaryHead, //数据中心查询分区类型
-  queryAllZone, //数据中心查询所有空间
+  zoneQuery, //数据中心查询所有空间
 } from "@/api/scan/request";
 import { mapGetters, mapActions } from "vuex";
 export default {
@@ -62,9 +62,10 @@ export default {
           } else if (node.level == 3) {
             let pa = {
               PageSize: 1000,
-              Filters: `BuildingId='${node.path[0]}';FloorId='${node.path[1]}';ObjectType='${node.path[2]}'`
+              ObjectType: node.path[2],
+              Filters: `BuildingId='${node.path[0]}';FloorId='${node.path[1]}'`
             };
-            queryAllZone(pa, res => {
+            zoneQuery(pa, res => {
               const nodes = res.Content.map(t => {
                 t.value = t.RoomID;
                 t.label = t.RoomLocalName;

+ 2 - 2
src/components/point/dynamicdata/spaceRules.vue

@@ -102,7 +102,7 @@ import {
   dynamicQuery,
   dynamicQueryPoint,
   dynamicPointTypeList,
-  queryAllZone, //数据中心所有空间实例
+  zoneQuery, //数据中心所有空间实例
 } from "@/api/scan/request";
 export default {
   computed: {
@@ -207,7 +207,7 @@ export default {
           return undefined;
         }).filter(item => item);
         if (tempArr.length) {
-          queryAllZone({
+          zoneQuery({
             PageSize: this.page.pageSize,
             Filters: `RoomID in ${JSON.stringify(tempArr)}`,
             Cascade: [{ Name: 'building' }, { Name: 'floor' }],

+ 2 - 2
src/components/point/report/objectInstance.vue

@@ -44,7 +44,7 @@ import {
   floorQuery, //数据中心查询楼层
   buildingQuery, //数据中心建筑查询
   projectQuery, //数据中心查询项目信息
-  queryAllZone, //数据中心所有空间实例
+  zoneQuery, //数据中心所有空间实例
   queryLinkSys, //数据中心系统查询
   queryTenant, //数据中心查询租户
   partsQuery, //数据中心部件查询
@@ -101,7 +101,7 @@ export default {
               })
             } else if (item.TypeCode == 'Sp') {
               //获取空间信息
-              queryAllZone({
+              zoneQuery({
                 Filters: `RoomID='${item.TypeCode + item.ProjectId + item.ObjectID}'`
               }, zoneMsg => {
                 if (zoneMsg.Content[0] && zoneMsg.Content[0].Outline) {

+ 4 - 4
src/views/ledger/spacelist/index.vue

@@ -71,13 +71,13 @@
   import roomInFloorDialog from "@/components/business_space/newAddDialogs/roomInFloorDialog";
   import handsontableMain from "@/components/business_space/business/handsontable";
   import {
-    countObjZone,
+    zoneCount,
     getDataDictionary,
     getrelationTypeProject,
     getSpaceBdFlCount,
     queryAllZoneType,
     queryBFloorWithState,
-    searchZoneQuery
+    zoneQuery
   } from "@/api/scan/request";
   import floorCascader from "@/components/ledger/lib/floorCascader";
   import {mapGetters} from "vuex";
@@ -185,7 +185,7 @@
       if (floor) {
         pa.Filters += `;FloorId="${floor}"`
       }
-      countObjZone(pa, res => {
+      zoneCount(pa, res => {
         if (floor) {
           this.infectedCurfloor = res.Count
         } else {
@@ -329,7 +329,7 @@
     //
     //     }
     //   }
-    //   searchZoneQuery(params, res => {
+    //   zoneQuery(params, res => {
     //
     //   })
     // },

+ 2 - 2
src/views/ledger/spacelist/spaceDetail/index.vue

@@ -31,7 +31,7 @@
 
 <script>
 import { mapGetters } from "vuex"
-import { searchZoneQuery, zoneCreate } from '@/api/scan/request'
+import { zoneQuery, zoneCreate } from '@/api/scan/request'
 import eqToSpaceTable from '@/components/business_space/newTables/eqToSpaceTable'
 import syInSpaceTable from '@/components/business_space/newTables/syInSpaceTable'
 export default {
@@ -79,7 +79,7 @@ export default {
         Filters: `RoomID="${this.params.RoomID}"`,
         ZoneType: this.params.zone
       }
-      searchZoneQuery(pa, res => {
+      zoneQuery(pa, res => {
         this.spaceDetails = res.Content[0];
       })
     },

+ 2 - 2
src/views/point/dynamicdata/addRelation/spaceRela/index.vue

@@ -162,7 +162,7 @@ import {
   dynamicDeleteRelation,
   dynamicPointTypeList,
   dynamicQueryAI,
-  queryAllZone, //数据中心所有空间实例
+  zoneQuery, //数据中心所有空间实例
   dynamicRelatedObj, //动参-查询已关联实例
 } from "@/api/scan/request";
 export default {
@@ -425,7 +425,7 @@ export default {
         if (tempArr.length) {
           pa.Filters += `;not RoomID in ${JSON.stringify(tempArr)}`
         }
-        queryAllZone(pa, res => {
+        zoneQuery(pa, res => {
           this.rPage.total = res.Total;
           let tempArr = res.Content.map(t => {
             t.ObjectID = t.RoomID.substr(12);