diff --git a/src/views/monitoring/equipmentFullParams/index.vue b/src/views/monitoring/equipmentFullParams/index.vue index 1dcdd722..a822c9fa 100644 --- a/src/views/monitoring/equipmentFullParams/index.vue +++ b/src/views/monitoring/equipmentFullParams/index.vue @@ -13,21 +13,23 @@ @headBtnClick="handleSearchBarBtnClick" />
- - +
+ +
import LocalDataManager from './utils/local-data-manager'; - -const fakeTable1Data = [ - { - time: 1111111111111111, - plcCode: 2, - val1: 3, - bol1: 4, - val2: 5, - bol2: 6, - }, - { - time: 1, - plcCode: 22222222222222, - val1: 3, - bol1: 4, - val2: 5, - bol2: 6, - }, - { - time: 1, - plcCode: 2, - val1: 33333333333333, - bol1: 4, - val2: 5, - bol2: 6, - }, - { - time: 1, - plcCode: 2, - val1: 3, - bol1: 44444444444444, - val2: 5, - bol2: 6, - }, - { - time: 1, - plcCode: 2, - val1: 3, - bol1: 4, - val2: 5555555555555, - bol2: 6, - }, - { - time: 1, - plcCode: 2, - val1: 3, - bol1: 4, - val2: 5, - bol2: 6666666666666666666, - }, - { time: 1, plcCode: 2, val1: 3, bol1: 4, val2: 5, bol2: 6 }, - { time: 1, plcCode: 2, val1: 3, bol1: 4, val2: 5, bol2: 6 }, - { time: 1, plcCode: 2, val1: 3, bol1: 4, val2: 5, bol2: 6 }, - { time: 1, plcCode: 2, val1: 3, bol1: 4, val2: 5, bol2: 6 }, - { time: 1, plcCode: 2, val1: 3, bol1: 4, val2: 5, bol2: 6 }, - { time: 1, plcCode: 2, val1: 3, bol1: 4, val2: 5, bol2: 6 }, - { time: 1, plcCode: 2, val1: 3, bol1: 4, val2: 5, bol2: 6 }, - { time: 1, plcCode: 2, val1: 3, bol1: 4, val2: 5, bol2: 6 }, - { time: 1, plcCode: 2, val1: 3, bol1: 4, val2: 5, bol2: 6 }, - { time: 1, plcCode: 2, val1: 3, bol1: 4, val2: 5, bol2: 6 }, - { time: 1, plcCode: 2, val1: 3, bol1: 4, val2: 5, bol2: 6 }, -]; - -const table1LDM = new LocalDataManager(fakeTable1Data, 1, 3); +import response from './response'; + export default { name: 'EquipmentFullParams', @@ -456,6 +396,12 @@ export default { this.$set(this.searchBarFormConfig[1], 'defaultSelect', this.name); }, methods: { + getList(dataManager, pageNo, pageSize) { + dataManager.setPageNo(pageNo); + dataManager.setPageSize(pageSize); + return { data: dataManager.dataList, total: dataManager.total }; + }, + /** 查询 */ async handleQuery() { const { data } = this.$axios({ diff --git a/src/views/monitoring/equipmentFullParams/response.js b/src/views/monitoring/equipmentFullParams/response.js new file mode 100644 index 00000000..35d4eb5f --- /dev/null +++ b/src/views/monitoring/equipmentFullParams/response.js @@ -0,0 +1,125 @@ +export default { + "code": 0, + "data": [ + // 一个表格 + { + "data": [ + // 一行参数 + { + "time": "1694056192800", + "plcCode": "PLC_CODE_1", + "data": [ + // 一个参数值 + { "id": 'param-1', "parentId": 0, "dynamicName": "P1V1", "dynamicValue": 15 }, + { "id": 'param-2', "parentId": 0, "dynamicName": "P1V2", "dynamicValue": 15 }, + { "id": 'param-3', "parentId": 0, "dynamicName": "P1V3", "dynamicValue": 15 }, + { "id": 'param-4', "parentId": 0, "dynamicName": "P1V4", "dynamicValue": 15 }, + { "id": 'param-5', "parentId": 0, "dynamicName": "P1V5", "dynamicValue": 15 }, + { "id": 'param-6', "parentId": 0, "dynamicName": "P1V6", "dynamicValue": 15 }, + ] + } + ], + "otherList": [ + // 一个参数的属性 + { + "id": "attr-1", + "plcParamName": "P1V1", + "name": "P1V1", // 和 dynamicName 对应 + "minValue": 1, + "maxValue": 100 + }, + { + "id": "attr-2", + "plcParamName": "P1V2", + "name": "P1V2", + "minValue": 10, + "maxValue": 90 + }, + { + "id": "attr-3", + "plcParamName": "P1V3", + "name": "P1V3", + "minValue": 10, + "maxValue": 98 + }, + { + "id": "attr-4", + "plcParamName": "P1V4", + "name": "P1V4", + "minValue": 10, + "maxValue": 90 + }, + { + "id": "attr-5", + "plcParamName": "P1V5", + "name": "P1V5", + "minValue": 10, + "maxValue": 99 + }, + { + "id": "attr-6", + "plcParamName": "P1V6", + "name": "P1V6", + "minValue": 10, + "maxValue": 90 + }, + ], + "nameData": [], + "otherMap": [] + }, + // 一个表格 + { + "data": [ + // 一行参数 + { + "time": "1694056100800", + "plcCode": "PLC_CODE_2", + "data": [ + // 一个参数值 + { "id": 'param-1', "parentId": 0, "dynamicName": "P1V1", "dynamicValue": 15 }, + { "id": 'param-2', "parentId": 0, "dynamicName": "P1V2", "dynamicValue": 15 }, + { "id": 'param-3', "parentId": 0, "dynamicName": "P1V3", "dynamicValue": 15 }, + + ] + }, + { + "time": "1694056102800", + "plcCode": "PLC_CODE_2", + "data": [ + // 一个参数值 + { "id": 'param-1', "parentId": 0, "dynamicName": "P1V1", "dynamicValue": 15 }, + { "id": 'param-2', "parentId": 0, "dynamicName": "P1V2", "dynamicValue": 15 }, + { "id": 'param-3', "parentId": 0, "dynamicName": "P1V3", "dynamicValue": 15 }, + + ] + } + ], + "otherList": [ + // 一个参数的属性 + { + "id": "attr-1", + "plcParamName": "P1V1", + "name": "P1V1", // 和 dynamicName 对应 + "minValue": 1, + "maxValue": 100 + }, + { + "id": "attr-2", + "plcParamName": "P1V2", + "name": "P1V2", + "minValue": 10, + "maxValue": 90 + }, + { + "id": "attr-3", + "plcParamName": "P1V3", + "name": "P1V3", + "minValue": 10, + "maxValue": 98 + }, + ], + "nameData": [], + "otherMap": [] + } + ] +}