Browse Source

adm:feat > 竖井详情接口替换,页面详情展示

shaun-sheep 4 years ago
parent
commit
6a9b0e7948

+ 5 - 5
src/components/ledger/cenote/table/cenoteTable.vue

@@ -83,7 +83,7 @@ export default {
     // 获取列表数据
     getTableData() {
       let params = {
-        Filters: `ShaftID='${this.params.ShaftID}'`,
+        Filters: `id='${this.params.ShaftID}'`,
         Cascade: [
           {
             Name: 'shaftThroughList'
@@ -91,10 +91,10 @@ export default {
         ]
       }
       queryCenoteTableData(params, res => {
-        this.tableData = res.Content[0].ShaftThroughList || []
+        this.tableData = res.content[0].shaftThroughList || []
         this.tableData.forEach(item => {
-          if(item.StructureInfo && item.StructureInfo.ShaftFuncType){
-            item.StructureInfo.ShaftFuncType = this.shaftType[item.StructureInfo.ShaftFuncType]
+          if(item.structureInfo && item.structureInfo.ShaftFuncType){
+            item.structureInfo.shaftFuncType = this.shaftType[item.structureInfo.shaftFuncType]
           }
         })
       })
@@ -152,4 +152,4 @@ export default {
     height: calc(100% - 50px);
   }
 }
-</style>
+</style>

+ 6 - 6
src/components/ledger/cenote/table/deviceTable.vue

@@ -75,16 +75,16 @@ export default {
     // 获取列表数据
     getTableData() {
       let params = {
-        Filters: `ShaftID='${this.params.ShaftID}'`,
-        Cascade: [
+        filters: `id='${this.params.ShaftID}'`,
+        cascade: [
           {
-            Name: 'equipmentList',
-            Cascade: [{ Name: 'equipCategory' }]
+            name: 'equipmentList',
+            cascade: [{ name: 'equipCategory' }]
           }
         ]
       }
       queryCenoteTableData(params, res => {
-        this.tableData = res.Content[0].EquipmentList || []
+        this.tableData = res.content[0].equipmentList || []
       })
     },
     // 删除关系
@@ -140,4 +140,4 @@ export default {
     height: calc(100% - 50px);
   }
 }
-</style>
+</style>

+ 6 - 6
src/components/ledger/cenote/table/systemTable.vue

@@ -77,16 +77,16 @@ export default {
     // 获取列表数据
     getTableData() {
       let params = {
-        Filters: `ShaftID='${this.params.ShaftID}'`,
-        Cascade: [
+        filters: `id='${this.params.ShaftID}'`,
+        cascade: [
           {
-            Name: 'systemList',
-            Cascade: [{ Name: 'categoryNames' }]
+            name: 'systemList',
+            cascade: [{ name: 'categoryNames' }]
           }
         ]
       }
       queryCenoteTableData(params, res => {
-        this.tableData = res.Content[0].SystemList || []
+        this.tableData = res.content[0].systemList || []
       })
     },
     // 删除关系
@@ -142,4 +142,4 @@ export default {
     height: calc(100% - 50px);
   }
 }
-</style>
+</style>

+ 38 - 37
src/views/ledger/cenotelist/cenoteDetail/index.vue

@@ -130,7 +130,7 @@ export default {
         pageSize: 1000,
         type: 'shaft'
       }, params2 = {
-        Filters: `ShaftID='${this.params.ShaftID}'`
+        filters: `id='${this.params.ShaftID}'`
       };
       let promise1 = new Promise((resolve, reject) => {
         getDataDictionary(params1, res => {
@@ -144,8 +144,8 @@ export default {
       })
       Promise.all([promise1, promise2]).then(values => {
         this.pointData = values[0].content;
-        this.exampleData = values[1].Content[0];
-        let obj = this.deepCopy(values[1].Content[0]);
+        this.exampleData = values[1].content[0];
+        let obj = this.deepCopy(values[1].content[0]);
         obj = tools.flattenKeys(obj);
         for (let key in obj) {
           if (Array.isArray(obj[key]) && !obj[key].length) {
@@ -194,66 +194,67 @@ export default {
     displayData(arr) {//对数据进行处理传给组件展示
       const result = {}
       arr.forEach(i => {
-        if (this.instance.hasOwnProperty(i.Path) && this.currentRadio != 2) {
-          i.value = this.instance[i.Path]
+        if (this.instance.hasOwnProperty(i.path) && this.currentRadio != 2) {
+          i.value = this.instance[i.path]
         }
-        if (i.InputMode == 'C5') {
-          if (this.instance.hasOwnProperty(i.Path)) {
-            let time = this.instance[i.Path]
+        if (i.inputMode == 'C5') {
+          if (this.instance.hasOwnProperty(i.path)) {
+            let time = this.instance[i.path]
             i.value = this.formatDate(time)
           }
         }
-        if (i.DataSource && i.DataSource.length) {
-          let source = JSON.parse(i.DataSource)
+        if (i.dataSource && i.dataSource.length) {
+          // let source = JSON.parse(i.dataSource)
+          let source = i.dataSource
           //判断输入类型
-          if (i.InputMode == 'D1L') {
-            let d1l = tools.formatDataSource(i.DataSource)
+          if (i.inputMode == 'D1L') {
+            let d1l = tools.formatDataSource(i.dataSource)
             d1l.forEach(k => {
-              if (k.Code == this.instance[i.Path]) {
-                i.value = k.Name
+              if (k.code == this.instance[i.path]) {
+                i.value = k.name
               }
             })
-          } else if (i.InputMode == 'D2' || i.InputMode == 'C6') {
-            if (this.instance.hasOwnProperty(i.Path)) {
-              if (!Array.isArray(this.instance[i.Path])) {
-                let transArray = this.instance[i.Path].split(',')
-                i.value = source.filter(item => transArray.includes(item.Code)).map(item => item.Name).join(',')
+          } else if (i.inputMode == 'D2' || i.inputMode == 'C6') {
+            if (this.instance.hasOwnProperty(i.path)) {
+              if (!Array.isArray(this.instance[i.path])) {
+                let transArray = this.instance[i.path].split(',')
+                i.value = source.filter(item => transArray.includes(item.code)).map(item => item.name).join(',')
               }
             }
           }
           source.forEach(j => {
-            if (j.Code == this.instance[i.Path]) {
-              i.value = j.Name
+            if (j.code == this.instance[i.path]) {
+              i.value = j.name
             }
           })
         }
-        switch (i.InputMode) {
+        switch (i.inputMode) {
           case "L":
           case "L1":
           case "L2":
           case "M":
             break;
           default:
-            if (result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`]) {
-              result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`].paths.push({
-                Path: i.Path,
-                InfoPointName: i.InfoPointName,
-                InfoPointCode: i.InfoPointCode,
+            if (result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`]) {
+              result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`].paths.push({
+                Path: i.path,
+                InfoPointName: i.name,
+                InfoPointCode: i.code,
                 Value: i.value,
-                Visible: i.Visible,
-                KeyWord: i.KeyWord,
-                InputMode: i.InputMode
+                Visible: i.visible,
+                KeyWord: i.keyWord,
+                InputMode: i.inputMode,
               })
             } else {
-              result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`] = {
+              result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`] = {
                 paths: [{
-                  Path: i.Path,
-                  InfoPointName: i.InfoPointName,
-                  InfoPointCode: i.InfoPointCode,
+                  Path: i.path,
+                  InfoPointName: i.name,
+                  InfoPointCode: i.code,
                   Value: i.value,
-                  Visible: i.Visible,
-                  KeyWord: i.KeyWord,
-                  InputMode: i.InputMode
+                  Visible: i.visible,
+                  KeyWord: i.keyWord,
+                  InputMode: i.inputMode,
                 }]
               }
             }

+ 1 - 1
src/views/ledger/cenotelist/cenoteadd/index.vue

@@ -110,7 +110,7 @@ export default {
         this.$message("存在未选择竖井功能的数据,请选择信息后再创建!")
         return
       }
-      params.Content = newData
+      params.content = newData
       await createCenoteTableData(params, (res) => {
         this.$message.success("添加成功!")
         session.remove("cenoteAddData")

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

@@ -368,8 +368,8 @@ export default {
       //其他的开始判断
       let val = this.tableExample.colToProp(row.col)
       let inputData = this.inputMap[val]
-      let name = infos.ShaftLocalName ? infos.ShaftLocalName : infos.ShaftName
-      this.shaftId = infos.ShaftID //要操作的数据id
+      let name = infos.localName ? infos.localName : infos.name
+      this.shaftId = infos.id //要操作的数据id
       //点击关联的元空间
       if (val === "SpaceList") {
         this.$router.push({