Selaa lähdekoodia

deploy

master
Soleilw 6 kuukautta sitten
vanhempi
commit
f2e966904d
41 muutettua tiedostoa jossa 682 lisäystä ja 463 poistoa
  1. 1
    1
      config/routes.ts
  2. 1
    0
      dist/487.39fd7dd2.async.js
  3. 1
    1
      dist/index.html
  4. 0
    1
      dist/p__Advertisement__List__index.a934654d.async.js
  5. 1
    0
      dist/p__Advertisement__List__index.be33c9c2.async.js
  6. 0
    1
      dist/p__Company__List__index.1dd5d489.async.js
  7. 1
    0
      dist/p__Company__List__index.cb52b437.async.js
  8. 1
    0
      dist/p__Company__Post__index.04c83c91.async.js
  9. 0
    1
      dist/p__Company__Post__index.c8bf9355.async.js
  10. 1
    1
      dist/p__Company__Vip__index.2e15945e.async.js
  11. 1
    1
      dist/p__Feedback__index.8b4e738d.async.js
  12. 1
    0
      dist/p__Information__Section__index.6332b01e.async.js
  13. 0
    1
      dist/p__Information__Section__index.b6a23d2c.async.js
  14. 0
    1
      dist/p__Jobseeker__List__index.1a7d0540.async.js
  15. 1
    0
      dist/p__Jobseeker__List__index.60267beb.async.js
  16. 1
    1
      dist/p__Login__index.0de8f252.async.js
  17. 0
    1
      dist/p__Permission__List__index.41d076f1.async.js
  18. 1
    0
      dist/p__Permission__List__index.cbdc93ec.async.js
  19. 1
    0
      dist/p__Setting__Dictionary__index.3e2b3296.async.js
  20. 0
    1
      dist/p__Setting__Dictionary__index.c763807b.async.js
  21. 32
    32
      dist/umi.eb8daf1a.js
  22. 1
    1
      src/.umi/core/route.tsx
  23. 2
    1
      src/app.tsx
  24. 7
    1
      src/components/Render/Main/Advertisement/List/create/index.tsx
  25. 369
    353
      src/components/Render/Main/Company/List/table/index.tsx
  26. 38
    31
      src/components/Render/Main/Company/Post/create/index.tsx
  27. 6
    1
      src/components/Render/Main/Company/Vip/fee/index.tsx
  28. 6
    1
      src/components/Render/Main/Feedback/create/index.tsx
  29. 6
    1
      src/components/Render/Main/Information/Section/create/index.tsx
  30. 6
    1
      src/components/Render/Main/Jobseeker/List/resume/basic/index.tsx
  31. 10
    10
      src/components/Render/Main/Jobseeker/List/resume/help/recommend/index.tsx
  32. 6
    2
      src/components/Render/Permission/List/create/index.tsx
  33. 123
    0
      src/components/Render/Permission/List/parent/index.tsx
  34. 18
    7
      src/components/Render/Permission/List/table/index.tsx
  35. 6
    1
      src/components/Render/Setting/Dictionary/create/index.tsx
  36. 2
    2
      src/components/Render/Setting/System/create/index.tsx
  37. 19
    1
      src/models/openModel.ts
  38. 2
    1
      src/pages/Login/index.tsx
  39. 5
    0
      src/pages/Permission/List/index.tsx
  40. 5
    0
      src/utils/dataHelper.ts
  41. 0
    4
      src/utils/env.ts

+ 1
- 1
config/routes.ts Näytä tiedosto

