chore: adapt admin UI for Gongxue
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# 应用标题
|
||||
VITE_APP_TITLE=芋道管理系统
|
||||
VITE_APP_TITLE=恭学教育管理平台
|
||||
|
||||
# 应用命名空间,用于缓存、store等功能的前缀,确保隔离
|
||||
VITE_APP_NAMESPACE=yudao-vben-antd
|
||||
VITE_APP_NAMESPACE=gongxue-education-admin
|
||||
|
||||
# 对store进行加密的密钥,在将store持久化到localStorage时会使用该密钥进行加密
|
||||
VITE_APP_STORE_SECURE_KEY=please-replace-me-with-your-own-key
|
||||
@@ -17,10 +17,10 @@ VITE_APP_TENANT_ENABLE=true
|
||||
VITE_APP_CAPTCHA_ENABLE=false
|
||||
|
||||
# 文档地址的开关
|
||||
VITE_APP_DOCALERT_ENABLE=true
|
||||
VITE_APP_DOCALERT_ENABLE=false
|
||||
|
||||
# 百度统计
|
||||
VITE_APP_BAIDU_CODE = e98f2eab6ceb8688bc6d8fc5332ff093
|
||||
VITE_APP_BAIDU_CODE=
|
||||
|
||||
# GoView域名
|
||||
VITE_GOVIEW_URL='http://127.0.0.1:3000'
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="renderer" content="webkit" />
|
||||
<meta name="description" content="A Modern Back-end Management System" />
|
||||
<meta name="keywords" content="Vben Admin Vue3 Vite" />
|
||||
<meta name="author" content="Vben" />
|
||||
<meta name="description" content="恭学教育管理平台" />
|
||||
<meta name="keywords" content="恭学教育 教育管理 SaaS" />
|
||||
<meta name="author" content="恭学教育" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
{
|
||||
"name": "@vben/web-antd",
|
||||
"version": "5.7.0",
|
||||
"homepage": "https://vben.pro",
|
||||
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
|
||||
"homepage": "https://git.gongxue100.com/wangziqi/yudao-ui-admin-vben",
|
||||
"bugs": "https://git.gongxue100.com/wangziqi/yudao-ui-admin-vben/issues",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/vbenjs/vue-vben-admin.git",
|
||||
"url": "git+https://git.gongxue100.com/wangziqi/yudao-ui-admin-vben.git",
|
||||
"directory": "apps/web-antd"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "vben",
|
||||
"email": "ann.vben@gmail.com",
|
||||
"url": "https://github.com/anncwb"
|
||||
"name": "恭学教育",
|
||||
"url": "https://www.gongxue.com"
|
||||
},
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -6,19 +6,11 @@ import type { SystemTenantApi } from '#/api/system/tenant';
|
||||
import { computed, onMounted, ref, watch } from 'vue';
|
||||
|
||||
import { useAccess } from '@vben/access';
|
||||
import { AuthenticationLoginExpiredModal, useVbenModal } from '@vben/common-ui';
|
||||
import { VBEN_DOC_URL, VBEN_GITHUB_URL } from '@vben/constants';
|
||||
import { AuthenticationLoginExpiredModal } from '@vben/common-ui';
|
||||
import { isTenantEnable, useTabs, useWatermark } from '@vben/hooks';
|
||||
import {
|
||||
AntdProfileOutlined,
|
||||
BookOpenText,
|
||||
CircleHelp,
|
||||
IconifyIcon,
|
||||
SvgGithubIcon,
|
||||
} from '@vben/icons';
|
||||
import { AntdProfileOutlined, IconifyIcon } from '@vben/icons';
|
||||
import {
|
||||
BasicLayout,
|
||||
Help,
|
||||
LockScreen,
|
||||
Notification,
|
||||
TenantDropdown,
|
||||
@@ -26,7 +18,7 @@ import {
|
||||
} from '@vben/layouts';
|
||||
import { preferences, usePreferences } from '@vben/preferences';
|
||||
import { useAccessStore, useUserStore } from '@vben/stores';
|
||||
import { formatDateTime, openWindow } from '@vben/utils';
|
||||
import { formatDateTime } from '@vben/utils';
|
||||
|
||||
import { message, Tooltip } from 'ant-design-vue';
|
||||
|
||||
@@ -53,9 +45,6 @@ const notifications = ref<NotificationItem[]>([]);
|
||||
const unreadCount = ref(0);
|
||||
const showDot = computed(() => unreadCount.value > 0);
|
||||
|
||||
const [HelpModal, helpModalApi] = useVbenModal({
|
||||
connectedComponent: Help,
|
||||
});
|
||||
const { isDark } = usePreferences();
|
||||
|
||||
const menus = computed(() => [
|
||||
@@ -66,31 +55,6 @@ const menus = computed(() => [
|
||||
icon: AntdProfileOutlined,
|
||||
text: $t('ui.widgets.profile'),
|
||||
},
|
||||
{
|
||||
handler: () => {
|
||||
openWindow(VBEN_DOC_URL, {
|
||||
target: '_blank',
|
||||
});
|
||||
},
|
||||
icon: BookOpenText,
|
||||
text: $t('ui.widgets.document'),
|
||||
},
|
||||
{
|
||||
handler: () => {
|
||||
openWindow(VBEN_GITHUB_URL, {
|
||||
target: '_blank',
|
||||
});
|
||||
},
|
||||
icon: SvgGithubIcon,
|
||||
text: 'GitHub',
|
||||
},
|
||||
{
|
||||
handler: () => {
|
||||
helpModalApi.open();
|
||||
},
|
||||
icon: CircleHelp,
|
||||
text: $t('ui.widgets.qa'),
|
||||
},
|
||||
]);
|
||||
|
||||
const avatar = computed(() => {
|
||||
@@ -332,5 +296,4 @@ watch(
|
||||
<LockScreen :avatar @to-login="handleLogout" />
|
||||
</template>
|
||||
</BasicLayout>
|
||||
<HelpModal />
|
||||
</template>
|
||||
|
||||
@@ -30,7 +30,7 @@ export const overridesPreferences = defineOverridesPreferences({
|
||||
},
|
||||
copyright: {
|
||||
companyName: import.meta.env.VITE_APP_TITLE,
|
||||
companySiteLink: 'https://gitee.com/yudaocode/yudao-ui-admin-vben',
|
||||
companySiteLink: '',
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -5,5 +5,8 @@ defineOptions({ name: 'About' });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<About />
|
||||
<About
|
||||
description="恭学教育面向教学、题库、练习与学习管理的一体化教育 SaaS 平台。"
|
||||
name="恭学教育管理平台"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -1,91 +1,22 @@
|
||||
<script lang="ts" setup>
|
||||
import type {
|
||||
WorkbenchProjectItem,
|
||||
WorkbenchQuickNavItem,
|
||||
WorkbenchTodoItem,
|
||||
WorkbenchTrendItem,
|
||||
} from '@vben/common-ui';
|
||||
import type { WorkbenchQuickNavItem } from '@vben/common-ui';
|
||||
|
||||
import { ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import {
|
||||
AnalysisChartCard,
|
||||
WorkbenchHeader,
|
||||
WorkbenchProject,
|
||||
WorkbenchQuickNav,
|
||||
WorkbenchTodo,
|
||||
WorkbenchTrends,
|
||||
} from '@vben/common-ui';
|
||||
import { preferences } from '@vben/preferences';
|
||||
import { useUserStore } from '@vben/stores';
|
||||
import { openWindow } from '@vben/utils';
|
||||
|
||||
import AnalyticsVisitsSource from '../analytics/analytics-visits-source.vue';
|
||||
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
|
||||
// 这是一个示例数据,实际项目中需要根据实际情况进行调整
|
||||
// url 也可以是内部路由,在 navTo 方法中识别处理,进行内部跳转
|
||||
// 例如:url: /dashboard/workspace
|
||||
const projectItems: WorkbenchProjectItem[] = [
|
||||
{
|
||||
color: '#6DB33F',
|
||||
content: 'github.com/YunaiV/ruoyi-vue-pro',
|
||||
date: '2025-01-02',
|
||||
group: 'Spring Boot 单体架构',
|
||||
icon: 'simple-icons:springboot',
|
||||
title: 'ruoyi-vue-pro',
|
||||
url: 'https://github.com/YunaiV/ruoyi-vue-pro',
|
||||
},
|
||||
{
|
||||
color: '#409EFF',
|
||||
content: 'github.com/yudaocode/yudao-ui-admin-vue3',
|
||||
date: '2025-02-03',
|
||||
group: 'Vue3 + element-plus 管理后台',
|
||||
icon: 'ep:element-plus',
|
||||
title: 'yudao-ui-admin-vue3',
|
||||
url: 'https://github.com/yudaocode/yudao-ui-admin-vue3',
|
||||
},
|
||||
{
|
||||
color: '#ff4d4f',
|
||||
content: 'github.com/yudaocode/yudao-mall-uniapp',
|
||||
date: '2025-03-04',
|
||||
group: 'Vue3 + uniapp 商城手机端',
|
||||
icon: 'icon-park-outline:mall-bag',
|
||||
title: 'yudao-mall-uniapp',
|
||||
url: 'https://github.com/yudaocode/yudao-mall-uniapp',
|
||||
},
|
||||
{
|
||||
color: '#1890ff',
|
||||
content: 'github.com/YunaiV/yudao-cloud',
|
||||
date: '2025-04-05',
|
||||
group: 'Spring Cloud 微服务架构',
|
||||
icon: 'material-symbols:cloud-outline',
|
||||
title: 'yudao-cloud',
|
||||
url: 'https://github.com/YunaiV/yudao-cloud',
|
||||
},
|
||||
{
|
||||
color: '#e18525',
|
||||
content: 'github.com/yudaocode/yudao-ui-admin-vben',
|
||||
date: '2025-05-06',
|
||||
group: 'Vue3 + vben5(antd) 管理后台',
|
||||
icon: 'devicon:antdesign',
|
||||
title: 'yudao-ui-admin-vben',
|
||||
url: 'https://github.com/yudaocode/yudao-ui-admin-vben',
|
||||
},
|
||||
{
|
||||
color: '#2979ff',
|
||||
content: 'github.com/yudaocode/yudao-ui-admin-uniapp',
|
||||
date: '2025-06-01',
|
||||
group: 'Vue3 + uniapp 管理手机端',
|
||||
icon: 'ant-design:mobile',
|
||||
title: 'yudao-ui-admin-uniapp',
|
||||
url: 'https://github.com/yudaocode/yudao-ui-admin-uniapp',
|
||||
},
|
||||
];
|
||||
|
||||
// 同样,这里的 url 也可以使用以 http 开头的外部链接
|
||||
// 快捷导航仅处理站内路由
|
||||
const quickNavItems: WorkbenchQuickNavItem[] = [
|
||||
{
|
||||
color: '#1fdaca',
|
||||
@@ -125,104 +56,9 @@ const quickNavItems: WorkbenchQuickNavItem[] = [
|
||||
},
|
||||
];
|
||||
|
||||
const todoItems = ref<WorkbenchTodoItem[]>([
|
||||
{
|
||||
completed: false,
|
||||
content: `系统支持 JDK 8/17/21,Vue 2/3`,
|
||||
date: '2024-07-15 09:30:00',
|
||||
title: '技术兼容性',
|
||||
},
|
||||
{
|
||||
completed: false,
|
||||
content: `后端提供 Spring Boot 2.7/3.2 + Cloud 双架构`,
|
||||
date: '2024-08-30 14:20:00',
|
||||
title: '架构灵活性',
|
||||
},
|
||||
{
|
||||
completed: false,
|
||||
content: `全部开源,个人与企业可 100% 直接使用,无需授权`,
|
||||
date: '2024-07-25 16:45:00',
|
||||
title: '开源免授权',
|
||||
},
|
||||
{
|
||||
completed: false,
|
||||
content: `国内使用最广泛的快速开发平台,远超 10w+ 企业使用`,
|
||||
date: '2024-07-10 11:15:00',
|
||||
title: '广泛企业认可',
|
||||
},
|
||||
]);
|
||||
const trendItems: WorkbenchTrendItem[] = [
|
||||
{
|
||||
avatar: 'svg:avatar-1',
|
||||
content: `在 <a>开源组</a> 创建了项目 <a>Vue</a>`,
|
||||
date: '刚刚',
|
||||
title: '威廉',
|
||||
},
|
||||
{
|
||||
avatar: 'svg:avatar-2',
|
||||
content: `关注了 <a>威廉</a> `,
|
||||
date: '1个小时前',
|
||||
title: '艾文',
|
||||
},
|
||||
{
|
||||
avatar: 'svg:avatar-3',
|
||||
content: `发布了 <a>个人动态</a> `,
|
||||
date: '1天前',
|
||||
title: '克里斯',
|
||||
},
|
||||
{
|
||||
avatar: 'svg:avatar-4',
|
||||
content: `发表文章 <a>如何编写一个Vite插件</a> `,
|
||||
date: '2天前',
|
||||
title: 'Vben',
|
||||
},
|
||||
{
|
||||
avatar: 'svg:avatar-1',
|
||||
content: `回复了 <a>杰克</a> 的问题 <a>如何进行项目优化?</a>`,
|
||||
date: '3天前',
|
||||
title: '皮特',
|
||||
},
|
||||
{
|
||||
avatar: 'svg:avatar-2',
|
||||
content: `关闭了问题 <a>如何运行项目</a> `,
|
||||
date: '1周前',
|
||||
title: '杰克',
|
||||
},
|
||||
{
|
||||
avatar: 'svg:avatar-3',
|
||||
content: `发布了 <a>个人动态</a> `,
|
||||
date: '1周前',
|
||||
title: '威廉',
|
||||
},
|
||||
{
|
||||
avatar: 'svg:avatar-4',
|
||||
content: `推送了代码到 <a>Github</a>`,
|
||||
date: '2021-04-01 20:00',
|
||||
title: '威廉',
|
||||
},
|
||||
{
|
||||
avatar: 'svg:avatar-4',
|
||||
content: `发表文章 <a>如何编写使用 Admin Vben</a> `,
|
||||
date: '2021-03-01 20:00',
|
||||
title: 'Vben',
|
||||
},
|
||||
];
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
// 这是一个示例方法,实际项目中需要根据实际情况进行调整
|
||||
// This is a sample method, adjust according to the actual project requirements
|
||||
function navTo(nav: WorkbenchProjectItem | WorkbenchQuickNavItem) {
|
||||
if (nav.url?.startsWith('http')) {
|
||||
openWindow(nav.url);
|
||||
return;
|
||||
}
|
||||
function navTo(nav: WorkbenchQuickNavItem) {
|
||||
if (nav.url?.startsWith('/')) {
|
||||
router.push(nav.url).catch((error) => {
|
||||
console.error('Navigation failed:', error);
|
||||
});
|
||||
} else {
|
||||
console.warn(`Unknown URL for navigation item: ${nav.title} -> ${nav.url}`);
|
||||
router.push(nav.url);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -238,23 +74,15 @@ function navTo(nav: WorkbenchProjectItem | WorkbenchQuickNavItem) {
|
||||
<template #description> 今日晴,20℃ - 32℃! </template>
|
||||
</WorkbenchHeader>
|
||||
|
||||
<div class="flex flex-col lg:flex-row">
|
||||
<div class="mr-4 w-full lg:w-3/5">
|
||||
<WorkbenchProject :items="projectItems" title="项目" @click="navTo" />
|
||||
<WorkbenchTrends :items="trendItems" class="mt-5" title="最新动态" />
|
||||
</div>
|
||||
<div class="w-full lg:w-2/5">
|
||||
<WorkbenchQuickNav
|
||||
:items="quickNavItems"
|
||||
class="lg:mt-0"
|
||||
title="快捷导航"
|
||||
@click="navTo"
|
||||
/>
|
||||
<WorkbenchTodo :items="todoItems" class="mt-5" title="待办事项" />
|
||||
<AnalysisChartCard class="mt-5" title="访问来源">
|
||||
<AnalyticsVisitsSource />
|
||||
</AnalysisChartCard>
|
||||
</div>
|
||||
<div class="mt-5 grid grid-cols-1 gap-4 lg:grid-cols-2">
|
||||
<WorkbenchQuickNav
|
||||
:items="quickNavItems"
|
||||
title="快捷导航"
|
||||
@click="navTo"
|
||||
/>
|
||||
<AnalysisChartCard title="访问来源">
|
||||
<AnalyticsVisitsSource />
|
||||
</AnalysisChartCard>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
11
package.json
11
package.json
@@ -14,14 +14,13 @@
|
||||
"vue vben admin pro",
|
||||
"vue3"
|
||||
],
|
||||
"homepage": "https://github.com/vbenjs/vue-vben-admin",
|
||||
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
|
||||
"repository": "vbenjs/vue-vben-admin.git",
|
||||
"homepage": "https://git.gongxue100.com/wangziqi/yudao-ui-admin-vben",
|
||||
"bugs": "https://git.gongxue100.com/wangziqi/yudao-ui-admin-vben/issues",
|
||||
"repository": "https://git.gongxue100.com/wangziqi/yudao-ui-admin-vben.git",
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "vben",
|
||||
"email": "ann.vben@gmail.com",
|
||||
"url": "https://github.com/anncwb"
|
||||
"name": "恭学教育",
|
||||
"url": "https://www.gongxue.com"
|
||||
},
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user