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 loading = ref(false)
|
||||||
const updateCustomTime = ref(false)
|
const updateCustomTime = ref(false)
|
||||||
const editerName = ref()
|
const editerName = ref()
|
||||||
|
const nameMap = ref({})
|
||||||
const currentField = ref({
|
const currentField = ref({
|
||||||
dateFormat: '',
|
dateFormat: '',
|
||||||
id: '',
|
id: '',
|
||||||
@ -720,8 +721,18 @@ const dimensions = computed(() => {
|
|||||||
return allfields.value.filter(ele => ele.groupType === 'd')
|
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 => {
|
const tabChange = val => {
|
||||||
if (val === 'preview') return
|
if (val === 'preview') return
|
||||||
|
dfsGetName(datasetDrag.value.getNodeList(), nameMap.value)
|
||||||
allfields.value.forEach(ele => {
|
allfields.value.forEach(ele => {
|
||||||
if (!Array.isArray(ele.deTypeArr)) {
|
if (!Array.isArray(ele.deTypeArr)) {
|
||||||
ele.deTypeArr =
|
ele.deTypeArr =
|
||||||
@ -745,6 +756,7 @@ const addComplete = () => {
|
|||||||
}
|
}
|
||||||
cancelMap['/datasetData/previewData']?.()
|
cancelMap['/datasetData/previewData']?.()
|
||||||
datasetPreviewLoading.value = false
|
datasetPreviewLoading.value = false
|
||||||
|
dfsGetName(datasetDrag.value.getNodeList(), nameMap.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
@ -1747,7 +1759,13 @@ const getDsIconName = data => {
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<el-table-column prop="deType" :label="t('dataset.field_type')" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
@ -1928,6 +1946,14 @@ const getDsIconName = data => {
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<el-table-column prop="deType" :label="t('dataset.field_type')" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
|
Loading…
Reference in New Issue
Block a user