Sfoglia il codice sorgente

'替换设备建筑楼层接口'

zhangyu 4 anni fa
parent
commit
6c0d1a9ee4
2 ha cambiato i file con 26 aggiunte e 26 eliminazioni
  1. 2 2
      src/api/scan/request.js
  2. 24 24
      src/components/ledger/lib/floorCascader.vue

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

@@ -1574,7 +1574,7 @@ export function projectQuery(param, success) {
 
 //查询楼层信息
 export function floorQuery(param, success) {
-  let url = `${baseUrl}/datacenter/floor/query`;
+  let url = `${baseUrl}/datacenter/object/floor/query`;
   http.postJson(url, param, success)
 }
 
@@ -1586,7 +1586,7 @@ export function floorQueryAndSign(param, success) {
 
 //查询建筑信息
 export function buildingQuery(param, success) {
-  let url = `${baseUrl}/datacenter/building/query`;
+  let url = `${baseUrl}/datacenter/object/building/query`;
   http.postJson(url, param, success)
 }
 

+ 24 - 24
src/components/ledger/lib/floorCascader.vue

@@ -62,22 +62,22 @@
             //获取数据
             getData() {
                 let data, buildParams = {
-                    PageNumber: 1,
-                    PageSize: 1000,
-                    Orders: "BuildLocalName asc",
-                    Projection: [
-                        "BuildID",
-                        "BuildLocalName"
+                    pageNumber: 1,
+                    pageSize: 1000,
+                    orders: "localName asc",
+                    projection: [
+                        "id",
+                        "localName"
                     ]
                 }, floorParams = {
-                    Orders: "FloorSequenceID desc",
-                    PageNumber: 1,
-                    PageSize: 1000,
-                    Projection: [
-                        "BuildID",
-                        "FloorID",
-                        "FloorLocalName",
-                        "FloorSequenceID"
+                    orders: "floorSequenceId desc",
+                    pageNumber: 1,
+                    pageSize: 1000,
+                    projection: [
+                        "buildingId",
+                        "id",
+                        "localName",
+                        "floorSequenceId"
                     ]
                 }
                 let promise1 = new Promise((resolve, reject) => {
@@ -91,11 +91,11 @@
                     })
                 })
                 Promise.all([promise1, promise2]).then(values => {
-                    let builData = values[0].Content, floorData = values[1].Content
+                    let builData = values[0].content, floorData = values[1].content
                     data = builData.map(build => {
                         return {
-                            value: build.BuildID,
-                            label: build.BuildLocalName
+                            value: build.id,
+                            label: build.localName
                         }
                     })
                     data.unshift({
@@ -107,12 +107,12 @@
                     })
                     data.forEach(build => {
                         floorData.forEach(floor => {
-                            if (build.value == floor.BuildID && floor.FloorID && floor.FloorLocalName && this.type == "yes") {
+                            if (build.value == floor.buildingId && floor.id && floor.localName && this.type == "yes") {
                                 if (build.children) {
                                     build.children.push({
-                                        value: floor.FloorID,
-                                        label: floor.FloorLocalName,
-                                        FloorSequenceID: floor.FloorSequenceID
+                                        value: floor.id,
+                                        label: floor.localName,
+                                        FloorSequenceID: floor.floorSequenceId
                                     })
                                 } else {
                                     build.children = []
@@ -123,9 +123,9 @@
                                         value: 'noKnow',
                                         label: "未明确楼层"
                                     },{
-                                        value: floor.FloorID,
-                                        label: floor.FloorLocalName,
-                                        FloorSequenceID: floor.FloorSequenceID
+                                        value: floor.id,
+                                        label: floor.localName,
+                                        FloorSequenceID: floor.floorSequenceId
                                     })
                                 }
                             }