修改菜单列表,修改主题页面

This commit is contained in:
junleea 2025-03-29 17:03:59 +08:00
parent fca2a8416e
commit 27c89ea96f
3 changed files with 78 additions and 82 deletions

View File

@ -19,12 +19,6 @@ export const menuData: Menus[] = [
index: '/system-user',
title: '用户管理',
},
{
id: '51',
pid: '1',
index: '/manage-session',
title: '会话管理',
},
{
id: '52',
pid: '1',
@ -37,13 +31,29 @@ export const menuData: Menus[] = [
index: '/function',
title: '功能管理',
},
],
},
{
'id': '71',
'title': '用户功能管理',
'index': '71',
'icon': 'HomeFilled',
'children': [
{
id: '51',
pid: '1',
index: '/manage-session',
title: '会话管理',
},
{
id: '56',
pid: '1',
index: '/manage-file',
title: '文件管理',
},
],
},
{

View File

@ -1,66 +1,67 @@
import { defineStore } from 'pinia';
import { defineStore } from "pinia";
interface ObjectList {
[key: string]: string[];
[key: string]: string[];
}
export const usePermissStore = defineStore('permiss', {
state: () => {
const keys = localStorage.getItem('ms_keys');
return {
key: keys ? JSON.parse(keys) : <string[]>[],
defaultList: <ObjectList>{
admin: [
'0',
'1', //系统管理
'11', //用户管理
'12',
'13',
'2',
'21',
'22',
'23',
'24',
'25',
'26',
'27',
'28',
'29',
'291',
'292',
'3',
'31',
'32',
'33',
'34',
'4',
'41',
'42',
'5',
'7',
'6',
'8',
'61',
'62',
'63',
'64',
'65',
'66',
'9',
'51', //会话管理
'52', //模型管理
'53', //通用人机对话
'54', //功能管理
'55', //提示词生成
'56', //文件管理
],
user: ['0', '1' ,'8', '7','9', '61','53','51','56'],
},
};
},
actions: {
handleSet(val: string[]) {
this.key = val;
},
export const usePermissStore = defineStore("permiss", {
state: () => {
const keys = localStorage.getItem("ms_keys");
return {
key: keys ? JSON.parse(keys) : <string[]>[],
defaultList: <ObjectList>{
admin: [
"0",
"1", //系统管理
"11", //用户管理
"12",
"13",
"2",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"291",
"292",
"3",
"31",
"32",
"33",
"34",
"4",
"41",
"42",
"5",
"7",
"6",
"8",
"61",
"62",
"63",
"64",
"65",
"66",
"9",
"51", //会话管理
"52", //模型管理
"53", //通用人机对话
"54", //功能管理
"55", //提示词生成
"56", //文件管理
"71", //用户功能管理
],
user: ["0", "71", "8", "7", "9", "61", "53", "51", "56"],
},
};
},
actions: {
handleSet(val: string[]) {
this.key = val;
},
},
});

View File

@ -13,21 +13,6 @@
<el-button @click="resetSystemTheme">重置主题</el-button>
</div>
</el-card>
<el-card class="mgb20" shadow="hover">
<template #header>
<div class="content-title">Element-Plus主题</div>
</template>
<div class="theme-list mgb20">
<div class="theme-item" v-for="theme in themes">
<el-button :type="theme.name">{{ theme.name }}</el-button>
<div class="theme-color">{{ theme.color }}</div>
<el-color-picker v-model="color[theme.name]" @change="changeColor(theme.name)" />
</div>
</div>
<div class="flex-center">
<el-button @click="resetTheme">重置主题</el-button>
</div>
</el-card>
<el-row :gutter="50">
<el-col :span="12">