@@ -8,6 +8,6 @@ | |||
</head> | |||
<body> | |||
<div id="root"></div> | |||
<script src="/umi.7fa1ca41.js"></script> | |||
<script src="/umi.fcb755e3.js"></script> | |||
</body> | |||
</html> |
@@ -285,3 +285,10 @@ export const PostJobseekerExport = PostModel(url.JobseekerExport); | |||
export const PostJobExport = PostModel(url.JobExport); | |||
// 公共户口 | |||
export const PostTalentsinfoAdd= PostModel(url.TalentsinfoAdd); | |||
export const PostTalentsinfoDel = PostModel(url.TalentsinfoDel); | |||
export const PostTalentsinfoUpdate = PostModel(url.TalentsinfoUpdate); | |||
export const GetTalentsinfoList = GetModel(url.TalentsinfoList); | |||
export const GetTalentsinfoDetail = GetModel(url.TalentsinfoDetail); | |||
@@ -258,5 +258,13 @@ declare namespace urlType { | |||
CompanyExport: String, // 详情 | |||
JobseekerExport: String, // 详情 | |||
JobExport: String, // 详情 | |||
// 公共户口 | |||
TalentsinfoAdd: String, // 添加 | |||
TalentsinfoDel: String, // 删除 | |||
TalentsinfoUpdate: String, // 编辑 | |||
TalentsinfoList: String, // 列表 | |||
TalentsinfoDetail: String, // 详情 | |||
} | |||
} |
@@ -22,7 +22,7 @@ export const url: urlType.url = { | |||
permissionList: admin + '/permission/list', | |||
permissionUpdate: admin + '/permission/update', | |||
permissionDetail: admin + '/permission/detail', | |||
roleGetpermissionids: admin + '/role/getpermissionids', // 获取角色的id | |||
permissionListWithchilds: admin + '/permission/listwithchilds', | |||
@@ -273,9 +273,16 @@ export const url: urlType.url = { | |||
DictDetail: common + '/dict/detail', // 详情 | |||
// 导出数据 | |||
CompanyExport: admin + '/company/export', | |||
CompanyExport: admin + '/company/export', | |||
JobseekerExport: admin + '/jobseeker/export', | |||
JobExport: admin + '/job/export', | |||
// 公共户口 | |||
TalentsinfoAdd: admin + '/talentsinfo/add', // 添加 | |||
TalentsinfoDel: admin + '/talentsinfo/del', // 删除 | |||
TalentsinfoUpdate: admin + '/talentsinfo/update', // 编辑 | |||
TalentsinfoList: admin + '/talentsinfo/list', // 列表 | |||
TalentsinfoDetail: admin + '/talentsinfo/detail', // 详情 | |||
} |
@@ -113,7 +113,7 @@ const PagesMainAdvertisementPutinCreate: React.FC = ({ dispatch, dictModel, open | |||
> | |||
<Row gutter={[16, 16]}> | |||
<Col span={24}> | |||
<UploadModel multiple={false} form_name="image_url" image_length={1} uploadTxt="上传封面图" image_type={3} imageUrl={detail?.photo} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
<UploadModel multiple={false} form_name="image_url" image_length={1} uploadTxt="上传封面图" image_type={3} imageUrl={uploadedFilephotoName} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormText |
@@ -65,6 +65,7 @@ const PagesMainFairListCreate: React.FC = ({ dispatch, dictModel, openModel, id | |||
if (id) { | |||
let res = await GetRecruitmentDetail({ id: id.id }) | |||
res.data.dateRange = [res.data.open_date, res.data.close_date ? res.data.close_date : null]; | |||
setUploadedFilephotoName(res.data.photo) | |||
return res.data; | |||
} else { | |||
setUploadedFilephotoName('') | |||
@@ -92,8 +93,8 @@ const PagesMainFairListCreate: React.FC = ({ dispatch, dictModel, openModel, id | |||
} | |||
}} | |||
onFinish={async (values) => { | |||
values.open_date = values.dateRange[0]; | |||
values.close_date = values.dateRange[1] ? values.dateRange[1] : ''; | |||
values.open_date = values.dateRange && values.dateRange.length > 0 && values.dateRange[0] ? values.dateRange[0] : 0; | |||
values.close_date = values.dateRange && values.dateRange.length > 0 && values.dateRange[1] ? values.dateRange[1] : 0; | |||
values.photo = uploadedFilephotoName ? uploadedFilephotoName : ''; | |||
delete values.dateRange; | |||
if (id) { | |||
@@ -108,12 +109,9 @@ const PagesMainFairListCreate: React.FC = ({ dispatch, dictModel, openModel, id | |||
} | |||
}} | |||
> | |||
<Row gutter={[16, 16]}> | |||
<Col span={24}> | |||
<UploadModel multiple={false} form_name="photo" image_length={1} uploadTxt="上传招聘会照片" image_type={3} imageUrl={detail?.photo} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
<UploadModel multiple={false} form_name="photo" image_length={1} uploadTxt="上传招聘会照片" image_type={3} imageUrl={uploadedFilephotoName} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
</Col> | |||
<Col span={12}> | |||
<ProFormText |
@@ -131,7 +131,7 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
> | |||
<Row gutter={[16, 16]}> | |||
<Col span={8}> | |||
<UploadModel multiple={false} form_name="cover_img" image_length={1} uploadTxt="上传封面图" image_type={3} imageUrl={detail?.photo} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
<UploadModel multiple={false} form_name="cover_img" image_length={1} uploadTxt="上传封面图" image_type={3} imageUrl={uploadedFilephotoName} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
</Col> | |||
<Col span={8}> |
@@ -128,7 +128,7 @@ const PagesMainInformationSectionCreate: React.FC = ({ dispatch, dictModel, open | |||
> | |||
<Row gutter={[16, 16]}> | |||
<Col span={24}> | |||
<UploadModel multiple={false} form_name="cover_img" image_length={1} uploadTxt="上传封面图" image_type={3} imageUrl={detail?.photo} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
<UploadModel multiple={false} form_name="cover_img" image_length={1} uploadTxt="上传封面图" image_type={3} imageUrl={uploadedFilephotoName} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormText |
@@ -10,10 +10,10 @@ import { | |||
FormControlRender, | |||
ProFormDependency, | |||
ProFormSwitch, | |||
ProFormCascader, | |||
ProFormRadio, | |||
ProFormDatePicker | |||
} from '@ant-design/pro-components'; | |||
import { ConfigProvider, Flex, Space, Modal, message, Image, Row, Col, Switch, Form, Typography, Divider } from 'antd'; | |||
import { ConfigProvider, Flex, Space, Modal, message, Image, Row, Col, Switch, Form, Typography, Divider, Radio } from 'antd'; | |||
import { addArticle, updateArticle, listSection, GetArticleDetail } from '@/apis/api'; | |||
import { Imageprefix } from '@/constants'; | |||
import UploadModel from '@/components/Common/upload'; | |||
@@ -27,6 +27,8 @@ import { isArrayOfType } from '@/utils/dataHelper'; | |||
const selectfieldNames = { label: 'name', value: 'id' }; | |||
const cascaderfieldNames = { label: 'name', value: 'id', children: 'childs' }; | |||
import { PostTalentsinfoAdd, PostTalentsinfoUpdate, GetTalentsinfoDetail } from '@/apis/api'; | |||
const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
const formRef = useRef<ProFormInstance>(); | |||
const [openPreview, setOpenPreview] = useState(false); | |||
@@ -38,20 +40,8 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
useEffect(() => { | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2004, type: 'setPositionList' } }) | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2009, type: 'setAreaList' } }) | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2005, type: 'setPayList' } }) | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2016, type: 'setAccommodationRequirementList' } }) | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2017, type: 'setHolidayRestList' } }) | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2018, type: 'setLicenseList' } }) | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2021, type: 'setWorkExperienceList' } }) | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2006, type: 'setEducationList' } }) | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2014, type: 'setTitleList' } }) | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2015, type: 'setSkillCertificationeList' } }) | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2007, type: 'setOtherLanguageList' } }) | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2008, type: 'setDegreeList' } }) | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2027, type: 'setIndustryPostList' } }) | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2010, type: 'setPoliticalList' } }) | |||
}, []) | |||
@@ -80,15 +70,13 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
formRef={formRef} | |||
request={async () => { | |||
if (id) { | |||
let res = await GetArticleDetail({ id: id }) | |||
setUploadedFilephotoName(res.data.cover_img) | |||
let res = await GetTalentsinfoDetail({ id: id }) | |||
res.data.section_arr = [res.data.section_name] | |||
setDetail(res.data) | |||
return res.data; | |||
} else { | |||
setDetail(null) | |||
setUploadedFilephotoName('') | |||
return { | |||
title: '', | |||
cover_img: '', | |||
@@ -125,13 +113,13 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
values.section_id = values.section_arr.length > 0 ? values.section_arr[values.section_arr.length - 1] : 0; | |||
delete values.section_arr; | |||
} | |||
let res = await updateArticle(values) | |||
let res = await PostTalentsinfoUpdate(values) | |||
message.success('提交成功') | |||
dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
} else { | |||
values.section_id = values.section_arr.length > 0 ? values.section_arr[values.section_arr.length - 1] : 0; | |||
delete values.section_arr; | |||
let res = await addArticle(values) | |||
let res = await PostTalentsinfoAdd(values) | |||
message.success('提交成功') | |||
dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
} | |||
@@ -139,173 +127,100 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
> | |||
<Row gutter={[16, 16]}> | |||
<Col span={24}> | |||
<Divider orientation="left" plain >户口本信息</Divider> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormText | |||
name="author" | |||
label="户口本存放位编号" | |||
placeholder="436346" | |||
rules={[{ required: true, message: '请输入户口本存放位编号' }]} | |||
/> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormText | |||
name="author" | |||
label="单位名称" | |||
placeholder="菊城人才市场" | |||
rules={[{ required: true, message: '请输入单位名称' }]} | |||
/> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormText | |||
name="author" | |||
label="入户人数" | |||
placeholder="10" | |||
label="户口卡编号" | |||
placeholder="请输入户口卡编号" | |||
rules={[{ required: true, message: '请输入户口卡编号' }]} | |||
/> | |||
</Col> | |||
<Col span={24}> | |||
<Divider orientation="left" plain >入户人员信息</Divider> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormSegmented | |||
<Col span={4}> | |||
<ProFormRadio.Group | |||
name="gender" | |||
label="是否随家人迁入" | |||
label="是否是主办人" | |||
request={async () => [ | |||
{ label: '是', value: 1 }, | |||
{ label: '否', value: 2 } | |||
]} | |||
rules={[{ required: true, message: '请选择是否是主办人' }]} | |||
/> | |||
</Col> | |||
<Col span={16}> | |||
<ProFormSelect | |||
width={'md'} | |||
name="education" | |||
label="选择随迁人员" | |||
fieldProps={{ | |||
fieldNames: selectfieldNames | |||
}} | |||
options={dictModel.educationList} | |||
/> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormText | |||
name="author" | |||
label="姓名" | |||
placeholder="10" | |||
/> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormText | |||
label="身份证" | |||
name="id_number" | |||
placeholder="请输入身份证" | |||
validateTrigger='onBlur' | |||
rules={[{ | |||
required: false, | |||
}, () => ({ | |||
validator: (rule, value) => { | |||
let info = verifyIdCard(value); | |||
rules={[{ required: true, message: '请输入姓名' }]} | |||
if (typeof (info) == 'boolean') { | |||
return Promise.resolve(); | |||
} | |||
return Promise.reject(new Error(info)); | |||
} | |||
})]} | |||
/> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormSegmented | |||
<Col span={4}> | |||
<ProFormRadio.Group | |||
name="gender" | |||
label="性别" | |||
request={async () => [ | |||
{ label: '男', value: '男' }, | |||
{ label: '女', value: '女' } | |||
]} | |||
rules={[{ required: true, message: '请选择性别' }]} | |||
/> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormSelect | |||
name="education" | |||
label="学历" | |||
fieldProps={{ | |||
fieldNames: selectfieldNames | |||
}} | |||
options={dictModel.educationList} | |||
<Col span={4}> | |||
<ProFormRadio.Group | |||
name="gender" | |||
label="是否是随迁人" | |||
request={async () => [ | |||
{ label: '是', value: 1 }, | |||
{ label: '否', value: 2 } | |||
]} | |||
rules={[{ required: true, message: '请选择是否是随迁人' }]} | |||
/> | |||
</Col> | |||
<Col span={8}> | |||
<Col span={14}> | |||
<ProFormSelect | |||
name="political_status" | |||
label="政治面貌" | |||
name="education" | |||
label="选择主办人员" | |||
fieldProps={{ | |||
width: '100%', | |||
fieldNames: selectfieldNames | |||
}} | |||
options={dictModel.politicalList} | |||
/> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormText | |||
name="author" | |||
label="毕业院校" | |||
placeholder="10" | |||
/> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormText | |||
name="author" | |||
label="专业" | |||
placeholder="10" | |||
options={dictModel.educationList} | |||
/> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormCascader | |||
label="籍贯" | |||
name="native_arr" | |||
fieldProps={{ | |||
fieldNames: cascaderfieldNames, | |||
options: dictModel.areaList, | |||
changeOnSelect: true | |||
}} | |||
placeholder="请选择籍贯" | |||
<Col span={6}> | |||
<ProFormDatePicker | |||
name="dob" | |||
label="入户时间" | |||
placeholder='请选择入户时间' | |||
width={'lg'} | |||
rules={[{ required: true, message: '请选择入户时间' }]} | |||
/> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormSelect | |||
name="marital_status" | |||
label="婚姻状况" | |||
name="education" | |||
label="学历" | |||
fieldProps={{ | |||
fieldNames: selectfieldNames | |||
}} | |||
options={dictModel.maritalList} | |||
placeholder='请选择学历' | |||
options={dictModel.educationList} | |||
rules={[{ required: true, message: '请选择学历' }]} | |||
/> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormText | |||
name="author" | |||
label="联系电话" | |||
placeholder="10" | |||
/> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormDatePicker | |||
name="dob" | |||
label="入户时间" | |||
placeholder='请选择入户时间' | |||
width={'lg'} | |||
/> | |||
</Col> | |||
<Col span={8}> | |||
<ProFormText | |||
name="author" | |||
label="备注" | |||
placeholder="10" | |||
placeholder="请输入联系电话" | |||
rules={[{ required: true, message: '请输入联系电话' }]} | |||
/> | |||
</Col> | |||
</Row> | |||
</ProForm> |
@@ -5,7 +5,7 @@ import { | |||
ProTable, TableDropdown,ProFormSelect | |||
} from '@ant-design/pro-components'; | |||
import { Button, Image, ConfigProvider, Popconfirm, message , Tag} from 'antd'; | |||
import { listArticle, listSection, delArticle} from '@/apis/api'; | |||
import { GetTalentsinfoList,PostTalentsinfoDel} from '@/apis/api'; | |||
import { Imageprefix } from '@/constants'; | |||
const selectfieldNames = { label: 'name', value: 'id', children: 'childs' }; | |||
@@ -58,28 +58,7 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch, openModel, getId | |||
dataIndex: 'section_name', | |||
search: false | |||
}, | |||
{ | |||
title: '所属栏目', | |||
dataIndex: 'section_id', | |||
hidden: true, | |||
valueType: 'select', | |||
renderFormItem: () => { | |||
return ( | |||
<ProFormSelect | |||
width='lg' | |||
fieldProps={{ | |||
fieldNames: selectfieldNames, | |||
}} | |||
request={async (keyword) => | |||
listSection({ page: 1, pagesize: 100, keyword: keyword.keyWords }).then(res => { | |||
return res.data.sections; | |||
}) | |||
} | |||
placeholder="请选择所属栏目" | |||
/> | |||
) | |||
} | |||
}, | |||
{ | |||
title: '封面图', | |||
dataIndex: 'cover_img', | |||
@@ -134,9 +113,9 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch, openModel, getId | |||
<Popconfirm | |||
title="是否删除" | |||
onConfirm={(e) => { | |||
delArticle({ id: record.id }).then(res => { | |||
PostTalentsinfoDel({ id: record.id }).then(res => { | |||
message.success('删除成功') | |||
actionRef.current.reload(); | |||
actionRef.current?.reload(); | |||
}) | |||
}} | |||
okText="删除" | |||
@@ -168,7 +147,7 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch, openModel, getId | |||
} | |||
}} | |||
request={async (params = {} as Record<string, any>) => | |||
listArticle({ | |||
GetTalentsinfoList({ | |||
page: page, | |||
pagesize: pageSize, | |||
sort: 'id', | |||
@@ -180,12 +159,12 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch, openModel, getId | |||
setTotal(res.data.total) | |||
}) | |||
} | |||
headerTitle="文章列表" | |||
headerTitle="公共人口信息" | |||
toolBarRender={() => [ | |||
<Button type="primary" onClick={() => { | |||
dispatch({ type: 'openModel/getOpenModal', payload: true }) | |||
}}> | |||
添加文章 | |||
公共人口信息 | |||
</Button> | |||
]} | |||
/> |