forked from github/dataease
fix: 不同数据源同名的表无法做关联(无法选中)
This commit is contained in:
parent
33a68c46f4
commit
2b95be6022
@ -95,8 +95,8 @@ const dfsNodeList = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const dfsNodeNameList = (list, arr) => {
|
const dfsNodeNameList = (list, arr) => {
|
||||||
return list.forEach(ele => {
|
list.forEach(ele => {
|
||||||
arr.push(ele.tableName)
|
arr.push(`${ele.tableName}${ele.datasourceId}`)
|
||||||
if (ele.children?.length) {
|
if (ele.children?.length) {
|
||||||
dfsNodeNameList(ele.children, arr)
|
dfsNodeNameList(ele.children, arr)
|
||||||
}
|
}
|
||||||
|
@ -634,7 +634,7 @@ const tabChange = val => {
|
|||||||
|
|
||||||
const addComplete = () => {
|
const addComplete = () => {
|
||||||
state.nodeNameList = [...datasetDrag.value.nodeNameList]
|
state.nodeNameList = [...datasetDrag.value.nodeNameList]
|
||||||
if (!state.nodeNameList) {
|
if (!state.nodeNameList?.length) {
|
||||||
columns.value = []
|
columns.value = []
|
||||||
tableData.value = []
|
tableData.value = []
|
||||||
}
|
}
|
||||||
@ -1280,14 +1280,14 @@ const getDsIconName = data => {
|
|||||||
<div
|
<div
|
||||||
:class="[
|
:class="[
|
||||||
{
|
{
|
||||||
'not-allow': state.nodeNameList.includes(ele.tableName)
|
'not-allow': state.nodeNameList.includes(`${ele.tableName}${dataSource}`)
|
||||||
}
|
}
|
||||||
]"
|
]"
|
||||||
class="list-item_primary"
|
class="list-item_primary"
|
||||||
:title="ele.name"
|
:title="ele.name"
|
||||||
@dragstart="$event => dragstart($event, ele)"
|
@dragstart="$event => dragstart($event, ele)"
|
||||||
@dragend="maskShow = false"
|
@dragend="maskShow = false"
|
||||||
:draggable="!state.nodeNameList.includes(ele.tableName)"
|
:draggable="!state.nodeNameList.includes(`${ele.tableName}${dataSource}`)"
|
||||||
@click="setActiveName(ele)"
|
@click="setActiveName(ele)"
|
||||||
>
|
>
|
||||||
<el-icon class="icon-color">
|
<el-icon class="icon-color">
|
||||||
|
Loading…
Reference in New Issue
Block a user