急聘功能开发
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:
@@ -3,11 +3,12 @@ import {
|
||||
ProForm,
|
||||
ProFormDigit,
|
||||
ProFormSelect,
|
||||
ProFormSwitch,
|
||||
ProFormText,
|
||||
ProFormTextArea,
|
||||
ProDescriptions,
|
||||
} from '@ant-design/pro-components';
|
||||
import { Form, Button, Input, TreeSelect } from 'antd';
|
||||
import { Form, Button, Input, TreeSelect, Switch } from 'antd';
|
||||
import { PlusOutlined, MinusCircleOutlined } from '@ant-design/icons';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { DictValueEnumObj } from '@/components/DictTag';
|
||||
@@ -117,6 +118,7 @@ const listEdit: React.FC<ListFormProps> = (props) => {
|
||||
position: item.position,
|
||||
})),
|
||||
jobCategory: values.jobCategory,
|
||||
isUrgent: values.isUrgent ? 1 : 0,
|
||||
};
|
||||
if (mode === 'edit' && values.jobId) {
|
||||
payload.jobId = values.jobId;
|
||||
@@ -144,6 +146,11 @@ const listEdit: React.FC<ListFormProps> = (props) => {
|
||||
>
|
||||
<ProDescriptions.Item dataIndex="jobTitle" label="岗位名称" />
|
||||
<ProDescriptions.Item dataIndex="companyName" label="招聘公司" />
|
||||
<ProDescriptions.Item
|
||||
dataIndex="isUrgent"
|
||||
label="是否急聘"
|
||||
valueEnum={{ 0: '否', 1: '是' }}
|
||||
/>
|
||||
<ProDescriptions.Item dataIndex="minSalary" label="最低薪资(元/月)" />
|
||||
<ProDescriptions.Item dataIndex="maxSalary" label="最高薪资(元/月)" />
|
||||
<ProDescriptions.Item
|
||||
@@ -325,6 +332,15 @@ const listEdit: React.FC<ListFormProps> = (props) => {
|
||||
<ProFormText width="md" hidden name="jobId" />
|
||||
<ProFormText width="md" hidden name="companyName" />
|
||||
<ProFormText width="md" name="jobTitle" label="岗位名称" placeholder="请输入岗位名称" />
|
||||
<ProFormSwitch
|
||||
width="md"
|
||||
name="isUrgent"
|
||||
label="是否急聘"
|
||||
checkedChildren="是"
|
||||
unCheckedChildren="否"
|
||||
initialValue={0}
|
||||
fieldProps={{ defaultChecked: false }}
|
||||
/>
|
||||
<ProFormSelect
|
||||
showSearch
|
||||
width="md"
|
||||
|
||||
@@ -222,6 +222,22 @@ function ManagementList() {
|
||||
valueType: 'text',
|
||||
hideInTable:true
|
||||
},
|
||||
{
|
||||
title: '是否急聘',
|
||||
dataIndex: 'isUrgent',
|
||||
valueType: 'select',
|
||||
align: 'center',
|
||||
valueEnum: { 0: '否', 1: '是' },
|
||||
render: (text, record) => (
|
||||
<Switch checked={record.isUrgent === 1} onChange={async () => {
|
||||
await updateCmsJobList({
|
||||
jobId: record.jobId,
|
||||
isUrgent: record.isUrgent === 1 ? 0 : 1,
|
||||
});
|
||||
actionRef.current?.reload();
|
||||
}} />
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '是否发布',
|
||||
dataIndex: 'isPublish',
|
||||
|
||||
Reference in New Issue
Block a user