refactor(数据大屏、仪表板): 外部参数名称禁止重复或未配置,修改跳转条件匹配外部参数问题
This commit is contained in:
parent
3563dcf625
commit
c9e2ba645c
@ -104,7 +104,7 @@
|
||||
LEFT JOIN visualization_link_jump_target_view_info ON visualization_link_jump_info.id = visualization_link_jump_target_view_info.link_jump_info_id
|
||||
LEFT JOIN xpack_share ON xpack_share.creator = #{uid}
|
||||
AND visualization_link_jump_info.target_dv_id = xpack_share.resource_id
|
||||
left join visualization_outer_params_info on visualization_outer_params_info.params_id = visualization_link_jump_target_view_info.target_view_id
|
||||
left join visualization_outer_params_info on visualization_outer_params_info.params_info_id = visualization_link_jump_target_view_info.target_view_id
|
||||
WHERE
|
||||
core_chart_view.id = #{source_view_id}
|
||||
AND core_chart_view.type != 'VQuery'
|
||||
@ -164,7 +164,7 @@
|
||||
|
||||
<select id="queryOutParamsTargetWithDvId" resultType="io.dataease.api.visualization.vo.VisualizationOutParamsJumpVO">
|
||||
SELECT
|
||||
vopi.params_id as id,
|
||||
vopi.params_info_id as id,
|
||||
vopi.param_name as name,
|
||||
vopi.param_name as title,
|
||||
'outerParams' as type
|
||||
|
||||
@ -596,8 +596,14 @@ const jsonArrayCheck = params => {
|
||||
const save = () => {
|
||||
const outerParamsCopy = deepCopy(state.outerParams)
|
||||
let checkErrorNum = 0
|
||||
let checkNullErrorNum = 0
|
||||
let checkMessage = ''
|
||||
const paramNameArray = []
|
||||
outerParamsCopy.outerParamsInfoArray?.forEach(outerParamsInfo => {
|
||||
if (!outerParamsInfo.paramName || paramNameArray.includes(outerParamsInfo.paramName)) {
|
||||
checkNullErrorNum++
|
||||
}
|
||||
paramNameArray.push(outerParamsInfo.paramName)
|
||||
if (outerParamsInfo.defaultValue && !jsonArrayCheck(outerParamsInfo.defaultValue)) {
|
||||
checkErrorNum++
|
||||
checkMessage = checkMessage + `【${outerParamsInfo.paramName}】`
|
||||
@ -636,6 +642,14 @@ const save = () => {
|
||||
})
|
||||
return
|
||||
}
|
||||
if (checkNullErrorNum > 0) {
|
||||
ElMessage({
|
||||
message: `存在未配置的参数名或者参数名称重复!`,
|
||||
type: 'warning',
|
||||
showClose: true
|
||||
})
|
||||
return
|
||||
}
|
||||
updateOuterParamsSet(outerParamsCopy).then(() => {
|
||||
ElMessage({
|
||||
message: t('commons.save_success'),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user