refactor: 过滤跳转适配
This commit is contained in:
parent
ae0406e64b
commit
a2c13b461d
@ -452,7 +452,7 @@ const data = {
|
|||||||
currentFilters.push(condition)
|
currentFilters.push(condition)
|
||||||
}
|
}
|
||||||
if (element.type === 'custom' && element.id === targetViewId) { // 过滤组件处理
|
if (element.type === 'custom' && element.id === targetViewId) { // 过滤组件处理
|
||||||
element.options.value = dimension.value
|
element.options.value = [dimension.value]
|
||||||
// 去掉动态时间
|
// 去掉动态时间
|
||||||
if (element.options.manualModify) {
|
if (element.options.manualModify) {
|
||||||
element.options.manualModify = false
|
element.options.manualModify = false
|
||||||
@ -486,23 +486,10 @@ const data = {
|
|||||||
Object.keys(params).forEach(function(sourceInfo) {
|
Object.keys(params).forEach(function(sourceInfo) {
|
||||||
// 获取外部参数的值 sourceInfo 是外部参数名称 支持数组传入
|
// 获取外部参数的值 sourceInfo 是外部参数名称 支持数组传入
|
||||||
let paramValue = params[sourceInfo]
|
let paramValue = params[sourceInfo]
|
||||||
let paramValueStr = params[sourceInfo]
|
|
||||||
let paramValueTree = params[sourceInfo]
|
|
||||||
let operator = 'in'
|
let operator = 'in'
|
||||||
if (paramValue && !Array.isArray(paramValue)) {
|
if (paramValue && !Array.isArray(paramValue)) {
|
||||||
paramValue = [paramValue]
|
paramValue = [paramValue]
|
||||||
operator = 'eq'
|
operator = 'eq'
|
||||||
} else if (paramValue && Array.isArray(paramValue)) {
|
|
||||||
paramValueStr = ''
|
|
||||||
paramValue.forEach((innerValue, index) => {
|
|
||||||
if (index === 0) {
|
|
||||||
paramValueStr = innerValue
|
|
||||||
paramValueTree = innerValue
|
|
||||||
} else {
|
|
||||||
paramValueStr = paramValueStr + ',' + innerValue
|
|
||||||
paramValueTree = paramValueTree + '-de-' + innerValue
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
// 获取所有目标联动信息
|
// 获取所有目标联动信息
|
||||||
const targetInfoList = trackInfo[sourceInfo] || []
|
const targetInfoList = trackInfo[sourceInfo] || []
|
||||||
@ -526,13 +513,7 @@ const data = {
|
|||||||
currentFilters.push(condition)
|
currentFilters.push(condition)
|
||||||
}
|
}
|
||||||
if (element.type === 'custom' && element.id === targetViewId) { // 过滤组件处理
|
if (element.type === 'custom' && element.id === targetViewId) { // 过滤组件处理
|
||||||
if (element.component === 'de-number-range') {
|
element.options.value = paramValue
|
||||||
element.options.value = paramValue
|
|
||||||
} else if (element.component === 'de-select-tree') {
|
|
||||||
element.options.value = paramValueTree
|
|
||||||
} else {
|
|
||||||
element.options.value = paramValueStr
|
|
||||||
}
|
|
||||||
// 去掉动态时间
|
// 去掉动态时间
|
||||||
if (element.options.manualModify) {
|
if (element.options.manualModify) {
|
||||||
element.options.manualModify = false
|
element.options.manualModify = false
|
||||||
|
|||||||
@ -478,17 +478,7 @@ export default {
|
|||||||
completeSingle: false // 当匹配只有一项的时候是否自动补全
|
completeSingle: false // 当匹配只有一项的时候是否自动补全
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
widgetSubjectsFilter: {
|
widgetSubjectsFilter: ['textSelectWidget', 'textSelectGridWidget', 'textInputWidget', 'textSelectTreeWidget', 'numberSelectWidget', 'numberSelectGridWidget'],
|
||||||
timeYearWidget: '年份过滤组件',
|
|
||||||
timeMonthWidget: '年月过滤组件',
|
|
||||||
timeDateWidget: '日期过滤组件',
|
|
||||||
textSelectWidget: '文本下拉过滤组件',
|
|
||||||
textSelectGridWidget: '文本列表过滤组件',
|
|
||||||
textInputWidget: '文本搜索过滤组件',
|
|
||||||
textSelectTreeWidget: '下拉树过滤组件',
|
|
||||||
numberSelectWidget: '数字下拉过滤组件',
|
|
||||||
numberSelectGridWidget: '数字列表过滤组件',
|
|
||||||
},
|
|
||||||
widgetSubjectsTrans: {
|
widgetSubjectsTrans: {
|
||||||
timeYearWidget: '年份过滤组件',
|
timeYearWidget: '年份过滤组件',
|
||||||
timeMonthWidget: '年月过滤组件',
|
timeMonthWidget: '年月过滤组件',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user