refactor: 模版管理优化,系统模板的管理需要授权

This commit is contained in:
wangjiahao
2022-05-17 14:42:03 +08:00
parent aae5c707ac
commit aee2fd9bcf
2 changed files with 11 additions and 8 deletions

View File

@@ -2,10 +2,11 @@
<de-container>
<de-aside-container>
<el-tabs v-model="currentTemplateType" @tab-click="handleClick">
<el-tab-pane name="system">
<span slot="label"><i class="el-icon-document tablepanel-i" /> {{ $t('panel.sys_template') }}</span>
<el-tab-pane name="self">
<span slot="label"><i class="el-icon-star-off tablepanel-i" />{{ $t('panel.user_template') }}</span>
<!--v-if 重新渲染 强制刷新首行高亮属性-->
<template-list
v-if="currentTemplateType==='system'"
v-if="currentTemplateType==='self'"
:template-type="currentTemplateType"
:template-list="templateList"
@templateDelete="templateDelete"
@@ -15,11 +16,10 @@
@showTemplateEditDialog="showTemplateEditDialog"
/>
</el-tab-pane>
<el-tab-pane name="self">
<span slot="label"><i class="el-icon-star-off tablepanel-i" />{{ $t('panel.user_template') }}</span>
<!--v-if 重新渲染 强制刷新首行高亮属性-->
<el-tab-pane v-permission="['sys-template:read']" name="system">
<span slot="label" v-permission="['sys-template:read']"><i class="el-icon-document tablepanel-i" /> {{ $t('panel.sys_template') }}</span>
<template-list
v-if="currentTemplateType==='self'"
v-if="currentTemplateType==='system'"
:template-type="currentTemplateType"
:template-list="templateList"
@templateDelete="templateDelete"
@@ -81,7 +81,7 @@ export default {
showShare: false,
currentTemplateShowList: [],
currentPid: '',
currentTemplateType: 'system',
currentTemplateType: 'self',
templateEditFormRules: {
name: [
{ required: true, message: this.$t('commons.input_content'), trigger: 'change' },