forked from github/dataease
Merge pull request #7311 from dataease/pr@dev-v2@style_template-manage
style: 修改模版管理添加分类样式
This commit is contained in:
commit
a3da49e87e
@ -172,7 +172,7 @@ const editTemplate = () => {
|
||||
nameCheck(nameCheckRequest).then(response => {
|
||||
save(state.templateInfo).then(response => {
|
||||
ElMessage.success(t('编辑成功'))
|
||||
emits('refresh')
|
||||
emits('refresh', { optType: 'refresh' })
|
||||
emits('closeEditTemplateDialog')
|
||||
})
|
||||
})
|
||||
@ -196,7 +196,7 @@ const importTemplate = () => {
|
||||
}).then(() => {
|
||||
save(state.templateInfo).then(response => {
|
||||
ElMessage.success(t('覆盖成功'))
|
||||
emits('refresh')
|
||||
emits('refresh', { optType: 'refresh' })
|
||||
emits('closeEditTemplateDialog')
|
||||
})
|
||||
})
|
||||
@ -205,7 +205,7 @@ const importTemplate = () => {
|
||||
nameCheck(nameCheckRequest).then(response => {
|
||||
save(state.templateInfo).then(response => {
|
||||
ElMessage.success(t('导入成功'))
|
||||
emits('refresh')
|
||||
emits('refresh', { optType: 'refresh' })
|
||||
emits('closeEditTemplateDialog')
|
||||
})
|
||||
})
|
||||
@ -235,7 +235,7 @@ const goFile = () => {
|
||||
}
|
||||
|
||||
const doAddCategory = () => {
|
||||
emits('addCategoryInfo')
|
||||
emits('refresh', { optType: 'addCategory' })
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
@ -123,7 +123,7 @@
|
||||
:template-id="state.templateDialog.templateId"
|
||||
:opt-type="state.templateDialog.optType"
|
||||
:template-categories="state.templateCategories"
|
||||
@addCategoryInfo="showTemplateEditDialog('new', null)"
|
||||
@doTest="closeEditTemplateDialog"
|
||||
@refresh="showCurrentTemplate(state.currentTemplateId, state.currentTemplateLabel)"
|
||||
@closeEditTemplateDialog="closeEditTemplateDialog"
|
||||
/>
|
||||
@ -144,7 +144,7 @@
|
||||
:template-id="state.templateDialog.templateId"
|
||||
:opt-type="state.templateDialog.optType"
|
||||
:template-categories="state.templateCategories"
|
||||
@refresh="showCurrentTemplate(state.currentTemplateId, state.currentTemplateLabel)"
|
||||
@refresh="importRefresh"
|
||||
@closeEditTemplateDialog="closeEditTemplateDialog"
|
||||
/>
|
||||
</el-dialog>
|
||||
@ -351,6 +351,14 @@ const handleClick = (tab, event) => {
|
||||
getTree()
|
||||
}
|
||||
|
||||
const importRefresh = params => {
|
||||
if (params.optType === 'refresh') {
|
||||
showCurrentTemplate(state.currentTemplateId, state.currentTemplateLabel)
|
||||
} else {
|
||||
showTemplateEditDialog('new', null)
|
||||
}
|
||||
}
|
||||
|
||||
const showCurrentTemplate = (pid, label) => {
|
||||
state.currentTemplateId = pid
|
||||
state.currentTemplateLabel = label
|
||||
|
Loading…
Reference in New Issue
Block a user