前置管理重启,稳态统计报表重置

This commit is contained in:
sjl
2026-01-23 13:46:00 +08:00
parent ae641604ba
commit 0763187744
6 changed files with 31 additions and 10 deletions

View File

@@ -920,11 +920,14 @@ const setRealData = () => {
}
defineExpose({ setRealData })
onMounted(() => {
init()
initRadioCharts()
getLineDetail({ id: monitoringPoint.state.lineId }).then(res => {
ptName.value = connection.filter(item => item.value == res.data.ptType)[0].code || ''
})
})
onBeforeUnmount(() => {
dataSocket.socketServe?.closeWs()

View File

@@ -116,7 +116,7 @@ const tableStore = new TableStore({
item.data[k.r][k.c].v ? (item.data[k.r][k.c] = k.v) : ''
})
})
console.log(tableStore.table.data)
setTimeout(() => {
luckysheet.create({
container: 'luckysheet',
@@ -129,6 +129,13 @@ const tableStore = new TableStore({
data: tableStore.table.data
})
}, 10)
},
resetCallback: () => {
// 重置模板策略为第一个选项
if (templatePolicy.value && templatePolicy.value.length > 0) {
Template.value = templatePolicy.value[0]
reportForm.value = templatePolicy.value[0]?.reportForm
}
}
})
const loading = ref(false)
@@ -154,7 +161,7 @@ const changetype = (val: any) => {
reportForm.value = val.reportForm
}
const selectChange = () => {
console.log('🚀 ~ selectChange ~ tableStore.table.data.lnegth :', tableStore.table.data.length)
//console.log('🚀 ~ selectChange ~ tableStore.table.data.lnegth :', tableStore.table.data.length)
if (tableStore.table.data.length != 0) {
setTimeout(() => {
luckysheet && luckysheet?.resize()
@@ -165,6 +172,13 @@ const selectChange = () => {
const handleNodeClick = (data: any, node: any) => {
if (data.level == 6) {
dotList.value = data
TableHeaderRef.value.setTheDate(3)
// 重置模板策略为第一个选项
if (templatePolicy.value && templatePolicy.value.length > 0) {
Template.value = templatePolicy.value[0]
reportForm.value = templatePolicy.value[0]?.reportForm
}
tableStore.index()
}
}