forked from github/dataease
Merge pull request #10070 from dataease/pr@dev-v2@refactor_linkage
refactor: 优化联动设置,联动源字段只允许是维度字段
This commit is contained in:
commit
70292d4299
@ -371,14 +371,9 @@ const linkageFieldAdaptor = async data => {
|
||||
if (state.curLinkageViewInfo.tableId === targetChartDetails.tableId) {
|
||||
const curCheckAllAxisStr =
|
||||
JSON.stringify(state.curLinkageViewInfo.xAxis) +
|
||||
JSON.stringify(state.curLinkageViewInfo.xAxisExt) +
|
||||
JSON.stringify(state.curLinkageViewInfo.yAxis) +
|
||||
JSON.stringify(state.curLinkageViewInfo.yAxisExt)
|
||||
JSON.stringify(state.curLinkageViewInfo.xAxisExt)
|
||||
const targetCheckAllAxisStr =
|
||||
JSON.stringify(targetChartDetails.xAxis) +
|
||||
JSON.stringify(targetChartDetails.xAxisExt) +
|
||||
JSON.stringify(targetChartDetails.yAxis) +
|
||||
JSON.stringify(targetChartDetails.yAxisExt)
|
||||
JSON.stringify(targetChartDetails.xAxis) + JSON.stringify(targetChartDetails.xAxisExt)
|
||||
state.sourceLinkageInfo.targetViewFields.forEach(item => {
|
||||
if (curCheckAllAxisStr.includes(item.id) && targetCheckAllAxisStr.includes(item.id)) {
|
||||
addLinkageField(item.id, item.id)
|
||||
@ -395,9 +390,7 @@ const sourceLinkageInfoFilter = computed(() => {
|
||||
if (state.sourceLinkageInfo.targetViewFields) {
|
||||
const curCheckAllAxisStr =
|
||||
JSON.stringify(state.curLinkageViewInfo.xAxis) +
|
||||
JSON.stringify(state.curLinkageViewInfo.xAxisExt) +
|
||||
JSON.stringify(state.curLinkageViewInfo.yAxis) +
|
||||
JSON.stringify(state.curLinkageViewInfo.yAxisExt)
|
||||
JSON.stringify(state.curLinkageViewInfo.xAxisExt)
|
||||
return state.sourceLinkageInfo.targetViewFields.filter(item =>
|
||||
curCheckAllAxisStr.includes(item.id)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user