|
|
@ -1,6 +1,6 @@ |
|
|
|
<!-- eslint-disable vue/multi-word-component-names --> |
|
|
|
<template> |
|
|
|
<div style="background: #ffffff; height: 95%; position: relative"> |
|
|
|
<div style="background: #ffffff; height: 95%; position: relative; overflow-y: auto"> |
|
|
|
<a-spin :spinning="loading" style="height: 100%"> |
|
|
|
<a-table |
|
|
|
:columns="tableColumns" |
|
|
@ -8,7 +8,7 @@ |
|
|
|
bordered |
|
|
|
:pagination="false" |
|
|
|
:height="500" |
|
|
|
:scroll="{ x: x, y: 440 }"> |
|
|
|
:scroll="{ x: x }"> |
|
|
|
<template #title> |
|
|
|
<div |
|
|
|
style=" |
|
|
@ -68,22 +68,15 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</a-table> |
|
|
|
</a-spin> |
|
|
|
<a-pagination |
|
|
|
:total="total" |
|
|
|
:show-total="(total, range) => ` 共 ${total} 条`" |
|
|
|
size="small" |
|
|
|
:show-total="(total, range) => `显示第${range[0]}到${range[1]}条记录 ,共${total} 条记录`" |
|
|
|
show-size-changer |
|
|
|
show-quick-jumper |
|
|
|
@change="onChange" |
|
|
|
style=" |
|
|
|
display: flex; |
|
|
|
position: absolute; |
|
|
|
bottom: 20px; |
|
|
|
right: 30px; |
|
|
|
justify-content: right; |
|
|
|
margin-top: 10px; |
|
|
|
margin-right: 30px; |
|
|
|
" /> |
|
|
|
style="display: flex; justify-content: right; margin-top: 10px; margin-right: 30px" /> |
|
|
|
</a-spin> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script lang="ts" setup> |
|
|
@ -288,7 +281,7 @@ |
|
|
|
// 获取表格数据 |
|
|
|
const getTableList = () => { |
|
|
|
loading.value = true; |
|
|
|
tableColumns.value = []; |
|
|
|
tableColumns.value = tableColumnsA; |
|
|
|
data.value = []; |
|
|
|
total.value = 0; |
|
|
|
pageData.value = []; |
|
|
@ -318,6 +311,7 @@ |
|
|
|
timeRate: frequencyValue.value, // 频率 |
|
|
|
}) |
|
|
|
.then((res) => { |
|
|
|
if (res.retcode == 0) { |
|
|
|
// 拼接表头 |
|
|
|
let headerList = res.data.headerList; |
|
|
|
let tableColumnsB = []; |
|
|
@ -330,6 +324,7 @@ |
|
|
|
}); |
|
|
|
} |
|
|
|
x.value = 360 + headerList.length * 60; |
|
|
|
debugger; |
|
|
|
let columnA: any[] = [...tableColumnsA]; |
|
|
|
columnA.push(...tableColumnsB); |
|
|
|
tableColumns.value = columnA; |
|
|
@ -338,6 +333,9 @@ |
|
|
|
data.value = res.data.data; |
|
|
|
total.value = res.data.data.length; |
|
|
|
onChange(1, 10); |
|
|
|
} else { |
|
|
|
x.value = 360; |
|
|
|
} |
|
|
|
}) |
|
|
|
.finally(() => { |
|
|
|
loading.value = false; |
|
|
@ -349,10 +347,10 @@ |
|
|
|
.get(environmentMonitor.queryDeviceArea, { orgId: orgId.value, point: typeValue.value }) |
|
|
|
.then((res) => { |
|
|
|
treeData2.value = res.data; |
|
|
|
if (treeData2.value && treeData2.value.length > 0) { |
|
|
|
quyuvalue.value = [treeData2.value[0].childList[0].id]; |
|
|
|
getTableList(); |
|
|
|
} |
|
|
|
// if (treeData2.value && treeData2.value.length > 0) { |
|
|
|
// quyuvalue.value = [treeData2.value[0].childList[0].id]; |
|
|
|
// getTableList(); |
|
|
|
// } |
|
|
|
}); |
|
|
|
}; |
|
|
|
// 导出excel文件 |
|
|
@ -360,6 +358,7 @@ |
|
|
|
exportExcel(tableColumns.value, data.value, '历史数据导出', true, 'location', 1, 3); |
|
|
|
}; |
|
|
|
onMounted(async () => { |
|
|
|
tableColumns.value = tableColumnsA; |
|
|
|
// 获取频率 |
|
|
|
let frequency = await getEnum({ params: { enumType: 'TimeFlagEnum' } }); |
|
|
|
frequencyOptions.value = frequency.data; |
|
|
@ -378,6 +377,7 @@ |
|
|
|
} |
|
|
|
// 获取区域数据 |
|
|
|
await queryDeviceArea(); |
|
|
|
getTableList(); |
|
|
|
}); |
|
|
|
|
|
|
|
// 分页器 |
|
|
@ -403,7 +403,7 @@ |
|
|
|
::v-deep .ant-table.ant-table-bordered > .ant-table-title { |
|
|
|
border: none !important; |
|
|
|
} |
|
|
|
::v-deep .ant-table-title + .ant-table-container table > thead > tr:first-child th:last-child { |
|
|
|
/* ::v-deep .ant-table-title + .ant-table-container table > thead > tr:first-child th:last-child { |
|
|
|
display: none !important; |
|
|
|
} |
|
|
|
} */ |
|
|
|
</style> |
|
|
|