refactor: 优化外部参数过滤组件配置名称显示

This commit is contained in:
wangjiahao 2023-11-28 15:14:21 +08:00
parent 34ea49b15a
commit 5ef1e4970a

View File

@ -284,7 +284,20 @@ export default {
targetFieldId: null
},
currentLinkPanelViewArray: [],
viewIdFieldArrayMap: {}
viewIdFieldArrayMap: {},
widgetSubjectsTrans: {
timeYearWidget: '年份过滤组件',
timeMonthWidget: '年月过滤组件',
timeDateWidget: '日期过滤组件',
timeDateRangeWidget: '日期范围过滤组件',
textSelectWidget: '文本下拉过滤组件',
textSelectGridWidget: '文本列表过滤组件',
textInputWidget: '文本搜索过滤组件',
textSelectTreeWidget: '下拉树过滤组件',
numberSelectWidget: '数字下来过滤组件',
numberSelectGridWidget: '数字列表过滤组件',
numberRangeWidget: '数值区间过滤组件'
}
}
},
@ -374,7 +387,7 @@ export default {
this.currentLinkPanelViewArray.push({
id: componentItem.id,
type: 'filter',
name: componentItem.options.attrs.title ? componentItem.options.attrs.title : '过滤组件'
name: componentItem.options.attrs.title ? componentItem.options.attrs.title : this.widgetSubjectsTrans[componentItem.serviceName]
})
this.viewIdFieldArrayMap[componentItem.id] = [{ id: 'empty', name: this.$t('panel.filter_no_select') }]
}