forked from github/dataease
fix: 修复编辑计算字段可重复提交的问题
This commit is contained in:
parent
da6bbe7ddc
commit
b686c10183
@ -209,6 +209,7 @@
|
||||
:disabled="!fieldForm.name || !fieldForm.originName"
|
||||
type="primary"
|
||||
size="mini"
|
||||
:loading="loading"
|
||||
@click="saveCalcField"
|
||||
>{{ $t('dataset.confirm') }}
|
||||
</el-button>
|
||||
@ -302,7 +303,8 @@ export default {
|
||||
quotaData: [],
|
||||
functionData: [],
|
||||
tableFields: {},
|
||||
name2Auto: []
|
||||
name2Auto: [],
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -446,8 +448,10 @@ export default {
|
||||
this.fieldForm.columnIndex = 0
|
||||
this.fieldForm.chartId = this.param.id
|
||||
}
|
||||
this.loading = true
|
||||
post('/chart/field/save/' + this.panelInfo.id, { ...this.fieldForm, originName: this.setNameIdTrans('name', 'id', originName) }).then(response => {
|
||||
this.closeCalcField()
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -171,7 +171,7 @@
|
||||
<el-row>
|
||||
<div class="dialog-button">
|
||||
<el-button size="mini" @click="closeCalcField">{{ $t('dataset.cancel') }}</el-button>
|
||||
<el-button :disabled="!fieldForm.name || !fieldForm.originName" type="primary" size="mini" @click="saveCalcField">{{ $t('dataset.confirm') }}</el-button>
|
||||
<el-button :disabled="!fieldForm.name || !fieldForm.originName" :loading="loading" type="primary" size="mini" @click="saveCalcField">{{ $t('dataset.confirm') }}</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-row>
|
||||
@ -259,7 +259,8 @@ export default {
|
||||
dimensionData: [],
|
||||
quotaData: [],
|
||||
name2Auto: [],
|
||||
functionData: []
|
||||
functionData: [],
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -396,9 +397,11 @@ export default {
|
||||
this.fieldForm.tableId = this.param.id
|
||||
this.fieldForm.columnIndex = this.tableFields.dimensionList.length + this.tableFields.quotaList.length
|
||||
}
|
||||
this.loading = true
|
||||
post('/dataset/field/save', { ...this.fieldForm, originName: this.setNameIdTrans('name', 'id', originName) }).then(response => {
|
||||
localStorage.setItem('reloadDsData', 'true')
|
||||
this.closeCalcField()
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user