forked from github/dataease
Merge pull request #12520 from dataease/pr@dev-v2_st
feat(数据集): 数据集字段的批量管理中增加表名列
This commit is contained in:
commit
7d4fc0c120
@ -98,6 +98,7 @@ const maskShow = ref(false)
|
||||
const loading = ref(false)
|
||||
const updateCustomTime = ref(false)
|
||||
const editerName = ref()
|
||||
const nameMap = ref({})
|
||||
const currentField = ref({
|
||||
dateFormat: '',
|
||||
id: '',
|
||||
@ -720,8 +721,18 @@ const dimensions = computed(() => {
|
||||
return allfields.value.filter(ele => ele.groupType === 'd')
|
||||
})
|
||||
|
||||
const dfsGetName = (list, name) => {
|
||||
list.forEach(ele => {
|
||||
name[ele.id] = ele.tableName
|
||||
if (ele.children?.length) {
|
||||
dfsGetName(ele.children, name)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const tabChange = val => {
|
||||
if (val === 'preview') return
|
||||
dfsGetName(datasetDrag.value.getNodeList(), nameMap.value)
|
||||
allfields.value.forEach(ele => {
|
||||
if (!Array.isArray(ele.deTypeArr)) {
|
||||
ele.deTypeArr =
|
||||
@ -745,6 +756,7 @@ const addComplete = () => {
|
||||
}
|
||||
cancelMap['/datasetData/previewData']?.()
|
||||
datasetPreviewLoading.value = false
|
||||
dfsGetName(datasetDrag.value.getNodeList(), nameMap.value)
|
||||
}
|
||||
|
||||
const state = reactive({
|
||||
@ -1747,7 +1759,13 @@ const getDsIconName = data => {
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="datasetTableId" label="表名" width="240">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.extField === 0">
|
||||
{{ nameMap[scope.row.datasetTableId] }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deType" :label="t('dataset.field_type')" width="200">
|
||||
<template #default="scope">
|
||||
<el-cascader
|
||||
@ -1928,6 +1946,14 @@ const getDsIconName = data => {
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="datasetTableId" label="表名" width="240">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.extField === 0">
|
||||
{{ nameMap[scope.row.datasetTableId] }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="deType" :label="t('dataset.field_type')" width="200">
|
||||
<template #default="scope">
|
||||
<el-cascader
|
||||
|
Loading…
Reference in New Issue
Block a user