test #47
@ -13,21 +13,23 @@
|
||||
@headBtnClick="handleSearchBarBtnClick" />
|
||||
|
||||
<div class="tables">
|
||||
<base-table
|
||||
:key="1 + '__basetable'"
|
||||
:table-props="table1.tableProps"
|
||||
:page="table1.pageNo"
|
||||
:limit="table1.pageSize"
|
||||
:table-data="table1.data"
|
||||
@emitFun="(val) => handleEmitFun(table1, val)"></base-table>
|
||||
<pagination
|
||||
v-show="table1.total > 0"
|
||||
:total="table1.total"
|
||||
:page.sync="table1.pageNo"
|
||||
:limit.sync="table1.pageSize"
|
||||
:page-size="table1.pageSize"
|
||||
:page-sizes="[1, 3, 5, 10, 20]"
|
||||
@pagination="(val) => getListFor(table1, val)" />
|
||||
<div class="custom-table">
|
||||
<!-- <base-table
|
||||
:key="1 + '__basetable'"
|
||||
:table-props="table1.tableProps"
|
||||
:page="table1.pageNo"
|
||||
:limit="table1.pageSize"
|
||||
:table-data="table1.data"
|
||||
@emitFun="(val) => handleEmitFun(table1, val)"></base-table>
|
||||
<pagination
|
||||
v-show="table1.total > 0"
|
||||
:total="table1.total"
|
||||
:page.sync="table1.pageNo"
|
||||
:limit.sync="table1.pageSize"
|
||||
:page-size="table1.pageSize"
|
||||
:page-sizes="[1, 3, 5, 10, 20]"
|
||||
@pagination="(val) => getListFor(table1, val)" /> -->
|
||||
</div>
|
||||
<base-table
|
||||
:key="2 + '__basetable'"
|
||||
:table-props="table2.tableProps"
|
||||
@ -95,70 +97,8 @@
|
||||
|
||||
<script>
|
||||
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({
|
||||
|
125
src/views/monitoring/equipmentFullParams/response.js
Normal file
125
src/views/monitoring/equipmentFullParams/response.js
Normal file
@ -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": []
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user