Merge pull request #13157 from dataease/pr@dev-v2@fix_linkage-query

fix(仪表板): 修复跳转关联查询组件时偶现查询组件显示内容与过滤内容不符问题 #12909
This commit is contained in:
王嘉豪 2024-11-06 12:11:30 +08:00 committed by GitHub
commit 564be73a60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 19 deletions

View File

@ -1145,21 +1145,21 @@ export const dvMainStore = defineStore('dataVisualization', {
// 0 文本类型 1 数字类型
if (filterItem.multiple) {
// multiple === true 多选
filterItem.selectValue = queryParams
filterItem.defaultValue = queryParams
filterItem['selectValue'] = queryParams
filterItem['defaultValue'] = queryParams
} else {
// 单选
filterItem.selectValue = queryParams[0]
filterItem.defaultValue = queryParams[0]
filterItem['selectValue'] = queryParams[0]
filterItem['defaultValue'] = queryParams[0]
}
} else if (filterItem.displayType === '1') {
// 1 时间类型
filterItem.selectValue = queryParams[0]
filterItem.defaultValue = queryParams[0]
filterItem['selectValue'] = queryParams[0]
filterItem['defaultValue'] = queryParams[0]
} else if (filterItem.displayType === '7') {
// 7 时间范围类型
filterItem.selectValue = queryParams
filterItem.defaultValue = queryParams
filterItem['selectValue'] = queryParams
filterItem['defaultValue'] = queryParams
} else if (filterItem.displayType === '8') {
// 8 文本搜索
filterItem.conditionValueF = parmaValueSource + ''
@ -1243,26 +1243,28 @@ export const dvMainStore = defineStore('dataVisualization', {
// 0 文本类型 1 数字类型
if (filterItem.multiple) {
// multiple === true 多选
filterItem.selectValue = queryParams
filterItem.defaultValue = queryParams
filterItem['selectValue'] = queryParams
filterItem['defaultValue'] = queryParams
} else {
// 单选
filterItem.selectValue = queryParams[0]
filterItem.defaultValue = queryParams[0]
filterItem['selectValue'] = queryParams[0]
filterItem['defaultValue'] = queryParams[0]
}
filterItem['defaultMapValue'] = queryParams
filterItem['mapValue'] = queryParams
} else if (filterItem.displayType === '1') {
// 1 时间类型
filterItem.selectValue = queryParams[0]
filterItem.defaultValue = queryParams[0]
filterItem['selectValue'] = queryParams[0]
filterItem['defaultValue'] = queryParams[0]
} else if (filterItem.displayType === '7') {
// 7 时间范围类型
if (QDItem.timeValue && Array.isArray(QDItem.timeValue)) {
// 如果dimension.timeValue存在值且是数组 目前判断为是时间组件
filterItem.selectValue = QDItem.timeValue
filterItem.defaultValue = QDItem.timeValue
filterItem['selectValue'] = QDItem.timeValue
filterItem['defaultValue'] = QDItem.timeValue
} else {
filterItem.selectValue = queryParams
filterItem.defaultValue = queryParams
filterItem['selectValue'] = queryParams
filterItem['defaultValue'] = queryParams
}
} else if (filterItem.displayType === '8') {
// 8 文本搜索

View File

@ -106,7 +106,7 @@ const loadCanvasDataAsync = async (dvId, dvType, ignoreParams = false) => {
}
}
initCanvasData(
await initCanvasData(
dvId,
dvType,
function ({