From 183a25f709406225723e31373451b6111623cde9 Mon Sep 17 00:00:00 2001 From: francis-fh Date: Wed, 17 Jun 2026 18:38:40 +0800 Subject: [PATCH] 11 --- .codegraph/daemon.pid | 4 +- config/routes.ts | 15 + src/components/JobPortalHeader/index.tsx | 10 + .../JobPortal/LiveRecruitment/index.less | 353 ++++++++++++++++++ src/pages/JobPortal/LiveRecruitment/index.tsx | 247 ++++++++++++ src/pages/JobPortal/PersonalCenter/index.tsx | 13 +- src/pages/Livemgmt/components/EditModal.tsx | 87 +++++ src/pages/Livemgmt/index.tsx | 163 ++++++++ .../Management/List/SeeMatching/index.tsx | 6 +- src/services/jobportal/live.ts | 110 ++++++ 10 files changed, 1001 insertions(+), 7 deletions(-) create mode 100644 src/pages/JobPortal/LiveRecruitment/index.less create mode 100644 src/pages/JobPortal/LiveRecruitment/index.tsx create mode 100644 src/pages/Livemgmt/components/EditModal.tsx create mode 100644 src/pages/Livemgmt/index.tsx create mode 100644 src/services/jobportal/live.ts diff --git a/.codegraph/daemon.pid b/.codegraph/daemon.pid index 942b784..a11dbe7 100644 --- a/.codegraph/daemon.pid +++ b/.codegraph/daemon.pid @@ -1,6 +1,6 @@ { - "pid": 8432, + "pid": 15780, "version": "0.9.9", "socketPath": "\\\\.\\pipe\\codegraph-ae68fa88b3ffb91a", - "startedAt": 1781608072582 + "startedAt": 1781687361498 } diff --git a/config/routes.ts b/config/routes.ts index 0ce915d..04a4fa3 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -92,6 +92,10 @@ export default [ path: '/job-portal/policy/detail',// 政策详情 component: './JobPortal/Policy/Detail', }, + { + path: '/job-portal/live-recruitment',// 直播带岗 + component: './JobPortal/LiveRecruitment', + }, ], }, { @@ -211,6 +215,17 @@ export default [ }, ], }, + { + name: 'jobportal', + path: '/jobportal', + routes: [ + { + name: '直播待岗管理', + path: '/jobportal/live-mgmt', + component: './Livemgmt', + }, + ], + }, { path: '*', layout: false, diff --git a/src/components/JobPortalHeader/index.tsx b/src/components/JobPortalHeader/index.tsx index 4e26de6..4e5dbc3 100644 --- a/src/components/JobPortalHeader/index.tsx +++ b/src/components/JobPortalHeader/index.tsx @@ -16,6 +16,7 @@ import { ReadOutlined, LoginOutlined, FundProjectionScreenOutlined, + PlayCircleOutlined, } from '@ant-design/icons'; import { history, useLocation, useModel } from '@umijs/max'; import { @@ -102,6 +103,7 @@ const JobPortalHeader: React.FC = ({ const isMessage = location.pathname.startsWith('/job-portal/message'); const isPolicy = location.pathname.startsWith('/job-portal/policy'); const isCareerRecommend = location.pathname.startsWith('/job-portal/career-recommendation'); + const isLiveRecruitment = location.pathname.startsWith('/job-portal/live-recruitment'); // 获取未读消息数量(仅登录用户) useEffect(() => { @@ -295,6 +297,14 @@ const JobPortalHeader: React.FC = ({ > 政策 + 0 ? unreadCount : 0} offset={[8, 0]} size="small"> , + , + ], + }, + ]; + + return ( + + + headerTitle="直播待岗列表" + actionRef={actionRef} + rowKey="id" + columns={columns} + scroll={{ x: 'max-content' }} + request={async (params) => { + const res = await getCmsLiveList({ + current: params.current, + pageSize: params.pageSize, + title: params.title, + companyName: params.companyName, + } as CmsLiveListParams); + return { data: res.rows, total: res.total, success: true }; + }} + toolBarRender={() => [ + , + ]} + /> + { + setModalVisible(false); + setCurrentRow(undefined); + }} + onSubmit={async (values: CmsLiveForm) => { + const res = values.id + ? await updateCmsLive(values) + : await addCmsLive(values); + if (res.code === 200) { + message.success(values.id ? '修改成功' : '新增成功'); + setModalVisible(false); + setCurrentRow(undefined); + actionRef.current?.reload(); + } else { + message.error(res.msg || '操作失败'); + } + }} + /> + + ); +}; + +export default LiveMgmtList; diff --git a/src/pages/Management/List/SeeMatching/index.tsx b/src/pages/Management/List/SeeMatching/index.tsx index 4f110c6..6b1c5d2 100644 --- a/src/pages/Management/List/SeeMatching/index.tsx +++ b/src/pages/Management/List/SeeMatching/index.tsx @@ -180,7 +180,7 @@ function ManagementList() { size="small" key="view-resume" icon={} - hidden={!access.hasPerms('area:business:List.add')} + hidden={!access.hasPerms('cms:userworkexperiences:list')} onClick={() => { setCurrentRow(record); setResumeVisible(true); @@ -193,7 +193,7 @@ function ManagementList() { size="small" key="edit" icon={} - hidden={!access.hasPerms('area:business:List.add')} + hidden={!access.hasPerms('cms:employeeConfirm:add')} onClick={() => { setCurrentRow(record); setHireVisible(true); @@ -207,7 +207,7 @@ function ManagementList() { size="small" key="edit" icon={} - hidden={!access.hasPerms('area:business:List.update')} + // hidden={!access.hasPerms('area:business:List.update')} onClick={() => { setModalVisible(true); setCurrentRow(record); diff --git a/src/services/jobportal/live.ts b/src/services/jobportal/live.ts new file mode 100644 index 0000000..e5977d4 --- /dev/null +++ b/src/services/jobportal/live.ts @@ -0,0 +1,110 @@ +import { request } from '@umijs/max'; + +/** 直播带岗列表项 */ +export interface LiveStreamItem { + id: number; + title: string; + liveUrl: string; + description?: string; + startTime?: string; + endTime?: string; + companyId?: string; + companyName: string; + createTime?: string; + updateTime?: string; +} + +/** 直播带岗列表查询参数 */ +export interface LiveListParams { + title?: string; + companyName?: string; +} + +/** 直播带岗列表响应 */ +export interface LiveListResult { + code: number; + msg?: string; + total: number; + rows: LiveStreamItem[]; + data?: any; +} + +/** 获取直播带岗列表 GET /app/live/list */ +export async function getLiveList(params?: LiveListParams) { + return request('/api/app/live/list', { + method: 'GET', + params, + }); +} + +// ==================== 管理端 CMS 接口 ==================== + +const CMS_BASE_URL = '/api/cms/live'; + +/** 管理端直播列表查询参数 */ +export interface CmsLiveListParams { + title?: string; + companyName?: string; + pageNum?: number; + pageSize?: number; + current?: number; +} + +/** 管理端通用响应 */ +export interface CmsLiveCommonResult { + code: number; + msg?: string; + data?: any; +} + +/** 管理端直播列表响应 */ +export interface CmsLiveListResult { + code: number; + msg?: string; + total: number; + rows: LiveStreamItem[]; + data?: any; +} + +/** 管理端新增/编辑直播参数 */ +export interface CmsLiveForm { + id?: number; + title: string; + liveUrl: string; + description?: string; + startTime?: string; + endTime?: string; + companyId?: string; + companyName?: string; +} + +/** 获取直播带岗管理列表 GET /api/cms/live/list */ +export async function getCmsLiveList(params?: CmsLiveListParams) { + return request(`${CMS_BASE_URL}/list`, { + method: 'GET', + params, + }); +} + +/** 新增直播带岗 POST /api/cms/live */ +export async function addCmsLive(data: CmsLiveForm) { + return request(CMS_BASE_URL, { + method: 'POST', + data, + }); +} + +/** 修改直播带岗 PUT /api/cms/live */ +export async function updateCmsLive(data: CmsLiveForm) { + return request(CMS_BASE_URL, { + method: 'PUT', + data, + }); +} + +/** 删除直播带岗 DELETE /api/cms/live/{id} */ +export async function deleteCmsLive(id: number) { + return request(`${CMS_BASE_URL}/${id}`, { + method: 'DELETE', + }); +}