Merge pull request #5023 from dataease/pr@dev_memory_component

Pr@dev memory component
This commit is contained in:
dataeaseShu 2023-04-13 15:45:10 +08:00 committed by GitHub
commit 5b2564dce5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<template>
<div class="de-dataset-form">
<div class="top">
<div class="top" v-loading="loading">
<span class="name">
<i
class="el-icon-arrow-left"
@ -43,7 +43,6 @@
<deBtn
:disabled="['db', 'excel', 'api'].includes(datasetType) && !tableNum"
type="primary"
:loading="loading"
@click="datasetSave"
>{{
$t('commons.save')
@ -58,6 +57,7 @@
:origin-name="originName"
:name-list="nameList"
@setTableNum="(val) => (tableNum = val)"
@datasourceLoading="(val) => loading = val"
/>
</div>
</div>
@ -80,9 +80,9 @@ export default {
return {
originName: '',
tableNum: 0,
loading: false,
showInput: false,
editType: '',
loading: false,
selectDatasets: [],
tData: [],
datasetType: '',
@ -185,7 +185,6 @@ export default {
return
}
}
this.loading = true
this.$refs.addDataset.save()
},
handleClick() {
@ -219,6 +218,7 @@ export default {
)
},
initTable(id) {
this.loading = true
post('/dataset/table/getWithPermission/' + id, null)
.then((response) => {
const { sceneId: id, id: tableId, name } = response.data || {}
@ -234,7 +234,10 @@ export default {
this.table.editType = +this.editType
}
})
.catch(() => {})
.catch(() => { })
.finally(() => {
this.loading = false
})
},
switchComponent(c) {
switch (c) {

View File

@ -905,6 +905,7 @@ export default {
initTableInfo() {
const tableId = this.param.tableId || this.$route.query.id
if (tableId) {
this.$emit('datasourceLoading', true)
getTable(tableId).then((response) => {
const table = response.data
this.dataSource = table.dataSourceId
@ -919,6 +920,8 @@ export default {
).sql
}
this.variables = JSON.parse(table.sqlVariableDetails)
}).finally(() => {
this.$emit('datasourceLoading', false)
})
}
},

View File

@ -722,6 +722,7 @@
:visible.sync="editCalcField"
class="de-dialog-form de-center-dialog"
width="980px"
:before-close="closeCalcField"
:title="
currEditField.id
? $t('dataset.edit_calc_field')
@ -730,6 +731,7 @@
append-to-body
>
<calc-field-edit
ref="calcFieldEdit"
:param="param"
:table-fields="tableFields"
:field="currEditField"
@ -893,6 +895,7 @@ export default {
closeCalcField() {
this.editCalcField = false
this.$refs.calcFieldEdit.resetField()
this.initField()
},