@@ -16,7 +16,7 @@ export default [
path: '/company',
routes: [
{
name: '企业列表',
name: '所有企业',
path: '/company/list',
component: './Company/List',
access: 'member',

+ 1
- 0
dist/487.39fd7dd2.async.js
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 1
dist/index.html Näytä tiedosto

@@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script src="/umi.6e92b7d0.js"></script>
<script src="/umi.eb8daf1a.js"></script>
</body>
</html>

+ 0
- 1
dist/p__Advertisement__List__index.a934654d.async.js
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 0
dist/p__Advertisement__List__index.be33c9c2.async.js
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 1
dist/p__Company__List__index.1dd5d489.async.js
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 0
dist/p__Company__List__index.cb52b437.async.js
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 0
dist/p__Company__Post__index.04c83c91.async.js
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 1
dist/p__Company__Post__index.c8bf9355.async.js
File diff suppressed because it is too large
Näytä tiedosto


dist/p__Company__Vip__index.2e15945e.async.js
File diff suppressed because it is too large
Näytä tiedosto


dist/p__Feedback__index.8b4e738d.async.js
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 0
dist/p__Information__Section__index.6332b01e.async.js
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 1
dist/p__Information__Section__index.b6a23d2c.async.js
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 1
dist/p__Jobseeker__List__index.1a7d0540.async.js
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 0
dist/p__Jobseeker__List__index.60267beb.async.js
File diff suppressed because it is too large
Näytä tiedosto


dist/p__Login__index.0de8f252.async.js
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 1
dist/p__Permission__List__index.41d076f1.async.js
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 0
dist/p__Permission__List__index.cbdc93ec.async.js
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 0
dist/p__Setting__Dictionary__index.3e2b3296.async.js
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 1
dist/p__Setting__Dictionary__index.c763807b.async.js
File diff suppressed because it is too large
Näytä tiedosto


dist/umi.eb8daf1a.js
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 1
src/.umi/core/route.tsx Näytä tiedosto

@@ -4,7 +4,7 @@
import React from 'react';

export async function getRoutes() {
const routes = {"1":{"path":"/login","layout":false,"access":"login","id":"1"},"2":{"path":"/","redirect":"/company/list","parentId":"ant-design-pro-layout","id":"2"},"3":{"path":"/login","layout":false,"id":"3"},"4":{"name":"企业管理","access":"company","path":"/company","parentId":"ant-design-pro-layout","id":"4"},"5":{"name":"企业列表","path":"/company/list","access":"member","parentId":"4","id":"5"},"6":{"name":"VIP列表","path":"/company/vip","access":"vip","parentId":"4","id":"6"},"7":{"name":"部门管理","path":"/company/department","access":"department","parentId":"4","id":"7"},"8":{"name":"职位管理","path":"/company/post","access":"job","parentId":"4","id":"8"},"9":{"name":"求职者管理","access":"jobSeeker","path":"/jobseeker","parentId":"ant-design-pro-layout","id":"9"},"10":{"name":"简历列表","path":"/jobseeker/list","access":"jobResume","parentId":"9","id":"10"},"11":{"name":"求职者账号列表","path":"/jobseeker/account","access":"customerList","parentId":"9","id":"11"},"12":{"name":"招聘会管理","access":"jobFair","path":"/fair","parentId":"ant-design-pro-layout","id":"12"},"13":{"name":"招聘会列表","path":"/fair/list","access":"jobFairList","parentId":"12","id":"13"},"14":{"name":"新闻资讯","access":"information","path":"/information","parentId":"ant-design-pro-layout","id":"14"},"15":{"name":"栏目/频道","path":"/information/section","access":"section","parentId":"14","id":"15"},"16":{"name":"文章列表","path":"/information/article","access":"article","parentId":"14","id":"16"},"17":{"name":"广告/活动管理","access":"advertisement","path":"/advertisement","parentId":"ant-design-pro-layout","id":"17"},"18":{"name":"广告/活动列表","path":"/advertisement/list","access":"advertisementList","parentId":"17","id":"18"},"19":{"name":"广告/活动投放","path":"/advertisement/putin","access":"putIn","parentId":"17","id":"19"},"20":{"name":"春节引流活动管理","access":"activity","path":"/activity","parentId":"ant-design-pro-layout","id":"20"},"21":{"name":"活动门店","path":"/activity/list","access":"activityAddress","parentId":"20","id":"21"},"22":{"name":"账号权限","path":"/permission","access":"permission","parentId":"ant-design-pro-layout","id":"22"},"23":{"name":"权限管理","path":"/permission/list","access":"list","parentId":"22","id":"23"},"24":{"name":"角色管理","path":"/permission/role","access":"role","parentId":"22","id":"24"},"25":{"name":"账号管理","path":"/permission/account","access":"account","parentId":"22","id":"25"},"26":{"name":"系统管理","path":"/setting","parentId":"ant-design-pro-layout","id":"26"},"27":{"name":"系统设置","path":"/setting/system","access":"other","parentId":"26","id":"27"},"28":{"name":"字典设置","path":"/setting/dictionary","access":"dictionaryList","parentId":"26","id":"28"},"29":{"name":"分词器","path":"/setting/other","access":"otherTokenizer","parentId":"26","id":"29"},"30":{"name":"反馈管理","path":"/feedback/list","access":"feedback","parentId":"ant-design-pro-layout","id":"30"},"ant-design-pro-layout":{"id":"ant-design-pro-layout","path":"/","isLayout":true}} as const;
const routes = {"1":{"path":"/login","layout":false,"access":"login","id":"1"},"2":{"path":"/","redirect":"/company/list","parentId":"ant-design-pro-layout","id":"2"},"3":{"path":"/login","layout":false,"id":"3"},"4":{"name":"企业管理","access":"company","path":"/company","parentId":"ant-design-pro-layout","id":"4"},"5":{"name":"所有企业","path":"/company/list","access":"member","parentId":"4","id":"5"},"6":{"name":"VIP列表","path":"/company/vip","access":"vip","parentId":"4","id":"6"},"7":{"name":"部门管理","path":"/company/department","access":"department","parentId":"4","id":"7"},"8":{"name":"职位管理","path":"/company/post","access":"job","parentId":"4","id":"8"},"9":{"name":"求职者管理","access":"jobSeeker","path":"/jobseeker","parentId":"ant-design-pro-layout","id":"9"},"10":{"name":"简历列表","path":"/jobseeker/list","access":"jobResume","parentId":"9","id":"10"},"11":{"name":"求职者账号列表","path":"/jobseeker/account","access":"customerList","parentId":"9","id":"11"},"12":{"name":"招聘会管理","access":"jobFair","path":"/fair","parentId":"ant-design-pro-layout","id":"12"},"13":{"name":"招聘会列表","path":"/fair/list","access":"jobFairList","parentId":"12","id":"13"},"14":{"name":"新闻资讯","access":"information","path":"/information","parentId":"ant-design-pro-layout","id":"14"},"15":{"name":"栏目/频道","path":"/information/section","access":"section","parentId":"14","id":"15"},"16":{"name":"文章列表","path":"/information/article","access":"article","parentId":"14","id":"16"},"17":{"name":"广告/活动管理","access":"advertisement","path":"/advertisement","parentId":"ant-design-pro-layout","id":"17"},"18":{"name":"广告/活动列表","path":"/advertisement/list","access":"advertisementList","parentId":"17","id":"18"},"19":{"name":"广告/活动投放","path":"/advertisement/putin","access":"putIn","parentId":"17","id":"19"},"20":{"name":"春节引流活动管理","access":"activity","path":"/activity","parentId":"ant-design-pro-layout","id":"20"},"21":{"name":"活动门店","path":"/activity/list","access":"activityAddress","parentId":"20","id":"21"},"22":{"name":"账号权限","path":"/permission","access":"permission","parentId":"ant-design-pro-layout","id":"22"},"23":{"name":"权限管理","path":"/permission/list","access":"list","parentId":"22","id":"23"},"24":{"name":"角色管理","path":"/permission/role","access":"role","parentId":"22","id":"24"},"25":{"name":"账号管理","path":"/permission/account","access":"account","parentId":"22","id":"25"},"26":{"name":"系统管理","path":"/setting","parentId":"ant-design-pro-layout","id":"26"},"27":{"name":"系统设置","path":"/setting/system","access":"other","parentId":"26","id":"27"},"28":{"name":"字典设置","path":"/setting/dictionary","access":"dictionaryList","parentId":"26","id":"28"},"29":{"name":"分词器","path":"/setting/other","access":"otherTokenizer","parentId":"26","id":"29"},"30":{"name":"反馈管理","path":"/feedback/list","access":"feedback","parentId":"ant-design-pro-layout","id":"30"},"ant-design-pro-layout":{"id":"ant-design-pro-layout","path":"/","isLayout":true}} as const;
return {
routes,
routeComponents: {

+ 2
- 1
src/app.tsx Näytä tiedosto

@@ -8,8 +8,9 @@ import {
ProBreadcrumb,
} from '@ant-design/pro-components';

import { GetUserMenulist } from '@/apis/api';
import { GetUserMenulist} from '@/apis/api';
export async function getInitialState(): Promise<{ permissions: object[] }> {
const token = sessionStorage.getItem('token');
let permissions = [];
if (!token) {

+ 7
- 1
src/components/Render/Main/Advertisement/List/create/index.tsx Näytä tiedosto

@@ -29,7 +29,13 @@ const PagesMainAdvertisementListCreate: React.FC = ({ dispatch, dictModel, openM
theme={{
token: {
colorPrimary: '#4FBE70',
}
},
components: {
Segmented: {
itemSelectedBg: '#19be6e',
itemSelectedColor: '#ffffff'
},
},
}}
>
<Modal

+ 369
- 353
src/components/Render/Main/Company/List/table/index.tsx Näytä tiedosto

@@ -5,8 +5,10 @@ import {
ProTable, TableDropdown, PageContainer
} from '@ant-design/pro-components';
import { Button, Image, ConfigProvider, Select, message } from 'antd';
import { getCompanyList, GetCompanyInfo, updateCompany, PostCompanyExport } from '@/apis/api';
import { getCompanyList, GetCompanyInfo, updateCompany, PostCompanyExport, getRoleGetpermissionids } from '@/apis/api';
import { Imageprefix } from '@/constants';
import { findId } from '@/utils/dataHelper';


const PagesMainCompanyListTable: React.FC = ({ dispatch, openModel, getId }: any) => {
const actionRef = useRef<ActionType>();
@@ -19,6 +21,12 @@ const PagesMainCompanyListTable: React.FC = ({ dispatch, openModel, getId }: any
getId(id)
}

const [addButton, setAddButton] = useState<boolean>(true)
const [editButton, setEditButton] = useState<boolean>(true)



useEffect(() => {
if (!openModel.openModal) {
actionRef.current.reload();
@@ -35,374 +43,382 @@ const PagesMainCompanyListTable: React.FC = ({ dispatch, openModel, getId }: any
}
}}
>
<ProTable
size='small'
bordered={true}
scroll={{ x: 1300 }}
actionRef={actionRef}
dataSource={list}
columns={[
{
title: 'ID',
dataIndex: 'id',
width: 100,
fixed: 'left',
},
{
title: '企业名称',
dataIndex: 'full_name',
width: 240,
},
{
title: '来源',
dataIndex: 'origin_text',
search: false,
width: 100,
},
{
title: '登录次数',
dataIndex: 'login_count',
search: false,
width: 100
},
{
title: '点击次数',
dataIndex: 'click_count',
search: false,
width: 100
},
{
title: '会员类型',
dataIndex: 'member_type',
width: 100,
hidden: true,
valueType: 'select',
valueEnum: {
0: { text: '全部' },
1: {
text: '试用申请中',
},
2: {
text: '试用正式',
},
3: {
text: '普通申请中',
},
4: {
text: '普通正式',
},
5: {
text: 'VIP申请中',
},
6: {
text: 'VIP正式',
},
<ProTable
size='small'
bordered={true}
scroll={{ x: 1300 }}
actionRef={actionRef}
dataSource={list}
columns={[
{
title: 'ID',
dataIndex: 'id',
width: 100,
fixed: 'left',
},
{
title: '企业名称',
dataIndex: 'full_name',
width: 240,
},
{
title: '来源',
dataIndex: 'origin_text',
search: false,
width: 100,
},
{
title: '登录次数',
dataIndex: 'login_count',
search: false,
width: 100
},
{
title: '点击次数',
dataIndex: 'click_count',
search: false,
width: 100
},
{
title: '会员类型',
dataIndex: 'member_type',
width: 100,
hidden: true,
valueType: 'select',
valueEnum: {
0: { text: '全部' },
1: {
text: '试用申请中',
},
2: {
text: '试用正式',
},
3: {
text: '普通申请中',
},
4: {
text: '普通正式',
},
5: {
text: 'VIP申请中',
},
6: {
text: 'VIP正式',
},
},
{
title: '会员类型',
dataIndex: 'member_type_text',
width: 100,
search: false,
render: (_, record) => (<>
{
record.member_type_text && <Button type="primary" size='small' onClick={() => {
sessionStorage.setItem('vip_company_info', JSON.stringify(record))
history.push({
pathname: '/company/vip'
})
}}>
{record.member_type_text}
</Button>
}
},
{
title: '会员类型',
dataIndex: 'member_type_text',
width: 100,
search: false,
render: (_, record) => (<>
{
record.member_type_text && <Button type="primary" size='small' onClick={() => {
sessionStorage.setItem('vip_company_info', JSON.stringify(record))
history.push({
pathname: '/company/vip'
})
}}>
{record.member_type_text}
</Button>
}

</>),
valueType: 'select',
valueEnum: {
0: { text: '全部' },
1: {
text: '试用申请中',
},
2: {
text: '试用正式',
},
3: {
text: '普通申请中',
},
4: {
text: '普通正式',
},
5: {
text: 'VIP申请中',
},
6: {
text: 'VIP正式',
},
</>),
valueType: 'select',
valueEnum: {
0: { text: '全部' },
1: {
text: '试用申请中',
},
},
{
title: '开始时间',
dataIndex: 'start_date',
search: false,
width: 140
},
{
title: '到期时间',
dataIndex: 'end_date',
search: false,
width: 140
}, {
title: '剩余点数',
dataIndex: 'code',
search: false,
width: 100
},
{
title: '会员状态',
dataIndex: 'member_status',
width: 100,
hidden: true,
valueType: 'select',
valueEnum: {
0: { text: '全部' },
1: {
text: '待审',
},
2: {
text: '正常',
},
3: {
text: '到期',
},
4: {
text: '推荐',
}
2: {
text: '试用正式',
},
},
{
title: '状态',
dataIndex: 'status',
hidden: true,
valueType: 'select',
valueEnum: {
0: { text: '全部' },
1: {
text: '开通',
},
2: {
text: '关闭',
},
3: {
text: '普通申请中',
},
},
{
title: '会员状态',
dataIndex: 'member_status_text',
width: 120,
search: false,
valueType: 'select',
valueEnum: {
0: { text: '全部' },
1: {
text: '待审',
},
2: {
text: '正常',
},
3: {
text: '到期',
},
4: {
text: '推荐',
}
4: {
text: '普通正式',
},
5: {
text: 'VIP申请中',
},
6: {
text: 'VIP正式',
},
},
{
title: '企业照片',
dataIndex: 'photo',
search: false,
width: 100,
render: (_, record) => (<>
<Image src={`${Imageprefix + record.photo}`} width={40} height={40} />
</>
)
}, {
title: '照片审核',
dataIndex: 'photo_status_text',
search: false,
width: 120,
render: (_, record) => (<>
<Select
size="small"
style={{ width: 100 }}
value={record.photo_status_text}
options={[
{
label: '待审',
value: 1,
},
{
label: '通过',
value: 2,
},
{
label: '不通过',
value: 3,
},
]}
onChange={async (value) => {
let info = await GetCompanyInfo({ id: record.id });
let res = await updateCompany({ ...info.data, photo_status: value });
actionRef.current.reload();
}}
></Select>
</>)
},
{
title: '营业执照',
dataIndex: 'license_path',
search: false,
width: 120,
render: (_, record) => (<>
<Image src={`${Imageprefix}${record.license_path}`} width={40} height={40} />
</>
)
},
{
title: '开始时间',
dataIndex: 'start_date',
search: false,
width: 140
},
{
title: '到期时间',
dataIndex: 'end_date',
search: false,
width: 140
}, {
title: '剩余点数',
dataIndex: 'code',
search: false,
width: 100
},
{
title: '会员状态',
dataIndex: 'member_status',
width: 100,
hidden: true,
valueType: 'select',
valueEnum: {
0: { text: '全部' },
1: {
text: '待审',
},
2: {
text: '正常',
},
3: {
text: '到期',
},
4: {
text: '推荐',
}
},
{
title: '营业执照审核',
dataIndex: 'license_status_text',
search: false,
width: 120,
render: (_, record) => (<>
<Select
size="small"
style={{ width: 100 }}
value={record.license_status_text}
options={[
{
label: '待审',
value: 1,
},
{
label: '通过',
value: 2,
},
{
label: '不通过',
value: 3,
},
]}
onChange={async (value) => {
let info = await GetCompanyInfo({ id: record.id });
let res = await updateCompany({ ...info.data, license_status: value });
actionRef.current.reload();
}}
></Select>
</>)
},
{
title: '状态',
dataIndex: 'status',
hidden: true,
valueType: 'select',
valueEnum: {
0: { text: '全部' },
1: {
text: '开通',
},
2: {
text: '关闭',
},
},
{
title: '登录账号',
dataIndex: 'login_name',
width: 200
},
{
title: '会员状态',
dataIndex: 'member_status_text',
width: 120,
search: false,
valueType: 'select',
valueEnum: {
0: { text: '全部' },
1: {
text: '待审',
},
2: {
text: '正常',
},
3: {
text: '到期',
},
4: {
text: '推荐',
}
},
{
title: '操作',
width: 300,
key: 'option',
valueType: 'option',
fixed: 'right',
render: (_, record, action) => [
<Button key='1' type='link' onClick={() => {
setId(record.id)
dispatch({ type: 'openModel/getOpenModal', payload: true })
}}>编辑</Button>,
<Button key='2' type='link' onClick={() => {
GetCompanyInfo({ id: record.id }).then(res => {
sessionStorage.setItem('company_info', JSON.stringify(res.data))
history.push({
pathname: '/company/department'
})
},
{
title: '企业照片',
dataIndex: 'photo',
search: false,
width: 100,
render: (_, record) => (<>
<Image src={`${Imageprefix + record.photo}`} width={40} height={40} />
</>
)
}, {
title: '照片审核',
dataIndex: 'photo_status_text',
search: false,
width: 120,
render: (_, record) => (<>
<Select
size="small"
style={{ width: 100 }}
value={record.photo_status_text}
options={[
{
label: '待审',
value: 1,
},
{
label: '通过',
value: 2,
},
{
label: '不通过',
value: 3,
},
]}
onChange={async (value) => {
let info = await GetCompanyInfo({ id: record.id });
let res = await updateCompany({ ...info.data, photo_status: value });
actionRef.current.reload();
}}
></Select>
</>)
},
{
title: '营业执照',
dataIndex: 'license_path',
search: false,
width: 120,
render: (_, record) => (<>
<Image src={`${Imageprefix}${record.license_path}`} width={40} height={40} />
</>
)
},
{
title: '营业执照审核',
dataIndex: 'license_status_text',
search: false,
width: 120,
render: (_, record) => (<>
<Select
size="small"
style={{ width: 100 }}
value={record.license_status_text}
options={[
{
label: '待审',
value: 1,
},
{
label: '通过',
value: 2,
},
{
label: '不通过',
value: 3,
},
]}
onChange={async (value) => {
let info = await GetCompanyInfo({ id: record.id });
let res = await updateCompany({ ...info.data, license_status: value });
actionRef.current.reload();
}}
></Select>
</>)
},
{
title: '登录账号',
dataIndex: 'login_name',
width: 200
},
{
title: '操作',
width: 300,
key: 'option',
valueType: 'option',
fixed: 'right',
render: (_, record, action) => [
<>
{
editButton && <Button key='1' type='link' onClick={() => {
setId(record.id)
dispatch({ type: 'openModel/getOpenModal', payload: true })
}}>编辑</Button>
}
</>,
<Button key='2' type='link' onClick={() => {
GetCompanyInfo({ id: record.id }).then(res => {
sessionStorage.setItem('company_info', JSON.stringify(res.data))
history.push({
pathname: '/company/department'
})
}}>查看部门</Button>,
<TableDropdown
key="actionGroup"
menus={[
{
name: '查看职位',
key: '3',
onClick: () => {
GetCompanyInfo({ id: record.id }).then(res => {
sessionStorage.setItem('post_company_info', JSON.stringify(res.data))
history.push({
pathname: '/company/post'
})
})
}}>查看部门</Button>,
<TableDropdown
key="actionGroup"
menus={[
{
name: '查看职位',
key: '3',
onClick: () => {
GetCompanyInfo({ id: record.id }).then(res => {
sessionStorage.setItem('post_company_info', JSON.stringify(res.data))
history.push({
pathname: '/company/post'
})
},
})
},
{
name: '子账号解绑',
key: '4',
onClick: () => {
setId(record.id)
dispatch({ type: 'openModel/getOpenBindModal', payload: true })
},
},
{
name: '子账号解绑',
key: '4',
onClick: () => {
setId(record.id)
dispatch({ type: 'openModel/getOpenBindModal', payload: true })
},
]}
/>,
],
},
]}
rowKey="id"
pagination={{
current: page,
pageSize: pageSize,
showSizeChanger: true,
total: total,
pageSizeOptions: [9, 18, 27, 99],
onChange(page, pageSize) {
setPage(page)
setPageSize(pageSize)
},
onShowSizeChange(current, size) {
setPage(current)
setPageSize(size)
}
}}
request={async (params = {} as Record<string, any>) =>
getCompanyList({
page: page,
pagesize: pageSize,
sort: 'id',
sortby: 'desc',
id: params.id,
keyword: params.full_name,
login_name: params.login_name,
member_type: params.member_type,
member_status: params.member_status,
status: params.status,
}).then(res => {
setList(res.data.list)
setTotal(res.data.total)
})
},
]}
/>,
],
},
]}
rowKey="id"
pagination={{
current: page,
pageSize: pageSize,
showSizeChanger: true,
total: total,
pageSizeOptions: [9, 18, 27, 99],
onChange(page, pageSize) {
setPage(page)
setPageSize(pageSize)
},
onShowSizeChange(current, size) {
setPage(current)
setPageSize(size)
}
headerTitle="企业列表"
toolBarRender={() => [
<Button type="primary" onClick={() => {
message.info('数据导出需要时间,请耐心等待')
PostCompanyExport().then(res => {
let url = Imageprefix + res.data.excel_url;
window.open(url);
message.info('数据导出完毕')
})
}}>
导出数据
</Button>,
<Button type="primary" onClick={() => {
dispatch({ type: 'openModel/getOpenModal', payload: true })
}}>
添加企业
</Button>
]}
/>
}}
request={async (params = {} as Record<string, any>) =>
getCompanyList({
page: page,
pagesize: pageSize,
sort: 'id',
sortby: 'desc',
id: params.id,
keyword: params.full_name,
login_name: params.login_name,
member_type: params.member_type,
member_status: params.member_status,
status: params.status,
}).then(res => {
setList(res.data.list)
setTotal(res.data.total)
})
}
headerTitle="企业列表"
toolBarRender={() => [
<Button type="primary" onClick={() => {
message.info('数据导出需要时间,请耐心等待')
PostCompanyExport().then(res => {
let url = Imageprefix + res.data.excel_url;
window.open(url);
message.info('数据导出完毕')
})
}}>
导出数据
</Button>,
<>
{
addButton && <Button type="primary" onClick={() => {
dispatch({ type: 'openModel/getOpenModal', payload: true })
}}>
添加企业
</Button>
}
</>
]}
/>
</ConfigProvider>
</>
);

+ 38
- 31
src/components/Render/Main/Company/Post/create/index.tsx Näytä tiedosto

@@ -73,7 +73,12 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel,
theme={{
token: {
colorPrimary: '#4FBE70',
}
}, components: {
Segmented: {
itemSelectedBg: '#19be6e',
itemSelectedColor: '#ffffff'
},
},
}}
>
<Modal
@@ -87,31 +92,34 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel,
onCancel={() => {
dispatch({ type: 'openModel/getOpenModal', payload: false })
}}
afterOpenChange={(open) => {
afterOpenChange={async (open) => {
if (open && id) {
PostCompanyJobInfo({ id: id }).then(res => {
formMapRef?.current?.forEach((formInstanceRef) => {
res.data.age_arr = [res.data.age_min, res.data.age_max];
res.data.household_arr = [
res.data.household_province ? res.data.household_province : null,
res.data.household_city ? res.data.household_city : null
];
res.data.location_arr = [
res.data.location_province ? res.data.location_province : null,
res.data.location_city ? res.data.location_city : null,
res.data.location_town ? res.data.location_town : null
];
const gangweizhizeStartIndex = res.data.describe_text.indexOf('<div>岗位职责</div>') + '<div>岗位职责</div>'.length;
const gangweizhizeEndIndex = res.data.describe_text.indexOf('<div>任职要求</div>');
const gangweizhizeContent = res.data.describe_text.substring(gangweizhizeStartIndex, gangweizhizeEndIndex);
const renzhiyaoqiuStartIndex = res.data.describe_text.indexOf('<div>任职要求</div>') + '<div>任职要求</div>'.length;
const renzhiyaoqiuContent = res.data.describe_text.substring(renzhiyaoqiuStartIndex);
res.data.gangweizhize = gangweizhizeContent.trim();
res.data.renzhiyaoqiu = renzhiyaoqiuContent.trim();
formInstanceRef?.current?.setFieldsValue(res.data);
});
setDetail(res.data)
let res = await PostCompanyJobInfo({ id: id })
let res1 = await GetCompanyInfo({ id: res.data.company_id })
sessionStorage.setItem('post_company_info', JSON.stringify(res1.data))
formMapRef?.current?.forEach((formInstanceRef) => {
res.data.age_arr = [res.data.age_min, res.data.age_max];
res.data.household_arr = [
res.data.household_province ? res.data.household_province : null,
res.data.household_city ? res.data.household_city : null
];
res.data.location_arr = [
res.data.location_province ? res.data.location_province : null,
res.data.location_city ? res.data.location_city : null,
res.data.location_town ? res.data.location_town : null
];
const gangweizhizeStartIndex = res.data.describe_text.indexOf('<div>岗位职责</div>') + '<div>岗位职责</div>'.length;
const gangweizhizeEndIndex = res.data.describe_text.indexOf('<div>任职要求</div>');
const gangweizhizeContent = res.data.describe_text.substring(gangweizhizeStartIndex, gangweizhizeEndIndex);
const renzhiyaoqiuStartIndex = res.data.describe_text.indexOf('<div>任职要求</div>') + '<div>任职要求</div>'.length;
const renzhiyaoqiuContent = res.data.describe_text.substring(renzhiyaoqiuStartIndex);
res.data.gangweizhize = gangweizhizeContent.trim();
res.data.renzhiyaoqiu = renzhiyaoqiuContent.trim();
formInstanceRef?.current?.setFieldsValue(res.data);
});
setDetail(res.data)


} else {
formMapRef?.current?.forEach((formInstanceRef) => {
formInstanceRef?.current?.setFieldsValue({
@@ -125,10 +133,10 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel,
latitude: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).latitude : 0,
other_address: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).address : '',
interview_address: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).address : '',
phone_public: 2,
mobile_public: 2,
email_public: 2,
fax_public: 2,
phone_public: 1,
mobile_public: 1,
email_public: 1,
fax_public: 1,
status: 1
});
});
@@ -172,7 +180,7 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel,

if (detail) {
values.id = detail.id;
let res = await PostCompanyJobEdit(values)
message.success('提交成功')
dispatch({ type: 'openModel/getOpenModal', payload: false })
@@ -217,7 +225,6 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel,
placeholder="请选择企业"
fieldProps={{
fieldNames: selectfieldCompanyNames,
defaultValue: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).full_name : null,
disabled: sessionStorage.getItem('post_company_info') ? true : false
}}
rules={[{ required: true, message: '请选择企业' }]}
@@ -245,7 +252,7 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel,
})
}}
request={(keyword) =>
getCompanyList({ page: 1, pagesize: 100, keyword: keyword.keyWords }).then(res => {
getCompanyList({ page: 1, pagesize: 999, keyword: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).full_name : keyword.keyWords }).then(res => {
return res.data.list;
})
}

+ 6
- 1
src/components/Render/Main/Company/Vip/fee/index.tsx Näytä tiedosto

@@ -27,7 +27,12 @@ const PagesMainCompanyPostCreate: React.FC = ({ dispatch, dictModel, openModel,
theme={{
token: {
colorPrimary: '#4FBE70',
}
} , components: {
Segmented: {
itemSelectedBg: '#19be6e',
itemSelectedColor: '#ffffff'
},
},
}}
>


+ 6
- 1
src/components/Render/Main/Feedback/create/index.tsx Näytä tiedosto

@@ -50,7 +50,12 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open
theme={{
token: {
colorPrimary: '#4FBE70',
}
} , components: {
Segmented: {
itemSelectedBg: '#19be6e',
itemSelectedColor: '#ffffff'
},
},
}}
>
<Modal

+ 6
- 1
src/components/Render/Main/Information/Section/create/index.tsx Näytä tiedosto

@@ -37,7 +37,12 @@ const PagesMainInformationSectionCreate: React.FC = ({ dispatch, dictModel, open
theme={{
token: {
colorPrimary: '#4FBE70',
}
} , components: {
Segmented: {
itemSelectedBg: '#19be6e',
itemSelectedColor: '#ffffff'
},
},
}}
>
<Modal

+ 6
- 1
src/components/Render/Main/Jobseeker/List/resume/basic/index.tsx Näytä tiedosto

@@ -53,7 +53,12 @@ const PagesMainJobseekerListResumeBasic: React.FC = ({ dispatch, dictModel, open
theme={{
token: {
colorPrimary: '#4FBE70',
}
} , components: {
Segmented: {
itemSelectedBg: '#19be6e',
itemSelectedColor: '#ffffff'
},
},
}}
>
<ProForm<ResumeType.basic>

+ 10
- 10
src/components/Render/Main/Jobseeker/List/resume/help/recommend/index.tsx Näytä tiedosto

@@ -91,16 +91,16 @@ const PagesMainJobseekerListResumeHelpRecommend: React.FC = ({ dispatch, dictMod
editableKeys,
onSave: async (rowKey, data: ResumeType.intentionPosition, row) => {
console.log(rowKey, data, row)
// data.customer_id = id.customer_id;
// if (rowKey && originList.findIndex(item => item.id === rowKey) !== -1) {
// let res1 = await PostJobapplicantUpdateintro({ id: rowKey, customer_id: data.customer_id, content: data.content})
// message.success('提交成功')
// actionRef.current.reload();
// } else {
// let res1 = await PostJobapplicantAddassistandintro({ customer_id: data.customer_id, intro_content: [data.content]})
// message.success('提交成功')
// actionRef.current.reload();
// }
data.customer_id = id.customer_id;
if (rowKey && originList.findIndex(item => item.id === rowKey) !== -1) {
let res1 = await PostJobapplicantUpdateintro({ id: rowKey, customer_id: data.customer_id, content: data.content})
message.success('提交成功')
actionRef.current.reload();
} else {
let res1 = await PostJobapplicantAddassistandintro({ customer_id: data.customer_id, intro_content: [data.content]})
message.success('提交成功')
actionRef.current.reload();
}
},
onChange: setEditableRowKeys
}}

+ 6
- 2
src/components/Render/Permission/List/create/index.tsx Näytä tiedosto

@@ -34,7 +34,12 @@ const PagesPermissionListCreate: React.FC = ({ dispatch, dictModel, openModel, i
theme={{
token: {
colorPrimary: '#4FBE70',
}
} , components: {
Segmented: {
itemSelectedBg: '#19be6e',
itemSelectedColor: '#ffffff'
},
},
}}
>
<Modal
@@ -153,7 +158,6 @@ const PagesPermissionListCreate: React.FC = ({ dispatch, dictModel, openModel, i
label="描述"
placeholder="请输入描述"
/>

</ProForm>
</Modal>
</ConfigProvider>

+ 123
- 0
src/components/Render/Permission/List/parent/index.tsx Näytä tiedosto

@@ -0,0 +1,123 @@

import { useRef, useState, useEffect } from 'react';
import { connect } from '@umijs/max';
import type { ActionType, ProFormInstance } from '@ant-design/pro-components';
import {
ProFormText,
ProFormSegmented,
ProFormSelect,
ProForm,
FormControlRender,
ProFormCascader,
ProFormSwitch
} from '@ant-design/pro-components';
import { ConfigProvider, Flex, Space, Modal, message, Image, Row, Col, Switch, Form, Typography } from 'antd';
import { addPermission, updatePermission, getPermissionListWithchilds, GetDetailPermission } from '@/apis/api';


const selectfieldNames = { label: 'name', value: 'id' };
const cascaderfieldNames = { label: 'name', value: 'id', children: 'childs' };

export const filterChildPermissionsByType : Function = (permissions : Object[]) => {
return permissions.map(parent => ({
...parent,
childs: parent.childs ? filterOutPermissionsOfCertainType(parent.childs, 1) : undefined,
}));
}

export const filterOutPermissionsOfCertainType : Function = (permissions : Object[], excludeType : number) => {
return permissions.filter(permission => permission.p_type !== excludeType)
.map(child => ({
...child,
childs: child.childs ? filterOutPermissionsOfCertainType(child.childs, excludeType) : undefined,
}));
}
const PagesPermissionListParent: React.FC = ({ dispatch, dictModel, openModel, id }: any) => {
const formRef = useRef<ProFormInstance>();
const [openPreview, setOpenPreview] = useState(false);
const [detail, setDetail] = useState<PermissionType.list | null>(null)

useEffect(() => {
setOpenPreview(openModel.openParentModal)
}, [openModel.openParentModal])


return (
<>
<ConfigProvider
theme={{
token: {
colorPrimary: '#4FBE70',
}, components: {
Segmented: {
itemSelectedBg: '#19be6e',
itemSelectedColor: '#ffffff'
},
},
}}
>
<Modal
open={openPreview}
title="更换父级"
centered
maskClosable={false}
footer={null}
destroyOnClose
width={1000}
onCancel={() => {
dispatch({ type: 'openModel/getOpenParentModal', payload: false })
}}
>
<ProForm<PermissionType.list>
formRef={formRef}
request={async () => {
let res = await GetDetailPermission({ id: id.id })
setDetail(res.data)
return res.data;
}}
submitter={{
searchConfig: {
resetText: '取消',
submitText: '保存',
},
render: (_, dom) => { return <Flex justify='flex-end'> <Space>{dom}</Space></Flex> },
onReset: () => {
setDetail(null)
dispatch({ type: 'openModel/getOpenParentModal', payload: false })
}
}}
onFinish={async (values) => {
console.log(values)
values.id = id.id;
values.parent_id = values.parent_arr && values.parent_arr.length > 0 ? values.parent_arr[values.parent_arr.length - 1] : detail?.parent_id
delete values.parent_arr;
let res = await updatePermission(values)
message.success('提交成功')
dispatch({ type: 'openModel/getOpenParentModal', payload: false })
}}
>
<ProFormCascader
label="父级菜单"
name="parent_arr"
fieldProps={{
fieldNames: cascaderfieldNames,
changeOnSelect: true
}}
request={async () => {
let res = await getPermissionListWithchilds({ page: 1, pagesize: 9999 })
return filterChildPermissionsByType(res.data.permissions)
}}
placeholder="请选择要归属的父级菜单"
/>
</ProForm>
</Modal>
</ConfigProvider>
</>
);
};



export default connect(({ dictModel, openModel }: any) => ({
dictModel, openModel
}))(PagesPermissionListParent);

+ 18
- 7
src/components/Render/Permission/List/table/index.tsx Näytä tiedosto

@@ -4,8 +4,8 @@ import type { ActionType, ProFormInstance } from '@ant-design/pro-components';
import {
ProTable, TableDropdown
} from '@ant-design/pro-components';
import { Button, Image, ConfigProvider, Tag } from 'antd';
import { getPermissionListWithchilds} from '@/apis/api';
import { Button, Image, ConfigProvider, Tag, Modal } from 'antd';
import { getPermissionListWithchilds } from '@/apis/api';
import { Imageprefix } from '@/constants';

const PagesPermissionListTable: React.FC = ({ dispatch, openModel, getId }: any) => {
@@ -19,6 +19,13 @@ const PagesPermissionListTable: React.FC = ({ dispatch, openModel, getId }: any)
getId(id)
}

useEffect(() => {
if (!openModel.openParentModal) {
actionRef.current.reload();
}
}, [openModel.openParentModal])

useEffect(() => {
if (!openModel.openModal) {
actionRef.current.reload();
@@ -67,7 +74,7 @@ const PagesPermissionListTable: React.FC = ({ dispatch, openModel, getId }: any)
{record.p_type == 1 ? <><Tag>权限</Tag></> : <> <Tag color='green'>菜单</Tag></>}
</>
)
},{
}, {
title: '路径',
dataIndex: 'path',
search: false,
@@ -100,7 +107,7 @@ const PagesPermissionListTable: React.FC = ({ dispatch, openModel, getId }: any)
},
{
title: '操作',
width: 300,
width: 400,
key: 'option',
valueType: 'option',
fixed: 'right',
@@ -109,13 +116,17 @@ const PagesPermissionListTable: React.FC = ({ dispatch, openModel, getId }: any)
setId(record)
dispatch({ type: 'openModel/getOpenModal', payload: true })
}}>编辑</Button>,
<Button key='1' type='link' onClick={() => {
<Button key='2' type='link' onClick={() => {
record.nextlevel = record.id // 添加下级栏目,把id赋值给nextlevel
setId(record)
dispatch({ type: 'openModel/getOpenModal', payload: true })
}}>添加下级栏目</Button>,
<Button key='2' type='link' onClick={() => {
<Button key='3' type='link' onClick={() => {
setId(record)
dispatch({ type: 'openModel/getOpenParentModal', payload: true })
}}>更换父级</Button>,
<Button key='4' type='link' onClick={() => {

}}>删除</Button>,
],
},

+ 6
- 1
src/components/Render/Setting/Dictionary/create/index.tsx Näytä tiedosto

@@ -28,7 +28,12 @@ const PagesSettingDictionaryCreate: React.FC = ({ dispatch, dictModel, openModel
theme={{
token: {
colorPrimary: '#4FBE70',
}
} , components: {
Segmented: {
itemSelectedBg: '#19be6e',
itemSelectedColor: '#ffffff'
},
},
}}
>
<Modal

+ 2
- 2
src/components/Render/Setting/System/create/index.tsx Näytä tiedosto

@@ -11,7 +11,7 @@ import {
ProFormDependency
} from '@ant-design/pro-components';
import { ConfigProvider, Flex, Space, Modal, message, Image, Row, Col, Switch, Form, Typography } from 'antd';
import { PostSysconfigAdd, PostSysconfigUpdate, GetSysconfigDetail } from '@/apis/api';
import { PostSysconfigAdd, PostSysconfigUpdate, GetSysconfigDetail } from '@/apis/api';
import RichComponent from '@/components/Common/rich';

const PagesSettingSystemCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => {
@@ -37,7 +37,7 @@ const PagesSettingSystemCreate: React.FC = ({ dispatch, dictModel, openModel, id
itemSelectedBg: '#19be6e',
itemSelectedColor: '#ffffff'
},
},
},
}}
>
<Modal

+ 19
- 1
src/models/openModel.ts Näytä tiedosto

@@ -20,7 +20,7 @@ export default {
openFeeModal: false, // vip变更费用开关
openFairDetailModal: false, // 预览招聘会
openBindModal: false, // 预览招聘会
openParentModal: false, // 更换父级的开关

},
reducers: {
@@ -78,6 +78,12 @@ export default {
openBindModal: payload
}
},
setOpenParentModal(state: any, { payload }: any) {
return {
...state,
openParentModal: payload
}
},
setEditRegister(state: any, { payload }: any) {
if (state.editRegisterKey && state.editRegisterKey !== payload.key) {
@@ -228,6 +234,18 @@ export default {
console.log(error)
}
},
*getOpenParentModal({ payload }: any, { put }: any): any {
try {
yield put({
type: 'setOpenParentModal',
payload: payload
})
} catch (error) {
console.log(error)
}
},

*getEditRegister({ payload }: any, { put }: any): any {
try {

+ 2
- 1
src/pages/Login/index.tsx Näytä tiedosto

@@ -5,7 +5,7 @@ import { LockOutlined, UserOutlined, FileImageOutlined, } from '@ant-design/icon
import { LoginForm, ProFormCaptcha, ProForm, ProFormText, ProFormDependency, } from '@ant-design/pro-components';
import { message, Row, Col, Image, ConfigProvider } from 'antd';
import type { CSSProperties } from 'react';
import { Login, PostSmsSend, GetCaptcha, GetUserMenulist } from '@/apis/api';
import { Login, PostSmsSend, GetCaptcha, GetUserMenulist , getRoleGetpermissionids} from '@/apis/api';
const contentStyle: CSSProperties = {
display: 'flex',
alignItems: 'center',
@@ -75,6 +75,7 @@ export default () => {
...s,
permissions: permissions,
}));
sessionStorage.setItem('role', res.data.rolename)
history.push('/');
} catch (error) {
captRef.current.resetFields();

+ 5
- 0
src/pages/Permission/List/index.tsx Näytä tiedosto

@@ -3,6 +3,8 @@ import { connect } from '@umijs/max';
import { ConfigProvider } from 'antd';
import PagesPermissionListTable from '@/components/Render/Permission/List/table'
import PagesPermissionListCreate from '@/components/Render/Permission/List/create'
import PagesPermissionListParent from '@/components/Render/Permission/List/parent'


const PermissionListPage: React.FC = ({ dispatch, openModel }: any) => {
const [id, setId] = useState<number>(0);
@@ -27,6 +29,9 @@ const PermissionListPage: React.FC = ({ dispatch, openModel }: any) => {
>
<PagesPermissionListTable getId={getId}></PagesPermissionListTable>
<PagesPermissionListCreate id={id}></PagesPermissionListCreate>
<PagesPermissionListParent id={id}></PagesPermissionListParent>
</ConfigProvider>
</>
);

+ 5
- 0
src/utils/dataHelper.ts Näytä tiedosto

@@ -0,0 +1,5 @@
export const findId = (array: [], id: number) => {
let result = false;
result = array.includes(id);
return result;
}

+ 0
- 4
src/utils/env.ts Näytä tiedosto

@@ -1,4 +0,0 @@
export const isProduction = process.env.BUILD_ENV === 'production';
export const isDevelopment = process.env.BUILD_ENV === 'development';
console.log('process.env.BUILD_ENV', process.env.BUILD_ENV);
export const Imageprefix = isProduction ? 'https://rcsc-test.jcjob.cn/img/' : 'https://admin1.jcjob.cn/img/';

Loading…
Peruuta
Tallenna