forked from github/dataease
fix: 编辑关联数据集删除全部数据表保存提示异常
This commit is contained in:
parent
3820a14229
commit
f12ef0ce16
@ -41,7 +41,7 @@
|
||||
>{{ $t('deDataset.selected') }} {{ tableNum }}
|
||||
{{ ['excel'].includes(datasetType) ? $t('deDataset.table') : $t('deDataset.item') }}</span>
|
||||
<deBtn
|
||||
:disabled="['db', 'excel', 'api'].includes(datasetType) && !tableNum"
|
||||
:disabled="['db', 'excel', 'api', 'union'].includes(datasetType) && !tableNum"
|
||||
type="primary"
|
||||
@click="datasetSave"
|
||||
>{{
|
||||
|
@ -305,12 +305,14 @@ export default {
|
||||
const ds = JSON.parse(JSON.stringify(this.unionItem))
|
||||
ds.currentDs = this.tempDs
|
||||
this.dataset.push(ds)
|
||||
this.$emit('setTableNum', this.dataset.length)
|
||||
this.closeSelectDs()
|
||||
this.calc('union')
|
||||
},
|
||||
deleteNode(index) {
|
||||
this.dataset.splice(index, 1)
|
||||
this.calc('delete')
|
||||
this.$emit('setTableNum', this.dataset.length)
|
||||
},
|
||||
calc(param) {
|
||||
if (param.type === 'union') {
|
||||
@ -385,6 +387,7 @@ export default {
|
||||
(response) => {
|
||||
const table = JSON.parse(JSON.stringify(response.data))
|
||||
this.dataset = JSON.parse(table.info).union
|
||||
this.$emit('setTableNum', this.dataset.length)
|
||||
this.previewData()
|
||||
}
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user