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) => {
|
||||
return list.forEach(ele => {
|
||||
arr.push(ele.tableName)
|
||||
list.forEach(ele => {
|
||||
arr.push(`${ele.tableName}${ele.datasourceId}`)
|
||||
if (ele.children?.length) {
|
||||
dfsNodeNameList(ele.children, arr)
|
||||
}
|
||||
|
@ -634,7 +634,7 @@ const tabChange = val => {
|
||||
|
||||
const addComplete = () => {
|
||||
state.nodeNameList = [...datasetDrag.value.nodeNameList]
|
||||
if (!state.nodeNameList) {
|
||||
if (!state.nodeNameList?.length) {
|
||||
columns.value = []
|
||||
tableData.value = []
|
||||
}
|
||||
@ -1280,14 +1280,14 @@ const getDsIconName = data => {
|
||||
<div
|
||||
:class="[
|
||||
{
|
||||
'not-allow': state.nodeNameList.includes(ele.tableName)
|
||||
'not-allow': state.nodeNameList.includes(`${ele.tableName}${dataSource}`)
|
||||
}
|
||||
]"
|
||||
class="list-item_primary"
|
||||
:title="ele.name"
|
||||
@dragstart="$event => dragstart($event, ele)"
|
||||
@dragend="maskShow = false"
|
||||
:draggable="!state.nodeNameList.includes(ele.tableName)"
|
||||
:draggable="!state.nodeNameList.includes(`${ele.tableName}${dataSource}`)"
|
||||
@click="setActiveName(ele)"
|
||||
>
|
||||
<el-icon class="icon-color">
|
||||
|
Loading…
Reference in New Issue
Block a user