feat(cms):优化导航管理界面功能布局
- 调整按钮布局,将模型管理和清除缓存按钮移至显眼位置 - 添加展开/折叠按钮的图标和状态切换逻辑- 增加备份和恢复功能按钮,仅超级管理员可见- 移除重复的模型管理和清除缓存按钮 - 引入新的图标组件支持展开/折叠操作- 删除未使用的页面组件引用 - 更新开发环境配置,注释本地API地址
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
VITE_APP_NAME=后台管理(开发环境)
|
||||
VITE_API_URL=http://127.0.0.1:9200/api
|
||||
#VITE_API_URL=http://127.0.0.1:9200/api
|
||||
#VITE_SERVER_API_URL=http://127.0.0.1:8000/api
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,13 @@
|
||||
<a-button type="dashed" class="ele-btn-icon" @click="foldAll">
|
||||
折叠
|
||||
</a-button>
|
||||
<a-button type="dashed" @click="openUrl('/website/model')"
|
||||
>模型管理
|
||||
</a-button
|
||||
>
|
||||
<a-button type="dashed" class="ele-btn-icon" @click="clearSiteInfoCache">
|
||||
清除缓存
|
||||
</a-button>
|
||||
<a-divider type="vertical"/>
|
||||
<a-radio-group v-model:value="position" @change="reload">
|
||||
<a-radio-button :value="1">顶部</a-radio-button>
|
||||
@@ -41,15 +48,6 @@
|
||||
@search="reload"
|
||||
@pressEnter="reload"
|
||||
/>
|
||||
<a-button
|
||||
type="text"
|
||||
@click="openUrl('/website/model')"
|
||||
>模型管理
|
||||
</a-button
|
||||
>
|
||||
<a-button type="text" class="ele-btn-icon" @click="clearSiteInfoCache">
|
||||
清除缓存
|
||||
</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -24,23 +24,44 @@
|
||||
<a-space>
|
||||
<a-button type="primary" class="ele-btn-icon" @click="openEdit()">
|
||||
<template #icon>
|
||||
<plus-outlined/>
|
||||
<PlusOutlined/>
|
||||
</template>
|
||||
<span>新建</span>
|
||||
</a-button>
|
||||
<template v-if="expandedRowKeys.length == 0">
|
||||
<a-button type="dashed" class="ele-btn-icon" @click="expandAll">
|
||||
<template #icon>
|
||||
<PlusSquareOutlined />
|
||||
</template>
|
||||
展开
|
||||
</a-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a-button type="dashed" class="ele-btn-icon" @click="foldAll">
|
||||
<template #icon>
|
||||
<MinusSquareOutlined />
|
||||
</template>
|
||||
折叠
|
||||
</a-button>
|
||||
</template>
|
||||
<a-divider type="vertical"/>
|
||||
<a-button type="dashed" :disabled="!hasRole('superAdmin')" @click="handleExport">备份</a-button>
|
||||
<a-button type="dashed" :disabled="!hasRole('superAdmin')" @click="openImport">恢复</a-button>
|
||||
<a-button
|
||||
type="dashed"
|
||||
@click="push('/website/model')"
|
||||
>模型管理
|
||||
</a-button
|
||||
>
|
||||
<a-button type="dashed" class="ele-btn-icon" @click="clearSiteInfoCache">
|
||||
清除缓存
|
||||
</a-button>
|
||||
<a-divider type="vertical"/>
|
||||
<a-radio-group v-model:value="position" @change="reload">
|
||||
<a-radio-button :value="1">顶部</a-radio-button>
|
||||
<a-radio-button :value="2">底部</a-radio-button>
|
||||
<a-radio-button :value="0">不限</a-radio-button>
|
||||
</a-radio-group>
|
||||
<a-divider type="vertical"/>
|
||||
<a-select
|
||||
v-model:value="modelName"
|
||||
style="width: 150px"
|
||||
@@ -60,15 +81,6 @@
|
||||
@search="reload"
|
||||
@pressEnter="reload"
|
||||
/>
|
||||
<a-button
|
||||
type="text"
|
||||
@click="push('/website/model')"
|
||||
>模型管理
|
||||
</a-button
|
||||
>
|
||||
<a-button type="text" class="ele-btn-icon" @click="clearSiteInfoCache">
|
||||
清除缓存
|
||||
</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
@@ -218,7 +230,7 @@
|
||||
<script lang="ts" setup>
|
||||
import {ref} from 'vue';
|
||||
import {message} from 'ant-design-vue/es';
|
||||
import {PlusOutlined, CopyOutlined, FileWordOutlined} from '@ant-design/icons-vue';
|
||||
import {PlusOutlined, CopyOutlined, FileWordOutlined, MinusOutlined, MinusSquareOutlined, PlusSquareOutlined} from '@ant-design/icons-vue';
|
||||
import type {
|
||||
DatasourceFunction,
|
||||
ColumnItem,
|
||||
@@ -250,6 +262,7 @@ import Extra from "./components/extra.vue";
|
||||
import {useRouter} from 'vue-router';
|
||||
import {listCmsModel} from "@/api/cms/cmsModel";
|
||||
import {CmsModel} from "@/api/cms/cmsModel/model";
|
||||
import {hasRole} from "@/utils/permission";
|
||||
|
||||
const {push} = useRouter();
|
||||
// 表格实例
|
||||
@@ -358,8 +371,6 @@ const design = ref<CmsDesign>();
|
||||
const showEdit = ref(false);
|
||||
// 编辑内容
|
||||
const showDesignEdit = ref(false);
|
||||
// 页面组件
|
||||
const showDesignRecordEdit = ref(false);
|
||||
// 上级分类id
|
||||
const parentId = ref<number>();
|
||||
const categoryId = ref<number>();
|
||||
|
||||
Reference in New Issue
Block a user