feat(sj_1.0.0): 组管理路由group-config => group

This commit is contained in:
dhb52 2024-04-22 22:37:15 +08:00
parent 6c81cb75db
commit e990fa17ad
10 changed files with 21 additions and 22 deletions

View File

@ -43,7 +43,7 @@ async function search() {
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80" :show-feedback="appStore.isMobile"> <NForm ref="formRef" :model="model" label-placement="left" :label-width="80" :show-feedback="appStore.isMobile">
<NGrid responsive="screen" item-responsive> <NGrid responsive="screen" item-responsive>
<slot></slot> <slot></slot>
<NFormItemGi span="24 m:12 m:6" class="pr-24px lg:p-t-0 md:p-t-16px"> <NFormItemGi :y-gap="8" span="24 m:12 m:6" class="pr-24px lg:p-t-0 md:p-t-16px">
<NSpace class="min-w-172px w-full" justify="end"> <NSpace class="min-w-172px w-full" justify="end">
<NButton @click="reset"> <NButton @click="reset">
<template #icon> <template #icon>

View File

@ -196,7 +196,7 @@ const local: App.I18n.Schema = {
exception_403: '403', exception_403: '403',
exception_404: '404', exception_404: '404',
exception_500: '500', exception_500: '500',
'group-config': 'Group Config' group: 'Group Config'
}, },
page: { page: {
common: { common: {

View File

@ -174,7 +174,7 @@ const local: App.I18n.Schema = {
'function_super-page': '超级管理员可见', 'function_super-page': '超级管理员可见',
pods: '在线机器', pods: '在线机器',
namepase: '命名空间', namepase: '命名空间',
'group-config': '组管理', group: '组管理',
manage: '系统管理', manage: '系统管理',
manage_user: '用户管理', manage_user: '用户管理',
notify: '告警通知', notify: '告警通知',

View File

@ -28,7 +28,7 @@ export const views: Record<LastLevelRouteKey, RouteComponent | (() => Promise<Ro
"function_super-page": () => import("@/views/function/super-page/index.vue"), "function_super-page": () => import("@/views/function/super-page/index.vue"),
function_tab: () => import("@/views/function/tab/index.vue"), function_tab: () => import("@/views/function/tab/index.vue"),
"function_toggle-auth": () => import("@/views/function/toggle-auth/index.vue"), "function_toggle-auth": () => import("@/views/function/toggle-auth/index.vue"),
"group-config": () => import("@/views/group-config/index.vue"), group: () => import("@/views/group/index.vue"),
home: () => import("@/views/home/index.vue"), home: () => import("@/views/home/index.vue"),
manage_menu: () => import("@/views/manage/menu/index.vue"), manage_menu: () => import("@/views/manage/menu/index.vue"),
manage_role: () => import("@/views/manage/role/index.vue"), manage_role: () => import("@/views/manage/role/index.vue"),

View File

@ -168,13 +168,12 @@ export const generatedRoutes: GeneratedRoute[] = [
] ]
}, },
{ {
name: 'group-config', name: 'group',
path: '/group-config', path: '/group',
component: 'layout.base$view.group-config', component: 'layout.base$view.group',
meta: { meta: {
title: 'group-config', title: 'group',
i18nKey: 'route.group-config', i18nKey: 'route.group'
order: 40
} }
}, },
{ {

View File

@ -114,14 +114,14 @@ function transformElegantRouteToVueRoute(
} }
} }
// add redirect to child // add redirect to child
if (children?.length && !vueRoute.redirect) { if (children?.length && !vueRoute.redirect) {
vueRoute.redirect = { vueRoute.redirect = {
name: children[0].name name: children[0].name
}; };
} }
if (children?.length) { if (children?.length) {
const childRoutes = children.flatMap(child => transformElegantRouteToVueRoute(child, layouts, views)); const childRoutes = children.flatMap(child => transformElegantRouteToVueRoute(child, layouts, views));
@ -161,7 +161,7 @@ const routeMap: RouteMap = {
"function_super-page": "/function/super-page", "function_super-page": "/function/super-page",
"function_tab": "/function/tab", "function_tab": "/function/tab",
"function_toggle-auth": "/function/toggle-auth", "function_toggle-auth": "/function/toggle-auth",
"group-config": "/group-config", "group": "/group",
"home": "/home", "home": "/home",
"login": "/login/:module(pwd-login)?", "login": "/login/:module(pwd-login)?",
"manage": "/manage", "manage": "/manage",

View File

@ -35,7 +35,7 @@ declare module "@elegant-router/types" {
"function_super-page": "/function/super-page"; "function_super-page": "/function/super-page";
"function_tab": "/function/tab"; "function_tab": "/function/tab";
"function_toggle-auth": "/function/toggle-auth"; "function_toggle-auth": "/function/toggle-auth";
"group-config": "/group-config"; "group": "/group";
"home": "/home"; "home": "/home";
"login": "/login/:module(pwd-login)?"; "login": "/login/:module(pwd-login)?";
"manage": "/manage"; "manage": "/manage";
@ -99,7 +99,7 @@ declare module "@elegant-router/types" {
| "500" | "500"
| "about" | "about"
| "function" | "function"
| "group-config" | "group"
| "home" | "home"
| "login" | "login"
| "manage" | "manage"
@ -140,7 +140,7 @@ declare module "@elegant-router/types" {
| "function_super-page" | "function_super-page"
| "function_tab" | "function_tab"
| "function_toggle-auth" | "function_toggle-auth"
| "group-config" | "group"
| "home" | "home"
| "manage_menu" | "manage_menu"
| "manage_role" | "manage_role"

View File

@ -5,8 +5,8 @@ import { $t } from '@/locales';
import { useAppStore } from '@/store/modules/app'; import { useAppStore } from '@/store/modules/app';
import { useTable, useTableOperate } from '@/hooks/common/table'; import { useTable, useTableOperate } from '@/hooks/common/table';
import { groupConfigIdModeRecord, groupConfigStatusRecord, yesOrNoRecord } from '@/constants/business'; import { groupConfigIdModeRecord, groupConfigStatusRecord, yesOrNoRecord } from '@/constants/business';
import GroupConfigOperateDrawer from './modules/groupConfig-operate-drawer.vue'; import GroupOperateDrawer from './modules/group-operate-drawer.vue';
import GroupConfigSearch from './modules/groupConfig-search.vue'; import GroupSearch from './modules/group-search.vue';
const appStore = useAppStore(); const appStore = useAppStore();
@ -148,7 +148,7 @@ function edit(id: string) {
<template> <template>
<div class="min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto"> <div class="min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto">
<GroupConfigSearch v-model:model="searchParams" @reset="resetSearchParams" @search="getData" /> <GroupSearch v-model:model="searchParams" @reset="resetSearchParams" @search="getData" />
<NCard <NCard
:title="$t('page.groupConfig.title')" :title="$t('page.groupConfig.title')"
:bordered="false" :bordered="false"
@ -178,7 +178,7 @@ function edit(id: string) {
:pagination="mobilePagination" :pagination="mobilePagination"
class="sm:h-full" class="sm:h-full"
/> />
<GroupConfigOperateDrawer <GroupOperateDrawer
v-model:visible="drawerVisible" v-model:visible="drawerVisible"
:operate-type="operateType" :operate-type="operateType"
:row-data="editingData" :row-data="editingData"

View File

@ -7,7 +7,7 @@ import { groupConfigIdModeOptions, groupConfigStatusOptions, groupConfigYesOrNoO
import { fetchAddGroupConfig, fetchEditGroupConfig, fetchGetPartitionTableList } from '@/service/api/group-config'; import { fetchAddGroupConfig, fetchEditGroupConfig, fetchGetPartitionTableList } from '@/service/api/group-config';
defineOptions({ defineOptions({
name: 'GroupConfigOperateDrawer' name: 'GroupOperateDrawer'
}); });
interface Props { interface Props {

View File

@ -2,7 +2,7 @@
import { $t } from '@/locales'; import { $t } from '@/locales';
defineOptions({ defineOptions({
name: 'GroupConfigSearch' name: 'GroupSearch'
}); });
interface Emits { interface Emits {