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