@origen-ui/admin-cli 2.0.2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -12
- package/bin/contract-sync.mjs +112 -0
- package/bin/lib/errors.mjs +8 -0
- package/bin/lib/fs-json.mjs +18 -0
- package/bin/lib/hash.mjs +9 -0
- package/bin/og-admin.mjs +165 -35
- package/bin/sync-project.mjs +717 -0
- package/package.json +21 -18
- package/templates/current/clean/.agents/skills/admin-component-usage/SKILL.md +27 -0
- package/templates/current/clean/.agents/skills/admin-component-usage/references/component-directory.md +232 -0
- package/templates/current/clean/.agents/skills/build-admin-feature/SKILL.md +20 -0
- package/templates/current/clean/.agents/skills/build-admin-feature/references/component-selection.md +42 -0
- package/templates/current/{examples/.codex → clean/.agents}/skills/use-og-form/SKILL.md +1 -1
- package/templates/current/{examples/.codex → clean/.agents}/skills/use-og-form-table/SKILL.md +4 -3
- package/templates/current/clean/{.codex → .agents}/skills/use-og-search/SKILL.md +3 -3
- package/templates/current/clean/.agents/skills/use-og-table/SKILL.md +22 -0
- package/templates/current/{examples/.codex → clean/.agents}/skills/use-og-upload/SKILL.md +6 -5
- package/templates/current/clean/.api-client-e2e.config.ts +13 -0
- package/templates/current/clean/.claude/rules/01-feature-architecture.md +10 -0
- package/templates/current/clean/.claude/rules/02-vue-typescript.md +10 -0
- package/templates/current/clean/.claude/rules/03-component-policy.md +31 -0
- package/templates/current/clean/.claude/rules/04-api-auth-router.md +10 -0
- package/templates/current/clean/.claude/rules/05-style.md +10 -0
- package/templates/current/clean/.claude/rules/06-quality.md +10 -0
- package/templates/current/clean/.claude/skills/admin-component-usage/SKILL.md +27 -0
- package/templates/current/clean/.claude/skills/admin-component-usage/references/component-directory.md +232 -0
- package/templates/current/clean/.claude/skills/build-admin-feature/SKILL.md +20 -0
- package/templates/current/clean/.claude/skills/build-admin-feature/references/component-selection.md +42 -0
- package/templates/current/clean/{.codex → .claude}/skills/use-og-form/SKILL.md +1 -1
- package/templates/current/clean/{.codex → .claude}/skills/use-og-form-table/SKILL.md +4 -3
- package/templates/current/{examples/.codex → clean/.claude}/skills/use-og-search/SKILL.md +3 -3
- package/templates/current/clean/.claude/skills/use-og-table/SKILL.md +22 -0
- package/templates/current/clean/{.codex → .claude}/skills/use-og-upload/SKILL.md +6 -5
- package/templates/current/clean/.codebuddy/rules/01-feature-architecture.md +2 -2
- package/templates/current/clean/.codebuddy/rules/03-component-policy.md +4 -1
- package/templates/current/clean/.codebuddy/skills/admin-component-usage/SKILL.md +30 -0
- package/templates/current/clean/.codebuddy/skills/admin-component-usage/references/component-directory.md +232 -0
- package/templates/current/clean/.codebuddy/skills/build-admin-feature/SKILL.md +11 -5
- package/templates/current/clean/.codebuddy/skills/build-admin-feature/references/component-selection.md +42 -0
- package/templates/current/clean/.codebuddy/skills/use-og-form/SKILL.md +1 -1
- package/templates/current/clean/.codebuddy/skills/use-og-form-table/SKILL.md +4 -3
- package/templates/current/clean/.codebuddy/skills/use-og-search/SKILL.md +3 -3
- package/templates/current/clean/.codebuddy/skills/use-og-table/SKILL.md +16 -10
- package/templates/current/clean/.codebuddy/skills/use-og-upload/SKILL.md +6 -5
- package/templates/current/clean/.codex/AGENTS.md +55 -8
- package/templates/current/clean/.codex/rules/01-feature-architecture.md +2 -2
- package/templates/current/clean/.codex/rules/03-component-policy.md +4 -1
- package/templates/current/clean/.cursor/rules/.generated +5 -0
- package/templates/current/clean/.cursor/rules/01-feature-architecture.mdc +2 -2
- package/templates/current/clean/.cursor/rules/03-component-policy.mdc +4 -1
- package/templates/current/clean/.cursor/skills/admin-component-usage/SKILL.md +27 -0
- package/templates/current/clean/.cursor/skills/admin-component-usage/references/component-directory.md +232 -0
- package/templates/current/clean/.cursor/skills/build-admin-feature/SKILL.md +11 -5
- package/templates/current/clean/.cursor/skills/build-admin-feature/references/component-selection.md +42 -0
- package/templates/current/clean/.cursor/skills/use-og-form/SKILL.md +1 -1
- package/templates/current/clean/.cursor/skills/use-og-form-table/SKILL.md +4 -3
- package/templates/current/clean/.cursor/skills/use-og-search/SKILL.md +3 -3
- package/templates/current/clean/.cursor/skills/use-og-table/SKILL.md +16 -10
- package/templates/current/clean/.cursor/skills/use-og-upload/SKILL.md +6 -5
- package/templates/current/clean/{.env.example → .env.dev} +3 -2
- package/templates/current/clean/.env.mock +4 -0
- package/templates/current/clean/.env.production +5 -0
- package/templates/current/clean/.env.test +4 -0
- package/templates/current/clean/.prettierignore +28 -0
- package/templates/current/clean/.prettierrc +8 -0
- package/templates/current/clean/.qoder/rules/01-feature-architecture.md +3 -4
- package/templates/current/clean/.qoder/rules/02-vue-typescript.md +1 -2
- package/templates/current/clean/.qoder/rules/03-component-policy.md +5 -3
- package/templates/current/clean/.qoder/rules/04-api-auth-router.md +1 -2
- package/templates/current/clean/.qoder/rules/05-style.md +1 -2
- package/templates/current/clean/.qoder/rules/06-quality.md +1 -2
- package/templates/current/clean/.qoder/skills/admin-component-usage/SKILL.md +27 -0
- package/templates/current/clean/.qoder/skills/admin-component-usage/references/component-directory.md +232 -0
- package/templates/current/clean/.qoder/skills/build-admin-feature/SKILL.md +11 -5
- package/templates/current/clean/.qoder/skills/build-admin-feature/references/component-selection.md +42 -0
- package/templates/current/clean/.qoder/skills/use-og-form/SKILL.md +1 -1
- package/templates/current/clean/.qoder/skills/use-og-form-table/SKILL.md +4 -3
- package/templates/current/clean/.qoder/skills/use-og-search/SKILL.md +3 -3
- package/templates/current/clean/.qoder/skills/use-og-table/SKILL.md +16 -10
- package/templates/current/clean/.qoder/skills/use-og-upload/SKILL.md +6 -5
- package/templates/current/clean/.zcode/skills/admin-component-usage/SKILL.md +27 -0
- package/templates/current/clean/.zcode/skills/admin-component-usage/references/component-directory.md +232 -0
- package/templates/current/clean/.zcode/skills/build-admin-feature/SKILL.md +20 -0
- package/templates/current/clean/.zcode/skills/build-admin-feature/references/component-selection.md +42 -0
- package/templates/current/clean/.zcode/skills/style-og-origen-ui/SKILL.md +11 -0
- package/templates/current/clean/.zcode/skills/use-og-dialog/SKILL.md +12 -0
- package/templates/current/clean/.zcode/skills/use-og-editor/SKILL.md +25 -0
- package/templates/current/clean/.zcode/skills/use-og-form/SKILL.md +12 -0
- package/templates/current/clean/.zcode/skills/use-og-form-table/SKILL.md +26 -0
- package/templates/current/clean/.zcode/skills/use-og-http/SKILL.md +13 -0
- package/templates/current/clean/.zcode/skills/use-og-router-tabs/SKILL.md +11 -0
- package/templates/current/clean/.zcode/skills/use-og-search/SKILL.md +14 -0
- package/templates/current/clean/.zcode/skills/use-og-table/SKILL.md +22 -0
- package/templates/current/clean/.zcode/skills/use-og-upload/SKILL.md +26 -0
- package/templates/current/clean/AGENTS.md +55 -9
- package/templates/current/clean/CHANGELOG.md +128 -0
- package/templates/current/clean/CLAUDE.md +3 -0
- package/templates/current/clean/README.md +58 -88
- package/templates/current/clean/component-catalog.json +766 -348
- package/templates/current/clean/component-catalog.v2.json +2040 -0
- package/templates/current/clean/docs/components/dialog.md +405 -0
- package/templates/current/clean/docs/components/editor-viewer.md +87 -0
- package/templates/current/clean/docs/components/editor.md +275 -0
- package/templates/current/clean/docs/components/form-table.md +222 -0
- package/templates/current/clean/docs/components/form.md +750 -0
- package/templates/current/clean/docs/components/index.md +44 -0
- package/templates/current/clean/docs/components/router.md +452 -0
- package/templates/current/clean/docs/components/search.md +1205 -0
- package/templates/current/clean/docs/components/svg-icon.md +124 -0
- package/templates/current/clean/docs/components/table-local.md +176 -0
- package/templates/current/clean/docs/components/table-with-search.md +207 -0
- package/templates/current/clean/docs/components/table.md +813 -0
- package/templates/current/clean/docs/components/tabs.md +440 -0
- package/templates/current/clean/docs/components/upload.md +349 -0
- package/templates/current/clean/eslint.config.js +89 -0
- package/templates/current/clean/index.html +1 -1
- package/templates/current/clean/openapi.json +10048 -999
- package/templates/current/clean/package.json +47 -35
- package/templates/current/clean/playwright.config.ts +20 -6
- package/templates/current/clean/playwright.mock.config.ts +42 -0
- package/templates/current/clean/pnpm-workspace.yaml +19 -3
- package/templates/current/clean/recipes/remote-crud-dialog-form.vue +15 -13
- package/templates/current/clean/scaffold.lock.json +164 -4
- package/templates/current/clean/scripts/api-codegen.config.ts +35 -0
- package/templates/current/clean/scripts/api-codegen.ts +2015 -0
- package/templates/current/clean/scripts/api-templates/http-client.ejs +359 -0
- package/templates/current/clean/scripts/check-admin-scaffold.mjs +315 -30
- package/templates/current/clean/scripts/generate-api.ts +290 -85
- package/templates/current/clean/scripts/lib/admin-component-catalog.mjs +514 -0
- package/templates/current/clean/scripts/lib/admin-skill-inventory.mjs +18 -0
- package/templates/current/clean/scripts/lib/repository-root.mjs +9 -0
- package/templates/current/clean/scripts/mock-api.ts +1356 -0
- package/templates/current/clean/scripts/remove-examples.mjs +9 -34
- package/templates/current/clean/src/App.vue +9 -18
- package/templates/current/clean/src/api/generated/data-contracts.ts +23 -265
- package/templates/current/clean/src/api/generated/http-client.ts +351 -180
- package/templates/current/clean/src/api/generated/index.ts +22 -0
- package/templates/current/clean/src/api/generated/services/auth.ts +123 -0
- package/templates/current/clean/src/api/generated/services/common/files.ts +111 -0
- package/templates/current/clean/src/api/generated/services/monitor/cache.ts +164 -0
- package/templates/current/clean/src/api/generated/services/monitor/job.ts +195 -0
- package/templates/current/clean/src/api/generated/services/monitor/jobLog.ts +126 -0
- package/templates/current/clean/src/api/generated/services/monitor/logininfor.ts +126 -0
- package/templates/current/clean/src/api/generated/services/monitor/online.ts +66 -0
- package/templates/current/clean/src/api/generated/services/monitor/operlog.ts +106 -0
- package/templates/current/clean/src/api/generated/services/monitor/server.ts +41 -0
- package/templates/current/clean/src/api/generated/services/system/configs.ts +190 -0
- package/templates/current/clean/src/api/generated/services/system/departments.ts +173 -0
- package/templates/current/clean/src/api/generated/services/system/dictionaries/data.ts +169 -0
- package/templates/current/clean/src/api/generated/services/system/dictionaries/types.ts +187 -0
- package/templates/current/clean/src/api/generated/services/system/index.ts +158 -0
- package/templates/current/clean/src/api/generated/services/system/menus.ts +193 -0
- package/templates/current/clean/src/api/generated/services/system/notices.ts +221 -0
- package/templates/current/clean/src/api/generated/services/system/posts.ts +168 -0
- package/templates/current/clean/src/api/generated/services/system/roles.ts +354 -0
- package/templates/current/clean/src/api/generated/services/system/users.ts +425 -0
- package/templates/current/clean/src/api/generated/services/tool/code-generator.ts +304 -0
- package/templates/current/clean/src/api/generated/types/auth.types.ts +132 -0
- package/templates/current/clean/src/api/generated/types/common/files.types.ts +57 -0
- package/templates/current/clean/src/api/generated/types/common.ts +174 -0
- package/templates/current/clean/src/api/generated/types/enum-dict.ts +94 -0
- package/templates/current/clean/src/api/generated/types/enums.ts +155 -0
- package/templates/current/clean/src/api/generated/types/monitor/cache.types.ts +149 -0
- package/templates/current/clean/src/api/generated/types/monitor/job.types.ts +207 -0
- package/templates/current/clean/src/api/generated/types/monitor/jobLog.types.ts +134 -0
- package/templates/current/clean/src/api/generated/types/monitor/logininfor.types.ts +135 -0
- package/templates/current/clean/src/api/generated/types/monitor/online.types.ts +80 -0
- package/templates/current/clean/src/api/generated/types/monitor/operlog.types.ts +126 -0
- package/templates/current/clean/src/api/generated/types/monitor/server.types.ts +205 -0
- package/templates/current/clean/src/api/generated/types/system/configs.types.ts +200 -0
- package/templates/current/clean/src/api/generated/types/system/departments.types.ts +145 -0
- package/templates/current/clean/src/api/generated/types/system/dictionaries/data.types.ts +210 -0
- package/templates/current/clean/src/api/generated/types/system/dictionaries/types.types.ts +221 -0
- package/templates/current/clean/src/api/generated/types/system/index.types.ts +19 -0
- package/templates/current/clean/src/api/generated/types/system/menus.types.ts +234 -0
- package/templates/current/clean/src/api/generated/types/system/notices.types.ts +270 -0
- package/templates/current/clean/src/api/generated/types/system/posts.types.ts +198 -0
- package/templates/current/clean/src/api/generated/types/system/roles.types.ts +410 -0
- package/templates/current/clean/src/api/generated/types/system/users.types.ts +413 -0
- package/templates/current/clean/src/api/generated/types/tool/code-generator.types.ts +388 -0
- package/templates/current/clean/src/api/index.ts +44 -39
- package/templates/current/clean/src/app/__tests__/api-generated.types.ts +24 -0
- package/templates/current/clean/src/app/api.ts +6 -0
- package/templates/current/clean/src/app/authorization/permission.ts +9 -0
- package/templates/current/{examples/src/app → clean/src/app/config}/runtimeConfig.ts +44 -12
- package/templates/current/clean/src/app/errors/errorMessage.ts +80 -0
- package/templates/current/clean/src/app/http/client.ts +141 -0
- package/templates/current/clean/src/app/http/http-adapter.ts +71 -0
- package/templates/current/{examples/src/app → clean/src/app/i18n}/adminLocale.ts +25 -19
- package/templates/current/clean/src/app/{localeFormat.ts → i18n/localeFormat.ts} +29 -6
- package/templates/current/clean/src/app/i18n/origenUiLocale.ts +15 -0
- package/templates/current/clean/src/app/menu/menu.ts +175 -0
- package/templates/current/clean/src/app/menu/menuTypes.ts +20 -0
- package/templates/current/clean/src/{features → app}/security/devtoolsProtection.ts +8 -7
- package/templates/current/clean/src/app/ui/createAdminUi.ts +31 -0
- package/templates/current/clean/src/app/ui/iconCatalog.ts +71 -0
- package/templates/current/clean/src/assets/icons/appearance.svg +1 -0
- package/templates/current/clean/src/assets/icons/arrow-right.svg +1 -0
- package/templates/current/clean/src/assets/icons/check.svg +1 -0
- package/templates/current/clean/src/assets/icons/circle-check.svg +1 -0
- package/templates/current/clean/src/assets/icons/default.svg +4 -0
- package/templates/current/clean/src/assets/icons/directory/setting.svg +1 -0
- package/templates/current/clean/src/assets/icons/expand.svg +1 -0
- package/templates/current/clean/src/assets/icons/fold.svg +1 -0
- package/templates/current/clean/src/assets/icons/key.svg +1 -0
- package/templates/current/clean/src/assets/icons/lock.svg +1 -0
- package/templates/current/clean/src/assets/icons/monitor.svg +1 -0
- package/templates/current/clean/src/assets/icons/moon.svg +11 -0
- package/templates/current/clean/src/assets/icons/page/department.svg +1 -0
- package/templates/current/clean/src/assets/icons/page/dictionary.svg +1 -0
- package/templates/current/clean/src/assets/icons/page/menus.svg +1 -0
- package/templates/current/clean/src/assets/icons/page/user.svg +1 -0
- package/templates/current/clean/src/assets/icons/page/users.svg +1 -0
- package/templates/current/clean/src/assets/icons/plus.svg +1 -0
- package/templates/current/clean/src/assets/icons/profile.svg +1 -0
- package/templates/current/clean/src/assets/icons/refresh.svg +1 -0
- package/templates/current/clean/src/assets/icons/roles.svg +1 -0
- package/templates/current/clean/src/assets/icons/search.svg +1 -0
- package/templates/current/clean/src/assets/icons/sunny.svg +1 -0
- package/templates/current/clean/src/assets/icons/system.svg +1 -0
- package/templates/current/clean/src/assets/icons/theme-auto.svg +14 -0
- package/templates/current/clean/src/assets/icons/tune.svg +13 -0
- package/templates/current/clean/src/{features/shell/components → components}/RouteProgress.vue +2 -2
- package/templates/current/{examples/src/features/system/access → clean/src}/composables/useAuthorizationRefresh.ts +6 -1
- package/templates/current/clean/src/composables/useSystemTableSearchVisibility.ts +33 -0
- package/templates/current/clean/src/{features/appearance/composables → composables}/useTheme.ts +1 -1
- package/templates/current/clean/src/env.d.ts +6 -19
- package/templates/current/clean/src/layouts/AdminLayout.vue +7 -9
- package/templates/current/clean/src/{features/shell/components → layouts}/AdminWatermark.vue +2 -2
- package/templates/current/clean/src/layouts/BreadcrumbBar.vue +9 -1
- package/templates/current/clean/src/layouts/SideMenu.vue +7 -15
- package/templates/current/clean/src/{features/appearance/components → layouts}/ThemePanel.vue +39 -11
- package/templates/current/clean/src/layouts/TopBar.vue +60 -28
- package/templates/current/clean/src/layouts/WorkspaceTabs.vue +10 -1
- package/templates/current/clean/src/layouts/topBarMenuSearch.ts +25 -4
- package/templates/current/clean/src/locales/en-US.json +227 -219
- package/templates/current/clean/src/locales/index.ts +72 -32
- package/templates/current/clean/src/locales/messages-types.ts +15 -10
- package/templates/current/clean/src/locales/vue-i18n.d.ts +1 -1
- package/templates/current/clean/src/locales/zh-CN.json +226 -218
- package/templates/current/clean/src/locales/zh-TW.json +222 -214
- package/templates/current/clean/src/main.ts +59 -30
- package/templates/current/clean/src/router/bootstrap.ts +69 -24
- package/templates/current/clean/src/router/dynamic/componentLoader.ts +150 -0
- package/templates/current/clean/src/router/{dynamicMenuRefresh.ts → dynamic/dynamicMenuRefresh.ts} +6 -2
- package/templates/current/clean/src/router/dynamic/dynamicRoutes.ts +247 -0
- package/templates/current/clean/src/router/navigation/guards.ts +12 -0
- package/templates/current/clean/src/router/navigation/paths.ts +28 -0
- package/templates/current/clean/src/router/navigation/staticRoutes.ts +109 -0
- package/templates/current/clean/src/router/{queryEncryption.ts → query/queryEncryption.ts} +29 -12
- package/templates/current/clean/src/router/query/routeQuery.ts +29 -0
- package/templates/current/clean/src/router/{useRouteQueryDefaults.ts → query/useRouteQueryDefaults.ts} +9 -8
- package/templates/current/clean/src/router/query/useRouteQueryDefaults.types.ts +28 -0
- package/templates/current/clean/src/router/{runtimeErrorRecovery.ts → recovery/runtimeErrorRecovery.ts} +21 -3
- package/templates/current/clean/src/{features/auth/store → store}/auth.ts +97 -62
- package/templates/current/clean/src/store/dictionaries.ts +86 -0
- package/templates/current/clean/src/{features/shell/store → store}/sidebar.ts +9 -2
- package/templates/current/{examples/src/features/appearance → clean/src}/store/theme.ts +8 -4
- package/templates/current/clean/src/styles/layout.css +51 -0
- package/templates/current/clean/src/templates/og-form.ts +7 -2
- package/templates/current/clean/src/templates/og-table.ts +86 -20
- package/templates/current/clean/src/templates/router.ts +11 -2
- package/templates/current/clean/src/utils/color-mix.ts +6 -2
- package/templates/current/clean/src/utils/download.ts +11 -0
- package/templates/current/clean/src/utils/permissions.ts +1 -1
- package/templates/current/clean/src/utils/retryableDialog.ts +46 -0
- package/templates/current/clean/src/{features → views}/errors/pages/Forbidden.vue +6 -2
- package/templates/current/clean/src/views/errors/pages/MethodNotAllowed.vue +34 -0
- package/templates/current/clean/src/{features → views}/errors/pages/NotFound.vue +6 -2
- package/templates/current/clean/src/{features → views}/errors/pages/ServerError.vue +6 -2
- package/templates/current/clean/src/{features/auth/pages/Login.vue → views/login/pages/index.vue} +99 -10
- package/templates/current/clean/src/views/system/access/services/admin-repository.ts +489 -0
- package/templates/current/clean/src/views/system/access/services/rbac.ts +317 -0
- package/templates/current/clean/src/views/system/dept/components/DepartmentEditorForm.vue +87 -0
- package/templates/current/clean/src/views/system/dept/composables/useDepartmentManagement.ts +314 -0
- package/templates/current/clean/src/views/system/dept/pages/index.vue +44 -0
- package/templates/current/clean/src/views/system/dept/services/departments.ts +168 -0
- package/templates/current/clean/src/views/system/dict/components/DictionaryDataEditorForm.vue +98 -0
- package/templates/current/clean/src/views/system/dict/components/DictionaryDataPreview.vue +233 -0
- package/templates/current/clean/src/views/system/dict/components/DictionaryTypeEditorForm.vue +66 -0
- package/templates/current/clean/src/views/system/dict/composables/useDictionaryDataManagement.ts +406 -0
- package/templates/current/clean/src/views/system/dict/composables/useDictionaryTypeManagement.ts +329 -0
- package/templates/current/clean/src/views/system/dict/data/pages/index.vue +134 -0
- package/templates/current/clean/src/views/system/dict/pages/index.vue +113 -0
- package/templates/current/clean/src/views/system/dict/services/dictionaries.ts +239 -0
- package/templates/current/clean/src/views/system/menu/components/MenuEditorForm.vue +252 -0
- package/templates/current/clean/src/views/system/menu/composables/useMenuManagement.ts +357 -0
- package/templates/current/clean/src/views/system/menu/menuDraft.ts +45 -0
- package/templates/current/clean/src/views/system/menu/pages/ExternalLink.vue +37 -0
- package/templates/current/clean/src/views/system/menu/pages/index.vue +75 -0
- package/templates/current/clean/src/views/system/post/components/PostEditorForm.vue +69 -0
- package/templates/current/clean/src/views/system/post/composables/usePostManagement.ts +245 -0
- package/templates/current/clean/src/views/system/post/pages/index.vue +92 -0
- package/templates/current/clean/src/views/system/post/services/posts.ts +100 -0
- package/templates/current/clean/src/views/system/role/auth-users/pages/index.vue +100 -0
- package/templates/current/clean/src/views/system/role/components/RoleDataScopeForm.vue +167 -0
- package/templates/current/clean/src/views/system/role/components/RoleEditorForm.vue +165 -0
- package/templates/current/clean/src/views/system/role/components/RoleUserSelectForm.vue +129 -0
- package/templates/current/clean/src/views/system/role/composables/useRoleManagement.ts +422 -0
- package/templates/current/clean/src/views/system/role/composables/useRoleUserManagement.ts +233 -0
- package/templates/current/clean/src/views/system/role/pages/index.vue +110 -0
- package/templates/current/clean/src/views/system/role/services/roleAccess.ts +162 -0
- package/templates/current/clean/src/views/system/user/auth-roles/pages/index.vue +209 -0
- package/templates/current/clean/src/views/system/user/components/UserDetailsForm.vue +108 -0
- package/templates/current/clean/src/views/system/user/components/UserEditorForm.vue +207 -0
- package/templates/current/clean/src/views/system/user/components/UserImportDialog.vue +80 -0
- package/templates/current/clean/src/views/system/user/components/UserResetPasswordForm.vue +56 -0
- package/templates/current/clean/src/views/system/user/composables/useUserManagement.ts +502 -0
- package/templates/current/clean/src/views/system/user/pages/index.vue +459 -0
- package/templates/current/clean/tests/e2e/admin-access-business.spec.ts +33 -0
- package/templates/current/clean/tests/e2e/admin-shell.spec.ts +50 -0
- package/templates/current/clean/tests/e2e/fixtures/adminMockBackend.ts +95 -0
- package/templates/current/clean/tests/e2e/fixtures/labelGeometry.ts +52 -0
- package/templates/current/clean/tests/e2e/mock-api-generation.spec.ts +27 -0
- package/templates/current/clean/tests/e2e/mock-business.spec.ts +555 -0
- package/templates/current/clean/tests/e2e/mock-menu-retry-form-label.spec.ts +100 -0
- package/templates/current/clean/tests/e2e/mock-shell.spec.ts +25 -0
- package/templates/current/clean/tests/e2e/mock-tree-selection-layout.spec.ts +113 -0
- package/templates/current/clean/tests/unit/api/api-codegen.spec.ts +893 -0
- package/templates/current/clean/tests/unit/api/client.spec.ts +145 -0
- package/templates/current/clean/tests/unit/api/generated-http-client.spec.ts +290 -0
- package/templates/current/{examples/src → clean/tests/unit}/api/http-adapter.spec.ts +3 -3
- package/templates/current/clean/tests/unit/api/system-apis.spec.ts +118 -0
- package/templates/current/clean/tests/unit/app/createAdminUi.spec.ts +79 -0
- package/templates/current/clean/{src → tests/unit}/app/errorMessage.spec.ts +1 -1
- package/templates/current/clean/tests/unit/app/iconCatalog.spec.ts +12 -0
- package/templates/current/clean/tests/unit/app/menu.spec.ts +215 -0
- package/templates/current/{examples/src → clean/tests/unit}/app/origenUiLocale.spec.ts +1 -1
- package/templates/current/{examples/src → clean/tests/unit}/app/permission.spec.ts +4 -5
- package/templates/current/clean/tests/unit/app/runtimeConfig.spec.ts +36 -0
- package/templates/current/{examples/src/features → clean/tests/unit/app}/security/devtoolsProtection.spec.ts +17 -7
- package/templates/current/{examples/src/features/shell → clean/tests/unit}/composables/useRouteProgress.spec.ts +1 -1
- package/templates/current/{examples/src/features/shell/components → clean/tests/unit/layouts}/AdminWatermark.spec.ts +5 -7
- package/templates/current/{examples/src → clean/tests/unit}/layouts/topBarMenuSearch.spec.ts +25 -8
- package/templates/current/clean/{src → tests/unit}/locales/messages.spec.ts +43 -17
- package/templates/current/clean/tests/unit/router/dynamicMenuRefresh.spec.ts +151 -0
- package/templates/current/clean/tests/unit/router/dynamicRoutes.spec.ts +374 -0
- package/templates/current/clean/tests/unit/router/paths.spec.ts +103 -0
- package/templates/current/clean/{src → tests/unit}/router/queryEncryption.spec.ts +49 -12
- package/templates/current/{examples/src → clean/tests/unit}/router/routeQuery.spec.ts +8 -1
- package/templates/current/clean/{src → tests/unit}/router/runtimeErrorRecovery.spec.ts +11 -6
- package/templates/current/{examples/src → clean/tests/unit}/router/useRouteQueryDefaults.spec.ts +46 -12
- package/templates/current/clean/tests/unit/scripts/mock-api.spec.ts +440 -0
- package/templates/current/clean/{scripts → tests/unit/scripts}/vite-build-policy.spec.ts +35 -6
- package/templates/current/clean/{src/features/auth → tests/unit}/store/auth.spec.ts +100 -15
- package/templates/current/clean/tests/unit/store/dictionaries.spec.ts +106 -0
- package/templates/current/{examples/src → clean/tests/unit}/templates/templates.spec.ts +58 -16
- package/templates/current/clean/{src/utils/__tests__ → tests/unit/utils}/color-mix.spec.ts +1 -1
- package/templates/current/clean/tests/unit/utils/retryableDialog.spec.ts +61 -0
- package/templates/current/{examples/src/features/errors/pages → clean/tests/unit/views/errors}/error-pages.spec.ts +11 -7
- package/templates/current/clean/tests/unit/views/feature-composables.spec.ts +233 -0
- package/templates/current/clean/tests/unit/views/system/access/admin-repository.spec.ts +353 -0
- package/templates/current/clean/tests/unit/views/system/access/rbac.spec.ts +329 -0
- package/templates/current/clean/tests/unit/views/system/dept/departments.spec.ts +104 -0
- package/templates/current/clean/tests/unit/views/system/dict/dictionaries.spec.ts +234 -0
- package/templates/current/clean/tests/unit/views/system/menu/menuDraft.spec.ts +77 -0
- package/templates/current/clean/tests/unit/views/system/menu/useMenuManagement.spec.ts +339 -0
- package/templates/current/clean/tests/unit/views/system/user/searchControl.spec.ts +128 -0
- package/templates/current/clean/tsconfig.json +4 -19
- package/templates/current/clean/vite.build-policy.ts +97 -22
- package/templates/current/clean/vite.config.ts +50 -7
- package/templates/current/examples/.agents/skills/admin-component-usage/SKILL.md +27 -0
- package/templates/current/examples/.agents/skills/admin-component-usage/references/component-directory.md +232 -0
- package/templates/current/examples/.agents/skills/build-admin-feature/SKILL.md +20 -0
- package/templates/current/examples/.agents/skills/build-admin-feature/references/component-selection.md +42 -0
- package/templates/current/examples/.agents/skills/style-og-origen-ui/SKILL.md +11 -0
- package/templates/current/examples/.agents/skills/use-og-dialog/SKILL.md +12 -0
- package/templates/current/examples/.agents/skills/use-og-editor/SKILL.md +25 -0
- package/templates/current/examples/.agents/skills/use-og-form/SKILL.md +12 -0
- package/templates/current/examples/.agents/skills/use-og-form-table/SKILL.md +26 -0
- package/templates/current/examples/.agents/skills/use-og-http/SKILL.md +13 -0
- package/templates/current/examples/.agents/skills/use-og-router-tabs/SKILL.md +11 -0
- package/templates/current/examples/.agents/skills/use-og-search/SKILL.md +14 -0
- package/templates/current/examples/.agents/skills/use-og-table/SKILL.md +22 -0
- package/templates/current/examples/.agents/skills/use-og-upload/SKILL.md +26 -0
- package/templates/current/examples/.api-client-e2e.config.ts +13 -0
- package/templates/current/examples/.claude/rules/01-feature-architecture.md +10 -0
- package/templates/current/examples/.claude/rules/02-vue-typescript.md +10 -0
- package/templates/current/examples/.claude/rules/03-component-policy.md +31 -0
- package/templates/current/examples/.claude/rules/04-api-auth-router.md +10 -0
- package/templates/current/examples/.claude/rules/05-style.md +10 -0
- package/templates/current/examples/.claude/rules/06-quality.md +10 -0
- package/templates/current/examples/.claude/skills/admin-component-usage/SKILL.md +27 -0
- package/templates/current/examples/.claude/skills/admin-component-usage/references/component-directory.md +232 -0
- package/templates/current/examples/.claude/skills/build-admin-feature/SKILL.md +20 -0
- package/templates/current/examples/.claude/skills/build-admin-feature/references/component-selection.md +42 -0
- package/templates/current/examples/.claude/skills/style-og-origen-ui/SKILL.md +11 -0
- package/templates/current/examples/.claude/skills/use-og-dialog/SKILL.md +12 -0
- package/templates/current/examples/.claude/skills/use-og-editor/SKILL.md +25 -0
- package/templates/current/examples/.claude/skills/use-og-form/SKILL.md +12 -0
- package/templates/current/examples/.claude/skills/use-og-form-table/SKILL.md +26 -0
- package/templates/current/examples/.claude/skills/use-og-http/SKILL.md +13 -0
- package/templates/current/examples/.claude/skills/use-og-router-tabs/SKILL.md +11 -0
- package/templates/current/examples/.claude/skills/use-og-search/SKILL.md +14 -0
- package/templates/current/examples/.claude/skills/use-og-table/SKILL.md +22 -0
- package/templates/current/examples/.claude/skills/use-og-upload/SKILL.md +26 -0
- package/templates/current/examples/.codebuddy/rules/01-feature-architecture.md +2 -2
- package/templates/current/examples/.codebuddy/rules/03-component-policy.md +4 -1
- package/templates/current/examples/.codebuddy/skills/admin-component-usage/SKILL.md +30 -0
- package/templates/current/examples/.codebuddy/skills/admin-component-usage/references/component-directory.md +232 -0
- package/templates/current/examples/.codebuddy/skills/build-admin-feature/SKILL.md +11 -5
- package/templates/current/examples/.codebuddy/skills/build-admin-feature/references/component-selection.md +42 -0
- package/templates/current/examples/.codebuddy/skills/use-og-form/SKILL.md +1 -1
- package/templates/current/examples/.codebuddy/skills/use-og-form-table/SKILL.md +4 -3
- package/templates/current/examples/.codebuddy/skills/use-og-search/SKILL.md +3 -3
- package/templates/current/examples/.codebuddy/skills/use-og-table/SKILL.md +16 -10
- package/templates/current/examples/.codebuddy/skills/use-og-upload/SKILL.md +6 -5
- package/templates/current/examples/.codex/AGENTS.md +55 -8
- package/templates/current/examples/.codex/rules/01-feature-architecture.md +2 -2
- package/templates/current/examples/.codex/rules/03-component-policy.md +4 -1
- package/templates/current/examples/.cursor/rules/.generated +5 -0
- package/templates/current/examples/.cursor/rules/01-feature-architecture.mdc +2 -2
- package/templates/current/examples/.cursor/rules/03-component-policy.mdc +4 -1
- package/templates/current/examples/.cursor/skills/admin-component-usage/SKILL.md +27 -0
- package/templates/current/examples/.cursor/skills/admin-component-usage/references/component-directory.md +232 -0
- package/templates/current/examples/.cursor/skills/build-admin-feature/SKILL.md +11 -5
- package/templates/current/examples/.cursor/skills/build-admin-feature/references/component-selection.md +42 -0
- package/templates/current/examples/.cursor/skills/use-og-form/SKILL.md +1 -1
- package/templates/current/examples/.cursor/skills/use-og-form-table/SKILL.md +4 -3
- package/templates/current/examples/.cursor/skills/use-og-search/SKILL.md +3 -3
- package/templates/current/examples/.cursor/skills/use-og-table/SKILL.md +16 -10
- package/templates/current/examples/.cursor/skills/use-og-upload/SKILL.md +6 -5
- package/templates/current/examples/{.env.example → .env.dev} +3 -2
- package/templates/current/examples/.env.mock +4 -0
- package/templates/current/examples/.env.production +5 -0
- package/templates/current/examples/.env.test +4 -0
- package/templates/current/examples/.prettierignore +28 -0
- package/templates/current/examples/.prettierrc +8 -0
- package/templates/current/examples/.qoder/rules/01-feature-architecture.md +3 -4
- package/templates/current/examples/.qoder/rules/02-vue-typescript.md +1 -2
- package/templates/current/examples/.qoder/rules/03-component-policy.md +5 -3
- package/templates/current/examples/.qoder/rules/04-api-auth-router.md +1 -2
- package/templates/current/examples/.qoder/rules/05-style.md +1 -2
- package/templates/current/examples/.qoder/rules/06-quality.md +1 -2
- package/templates/current/examples/.qoder/skills/admin-component-usage/SKILL.md +27 -0
- package/templates/current/examples/.qoder/skills/admin-component-usage/references/component-directory.md +232 -0
- package/templates/current/examples/.qoder/skills/build-admin-feature/SKILL.md +11 -5
- package/templates/current/examples/.qoder/skills/build-admin-feature/references/component-selection.md +42 -0
- package/templates/current/examples/.qoder/skills/use-og-form/SKILL.md +1 -1
- package/templates/current/examples/.qoder/skills/use-og-form-table/SKILL.md +4 -3
- package/templates/current/examples/.qoder/skills/use-og-search/SKILL.md +3 -3
- package/templates/current/examples/.qoder/skills/use-og-table/SKILL.md +16 -10
- package/templates/current/examples/.qoder/skills/use-og-upload/SKILL.md +6 -5
- package/templates/current/examples/.zcode/skills/admin-component-usage/SKILL.md +27 -0
- package/templates/current/examples/.zcode/skills/admin-component-usage/references/component-directory.md +232 -0
- package/templates/current/examples/.zcode/skills/build-admin-feature/SKILL.md +20 -0
- package/templates/current/examples/.zcode/skills/build-admin-feature/references/component-selection.md +42 -0
- package/templates/current/examples/.zcode/skills/style-og-origen-ui/SKILL.md +11 -0
- package/templates/current/examples/.zcode/skills/use-og-dialog/SKILL.md +12 -0
- package/templates/current/examples/.zcode/skills/use-og-editor/SKILL.md +25 -0
- package/templates/current/examples/.zcode/skills/use-og-form/SKILL.md +12 -0
- package/templates/current/examples/.zcode/skills/use-og-form-table/SKILL.md +26 -0
- package/templates/current/examples/.zcode/skills/use-og-http/SKILL.md +13 -0
- package/templates/current/examples/.zcode/skills/use-og-router-tabs/SKILL.md +11 -0
- package/templates/current/examples/.zcode/skills/use-og-search/SKILL.md +14 -0
- package/templates/current/examples/.zcode/skills/use-og-table/SKILL.md +22 -0
- package/templates/current/examples/.zcode/skills/use-og-upload/SKILL.md +26 -0
- package/templates/current/examples/AGENTS.md +55 -9
- package/templates/current/examples/CHANGELOG.md +128 -0
- package/templates/current/examples/CLAUDE.md +3 -0
- package/templates/current/examples/README.md +58 -88
- package/templates/current/examples/component-catalog.json +766 -348
- package/templates/current/examples/component-catalog.v2.json +2040 -0
- package/templates/current/examples/docs/components/dialog.md +405 -0
- package/templates/current/examples/docs/components/editor-viewer.md +87 -0
- package/templates/current/examples/docs/components/editor.md +275 -0
- package/templates/current/examples/docs/components/form-table.md +222 -0
- package/templates/current/examples/docs/components/form.md +750 -0
- package/templates/current/examples/docs/components/index.md +44 -0
- package/templates/current/examples/docs/components/router.md +452 -0
- package/templates/current/examples/docs/components/search.md +1205 -0
- package/templates/current/examples/docs/components/svg-icon.md +124 -0
- package/templates/current/examples/docs/components/table-local.md +176 -0
- package/templates/current/examples/docs/components/table-with-search.md +207 -0
- package/templates/current/examples/docs/components/table.md +813 -0
- package/templates/current/examples/docs/components/tabs.md +440 -0
- package/templates/current/examples/docs/components/upload.md +349 -0
- package/templates/current/examples/eslint.config.js +89 -0
- package/templates/current/examples/index.html +1 -1
- package/templates/current/examples/openapi.json +10048 -999
- package/templates/current/examples/package.json +47 -35
- package/templates/current/examples/playwright.config.ts +20 -6
- package/templates/current/examples/playwright.mock.config.ts +42 -0
- package/templates/current/examples/pnpm-workspace.yaml +19 -3
- package/templates/current/examples/recipes/remote-crud-dialog-form.vue +15 -13
- package/templates/current/examples/scaffold.lock.json +164 -4
- package/templates/current/examples/scripts/api-codegen.config.ts +35 -0
- package/templates/current/examples/scripts/api-codegen.ts +2015 -0
- package/templates/current/examples/scripts/api-templates/http-client.ejs +359 -0
- package/templates/current/examples/scripts/check-admin-scaffold.mjs +315 -30
- package/templates/current/examples/scripts/generate-api.ts +290 -85
- package/templates/current/examples/scripts/lib/admin-component-catalog.mjs +514 -0
- package/templates/current/examples/scripts/lib/admin-skill-inventory.mjs +18 -0
- package/templates/current/examples/scripts/lib/repository-root.mjs +9 -0
- package/templates/current/examples/scripts/mock-api.ts +1356 -0
- package/templates/current/examples/scripts/remove-examples.mjs +9 -34
- package/templates/current/examples/src/App.vue +9 -18
- package/templates/current/examples/src/api/generated/data-contracts.ts +23 -265
- package/templates/current/examples/src/api/generated/http-client.ts +351 -180
- package/templates/current/examples/src/api/generated/index.ts +22 -0
- package/templates/current/examples/src/api/generated/services/auth.ts +123 -0
- package/templates/current/examples/src/api/generated/services/common/files.ts +111 -0
- package/templates/current/examples/src/api/generated/services/monitor/cache.ts +164 -0
- package/templates/current/examples/src/api/generated/services/monitor/job.ts +195 -0
- package/templates/current/examples/src/api/generated/services/monitor/jobLog.ts +126 -0
- package/templates/current/examples/src/api/generated/services/monitor/logininfor.ts +126 -0
- package/templates/current/examples/src/api/generated/services/monitor/online.ts +66 -0
- package/templates/current/examples/src/api/generated/services/monitor/operlog.ts +106 -0
- package/templates/current/examples/src/api/generated/services/monitor/server.ts +41 -0
- package/templates/current/examples/src/api/generated/services/system/configs.ts +190 -0
- package/templates/current/examples/src/api/generated/services/system/departments.ts +173 -0
- package/templates/current/examples/src/api/generated/services/system/dictionaries/data.ts +169 -0
- package/templates/current/examples/src/api/generated/services/system/dictionaries/types.ts +187 -0
- package/templates/current/examples/src/api/generated/services/system/index.ts +158 -0
- package/templates/current/examples/src/api/generated/services/system/menus.ts +193 -0
- package/templates/current/examples/src/api/generated/services/system/notices.ts +221 -0
- package/templates/current/examples/src/api/generated/services/system/posts.ts +168 -0
- package/templates/current/examples/src/api/generated/services/system/roles.ts +354 -0
- package/templates/current/examples/src/api/generated/services/system/users.ts +425 -0
- package/templates/current/examples/src/api/generated/services/tool/code-generator.ts +304 -0
- package/templates/current/examples/src/api/generated/types/auth.types.ts +132 -0
- package/templates/current/examples/src/api/generated/types/common/files.types.ts +57 -0
- package/templates/current/examples/src/api/generated/types/common.ts +174 -0
- package/templates/current/examples/src/api/generated/types/enum-dict.ts +94 -0
- package/templates/current/examples/src/api/generated/types/enums.ts +155 -0
- package/templates/current/examples/src/api/generated/types/monitor/cache.types.ts +149 -0
- package/templates/current/examples/src/api/generated/types/monitor/job.types.ts +207 -0
- package/templates/current/examples/src/api/generated/types/monitor/jobLog.types.ts +134 -0
- package/templates/current/examples/src/api/generated/types/monitor/logininfor.types.ts +135 -0
- package/templates/current/examples/src/api/generated/types/monitor/online.types.ts +80 -0
- package/templates/current/examples/src/api/generated/types/monitor/operlog.types.ts +126 -0
- package/templates/current/examples/src/api/generated/types/monitor/server.types.ts +205 -0
- package/templates/current/examples/src/api/generated/types/system/configs.types.ts +200 -0
- package/templates/current/examples/src/api/generated/types/system/departments.types.ts +145 -0
- package/templates/current/examples/src/api/generated/types/system/dictionaries/data.types.ts +210 -0
- package/templates/current/examples/src/api/generated/types/system/dictionaries/types.types.ts +221 -0
- package/templates/current/examples/src/api/generated/types/system/index.types.ts +19 -0
- package/templates/current/examples/src/api/generated/types/system/menus.types.ts +234 -0
- package/templates/current/examples/src/api/generated/types/system/notices.types.ts +270 -0
- package/templates/current/examples/src/api/generated/types/system/posts.types.ts +198 -0
- package/templates/current/examples/src/api/generated/types/system/roles.types.ts +410 -0
- package/templates/current/examples/src/api/generated/types/system/users.types.ts +413 -0
- package/templates/current/examples/src/api/generated/types/tool/code-generator.types.ts +388 -0
- package/templates/current/examples/src/api/index.ts +44 -39
- package/templates/current/examples/src/app/__tests__/api-generated.types.ts +24 -0
- package/templates/current/examples/src/app/api.ts +6 -0
- package/templates/current/examples/src/app/authorization/permission.ts +9 -0
- package/templates/current/{clean/src/app → examples/src/app/config}/runtimeConfig.ts +44 -12
- package/templates/current/examples/src/app/errors/errorMessage.ts +80 -0
- package/templates/current/examples/src/app/http/client.ts +141 -0
- package/templates/current/examples/src/app/http/http-adapter.ts +71 -0
- package/templates/current/{clean/src/app → examples/src/app/i18n}/adminLocale.ts +25 -19
- package/templates/current/examples/src/app/{localeFormat.ts → i18n/localeFormat.ts} +29 -6
- package/templates/current/examples/src/app/i18n/origenUiLocale.ts +15 -0
- package/templates/current/examples/src/app/menu/menu.ts +175 -0
- package/templates/current/examples/src/app/menu/menuTypes.ts +20 -0
- package/templates/current/examples/src/{features → app}/security/devtoolsProtection.ts +8 -7
- package/templates/current/examples/src/app/ui/createAdminUi.ts +31 -0
- package/templates/current/examples/src/app/ui/iconCatalog.ts +71 -0
- package/templates/current/examples/src/assets/icons/appearance.svg +1 -0
- package/templates/current/examples/src/assets/icons/arrow-right.svg +1 -0
- package/templates/current/examples/src/assets/icons/check.svg +1 -0
- package/templates/current/examples/src/assets/icons/circle-check.svg +1 -0
- package/templates/current/examples/src/assets/icons/default.svg +4 -0
- package/templates/current/examples/src/assets/icons/directory/setting.svg +1 -0
- package/templates/current/examples/src/assets/icons/expand.svg +1 -0
- package/templates/current/examples/src/assets/icons/fold.svg +1 -0
- package/templates/current/examples/src/assets/icons/key.svg +1 -0
- package/templates/current/examples/src/assets/icons/lock.svg +1 -0
- package/templates/current/examples/src/assets/icons/monitor.svg +1 -0
- package/templates/current/examples/src/assets/icons/moon.svg +11 -0
- package/templates/current/examples/src/assets/icons/page/department.svg +1 -0
- package/templates/current/examples/src/assets/icons/page/dictionary.svg +1 -0
- package/templates/current/examples/src/assets/icons/page/menus.svg +1 -0
- package/templates/current/examples/src/assets/icons/page/user.svg +1 -0
- package/templates/current/examples/src/assets/icons/page/users.svg +1 -0
- package/templates/current/examples/src/assets/icons/plus.svg +1 -0
- package/templates/current/examples/src/assets/icons/profile.svg +1 -0
- package/templates/current/examples/src/assets/icons/refresh.svg +1 -0
- package/templates/current/examples/src/assets/icons/roles.svg +1 -0
- package/templates/current/examples/src/assets/icons/search.svg +1 -0
- package/templates/current/examples/src/assets/icons/sunny.svg +1 -0
- package/templates/current/examples/src/assets/icons/system.svg +1 -0
- package/templates/current/examples/src/assets/icons/theme-auto.svg +14 -0
- package/templates/current/examples/src/assets/icons/tune.svg +13 -0
- package/templates/current/examples/src/{features/shell/components → components}/RouteProgress.vue +2 -2
- package/templates/current/{clean/src/features/system/access → examples/src}/composables/useAuthorizationRefresh.ts +6 -1
- package/templates/current/examples/src/composables/useSystemTableSearchVisibility.ts +33 -0
- package/templates/current/examples/src/{features/appearance/composables → composables}/useTheme.ts +1 -1
- package/templates/current/examples/src/env.d.ts +6 -19
- package/templates/current/examples/src/layouts/AdminLayout.vue +7 -9
- package/templates/current/examples/src/{features/shell/components → layouts}/AdminWatermark.vue +2 -2
- package/templates/current/examples/src/layouts/BreadcrumbBar.vue +9 -1
- package/templates/current/examples/src/layouts/SideMenu.vue +7 -15
- package/templates/current/examples/src/{features/appearance/components → layouts}/ThemePanel.vue +39 -11
- package/templates/current/examples/src/layouts/TopBar.vue +60 -28
- package/templates/current/examples/src/layouts/WorkspaceTabs.vue +10 -1
- package/templates/current/examples/src/layouts/topBarMenuSearch.ts +25 -4
- package/templates/current/examples/src/locales/en-US.json +227 -219
- package/templates/current/examples/src/locales/index.ts +72 -32
- package/templates/current/examples/src/locales/messages-types.ts +15 -10
- package/templates/current/examples/src/locales/vue-i18n.d.ts +1 -1
- package/templates/current/examples/src/locales/zh-CN.json +226 -218
- package/templates/current/examples/src/locales/zh-TW.json +222 -214
- package/templates/current/examples/src/main.ts +50 -40
- package/templates/current/examples/src/router/bootstrap.ts +69 -24
- package/templates/current/examples/src/router/dynamic/componentLoader.ts +150 -0
- package/templates/current/examples/src/router/{dynamicMenuRefresh.ts → dynamic/dynamicMenuRefresh.ts} +6 -2
- package/templates/current/examples/src/router/dynamic/dynamicRoutes.ts +247 -0
- package/templates/current/examples/src/router/navigation/guards.ts +12 -0
- package/templates/current/examples/src/router/navigation/paths.ts +28 -0
- package/templates/current/examples/src/router/navigation/staticRoutes.ts +109 -0
- package/templates/current/examples/src/router/{queryEncryption.ts → query/queryEncryption.ts} +29 -12
- package/templates/current/examples/src/router/query/routeQuery.ts +29 -0
- package/templates/current/examples/src/router/{useRouteQueryDefaults.ts → query/useRouteQueryDefaults.ts} +9 -8
- package/templates/current/examples/src/router/query/useRouteQueryDefaults.types.ts +28 -0
- package/templates/current/examples/src/router/{runtimeErrorRecovery.ts → recovery/runtimeErrorRecovery.ts} +21 -3
- package/templates/current/examples/src/{features/auth/store → store}/auth.ts +97 -62
- package/templates/current/examples/src/store/dictionaries.ts +86 -0
- package/templates/current/examples/src/{features/shell/store → store}/sidebar.ts +9 -2
- package/templates/current/{clean/src/features/appearance → examples/src}/store/theme.ts +8 -4
- package/templates/current/examples/src/styles/layout.css +51 -0
- package/templates/current/examples/src/templates/og-form.ts +7 -2
- package/templates/current/examples/src/templates/og-table.ts +86 -20
- package/templates/current/examples/src/templates/router.ts +11 -2
- package/templates/current/examples/src/utils/color-mix.ts +6 -2
- package/templates/current/examples/src/utils/download.ts +11 -0
- package/templates/current/examples/src/utils/permissions.ts +1 -1
- package/templates/current/examples/src/utils/retryableDialog.ts +46 -0
- package/templates/current/{clean/scripts/clean-overlay/src/features → examples/src/views}/errors/pages/Forbidden.vue +6 -2
- package/templates/current/examples/src/views/errors/pages/MethodNotAllowed.vue +34 -0
- package/templates/current/examples/{scripts/clean-overlay/src/features → src/views}/errors/pages/NotFound.vue +6 -2
- package/templates/current/examples/{scripts/clean-overlay/src/features → src/views}/errors/pages/ServerError.vue +6 -2
- package/templates/current/examples/src/{features/auth/pages/Login.vue → views/login/pages/index.vue} +99 -10
- package/templates/current/examples/src/views/system/access/services/admin-repository.ts +489 -0
- package/templates/current/examples/src/views/system/access/services/rbac.ts +317 -0
- package/templates/current/examples/src/views/system/dept/components/DepartmentEditorForm.vue +87 -0
- package/templates/current/examples/src/views/system/dept/composables/useDepartmentManagement.ts +314 -0
- package/templates/current/examples/src/views/system/dept/pages/index.vue +44 -0
- package/templates/current/examples/src/views/system/dept/services/departments.ts +168 -0
- package/templates/current/examples/src/views/system/dict/components/DictionaryDataEditorForm.vue +98 -0
- package/templates/current/examples/src/views/system/dict/components/DictionaryDataPreview.vue +233 -0
- package/templates/current/examples/src/views/system/dict/components/DictionaryTypeEditorForm.vue +66 -0
- package/templates/current/examples/src/views/system/dict/composables/useDictionaryDataManagement.ts +406 -0
- package/templates/current/examples/src/views/system/dict/composables/useDictionaryTypeManagement.ts +329 -0
- package/templates/current/examples/src/views/system/dict/data/pages/index.vue +134 -0
- package/templates/current/examples/src/views/system/dict/pages/index.vue +113 -0
- package/templates/current/examples/src/views/system/dict/services/dictionaries.ts +239 -0
- package/templates/current/examples/src/views/system/menu/components/MenuEditorForm.vue +252 -0
- package/templates/current/examples/src/views/system/menu/composables/useMenuManagement.ts +357 -0
- package/templates/current/examples/src/views/system/menu/menuDraft.ts +45 -0
- package/templates/current/examples/src/views/system/menu/pages/ExternalLink.vue +37 -0
- package/templates/current/examples/src/views/system/menu/pages/index.vue +75 -0
- package/templates/current/examples/src/views/system/post/components/PostEditorForm.vue +69 -0
- package/templates/current/examples/src/views/system/post/composables/usePostManagement.ts +245 -0
- package/templates/current/examples/src/views/system/post/pages/index.vue +92 -0
- package/templates/current/examples/src/views/system/post/services/posts.ts +100 -0
- package/templates/current/examples/src/views/system/role/auth-users/pages/index.vue +100 -0
- package/templates/current/examples/src/views/system/role/components/RoleDataScopeForm.vue +167 -0
- package/templates/current/examples/src/views/system/role/components/RoleEditorForm.vue +165 -0
- package/templates/current/examples/src/views/system/role/components/RoleUserSelectForm.vue +129 -0
- package/templates/current/examples/src/views/system/role/composables/useRoleManagement.ts +422 -0
- package/templates/current/examples/src/views/system/role/composables/useRoleUserManagement.ts +233 -0
- package/templates/current/examples/src/views/system/role/pages/index.vue +110 -0
- package/templates/current/examples/src/views/system/role/services/roleAccess.ts +162 -0
- package/templates/current/examples/src/views/system/user/auth-roles/pages/index.vue +209 -0
- package/templates/current/examples/src/views/system/user/components/UserDetailsForm.vue +108 -0
- package/templates/current/examples/src/views/system/user/components/UserEditorForm.vue +207 -0
- package/templates/current/examples/src/views/system/user/components/UserImportDialog.vue +80 -0
- package/templates/current/examples/src/views/system/user/components/UserResetPasswordForm.vue +56 -0
- package/templates/current/examples/src/views/system/user/composables/useUserManagement.ts +502 -0
- package/templates/current/examples/src/views/system/user/pages/index.vue +459 -0
- package/templates/current/examples/tests/e2e/admin-access-business.spec.ts +33 -0
- package/templates/current/examples/tests/e2e/admin-shell.spec.ts +50 -0
- package/templates/current/examples/tests/e2e/fixtures/adminMockBackend.ts +95 -0
- package/templates/current/examples/tests/e2e/fixtures/labelGeometry.ts +52 -0
- package/templates/current/examples/tests/e2e/mock-api-generation.spec.ts +27 -0
- package/templates/current/examples/tests/e2e/mock-business.spec.ts +555 -0
- package/templates/current/examples/tests/e2e/mock-menu-retry-form-label.spec.ts +100 -0
- package/templates/current/examples/tests/e2e/mock-shell.spec.ts +25 -0
- package/templates/current/examples/tests/e2e/mock-tree-selection-layout.spec.ts +113 -0
- package/templates/current/examples/tests/unit/api/api-codegen.spec.ts +893 -0
- package/templates/current/examples/tests/unit/api/client.spec.ts +145 -0
- package/templates/current/examples/tests/unit/api/generated-http-client.spec.ts +290 -0
- package/templates/current/{clean/src → examples/tests/unit}/api/http-adapter.spec.ts +3 -3
- package/templates/current/examples/tests/unit/api/system-apis.spec.ts +118 -0
- package/templates/current/examples/tests/unit/app/createAdminUi.spec.ts +79 -0
- package/templates/current/examples/{src → tests/unit}/app/errorMessage.spec.ts +1 -1
- package/templates/current/examples/tests/unit/app/iconCatalog.spec.ts +12 -0
- package/templates/current/examples/tests/unit/app/menu.spec.ts +215 -0
- package/templates/current/{clean/src → examples/tests/unit}/app/origenUiLocale.spec.ts +1 -1
- package/templates/current/{clean/src → examples/tests/unit}/app/permission.spec.ts +4 -5
- package/templates/current/examples/tests/unit/app/runtimeConfig.spec.ts +36 -0
- package/templates/current/{clean/src/features → examples/tests/unit/app}/security/devtoolsProtection.spec.ts +17 -7
- package/templates/current/{clean/src/features/shell → examples/tests/unit}/composables/useRouteProgress.spec.ts +1 -1
- package/templates/current/{clean/src/features/shell/components → examples/tests/unit/layouts}/AdminWatermark.spec.ts +5 -7
- package/templates/current/{clean/src → examples/tests/unit}/layouts/topBarMenuSearch.spec.ts +25 -8
- package/templates/current/examples/{src → tests/unit}/locales/messages.spec.ts +43 -17
- package/templates/current/examples/tests/unit/router/dynamicMenuRefresh.spec.ts +151 -0
- package/templates/current/examples/tests/unit/router/dynamicRoutes.spec.ts +374 -0
- package/templates/current/examples/tests/unit/router/paths.spec.ts +103 -0
- package/templates/current/examples/{src → tests/unit}/router/queryEncryption.spec.ts +49 -12
- package/templates/current/{clean/src → examples/tests/unit}/router/routeQuery.spec.ts +8 -1
- package/templates/current/examples/{src → tests/unit}/router/runtimeErrorRecovery.spec.ts +11 -6
- package/templates/current/{clean/src → examples/tests/unit}/router/useRouteQueryDefaults.spec.ts +46 -12
- package/templates/current/examples/tests/unit/scripts/mock-api.spec.ts +440 -0
- package/templates/current/examples/{scripts → tests/unit/scripts}/vite-build-policy.spec.ts +35 -6
- package/templates/current/examples/{src/features/auth → tests/unit}/store/auth.spec.ts +100 -15
- package/templates/current/examples/tests/unit/store/dictionaries.spec.ts +106 -0
- package/templates/current/{clean/src → examples/tests/unit}/templates/templates.spec.ts +58 -16
- package/templates/current/examples/{src/utils/__tests__ → tests/unit/utils}/color-mix.spec.ts +1 -1
- package/templates/current/examples/tests/unit/utils/retryableDialog.spec.ts +61 -0
- package/templates/current/examples/{scripts/clean-overlay/src/features/errors/pages → tests/unit/views/errors}/error-pages.spec.ts +12 -9
- package/templates/current/examples/tests/unit/views/feature-composables.spec.ts +233 -0
- package/templates/current/examples/tests/unit/views/system/access/admin-repository.spec.ts +353 -0
- package/templates/current/examples/tests/unit/views/system/access/rbac.spec.ts +329 -0
- package/templates/current/examples/tests/unit/views/system/dept/departments.spec.ts +104 -0
- package/templates/current/examples/tests/unit/views/system/dict/dictionaries.spec.ts +234 -0
- package/templates/current/examples/tests/unit/views/system/menu/menuDraft.spec.ts +77 -0
- package/templates/current/examples/tests/unit/views/system/menu/useMenuManagement.spec.ts +339 -0
- package/templates/current/examples/tests/unit/views/system/user/searchControl.spec.ts +128 -0
- package/templates/current/examples/tsconfig.json +4 -19
- package/templates/current/examples/vite.build-policy.ts +97 -22
- package/templates/current/examples/vite.config.ts +50 -7
- package/templates/current/clean/.codebuddy/AGENTS.md +0 -18
- package/templates/current/clean/.codex/skills/build-admin-feature/SKILL.md +0 -14
- package/templates/current/clean/.codex/skills/build-admin-feature/references/component-selection.md +0 -25
- package/templates/current/clean/.codex/skills/use-og-table/SKILL.md +0 -16
- package/templates/current/clean/.cursor/AGENTS.md +0 -18
- package/templates/current/clean/.env.production.example +0 -31
- package/templates/current/clean/.qoder/AGENTS.md +0 -15
- package/templates/current/clean/e2e/admin-shell.spec.ts +0 -156
- package/templates/current/clean/e2e/demo-shell.spec.ts +0 -372
- package/templates/current/clean/playwright.demo.config.ts +0 -25
- package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/NotFound.vue +0 -31
- package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/ServerError.vue +0 -31
- package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/error-pages.spec.ts +0 -41
- package/templates/current/clean/scripts/clean-overlay/src/main.ts +0 -100
- package/templates/current/clean/scripts/clean-overlay/src/router/componentCache.ts +0 -12
- package/templates/current/clean/scripts/clean-overlay/src/router/componentRegistry.ts +0 -14
- package/templates/current/clean/scripts/clean-overlay/src/router/dynamicRoutes.spec.ts +0 -77
- package/templates/current/clean/scripts/clean-overlay/src/router/paths.ts +0 -21
- package/templates/current/clean/scripts/clean-overlay/src/router/staticRoutes.ts +0 -63
- package/templates/current/clean/scripts/demo-api.ts +0 -873
- package/templates/current/clean/src/api/client.spec.ts +0 -66
- package/templates/current/clean/src/api/client.ts +0 -152
- package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/206/205/345/256/271/346/226/207/347/253/240.ts +0 -144
- package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/256/241/350/256/241.ts +0 -50
- package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/346/226/207/344/273/266/344/270/212/344/274/240.ts +0 -63
- package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/347/224/250/346/210/267.ts +0 -169
- package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/217/234/345/215/225.ts +0 -180
- package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/247/222/350/211/262.ts +0 -167
- package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/256/242/345/215/225/350/215/211/347/250/277.ts +0 -168
- package/templates/current/clean/src/api/generated//350/256/244/350/257/201.ts +0 -95
- package/templates/current/clean/src/api/http-adapter.ts +0 -83
- package/templates/current/clean/src/app/createAdminUi.spec.ts +0 -166
- package/templates/current/clean/src/app/createAdminUi.ts +0 -63
- package/templates/current/clean/src/app/embedded-token.spec.ts +0 -40
- package/templates/current/clean/src/app/embedded.spec.ts +0 -135
- package/templates/current/clean/src/app/embedded.ts +0 -255
- package/templates/current/clean/src/app/errorMessage.ts +0 -53
- package/templates/current/clean/src/app/menu-host.spec.ts +0 -77
- package/templates/current/clean/src/app/menu.spec.ts +0 -320
- package/templates/current/clean/src/app/menu.ts +0 -308
- package/templates/current/clean/src/app/menuTypes.ts +0 -18
- package/templates/current/clean/src/app/origenUiLocale.ts +0 -10
- package/templates/current/clean/src/app/permission.ts +0 -9
- package/templates/current/clean/src/demo-api.spec.ts +0 -478
- package/templates/current/clean/src/features/errors/pages/error-pages.spec.ts +0 -41
- package/templates/current/clean/src/features/system/access/api/admin-repository.spec.ts +0 -14
- package/templates/current/clean/src/features/system/access/api/admin-repository.ts +0 -298
- package/templates/current/clean/src/features/system/access/api/rbac.spec.ts +0 -72
- package/templates/current/clean/src/features/system/access/api/rbac.ts +0 -292
- package/templates/current/clean/src/features/system/access/composables/useAuthorizationPolling.spec.ts +0 -134
- package/templates/current/clean/src/features/system/access/composables/useAuthorizationPolling.ts +0 -96
- package/templates/current/clean/src/features/workspace/pages/Profile.vue +0 -185
- package/templates/current/clean/src/router/componentCache.ts +0 -12
- package/templates/current/clean/src/router/componentRegistry.ts +0 -14
- package/templates/current/clean/src/router/dynamicMenuRefresh.spec.ts +0 -101
- package/templates/current/clean/src/router/dynamicRoutes.spec.ts +0 -77
- package/templates/current/clean/src/router/dynamicRoutes.ts +0 -177
- package/templates/current/clean/src/router/guards.ts +0 -5
- package/templates/current/clean/src/router/paths.spec.ts +0 -50
- package/templates/current/clean/src/router/paths.ts +0 -21
- package/templates/current/clean/src/router/routeQuery.ts +0 -6
- package/templates/current/clean/src/router/staticRoutes.ts +0 -63
- package/templates/current/clean/src/router/useRouteQueryDefaults.types.ts +0 -20
- package/templates/current/clean/tsconfig.node.json +0 -9
- package/templates/current/examples/.codebuddy/AGENTS.md +0 -18
- package/templates/current/examples/.codex/skills/build-admin-feature/SKILL.md +0 -14
- package/templates/current/examples/.codex/skills/build-admin-feature/references/component-selection.md +0 -25
- package/templates/current/examples/.codex/skills/use-og-table/SKILL.md +0 -16
- package/templates/current/examples/.cursor/AGENTS.md +0 -18
- package/templates/current/examples/.env.production.example +0 -31
- package/templates/current/examples/.qoder/AGENTS.md +0 -15
- package/templates/current/examples/e2e/admin-shell.spec.ts +0 -156
- package/templates/current/examples/e2e/demo-shell.spec.ts +0 -372
- package/templates/current/examples/playwright.demo.config.ts +0 -25
- package/templates/current/examples/scripts/clean-overlay/src/features/errors/pages/Forbidden.vue +0 -31
- package/templates/current/examples/scripts/clean-overlay/src/main.ts +0 -100
- package/templates/current/examples/scripts/clean-overlay/src/router/componentCache.ts +0 -12
- package/templates/current/examples/scripts/clean-overlay/src/router/componentRegistry.ts +0 -14
- package/templates/current/examples/scripts/clean-overlay/src/router/dynamicRoutes.spec.ts +0 -77
- package/templates/current/examples/scripts/clean-overlay/src/router/paths.ts +0 -21
- package/templates/current/examples/scripts/clean-overlay/src/router/staticRoutes.ts +0 -63
- package/templates/current/examples/scripts/demo-api.ts +0 -873
- package/templates/current/examples/src/api/client.spec.ts +0 -66
- package/templates/current/examples/src/api/client.ts +0 -152
- package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/206/205/345/256/271/346/226/207/347/253/240.ts +0 -144
- package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/256/241/350/256/241.ts +0 -50
- package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/346/226/207/344/273/266/344/270/212/344/274/240.ts +0 -63
- package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/347/224/250/346/210/267.ts +0 -169
- package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/217/234/345/215/225.ts +0 -180
- package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/247/222/350/211/262.ts +0 -167
- package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/256/242/345/215/225/350/215/211/347/250/277.ts +0 -168
- package/templates/current/examples/src/api/generated//350/256/244/350/257/201.ts +0 -95
- package/templates/current/examples/src/api/http-adapter.ts +0 -83
- package/templates/current/examples/src/app/createAdminUi.spec.ts +0 -166
- package/templates/current/examples/src/app/createAdminUi.ts +0 -63
- package/templates/current/examples/src/app/embedded-token.spec.ts +0 -40
- package/templates/current/examples/src/app/embedded.spec.ts +0 -135
- package/templates/current/examples/src/app/embedded.ts +0 -255
- package/templates/current/examples/src/app/errorMessage.ts +0 -53
- package/templates/current/examples/src/app/menu-host.spec.ts +0 -77
- package/templates/current/examples/src/app/menu.spec.ts +0 -320
- package/templates/current/examples/src/app/menu.ts +0 -308
- package/templates/current/examples/src/app/menuTypes.ts +0 -18
- package/templates/current/examples/src/app/origenUiLocale.ts +0 -10
- package/templates/current/examples/src/app/permission.ts +0 -9
- package/templates/current/examples/src/demo-api.spec.ts +0 -478
- package/templates/current/examples/src/features/errors/pages/Forbidden.vue +0 -31
- package/templates/current/examples/src/features/errors/pages/NotFound.vue +0 -31
- package/templates/current/examples/src/features/errors/pages/ServerError.vue +0 -31
- package/templates/current/examples/src/features/feature-composables.spec.ts +0 -245
- package/templates/current/examples/src/features/system/access/api/admin-repository.spec.ts +0 -14
- package/templates/current/examples/src/features/system/access/api/admin-repository.ts +0 -298
- package/templates/current/examples/src/features/system/access/api/rbac.spec.ts +0 -72
- package/templates/current/examples/src/features/system/access/api/rbac.ts +0 -292
- package/templates/current/examples/src/features/system/access/composables/useAuthorizationPolling.spec.ts +0 -134
- package/templates/current/examples/src/features/system/access/composables/useAuthorizationPolling.ts +0 -96
- package/templates/current/examples/src/features/system/audit/composables/useAuditManagement.ts +0 -122
- package/templates/current/examples/src/features/system/audit/pages/AuditList.vue +0 -20
- package/templates/current/examples/src/features/system/menus/components/MenuEditorForm.vue +0 -279
- package/templates/current/examples/src/features/system/menus/composables/useMenuManagement.ts +0 -435
- package/templates/current/examples/src/features/system/menus/menuDraft.spec.ts +0 -204
- package/templates/current/examples/src/features/system/menus/menuDraft.ts +0 -116
- package/templates/current/examples/src/features/system/menus/menuTreePrecheck.spec.ts +0 -268
- package/templates/current/examples/src/features/system/menus/menuTreePrecheck.ts +0 -317
- package/templates/current/examples/src/features/system/menus/pages/MenuList.vue +0 -51
- package/templates/current/examples/src/features/system/roles/components/RoleEditorForm.vue +0 -116
- package/templates/current/examples/src/features/system/roles/composables/useRoleManagement.ts +0 -194
- package/templates/current/examples/src/features/system/roles/pages/RoleList.vue +0 -47
- package/templates/current/examples/src/features/system/users/components/UserEditorForm.vue +0 -104
- package/templates/current/examples/src/features/system/users/composables/useUserManagement.ts +0 -228
- package/templates/current/examples/src/features/system/users/pages/UserList.vue +0 -51
- package/templates/current/examples/src/features/workspace/pages/Dashboard.spec.ts +0 -41
- package/templates/current/examples/src/features/workspace/pages/Dashboard.vue +0 -325
- package/templates/current/examples/src/features/workspace/pages/Profile.vue +0 -185
- package/templates/current/examples/src/router/componentCache.ts +0 -18
- package/templates/current/examples/src/router/componentRegistry.ts +0 -66
- package/templates/current/examples/src/router/dynamicMenuRefresh.spec.ts +0 -101
- package/templates/current/examples/src/router/dynamicRoutes.spec.ts +0 -144
- package/templates/current/examples/src/router/dynamicRoutes.ts +0 -177
- package/templates/current/examples/src/router/guards.ts +0 -5
- package/templates/current/examples/src/router/paths.spec.ts +0 -50
- package/templates/current/examples/src/router/paths.ts +0 -21
- package/templates/current/examples/src/router/routeQuery.ts +0 -6
- package/templates/current/examples/src/router/staticRoutes.ts +0 -63
- package/templates/current/examples/src/router/useRouteQueryDefaults.types.ts +0 -20
- package/templates/current/examples/tsconfig.node.json +0 -9
- /package/templates/current/clean/{.codex → .agents}/skills/style-og-origen-ui/SKILL.md +0 -0
- /package/templates/current/clean/{.codex → .agents}/skills/style-og-origen-ui/agents/openai.yaml +0 -0
- /package/templates/current/clean/{.codex → .agents}/skills/use-og-dialog/SKILL.md +0 -0
- /package/templates/current/clean/{.codex → .agents}/skills/use-og-dialog/agents/openai.yaml +0 -0
- /package/templates/current/clean/{.codex → .agents}/skills/use-og-editor/SKILL.md +0 -0
- /package/templates/current/clean/{.codex → .agents}/skills/use-og-http/SKILL.md +0 -0
- /package/templates/current/clean/{.codex → .agents}/skills/use-og-http/agents/openai.yaml +0 -0
- /package/templates/current/clean/{.codex → .agents}/skills/use-og-router-tabs/SKILL.md +0 -0
- /package/templates/current/{examples/.codex → clean/.claude}/skills/style-og-origen-ui/SKILL.md +0 -0
- /package/templates/current/{examples/.codex → clean/.claude}/skills/use-og-dialog/SKILL.md +0 -0
- /package/templates/current/{examples/.codex → clean/.claude}/skills/use-og-editor/SKILL.md +0 -0
- /package/templates/current/{examples/.codex → clean/.claude}/skills/use-og-http/SKILL.md +0 -0
- /package/templates/current/{examples/.codex → clean/.claude}/skills/use-og-router-tabs/SKILL.md +0 -0
- /package/templates/current/clean/src/{features/security/components → components}/DevtoolsProtectionOverlay.vue +0 -0
- /package/templates/current/clean/src/{features/shell/composables → composables}/useRouteProgress.ts +0 -0
- /package/templates/current/clean/src/{features/workspace → views/fallback}/pages/Empty.vue +0 -0
- /package/templates/current/examples/{.codex → .agents}/skills/style-og-origen-ui/agents/openai.yaml +0 -0
- /package/templates/current/examples/{.codex → .agents}/skills/use-og-dialog/agents/openai.yaml +0 -0
- /package/templates/current/examples/{.codex → .agents}/skills/use-og-http/agents/openai.yaml +0 -0
- /package/templates/current/examples/src/{features/security/components → components}/DevtoolsProtectionOverlay.vue +0 -0
- /package/templates/current/examples/src/{features/shell/composables → composables}/useRouteProgress.ts +0 -0
- /package/templates/current/examples/src/{features/workspace → views/fallback}/pages/Empty.vue +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { expect, test } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('generated API requests use the Admin client and Vite mock backend', async ({ page }) => {
|
|
4
|
+
await page.goto('/login')
|
|
5
|
+
const apiRequest = page.waitForRequest((request) => {
|
|
6
|
+
return request.method() === 'GET' && new URL(request.url()).pathname === '/api/captchaImage'
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
const response = await page.evaluate(async () => {
|
|
10
|
+
const authModulePath = new URL(
|
|
11
|
+
'/src/api/generated/services/auth.ts',
|
|
12
|
+
window.location.origin,
|
|
13
|
+
).toString()
|
|
14
|
+
const clientModulePath = new URL(
|
|
15
|
+
'/src/api/generated/http-client.ts',
|
|
16
|
+
window.location.origin,
|
|
17
|
+
).toString()
|
|
18
|
+
const [{ Auth }, { HttpClient }] = await Promise.all([
|
|
19
|
+
import(authModulePath),
|
|
20
|
+
import(clientModulePath),
|
|
21
|
+
])
|
|
22
|
+
return await new Auth(new HttpClient()).captchaGetCode()
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
await apiRequest
|
|
26
|
+
expect(response).toEqual({ captchaEnabled: false, img: '', uuid: '' })
|
|
27
|
+
})
|
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
import { expect, test } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test.setTimeout(120_000)
|
|
4
|
+
|
|
5
|
+
async function signIn(page: import('@playwright/test').Page): Promise<void> {
|
|
6
|
+
await page.goto('/login')
|
|
7
|
+
await page.locator('#username').fill('admin')
|
|
8
|
+
await page.locator('#password').fill('admin123')
|
|
9
|
+
await page.locator('.login-card__submit').click()
|
|
10
|
+
await expect(page).toHaveURL(/\/system\/user$/u)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async function saveDialog(page: import('@playwright/test').Page): Promise<void> {
|
|
14
|
+
const dialog = page.getByRole('dialog')
|
|
15
|
+
await dialog.locator('.el-dialog__footer button.el-button--primary').click()
|
|
16
|
+
await expect(dialog).toBeHidden()
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface BackendMenuRoute {
|
|
20
|
+
menuId?: string
|
|
21
|
+
menuName?: string
|
|
22
|
+
children?: BackendMenuRoute[]
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface BackendDepartment {
|
|
26
|
+
deptId?: string
|
|
27
|
+
deptName?: string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function findMenuId(routes: readonly BackendMenuRoute[], menuName: string): string | undefined {
|
|
31
|
+
for (const route of routes) {
|
|
32
|
+
if (route.menuName === menuName && route.menuId) return route.menuId
|
|
33
|
+
const childMenuId = findMenuId(route.children ?? [], menuName)
|
|
34
|
+
if (childMenuId) return childMenuId
|
|
35
|
+
}
|
|
36
|
+
return undefined
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
test('demo supports system-management CRUD and the backend external-menu route', async ({
|
|
40
|
+
page,
|
|
41
|
+
request,
|
|
42
|
+
}, testInfo) => {
|
|
43
|
+
expect((await request.post('/api/__reset')).ok()).toBe(true)
|
|
44
|
+
await page.route('https://admin-e2e.example.test/**', async (route) => {
|
|
45
|
+
await route.fulfill({ contentType: 'text/html', body: '<main>External target</main>' })
|
|
46
|
+
})
|
|
47
|
+
await signIn(page)
|
|
48
|
+
await expect(page.locator('.breadcrumb-bar a')).toHaveCount(0)
|
|
49
|
+
await expect(page.locator('.breadcrumb-bar [aria-current="page"]')).toHaveCount(1)
|
|
50
|
+
|
|
51
|
+
const userList = page.getByTestId('user-list-page')
|
|
52
|
+
await expect(userList.locator('.og-table--bordered')).toHaveCount(1)
|
|
53
|
+
const measureUserTableInsets = () =>
|
|
54
|
+
userList.locator('.og-table').evaluate((table) => {
|
|
55
|
+
const actions = table.querySelector<HTMLElement>('.og-table__actions-toolbar-row')
|
|
56
|
+
const search = table.querySelector<HTMLElement>('.og-search')
|
|
57
|
+
const body = table.querySelector<HTMLElement>('.og-table__body')
|
|
58
|
+
if (!actions || !search || !body) return undefined
|
|
59
|
+
|
|
60
|
+
const actionsStyle = getComputedStyle(actions)
|
|
61
|
+
const searchStyle = getComputedStyle(search)
|
|
62
|
+
const actionsRect = actions.getBoundingClientRect()
|
|
63
|
+
const searchRect = search.getBoundingClientRect()
|
|
64
|
+
return {
|
|
65
|
+
actionsStart: actionsRect.left + Number.parseFloat(actionsStyle.paddingInlineStart),
|
|
66
|
+
actionsEnd: actionsRect.right - Number.parseFloat(actionsStyle.paddingInlineEnd),
|
|
67
|
+
searchStart: searchRect.left + Number.parseFloat(searchStyle.paddingInlineStart),
|
|
68
|
+
searchEnd: searchRect.right - Number.parseFloat(searchStyle.paddingInlineEnd),
|
|
69
|
+
actionsInset: actionsStyle.paddingInlineStart,
|
|
70
|
+
searchInset: searchStyle.paddingInlineStart,
|
|
71
|
+
bodyStartMargin: getComputedStyle(body).marginInlineStart,
|
|
72
|
+
bodyEndMargin: getComputedStyle(body).marginInlineEnd,
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
const desktopUserInsets = await measureUserTableInsets()
|
|
76
|
+
expect(desktopUserInsets).toMatchObject({
|
|
77
|
+
actionsInset: '16px',
|
|
78
|
+
searchInset: '16px',
|
|
79
|
+
bodyStartMargin: '16px',
|
|
80
|
+
bodyEndMargin: '16px',
|
|
81
|
+
})
|
|
82
|
+
expect(desktopUserInsets?.actionsStart).toBe(desktopUserInsets?.searchStart)
|
|
83
|
+
expect(desktopUserInsets?.actionsEnd).toBe(desktopUserInsets?.searchEnd)
|
|
84
|
+
|
|
85
|
+
await page.setViewportSize({ width: 620, height: 900 })
|
|
86
|
+
const narrowUserInsets = await measureUserTableInsets()
|
|
87
|
+
expect(narrowUserInsets).toMatchObject({ actionsInset: '12px', searchInset: '12px' })
|
|
88
|
+
expect(narrowUserInsets?.actionsStart).toBe(narrowUserInsets?.searchStart)
|
|
89
|
+
expect(narrowUserInsets?.actionsEnd).toBe(narrowUserInsets?.searchEnd)
|
|
90
|
+
await page.setViewportSize({ width: 1280, height: 720 })
|
|
91
|
+
|
|
92
|
+
const keywordSearch = page
|
|
93
|
+
.getByTestId('user-list-page')
|
|
94
|
+
.locator('[data-og-search-field="keyword"]')
|
|
95
|
+
await expect(keywordSearch.locator('.og-search__control-body--inline')).toHaveCSS(
|
|
96
|
+
'border-top-width',
|
|
97
|
+
'1px',
|
|
98
|
+
)
|
|
99
|
+
await expect(keywordSearch.locator('.og-search__control .el-input__wrapper')).toHaveCSS(
|
|
100
|
+
'box-shadow',
|
|
101
|
+
'none',
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
const departmentSidebar = page.getByTestId('user-department-sidebar')
|
|
105
|
+
const departmentResizeHandle = page.getByTestId('user-department-resize-handle')
|
|
106
|
+
const widthBefore = Number(await departmentResizeHandle.getAttribute('aria-valuenow'))
|
|
107
|
+
await departmentResizeHandle.focus()
|
|
108
|
+
await departmentResizeHandle.press('ArrowRight')
|
|
109
|
+
const widthAfter = Number(await departmentResizeHandle.getAttribute('aria-valuenow'))
|
|
110
|
+
expect(widthAfter).toBe(Math.min(400, widthBefore + 12))
|
|
111
|
+
expect(
|
|
112
|
+
await page.evaluate(() => localStorage.getItem('admin-user-department-sidebar-width')),
|
|
113
|
+
).toBe(String(widthAfter))
|
|
114
|
+
await departmentSidebar.getByRole('button', { name: '收起全部部门' }).click()
|
|
115
|
+
await expect(departmentSidebar.getByText('研发部门', { exact: true })).toBeHidden()
|
|
116
|
+
await departmentSidebar.getByRole('button', { name: '展开全部部门' }).click()
|
|
117
|
+
await expect(departmentSidebar.getByText('研发部门', { exact: true })).toBeVisible()
|
|
118
|
+
await departmentSidebar.getByRole('button', { name: '收起部门面板' }).click()
|
|
119
|
+
await expect(departmentSidebar).toHaveClass(/is-collapsed/u)
|
|
120
|
+
await departmentSidebar.getByRole('button', { name: '展开部门面板' }).click()
|
|
121
|
+
await expect(departmentSidebar).not.toHaveClass(/is-collapsed/u)
|
|
122
|
+
|
|
123
|
+
await userList.getByRole('button', { name: '隐藏搜索', exact: true }).click()
|
|
124
|
+
await expect(userList.locator('.og-search')).toBeHidden()
|
|
125
|
+
await userList.getByRole('button', { name: '显示搜索', exact: true }).click()
|
|
126
|
+
await expect(userList.locator('.og-search')).toBeVisible()
|
|
127
|
+
|
|
128
|
+
const userName = `e2e-${Date.now()}`
|
|
129
|
+
const addMemberButton = page.getByRole('button', { name: '新增成员', exact: true })
|
|
130
|
+
await expect(
|
|
131
|
+
page
|
|
132
|
+
.getByTestId('user-list-page')
|
|
133
|
+
.locator('.og-table-actions-region__fixed')
|
|
134
|
+
.getByRole('button')
|
|
135
|
+
.first(),
|
|
136
|
+
).toHaveText('新增成员')
|
|
137
|
+
await addMemberButton.click()
|
|
138
|
+
const userDialog = page.getByRole('dialog')
|
|
139
|
+
await expect(userDialog.locator('[data-og-form-field="password"] input')).toHaveValue('admin123')
|
|
140
|
+
await userDialog.locator('[data-og-form-field="userName"] input').fill(userName)
|
|
141
|
+
await userDialog.locator('[data-og-form-field="nickName"] input').fill('E2E User')
|
|
142
|
+
await userDialog.locator('[data-og-form-field="password"] input').fill('e2e-password')
|
|
143
|
+
await userDialog.locator('[data-og-form-field="deptId"] .el-select').click()
|
|
144
|
+
await page.getByRole('option', { name: '若依科技', exact: true }).click()
|
|
145
|
+
await userDialog.locator('[data-og-form-field="postIds"] .el-select').click()
|
|
146
|
+
await page.getByRole('option', { name: '普通员工', exact: true }).click()
|
|
147
|
+
await userDialog.locator('[data-og-form-field="roleIds"] .el-select').click()
|
|
148
|
+
await page.getByRole('option', { name: '超级管理员', exact: true }).click()
|
|
149
|
+
const userCreate = page.waitForRequest(
|
|
150
|
+
(request) =>
|
|
151
|
+
request.method() === 'POST' && new URL(request.url()).pathname === '/api/system/user',
|
|
152
|
+
)
|
|
153
|
+
await saveDialog(page)
|
|
154
|
+
expect((await userCreate).postDataJSON()).toMatchObject({
|
|
155
|
+
userName,
|
|
156
|
+
nickName: 'E2E User',
|
|
157
|
+
postIds: [4],
|
|
158
|
+
})
|
|
159
|
+
await expect(page.getByText(userName, { exact: true })).toBeVisible()
|
|
160
|
+
|
|
161
|
+
const createdUserRow = page.locator('.el-table__body tr').filter({ hasText: userName }).first()
|
|
162
|
+
await createdUserRow.locator('.el-checkbox__inner').click()
|
|
163
|
+
const userBatchActions = page.getByTestId('user-list-page').locator('.admin-table__batch-actions')
|
|
164
|
+
const selectionTooltip = page.getByRole('tooltip').filter({ hasText: '1 项已选' })
|
|
165
|
+
await expect(userBatchActions).toBeVisible()
|
|
166
|
+
await expect(selectionTooltip).toBeHidden()
|
|
167
|
+
await page.screenshot({
|
|
168
|
+
path: testInfo.outputPath('admin-selection-tooltip-hidden.png'),
|
|
169
|
+
fullPage: true,
|
|
170
|
+
})
|
|
171
|
+
await userBatchActions.hover()
|
|
172
|
+
await expect(selectionTooltip).toBeVisible()
|
|
173
|
+
await page.screenshot({
|
|
174
|
+
path: testInfo.outputPath('admin-selection-tooltip-hovered.png'),
|
|
175
|
+
fullPage: true,
|
|
176
|
+
})
|
|
177
|
+
await page.locator('.breadcrumb-bar').hover()
|
|
178
|
+
await expect(selectionTooltip).toBeHidden()
|
|
179
|
+
|
|
180
|
+
await page.goto('/system/role')
|
|
181
|
+
await page.getByRole('button', { name: '新增角色', exact: true }).click()
|
|
182
|
+
const roleDialog = page.getByRole('dialog')
|
|
183
|
+
const roleName = `E2E Role ${Date.now()}`
|
|
184
|
+
await roleDialog.locator('[data-og-form-field="roleName"] input').fill(roleName)
|
|
185
|
+
await roleDialog.locator('[data-og-form-field="roleKey"] input').fill(`e2e_role_${Date.now()}`)
|
|
186
|
+
const roleMenuTree = roleDialog.locator('.role-editor-form__tree')
|
|
187
|
+
await roleMenuTree
|
|
188
|
+
.getByRole('treeitem', { name: '系统管理' })
|
|
189
|
+
.locator('.el-tree-node__expand-icon')
|
|
190
|
+
.click()
|
|
191
|
+
const userMenuItem = roleMenuTree.getByRole('treeitem', { name: '用户管理' })
|
|
192
|
+
const userMenuId = Number(await userMenuItem.getAttribute('data-key'))
|
|
193
|
+
await userMenuItem.locator('.el-checkbox__inner').click()
|
|
194
|
+
const roleCreate = page.waitForRequest(
|
|
195
|
+
(request) =>
|
|
196
|
+
request.method() === 'POST' && new URL(request.url()).pathname === '/api/system/role',
|
|
197
|
+
)
|
|
198
|
+
await saveDialog(page)
|
|
199
|
+
const rolePayload = (await roleCreate).postDataJSON() as {
|
|
200
|
+
roleName?: string
|
|
201
|
+
menuIds?: number[]
|
|
202
|
+
}
|
|
203
|
+
expect(rolePayload).toMatchObject({ roleName })
|
|
204
|
+
expect(rolePayload.menuIds).toContain(userMenuId)
|
|
205
|
+
await expect(page.getByText(roleName, { exact: true })).toBeVisible()
|
|
206
|
+
|
|
207
|
+
await page.goto('/system/post')
|
|
208
|
+
const postPage = page.getByTestId('post-list-page')
|
|
209
|
+
await expect(postPage.getByText('董事长', { exact: true })).toBeVisible()
|
|
210
|
+
await postPage.getByRole('button', { name: '新增岗位', exact: true }).click()
|
|
211
|
+
const postName = `E2E post ${Date.now()}`
|
|
212
|
+
const postCode = `e2e_post_${Date.now()}`
|
|
213
|
+
const postDialog = page.getByRole('dialog')
|
|
214
|
+
await postDialog.locator('[data-og-form-field="postName"] input').fill(postName)
|
|
215
|
+
await postDialog.locator('[data-og-form-field="postCode"] input').fill(postCode)
|
|
216
|
+
await postDialog.locator('[data-og-form-field="postSort"] input').fill('10')
|
|
217
|
+
const postCreate = page.waitForRequest(
|
|
218
|
+
(request) =>
|
|
219
|
+
request.method() === 'POST' && new URL(request.url()).pathname === '/api/system/post',
|
|
220
|
+
)
|
|
221
|
+
await saveDialog(page)
|
|
222
|
+
expect((await postCreate).postDataJSON()).toMatchObject({ postName, postCode, postSort: 10 })
|
|
223
|
+
await expect(postPage.getByText(postName, { exact: true })).toBeVisible()
|
|
224
|
+
|
|
225
|
+
await page.goto('/system/menu')
|
|
226
|
+
const menuPage = page.getByTestId('menu-list-page')
|
|
227
|
+
|
|
228
|
+
// RuoYi v3.9.2 列表列头与工具栏顺序。
|
|
229
|
+
const menuHeaders = menuPage.locator('.el-table__header th')
|
|
230
|
+
await expect(menuHeaders).toHaveCount(7)
|
|
231
|
+
await expect(menuHeaders.nth(0)).toHaveText('菜单名称')
|
|
232
|
+
await expect(menuHeaders.nth(1)).toHaveText('类型')
|
|
233
|
+
await expect(menuHeaders.nth(2)).toHaveText('排序')
|
|
234
|
+
await expect(menuHeaders.nth(3)).toHaveText('权限标识')
|
|
235
|
+
await expect(menuHeaders.nth(4)).toHaveText('组件路径')
|
|
236
|
+
await expect(menuHeaders.nth(5)).toHaveText('状态')
|
|
237
|
+
await expect(menuHeaders.nth(6)).toHaveText('操作')
|
|
238
|
+
await expect(menuPage.locator('.el-table__header .el-checkbox')).toHaveCount(0)
|
|
239
|
+
const fixedActions = menuPage.locator('.og-table-actions-region__fixed').getByRole('button')
|
|
240
|
+
await expect(fixedActions).toHaveCount(3)
|
|
241
|
+
await expect(fixedActions.nth(0)).toHaveText('新增菜单')
|
|
242
|
+
await expect(fixedActions.nth(1)).toHaveText('保存排序')
|
|
243
|
+
await expect(fixedActions.nth(2)).toHaveText('展开/折叠')
|
|
244
|
+
await expect(
|
|
245
|
+
menuPage.locator('.og-table-toolbar__actions').getByRole('button', { name: '保存排序' }),
|
|
246
|
+
).toHaveCount(0)
|
|
247
|
+
// v3.9.2 搜索区 status 占位符「菜单状态」(index.vue:13);ElSelect 把它渲染到
|
|
248
|
+
// .el-select__placeholder 文本节点,而不是内部搜索 input 的 placeholder 属性。
|
|
249
|
+
await expect(
|
|
250
|
+
menuPage.locator('[data-og-search-field="status"] .el-select__placeholder'),
|
|
251
|
+
).toHaveText('菜单状态')
|
|
252
|
+
|
|
253
|
+
await fixedActions.nth(0).click()
|
|
254
|
+
const menuDialog = page.getByRole('dialog')
|
|
255
|
+
// 表单字段顺序与栅格对齐 v3.9.2 第 126–309 行(默认目录 M)。
|
|
256
|
+
const expectedFields = [
|
|
257
|
+
['parentId', '24'],
|
|
258
|
+
['menuType', '24'],
|
|
259
|
+
['icon', '12'],
|
|
260
|
+
['orderNum', '12'],
|
|
261
|
+
['menuName', '12'],
|
|
262
|
+
['isFrame', '12'],
|
|
263
|
+
['path', '12'],
|
|
264
|
+
['visible', '12'],
|
|
265
|
+
['status', '12'],
|
|
266
|
+
]
|
|
267
|
+
const formFields = menuDialog.locator('[data-og-form-field]')
|
|
268
|
+
await expect(menuDialog.locator('[data-og-form-field="parentId"]')).toBeVisible()
|
|
269
|
+
const actualFields = await formFields.evaluateAll((nodes) =>
|
|
270
|
+
nodes.map((node) => [
|
|
271
|
+
node.getAttribute('data-og-form-field'),
|
|
272
|
+
node.className.match(/el-col-(\d+)/u)?.[1] ?? '',
|
|
273
|
+
]),
|
|
274
|
+
)
|
|
275
|
+
expect(actualFields).toEqual(expectedFields)
|
|
276
|
+
await expect(menuDialog.locator('[data-og-form-field="remark"]')).toHaveCount(0)
|
|
277
|
+
await expect(menuDialog.locator('.menu-icon-preview')).toHaveCount(0)
|
|
278
|
+
await expect(menuDialog.locator('[data-og-form-field="menuName"] input')).toHaveAttribute(
|
|
279
|
+
'placeholder',
|
|
280
|
+
'请输入菜单名称',
|
|
281
|
+
)
|
|
282
|
+
await expect(
|
|
283
|
+
menuDialog.locator('[data-og-form-field="icon"] .el-select__placeholder'),
|
|
284
|
+
).toContainText('点击选择图标')
|
|
285
|
+
await expect(menuDialog.locator('[data-og-form-field="orderNum"]')).toContainText('显示排序')
|
|
286
|
+
await expect(menuDialog.locator('[data-og-form-field="status"]')).toContainText('菜单状态')
|
|
287
|
+
|
|
288
|
+
// 上级菜单树过滤隐藏菜单(seed 中「字典数据」visible=1)。
|
|
289
|
+
const parentField = menuDialog.locator('[data-og-form-field="parentId"]')
|
|
290
|
+
await parentField.locator('.el-select, .el-tree-select').first().click()
|
|
291
|
+
await expect(page.getByRole('treeitem', { name: '主类目' })).toBeVisible()
|
|
292
|
+
await expect(page.getByRole('treeitem', { name: '字典数据' })).toHaveCount(0)
|
|
293
|
+
await page.keyboard.press('Escape')
|
|
294
|
+
|
|
295
|
+
const menuTypeField = menuDialog.locator('[data-og-form-field="menuType"]')
|
|
296
|
+
const iconField = menuDialog.locator('[data-og-form-field="icon"]')
|
|
297
|
+
const iconSelect = iconField.locator('.el-select')
|
|
298
|
+
await iconSelect.click()
|
|
299
|
+
const directoryIconDropdown = page.locator('.el-select-dropdown:visible')
|
|
300
|
+
const directoryIconOptions = directoryIconDropdown.locator('.el-select-dropdown__item')
|
|
301
|
+
await expect(directoryIconOptions).toHaveCount(1)
|
|
302
|
+
await expect(directoryIconOptions).toContainText('setting')
|
|
303
|
+
await expect(directoryIconOptions.locator('.menu-icon-option svg')).toHaveCount(1)
|
|
304
|
+
await expect(
|
|
305
|
+
directoryIconDropdown.getByRole('option', { name: 'setting', exact: true }).locator('use'),
|
|
306
|
+
).toHaveAttribute('href', '#og-icon-directory-setting')
|
|
307
|
+
await page.screenshot({
|
|
308
|
+
path: testInfo.outputPath('menu-directory-icon-options.png'),
|
|
309
|
+
})
|
|
310
|
+
await directoryIconDropdown.getByRole('option', { name: 'setting', exact: true }).click()
|
|
311
|
+
|
|
312
|
+
await menuTypeField.locator('input[value="C"]').check({ force: true })
|
|
313
|
+
await expect(iconSelect.locator('.el-select__selected-item').first()).not.toContainText('setting')
|
|
314
|
+
await iconSelect.click()
|
|
315
|
+
const pageIconDropdown = page.locator('.el-select-dropdown:visible')
|
|
316
|
+
const pageIconOptions = pageIconDropdown.locator('.el-select-dropdown__item')
|
|
317
|
+
await expect(pageIconOptions).toHaveCount(5)
|
|
318
|
+
await expect(pageIconOptions.locator('.menu-icon-option svg')).toHaveCount(5)
|
|
319
|
+
await expect(pageIconDropdown.getByRole('option', { name: 'setting', exact: true })).toHaveCount(
|
|
320
|
+
0,
|
|
321
|
+
)
|
|
322
|
+
await expect(
|
|
323
|
+
pageIconDropdown.getByRole('option', { name: 'user', exact: true }).locator('use'),
|
|
324
|
+
).toHaveAttribute('href', '#og-icon-page-user')
|
|
325
|
+
await page.screenshot({
|
|
326
|
+
path: testInfo.outputPath('menu-page-icon-options.png'),
|
|
327
|
+
})
|
|
328
|
+
await pageIconDropdown.getByRole('option', { name: 'user', exact: true }).click()
|
|
329
|
+
|
|
330
|
+
await menuTypeField.locator('input[value="F"]').check({ force: true })
|
|
331
|
+
await expect(iconField).toHaveCount(0)
|
|
332
|
+
const permissionField = menuDialog.locator('[data-og-form-field="perms"]')
|
|
333
|
+
await expect(permissionField.locator('.el-form-item__label')).toContainText('权限字符')
|
|
334
|
+
|
|
335
|
+
await menuTypeField.locator('input[value="C"]').check({ force: true })
|
|
336
|
+
await iconSelect.click()
|
|
337
|
+
await page
|
|
338
|
+
.locator('.el-select-dropdown:visible')
|
|
339
|
+
.getByRole('option', { name: 'user', exact: true })
|
|
340
|
+
.click()
|
|
341
|
+
const externalUrl = 'https://admin-e2e.example.test/target'
|
|
342
|
+
await menuDialog.locator('[data-og-form-field="menuName"] input').fill('E2E external link')
|
|
343
|
+
await menuDialog.locator('[data-og-form-field="orderNum"] input').fill('8')
|
|
344
|
+
await menuDialog.locator('[data-og-form-field="path"] input').fill(externalUrl)
|
|
345
|
+
const externalRadio = menuDialog.locator('[data-og-form-field="isFrame"] .el-radio').filter({
|
|
346
|
+
has: page.locator('input[value="0"]'),
|
|
347
|
+
})
|
|
348
|
+
await externalRadio.click()
|
|
349
|
+
await menuDialog.locator('[data-og-form-field="component"] input').fill('system/external/index')
|
|
350
|
+
const menuCreate = page.waitForRequest(
|
|
351
|
+
(request) =>
|
|
352
|
+
request.method() === 'POST' && new URL(request.url()).pathname === '/api/system/menu',
|
|
353
|
+
)
|
|
354
|
+
await saveDialog(page)
|
|
355
|
+
const menuPayload = (await menuCreate).postDataJSON() as Record<string, unknown>
|
|
356
|
+
expect(menuPayload).toMatchObject({
|
|
357
|
+
menuName: 'E2E external link',
|
|
358
|
+
orderNum: 8,
|
|
359
|
+
path: externalUrl,
|
|
360
|
+
isFrame: '0',
|
|
361
|
+
icon: 'user',
|
|
362
|
+
// v3.9.2 submitForm 直接提交 form:外链 C 的可见字段不被静默清空。
|
|
363
|
+
component: 'system/external/index',
|
|
364
|
+
})
|
|
365
|
+
expect(menuPayload).not.toHaveProperty('remark')
|
|
366
|
+
await expect(
|
|
367
|
+
page.locator('.el-table__body tr').filter({ hasText: 'E2E external link' }).first(),
|
|
368
|
+
).toBeVisible()
|
|
369
|
+
|
|
370
|
+
const menuRoutesRefresh = page.waitForResponse(
|
|
371
|
+
(response) =>
|
|
372
|
+
response.request().method() === 'GET' &&
|
|
373
|
+
new URL(response.url()).pathname === '/api/getRouters',
|
|
374
|
+
)
|
|
375
|
+
await page.reload()
|
|
376
|
+
const menuRoutesResponse = await menuRoutesRefresh
|
|
377
|
+
const menuResponse = (await menuRoutesResponse.json()) as {
|
|
378
|
+
data: BackendMenuRoute[]
|
|
379
|
+
}
|
|
380
|
+
const externalMenuId = findMenuId(menuResponse.data, 'E2E external link')
|
|
381
|
+
expect(externalMenuId).toBeDefined()
|
|
382
|
+
await expect(page.getByTestId('menu-list-page')).toBeVisible()
|
|
383
|
+
await page.goto(`/_external/${externalMenuId}`)
|
|
384
|
+
await expect(page.locator('.external-link-page__frame')).toHaveAttribute('src', externalUrl)
|
|
385
|
+
|
|
386
|
+
await page.goto('/system/menu')
|
|
387
|
+
const menuRow = page
|
|
388
|
+
.locator('.el-table__body tr')
|
|
389
|
+
.filter({ hasText: 'E2E external link' })
|
|
390
|
+
.first()
|
|
391
|
+
await menuRow.getByRole('button', { name: '修改', exact: true }).click()
|
|
392
|
+
const editDialog = page.getByRole('dialog')
|
|
393
|
+
await expect(editDialog.locator('[data-og-form-field="menuName"] input')).toHaveValue(
|
|
394
|
+
'E2E external link',
|
|
395
|
+
)
|
|
396
|
+
await editDialog.getByRole('button', { name: '取消', exact: true }).click()
|
|
397
|
+
|
|
398
|
+
const detailRequest = page.waitForRequest(
|
|
399
|
+
(item) =>
|
|
400
|
+
item.method() === 'GET' && /^\/api\/system\/menu\/[^/]+$/u.test(new URL(item.url()).pathname),
|
|
401
|
+
)
|
|
402
|
+
await menuRow.getByRole('button', { name: '修改', exact: true }).click()
|
|
403
|
+
expect(new URL((await detailRequest).url()).pathname).toMatch(/^\/api\/system\/menu\/[^/]+$/u)
|
|
404
|
+
await page.getByRole('dialog').getByRole('button', { name: '取消', exact: true }).click()
|
|
405
|
+
|
|
406
|
+
await page.goto('/system/dept')
|
|
407
|
+
const departmentTable = page.getByTestId('dept-list-page')
|
|
408
|
+
await expect(departmentTable.locator('[data-og-search-field="keyword"]')).toBeVisible()
|
|
409
|
+
await expect(departmentTable.locator('[data-og-search-field="deptName"]')).toBeVisible()
|
|
410
|
+
await expect(departmentTable.locator('[data-og-search-field="status"]')).toBeVisible()
|
|
411
|
+
const toolbarInsets = await departmentTable
|
|
412
|
+
.locator('.og-table__actions-toolbar-row')
|
|
413
|
+
.evaluate((toolbar) => {
|
|
414
|
+
const tableBody = toolbar.parentElement?.querySelector('.og-table__body')
|
|
415
|
+
if (!(tableBody instanceof HTMLElement)) return undefined
|
|
416
|
+
const toolbarStyle = window.getComputedStyle(toolbar)
|
|
417
|
+
const tableStyle = window.getComputedStyle(tableBody)
|
|
418
|
+
return {
|
|
419
|
+
toolbarStart: toolbarStyle.paddingInlineStart,
|
|
420
|
+
toolbarEnd: toolbarStyle.paddingInlineEnd,
|
|
421
|
+
tableStart: tableStyle.marginInlineStart,
|
|
422
|
+
tableEnd: tableStyle.marginInlineEnd,
|
|
423
|
+
}
|
|
424
|
+
})
|
|
425
|
+
expect(toolbarInsets).toBeDefined()
|
|
426
|
+
expect(toolbarInsets?.toolbarStart).toBe(toolbarInsets?.tableStart)
|
|
427
|
+
expect(toolbarInsets?.toolbarEnd).toBe(toolbarInsets?.tableEnd)
|
|
428
|
+
await page.getByRole('button', { name: '新增部门', exact: true }).click()
|
|
429
|
+
const departmentDialog = page.getByRole('dialog')
|
|
430
|
+
const departmentName = `E2E Department ${Date.now()}`
|
|
431
|
+
await departmentDialog.locator('[data-og-form-field="deptName"] input').fill(departmentName)
|
|
432
|
+
const departmentListRefresh = page.waitForResponse(
|
|
433
|
+
(response) =>
|
|
434
|
+
response.request().method() === 'GET' &&
|
|
435
|
+
new URL(response.url()).pathname === '/api/system/dept/list',
|
|
436
|
+
)
|
|
437
|
+
const departmentCreate = page.waitForRequest(
|
|
438
|
+
(request) =>
|
|
439
|
+
request.method() === 'POST' && new URL(request.url()).pathname === '/api/system/dept',
|
|
440
|
+
)
|
|
441
|
+
await saveDialog(page)
|
|
442
|
+
expect((await departmentCreate).postDataJSON()).toMatchObject({ deptName: departmentName })
|
|
443
|
+
await expect(departmentTable.getByText(departmentName, { exact: true })).toBeVisible()
|
|
444
|
+
const departmentResponse = await departmentListRefresh
|
|
445
|
+
const departmentPayload = (await departmentResponse.json()) as {
|
|
446
|
+
data: BackendDepartment[]
|
|
447
|
+
}
|
|
448
|
+
const parentDeptId = departmentPayload.data.find(
|
|
449
|
+
(department) => department.deptName === departmentName,
|
|
450
|
+
)?.deptId
|
|
451
|
+
if (!parentDeptId) throw new Error('Created department ID was not returned by the mock API')
|
|
452
|
+
|
|
453
|
+
const childDepartmentName = `E2E Child ${Date.now()}`
|
|
454
|
+
await departmentTable
|
|
455
|
+
.getByRole('row')
|
|
456
|
+
.filter({ hasText: departmentName })
|
|
457
|
+
.getByRole('button', { name: '新增下级部门', exact: true })
|
|
458
|
+
.click()
|
|
459
|
+
const childDepartmentDialog = page.getByRole('dialog')
|
|
460
|
+
await childDepartmentDialog
|
|
461
|
+
.locator('[data-og-form-field="deptName"] input')
|
|
462
|
+
.fill(childDepartmentName)
|
|
463
|
+
await childDepartmentDialog.locator('[data-og-form-field="orderNum"] input').fill('3')
|
|
464
|
+
const childDepartmentCreate = page.waitForRequest(
|
|
465
|
+
(request) =>
|
|
466
|
+
request.method() === 'POST' && new URL(request.url()).pathname === '/api/system/dept',
|
|
467
|
+
)
|
|
468
|
+
await saveDialog(page)
|
|
469
|
+
expect((await childDepartmentCreate).postDataJSON()).toMatchObject({
|
|
470
|
+
parentId: Number(parentDeptId),
|
|
471
|
+
ancestors: `0,${parentDeptId}`,
|
|
472
|
+
deptName: childDepartmentName,
|
|
473
|
+
orderNum: 3,
|
|
474
|
+
})
|
|
475
|
+
await departmentTable
|
|
476
|
+
.getByRole('row')
|
|
477
|
+
.filter({ hasText: departmentName })
|
|
478
|
+
.locator('.el-table__expand-icon')
|
|
479
|
+
.click()
|
|
480
|
+
await expect(departmentTable.getByText(childDepartmentName, { exact: true })).toBeVisible()
|
|
481
|
+
|
|
482
|
+
await page.goto('/system/dict/type')
|
|
483
|
+
await page.getByRole('button', { name: '新增字典', exact: true }).click()
|
|
484
|
+
const dictTypeDialog = page.getByRole('dialog')
|
|
485
|
+
const dictName = `E2E dictionary ${Date.now()}`
|
|
486
|
+
const dictType = `e2e_dict_${Date.now()}`
|
|
487
|
+
await dictTypeDialog.locator('[data-og-form-field="dictName"] input').fill(dictName)
|
|
488
|
+
await dictTypeDialog.locator('[data-og-form-field="dictType"] input').fill(dictType)
|
|
489
|
+
const dictTypeCreate = page.waitForRequest(
|
|
490
|
+
(request) =>
|
|
491
|
+
request.method() === 'POST' && new URL(request.url()).pathname === '/api/system/dict/type',
|
|
492
|
+
)
|
|
493
|
+
await saveDialog(page)
|
|
494
|
+
expect((await dictTypeCreate).postDataJSON()).toMatchObject({ dictName, dictType })
|
|
495
|
+
const dictRow = page.locator('.el-table__body tr').filter({ hasText: dictType }).first()
|
|
496
|
+
await expect(dictRow).toBeVisible()
|
|
497
|
+
const dictPreviewRequest = page.waitForRequest((request) => {
|
|
498
|
+
const url = new URL(request.url())
|
|
499
|
+
return (
|
|
500
|
+
request.method() === 'GET' &&
|
|
501
|
+
url.pathname === '/api/system/dict/data/list' &&
|
|
502
|
+
url.searchParams.get('dictType') === dictType
|
|
503
|
+
)
|
|
504
|
+
})
|
|
505
|
+
await dictRow.getByRole('button', { name: dictType, exact: true }).click()
|
|
506
|
+
const previewUrl = new URL((await dictPreviewRequest).url())
|
|
507
|
+
expect(previewUrl.searchParams.get('pageNum')).toBe('1')
|
|
508
|
+
expect(previewUrl.searchParams.get('pageSize')).toBe('100')
|
|
509
|
+
await expect(page.getByTestId('dict-data-preview')).toBeVisible()
|
|
510
|
+
await expect(page.getByTestId('dict-data-preview')).toContainText('暂无字典数据')
|
|
511
|
+
await page.keyboard.press('Escape')
|
|
512
|
+
await expect(page.getByTestId('dict-data-preview')).toBeHidden()
|
|
513
|
+
await dictRow.getByRole('button', { name: '列表', exact: true }).click()
|
|
514
|
+
await expect(page).toHaveURL(/\/system\/dict\/data\/\d+\?dictName=/u)
|
|
515
|
+
await expect(page.getByTestId('dict-data-list-page')).toBeVisible()
|
|
516
|
+
await expect(page.locator('.breadcrumb-bar')).toContainText('字典数据')
|
|
517
|
+
const dictDataPage = page.getByTestId('dict-data-list-page')
|
|
518
|
+
const dictDataSearch = dictDataPage.locator('.og-search')
|
|
519
|
+
await expect(dictDataSearch).toBeVisible()
|
|
520
|
+
await expect(dictDataPage.locator('[data-og-search-field="dictType"]')).toBeVisible()
|
|
521
|
+
await expect(dictDataPage.locator('[data-og-search-field="dictLabel"]')).toBeVisible()
|
|
522
|
+
await dictDataSearch.getByRole('button', { name: '更多', exact: true }).click()
|
|
523
|
+
await expect(dictDataPage.locator('[data-og-search-field="status"]')).toBeVisible()
|
|
524
|
+
await dictDataPage.getByRole('button', { name: '隐藏搜索', exact: true }).click()
|
|
525
|
+
await expect(dictDataSearch).toBeHidden()
|
|
526
|
+
await dictDataPage.getByRole('button', { name: '显示搜索', exact: true }).click()
|
|
527
|
+
await expect(dictDataSearch).toBeVisible()
|
|
528
|
+
const searchActionInset = await dictDataPage
|
|
529
|
+
.locator('.og-table__actions-toolbar-row')
|
|
530
|
+
.evaluate((toolbar) => getComputedStyle(toolbar).paddingInlineStart)
|
|
531
|
+
expect(searchActionInset).toBe('16px')
|
|
532
|
+
await expect(dictDataPage.locator('.system-page__back')).toHaveCount(0)
|
|
533
|
+
await expect(dictDataPage.locator('.og-table-actions-region__title')).toHaveCount(0)
|
|
534
|
+
const addDictDataButton = dictDataPage
|
|
535
|
+
.locator('.og-table-actions-region__fixed')
|
|
536
|
+
.getByRole('button')
|
|
537
|
+
.first()
|
|
538
|
+
await expect(addDictDataButton).toBeVisible()
|
|
539
|
+
await expect(addDictDataButton).toBeEnabled()
|
|
540
|
+
await addDictDataButton.click()
|
|
541
|
+
const dictDataDialog = page.getByRole('dialog')
|
|
542
|
+
await dictDataDialog.locator('[data-og-form-field="dictLabel"] input').fill('E2E enabled')
|
|
543
|
+
await dictDataDialog.locator('[data-og-form-field="dictValue"] input').fill('e2e')
|
|
544
|
+
const dictDataCreate = page.waitForRequest(
|
|
545
|
+
(request) =>
|
|
546
|
+
request.method() === 'POST' && new URL(request.url()).pathname === '/api/system/dict/data',
|
|
547
|
+
)
|
|
548
|
+
await saveDialog(page)
|
|
549
|
+
expect((await dictDataCreate).postDataJSON()).toMatchObject({
|
|
550
|
+
dictType,
|
|
551
|
+
dictLabel: 'E2E enabled',
|
|
552
|
+
dictValue: 'e2e',
|
|
553
|
+
})
|
|
554
|
+
await expect(page.getByText('E2E enabled', { exact: true })).toBeVisible()
|
|
555
|
+
})
|