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