历史数据:使用模板数据调整

This commit is contained in:
高云鹏 2025-01-14 15:33:04 +08:00
parent dc260a5c8d
commit fddacfb1be

View File

@ -263,7 +263,7 @@ const changeTemplate = () => {
if (templateData?.column) {
templateData.column.forEach((item: { label: string; prop: string; id: string }) => {
const realProp = item.prop.split('--')
const exist = selectList.find((v: any) => v.attributeCode === realProp[0])
const exist = selectList.find((v: any) => v.id === item.id)
if (exist) {
exist[realProp[1]] = true
} else {
@ -301,6 +301,23 @@ const delTemplate = (id: string) => {
const openMeasure = () => {
selectWindBlower.value = JSON.parse(JSON.stringify(submitParams.windBlowerList))
multipleSelection.value = JSON.parse(JSON.stringify(submitParams.column))
const selectList: any = []
multipleSelection.value.forEach((item: { label: string; prop: string; id: string }) => {
const realProp = item.prop.split('--')
const exist = selectList.find((v: any) => v.id === item.id)
if (exist) {
exist[realProp[1]] = true
} else {
selectList.push({
id: item.id,
attributeCode: realProp[0],
attributeName: item.label,
[realProp[1]]: true,
})
}
})
selectRowList.value = selectList
pointDialogTableData.value.forEach((item) => {
item.interpolation = false
item.average = false