提交 70935f80 authored 作者: junjie's avatar junjie

refactor: db数据集增加原表显示

上级 6883911c
...@@ -40,6 +40,10 @@ ...@@ -40,6 +40,10 @@
<p v-if="detail.table.type === 'excel'" class="info-content">{{ $t('dataset.excel_data') }}</p> <p v-if="detail.table.type === 'excel'" class="info-content">{{ $t('dataset.excel_data') }}</p>
<p v-if="detail.table.type === 'custom'" class="info-content">{{ $t('dataset.custom_data') }}</p> <p v-if="detail.table.type === 'custom'" class="info-content">{{ $t('dataset.custom_data') }}</p>
</el-col> </el-col>
<el-col v-show="detail.table.type === 'db'" class="info-item">
<p class="info-title">{{ $t('dataset.table') }}</p>
<p class="info-content">{{ info.table }}</p>
</el-col>
<el-col v-if="detail.table.type === 'db' || detail.table.type === 'sql'" class="info-item"> <el-col v-if="detail.table.type === 'db' || detail.table.type === 'sql'" class="info-item">
<p class="info-title">{{ $t('dataset.mode') }}</p> <p class="info-title">{{ $t('dataset.mode') }}</p>
<p v-if="detail.table.mode === 0" class="info-content">{{ $t('dataset.direct_connect') }}</p> <p v-if="detail.table.mode === 0" class="info-content">{{ $t('dataset.direct_connect') }}</p>
...@@ -105,7 +109,8 @@ export default { ...@@ -105,7 +109,8 @@ export default {
chart: {}, chart: {},
table: {}, table: {},
datasource: {} datasource: {}
} },
info: {}
} }
}, },
watch: { watch: {
...@@ -128,10 +133,12 @@ export default { ...@@ -128,10 +133,12 @@ export default {
if (this.type === 'dataset') { if (this.type === 'dataset') {
post('/dataset/table/datasetDetail/' + this.data.id, null).then(res => { post('/dataset/table/datasetDetail/' + this.data.id, null).then(res => {
this.detail = res.data this.detail = res.data
this.info = JSON.parse(res.data.table.info)
}) })
} else if (this.type === 'chart') { } else if (this.type === 'chart') {
post('/chart/view/chartDetail/' + this.data.id, null).then(res => { post('/chart/view/chartDetail/' + this.data.id, null).then(res => {
this.detail = res.data this.detail = res.data
this.info = JSON.parse(res.data.table.info)
}) })
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论