diff --git a/src/config/menu-labels.ts b/src/config/menu-labels.ts index 451569c..489ebb0 100644 --- a/src/config/menu-labels.ts +++ b/src/config/menu-labels.ts @@ -48,11 +48,6 @@ export const MENU_LABELS: MenuLabel[] = [ // ===== 顶部菜单(原老 vue 一级) ===== { url: 'statistics/index', label: '首页', icon: 'HomeFilled', path: '/dashboard', sort: 1 }, { url: 'order/order', label: '订单管理', icon: 'Document', path: '/order', sort: 3 }, - { url: 'orderList/index', label: '订单列表', icon: 'List', path: '/order/list', sort: 4 }, - { url: 'orderMake/index', label: '开单', icon: 'Edit', path: '/order/create', sort: 5 }, - { url: 'villageManage/manageList', label: '村庄管理', icon: 'Location', path: '/village', sort: 6 }, - { url: 'village/user', label: '村民用户', icon: 'User', path: '/village/user', sort: 7 }, - { url: 'supplyList/index', label: '供应商列表', icon: 'Shop', path: '/supply', sort: 8 }, // ===== 用户模块 ===== { url: 'user/user', label: '用户列表', icon: 'User', path: '/user/user', sort: 100 }, @@ -102,8 +97,6 @@ export const MENU_LABELS: MenuLabel[] = [ { url: 'sys/operation?_mt=行业协会运营中心&operationType=4', label: '行业协会运营', icon: 'Connection', path: '/sys/operation/association', sort: 433 }, // ===== 课程模块 ===== - { url: 'course/coupon', label: '优惠券管理', icon: 'Ticket', path: '/course/coupon', sort: 500 }, - { url: 'course/sensitive', label: '敏感词汇管理', icon: 'WarningFilled', path: '/course/sensitive', sort: 501 }, // ===== API 模块 ===== { url: 'api/lunbo', label: '轮播管理', icon: 'Picture', path: '/api/lunbo', sort: 600 }, @@ -117,7 +110,6 @@ export const MENU_LABELS: MenuLabel[] = [ { url: 'other/industry', label: '行业', icon: 'OfficeBuilding', path: '/other/industry', sort: 703 }, { url: 'other/label', label: '标签管理', icon: 'PriceTag', path: '/other/label', sort: 704 }, { url: 'other/categoryGood', label: '平台分类', icon: 'Menu', path: '/other/category/good', sort: 705 }, - { url: 'other/categoryRM', label: '热门搜索记录', icon: 'Search', path: '/other/category/rm', sort: 706 }, { url: 'other/categoryZX', label: '资讯分类', icon: 'Menu', path: '/other/category/zx', sort: 707 }, { url: 'other/goodunit', label: '商品单位', icon: 'Box', path: '/other/goodunit', sort: 708 }, { url: 'other/supplierBrand', label: '品牌管理', icon: 'Star', path: '/other/brand', sort: 709 }, @@ -128,10 +120,8 @@ export const MENU_LABELS: MenuLabel[] = [ // ===== 基础设施(message/job/oss) ===== { url: 'message/sms', label: '短信配置', icon: 'ChatDotRound', path: '/message/sms', sort: 800 }, { url: 'job/schedule', label: '定时任务', icon: 'Timer', path: '/job/schedule', sort: 801 }, - { url: 'oss/oss', label: '文件上传', icon: 'FolderOpened', path: '/oss', sort: 802 }, // ===== 开发工具(devtools) ===== - { url: 'devtools/generator', label: '代码模板', icon: 'MagicStick', path: '/devtools/generator', sort: 900 }, { url: 'devtools/datasource', label: '数据源配置', icon: 'Coin', path: '/devtools/datasource', sort: 901 }, { url: 'devtools/param', label: '参数配置', icon: 'SetUp', path: '/devtools/param', sort: 902 }, { url: 'devtools/baseclass', label: '基类配置', icon: 'Files', path: '/devtools/baseclass', sort: 903 }, @@ -144,37 +134,13 @@ export const MENU_LABELS: MenuLabel[] = [ { url: 'openapi/company-account', label: '公司账号管理', icon: 'Avatar', path: '/openapi/company', sort: 1002 }, // ===== 补充缺失的菜单项(super_admin=1 时可见) ===== - { url: 'other/categoryZH', label: '综合分类', icon: 'Menu', path: '/other/category/zh', sort: 708 }, - { url: 'other/categoryCZ', label: '城镇分类', icon: 'Menu', path: '/other/category/cz', sort: 709 }, { url: 'sys/dict-type', label: '字典类型', icon: 'Collection', path: '/sys/dict', sort: 412 }, { url: 'sys/notice', label: '通知公告', icon: 'Bell', path: '/sys/notice', sort: 413 }, { url: 'sys/params', label: '参数配置', icon: 'Setting', path: '/sys/params', sort: 414 }, - { url: 'pay/order', label: '支付订单', icon: 'Money', path: '/pay/order', sort: 810 }, - { url: 'pay/alipaynotifylog', label: '支付宝通知日志', icon: 'Document', path: '/pay/alipay', sort: 811 }, - { url: 'sys/news', label: '资讯管理', icon: 'Document', path: '/sys/news', sort: 415 }, - { url: 'sys/ureport', label: '报表设计', icon: 'DataAnalysis', path: '/sys/ureport', sort: 416 }, - { url: 'sys/excel', label: 'Excel导出', icon: 'Download', path: '/sys/excel', sort: 417 }, - { url: 'sys/charts', label: '图表示例', icon: 'TrendCharts', path: '/sys/charts', sort: 418 }, - { url: 'sys/product', label: '商品示例', icon: 'Box', path: '/sys/product', sort: 419 }, - { url: 'product/shop', label: '店铺管理(→商品管理)', icon: 'Shop', path: '/supplier/good', sort: 350 }, - { url: 'orderMake/index-admin', label: '开单(管理端)', icon: 'Edit', path: '/order/create-admin', sort: 6 }, - { url: 'villageManage/farmerList', label: '农户列表', icon: 'User', path: '/village/farmer', sort: 7 }, - { url: 'villageManage/resourceList', label: '资源列表', icon: 'List', path: '/village/resource', sort: 8 }, - { url: 'supplyList/index', label: '供应商列表', icon: 'Shop', path: '/supply', sort: 9 }, - { url: 'api/user', label: 'API用户', icon: 'User', path: '/api/user', sort: 603 }, - { url: 'api/label', label: 'API标签', icon: 'PriceTag', path: '/api/label', sort: 604 }, - { url: 'api/teacher', label: '教师管理', icon: 'User', path: '/api/teacher', sort: 605 }, - { url: 'api/question', label: '题库管理', icon: 'Document', path: '/api/question', sort: 606 }, - { url: 'api/answerrecord', label: '答题记录', icon: 'List', path: '/api/answer', sort: 607 }, - { url: 'api/broker', label: '经纪人', icon: 'User', path: '/api/broker', sort: 608 }, - { url: 'api/broker-securities', label: '证券经纪人', icon: 'User', path: '/api/broker-securities', sort: 609 }, - { url: 'api/withdrawal', label: '提现管理', icon: 'Money', path: '/api/withdrawal', sort: 610 }, - { url: 'api/balancedetail', label: '余额明细', icon: 'Wallet', path: '/api/balance', sort: 611 }, { url: 'message/mail-template', label: '邮件模板', icon: 'Document', path: '/message/mail-template', sort: 803 }, { url: 'message/mail-log', label: '邮件日志', icon: 'List', path: '/message/mail-log', sort: 804 }, { url: 'message/sms-log', label: '短信日志', icon: 'List', path: '/message/sms-log', sort: 805 }, { url: 'sys/notice-user', label: '用户通知', icon: 'Bell', path: '/sys/notice-user', sort: 420 }, - { url: 'message/messageinitiavtive', label: '主动消息', icon: 'ChatDotRound', path: '/message/initiative', sort: 806 } ] /** fallback:未匹配到的菜单项用 url 当 label */ diff --git a/src/modules/generic/GenericTableView.vue b/src/modules/generic/GenericTableView.vue new file mode 100644 index 0000000..16163a4 --- /dev/null +++ b/src/modules/generic/GenericTableView.vue @@ -0,0 +1,198 @@ + + + + + +.rr-pagination { margin-top: 16px; display: flex; justify-content: flex-end; } diff --git a/src/router/index.ts b/src/router/index.ts index 63523f4..fdfbdf2 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -310,6 +310,105 @@ const routes: RouteRecordRaw[] = [ redirect: '/other/operateguide' }, + // W5.x.x+3: 11 个 P3 菜单改用 GenericTableView (沿用老 vue 后台菜单, 后端 500 时退化占位) + // 4 个 message 端点 (admin-server, 走 /sys/{sms,smslog,mailtemplate,maillog}/page) + { path: '/message/sms', name: 'MessageSms', component: () => import('@/modules/generic/GenericTableView.vue'), + props: () => ({ title: '短信配置', endpoint: '/sys/sms/page', filterKey: 'smsCode', + columns: [ + { prop: 'smsCode', label: '短信编码', minWidth: 200 }, + { prop: 'platform', label: '平台', width: 120, type: 'status', + statusMap: { 1: {label:'阿里云',type:'primary'}, 2: {label:'腾讯云',type:'success'}, 3: {label:'其他',type:'info'} } }, + { prop: 'remark', label: '备注', minWidth: 200 }, + { prop: 'createDate', label: '创建时间', width: 180, type: 'date' } + ] }), meta: { title: '短信配置' } }, + { path: '/message/sms-log', name: 'MessageSmsLog', component: () => import('@/modules/generic/GenericTableView.vue'), + props: () => ({ title: '短信日志', endpoint: '/sys/smslog/page', filterKey: 'mobile', + columns: [ + { prop: 'mobile', label: '手机号', width: 160 }, + { prop: 'smsCode', label: '短信编码', width: 200 }, + { prop: 'platform', label: '平台', width: 100, type: 'status', + statusMap: { 1: {label:'阿里云',type:'primary'}, 2: {label:'腾讯云',type:'success'} } }, + { prop: 'status', label: '状态', width: 100, type: 'status', + statusMap: { 0: {label:'失败',type:'danger'}, 1: {label:'成功',type:'success'} } }, + { prop: 'createDate', label: '发送时间', width: 180, type: 'date' } + ] }), meta: { title: '短信日志' } }, + { path: '/message/mail-template', name: 'MessageMailTemplate', component: () => import('@/modules/generic/GenericTableView.vue'), + props: () => ({ title: '邮件模板', endpoint: '/sys/mailtemplate/page', filterKey: 'name', + columns: [ + { prop: 'name', label: '模板名称', minWidth: 200 }, + { prop: 'subject', label: '邮件主题', minWidth: 200 }, + { prop: 'createDate', label: '创建时间', width: 180, type: 'date' } + ] }), meta: { title: '邮件模板' } }, + { path: '/message/mail-log', name: 'MessageMailLog', component: () => import('@/modules/generic/GenericTableView.vue'), + props: () => ({ title: '邮件日志', endpoint: '/sys/maillog/page', filterKey: 'mailTo', + columns: [ + { prop: 'mailTo', label: '收件人', minWidth: 200 }, + { prop: 'subject', label: '主题', minWidth: 200 }, + { prop: 'status', label: '状态', width: 100, type: 'status', + statusMap: { 0: {label:'失败',type:'danger'}, 1: {label:'成功',type:'success'} } }, + { prop: 'createDate', label: '发送时间', width: 180, type: 'date' } + ] }), meta: { title: '邮件日志' } }, + // 4 个运营中心 (共用 GenericTableView, type 参数 1=全国 2=省级 3=县级 4=行业协会) + { path: '/sys/operation', name: 'SysOperationCountry', component: () => import('@/modules/generic/GenericTableView.vue'), + props: () => ({ title: '全国运营中心', endpoint: '/sys/operation/pageList', queryParams: { type: 1 }, filterKey: 'name', + columns: [ + { prop: 'name', label: '运营中心名称', minWidth: 200 }, + { prop: 'type', label: '类型', width: 100, type: 'status', + statusMap: { 1: {label:'全国',type:'primary'}, 2: {label:'省级',type:'success'}, 3: {label:'县级',type:'info'}, 4: {label:'行业协会',type:'warning'} } }, + { prop: 'realName', label: '负责人', width: 140 }, + { prop: 'createDate', label: '创建时间', width: 180, type: 'date' } + ] }), meta: { title: '全国运营中心' } }, + { path: '/sys/operation/province', name: 'SysOperationProvince', component: () => import('@/modules/generic/GenericTableView.vue'), + props: () => ({ title: '省级运营中心', endpoint: '/sys/operation/pageList', queryParams: { type: 2 }, filterKey: 'name', + columns: [ + { prop: 'name', label: '运营中心名称', minWidth: 200 }, + { prop: 'provinceName', label: '省份', width: 160 }, + { prop: 'realName', label: '负责人', width: 140 }, + { prop: 'createDate', label: '创建时间', width: 180, type: 'date' } + ] }), meta: { title: '省级运营中心' } }, + { path: '/sys/operation/county', name: 'SysOperationCounty', component: () => import('@/modules/generic/GenericTableView.vue'), + props: () => ({ title: '县级运营中心', endpoint: '/sys/operation/pageList', queryParams: { type: 3 }, filterKey: 'name', + columns: [ + { prop: 'name', label: '运营中心名称', minWidth: 200 }, + { prop: 'provinceName', label: '省份', width: 160 }, + { prop: 'cityName', label: '城市', width: 160 }, + { prop: 'areaName', label: '区县', width: 160 }, + { prop: 'realName', label: '负责人', width: 140 }, + { prop: 'createDate', label: '创建时间', width: 180, type: 'date' } + ] }), meta: { title: '县级运营中心' } }, + { path: '/sys/operation/association', name: 'SysOperationAssociation', component: () => import('@/modules/generic/GenericTableView.vue'), + props: () => ({ title: '行业协会运营中心', endpoint: '/sys/operation/pageList', queryParams: { type: 4 }, filterKey: 'name', + columns: [ + { prop: 'name', label: '运营中心名称', minWidth: 200 }, + { prop: 'memberNo', label: '会员编号', width: 160 }, + { prop: 'realName', label: '负责人', width: 140 }, + { prop: 'createDate', label: '创建时间', width: 180, type: 'date' } + ] }), meta: { title: '行业协会运营中心' } }, + // 3 个资讯类 (other-server, 走 /other/information/page + /other/category/categoryDeepPageList) + { path: '/other/information', name: 'OtherInformation', component: () => import('@/modules/generic/GenericTableView.vue'), + props: () => ({ title: '资讯列表', endpoint: '/other/information/page', filterKey: 'title', + columns: [ + { prop: 'title', label: '资讯标题', minWidth: 320 }, + { prop: 'categoryName', label: '分类', width: 140 }, + { prop: 'viewSum', label: '阅读量', width: 100, align: 'right' }, + { prop: 'createTime', label: '创建时间', width: 180, type: 'date' } + ] }), meta: { title: '资讯列表' } }, + { path: '/other/industry', name: 'OtherIndustry', component: () => import('@/modules/generic/GenericTableView.vue'), + props: () => ({ title: '行业分类', endpoint: '/other/category/categoryDeepPageList', queryParams: { type: 1 }, filterKey: 'name', + columns: [ + { prop: 'name', label: '行业名称', minWidth: 200 }, + { prop: 'id', label: 'ID', width: 100, align: 'right' }, + { prop: 'sort', label: '排序', width: 100, align: 'right' } + ], hint: '行业分类(level=1), 后端 /other/category/categoryDeepPageList?type=1' }), meta: { title: '行业' } }, + { path: '/other/category/zx', name: 'OtherCategoryZX', component: () => import('@/modules/generic/GenericTableView.vue'), + props: () => ({ title: '资讯分类', endpoint: '/other/category/categoryDeepPageList', queryParams: { type: 1, level: 1 }, filterKey: 'name', + columns: [ + { prop: 'name', label: '分类名称', minWidth: 200 }, + { prop: 'id', label: 'ID', width: 100, align: 'right' }, + { prop: 'sort', label: '排序', width: 100, align: 'right' } + ], hint: '资讯分类(level=1), 后端 /other/category/categoryDeepPageList?type=1&level=1' }), meta: { title: '资讯分类' } }, + + // W3.1 通用通配占位 — 覆盖菜单 70 个 url // W3.1 通用通配占位 — 覆盖菜单 70 个 url(两层路径,如 /admin/user/finance/recharge) // 注意:必须放在具体路由后面,否则会拦截 /inquiry /login // 使用 ?:action 让 action 可选(单层路径如 /sys/user 也匹配),不加 (.*)* 避免贪婪匹配抢静态路由