mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 12:03:05 +08:00
Merge pull request #1923 from dataease/pr@dev@feat_panel-flag
fix: 模板导入失败问题
This commit is contained in:
commit
c43ccee18c
@ -4,7 +4,8 @@ export function save(data) {
|
||||
return request({
|
||||
url: '/template/save',
|
||||
data: data,
|
||||
method: 'post'
|
||||
method: 'post',
|
||||
loading: true
|
||||
})
|
||||
}
|
||||
export function templateDelete(id) {
|
||||
|
@ -146,13 +146,17 @@ export default {
|
||||
return false
|
||||
}
|
||||
this.editPanel.panelInfo['newFrom'] = this.inputType
|
||||
this.loading = true
|
||||
panelSave(this.editPanel.panelInfo).then(response => {
|
||||
this.$message({
|
||||
message: this.$t('commons.save_success'),
|
||||
type: 'success',
|
||||
showClose: true
|
||||
})
|
||||
this.loading = false
|
||||
this.$emit('closeEditPanelDialog', response.data)
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleFileChange(e) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-row>
|
||||
<el-row v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
|
||||
<el-row style="margin-top: 5px">
|
||||
<el-col :span="4">{{ $t('commons.name') }}</el-col>
|
||||
<el-col :span="16">
|
||||
@ -44,6 +44,7 @@ export default {
|
||||
name: '',
|
||||
templateStyle: null,
|
||||
templateData: null,
|
||||
dynamicData: null,
|
||||
snapshot: ''
|
||||
}
|
||||
}
|
||||
@ -118,6 +119,7 @@ export default {
|
||||
this.templateInfo.templateStyle = this.importTemplateInfo.panelStyle
|
||||
this.templateInfo.templateData = this.importTemplateInfo.panelData
|
||||
this.templateInfo.snapshot = this.importTemplateInfo.snapshot
|
||||
this.templateInfo.dynamicData = this.importTemplateInfo.dynamicData
|
||||
this.templateInfo.nodeType = 'template'
|
||||
}
|
||||
reader.readAsText(file)
|
||||
|
Loading…
Reference in New Issue
Block a user