提交 196f1f68 authored 作者: wangjiahao's avatar wangjiahao

fix: 模板导入失败问题

上级 3f48d8ad
...@@ -4,7 +4,8 @@ export function save(data) { ...@@ -4,7 +4,8 @@ export function save(data) {
return request({ return request({
url: '/template/save', url: '/template/save',
data: data, data: data,
method: 'post' method: 'post',
loading: true
}) })
} }
export function templateDelete(id) { export function templateDelete(id) {
......
...@@ -146,13 +146,17 @@ export default { ...@@ -146,13 +146,17 @@ export default {
return false return false
} }
this.editPanel.panelInfo['newFrom'] = this.inputType this.editPanel.panelInfo['newFrom'] = this.inputType
this.loading = true
panelSave(this.editPanel.panelInfo).then(response => { panelSave(this.editPanel.panelInfo).then(response => {
this.$message({ this.$message({
message: this.$t('commons.save_success'), message: this.$t('commons.save_success'),
type: 'success', type: 'success',
showClose: true showClose: true
}) })
this.loading = false
this.$emit('closeEditPanelDialog', response.data) this.$emit('closeEditPanelDialog', response.data)
}).catch(() => {
this.loading = false
}) })
}, },
handleFileChange(e) { handleFileChange(e) {
......
<template> <template>
<el-row> <el-row v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
<el-row style="margin-top: 5px"> <el-row style="margin-top: 5px">
<el-col :span="4">{{ $t('commons.name') }}</el-col> <el-col :span="4">{{ $t('commons.name') }}</el-col>
<el-col :span="16"> <el-col :span="16">
...@@ -44,6 +44,7 @@ export default { ...@@ -44,6 +44,7 @@ export default {
name: '', name: '',
templateStyle: null, templateStyle: null,
templateData: null, templateData: null,
dynamicData: null,
snapshot: '' snapshot: ''
} }
} }
...@@ -118,6 +119,7 @@ export default { ...@@ -118,6 +119,7 @@ export default {
this.templateInfo.templateStyle = this.importTemplateInfo.panelStyle this.templateInfo.templateStyle = this.importTemplateInfo.panelStyle
this.templateInfo.templateData = this.importTemplateInfo.panelData this.templateInfo.templateData = this.importTemplateInfo.panelData
this.templateInfo.snapshot = this.importTemplateInfo.snapshot this.templateInfo.snapshot = this.importTemplateInfo.snapshot
this.templateInfo.dynamicData = this.importTemplateInfo.dynamicData
this.templateInfo.nodeType = 'template' this.templateInfo.nodeType = 'template'
} }
reader.readAsText(file) reader.readAsText(file)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论