remove: 移除废弃文件

This commit is contained in:
2026-08-14 15:33:14 +08:00
parent 340ac54026
commit 65a3c2b444
5 changed files with 0 additions and 437 deletions
@@ -1,29 +0,0 @@
import type { RouteRecordRaw } from 'vue-router';
import { $t } from '#/locales';
const routes: RouteRecordRaw[] = [
{
meta: {
icon: 'lucide:layout-dashboard',
order: -1,
title: $t('page.dashboard.title'),
},
name: 'Dashboard',
path: '/dashboard',
children: [
{
name: 'PddWorkbench',
path: '/workbench',
component: () => import('#/views/dashboard/workbench/index.vue'),
meta: {
affixTab: true,
icon: 'lucide:gauge',
title: $t('page.dashboard.workbench'),
},
},
],
},
];
export default routes;
@@ -1,45 +0,0 @@
import type { RouteRecordRaw } from 'vue-router';
const routes: RouteRecordRaw[] = [
{
meta: {
icon: 'lucide:shopping-cart',
order: 1,
title: '数据中台',
},
name: 'Data',
path: '/data',
children: [
{
name: 'DataImport',
path: '/data/import',
redirect: '/data/import/order',
meta: {
icon: 'lucide:upload',
title: '数据导入',
},
children: [
{
name: 'DataImportOrder',
path: 'order',
alias: '/import/order',
component: () => import('#/views/ec/import/order/index.vue'),
meta: {
title: '订单导入',
},
},
{
name: 'DataImportPromotionFee',
path: 'promotion-fee',
component: () => import('#/views/ec/import/promotion-fee/index.vue'),
meta: {
title: '推广费导入',
},
},
],
},
],
},
];
export default routes;
@@ -1,64 +0,0 @@
import type { RouteRecordRaw } from 'vue-router';
const routes: RouteRecordRaw[] = [
{
meta: {
icon: 'lucide:building-2',
order: 200,
title: '组织管理',
},
name: 'Organization',
path: '/organization',
children: [
{
name: 'CompanyManagement',
path: '/organization/company-management',
component: () => import('#/views/org/company/index.vue'),
meta: {
icon: 'lucide:building',
title: '公司管理',
},
},
{
name: 'DepartmentManagement',
path: '/organization/department-management',
component: () => import('#/views/org/department/index.vue'),
meta: {
icon: 'lucide:users',
title: '部门管理',
},
},
{
name: 'JobManagement',
path: '/organization/position-management',
component: () => import('#/views/org/position/index.vue'),
meta: {
icon: 'lucide:briefcase',
title: '职位管理',
},
},
{
name: 'JobMenuAssign',
path: '/organization/position-menu-assign',
component: () =>
import('#/views/org/position/permission/index.vue'),
meta: {
icon: 'lucide:layoutDashboard',
title: '职位菜单分配',
},
},
{
name: 'JobPermissionAssign',
path: '/organization/position-permission-assign',
component: () =>
import('#/views/org/position-permission-assign/index.vue'),
meta: {
icon: 'lucide:shield-check',
title: '职位权限分配',
},
},
],
},
];
export default routes;
@@ -1,101 +0,0 @@
import type { RouteRecordRaw } from 'vue-router';
const routes: RouteRecordRaw[] = [
{
name: 'SystemPlatformCompany',
path: '/platform-admin/company',
component: () => import('#/views/org/company/index.vue'),
meta: {
icon: 'lucide:building',
title: '公司管理',
requiresAuth: true,
},
},
{
name: 'SystemPlatformMenu',
path: '/platform-admin/menu',
component: () => import('#/views/sys/menu/index.vue'),
meta: {
icon: 'lucide:menu',
title: '系统菜单',
requiresAuth: true,
},
},
{
name: 'SystemPlatformPermission',
path: '/platform-admin/permission',
component: () => import('#/views/sys/permission/index.vue'),
meta: {
icon: 'lucide:layoutDashboard',
title: '系统权限',
requiresAuth: true,
},
},
{
name: 'SystemPlatformAccountSuper',
path: '/platform-admin/account-super',
component: () => import('#/views/org/account-super/index.vue'),
meta: {
icon: 'lucide:user-check',
title: '平台账户管理',
requiresAuth: true,
},
},
{
name: 'SystemPlatformCompanyMenuManage',
path: '/platform-admin/company-menu-manage',
component: () => import('#/views/company/menu/index.vue'),
meta: {
icon: 'lucide:layoutDashboard',
title: '公司菜单管理',
requiresAuth: true,
},
},
{
name: 'SystemPlatformCompanyPermissionManage',
path: '/platform-admin/company-permission-manage',
component: () =>
import('#/views/company/permission/index.vue'),
meta: {
icon: 'lucide:shield-check',
title: '公司权限管理',
requiresAuth: true,
},
},
{
name: 'SystemLicense',
path: '/system/license',
component: () => import('#/views/sys/license/index.vue'),
meta: {
icon: 'lucide:key-round',
title: '授权管理',
requiresAuth: true,
},
},
// 兼容旧路径
{
name: 'SystemLicenseLegacySettings',
path: '/system/settings/license',
component: () => import('#/views/sys/license/index.vue'),
meta: {
icon: 'lucide:key-round',
title: '授权管理',
requiresAuth: true,
hideInMenu: true,
},
},
{
name: 'SystemLicenseLegacy',
path: '/platform-admin/license',
component: () => import('#/views/sys/license/index.vue'),
meta: {
icon: 'lucide:key-round',
title: '授权管理',
requiresAuth: true,
hideInMenu: true,
},
},
];
export default routes;
@@ -1,198 +0,0 @@
<script setup lang="ts">
import type { VxeGridProps } from '#/adapter/vxe-table';
import type { PermissionVO } from '#/api/sys/permission/types';
import { onMounted, ref } from 'vue';
import { Page } from '@vben/common-ui';
import { Spin, Tag, message } from 'ant-design-vue';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { getSystemPermissionTreeApi } from '#/api/sys/permission';
defineOptions({ name: 'SystemPermissionPage' });
const loading = ref(false);
const permissionData = ref<PermissionVO.PermissionInfoVO[]>([]);
// 获取系统权限树
async function loadSystemPermissions() {
loading.value = true;
try {
const result = await getSystemPermissionTreeApi();
permissionData.value = result || [];
} catch (error: any) {
message.error(error?.message || '获取系统权限树失败');
} finally {
loading.value = false;
}
}
// 扁平化树数据(用于多级表格展示)
interface FlatNode {
id: number;
name: string;
code: string;
type: string;
status: number;
sortOrder: number;
parentId: number | null;
level: number;
children?: FlatNode[];
hasChildren: boolean;
}
function flattenTree(nodes: PermissionVO.PermissionInfoVO[], level = 0, result: FlatNode[] = []): FlatNode[] {
for (const node of nodes) {
const flat: FlatNode = {
id: node.id!,
name: node.name!,
code: node.code!,
type: node.type!,
status: node.status!,
sortOrder: node.sortOrder || 0,
parentId: node.parentId ?? null,
level,
hasChildren: !!(node.children && node.children.length > 0),
children: node.children ? flattenTree(node.children, level + 1, []) : undefined,
};
result.push(flat);
if (node.children && node.children.length > 0) {
flattenTree(node.children, level + 1, result);
}
}
return result;
}
// 表格配置
const gridOptions: VxeGridProps<FlatNode> = {
border: true,
stripe: true,
showOverflow: true,
size: 'small',
columnConfig: {
resizable: true,
},
rowConfig: {
isHover: true,
},
columns: [
{
type: 'seq',
width: 60,
title: '序号',
},
{
field: 'name',
title: '权限名称',
minWidth: 200,
slots: { default: 'name' },
},
{
field: 'code',
title: '权限码',
minWidth: 200,
slots: { default: 'code' },
},
{
field: 'type',
title: '类型',
width: 120,
slots: { default: 'type' },
},
{
field: 'sortOrder',
title: '排序',
width: 80,
},
{
field: 'status',
title: '状态',
width: 100,
slots: { default: 'status' },
},
],
data: [],
};
const [Grid] = useVbenVxeGrid({
gridOptions,
});
function getTypeText(type: string) {
const map: Record<string, string> = {
api: '接口权限',
button: '按钮权限',
data: '数据权限',
module: '模块分组',
};
return map[type] || type;
}
function getTypeTagColor(type: string) {
const map: Record<string, string> = {
api: 'processing',
button: 'success',
data: 'warning',
module: 'purple',
};
return map[type] || 'default';
}
onMounted(() => {
loadSystemPermissions().then(() => {
const flatData = flattenTree(permissionData.value);
const grid = (Grid as any).grid;
if (grid) {
grid.loadData(flatData);
}
});
});
</script>
<template>
<Page title="系统权限" auto-content-height>
<template #description>
<div class="text-foreground/80 mt-2">
系统管理模块下的完整权限树,用于查看系统权限结构(平台超管专用)
</div>
</template>
<Spin :spinning="loading">
<Grid>
<template #name="{ row }">
<span
class="font-medium"
:class="row.type === 'module' ? 'text-[var(--text-primary)]' : 'text-[var(--text-secondary)]'"
:style="{ paddingLeft: (row.level * 20) + 'px' }"
>
<span v-if="row.hasChildren" class="mr-1">📁</span>
<span v-else class="mr-1">📄</span>
{{ row.name }}
</span>
</template>
<template #code="{ row }">
<code class="text-xs text-gray-500">{{ row.code }}</code>
</template>
<template #type="{ row }">
<Tag :color="getTypeTagColor(row.type)">
{{ getTypeText(row.type) }}
</Tag>
</template>
<template #status="{ row }">
<Tag :color="row.status === 1 ? 'green' : 'red'">
{{ row.status === 1 ? '启用' : '禁用' }}
</Tag>
</template>
</Grid>
<div v-if="!loading && permissionData.length === 0" class="py-12 text-center text-gray-400">
暂无系统权限数据
</div>
</Spin>
</Page>
</template>