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
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:
BIN
shihezi.zip
BIN
shihezi.zip
Binary file not shown.
@@ -63,7 +63,7 @@ export async function getInitialState(): Promise<{
|
||||
...response.user,
|
||||
permissions: response.permissions,
|
||||
roles: response.roles,
|
||||
userType: response.user.roles?.[0]?.roleId,
|
||||
userType: response.roles?.[0],
|
||||
} as API.CurrentUser;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -184,7 +188,8 @@ const JobPortalHeader: React.FC<JobPortalHeaderProps> = ({
|
||||
clearSessionToken();
|
||||
setRemoteMenu(null);
|
||||
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) {
|
||||
message.error('退出登录失败');
|
||||
}
|
||||
@@ -236,8 +241,9 @@ const JobPortalHeader: React.FC<JobPortalHeaderProps> = ({
|
||||
<div className="header-nav">
|
||||
<div className="nav-container">
|
||||
<div className="nav-left">
|
||||
<div className="logo" onClick={() => handleNavClick('/job-portal')}>
|
||||
<span className="logo-text">石河子智慧就业服务平台</span>
|
||||
{/* <div className="logo" onClick={() => handleNavClick('/job-portal')}> */}
|
||||
<div className="logo" onClick={() => handleNavClick('http://218.31.252.15:9081/hrss-web-vue/home', true)}>
|
||||
<span className="logo-text">石河子智慧就业</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="nav-right">
|
||||
|
||||
@@ -7,9 +7,9 @@ import {
|
||||
ProFormTextArea,
|
||||
ProDescriptions,
|
||||
} 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 React, { useEffect, useState } from 'react';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { DictValueEnumObj } from '@/components/DictTag';
|
||||
import { getCmsCompanyList } from '@/services/company/list';
|
||||
import { getCmsJobDetail } from '@/services/Management/list';
|
||||
@@ -36,6 +36,7 @@ const waitTime = (time: number = 100) => {
|
||||
|
||||
const listEdit: React.FC<ListFormProps> = (props) => {
|
||||
const [form] = Form.useForm<API.ManagementList.Manage>();
|
||||
const companyNameMap = useRef<Record<number, string>>({});
|
||||
const [jobDetail, setJobDetail] = useState<API.ManagementList.Manage | null>(null);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const { educationEnum, experienceEnum, areaEnum, jobTypeEnum } = props;
|
||||
@@ -88,11 +89,33 @@ const listEdit: React.FC<ListFormProps> = (props) => {
|
||||
};
|
||||
|
||||
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,
|
||||
companyName:
|
||||
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,
|
||||
})),
|
||||
};
|
||||
|
||||
const handleChange = (_: string, value: any) => {
|
||||
form.setFieldValue('companyName', value.label);
|
||||
if (mode === 'edit' && values.jobId) {
|
||||
payload.jobId = values.jobId;
|
||||
}
|
||||
await props.onSubmit(payload);
|
||||
return true;
|
||||
};
|
||||
if (mode === 'view') {
|
||||
return (
|
||||
@@ -280,11 +303,13 @@ const listEdit: React.FC<ListFormProps> = (props) => {
|
||||
destroyOnClose: true,
|
||||
onCancel: () => handleCancel(),
|
||||
style: { height: '80vh' },
|
||||
bodyStyle: {
|
||||
styles: {
|
||||
body: {
|
||||
height: 'calc(80vh - 120px)',
|
||||
overflowY: 'auto',
|
||||
padding: '16px 24px'
|
||||
}
|
||||
padding: '16px 24px',
|
||||
},
|
||||
},
|
||||
}}
|
||||
submitTimeout={2000}
|
||||
onFinish={handleFinish}
|
||||
@@ -296,10 +321,17 @@ const listEdit: React.FC<ListFormProps> = (props) => {
|
||||
showSearch
|
||||
width="md"
|
||||
name="companyId"
|
||||
onChange={handleChange}
|
||||
request={async ({ keyWords }) => {
|
||||
let resData = await getCmsCompanyList({ name: keyWords });
|
||||
return resData.rows.map((item) => ({ label: item.name, value: item.companyId }));
|
||||
const resData = await getCmsCompanyList({ name: keyWords });
|
||||
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="请输入公司名称选择公司"
|
||||
rules={[{ required: true, message: '请输入公司名称选择公司!' }]}
|
||||
@@ -383,7 +415,7 @@ const listEdit: React.FC<ListFormProps> = (props) => {
|
||||
rules={[{ required: true, message: '请输入联系人姓名' }]}
|
||||
style={{ marginBottom: 0, flex: 1 }}
|
||||
>
|
||||
<ProFormText placeholder="请输入联系人姓名" />
|
||||
<Input placeholder="请输入联系人姓名" />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
{...restField}
|
||||
@@ -395,7 +427,7 @@ const listEdit: React.FC<ListFormProps> = (props) => {
|
||||
]}
|
||||
style={{ marginBottom: 0, flex: 1 }}
|
||||
>
|
||||
<ProFormText placeholder="请输入联系电话" />
|
||||
<Input placeholder="请输入联系电话" />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
{...restField}
|
||||
@@ -404,7 +436,7 @@ const listEdit: React.FC<ListFormProps> = (props) => {
|
||||
rules={[{ required: true, message: '请输入职务' }]}
|
||||
style={{ marginBottom: 0, flex: 1 }}
|
||||
>
|
||||
<ProFormText placeholder="请输入职务" />
|
||||
<Input placeholder="请输入职务" />
|
||||
</Form.Item>
|
||||
<Button
|
||||
type="text"
|
||||
|
||||
@@ -364,23 +364,17 @@ function ManagementList() {
|
||||
open={modalVisible}
|
||||
mode={mode}
|
||||
onSubmit={async (values) => {
|
||||
let resData;
|
||||
if (values.jobId) {
|
||||
resData = await updateCmsJobList(values);
|
||||
} else {
|
||||
resData = await addCmsJobList(values);
|
||||
}
|
||||
const isEdit = mode === 'edit' && values.jobId;
|
||||
const resData = isEdit
|
||||
? await updateCmsJobList(values)
|
||||
: await addCmsJobList(values);
|
||||
if (resData.code === 200) {
|
||||
setModalVisible(false);
|
||||
setCurrentRow(undefined);
|
||||
if (values.jobId) {
|
||||
message.success('修改成功');
|
||||
message.success(isEdit ? '修改成功' : '新增成功');
|
||||
actionRef.current?.reload();
|
||||
} else {
|
||||
message.success('新增成功');
|
||||
}
|
||||
if (actionRef.current) {
|
||||
actionRef.current.reload();
|
||||
}
|
||||
message.error(resData.msg || '操作失败,请重试');
|
||||
}
|
||||
}}
|
||||
values={currentRow}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||
import { PlusOutlined } from '@ant-design/icons';
|
||||
import { getDictValueEnum } from '@/services/system/dict';
|
||||
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 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>[] = [
|
||||
{
|
||||
title: '用户名',
|
||||
@@ -68,6 +81,12 @@ function ManagementList() {
|
||||
valueType: 'text',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '职位名称',
|
||||
dataIndex: 'jobName',
|
||||
valueType: 'text',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '期望薪资',
|
||||
dataIndex: 'minSalary',
|
||||
@@ -146,7 +165,7 @@ function ManagementList() {
|
||||
valueEnum: isPublishEnum,
|
||||
hideInSearch:true,
|
||||
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}
|
||||
formRef={formTableRef}
|
||||
rowKey="jobId"
|
||||
rowKey="applyId"
|
||||
key="index"
|
||||
columns={columns}
|
||||
request={(params) =>
|
||||
|
||||
@@ -86,9 +86,8 @@ export default function ThirdPartyRedirect() {
|
||||
currentUser: userInfo,
|
||||
}));
|
||||
});
|
||||
if (Number(userInfo?.userType) === 1101) {
|
||||
Number(userInfo?.userType)
|
||||
Number(userInfo?.userType)
|
||||
console.log('userType---', userInfo?.userType);
|
||||
if (userInfo?.userType === 'common') {
|
||||
const params = new URLSearchParams(location.search);
|
||||
const pageName = params.get('pageName');
|
||||
console.log('userType value:', userInfo?.userType, 'type:', typeof userInfo?.userType);
|
||||
@@ -108,7 +107,7 @@ export default function ThirdPartyRedirect() {
|
||||
} else {
|
||||
const menus = await getRoutersInfo();
|
||||
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);
|
||||
window.location.replace('http://39.98.44.136:6024/shihezi/management/management/list/index')
|
||||
}
|
||||
|
||||
2
src/services/ant-design-pro/typings.d.ts
vendored
2
src/services/ant-design-pro/typings.d.ts
vendored
@@ -8,7 +8,7 @@ declare namespace API {
|
||||
unreadCount?: number;
|
||||
country?: string;
|
||||
access?: string;
|
||||
userType?: number;
|
||||
userType?: string;
|
||||
geographic?: {
|
||||
province?: { label?: string; key?: string };
|
||||
city?: { label?: string; key?: string };
|
||||
|
||||
@@ -2,7 +2,7 @@ import { request } from '@umijs/max';
|
||||
import { downLoadXlsx } from '@/utils/downloadfile';
|
||||
|
||||
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',
|
||||
params: params,
|
||||
});
|
||||
@@ -21,3 +21,10 @@ export async function exportCmsAppUserExport(params?: API.MobileUser.ListParams)
|
||||
`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,
|
||||
});
|
||||
}
|
||||
|
||||
3
src/types/mobileusers/list.d.ts
vendored
3
src/types/mobileusers/list.d.ts
vendored
@@ -7,6 +7,8 @@ declare namespace API.MobileUser {
|
||||
}
|
||||
|
||||
export interface ListRow {
|
||||
applyId?: string;
|
||||
jobId?: string;
|
||||
createTime?: string;
|
||||
userId: number;
|
||||
name: string;
|
||||
@@ -25,6 +27,7 @@ declare namespace API.MobileUser {
|
||||
loginDate?: string;
|
||||
jobTitleId?: string;
|
||||
jobTitle?: string;
|
||||
jobName?: string;
|
||||
hire?:string;
|
||||
idCard?:string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user