Merge branch 'dev' of github.com:dataease/dataease into dev

This commit is contained in:
taojinlong 2022-04-17 18:20:11 +08:00
commit b854da1a39
6 changed files with 18 additions and 7 deletions

View File

@ -100,7 +100,11 @@ export default {
if (--loadingCount === 0) {
this.dataLoading = false
}
console.log('outerParams Deocode error', e)
this.$message({
message: this.$t('panel.outer_param_decode_error'),
type: 'error'
})
console.log('outerParams Decode error', e)
}
}
if (tempParam) {

View File

@ -1434,6 +1434,7 @@ export default {
enable_param: 'Enable Param',
param_name: 'Param Name',
outer_param_set: 'Outer Param Set',
outer_param_decode_error: 'External Parameter Parsing Error And Does Not Take Effect, Please Check',
input_param_name: "Please Input Param's Name",
params_setting: 'Outer Params Setting',
template_view_tips: "Template's Views. Please Change",

View File

@ -1435,6 +1435,7 @@ export default {
enable_param: '启用参数',
param_name: '参数名称',
outer_param_set: '外部参数设置',
outer_param_decode_error: '外部参数解析错误未生效,请按规定编码方式传参',
input_param_name: '请输入参数名称',
params_setting: '外部参数设置',
template_view_tips: '当前是模板视图,请点击更换数据集',

View File

@ -1443,6 +1443,7 @@ export default {
enable_param: '启用参数',
param_name: '参数名称',
outer_param_set: '外部参数设置',
outer_param_decode_error: '外部参数解析错误未生效,请按规定编码方式传参',
input_param_name: '请输入参数名称',
params_setting: '外部参数设置',
template_view_tips: '当前是模板视图,请点击更换数据集',

View File

@ -345,8 +345,13 @@ const data = {
// 外部参数 可能会包含多个参数
Object.keys(params).forEach(function(sourceInfo) {
// 获取外部参数的值 sourceInfo 是外部参数名称
const paramValue = params[sourceInfo]
// 获取外部参数的值 sourceInfo 是外部参数名称 支持数组传入
let paramValue = params[sourceInfo]
const operator = 'eq'
if (paramValue && !Array.isArray(paramValue)) {
paramValue = [paramValue]
operator = 'in'
}
// 获取所有目标联动信息
const targetInfoList = trackInfo[sourceInfo] || []
@ -355,7 +360,7 @@ const data = {
const targetViewId = targetInfoArray[0] // 目标视图
if (element.propValue.viewId === targetViewId) { // 如果目标视图 和 当前循环组件id相等 则进行条件增减
const targetFieldId = targetInfoArray[1] // 目标视图列ID
const condition = new Condition('', targetFieldId, 'eq', [paramValue], [targetViewId])
const condition = new Condition('', targetFieldId, operator, paramValue, [targetViewId])
let j = currentFilters.length
while (j--) {
const filter = currentFilters[j]

View File

@ -83,9 +83,8 @@ export default {
}
this.$message({
message: this.$t('panel.json_params_error'),
type: 'error',
showClose: true
message: this.$t('panel.outer_param_decode_error'),
type: 'error'
})
console.log('outerParams Decode error', e)
}