111
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled

This commit is contained in:
francis-fh
2026-05-29 15:23:27 +08:00
parent 7b38f5b96a
commit 8c0d0b143b
10 changed files with 106 additions and 46 deletions

Binary file not shown.

View File

@@ -63,7 +63,7 @@ export async function getInitialState(): Promise<{
...response.user, ...response.user,
permissions: response.permissions, permissions: response.permissions,
roles: response.roles, roles: response.roles,
userType: response.user.roles?.[0]?.roleId, userType: response.roles?.[0],
} as API.CurrentUser; } as API.CurrentUser;
} catch (error) { } catch (error) {
console.log(error); console.log(error);

View File

@@ -173,7 +173,11 @@ const JobPortalHeader: React.FC<JobPortalHeaderProps> = ({
}; };
// 处理导航点击 // 处理导航点击
const handleNavClick = (path: string) => { const handleNavClick = (path: string, wl: boolean = false) => {
if (wl) {
window.open(path, '_blank');
return;
}
history.push(path); history.push(path);
}; };
@@ -184,7 +188,8 @@ const JobPortalHeader: React.FC<JobPortalHeaderProps> = ({
clearSessionToken(); clearSessionToken();
setRemoteMenu(null); setRemoteMenu(null);
message.success('退出登录成功'); message.success('退出登录成功');
history.push('/user/login'); // history.push('/user/login');
window.location.href = 'http://218.31.252.15:9081/hrss-web-vue/home';
} catch (error) { } catch (error) {
message.error('退出登录失败'); message.error('退出登录失败');
} }
@@ -236,8 +241,9 @@ const JobPortalHeader: React.FC<JobPortalHeaderProps> = ({
<div className="header-nav"> <div className="header-nav">
<div className="nav-container"> <div className="nav-container">
<div className="nav-left"> <div className="nav-left">
<div className="logo" onClick={() => handleNavClick('/job-portal')}> {/* <div className="logo" onClick={() => handleNavClick('/job-portal')}> */}
<span className="logo-text"></span> <div className="logo" onClick={() => handleNavClick('http://218.31.252.15:9081/hrss-web-vue/home', true)}>
<span className="logo-text"></span>
</div> </div>
</div> </div>
<div className="nav-right"> <div className="nav-right">

View File

@@ -7,9 +7,9 @@ import {
ProFormTextArea, ProFormTextArea,
ProDescriptions, ProDescriptions,
} from '@ant-design/pro-components'; } from '@ant-design/pro-components';
import { Form, Button, Space } from 'antd'; import { Form, Button, Input } from 'antd';
import { PlusOutlined, MinusCircleOutlined } from '@ant-design/icons'; import { PlusOutlined, MinusCircleOutlined } from '@ant-design/icons';
import React, { useEffect, useState } from 'react'; import React, { useEffect, useRef, useState } from 'react';
import { DictValueEnumObj } from '@/components/DictTag'; import { DictValueEnumObj } from '@/components/DictTag';
import { getCmsCompanyList } from '@/services/company/list'; import { getCmsCompanyList } from '@/services/company/list';
import { getCmsJobDetail } from '@/services/Management/list'; import { getCmsJobDetail } from '@/services/Management/list';
@@ -36,6 +36,7 @@ const waitTime = (time: number = 100) => {
const listEdit: React.FC<ListFormProps> = (props) => { const listEdit: React.FC<ListFormProps> = (props) => {
const [form] = Form.useForm<API.ManagementList.Manage>(); const [form] = Form.useForm<API.ManagementList.Manage>();
const companyNameMap = useRef<Record<number, string>>({});
const [jobDetail, setJobDetail] = useState<API.ManagementList.Manage | null>(null); const [jobDetail, setJobDetail] = useState<API.ManagementList.Manage | null>(null);
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const { educationEnum, experienceEnum, areaEnum, jobTypeEnum } = props; const { educationEnum, experienceEnum, areaEnum, jobTypeEnum } = props;
@@ -88,11 +89,33 @@ const listEdit: React.FC<ListFormProps> = (props) => {
}; };
const handleFinish = async (values: Record<string, any>) => { const handleFinish = async (values: Record<string, any>) => {
props.onSubmit(values as API.ManagementList.Manage); const payload: API.ManagementList.Manage = {
}; jobTitle: values.jobTitle,
companyId: values.companyId,
const handleChange = (_: string, value: any) => { companyName:
form.setFieldValue('companyName', value.label); typeof values.companyName === 'string'
? values.companyName
: companyNameMap.current[values.companyId] ?? '',
minSalary: values.minSalary,
maxSalary: values.maxSalary,
education: values.education,
experience: values.experience,
jobLocationAreaCode: values.jobLocationAreaCode,
vacancies: values.vacancies,
jobType: values.jobType,
jobLocation: values.jobLocation,
description: values.description,
jobContactList: (values.jobContactList ?? []).map((item: API.ManagementList.ContactPerson) => ({
contactPerson: item.contactPerson,
contactPersonPhone: item.contactPersonPhone,
position: item.position,
})),
};
if (mode === 'edit' && values.jobId) {
payload.jobId = values.jobId;
}
await props.onSubmit(payload);
return true;
}; };
if (mode === 'view') { if (mode === 'view') {
return ( return (
@@ -280,11 +303,13 @@ const listEdit: React.FC<ListFormProps> = (props) => {
destroyOnClose: true, destroyOnClose: true,
onCancel: () => handleCancel(), onCancel: () => handleCancel(),
style: { height: '80vh' }, style: { height: '80vh' },
bodyStyle: { styles: {
height: 'calc(80vh - 120px)', body: {
overflowY: 'auto', height: 'calc(80vh - 120px)',
padding: '16px 24px' overflowY: 'auto',
} padding: '16px 24px',
},
},
}} }}
submitTimeout={2000} submitTimeout={2000}
onFinish={handleFinish} onFinish={handleFinish}
@@ -296,10 +321,17 @@ const listEdit: React.FC<ListFormProps> = (props) => {
showSearch showSearch
width="md" width="md"
name="companyId" name="companyId"
onChange={handleChange}
request={async ({ keyWords }) => { request={async ({ keyWords }) => {
let resData = await getCmsCompanyList({ name: keyWords }); const resData = await getCmsCompanyList({ name: keyWords });
return resData.rows.map((item) => ({ label: item.name, value: item.companyId })); return resData.rows.map((item) => {
companyNameMap.current[item.companyId] = item.name;
return { label: item.name, value: item.companyId };
});
}}
fieldProps={{
onChange: (companyId: number) => {
form.setFieldValue('companyName', companyNameMap.current[companyId] ?? '');
},
}} }}
placeholder="请输入公司名称选择公司" placeholder="请输入公司名称选择公司"
rules={[{ required: true, message: '请输入公司名称选择公司!' }]} rules={[{ required: true, message: '请输入公司名称选择公司!' }]}
@@ -383,7 +415,7 @@ const listEdit: React.FC<ListFormProps> = (props) => {
rules={[{ required: true, message: '请输入联系人姓名' }]} rules={[{ required: true, message: '请输入联系人姓名' }]}
style={{ marginBottom: 0, flex: 1 }} style={{ marginBottom: 0, flex: 1 }}
> >
<ProFormText placeholder="请输入联系人姓名" /> <Input placeholder="请输入联系人姓名" />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
{...restField} {...restField}
@@ -395,7 +427,7 @@ const listEdit: React.FC<ListFormProps> = (props) => {
]} ]}
style={{ marginBottom: 0, flex: 1 }} style={{ marginBottom: 0, flex: 1 }}
> >
<ProFormText placeholder="请输入联系电话" /> <Input placeholder="请输入联系电话" />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
{...restField} {...restField}
@@ -404,7 +436,7 @@ const listEdit: React.FC<ListFormProps> = (props) => {
rules={[{ required: true, message: '请输入职务' }]} rules={[{ required: true, message: '请输入职务' }]}
style={{ marginBottom: 0, flex: 1 }} style={{ marginBottom: 0, flex: 1 }}
> >
<ProFormText placeholder="请输入职务" /> <Input placeholder="请输入职务" />
</Form.Item> </Form.Item>
<Button <Button
type="text" type="text"

View File

@@ -364,23 +364,17 @@ function ManagementList() {
open={modalVisible} open={modalVisible}
mode={mode} mode={mode}
onSubmit={async (values) => { onSubmit={async (values) => {
let resData; const isEdit = mode === 'edit' && values.jobId;
if (values.jobId) { const resData = isEdit
resData = await updateCmsJobList(values); ? await updateCmsJobList(values)
} else { : await addCmsJobList(values);
resData = await addCmsJobList(values);
}
if (resData.code === 200) { if (resData.code === 200) {
setModalVisible(false); setModalVisible(false);
setCurrentRow(undefined); setCurrentRow(undefined);
if (values.jobId) { message.success(isEdit ? '修改成功' : '新增成功');
message.success('修改成功'); actionRef.current?.reload();
} else { } else {
message.success('新增成功'); message.error(resData.msg || '操作失败,请重试');
}
if (actionRef.current) {
actionRef.current.reload();
}
} }
}} }}
values={currentRow} values={currentRow}

View File

@@ -5,7 +5,7 @@ import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
import { PlusOutlined } from '@ant-design/icons'; import { PlusOutlined } from '@ant-design/icons';
import { getDictValueEnum } from '@/services/system/dict'; import { getDictValueEnum } from '@/services/system/dict';
import DictTag from '@/components/DictTag'; import DictTag from '@/components/DictTag';
import { exportCmsAppUserExport, getCmsAppUserList } from '@/services/mobileusers/list'; import { applyAgree, exportCmsAppUserExport, getCmsAppUserList } from '@/services/mobileusers/list';
const handleExport = async (values: API.MobileUser.ListParams) => { const handleExport = async (values: API.MobileUser.ListParams) => {
const hide = message.loading('正在导出'); const hide = message.loading('正在导出');
@@ -61,6 +61,19 @@ function ManagementList() {
// }) // })
}, []); }, []);
async function changeHire(record: API.MobileUser.ListRow) {
const resData = await applyAgree({
id: String(record.applyId),
hire: record.hire === '0' ? 2 : 0,
});
if (resData.code === 200) {
message.success('修改成功');
if (actionRef.current) {
actionRef.current.reload();
}
}
}
const columns: ProColumns<API.MobileUser.ListRow>[] = [ const columns: ProColumns<API.MobileUser.ListRow>[] = [
{ {
title: '用户名', title: '用户名',
@@ -68,6 +81,12 @@ function ManagementList() {
valueType: 'text', valueType: 'text',
align: 'center', align: 'center',
}, },
{
title: '职位名称',
dataIndex: 'jobName',
valueType: 'text',
align: 'center',
},
{ {
title: '期望薪资', title: '期望薪资',
dataIndex: 'minSalary', dataIndex: 'minSalary',
@@ -146,7 +165,7 @@ function ManagementList() {
valueEnum: isPublishEnum, valueEnum: isPublishEnum,
hideInSearch:true, hideInSearch:true,
render: (text, record) => ( render: (text, record) => (
<Switch checked={record.hire === '1'} /> <Switch checked={record.hire === '0'} onChange={changeHire.bind(null, record)} />
), ),
}, },
]; ];
@@ -159,7 +178,7 @@ function ManagementList() {
// 这个参数优先级更高,会覆盖查询表单的参数 // 这个参数优先级更高,会覆盖查询表单的参数
actionRef={actionRef} actionRef={actionRef}
formRef={formTableRef} formRef={formTableRef}
rowKey="jobId" rowKey="applyId"
key="index" key="index"
columns={columns} columns={columns}
request={(params) => request={(params) =>

View File

@@ -86,9 +86,8 @@ export default function ThirdPartyRedirect() {
currentUser: userInfo, currentUser: userInfo,
})); }));
}); });
if (Number(userInfo?.userType) === 1101) { console.log('userType---', userInfo?.userType);
Number(userInfo?.userType) if (userInfo?.userType === 'common') {
Number(userInfo?.userType)
const params = new URLSearchParams(location.search); const params = new URLSearchParams(location.search);
const pageName = params.get('pageName'); const pageName = params.get('pageName');
console.log('userType value:', userInfo?.userType, 'type:', typeof userInfo?.userType); console.log('userType value:', userInfo?.userType, 'type:', typeof userInfo?.userType);
@@ -108,7 +107,7 @@ export default function ThirdPartyRedirect() {
} else { } else {
const menus = await getRoutersInfo(); const menus = await getRoutersInfo();
console.log('userType value:', userInfo?.userType, 'type:', typeof userInfo?.userType); console.log('userType value:', userInfo?.userType, 'type:', typeof userInfo?.userType);
if (menus && menus.length > 0 && Number(userInfo?.userType) !== 1101) { if (menus && menus.length > 0 && userInfo?.userType !== 'common') {
setRemoteMenu(menus); setRemoteMenu(menus);
window.location.replace('http://39.98.44.136:6024/shihezi/management/management/list/index') window.location.replace('http://39.98.44.136:6024/shihezi/management/management/list/index')
} }

View File

@@ -8,7 +8,7 @@ declare namespace API {
unreadCount?: number; unreadCount?: number;
country?: string; country?: string;
access?: string; access?: string;
userType?: number; userType?: string;
geographic?: { geographic?: {
province?: { label?: string; key?: string }; province?: { label?: string; key?: string };
city?: { label?: string; key?: string }; city?: { label?: string; key?: string };

View File

@@ -2,7 +2,7 @@ import { request } from '@umijs/max';
import { downLoadXlsx } from '@/utils/downloadfile'; import { downLoadXlsx } from '@/utils/downloadfile';
export async function getCmsAppUserList(params?: API.MobileUser.ListParams) { export async function getCmsAppUserList(params?: API.MobileUser.ListParams) {
return request<API.MobileUser.ListResult>(`/api/cms/appUser/list`, { return request<API.MobileUser.ListResult>(`/api/cms/jobApply/applyJobUserList`, {
method: 'GET', method: 'GET',
params: params, params: params,
}); });
@@ -21,3 +21,10 @@ export async function exportCmsAppUserExport(params?: API.MobileUser.ListParams)
`job_data_${new Date().getTime()}.xlsx`, `job_data_${new Date().getTime()}.xlsx`,
); );
} }
export async function applyAgree(params: { id: string; hire: number }) {
return request<API.Result>('/api/cms/jobApply/applyAgree', {
method: 'PUT',
data: params,
});
}

View File

@@ -7,6 +7,8 @@ declare namespace API.MobileUser {
} }
export interface ListRow { export interface ListRow {
applyId?: string;
jobId?: string;
createTime?: string; createTime?: string;
userId: number; userId: number;
name: string; name: string;
@@ -25,6 +27,7 @@ declare namespace API.MobileUser {
loginDate?: string; loginDate?: string;
jobTitleId?: string; jobTitleId?: string;
jobTitle?: string; jobTitle?: string;
jobName?: string;
hire?:string; hire?:string;
idCard?:string; idCard?:string;
} }