feat0806: 新增宣传知识菜单并移植项目介绍菜单
| | |
| | | ALTER TABLE `tcm_health_popularization` |
| | | ADD COLUMN `video_description` VARCHAR(255) DEFAULT NULL COMMENT '视频介绍' |
| | | AFTER `video_file_name`; |
| | | |
| | | |
| | | -- ---------------------------- |
| | | -- 新增二级菜单:宣传知识(与课程管理平级,父级为课程与学习 3000) |
| | | -- 并将「项目介绍」「项目介绍密码」菜单从课程管理(3050)迁移到宣传知识下 |
| | | -- 添加时间:2026-08-22 |
| | | -- ---------------------------- |
| | | |
| | | -- 宣传知识菜单(id: 6100) |
| | | INSERT INTO sys_menu (id, parent_id, name, menu_code, type, path, component, icon, sort, status, visible, permission_key, remark, deleted) |
| | | VALUES (6100, 3000, '宣传知识', 'live_promotion_root', 'M', '/live/promotion', NULL, NULL, 20, 1, 1, NULL, '宣传知识目录', 0) |
| | | ON DUPLICATE KEY UPDATE parent_id = VALUES(parent_id), name = VALUES(name), menu_code = VALUES(menu_code), type = VALUES(type), path = VALUES(path), component = VALUES(component), sort = VALUES(sort), status = VALUES(status), visible = VALUES(visible), permission_key = VALUES(permission_key), remark = VALUES(remark), deleted = 0; |
| | | |
| | | -- 将「项目介绍」(6010) 迁移到「宣传知识」(6100) 下,并将路由前缀改为 /live/promotion |
| | | UPDATE sys_menu SET parent_id = 6100, path = '/live/promotion/project-introduction' WHERE id = 6010; |
| | | |
| | | -- 将「项目介绍密码」(6014) 迁移到「宣传知识」(6100) 下,并将路由前缀改为 /live/promotion |
| | | UPDATE sys_menu SET parent_id = 6100, path = '/live/promotion/project-introduction-password' WHERE id = 6014; |
| | |
| | | null, null, null, 2, "live:health-popularization:edit", "健康科普编辑按钮")); |
| | | menuIds.add(saveMenu(3123L, 3120L, "删除健康科普", "live_health_popularization_delete", "B", |
| | | null, null, null, 3, "live:health-popularization:delete", "健康科普删除按钮")); |
| | | menuIds.add(saveMenu(6010L, 3050L, "项目介绍", "live_project_introduction_manage", "C", |
| | | "/live/course/project-introduction", "Live/ProjectIntroductionList", null, 60, "live:project-introduction:view", "项目介绍菜单")); |
| | | menuIds.add(saveMenu(6100L, 3000L, "宣传知识", "live_promotion_root", "M", |
| | | "/live/promotion", null, null, 20, null, "宣传知识目录")); |
| | | menuIds.add(saveMenu(6010L, 6100L, "项目介绍", "live_project_introduction_manage", "C", |
| | | "/live/promotion/project-introduction", "Live/ProjectIntroductionList", null, 60, "live:project-introduction:view", "项目介绍菜单")); |
| | | menuIds.add(saveMenu(6011L, 6010L, "新增项目介绍", "live_project_introduction_add", "B", |
| | | null, null, null, 1, "live:project-introduction:add", "项目介绍新增按钮")); |
| | | menuIds.add(saveMenu(6012L, 6010L, "编辑项目介绍", "live_project_introduction_edit", "B", |
| | | null, null, null, 2, "live:project-introduction:edit", "项目介绍编辑按钮")); |
| | | menuIds.add(saveMenu(6013L, 6010L, "删除项目介绍", "live_project_introduction_delete", "B", |
| | | null, null, null, 3, "live:project-introduction:delete", "项目介绍删除按钮")); |
| | | menuIds.add(saveMenu(6014L, 3050L, "项目介绍密码", "live_project_introduction_password", "C", |
| | | "/live/course/project-introduction-password", "Live/ProjectIntroductionPassword", null, 61, "live:project-introduction-password:view", "项目介绍密码菜单")); |
| | | menuIds.add(saveMenu(6014L, 6100L, "项目介绍密码", "live_project_introduction_password", "C", |
| | | "/live/promotion/project-introduction-password", "Live/ProjectIntroductionPassword", null, 61, "live:project-introduction-password:view", "项目介绍密码菜单")); |
| | | menuIds.add(saveMenu(6015L, 6014L, "编辑项目介绍密码", "live_project_introduction_password_edit", "B", |
| | | null, null, null, 1, "live:project-introduction-password:edit", "项目介绍密码编辑按钮")); |
| | | menuIds.add(saveMenu(4000L, 0L, "交易与财务", "trade_root", "M", |
| | |
| | | component: './live/health-popularization/manage', |
| | | }, |
| | | { |
| | | name: '项目介绍', |
| | | path: '/live/course/project-introduction', |
| | | access: 'live:project-introduction:view', |
| | | component: './live/project-introduction', |
| | | }, |
| | | { |
| | | name: '新增项目介绍', |
| | | path: '/live/course/project-introduction/create', |
| | | hideInMenu: true, |
| | | access: 'live:project-introduction:add', |
| | | component: './live/project-introduction/manage', |
| | | }, |
| | | { |
| | | name: '编辑项目介绍', |
| | | path: '/live/course/project-introduction/:id/edit', |
| | | hideInMenu: true, |
| | | access: 'live:project-introduction:edit', |
| | | component: './live/project-introduction/manage', |
| | | }, |
| | | { |
| | | name: '项目介绍密码', |
| | | path: '/live/course/project-introduction-password', |
| | | access: 'live:project-introduction:view', |
| | | component: './live/project-introduction-password', |
| | | }, |
| | | { |
| | | name: '视频与课程资源管理', |
| | | path: '/live/course/video-resources', |
| | | access: 'live:health-course:view', |
| | |
| | | access: 'live:expert:view', |
| | | component: './live/expert', |
| | | }, |
| | | { |
| | | path: '/live/course/project-introduction/create', |
| | | hideInMenu: true, |
| | | redirect: '/live/promotion/project-introduction/create', |
| | | }, |
| | | { |
| | | path: '/live/course/project-introduction', |
| | | hideInMenu: true, |
| | | redirect: '/live/promotion/project-introduction', |
| | | }, |
| | | { |
| | | path: '/live/course/project-introduction-password', |
| | | hideInMenu: true, |
| | | redirect: '/live/promotion/project-introduction-password', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/live/promotion', |
| | | name: '宣传知识', |
| | | routes: [ |
| | | { |
| | | path: '/live/promotion', |
| | | redirect: '/live/promotion/project-introduction', |
| | | }, |
| | | { |
| | | name: '项目介绍', |
| | | path: '/live/promotion/project-introduction', |
| | | access: 'live:project-introduction:view', |
| | | component: './live/project-introduction', |
| | | }, |
| | | { |
| | | name: '新增项目介绍', |
| | | path: '/live/promotion/project-introduction/create', |
| | | hideInMenu: true, |
| | | access: 'live:project-introduction:add', |
| | | component: './live/project-introduction/manage', |
| | | }, |
| | | { |
| | | name: '编辑项目介绍', |
| | | path: '/live/promotion/project-introduction/:id/edit', |
| | | hideInMenu: true, |
| | | access: 'live:project-introduction:edit', |
| | | component: './live/project-introduction/manage', |
| | | }, |
| | | { |
| | | name: '项目介绍密码', |
| | | path: '/live/promotion/project-introduction-password', |
| | | access: 'live:project-introduction:view', |
| | | component: './live/project-introduction-password', |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | |
| | | !!permission?.['live:category:view'] || |
| | | !!permission?.['live:reserve:view'] || |
| | | !!permission?.['live:watch:view'] || |
| | | !!permission?.['live:expert:view'], |
| | | !!permission?.['live:expert:view'] || |
| | | !!permission?.['live:project-introduction:view'] || |
| | | !!permission?.['live:project-introduction-password:view'], |
| | | canViewTradeFinanceModule: |
| | | !!permission?.['course:purchase-order:view'] || |
| | | !!permission?.['member:purchase-order:view'] || |
| | |
| | | {canEdit ? ( |
| | | <button |
| | | type="button" |
| | | onClick={() => history.push(`/live/course/project-introduction/${record.id}/edit`)} |
| | | onClick={() => history.push(`/live/promotion/project-introduction/${record.id}/edit`)} |
| | | > |
| | | 编辑 |
| | | </button> |
| | |
| | | |
| | | <div className="project-introduction-toolbar"> |
| | | {canAdd ? ( |
| | | <Button type="primary" onClick={() => history.push('/live/course/project-introduction/create')}> |
| | | <Button type="primary" onClick={() => history.push('/live/promotion/project-introduction/create')}> |
| | | 添加 |
| | | </Button> |
| | | ) : null} |
| | |
| | | const [coverImg, setCoverImg] = useState(''); |
| | | const pathname = history.location.pathname; |
| | | const isCreate = pathname.endsWith('/create'); |
| | | const listPagePath = '/live/course/project-introduction'; |
| | | const listPagePath = '/live/promotion/project-introduction'; |
| | | const recordId = useMemo(() => { |
| | | if (isCreate) { |
| | | return ''; |