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

View File

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