mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 11:32:57 +08:00
commit
9308b27ee3
@ -689,6 +689,7 @@ const addOperation = (cmd, condition, index) => {
|
||||
case 'del':
|
||||
renameInput.value = []
|
||||
conditions.value.splice(index, 1)
|
||||
curComponent.value = null
|
||||
break
|
||||
case 'rename':
|
||||
renameInput.value = []
|
||||
@ -820,7 +821,7 @@ defineExpose({
|
||||
</template>
|
||||
</draggable>
|
||||
</div>
|
||||
<div class="chart-field" :class="curComponent.auto && 'hidden'">
|
||||
<div v-if="!!curComponent" class="chart-field" :class="curComponent.auto && 'hidden'">
|
||||
<div class="mask" v-if="curComponent.auto"></div>
|
||||
<div class="title flex-align-center">
|
||||
选择关联图表及字段
|
||||
@ -917,7 +918,7 @@ defineExpose({
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="condition-configuration">
|
||||
<div v-if="!!curComponent" class="condition-configuration">
|
||||
<div class="mask condition" v-if="curComponent.auto"></div>
|
||||
<div class="title flex-align-center">
|
||||
查询条件配置
|
||||
|
@ -638,16 +638,26 @@ const onChange = file => {
|
||||
fileList = file
|
||||
}
|
||||
|
||||
const replaceLoading = ref(false)
|
||||
const addLoading = ref(false)
|
||||
|
||||
const uploadExcel = editType => {
|
||||
const formData = new FormData()
|
||||
formData.append('file', fileList.raw)
|
||||
formData.append('type', '')
|
||||
formData.append('editType', editType)
|
||||
formData.append('id', (nodeInfo.id || 0) as string)
|
||||
return uploadFile(formData).then(res => {
|
||||
nodeInfo.editType = editType
|
||||
datasourceEditor.value.init(nodeInfo, nodeInfo.id, res)
|
||||
})
|
||||
replaceLoading.value = editType === 0
|
||||
addLoading.value = editType === 1
|
||||
return uploadFile(formData)
|
||||
.then(res => {
|
||||
nodeInfo.editType = editType
|
||||
datasourceEditor.value.init(nodeInfo, nodeInfo.id, res)
|
||||
})
|
||||
.finally(() => {
|
||||
replaceLoading.value = false
|
||||
addLoading.value = false
|
||||
})
|
||||
}
|
||||
const activeName = ref('table')
|
||||
const defaultProps = {
|
||||
@ -839,7 +849,7 @@ const getMenuList = (val: boolean) => {
|
||||
name="file"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button class="replace-excel" type="primary">
|
||||
<el-button v-loading="replaceLoading" class="replace-excel" type="primary">
|
||||
<template #icon>
|
||||
<Icon name="icon_edit_outlined"></Icon>
|
||||
</template>
|
||||
@ -860,7 +870,7 @@ const getMenuList = (val: boolean) => {
|
||||
name="file"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">
|
||||
<el-button v-loading="addLoading" type="primary">
|
||||
<template #icon>
|
||||
<Icon name="icon_new-item_outlined"></Icon>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user