Browse Source

下拉框回显

haojianlong 4 years ago
parent
commit
e51d402c78
3 changed files with 8 additions and 6 deletions
  1. 3 3
      src/api/scan/request.js
  2. 1 1
      src/utils/scan/tools.js
  3. 4 2
      src/views/ledger/cenotelist/index.vue

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

@@ -846,7 +846,7 @@ export function ShaftRelationBusinessSpace(param, success) {
 
 //获取竖井类型
 export function getCenoteType(param, success) {
-  let url = `${baseUrl}/datacenter2/object/shaft/query-shaft-functype`
+  let url = `${baseUrl}${dataCenter}/shaft/query-shaft-functype`
   http.postJson(url, param, success)
 }
 
@@ -870,13 +870,13 @@ export function createCenoteTableData(param, success) {
 
 //修改竖井信息
 export function updataCenoteTableData(param, success) {
-  let url = `${baseUrl}/datacenter2/shaft/update`
+  let url = `${baseUrl}${dataCenter}/shaft/update`
   http.postJson(url, param, success)
 }
 
 //删除竖井信息
 export function deleteCenoteTableData(param, success) {
-  let url = `${baseUrl}/datacenter2/shaft/delete`
+  let url = `${baseUrl}${dataCenter}/shaft/delete`
   http.postJson(url, param, success)
 }
 

+ 1 - 1
src/utils/scan/tools.js

@@ -474,7 +474,7 @@ tools.formatDataSource = function (data) {
     let arr = []
     data.map((item) => {
       if (item.code && item.name)
-        arr.push({code: item.code, Name: item.name})
+        arr.push({Code: item.code, Name: item.name})
       if (item.content && item.content.length)
         arr = arr.concat(recursion(item.content))
     })

+ 4 - 2
src/views/ledger/cenotelist/index.vue

@@ -165,11 +165,13 @@ export default {
     async getTableData() {//获取表格数据
       let params = {
         cascade: [{ name: 'spaceList' }],
-        filters: this.cenoteId ? `projectId='${this.projectId}';structureInfo.shaftFuncType='${this.cenoteId}'` : `projectId='${this.projectId}'`,
         orders: "createTime desc, localName desc, localId desc, id asc",
         pageNumber: this.page.pageNumber,
         pageSize: this.page.pageSize
       }
+      if (this.cenoteId) {
+        params.filters = `structureInfo.shaftFuncType='${this.cenoteId}'`
+      }
       await queryCenoteTableData(params, (res) => {
         this.tableData = res.content
         this.copyTableData = tools.deepCopy(res.content)
@@ -252,7 +254,7 @@ export default {
       }
       let param = []
       params.map(item => {
-        param.push({ ShaftID: item.ShaftID })
+        param.push({ id: item.id })
       })
       this.$confirm("此操作将删除竖井,是否继续?", "提示", {
         confirmButtonText: '确定',