Browse Source

adm:feat > 修改动态参数接口

shaun-sheep 4 years ago
parent
commit
c7ed1ef1b7

+ 9 - 0
config/index.js

@@ -225,6 +225,15 @@ module.exports = {
         // 将主机标头的原点更改为目标URL
         changeOrigin: false
       },
+      '/rwd': {
+        // 目标 API 地址
+        // target: 'http://172.16.42.210:8080/',
+        target: 'http://39.102.40.239:9970/',
+        // 如果要代理 websockets
+        ws: true,
+        // 将主机标头的原点更改为目标URL
+        changeOrigin: false
+      },
       '/business-space': {
         // 目标 API 地址
         // target: 'http://172.16.42.210:8080/',

+ 1 - 1
config/prod.env.js

@@ -3,7 +3,7 @@ module.exports = {
   NODE_ENV: '"production"',
   BASE_URL: '"http://39.102.40.239"', //测试iframe地址
   SSO_SERVER: '"http://mbi.sagacloud.cn"', //测试环境
-  MQTT_SERVICE: '"ws://172.16.42.210:61614/stomp/"' //MQ测试环境地址
+  MQTT_SERVICE: '"ws://39.102.40.239:61614/stomp/"' //MQ测试环境地址
   // SSO_SERVER: '"http://172.16.44.235:8081"', //测试环境
   // BASE_URL: '"http://192.168.20.236"', //(新)测试iframe地址
   // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境

+ 1 - 0
src/api/scan/config.js

@@ -9,6 +9,7 @@ export const dataCenter = '/datacenter'
 export const component = '/equip-component'
 export const physics = '/data-platform-3';
 export const business = '/business-space'
+export const rwd = '/rwd'
 /******************* 适配新版数据字典接口 *********************/
 export const object = dataCenter + '/object'
 export const rel = dataCenter + '/rel'

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

@@ -23,7 +23,8 @@ import {
   dataCenter,
   classDef,
   rel,
-  component
+  component,
+  rwd
 } from './config.js'
 import http from './httpUtil'
 import storage from '@/framework/utils/storage'
@@ -834,7 +835,8 @@ export function queryLederDelObject(param, success) {
 
 //获取设定参数和动态参数
 export function BeatchQueryParam(param, success) {
-  let url = `${physics}/parameter/batch_query_param?projectId=${param.ProjId}&secret=${param.secret}`
+  // let url = `${physics}/parameter/batch_query_param?projectId=${param.ProjId}&secret=${param.secret}`
+  let url = `${rwd}/iot/data/current?projectId=${param.projectId}&groupCode=${param.groupCode}&appId=${param.appId}`
   let data = param.data
   http.postJson(url, data, success)
 }

+ 17 - 18
src/components/business_space/business/handsontable.vue

@@ -633,11 +633,10 @@ export default {
     //获取动态参数
     getBatch(data) {
       let param = {
-        secret: this.secret,
-        ProjId: this.projectId,
-        data: {
-          criterias: []
-        }
+        groupCode: "WD",
+        appId: "datacenter",
+        projectId: this.projectId,
+        data: []
       };
       this.headers.map(head => {
         if (
@@ -647,38 +646,38 @@ export default {
           head.InputMode == "M"
         ) {
           data.map(item => {
-            let cur = tools.dataForKey(item, head.Path);
+            let cur = tools.dataForKey(item, head.path);
             if (cur) {
-              param.data.criterias.push({
-                id: item.id,
-                code: head.code
+              param.data.push({
+                objectId: item.id,
+                infoCode: head.code
               });
             }
           });
         }
       });
-      if (param.data.criterias.length) {
+      if (param.data.length) {
         BeatchQueryParam(param, res => {
           if (!this.onlyRead) {
             return false
           }
           this.main = data.map(item => {
-            res.Content.map(child => {
-              if (item.RoomID == child.id) {
+            res.data.map(child => {
+              if (item.id == child.objectId) {
                 if (child.data || child.data == 0) {
                   this.headers.map(head => {
-                    if (head.InfoPointCode == child.code) {
-                      tools.setDataForKey(item, head.Path, child.data);
+                    if (head.InfoPointCode == child.infoCode) {
+                      tools.setDataForKey(item, head.path, child.data);
                     }
                   });
                 } else {
                   this.headers.map(head => {
-                    if (head.InfoPointCode == child.code) {
+                    if (head.code == child.infoCode) {
                       tools.setDataForKey(
                         item,
-                        head.Path,
-                        // child.error ? "表号功能号格式错误" : "表号功能号不存在"
-                        child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
+                        head.path,
+                        child.error
+                        // child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
                       );
                     }
                   });

+ 14 - 15
src/components/ledger/handsontables/assets.vue

@@ -434,11 +434,10 @@ export default {
     //获取动态参数
     getBatch(data) {
       let param = {
-        secret: this.secret,
-        ProjId: this.projectId,
-        data: {
-          criterias: []
-        }
+        groupCode: "WD",
+        appId: "datacenter",
+        projectId: this.projectId,
+        data: []
       };
       this.tableHeader.map(head => {
         if (
@@ -450,33 +449,33 @@ export default {
           data.map(item => {
             let cur = tools.dataForKey(item, head.path);
             if (cur) {
-              param.data.criterias.push({
-                id: item.id,
-                code: head.code
+              param.data.push({
+                objectId: item.id,
+                infoCode: head.code
               });
             }
           });
         }
       });
-      if (param.data.criterias.length) {
+      if (param.data.length) {
         BeatchQueryParam(param, res => {
           this.tableData = data.map(item => {
-            res.Content.map(child => {
-              if (item.id == child.id) {
+            res.data.map(child => {
+              if (item.id == child.objectId) {
                 if (child.data || child.data == 0) {
                   this.tableHeader.map(head => {
-                    if (head.code == child.code) {
+                    if (head.code == child.infoCode) {
                       tools.setDataForKey(item, head.path, child.data);
                     }
                   });
                 } else {
                   this.tableHeader.map(head => {
-                    if (head.code == child.code) {
+                    if (head.code == child.infoCode) {
                       tools.setDataForKey(
                         item,
                         head.path,
-                        // child.error ? "表号功能号格式错误" : "表号功能号不存在"
-                        child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
+                        child.error
+                        // child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
                       );
                     }
                   });

+ 17 - 17
src/components/ledger/handsontables/device.vue

@@ -644,11 +644,10 @@ export default {
     //获取动态参数
     getBatch(data) {
       let param = {
-        secret: this.secret,
-        ProjId: this.projectId,
-        data: {
-          criterias: []
-        }
+        groupCode: "WD",
+        appId: "datacenter",
+        projectId: this.projectId,
+        data: []
       };
 
       //一级遍历list
@@ -663,39 +662,40 @@ export default {
           data.map(item => {
             let cur = tools.dataForKey(item, head.path);
             if (cur) {
-              param.data.criterias.push({
-                id: item.id,
-                code: head.code
+              param.data.push({
+                objectId: item.id,
+                infoCode: head.code
               });
             }
           });
         }
       });
-      if (param.data.criterias.length) {
+      if (param.data.length) {
         BeatchQueryParam(param, res => {
           if (!this.onlyRead) {
             return false;
           }
           this.tableData = data.map(item => {
-            res.Content.map(child => {
-              if (item.id == child.id) {
+            res.data.map(child => {
+              if (item.id == child.objectId) {
                 if (!!child.data || child.data == 0) {
                   this.tableHeader.map(head => {
-                    if (head.code == child.code) {
+                    if (head.code == child.infoCode) {
                       tools.setDataForKey(item, head.path, child.data);
                     }
                   });
                 } else {
                   this.tableHeader.map(head => {
-                    if (head.code == child.code) {
+                    if (head.code == child.infoCode) {
                       tools.setDataForKey(
                         item,
                         head.path,
                         child.error
-                          ? child.value
-                          ? "表号功能号格式错误"
-                          : "表号功能号不存在"
-                          : "暂未采集到实时数据"
+                        // child.error
+                        //   ? child.value
+                        //   ? "表号功能号格式错误"
+                        //   : "表号功能号不存在"
+                        //   : "暂未采集到实时数据"
                       );
                     }
                   });

+ 15 - 16
src/components/ledger/handsontables/system.vue

@@ -324,12 +324,11 @@ export default {
     //获取动态参数
     getBatch(data) {
       let param = {
-        secret: this.secret,
-        ProjId: this.projectId,
-        data: {
-          criterias: []
-        }
-      }
+        groupCode: "WD",
+        appId: "datacenter",
+        projectId: this.projectId,
+        data: []
+      };
       //一级遍历list
       this.tableHeader.map(head => {
         //如果一级标签为动态参数或者设定参数放入数据等待请求
@@ -342,36 +341,36 @@ export default {
           data.map(item => {
             let cur = tools.dataForKey(item, head.path);
             if (cur) {
-              param.data.criterias.push({
-                id: item.SysID,
-                code: head.code
+              param.data.push({
+                objectId: item.id,
+                infoCode: head.code
               });
             }
           });
         }
       })
-      if (param.data.criterias.length) {
+      if (param.data.length) {
         BeatchQueryParam(param, res => {
           if (!this.onlyRead) {
             return false
           }
           this.tableData = data.map(item => {
-            res.Content.map(child => {
-              if (item.SysID == child.id) {
+            res.data.map(child => {
+              if (item.id == child.objectId) {
                 if (!!child.data || child.data == 0) {
                   this.tableHeader.map(head => {
-                    if (head.code == child.code) {
+                    if (head.code == child.infoCode) {
                       tools.setDataForKey(item, head.path, child.data);
                     }
                   });
                 } else {
                   this.tableHeader.map(head => {
-                    if (head.code == child.code) {
+                    if (head.code == child.infoCode) {
                       tools.setDataForKey(
                         item,
                         head.path,
-                        // child.error ? "表号功能号格式错误" : "表号功能号不存在"
-                        child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
+                        child.error
+                        // child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
                       );
                     }
                   });

+ 49 - 40
src/views/data_admin/buildTask/addTask/addModelTask.vue

@@ -1,50 +1,55 @@
 <template>
   <div id="bd-fl-manage">
     <div class="header-nav">
-      <el-button style="float:left;margin-right:20px;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
+      <el-button style="float:left;margin-right:20px;" size="small" type="default" icon="el-icon-back"
+                 @click="goBack"></el-button>
       <model-folder ref="modelFolder" @change="handleChangeModelFolder" style="margin-right:10px;"></model-folder>
       <my-cascader :isWidth="false" ref="cascader" @change="changeDevice"></my-cascader>
-      <el-button style="float:right;margin-top:1px;" @click="handleClickCreate">{{buttonContent}}</el-button>
-      <el-switch v-show="CurrentModelId" style="float:right;margin-top:7px;margin-right:20px;" v-model="isLight" active-text="高亮显示未完成验证的区块"></el-switch>
+      <el-button style="float:right;margin-top:1px;" @click="handleClickCreate">{{ buttonContent }}</el-button>
+      <el-switch v-show="CurrentModelId" style="float:right;margin-top:7px;margin-right:20px;" v-model="isLight"
+                 active-text="高亮显示未完成验证的区块"></el-switch>
     </div>
     <el-row>
       <div class="l-list">
         <h4>模型文件</h4>
         <div class="model-file-list">
           <el-scrollbar style="height:100%;">
-            <div v-for="item in modelFileList" :key="item.Id" :class="{'model-file-item':true,'active':item.active}" @click="handleChangeModelFile(item)">
-              <span>{{item.FloorName}}</span>
+            <div v-for="item in modelFileList" :key="item.Id" :class="{'model-file-item':true,'active':item.active}"
+                 @click="handleChangeModelFile(item)">
+              <span>{{ item.FloorName }}</span>
             </div>
           </el-scrollbar>
         </div>
       </div>
       <div class="r-model">
-        <draw-model ref="drawModel" :id="1" :CurrentModelId="CurrentModelId" :modelName="modelName" :isLight="isLight" @changeButtonContent="changeButtonContent"></draw-model>
+        <draw-model ref="drawModel" :id="1" :CurrentModelId="CurrentModelId" :modelName="modelName" :isLight="isLight"
+                    @changeButtonContent="changeButtonContent"></draw-model>
       </div>
     </el-row>
-    <modelTask-dialog :dialogVisible.sync="dialogVisible" :params="params" :newTaskTypes="newTaskTypes"></modelTask-dialog>
+    <modelTask-dialog :dialogVisible.sync="dialogVisible" :params="params"
+                      :newTaskTypes="newTaskTypes"></modelTask-dialog>
   </div>
 </template>
 
 <script>
-  import modelFolder from "@/components/ready/buildfloor/modelFolder"
-  import myCascader from "@/components/ledger/lib/cascader"
-  import drawModel from "@/components/data_admin/buildTask/draw/drawModel"
-  import modelTaskDialog from "@/components/data_admin/buildTask/dialog/modelTaskDialog"
-  import {mapGetters} from "vuex";
-  import request from "@/api/model/file.js";
-
-  export default {
-    components: {
-      modelFolder,
-      myCascader,
-      drawModel,
-      modelTaskDialog
-    },
-    data() {
-      return {
-        isLight: false,//是否高亮未完成验证区块
-        query: {},//query信息
+import modelFolder from "@/components/ready/buildfloor/modelFolder"
+import myCascader from "@/components/ledger/lib/cascader"
+import drawModel from "@/components/data_admin/buildTask/draw/drawModel"
+import modelTaskDialog from "@/components/data_admin/buildTask/dialog/modelTaskDialog"
+import { mapGetters } from "vuex";
+import request from "@/api/model/file";
+
+export default {
+  components: {
+    modelFolder,
+    myCascader,
+    drawModel,
+    modelTaskDialog
+  },
+  data() {
+    return {
+      isLight: false,//是否高亮未完成验证区块
+      query: {},//query信息
       dialogVisible: false,//是否显示弹窗
       modelFolderName: '',//模型文件夹名字
       modelFolderId: '',//模型文件夹的id
@@ -59,7 +64,7 @@
   },
   computed: {
     ...mapGetters("layout", ["projectId"]),
-    params(){
+    params() {
       return {
         device: this.device,
         CurrentModelId: this.CurrentModelId,
@@ -70,7 +75,7 @@
         isVerification: this.query.isVerification
       }
     },
-    modelName () {
+    modelName() {
       return `${this.modelFolderName}-${this.modelFileName}`
     },
   },
@@ -79,12 +84,12 @@
     this.query = this.$route.query
   },
   methods: {
-    goBack(){//返回
-      this.$router.push({name:'buildTask'})
+    goBack() {//返回
+      this.$router.push({ name: 'buildTask' })
     },
-    handleChangeModelFolder(item){//切换模型文件夹
+    handleChangeModelFolder(item) {//切换模型文件夹
       let val = item.value
-      if(val){
+      if (val) {
         this.modelFolderName = item.label
         let data = {
           FolderId: val,
@@ -105,7 +110,7 @@
         this.resetSelected()
       }
     },
-    resetSelected(){
+    resetSelected() {
       this.modelFileList = []
       this.CurrentModelId = ''
       this.modelFolderName = ''
@@ -115,9 +120,9 @@
       this.dialogVisible = false
       this.$refs.drawModel.clearGraphy()
     },
-    handleChangeModelFile(file){//切换模型文件
+    handleChangeModelFile(file) {//切换模型文件
       this.modelFileList.map(item => {
-        file.Id == item.Id?item.active = true:item.active = false
+        file.Id == item.Id ? item.active = true : item.active = false
         return item
       })
       this.CurrentModelId = file.CurrentModelId
@@ -125,11 +130,11 @@
       this.modelFileName = file.FloorName
       this.newTaskTypes = this.$route.query.newTaskTypes
     },
-    changeDevice(val){//切换设备类别
+    changeDevice(val) {//切换设备类别
       this.device = val.code
     },
-    handleClickCreate(){//创建已选
-      if(!this.CurrentModelId){
+    handleClickCreate() {//创建已选
+      if (!this.CurrentModelId) {
         this.$message('请选择模型文件!')
         return false
       }
@@ -138,7 +143,7 @@
       })
       this.dialogVisible = true
     },
-    changeButtonContent(val){// 通过判断是否选中模型空间调整文案
+    changeButtonContent(val) {// 通过判断是否选中模型空间调整文案
       this.buttonContent = val;
     }
   },
@@ -154,12 +159,15 @@
   overflow: hidden;
   height: 100%;
   position: relative;
-  .header-nav{
+
+  .header-nav {
     height: 32px;
     padding-bottom: 10px;
   }
+
   .el-row {
     height: calc(100% - 50px);
+
     & > div {
       float: left;
       height: 100%;
@@ -194,7 +202,8 @@
       .model-file-list {
         height: calc(100% - 46px);
         line-height: 48px;
-        /deep/.el-scrollbar__wrap {
+
+        /deep/ .el-scrollbar__wrap {
           overflow-x: hidden;
         }
 

+ 13 - 14
src/views/ledger/cenotelist/index.vue

@@ -477,11 +477,10 @@ export default {
     //获取动态参数
     getBatch(data) {
       let param = {
-        secret: this.secret,
-        ProjId: this.projectId,
-        data: {
-          criterias: []
-        }
+        groupCode: "WD",
+        appId: "datacenter",
+        projectId: this.projectId,
+        data: []
       };
       this.tableHeader.map(head => {
         if (
@@ -493,33 +492,33 @@ export default {
           data.map(item => {
             let cur = tools.dataForKey(item, head.path);
             if (cur) {
-              param.data.criterias.push({
-                id: item.ShaftID,
-                code: head.code
+              param.data.push({
+                objectId: item.id,
+                infoCode: head.code
               });
             }
           });
         }
       });
-      if (param.data.criterias.length) {
+      if (param.data.length) {
         BeatchQueryParam(param, res => {
           this.tableData = data.map(item => {
             res.Content.map(child => {
-              if (item.ShaftID == child.id) {
+              if (item.id == child.objectId) {
                 if (child.data || child.data == 0) {
                   this.tableHeader.map(head => {
-                    if (head.code == child.code) {
+                    if (head.code == child.infoCode) {
                       tools.setDataForKey(item, head.path, child.data);
                     }
                   });
                 } else {
                   this.tableHeader.map(head => {
-                    if (head.code == child.code) {
+                    if (head.code == child.infoCode) {
                       tools.setDataForKey(
                         item,
                         head.path,
-                        // child.error ? "表号功能号格式错误" : "表号功能号不存在"
-                        child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
+                        child.error
+                        // child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
                       );
                     }
                   });

+ 14 - 13
src/views/ledger/facility/details/index.vue

@@ -222,29 +222,30 @@ export default {
             let cur = tools.dataForKey(this.exampleData, item.path);
             if (cur) {
               this.criterias.push({
-                id: this.exampleData.id,
-                code: item.code
+                objectId: this.exampleData.id,
+                infoCode: item.code
               })
-
             }
           }
         })
         let params = { //获取动态参数
-          secret: this.secret,
-          ProjId: this.projectId,
-          data: {
-            criterias: this.criterias
-          }
+          groupCode: "WD",
+          appId: "datacenter",
+          projectId: this.projectId,
+          data: []
         }
+        params.data = this.criterias
         if (this.criterias.length) {
           BeatchQueryParam(params, res => {
-            this.criteriasArray = res.Content;
-            res.Content.length && res.Content.map(child => {
+            this.criteriasArray = res.data;
+            res.data.length && res.data.map(child => {
               this.pointData.map(head => {
-                if (head.code == child.code) {
-                  this.$set(head, 'svalue', child.value)
+                if (head.code == child.infoCode) {
+                  // this.$set(head, 'svalue', child.value)
+                  this.$set(head, 'svalue', child.infoValue)
                   this.$set(head, 'data', child.data)
-                  this.$set(head, 'receivetime', child.receivetime)
+                  // this.$set(head, 'receivetime', child.receivetime)
+                  this.$set(head, 'receivetime', child.time)
                   this.$set(head, 'error', child.error)
                 }
                 return head

+ 23 - 24
src/views/ledger/facility/parts/index.vue

@@ -69,7 +69,7 @@ import {
   BeatchQueryParam
 } from "@/api/scan/request";
 import { getDataDictionary } from "@/api/dict";
-import {mapGetters, mapActions} from "vuex";
+import { mapGetters, mapActions } from "vuex";
 
 export default {
   components: {
@@ -100,8 +100,8 @@ export default {
         total: 0
       },
       showTypes: [
-        {value: "Visible", label: '只看采集信息'},
-        {value: "all", label: '全部'}
+        { value: "Visible", label: '只看采集信息' },
+        { value: "all", label: '全部' }
       ],
       showType: "Visible",
       tableData: [],
@@ -266,16 +266,16 @@ export default {
         let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
           .__arrayMap;
         let infos = this.tableData[trimmedArr[sortArr[rowArr.row]]];
-        this.getInfors(infos, {row: sortArr[rowArr.row], col: rowArr.col});
+        this.getInfors(infos, { row: sortArr[rowArr.row], col: rowArr.col });
       } else if (isSort) {
         //排序后的数组
         let sortArr = this.tableExample.getPlugin("columnSorting").rowsMapper
           .__arrayMap;
         let infos = this.tableData[sortArr[rowArr.row]];
-        this.getInfors(infos, {row: sortArr[rowArr.row], col: rowArr.col});
+        this.getInfors(infos, { row: sortArr[rowArr.row], col: rowArr.col });
       } else if (trimmedArr.length) {
         let infos = this.tableData[trimmedArr[rowArr.row]];
-        this.getInfors(infos, {row: trimmedArr[rowArr.row], col: rowArr.col});
+        this.getInfors(infos, { row: trimmedArr[rowArr.row], col: rowArr.col });
       } else {
         let infos = this.tableData[rowArr.row];
         this.getInfors(infos, rowArr);
@@ -424,7 +424,7 @@ export default {
         data: []
       };
       params.map(item => {
-        param.data.push({EquipID: item.EquipID});
+        param.data.push({ EquipID: item.EquipID });
       });
       this.$confirm("此操作将删除部件,是否继续?", "提示", {
         confirmButtonText: "确定",
@@ -461,11 +461,10 @@ export default {
     //获取动态参数
     getBatch(data) {
       let param = {
-        secret: this.secret,
-        ProjId: this.projectId,
-        data: {
-          criterias: []
-        }
+        groupCode: "WD",
+        appId: "datacenter",
+        projectId: this.projectId,
+        data: []
       };
       this.tableHeader.map(head => {
         if (
@@ -477,33 +476,33 @@ export default {
           data.map(item => {
             let cur = tools.dataForKey(item, head.path);
             if (cur) {
-              param.data.criterias.push({
-                id: item.id,
-                code: head.code
+              param.data.push({
+                objectId: item.id,
+                infoCode: head.code
               });
             }
           });
         }
       });
-      if (param.data.criterias.length) {
+      if (param.data.length) {
         BeatchQueryParam(param, res => {
           this.tableData = data.map(item => {
-            res.Content.map(child => {
-              if (item.EquipID == child.id) {
+            res.data.map(child => {
+              if (item.id == child.objectId) {
                 if (child.data || child.data == 0) {
                   this.tableHeader.map(head => {
-                    if (head.InfoPointCode == child.code) {
-                      tools.setDataForKey(item, head.Path, child.data);
+                    if (head.code == child.infoCode) {
+                      tools.setDataForKey(item, head.path, child.data);
                     }
                   });
                 } else {
                   this.tableHeader.map(head => {
-                    if (head.InfoPointCode == child.code) {
+                    if (head.code == child.infoCode) {
                       tools.setDataForKey(
                         item,
-                        head.Path,
-                        // child.error ? "表号功能号格式错误" : "表号功能号不存在"
-                        child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
+                        head.path,
+                        child.error
+                        // child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
                       );
                     }
                   });

+ 15 - 16
src/views/ledger/rentlist/index.vue

@@ -507,13 +507,12 @@ export default {
     },
     //获取动态参数
     getBatch(data) {
-      let param = {
-        secret: this.secret,
-        ProjId: this.projectId,
-        data: {
-          criterias: []
-        }
-      };
+      let param = { //获取动态参数
+        groupCode: "WD",
+        appId: "datacenter",
+        projectId: this.projectId,
+        data: []
+      }
       this.tableHeader.map(head => {
         if (
           head.inputMode == "L" ||
@@ -524,33 +523,33 @@ export default {
           data.map(item => {
             let cur = tools.dataForKey(item, head.path);
             if (cur) {
-              param.data.criterias.push({
-                id: item.TenantID,
-                code: head.code
+              param.data.push({
+                objectId: item.id,
+                infoCode: head.code
               });
             }
           });
         }
       });
-      if (param.data.criterias.length) {
+      if (param.data.length) {
         BeatchQueryParam(param, res => {
           this.tableData = data.map(item => {
             res.Content.map(child => {
-              if (item.TenantID == child.id) {
+              if (item.id == child.objectId) {
                 if (child.data || child.data == 0) {
                   this.tableHeader.map(head => {
-                    if (head.code == child.code) {
+                    if (head.code == child.infoCode) {
                       tools.setDataForKey(item, head.path, child.data);
                     }
                   });
                 } else {
                   this.tableHeader.map(head => {
-                    if (head.code == child.code) {
+                    if (head.code == child.infoCode) {
                       tools.setDataForKey(
                         item,
                         head.path,
-                        // child.error ? "表号功能号格式错误" : "表号功能号不存在"
-                        child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
+                        child.error
+                        // child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
                       );
                     }
                   });

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

@@ -234,21 +234,21 @@ export default {
           }
         })
         let params = { //获取动态参数
-          secret: this.secret,
-          ProjId: this.projectId,
-          data: {
-            criterias: this.criterias
-          }
+          groupCode: "WD",
+          appId: "datacenter",
+          projectId: this.projectId,
+          data: []
         }
+        params.data = this.criterias
         if (this.criterias.length) {
           BeatchQueryParam(params, res => {
             // this.criteriasArray = res.Content;
-            res.Content.length && res.Content.map(child => {
+            res.data.length && res.data.map(child => {
               this.pointData.map(head => {
-                if (head.code == child.code) {
-                  this.$set(head, 'svalue', child.value)
+                if (head.code == child.infoCode) {
+                  this.$set(head, 'svalue', child.infoValue)
                   this.$set(head, 'data', child.data)
-                  this.$set(head, 'receivetime', child.receivetime)
+                  this.$set(head, 'receivetime', child.time)
                   this.$set(head, 'error', child.error)
                 }
                 return head

+ 16 - 14
src/views/screen/splitscreen/spaceledger/index.vue

@@ -311,12 +311,12 @@ export default {
         type: this.$route.query.zone
       }
       let param = {
-        secret: secret,
-        ProjId: proId,
-        data: {
-          criterias: []
-        }
-      }
+        groupCode: "WD",
+        appId: "datacenter",
+        projectId: this.projectId,
+        data: []
+      };
+
       getDataDictionary(params, res => {// 获取表号功能号
         // this.tableData = res.Content;
         if (this.onlyMessage) {
@@ -326,20 +326,22 @@ export default {
         }
         this.tableData.map(item => {
           let cur = tools.dataForKey(this.spaceDetails, item.path);
-          // item.functionNo = cur;
-          param.data.criterias.push({
-            id: this.spaceDetails.RoomID,
-            code: item.code
-          });
+          if(cur) {
+            param.data.push({
+              objectId: this.spaceDetails.RoomID,
+              infoCode: item.code
+            });
+          }
         })
         BeatchQueryParam(param, res => {// 获取动态数据
-          res.Content.forEach((item, index) => {
+          res.data.forEach((item, index) => {
             this.$set(this.tableData[index], 'functionNo', item.data)
-            this.$set(this.tableData[index], 'functionNoTime', item.receivetime)
+            this.$set(this.tableData[index], 'functionNoTime', item.time)
             tools.setDataForKey(
               this.spaceDetails,
               this.tableData[index].path,
-              this.$set(this.tableData[index], "functionNoDynamicData", item.interrupt ? '已断数' : (item.error ? item.value ? "表号功能号不存在" : "未维护" : "暂未采集到实时数据"))
+              // this.$set(this.tableData[index], "functionNoDynamicData", item.interrupt ? '已断数' : (item.error ? item.value ? "表号功能号不存在" : "未维护" : "暂未采集到实时数据"))
+              this.$set(this.tableData[index], "functionNoDynamicData", item.error)
             );
           })
         });