| @@ -0,0 +1 @@ | |||
| NODE_ENV = 'development' | |||
| @@ -0,0 +1 @@ | |||
| NODE_ENV = 'production' | |||
| @@ -1,173 +1,205 @@ | |||
| export default [ | |||
| { path: '/login', component: './Login', layout: false, access: 'login' }, | |||
| { | |||
| path: '/', | |||
| redirect: '/main/company/list', | |||
| { path: '/login', component: './Login', layout: false, access: 'login' }, | |||
| { | |||
| path: '/', | |||
| redirect: '/company/list', | |||
| }, | |||
| { | |||
| path: '/login', | |||
| component: './Login', | |||
| layout: false | |||
| }, | |||
| { | |||
| name: '企业管理', | |||
| access: 'company', | |||
| path: '/company', | |||
| routes: [ | |||
| { | |||
| name: '企业列表', | |||
| path: '/company/list', | |||
| component: './Company/List', | |||
| access: 'member', | |||
| }, | |||
| { | |||
| name: 'VIP列表', | |||
| path: '/company/vip', | |||
| component: './Company/Vip', | |||
| access: 'vip', | |||
| }, | |||
| { | |||
| name: '部门管理', | |||
| path: '/company/department', | |||
| component: './Company/Department', | |||
| access: 'department', | |||
| }, | |||
| { | |||
| name: '职位管理', | |||
| path: '/company/post', | |||
| component: './Company/Post', | |||
| access: 'job', | |||
| } | |||
| ] | |||
| }, | |||
| { | |||
| name: '求职者管理', | |||
| access: 'jobSeeker', | |||
| path: '/jobseeker', | |||
| routes: [ | |||
| { | |||
| name: '简历列表', | |||
| path: '/jobseeker/list', | |||
| component: './Jobseeker/List', | |||
| access: 'jobResume', | |||
| }, | |||
| { | |||
| name: '求职者账号列表', | |||
| path: '/jobseeker/account', | |||
| component: './Jobseeker/Account', | |||
| access: 'customerList', | |||
| } | |||
| ] | |||
| }, | |||
| { | |||
| name: '招聘会管理', | |||
| access: 'jobFair', | |||
| path: '/fair', | |||
| routes: [ | |||
| { | |||
| name: '招聘会列表', | |||
| path: '/fair/list', | |||
| component: './Fair/List', | |||
| access: 'jobFairList', | |||
| }, | |||
| // { | |||
| // name: '参与企业列表', | |||
| // path: '/fair/company', | |||
| // component: './Fair/Company', | |||
| // access: 'jobFairCompany', | |||
| // } | |||
| ] | |||
| }, | |||
| { | |||
| name: '新闻资讯', | |||
| access: 'information', | |||
| path: '/information', | |||
| routes: [ | |||
| { | |||
| name: '栏目/频道', | |||
| path: '/information/section', | |||
| component: './Information/Section', | |||
| access: 'section', | |||
| }, | |||
| { | |||
| name: '文章列表', | |||
| path: '/information/article', | |||
| component: './Information/Article', | |||
| access: 'article', | |||
| } | |||
| ] | |||
| }, | |||
| { | |||
| name: '广告/活动管理', | |||
| access: 'advertisement', | |||
| path: '/advertisement', | |||
| routes: [ | |||
| { | |||
| name: '广告/活动列表', | |||
| path: '/advertisement/list', | |||
| component: './Advertisement/List', | |||
| access: 'advertisementList', | |||
| }, | |||
| { | |||
| path: '/login', | |||
| component: './Login', | |||
| layout: false | |||
| name: '广告/活动投放', | |||
| path: '/advertisement/putin', | |||
| component: './Advertisement/Putin', | |||
| access: 'putIn', | |||
| } | |||
| ] | |||
| }, | |||
| { | |||
| name: '账号权限', | |||
| path: '/permission', | |||
| access: 'permission', | |||
| routes: [ | |||
| { | |||
| name: '权限管理', | |||
| path: '/permission/list', | |||
| component: './Permission/List', | |||
| access: 'list', | |||
| }, | |||
| // 总控路由 | |||
| { | |||
| name: '基础管理', | |||
| path: '/main', | |||
| routes: [ | |||
| { | |||
| name: '企业管理', | |||
| routes: [ | |||
| { | |||
| name: '企业列表', | |||
| path: '/main/company/list', | |||
| component: './Main/Company/List', | |||
| }, | |||
| { | |||
| name: 'VIP列表', | |||
| path: '/main/company/vip', | |||
| component: './Main/Company/Vip', | |||
| }, | |||
| { | |||
| name: '部门管理', | |||
| path: '/main/company/department', | |||
| component: './Main/Company/Department', | |||
| }, | |||
| { | |||
| name: '职位管理', | |||
| path: '/main/company/post', | |||
| component: './Main/Company/Post', | |||
| } | |||
| ] | |||
| }, | |||
| { | |||
| name: '求职者管理', | |||
| routes: [ | |||
| { | |||
| name: '简历列表', | |||
| path: '/main/jobseeker/list', | |||
| component: './Main/Jobseeker/List', | |||
| }, | |||
| { | |||
| name: '求职者账号列表', | |||
| path: '/main/jobseeker/account', | |||
| component: './Main/Jobseeker/Account', | |||
| } | |||
| ] | |||
| }, | |||
| { | |||
| name: '招聘会管理', | |||
| routes: [ | |||
| { | |||
| name: '招聘会列表', | |||
| path: '/main/fair/list', | |||
| component: './Main/Fair/List', | |||
| }, | |||
| { | |||
| name: '参与企业列表', | |||
| path: '/main/fair/company', | |||
| component: './Main/Fair/Company', | |||
| } | |||
| ] | |||
| }, | |||
| { | |||
| name: '新闻资讯', | |||
| routes: [ | |||
| { | |||
| name: '栏目/频道', | |||
| path: '/main/information/section', | |||
| component: './Main/Information/Section', | |||
| }, | |||
| { | |||
| name: '文章列表', | |||
| path: '/main/information/article', | |||
| component: './Main/Information/Article', | |||
| } | |||
| ] | |||
| }, | |||
| { | |||
| name: '广告/活动管理', | |||
| routes: [ | |||
| { | |||
| name: '广告/活动列表', | |||
| path: '/main/advertisement/list', | |||
| component: './Main/Advertisement/List', | |||
| }, | |||
| { | |||
| name: '广告/活动投放', | |||
| path: '/main/advertisement/putin', | |||
| component: './Main/Advertisement/Putin', | |||
| } | |||
| ] | |||
| } , | |||
| { | |||
| name: '反馈管理', | |||
| path: '/main/feedback/list', | |||
| component: './Main/Feedback', | |||
| }, | |||
| ] | |||
| { | |||
| name: '角色管理', | |||
| path: '/permission/role', | |||
| component: './Permission/Role', | |||
| access: 'role', | |||
| }, | |||
| { | |||
| name: '账号权限', | |||
| path: '/permission', | |||
| routes: [ | |||
| { | |||
| name: '权限管理', | |||
| path: '/permission/list', | |||
| component: './Permission/List', | |||
| }, | |||
| { | |||
| name: '角色管理', | |||
| path: '/permission/role', | |||
| component: './Permission/Role' | |||
| }, | |||
| { | |||
| name: '账号管理', | |||
| path: '/permission/account', | |||
| component: './Permission/Account', | |||
| } | |||
| ] | |||
| name: '账号管理', | |||
| path: '/permission/account', | |||
| component: './Permission/Account', | |||
| access: 'account', | |||
| } | |||
| ] | |||
| }, | |||
| { | |||
| name: '系统管理', | |||
| path: '/setting', | |||
| routes: [ | |||
| { | |||
| name: '系统设置', | |||
| path: '/setting/system', | |||
| component: './Setting/System', | |||
| access: 'other', | |||
| }, | |||
| { | |||
| name: '系统管理', | |||
| path: '/setting', | |||
| routes: [ | |||
| { | |||
| name: '系统设置', | |||
| path: '/setting/system', | |||
| component: './Setting/System', | |||
| }, | |||
| { | |||
| name: '字典设置', | |||
| path: '/setting/dictionary', | |||
| component: './Setting/Dictionary' | |||
| }, | |||
| { | |||
| name: '分词器', | |||
| path: '/setting/other', | |||
| component: './Setting/Other', | |||
| } | |||
| ] | |||
| name: '字典设置', | |||
| path: '/setting/dictionary', | |||
| component: './Setting/Dictionary', | |||
| access: 'dictionaryList', | |||
| }, | |||
| { | |||
| name: '统计管理', | |||
| path: '/setting', | |||
| routes: [ | |||
| { | |||
| name: '系统设置', | |||
| path: '/setting/system', | |||
| component: './Setting/System', | |||
| }, | |||
| { | |||
| name: '字典设置', | |||
| path: '/setting/dictionary', | |||
| component: './Setting/Dictionary' | |||
| }, | |||
| { | |||
| name: '分词器', | |||
| path: '/setting/other', | |||
| component: './Setting/Other', | |||
| } | |||
| ] | |||
| name: '分词器', | |||
| path: '/setting/other', | |||
| component: './Setting/Other', | |||
| access: 'otherTokenizer', | |||
| } | |||
| ] | |||
| }, | |||
| { | |||
| name: '反馈管理', | |||
| path: '/feedback/list', | |||
| component: './Feedback', | |||
| access: 'feedback', | |||
| }, | |||
| // { | |||
| // name: '统计管理', | |||
| // path: '/setting', | |||
| // routes: [ | |||
| // { | |||
| // name: '系统设置', | |||
| // path: '/setting/system', | |||
| // component: './Setting/System', | |||
| // }, | |||
| // { | |||
| // name: '字典设置', | |||
| // path: '/setting/dictionary', | |||
| // component: './Setting/Dictionary' | |||
| // }, | |||
| // { | |||
| // name: '分词器', | |||
| // path: '/setting/other', | |||
| // component: './Setting/Other', | |||
| // } | |||
| // ] | |||
| // } | |||
| ] | |||
| @@ -0,0 +1,14 @@ | |||
| npm run build:env | |||
| msg=$1 | |||
| ciskip="[CI SKIP]" | |||
| if [[ $msg =~ deploy ]]; then | |||
| echo "此次提交将会部署,请查看drone日志。" | |||
| else | |||
| echo "此次提交不部署" | |||
| $msg="$msg$ciskip" | |||
| fi | |||
| git add . | |||
| git commit -a -m "$msg" | |||
| git push | |||
| @@ -13,6 +13,7 @@ | |||
| "dayjs": "^1.11.12", | |||
| "docx": "^8.5.0", | |||
| "file-saver": "^2.0.5", | |||
| "he": "^1.2.0", | |||
| "html-docx-js": "^0.3.1", | |||
| "html-docx-js-typescript": "^0.1.5", | |||
| "react-quill": "^2.0.0" | |||
| @@ -2,7 +2,8 @@ | |||
| "private": true, | |||
| "author": "Soleilw <a617759082@126.com>", | |||
| "scripts": { | |||
| "build": "max build", | |||
| "build": "max build --mode production", | |||
| "build:env": "max build --mode development", | |||
| "dev": "max dev", | |||
| "format": "prettier --cache --write .", | |||
| "postinstall": "max setup", | |||
| @@ -18,6 +19,7 @@ | |||
| "dayjs": "^1.11.12", | |||
| "docx": "^8.5.0", | |||
| "file-saver": "^2.0.5", | |||
| "he": "^1.2.0", | |||
| "html-docx-js": "^0.3.1", | |||
| "html-docx-js-typescript": "^0.1.5", | |||
| "react-quill": "^2.0.0" | |||
| @@ -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":"/main/company/list","parentId":"ant-design-pro-layout","id":"2"},"3":{"path":"/login","layout":false,"id":"3"},"4":{"name":"基础管理","path":"/main","parentId":"ant-design-pro-layout","id":"4"},"5":{"name":"企业管理","parentId":"4","id":"5"},"6":{"name":"企业列表","path":"/main/company/list","parentId":"5","id":"6"},"7":{"name":"VIP列表","path":"/main/company/vip","parentId":"5","id":"7"},"8":{"name":"部门管理","path":"/main/company/department","parentId":"5","id":"8"},"9":{"name":"职位管理","path":"/main/company/post","parentId":"5","id":"9"},"10":{"name":"求职者管理","parentId":"4","id":"10"},"11":{"name":"简历列表","path":"/main/jobseeker/list","parentId":"10","id":"11"},"12":{"name":"求职者账号列表","path":"/main/jobseeker/account","parentId":"10","id":"12"},"13":{"name":"招聘会管理","parentId":"4","id":"13"},"14":{"name":"招聘会列表","path":"/main/fair/list","parentId":"13","id":"14"},"15":{"name":"参与企业列表","path":"/main/fair/company","parentId":"13","id":"15"},"16":{"name":"新闻资讯","parentId":"4","id":"16"},"17":{"name":"栏目/频道","path":"/main/information/section","parentId":"16","id":"17"},"18":{"name":"文章列表","path":"/main/information/article","parentId":"16","id":"18"},"19":{"name":"广告/活动管理","parentId":"4","id":"19"},"20":{"name":"广告/活动列表","path":"/main/advertisement/list","parentId":"19","id":"20"},"21":{"name":"广告/活动投放","path":"/main/advertisement/putin","parentId":"19","id":"21"},"22":{"name":"反馈管理","path":"/main/feedback/list","parentId":"4","id":"22"},"23":{"name":"账号权限","path":"/permission","parentId":"ant-design-pro-layout","id":"23"},"24":{"name":"权限管理","path":"/permission/list","parentId":"23","id":"24"},"25":{"name":"角色管理","path":"/permission/role","parentId":"23","id":"25"},"26":{"name":"账号管理","path":"/permission/account","parentId":"23","id":"26"},"27":{"name":"系统管理","path":"/setting","parentId":"ant-design-pro-layout","id":"27"},"28":{"name":"系统设置","path":"/setting/system","parentId":"27","id":"28"},"29":{"name":"字典设置","path":"/setting/dictionary","parentId":"27","id":"29"},"30":{"name":"分词器","path":"/setting/other","parentId":"27","id":"30"},"31":{"name":"统计管理","path":"/setting","parentId":"ant-design-pro-layout","id":"31"},"32":{"name":"系统设置","path":"/setting/system","parentId":"31","id":"32"},"33":{"name":"字典设置","path":"/setting/dictionary","parentId":"31","id":"33"},"34":{"name":"分词器","path":"/setting/other","parentId":"31","id":"34"},"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":"账号权限","path":"/permission","access":"permission","parentId":"ant-design-pro-layout","id":"20"},"21":{"name":"权限管理","path":"/permission/list","access":"list","parentId":"20","id":"21"},"22":{"name":"角色管理","path":"/permission/role","access":"role","parentId":"20","id":"22"},"23":{"name":"账号管理","path":"/permission/account","access":"account","parentId":"20","id":"23"},"24":{"name":"系统管理","path":"/setting","parentId":"ant-design-pro-layout","id":"24"},"25":{"name":"系统设置","path":"/setting/system","access":"other","parentId":"24","id":"25"},"26":{"name":"字典设置","path":"/setting/dictionary","access":"dictionaryList","parentId":"24","id":"26"},"27":{"name":"分词器","path":"/setting/other","access":"otherTokenizer","parentId":"24","id":"27"},"28":{"name":"反馈管理","path":"/feedback/list","access":"feedback","parentId":"ant-design-pro-layout","id":"28"},"ant-design-pro-layout":{"id":"ant-design-pro-layout","path":"/","isLayout":true}} as const; | |||
| return { | |||
| routes, | |||
| routeComponents: { | |||
| @@ -12,36 +12,30 @@ export async function getRoutes() { | |||
| '2': React.lazy(() => import('./EmptyRoute')), | |||
| '3': React.lazy(() => import(/* webpackChunkName: "p__Login__index" */'@/pages/Login/index.tsx')), | |||
| '4': React.lazy(() => import('./EmptyRoute')), | |||
| '5': React.lazy(() => import('./EmptyRoute')), | |||
| '6': React.lazy(() => import(/* webpackChunkName: "p__Main__Company__List__index" */'@/pages/Main/Company/List/index.tsx')), | |||
| '7': React.lazy(() => import(/* webpackChunkName: "p__Main__Company__Vip__index" */'@/pages/Main/Company/Vip/index.tsx')), | |||
| '8': React.lazy(() => import(/* webpackChunkName: "p__Main__Company__Department__index" */'@/pages/Main/Company/Department/index.tsx')), | |||
| '9': React.lazy(() => import(/* webpackChunkName: "p__Main__Company__Post__index" */'@/pages/Main/Company/Post/index.tsx')), | |||
| '10': React.lazy(() => import('./EmptyRoute')), | |||
| '11': React.lazy(() => import(/* webpackChunkName: "p__Main__Jobseeker__List__index" */'@/pages/Main/Jobseeker/List/index.tsx')), | |||
| '12': React.lazy(() => import(/* webpackChunkName: "p__Main__Jobseeker__Account__index" */'@/pages/Main/Jobseeker/Account/index.tsx')), | |||
| '13': React.lazy(() => import('./EmptyRoute')), | |||
| '14': React.lazy(() => import(/* webpackChunkName: "p__Main__Fair__List__index" */'@/pages/Main/Fair/List/index.tsx')), | |||
| '15': React.lazy(() => import(/* webpackChunkName: "p__Main__Fair__Company__index" */'@/pages/Main/Fair/Company/index.tsx')), | |||
| '16': React.lazy(() => import('./EmptyRoute')), | |||
| '17': React.lazy(() => import(/* webpackChunkName: "p__Main__Information__Section__index" */'@/pages/Main/Information/Section/index.tsx')), | |||
| '18': React.lazy(() => import(/* webpackChunkName: "p__Main__Information__Article__index" */'@/pages/Main/Information/Article/index.tsx')), | |||
| '19': React.lazy(() => import('./EmptyRoute')), | |||
| '20': React.lazy(() => import(/* webpackChunkName: "p__Main__Advertisement__List__index" */'@/pages/Main/Advertisement/List/index.tsx')), | |||
| '21': React.lazy(() => import(/* webpackChunkName: "p__Main__Advertisement__Putin__index" */'@/pages/Main/Advertisement/Putin/index.tsx')), | |||
| '22': React.lazy(() => import(/* webpackChunkName: "p__Main__Feedback__index" */'@/pages/Main/Feedback/index.tsx')), | |||
| '23': React.lazy(() => import('./EmptyRoute')), | |||
| '24': React.lazy(() => import(/* webpackChunkName: "p__Permission__List__index" */'@/pages/Permission/List/index.tsx')), | |||
| '25': React.lazy(() => import(/* webpackChunkName: "p__Permission__Role__index" */'@/pages/Permission/Role/index.tsx')), | |||
| '26': React.lazy(() => import(/* webpackChunkName: "p__Permission__Account__index" */'@/pages/Permission/Account/index.tsx')), | |||
| '27': React.lazy(() => import('./EmptyRoute')), | |||
| '28': React.lazy(() => import(/* webpackChunkName: "p__Setting__System__index" */'@/pages/Setting/System/index.tsx')), | |||
| '29': React.lazy(() => import(/* webpackChunkName: "p__Setting__Dictionary__index" */'@/pages/Setting/Dictionary/index.tsx')), | |||
| '30': React.lazy(() => import(/* webpackChunkName: "p__Setting__Other__index" */'@/pages/Setting/Other/index.tsx')), | |||
| '31': React.lazy(() => import('./EmptyRoute')), | |||
| '32': React.lazy(() => import(/* webpackChunkName: "p__Setting__System__index" */'@/pages/Setting/System/index.tsx')), | |||
| '33': React.lazy(() => import(/* webpackChunkName: "p__Setting__Dictionary__index" */'@/pages/Setting/Dictionary/index.tsx')), | |||
| '34': React.lazy(() => import(/* webpackChunkName: "p__Setting__Other__index" */'@/pages/Setting/Other/index.tsx')), | |||
| '5': React.lazy(() => import(/* webpackChunkName: "p__Company__List__index" */'@/pages/Company/List/index.tsx')), | |||
| '6': React.lazy(() => import(/* webpackChunkName: "p__Company__Vip__index" */'@/pages/Company/Vip/index.tsx')), | |||
| '7': React.lazy(() => import(/* webpackChunkName: "p__Company__Department__index" */'@/pages/Company/Department/index.tsx')), | |||
| '8': React.lazy(() => import(/* webpackChunkName: "p__Company__Post__index" */'@/pages/Company/Post/index.tsx')), | |||
| '9': React.lazy(() => import('./EmptyRoute')), | |||
| '10': React.lazy(() => import(/* webpackChunkName: "p__Jobseeker__List__index" */'@/pages/Jobseeker/List/index.tsx')), | |||
| '11': React.lazy(() => import(/* webpackChunkName: "p__Jobseeker__Account__index" */'@/pages/Jobseeker/Account/index.tsx')), | |||
| '12': React.lazy(() => import('./EmptyRoute')), | |||
| '13': React.lazy(() => import(/* webpackChunkName: "p__Fair__List__index" */'@/pages/Fair/List/index.tsx')), | |||
| '14': React.lazy(() => import('./EmptyRoute')), | |||
| '15': React.lazy(() => import(/* webpackChunkName: "p__Information__Section__index" */'@/pages/Information/Section/index.tsx')), | |||
| '16': React.lazy(() => import(/* webpackChunkName: "p__Information__Article__index" */'@/pages/Information/Article/index.tsx')), | |||
| '17': React.lazy(() => import('./EmptyRoute')), | |||
| '18': React.lazy(() => import(/* webpackChunkName: "p__Advertisement__List__index" */'@/pages/Advertisement/List/index.tsx')), | |||
| '19': React.lazy(() => import(/* webpackChunkName: "p__Advertisement__Putin__index" */'@/pages/Advertisement/Putin/index.tsx')), | |||
| '20': React.lazy(() => import('./EmptyRoute')), | |||
| '21': React.lazy(() => import(/* webpackChunkName: "p__Permission__List__index" */'@/pages/Permission/List/index.tsx')), | |||
| '22': React.lazy(() => import(/* webpackChunkName: "p__Permission__Role__index" */'@/pages/Permission/Role/index.tsx')), | |||
| '23': React.lazy(() => import(/* webpackChunkName: "p__Permission__Account__index" */'@/pages/Permission/Account/index.tsx')), | |||
| '24': React.lazy(() => import('./EmptyRoute')), | |||
| '25': React.lazy(() => import(/* webpackChunkName: "p__Setting__System__index" */'@/pages/Setting/System/index.tsx')), | |||
| '26': React.lazy(() => import(/* webpackChunkName: "p__Setting__Dictionary__index" */'@/pages/Setting/Dictionary/index.tsx')), | |||
| '27': React.lazy(() => import(/* webpackChunkName: "p__Setting__Other__index" */'@/pages/Setting/Other/index.tsx')), | |||
| '28': React.lazy(() => import(/* webpackChunkName: "p__Feedback__index" */'@/pages/Feedback/index.tsx')), | |||
| 'ant-design-pro-layout': React.lazy(() => import(/* webpackChunkName: "umi__plugin-layout__Layout" */'E:/项目/outpackage/rencaishichanghoutai/src/.umi/plugin-layout/Layout.tsx')), | |||
| }, | |||
| }; | |||
| @@ -1,10 +1,44 @@ | |||
| export default (initialState: API.UserInfo) => { | |||
| // 在这里按照初始化数据定义项目中的权限,统一管理 | |||
| // 参考文档 https://umijs.org/docs/max/access | |||
| const canSeeAdmin = !!( | |||
| initialState && initialState.name !== 'dontHaveAccess' | |||
| ); | |||
| import routes from '../config/routes' | |||
| export default (initialState) => { | |||
| console.log(routes); | |||
| console.log(initialState.permissions); | |||
| console.log(initialState); | |||
| const filterRoutes = (routes, actions): RouteConfig[] => { | |||
| return routes.filter(route => { | |||
| if (route.access && !actions.includes(route.access)) { | |||
| return false; | |||
| } | |||
| if (route.routes) { | |||
| route.routes = filterRoutes(route.routes, actions); | |||
| } | |||
| return true; | |||
| }); | |||
| }; | |||
| const convertRoutesToAccessObject = (routes: RouteConfig[]): Record<string, boolean> => { | |||
| const accessObject: Record<string, boolean> = {}; | |||
| const convertRoute = (route: RouteConfig) => { | |||
| if (route.access) { | |||
| accessObject[route.access] = true; | |||
| } | |||
| if (route.routes) { | |||
| route.routes.forEach(convertRoute); | |||
| } | |||
| }; | |||
| routes.forEach(convertRoute); | |||
| return accessObject; | |||
| }; | |||
| let accessObject = convertRoutesToAccessObject(filterRoutes(routes, initialState.permissions)); | |||
| return { | |||
| canSeeAdmin, | |||
| ...accessObject | |||
| }; | |||
| }; | |||
| @@ -11,6 +11,8 @@ export const PostRoleAdd = PostModel(url.RoleAdd); | |||
| export const PostRoleDel = PostModel(url.RoleDel); | |||
| export const PostRoleEdit = PostModel(url.RoleEdit); | |||
| export const GetRoleList = GetModel(url.RoleList); | |||
| export const GetRoleDetail = GetModel(url.RoleDetail); | |||
| export const PostRoleAddpermission = PostModel(url.RoleAddpermission); | |||
| export const getRoleGetpermissions = GetModel(url.RoleGetpermissions); | |||
| export const PostRoleDelpermission = PostModel(url.RoleDelpermission); | |||
| @@ -20,12 +22,14 @@ export const PostRoleSavepermissions = PostModel(url.RoleSavepermissions); | |||
| export const addPermission = PostModel(url.permissionAdd); | |||
| export const getPermission = GetModel(url.permissionList); | |||
| export const updatePermission = PostModel(url.permissionUpdate); | |||
| export const GetDetailPermission = GetModel(url.permissionDetail); | |||
| export const getPermissionListWithchilds = GetModel(url.permissionListWithchilds); | |||
| // 账号 | |||
| export const addAccount = PostModel(url.accountAdd); | |||
| export const getAccount = GetModel(url.accountList); | |||
| export const updateAccount = PostModel(url.accountUpdate); | |||
| export const getUserDetail = GetModel(url.UserDetail); | |||
| // 企业 | |||
| export const addCompany = PostModel(url.companyAdd); | |||
| @@ -40,6 +44,7 @@ export const GetCompanyInfo = GetModel(url.companyInfo); | |||
| export const GetCompanyVipInfo = GetModel(url.companyVipInfo); | |||
| export const PostCompanyMultiClose = PostModel(url.companyMultiClose); | |||
| export const PostCompanyMultiOpen = PostModel(url.companyMultiOpen); | |||
| export const PostCompanyFeechange = PostModel(url.companyFeechange); | |||
| export const PostCompanyEdit = PostModel(url.companyEdit); | |||
| export const PostCompanyViplist = GetModel(url.companyViplist); | |||
| @@ -175,12 +180,19 @@ export const PostJobapplicantDeldesirearea = PostModel(url.JobapplicantDeldesire | |||
| export const PostJobapplicantUpdatedesirearea = PostModel(url.JobapplicantUpdatedesirearea); | |||
| export const PostJobapplicantListdesirearea = GetModel(url.JobapplicantListdesirearea); | |||
| export const PostJobapplicantDesireareadetail = GetModel(url.JobapplicantDesireareadetail); | |||
| // 求职意向-职位 | |||
| // 求职意向-行业 | |||
| export const PostJobapplicantAdddesireindustry = PostModel(url.JobapplicantAdddesireindustry); | |||
| export const PostJobapplicantDeldesireindustry = PostModel(url.JobapplicantDeldesireindustry); | |||
| export const PostJobapplicantUpdatedesireindustry = PostModel(url.JobapplicantUpdatedesireindustry); | |||
| export const PostJobapplicantListdesireindustry = GetModel(url.JobapplicantListdesireindustry); | |||
| export const PostJobapplicantDesireindustrydetail = GetModel(url.JobapplicantDesireindustrydetail); | |||
| // 求职意向-职位 | |||
| export const PostJobapplicantAdddesireposition = PostModel(url.JobapplicantAdddesireposition); | |||
| export const PostJobapplicantDeldesireposition = PostModel(url.JobapplicantDeldesireposition); | |||
| export const PostJobapplicantUpdatedesireposition = PostModel(url.JobapplicantUpdatedesireposition); | |||
| export const PostJobapplicantListdesireposition = GetModel(url.JobapplicantListdesireposition); | |||
| export const PostJobapplicantDesirepositiondetail = GetModel(url.JobapplicantDesirepositiondetail); | |||
| // 工作经历 | |||
| export const PostJobapplicantAddexperience = PostModel(url.JobapplicantAddexperience); | |||
| export const PostJobapplicantDelexperience = PostModel(url.JobapplicantDelexperience); | |||
| @@ -193,8 +205,16 @@ export const PostJobapplicantDelcertificate = PostModel(url.JobapplicantDelcerti | |||
| export const PostJobapplicantUpdatecertificate = PostModel(url.JobapplicantUpdatecertificate); | |||
| export const PostJobapplicantListcertificate = GetModel(url.JobapplicantListcertificate); | |||
| export const PostJobapplicantCertificatedetail = GetModel(url.JobapplicantCertificatedetail); | |||
| // 介绍工作、帮扶情况 | |||
| export const PostJobapplicantAddassistandintro = PostModel(url.JobapplicantAddassistandintro); | |||
| export const GetJobapplicantListassist = GetModel(url.JobapplicantListassist); | |||
| export const GetJobapplicantAssistdetail = GetModel(url.JobapplicantAssistdetail); | |||
| export const PostJobapplicantUpdateassist = PostModel(url.JobapplicantUpdateassist); | |||
| export const PostJobapplicantDelassist = PostModel(url.JobapplicantDelassist); | |||
| export const GetJobapplicantListintro = GetModel(url.JobapplicantListintro); | |||
| export const GetJobapplicantIntrodetail = GetModel(url.JobapplicantIntrodetail); | |||
| export const PostJobapplicantUpdateintro = PostModel(url.JobapplicantUpdateintro); | |||
| export const PostJobapplicantDelintro = PostModel(url.JobapplicantDelintro); | |||
| export const PostJobapplicantAddintroduction = PostModel(url.JobapplicantAddintroduction); // 个人介绍 | |||
| export const PostJobapplicantDelintroduction = PostModel(url.JobapplicantDelintroduction); // 个人介绍 | |||
| @@ -254,4 +274,11 @@ export const PostDictAdd = PostModel(url.DictAdd); | |||
| export const PostDictDel = PostModel(url.DictDel); | |||
| export const PostDictUpdate = PostModel(url.DictUpdate); | |||
| export const GetDictList = GetModel(url.DictList); | |||
| export const GetDictDetail = GetModel(url.DictDetail); | |||
| export const GetDictDetail = GetModel(url.DictDetail); | |||
| // 导出数据 | |||
| export const PostCompanyExport = PostModel(url.CompanyExport); | |||
| export const PostJobseekerExport = PostModel(url.JobseekerExport); | |||
| export const PostJobExport = PostModel(url.JobExport); | |||
| @@ -32,6 +32,9 @@ declare namespace CompanyType { | |||
| // 其他参数 | |||
| location_arr ?: number[] | |||
| industry_arr ?: number[] | |||
| nature_arr ?: number[] | |||
| scale_arr ?: number[] | |||
| } | |||
| type Vip = { | |||
| @@ -48,6 +51,12 @@ declare namespace CompanyType { | |||
| dateRange ?: number[] | |||
| } | |||
| type fee = { | |||
| id ?: Number, | |||
| fee ?: Number, | |||
| change_type ?: Number, | |||
| remark ?: String, | |||
| } | |||
| type Department = { | |||
| id ?: Number, | |||
| name?: String, | |||
| @@ -59,13 +68,16 @@ declare namespace CompanyType { | |||
| } | |||
| type Job = { | |||
| urgent?: number, | |||
| id ?: number, | |||
| urgent?: number, | |||
| department_id?: number, | |||
| name?: string, | |||
| invite_count?: string, | |||
| job_type: [], | |||
| job_location: [], | |||
| describe_text?: string, | |||
| gangweizhize?: string, // 额外的参数,提交时要删除 | |||
| renzhiyaoqiu?: string, // 额外的参数,提交时要删除 | |||
| pay_range?: number, | |||
| useful_life?: number, | |||
| disabled_date?: string, | |||
| @@ -20,12 +20,19 @@ declare namespace PermissionType { | |||
| type account = { | |||
| id?: Number, | |||
| mobile ?: String, | |||
| password: String, | |||
| repassword: String, | |||
| nickname: String, | |||
| avatar: String, | |||
| email: String, | |||
| roleids: String, | |||
| mobile?: String, | |||
| password: String, | |||
| repassword: String, | |||
| nickname: String, | |||
| avatar: String, | |||
| email: String, | |||
| roleids: String[], | |||
| province?: Number, | |||
| city?: Number, | |||
| district?: Number, | |||
| street?: Number, | |||
| // 其他参数 | |||
| location_arr?: number[] | |||
| } | |||
| } | |||
| @@ -0,0 +1,151 @@ | |||
| declare namespace ResumeType { | |||
| type basic = { | |||
| id ?: Number, | |||
| customer_id ?: Number, | |||
| hide_resume ?: Number, | |||
| house_keeping_status ?: Number, | |||
| photo ?: String, | |||
| name ?: String, | |||
| id_number ?: String, | |||
| gender ?: String, | |||
| dob ?: String, | |||
| work_experience ?: Number, | |||
| education ?: Number, | |||
| reg_level1 ?: Number, | |||
| reg_level2 ?: Number, | |||
| reg_level3 ?: Number, | |||
| reg_level4 ?: Number, | |||
| now_level1 ?: Number, | |||
| now_level2 ?: Number, | |||
| now_level3 ?: Number, | |||
| now_level4 ?: Number, | |||
| title ?: Number, | |||
| marital_status ?: Number, | |||
| ethnicity ?: Number, | |||
| height ?: Number, | |||
| weight ?: Number, | |||
| political_status ?: Number, | |||
| native_place ?: Number, | |||
| // 其他参数 | |||
| reg_arr ?: number[] | |||
| now_arr ?: number[] | |||
| native_arr ?: number[] | |||
| } | |||
| type contact = { | |||
| id ?: Number, | |||
| customer_id ?: Number, | |||
| landline?: String, | |||
| mobile?: String, | |||
| qq?: String, | |||
| personal_website?: String, | |||
| mailing_address?: String, | |||
| postal_code?: String, | |||
| } | |||
| type introduction = { | |||
| id ?: Number, | |||
| customer_id ?: Number, | |||
| description ?: String, | |||
| } | |||
| type skill = { | |||
| id ?: Number, | |||
| customer_id ?: Number, | |||
| english?: Number, | |||
| mandarin?: Number, | |||
| cantonese?: Number, | |||
| other_language?: Number, | |||
| computer_skills?: String, | |||
| vehicle_type?: Number, | |||
| vehicle_type_other?: String, | |||
| drive_type?: String, | |||
| } | |||
| type train = { | |||
| id ?:Number, | |||
| customer_id ?: Number, | |||
| start_year ?: Number, | |||
| start_month ?: Number, | |||
| end_year ?: Number, | |||
| end_month ?: Number, | |||
| end_today ?: Number, | |||
| school_or_institution ?: String, | |||
| major ?: String, | |||
| certificate ?: String, | |||
| awards ?: String, | |||
| positions_held ?: String, | |||
| } | |||
| type experience = { | |||
| id ?:Number, | |||
| customer_id ?: Number, | |||
| start_year ?: Number, | |||
| start_month ?: Number, | |||
| end_year ?: Number, | |||
| end_month ?: Number, | |||
| end_today ?: Number, | |||
| company_name ?: String, | |||
| position ?: String, | |||
| reason_for_leaving ?: String, | |||
| } | |||
| type credential = { | |||
| id ?:Number, | |||
| customer_id ?: Number, | |||
| name ?: String, | |||
| description ?: String, | |||
| certificate_photo ?: String, | |||
| } | |||
| type intentionBasic = { | |||
| id ?: Number, | |||
| customer_id ?: Number, | |||
| job_type?: Number, | |||
| talent_type ?: Number, | |||
| work_experience ?: Number, | |||
| other_positions: '', | |||
| salary_range ?: Number, | |||
| available_date ?: Number, | |||
| title_requirement ?: Number, | |||
| skill_certification ?: Number, | |||
| accommodation_requirement ?: Number, | |||
| holiday_rest ?: Number, | |||
| } | |||
| type intentionArea = { | |||
| id ?: Number, | |||
| customer_id ?: Number, | |||
| level1 ?: Number, | |||
| level2 ?: Number, | |||
| level3 ?: Number, | |||
| level4 ?: Number, | |||
| } | |||
| type intentionIndustry = { | |||
| id ?: Number, | |||
| customer_id ?: Number, | |||
| industry ?: Number | |||
| } | |||
| type intentionPosition = { | |||
| id ?: Number, | |||
| customer_id ?: Number, | |||
| level1 ?: Number, | |||
| level2 ?: Number, | |||
| industry ?: Number | |||
| } | |||
| type account = { | |||
| id ?: Number, | |||
| role?: Number, | |||
| mobile?: String, | |||
| username?: String, | |||
| password?: String, | |||
| email?: String, | |||
| } | |||
| } | |||
| @@ -1,14 +1,11 @@ | |||
| declare namespace SettingType { | |||
| type list = { | |||
| type system = { | |||
| id?: Number, | |||
| name?: String, | |||
| path?: String, | |||
| action?: String, | |||
| module?: String, | |||
| p_type?: String, | |||
| parent_id?: Number, | |||
| description?: String | |||
| value?: String, | |||
| remark?: String, | |||
| txt_mode ?: Number | |||
| } | |||
| type dict = { | |||
| @@ -1,234 +1,261 @@ | |||
| declare namespace urlType { | |||
| type url = { | |||
| Captcha : String, | |||
| SmsSend : String, | |||
| userLogin : String, | |||
| UserMenulist : String, | |||
| RoleAdd : String, | |||
| RoleList : String, | |||
| RoleDel : String, | |||
| RoleEdit : String, | |||
| RoleAddpermission : String, | |||
| RoleGetpermissions : String, | |||
| RoleDelpermission : String, | |||
| RoleSavepermissions : String, | |||
| permissionAdd : String, | |||
| permissionList : String, | |||
| permissionUpdate : String, | |||
| permissionListWithchilds : String, | |||
| accountAdd : String, | |||
| accountList : String, | |||
| accountUpdate : String, | |||
| companyAdd : String, | |||
| companyList : String, | |||
| companyEdit : String, | |||
| companyInfo : String, | |||
| companyVipInfo : String, | |||
| companyMultiClose : String, | |||
| companyMultiOpen : String, | |||
| companyEdit : String, | |||
| companyVipmanage : String, | |||
| companyViplist : String, | |||
| companyJobAdd : String, | |||
| companyJobEdit : String, | |||
| companyJobList : String, | |||
| companyJobInfo : String, | |||
| CompanyRecruiters : String, | |||
| CompanyTurnJobseeker : String, | |||
| companyDepartmentAdd : String, | |||
| companyDepartmentEdit : String, | |||
| CompanyDepartmentList : String, | |||
| companyDepartmentInfo : String, | |||
| Captcha: String, | |||
| SmsSend: String, | |||
| userLogin: String, | |||
| UserMenulist: String, | |||
| RoleAdd: String, | |||
| RoleList: String, | |||
| RoleDel: String, | |||
| RoleEdit: String, | |||
| RoleDetail: String, | |||
| RoleAddpermission: String, | |||
| RoleGetpermissions: String, | |||
| RoleDelpermission: String, | |||
| RoleSavepermissions: String, | |||
| permissionAdd: String, | |||
| permissionList: String, | |||
| permissionUpdate: String, | |||
| permissionDetail: String, | |||
| permissionListWithchilds: String, | |||
| accountAdd: String, | |||
| accountList: String, | |||
| accountUpdate: String, | |||
| UserDetail: String, | |||
| companyAdd: String, | |||
| companyList: String, | |||
| companyEdit: String, | |||
| companyInfo: String, | |||
| companyVipInfo: String, | |||
| companyMultiClose: String, | |||
| companyMultiOpen: String, | |||
| companyFeechange: String, | |||
| companyEdit: String, | |||
| companyVipmanage: String, | |||
| companyViplist: String, | |||
| companyJobAdd: String, | |||
| companyJobEdit: String, | |||
| companyJobList: String, | |||
| companyJobInfo: String, | |||
| CompanyRecruiters: String, | |||
| CompanyTurnJobseeker: String, | |||
| companyDepartmentAdd: String, | |||
| companyDepartmentEdit: String, | |||
| CompanyDepartmentList: String, | |||
| companyDepartmentInfo: String, | |||
| // 类型 | |||
| HousekeepingtypeAdd : String, | |||
| HousekeepingtypeDel : String, | |||
| HousekeepingtypeUpdate : String, | |||
| HousekeepingtypeList : String, | |||
| HousekeepingtypeDetail : String, | |||
| HousekeepingtypeAdd: String, | |||
| HousekeepingtypeDel: String, | |||
| HousekeepingtypeUpdate: String, | |||
| HousekeepingtypeList: String, | |||
| HousekeepingtypeDetail: String, | |||
| // 职位 | |||
| HousekeepingapplyAdd : String, | |||
| HousekeepingapplyDel : String, | |||
| HousekeepingapplyUpdate : String, | |||
| HousekeepingapplyList : String, | |||
| HousekeepingapplyDetail : String, | |||
| HousekeepingapplyAdd: String, | |||
| HousekeepingapplyDel: String, | |||
| HousekeepingapplyUpdate: String, | |||
| HousekeepingapplyList: String, | |||
| HousekeepingapplyDetail: String, | |||
| // 需求 | |||
| HousekeepingAdd : String, | |||
| HousekeepingDel : String, | |||
| HousekeepingUpdate : String, | |||
| HousekeepingList : String, | |||
| HousekeepingDetail : String, | |||
| HousekeepingAdd: String, | |||
| HousekeepingDel: String, | |||
| HousekeepingUpdate: String, | |||
| HousekeepingList: String, | |||
| HousekeepingDetail: String, | |||
| // 预定 | |||
| HousekeepingappointmentAdd : String, | |||
| HousekeepingappointmentDel : String, | |||
| HousekeepingappointmentUpdate : String, | |||
| HousekeepingappointmentList : String, | |||
| HousekeepingappointmentDetail : String, | |||
| RecruitmentAdd : String, | |||
| RecruitmentDel : String, | |||
| RecruitmentUpdate : String, | |||
| recruitmentList : String, | |||
| RecruitmentDetail : String, | |||
| RecruitmentBookAdd : String, | |||
| RecruitmentBookDel : String, | |||
| RecruitmentBookUpdate : String, | |||
| RecruitmentBookList : String, | |||
| sectionAdd : String, | |||
| sectionDel : String, | |||
| sectionUpdate : String, | |||
| sectionList : String, | |||
| HousekeepingappointmentAdd: String, | |||
| HousekeepingappointmentDel: String, | |||
| HousekeepingappointmentUpdate: String, | |||
| HousekeepingappointmentList: String, | |||
| HousekeepingappointmentDetail: String, | |||
| RecruitmentAdd: String, | |||
| RecruitmentDel: String, | |||
| RecruitmentUpdate: String, | |||
| recruitmentList: String, | |||
| RecruitmentDetail: String, | |||
| RecruitmentBookAdd: String, | |||
| RecruitmentBookDel: String, | |||
| RecruitmentBookUpdate: String, | |||
| RecruitmentBookList: String, | |||
| sectionAdd: String, | |||
| sectionDel: String, | |||
| sectionUpdate: String, | |||
| sectionList: String, | |||
| sectionDetail: String, | |||
| // 文章 | |||
| articleAdd : String, | |||
| articleDel : String, | |||
| articleUpdate : String, | |||
| articleList : String, | |||
| articleAdd: String, | |||
| articleDel: String, | |||
| articleUpdate: String, | |||
| articleList: String, | |||
| articleDetail: String, | |||
| dictTree : String, | |||
| ImageUpload : String, | |||
| advertareaAdd : String, | |||
| advertareaDel : String, | |||
| advertareaUpdate : String, | |||
| advertareaList : String, | |||
| advertareaDetail : String, | |||
| advertscheduleAdd : String, | |||
| advertscheduleDel : String, | |||
| advertscheduleUpdate : String, | |||
| advertscheduleList : String, | |||
| advertscheduleDetail : String, | |||
| dictTree: String, | |||
| ImageUpload: String, | |||
| advertareaAdd: String, | |||
| advertareaDel: String, | |||
| advertareaUpdate: String, | |||
| advertareaList: String, | |||
| advertareaDetail: String, | |||
| advertscheduleAdd: String, | |||
| advertscheduleDel: String, | |||
| advertscheduleUpdate: String, | |||
| advertscheduleList: String, | |||
| advertscheduleDetail: String, | |||
| // 活动 | |||
| activityExportUsers : String, | |||
| activityaddressAdd : String, | |||
| activityaddressDel : String, | |||
| activityaddressUpdate : String, | |||
| activityaddressList : String, | |||
| activityaddressDetail : String, | |||
| activityaddressCate : String, | |||
| activityExportUsers: String, | |||
| activityaddressAdd: String, | |||
| activityaddressDel: String, | |||
| activityaddressUpdate: String, | |||
| activityaddressList: String, | |||
| activityaddressDetail: String, | |||
| activityaddressCate: String, | |||
| // 简历 | |||
| // 列表 | |||
| 'JobseekerList' : String, // 查看 | |||
| 'JobseekerDetail' : String, // 详情 | |||
| 'JobseekerList': String, // 查看 | |||
| 'JobseekerDetail': String, // 详情 | |||
| // 基本资料 | |||
| 'JobapplicantAdd' : String, // 添加 | |||
| 'JobapplicantDel' : String, // 删除 | |||
| 'JobapplicantUpdate' : String, // 修改 | |||
| 'JobapplicantList' : String, // 查看 | |||
| 'JobapplicantDetail' : String, // 详情 | |||
| 'JobapplicantAdd': String, // 添加 | |||
| 'JobapplicantDel': String, // 删除 | |||
| 'JobapplicantUpdate': String, // 修改 | |||
| 'JobapplicantList': String, // 查看 | |||
| 'JobapplicantDetail': String, // 详情 | |||
| // 个人介绍 | |||
| 'JobapplicantAddintroduction' : String, | |||
| 'JobapplicantDelintroduction' : String, | |||
| 'JobapplicantUpdateintroduction' : String, | |||
| 'JobapplicantListintroduction' : String, | |||
| 'JobapplicantIntroductiondetail' : String, | |||
| 'JobapplicantAddintroduction': String, | |||
| 'JobapplicantDelintroduction': String, | |||
| 'JobapplicantUpdateintroduction': String, | |||
| 'JobapplicantListintroduction': String, | |||
| 'JobapplicantIntroductiondetail': String, | |||
| // 联系信息 | |||
| 'JobapplicantAddcontact' : String, | |||
| 'JobapplicantDelcontact' : String, | |||
| 'JobapplicantUpdatecontact' : String, | |||
| 'JobapplicantListcontact' : String, | |||
| 'JobapplicantContactdetail' : String, | |||
| 'JobapplicantAddcontact': String, | |||
| 'JobapplicantDelcontact': String, | |||
| 'JobapplicantUpdatecontact': String, | |||
| 'JobapplicantListcontact': String, | |||
| 'JobapplicantContactdetail': String, | |||
| // 专业技能 | |||
| 'JobapplicantAddskill' : String, | |||
| 'JobapplicantDelskill' : String, | |||
| 'JobapplicantUpdateskill' : String, | |||
| 'JobapplicantListskill' : String, | |||
| 'JobapplicantSkilldetail' : String, | |||
| 'JobapplicantAddskill': String, | |||
| 'JobapplicantDelskill': String, | |||
| 'JobapplicantUpdateskill': String, | |||
| 'JobapplicantListskill': String, | |||
| 'JobapplicantSkilldetail': String, | |||
| // 培训经历 | |||
| 'JobapplicantAddtraining' : String, | |||
| 'JobapplicantDeltraining' : String, | |||
| 'JobapplicantUpdatetraining' : String, | |||
| 'JobapplicantListtraining' : String, | |||
| 'JobapplicantTrainingdetail' : String, | |||
| 'JobapplicantAddtraining': String, | |||
| 'JobapplicantDeltraining': String, | |||
| 'JobapplicantUpdatetraining': String, | |||
| 'JobapplicantListtraining': String, | |||
| 'JobapplicantTrainingdetail': String, | |||
| // 求职意向-基本 | |||
| 'JobapplicantAdddesirebase' : String, | |||
| 'JobapplicantDeldesirebase' : String, | |||
| 'JobapplicantUpdatedesirebase' : String, | |||
| 'JobapplicantDesirebasedetail' : String, | |||
| 'JobapplicantAdddesirebase': String, | |||
| 'JobapplicantDeldesirebase': String, | |||
| 'JobapplicantUpdatedesirebase': String, | |||
| 'JobapplicantDesirebasedetail': String, | |||
| // 求职意向-地区 | |||
| 'JobapplicantAdddesirearea' : String, | |||
| 'JobapplicantDeldesirearea' : String, | |||
| 'JobapplicantUpdatedesirearea' : String, | |||
| 'JobapplicantListdesirearea' : String, | |||
| 'JobapplicantDesireareadetail' : String, | |||
| 'JobapplicantAdddesirearea': String, | |||
| 'JobapplicantDeldesirearea': String, | |||
| 'JobapplicantUpdatedesirearea': String, | |||
| 'JobapplicantListdesirearea': String, | |||
| 'JobapplicantDesireareadetail': String, | |||
| // 求职意向-行业 | |||
| 'JobapplicantAdddesireindustry': String, | |||
| 'JobapplicantDeldesireindustry': String, | |||
| 'JobapplicantUpdatedesireindustry': String, | |||
| 'JobapplicantListdesireindustry': String, | |||
| 'JobapplicantDesireindustrydetail': String, | |||
| // 求职意向-职位 | |||
| 'JobapplicantAdddesireindustry' : String, | |||
| 'JobapplicantDeldesireindustry' : String, | |||
| 'JobapplicantUpdatedesireindustry' : String, | |||
| 'JobapplicantListdesireindustry' : String, | |||
| 'JobapplicantDesireindustrydetail' : String, | |||
| 'JobapplicantAdddesireposition': String, | |||
| 'JobapplicantDeldesireposition': String, | |||
| 'JobapplicantUpdatedesireposition': String, | |||
| 'JobapplicantListdesireposition': String, | |||
| 'JobapplicantDesirepositiondetail': String, | |||
| // 证书 | |||
| 'JobapplicantAddcertificate' : String, | |||
| 'JobapplicantDelcertificate' : String, | |||
| 'JobapplicantUpdatecertificate' : String, | |||
| 'JobapplicantListcertificate' : String, | |||
| 'JobapplicantCertificatedetail' : String, | |||
| 'JobapplicantAddcertificate': String, | |||
| 'JobapplicantDelcertificate': String, | |||
| 'JobapplicantUpdatecertificate': String, | |||
| 'JobapplicantListcertificate': String, | |||
| 'JobapplicantCertificatedetail': String, | |||
| // 工作经历 | |||
| 'JobapplicantAddexperience' : String, | |||
| 'JobapplicantDelexperience' : String, | |||
| 'JobapplicantUpdateexperience' : String, | |||
| 'JobapplicantListexperience' : String, | |||
| 'JobapplicantExperiencedetail' : String, | |||
| 'JobapplicantAddexperience': String, | |||
| 'JobapplicantDelexperience': String, | |||
| 'JobapplicantUpdateexperience': String, | |||
| 'JobapplicantListexperience': String, | |||
| 'JobapplicantExperiencedetail': String, | |||
| // 介绍工作、帮扶情况 | |||
| 'JobapplicantAddassistandintro': String, // 添加 | |||
| 'JobapplicantListassist': String,// 获取列表-帮扶情况 | |||
| 'JobapplicantAssistdetail': String, // 获取详情-帮扶情况 | |||
| 'JobapplicantUpdateassist': String,// 修改-帮扶情况 | |||
| 'JobapplicantDelassist': String,// 删除-帮扶情况 | |||
| 'JobapplicantListintro': String, // 获取列表-介绍工作情况 | |||
| 'JobapplicantIntrodetail': String, // 获取详情-介绍工作情况 | |||
| 'JobapplicantUpdateintro': String,// 修改-介绍工作情况 | |||
| 'JobapplicantDelintro': String, // 删除-介绍工作情况 | |||
| // 统计 | |||
| StatsMajor : String, | |||
| StatsCertificate : String, | |||
| StatsWorkExperience : String, | |||
| StatsHa : String, | |||
| StatsAgeandgender : String, | |||
| StatsEducation : String, | |||
| StatsPosition : String, | |||
| StatsTitleAndSkill : String, | |||
| StatsJobMajor : String, | |||
| 'SysconfigAdd' : String, | |||
| 'SysconfigDel' : String, | |||
| 'SysconfigUpdate' : String, | |||
| 'SysconfigList' : String, | |||
| 'SysconfigDetail' : String, | |||
| StatsMajor: String, | |||
| StatsCertificate: String, | |||
| StatsWorkExperience: String, | |||
| StatsHa: String, | |||
| StatsAgeandgender: String, | |||
| StatsEducation: String, | |||
| StatsPosition: String, | |||
| StatsTitleAndSkill: String, | |||
| StatsJobMajor: String, | |||
| 'SysconfigAdd': String, | |||
| 'SysconfigDel': String, | |||
| 'SysconfigUpdate': String, | |||
| 'SysconfigList': String, | |||
| 'SysconfigDetail': String, | |||
| // 反馈 | |||
| FeedbackAdd : String, | |||
| FeedbackDel : String, | |||
| FeedbackUpdate : String, | |||
| FeedbackList : String, | |||
| FeedbackDetail : String, | |||
| FeedbackAdd: String, | |||
| FeedbackDel: String, | |||
| FeedbackUpdate: String, | |||
| FeedbackList: String, | |||
| FeedbackDetail: String, | |||
| // 反馈 | |||
| CustomerAdd : String, | |||
| CustomerDel : String, | |||
| CustomerUpdate : String, | |||
| CustomerList : String, | |||
| CustomerDetail : String, | |||
| DocUpload : String, | |||
| EsJobseeker : String, | |||
| TokenizerModify : String, | |||
| TokenizerGet : String, | |||
| FeePackageAdd : String, | |||
| FeePackageDel : String, | |||
| FeePackageUpdate : String, | |||
| FeePackageList : String, | |||
| FeePackageDetail : String, | |||
| FeeOrderList : String, | |||
| FeeOrderDetail : String, | |||
| CustomerAdd: String, | |||
| CustomerDel: String, | |||
| CustomerUpdate: String, | |||
| CustomerList: String, | |||
| CustomerDetail: String, | |||
| DocUpload: String, | |||
| EsJobseeker: String, | |||
| TokenizerModify: String, | |||
| TokenizerGet: String, | |||
| FeePackageAdd: String, | |||
| FeePackageDel: String, | |||
| FeePackageUpdate: String, | |||
| FeePackageList: String, | |||
| FeePackageDetail: String, | |||
| FeeOrderList: String, | |||
| FeeOrderDetail: String, | |||
| DictAdd: String, // 添加 | |||
| DictDel: String, // 删除 | |||
| DictUpdate: String, // 编辑 | |||
| DictList: String, // 列表 | |||
| DictDetail: String, // 详情 | |||
| // 导出数据 | |||
| CompanyExport: String, // 详情 | |||
| JobseekerExport: String, // 详情 | |||
| JobExport: String, // 详情 | |||
| } | |||
| } | |||
| @@ -1,7 +1,7 @@ | |||
| let admin : string = '/admin'; | |||
| let common : string = '/common'; | |||
| let admin: string = '/admin'; | |||
| let common: string = '/common'; | |||
| // 角色 | |||
| export const url : urlType.url = { | |||
| export const url: urlType.url = { | |||
| userLogin: admin + '/user/login', | |||
| UserMenulist: admin + '/user/menulist', | |||
| @@ -12,6 +12,8 @@ export const url : urlType.url = { | |||
| RoleList: admin + '/role/list', | |||
| RoleDel: admin + '/role/del', | |||
| RoleEdit: admin + '/role/update', | |||
| RoleDetail: admin + '/role/detail', | |||
| RoleAddpermission: admin + '/role/addpermission', | |||
| RoleGetpermissions: admin + '/role/getpermissions', | |||
| RoleDelpermission: admin + '/role/delpermission', | |||
| @@ -19,16 +21,20 @@ export const url : urlType.url = { | |||
| permissionAdd: admin + '/permission/add', | |||
| permissionList: admin + '/permission/list', | |||
| permissionUpdate: admin + '/permission/update', | |||
| permissionDetail: admin + '/permission/detail', | |||
| permissionListWithchilds: admin + '/permission/listwithchilds', | |||
| accountAdd: admin + '/user/add', | |||
| accountList: admin + '/user/list', | |||
| accountUpdate: admin + '/user/update', | |||
| UserDetail: admin + '/user/detail', | |||
| companyAdd: admin + '/company/add', | |||
| companyList: admin + '/company/list', | |||
| companyInfo: admin + '/company/info', | |||
| companyVipInfo: admin + '/company/vipinfo', | |||
| companyMultiClose: admin + '/company/multiclose', | |||
| companyMultiOpen: admin + '/company/multiopen', | |||
| companyFeechange: admin + '/company/feechange', | |||
| companyEdit: admin + '/company/edit', | |||
| companyVipmanage: admin + '/company/vipmanage', | |||
| @@ -98,7 +104,7 @@ export const url : urlType.url = { | |||
| articleList: admin + '/article/list', | |||
| articleDetail: admin + '/article/detail', | |||
| // 字典 | |||
| dictTree: common + '/dict/tree', | |||
| ImageUpload: common + '/image/upload?imgtype=1', | |||
| @@ -119,7 +125,7 @@ export const url : urlType.url = { | |||
| advertscheduleDel: admin + '/advertschedule/del', | |||
| advertscheduleUpdate: admin + '/advertschedule/update', | |||
| advertscheduleList: admin + '/advertschedule/list', | |||
| advertscheduleDetail: admin + '/advertarea/detail', | |||
| advertscheduleDetail: admin + '/advertschedule/detail', | |||
| // 活动管理 | |||
| activityExportUsers: admin + '/activity/export_users', // 导出参加活动用户 | |||
| @@ -136,64 +142,81 @@ export const url : urlType.url = { | |||
| 'JobseekerList': admin + '/jobseeker/list', // 查看 | |||
| 'JobseekerDetail': admin + '/jobseeker/detail', // 详情 | |||
| // 基本资料 | |||
| 'JobapplicantAdd': admin + '/jobapplicant/add', // 添加 | |||
| 'JobapplicantDel': admin + '/jobapplicant/del', // 删除 | |||
| 'JobapplicantUpdate': admin + '/jobapplicant/update', // 修改 | |||
| 'JobapplicantList': admin + '/jobapplicant/list', // 查看 | |||
| 'JobapplicantDetail': admin + '/jobapplicant/detail', // 详情 | |||
| 'JobapplicantAdd': admin + '/jobapplicant/add', // 添加 | |||
| 'JobapplicantDel': admin + '/jobapplicant/del', // 删除 | |||
| 'JobapplicantUpdate': admin + '/jobapplicant/update', // 修改 | |||
| 'JobapplicantList': admin + '/jobapplicant/list', // 查看 | |||
| 'JobapplicantDetail': admin + '/jobapplicant/detail', // 详情 | |||
| // 个人介绍 | |||
| 'JobapplicantAddintroduction': '/admin/jobapplicant/addintroduction', | |||
| 'JobapplicantDelintroduction': admin + '/jobapplicant/delintroduction', // 删除 | |||
| 'JobapplicantUpdateintroduction': admin + '/jobapplicant/updateintroduction', // 修改 | |||
| 'JobapplicantDelintroduction': admin + '/jobapplicant/delintroduction', // 删除 | |||
| 'JobapplicantUpdateintroduction': admin + '/jobapplicant/updateintroduction', // 修改 | |||
| 'JobapplicantListintroduction': '/admin/jobapplicant/listintroduction', | |||
| 'JobapplicantIntroductiondetail': '/admin/jobapplicant/introductiondetail', | |||
| // 联系信息 | |||
| 'JobapplicantAddcontact': admin + '/jobapplicant/addcontact', // 添加 | |||
| 'JobapplicantDelcontact': admin + '/jobapplicant/delcontact', // 删除 | |||
| 'JobapplicantUpdatecontact': admin + '/jobapplicant/updatecontact', // 修改 | |||
| 'JobapplicantListcontact': admin + '/jobapplicant/listcontact', // 查看 | |||
| 'JobapplicantContactdetail': admin + '/jobapplicant/contactdetail', // 详情 | |||
| 'JobapplicantAddcontact': admin + '/jobapplicant/addcontact', // 添加 | |||
| 'JobapplicantDelcontact': admin + '/jobapplicant/delcontact', // 删除 | |||
| 'JobapplicantUpdatecontact': admin + '/jobapplicant/updatecontact', // 修改 | |||
| 'JobapplicantListcontact': admin + '/jobapplicant/listcontact', // 查看 | |||
| 'JobapplicantContactdetail': admin + '/jobapplicant/contactdetail', // 详情 | |||
| // 专业技能 | |||
| 'JobapplicantAddskill': admin + '/jobapplicant/addskill', // 添加 | |||
| 'JobapplicantDelskill': admin + '/jobapplicant/delskill', // 删除 | |||
| 'JobapplicantUpdateskill': admin + '/jobapplicant/updateskill', // 修改 | |||
| 'JobapplicantListskill': admin + '/jobapplicant/listskill', // 查看 | |||
| 'JobapplicantSkilldetail': admin + '/jobapplicant/skilldetail', // 详情 | |||
| 'JobapplicantAddskill': admin + '/jobapplicant/addskill', // 添加 | |||
| 'JobapplicantDelskill': admin + '/jobapplicant/delskill', // 删除 | |||
| 'JobapplicantUpdateskill': admin + '/jobapplicant/updateskill', // 修改 | |||
| 'JobapplicantListskill': admin + '/jobapplicant/listskill', // 查看 | |||
| 'JobapplicantSkilldetail': admin + '/jobapplicant/skilldetail', // 详情 | |||
| // 培训经历 | |||
| 'JobapplicantAddtraining': admin + '/jobapplicant/addtraining', // 添加 | |||
| 'JobapplicantDeltraining': admin + '/jobapplicant/deltraining', // 删除 | |||
| 'JobapplicantUpdatetraining': admin + '/jobapplicant/updatetraining', // 修改 | |||
| 'JobapplicantListtraining': admin + '/jobapplicant/listtraining', // 查看 | |||
| 'JobapplicantTrainingdetail': admin + '/jobapplicant/trainingdetail', // 详情 | |||
| 'JobapplicantAddtraining': admin + '/jobapplicant/addtraining', // 添加 | |||
| 'JobapplicantDeltraining': admin + '/jobapplicant/deltraining', // 删除 | |||
| 'JobapplicantUpdatetraining': admin + '/jobapplicant/updatetraining', // 修改 | |||
| 'JobapplicantListtraining': admin + '/jobapplicant/listtraining', // 查看 | |||
| 'JobapplicantTrainingdetail': admin + '/jobapplicant/trainingdetail', // 详情 | |||
| // 求职意向-基本 | |||
| 'JobapplicantAdddesirebase': '/admin/jobapplicant/adddesirebase', // 添加 | |||
| 'JobapplicantDeldesirebase': '/admin/jobapplicant/deldesirebase', // 删除 | |||
| 'JobapplicantUpdatedesirebase': '/admin/jobapplicant/updatedesirebase', // 修改 | |||
| 'JobapplicantDesirebasedetail': '/admin/jobapplicant/desirebasedetail', // 详情 | |||
| // 求职意向-地区 | |||
| 'JobapplicantAdddesirearea': admin + '/jobapplicant/adddesirearea', // 添加 | |||
| 'JobapplicantDeldesirearea': admin + '/jobapplicant/deldesirearea', // 删除 | |||
| 'JobapplicantUpdatedesirearea': admin + '/jobapplicant/updatedesirearea', // 修改 | |||
| 'JobapplicantListdesirearea': admin + '/jobapplicant/listdesirearea', // 查看 | |||
| 'JobapplicantDesireareadetail': admin + '/jobapplicant/desireareadetail', // 详情 | |||
| 'JobapplicantAdddesirearea': admin + '/jobapplicant/adddesirearea', // 添加 | |||
| 'JobapplicantDeldesirearea': admin + '/jobapplicant/deldesirearea', // 删除 | |||
| 'JobapplicantUpdatedesirearea': admin + '/jobapplicant/updatedesirearea', // 修改 | |||
| 'JobapplicantListdesirearea': admin + '/jobapplicant/listdesirearea', // 查看 | |||
| 'JobapplicantDesireareadetail': admin + '/jobapplicant/desireareadetail', // 详情 | |||
| // 求职意向-行业 | |||
| 'JobapplicantAdddesireindustry': admin + '/jobapplicant/adddesireindustry', // 添加 | |||
| 'JobapplicantDeldesireindustry': admin + '/jobapplicant/deldesireindustry', // 删除 | |||
| 'JobapplicantUpdatedesireindustry': admin + '/jobapplicant/updatedesireindustry', // 修改 | |||
| 'JobapplicantListdesireindustry': admin + '/jobapplicant/listdesireindustry', // 查看 | |||
| 'JobapplicantDesireindustrydetail': admin + '/jobapplicant/desireindustrydetail', // 详情 | |||
| // 求职意向-职位 | |||
| 'JobapplicantAdddesireindustry': admin + '/jobapplicant/adddesireposition', // 添加 | |||
| 'JobapplicantDeldesireindustry': admin + '/jobapplicant/deldesireposition', // 删除 | |||
| 'JobapplicantUpdatedesireindustry': admin + '/jobapplicant/updatedesireposition', // 修改 | |||
| 'JobapplicantListdesireindustry': admin + '/jobapplicant/listdesireposition', // 查看 | |||
| 'JobapplicantDesireindustrydetail': admin + '/jobapplicant/desirepositiondetail', // 详情 | |||
| 'JobapplicantAdddesireposition': admin + '/jobapplicant/adddesireposition', // 添加 | |||
| 'JobapplicantDeldesireposition': admin + '/jobapplicant/deldesireposition', // 删除 | |||
| 'JobapplicantUpdatedesireposition': admin + '/jobapplicant/updatedesireposition', // 修改 | |||
| 'JobapplicantListdesireposition': admin + '/jobapplicant/listdesireposition', // 查看 | |||
| 'JobapplicantDesirepositiondetail': admin + '/jobapplicant/desirepositiondetail', // 详情 | |||
| // 证书 | |||
| 'JobapplicantAddcertificate': admin + '/jobapplicant/addcertificate', // 添加 | |||
| 'JobapplicantDelcertificate': admin + '/jobapplicant/delcertificate', // 删除 | |||
| 'JobapplicantUpdatecertificate': admin + '/jobapplicant/updatecertificate', // 修改 | |||
| 'JobapplicantListcertificate': admin + '/jobapplicant/listcertificate', // 查看 | |||
| 'JobapplicantCertificatedetail': admin + '/jobapplicant/certificatedetail', // 详情 | |||
| 'JobapplicantAddcertificate': admin + '/jobapplicant/addcertificate', // 添加 | |||
| 'JobapplicantDelcertificate': admin + '/jobapplicant/delcertificate', // 删除 | |||
| 'JobapplicantUpdatecertificate': admin + '/jobapplicant/updatecertificate', // 修改 | |||
| 'JobapplicantListcertificate': admin + '/jobapplicant/listcertificate', // 查看 | |||
| 'JobapplicantCertificatedetail': admin + '/jobapplicant/certificatedetail', // 详情 | |||
| // 工作经历 | |||
| 'JobapplicantAddexperience': admin + '/jobapplicant/addexperience', // 添加 | |||
| 'JobapplicantDelexperience': admin + '/jobapplicant/delexperience', // 删除 | |||
| 'JobapplicantUpdateexperience': admin + '/jobapplicant/updateexperience', // 修改 | |||
| 'JobapplicantListexperience': admin + '/jobapplicant/listexperience', // 查看 | |||
| 'JobapplicantExperiencedetail': admin + '/jobapplicant/experiencedetail', // 详情 | |||
| 'JobapplicantAddexperience': admin + '/jobapplicant/addexperience', // 添加 | |||
| 'JobapplicantDelexperience': admin + '/jobapplicant/delexperience', // 删除 | |||
| 'JobapplicantUpdateexperience': admin + '/jobapplicant/updateexperience', // 修改 | |||
| 'JobapplicantListexperience': admin + '/jobapplicant/listexperience', // 查看 | |||
| 'JobapplicantExperiencedetail': admin + '/jobapplicant/experiencedetail', // 详情 | |||
| // 介绍工作、帮扶情况 | |||
| 'JobapplicantAddassistandintro': admin + '/jobapplicant/addassistandintro', // 添加 | |||
| 'JobapplicantListassist': admin + '/jobapplicant/listassist', // 获取列表-帮扶情况 | |||
| 'JobapplicantAssistdetail': admin + '/jobapplicant/assistdetail', // 获取详情-帮扶情况 | |||
| 'JobapplicantUpdateassist': admin + '/jobapplicant/updateassist', // 修改-帮扶情况 | |||
| 'JobapplicantDelassist': admin + '/jobapplicant/delassist', // 删除-帮扶情况 | |||
| 'JobapplicantListintro': admin + '/jobapplicant/listintro', // 获取列表-介绍工作情况 | |||
| 'JobapplicantIntrodetail': admin + '/jobapplicant/introdetail', // 获取详情-介绍工作情况 | |||
| 'JobapplicantUpdateintro': admin + '/jobapplicant/updateintro', // 修改-介绍工作情况 | |||
| 'JobapplicantDelintro': admin + '/jobapplicant/delintro', // 删除-介绍工作情况 | |||
| // 统计 | |||
| StatsMajor: admin + '/stats/major', // 求职者专业统计 | |||
| @@ -204,16 +227,16 @@ export const url : urlType.url = { | |||
| StatsEducation: admin + '/stats/education', // 求职者学历统计 | |||
| StatsPosition: admin + '/stats/position', // 求职者求职意向统计 | |||
| StatsTitleAndSkill: admin + '/stats/titleandskill', // 求职者职称与技能统计 | |||
| StatsJobMajor: admin + '/stats/job_major', // 企业职位统计 | |||
| // 系统设置 | |||
| 'SysconfigAdd': common + '/sysconfig/add', // 添加 | |||
| 'SysconfigDel': common + '/sysconfig/del', // 删除 | |||
| 'SysconfigUpdate': common + '/sysconfig/update', // 修改 | |||
| 'SysconfigList': common + '/sysconfig/list', // 查看 | |||
| 'SysconfigDetail': common + '/sysconfig/detail', // 详情 | |||
| // 用户反馈 | |||
| // 反馈 | |||
| FeedbackAdd: common + '/feedback/add', // 添加 | |||
| @@ -221,7 +244,7 @@ export const url : urlType.url = { | |||
| FeedbackUpdate: common + '/feedback/update', // 编辑 | |||
| FeedbackList: common + '/feedback/list', // 列表 | |||
| FeedbackDetail: common + '/feedback/detail', // 详情 | |||
| // 用户反馈 | |||
| // 反馈 | |||
| CustomerAdd: common + '/customer/add', // 添加 | |||
| @@ -229,21 +252,28 @@ export const url : urlType.url = { | |||
| CustomerUpdate: common + '/customer/update', // 编辑 | |||
| CustomerList: common + '/customer/list', // 列表 | |||
| CustomerDetail: common + '/customer/detail', // 详情 | |||
| // VIP充值 | |||
| FeePackageAdd: admin + '/fee/package_add', // 添加 | |||
| FeePackageDel: admin + '/fee/del', // 删除 | |||
| FeePackageUpdate: admin + '/fee/package_edit', // 编辑 | |||
| FeePackageList: admin + '/fee/package_list', // 列表 | |||
| FeePackageDetail: admin + '/fee/package_info', // 详情 | |||
| FeeOrderList: admin + '/fee/order_list', // 列表 | |||
| FeeOrderDetail: admin + '/fee/order_info', // 详情 | |||
| // 字典管理 | |||
| DictAdd: common + '/dict/add', // 添加 | |||
| DictDel: common + '/dict/del', // 删除 | |||
| DictUpdate: common + '/dict/update', // 编辑 | |||
| DictList: common + '/dict/list', // 列表 | |||
| DictDetail: common + '/dict/detail', // 详情 | |||
| // 导出数据 | |||
| CompanyExport: admin + '/company/export', | |||
| JobseekerExport: admin + '/jobseeker/export', | |||
| JobExport: admin + '/job/export', | |||
| } | |||
| @@ -1,16 +1,52 @@ | |||
| import type { RequestConfig } from "@umijs/max"; | |||
| import { message, Modal } from "antd"; | |||
| import { message, Modal, Dropdown, MenuProps, theme } from "antd"; | |||
| import { BulbOutlined, LogoutOutlined } from '@ant-design/icons'; | |||
| import { baseUrl } from './constants/index' | |||
| import routes from '../config/routes' | |||
| import { history } from '@umijs/max'; | |||
| import { | |||
| ProBreadcrumb, | |||
| } from '@ant-design/pro-components'; | |||
| import { GetUserMenulist } from '@/apis/api'; | |||
| export async function getInitialState(): Promise<{ role: string }> { | |||
| console.log('getInitialState') | |||
| return { role: 'aa' }; | |||
| export async function getInitialState(): Promise<{ permissions: object[] }> { | |||
| const token = sessionStorage.getItem('token'); | |||
| let permissions = []; | |||
| if (!token) { | |||
| sessionStorage.clear(); | |||
| history.push('/login'); | |||
| return { permissions }; | |||
| } | |||
| try { | |||
| const res = await GetUserMenulist(); | |||
| permissions = flattenPermissions(res.data.menulist); | |||
| } catch (error) { | |||
| console.error('Failed to fetch user permissions:', error); | |||
| } | |||
| if (permissions.length === 0) { | |||
| history.push('/login'); | |||
| } | |||
| return { permissions }; | |||
| } | |||
| function flattenPermissions(permissions: { id: number; action: string; childs?: { id: number; action: string }[] }[]): string[] { | |||
| const flattenedPermissions: string[] = []; | |||
| permissions.forEach(permission => { | |||
| flattenedPermissions.push(permission.action); | |||
| if (permission.childs) { | |||
| flattenedPermissions.push(...flattenPermissions(permission.childs)); | |||
| } | |||
| }); | |||
| return flattenedPermissions; | |||
| } | |||
| export const layout = () => { | |||
| return { | |||
| name: '菊城人才市场', | |||
| @@ -22,15 +58,44 @@ export const layout = () => { | |||
| contentWidth: 'Fluid', | |||
| fixedHeader: true, | |||
| fixSiderbar: true, | |||
| splitMenus: true, | |||
| // splitMenus: true, | |||
| siderWidth: 240, | |||
| title: '菊城人才市场', | |||
| pwa: false, | |||
| iconfontUrl: '', | |||
| headerContentRender: () => (<> <ProBreadcrumb /></>), | |||
| avatarProps: { | |||
| src: 'https://gw.alipayobjects.com/zos/antfincdn/efFD%24IOql2/weixintupian_20170331104822.jpg', | |||
| size: 'small', | |||
| title: '七妮妮' | |||
| title: '管理员', | |||
| render: (props, dom) => { | |||
| return ( | |||
| <Dropdown | |||
| menu={{ | |||
| items: [ | |||
| { | |||
| key: 'logout', | |||
| icon: <LogoutOutlined />, | |||
| label: '退出登录', | |||
| } | |||
| ], | |||
| onClick: ({ key }) => { | |||
| sessionStorage.clear(); | |||
| history.replace('/login'); | |||
| } | |||
| }} | |||
| > | |||
| {dom} | |||
| </Dropdown> | |||
| ); | |||
| } | |||
| }, | |||
| token: { | |||
| sider: { | |||
| //侧边菜单的配置 ,这里具体看文档 | |||
| colorBgMenuItemSelected: '#19be6e', | |||
| colorTextMenuItemSelected: '#ffffff', | |||
| }, | |||
| }, | |||
| }; | |||
| }; | |||
| @@ -88,7 +153,7 @@ export const request: RequestConfig = { | |||
| case 401: | |||
| msgModel(data.msg, data.code) | |||
| sessionStorage.clear(); | |||
| history.push('/login'); | |||
| history.push('/login'); | |||
| break; | |||
| case 403: | |||
| msgModel(data.msg, data.code) | |||
| @@ -9,7 +9,7 @@ import { | |||
| ProForm | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, Modal, message, Row, Col } from 'antd'; | |||
| import { PostAdvertareaAdd, PostAdvertareaUpdate } from '@/apis/api'; | |||
| import { PostAdvertareaAdd, PostAdvertareaUpdate, GetAdvertareaDetail } from '@/apis/api'; | |||
| const PagesMainAdvertisementListCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| @@ -48,8 +48,9 @@ const PagesMainAdvertisementListCreate: React.FC = ({ dispatch, dictModel, openM | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| // let res = await GetArticleDetail({ id: id }) | |||
| // return res.data; | |||
| let res = await GetAdvertareaDetail({ id: id }) | |||
| setDetail(res.data) | |||
| return res.data; | |||
| } else { | |||
| return { | |||
| title: '', | |||
| @@ -89,20 +90,20 @@ const PagesMainAdvertisementListCreate: React.FC = ({ dispatch, dictModel, openM | |||
| }} | |||
| > | |||
| <Row gutter={[16, 16]}> | |||
| <Col span={12}> | |||
| <Col span={24}> | |||
| <ProFormText | |||
| label="广告位置" | |||
| label="广告位置,按照该格式:来源页面广告位名" | |||
| name="name" | |||
| placeholder="请输入广告位置" | |||
| rules={[{ required: true, message: '请输入广告位置' }]} | |||
| placeholder="请输入广告位置,如:小程序首页轮播图;小程序首页企业LOGO图" | |||
| rules={[{ required: true, message: '请输入广告位置,如:小程序首页轮播图;小程序首页企业LOGO图' }]} | |||
| /> | |||
| </Col> | |||
| <Col span={12}> | |||
| <Col span={24}> | |||
| <ProFormText | |||
| label="广告位置代码" | |||
| label="广告位置代码,使用拼音缩写,不要超过十个字母,按照该格式:xcx(小程序)/gw(官网)-ym(页面)-ggwm(广告位名), 如:minisylbt(小程序首页轮播图)" | |||
| name="code" | |||
| placeholder="请输入广告位置代码" | |||
| rules={[{ required: true, message: '请输入广告位置代码' }]} | |||
| placeholder="请输入广告位置代码,如:如:minisylbt(小程序首页轮播图)" | |||
| rules={[{ required: true, message: '请输入广告位置代码,如:如:minisylbt(小程序首页轮播图)' }]} | |||
| /> | |||
| </Col> | |||
| <Col span={12}> | |||
| @@ -1,14 +1,13 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType} from '@ant-design/pro-components'; | |||
| import { connect, history } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable | |||
| ProTable, TableDropdown | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, ConfigProvider, Image } from 'antd'; | |||
| import { GetAdvertareaList } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| import { Button, Image, ConfigProvider, Select } from 'antd'; | |||
| import { GetAdvertareaList} from '@/apis/api'; | |||
| const PagesMainAdvertisementListTable: React.FC = ({ dispatch,getId, openModel }: any) => { | |||
| const PagesMainAdvertisementListTable: React.FC = ({ dispatch, openModel, getId }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| @@ -24,24 +23,33 @@ const PagesMainAdvertisementListTable: React.FC = ({ dispatch,getId, openModel } | |||
| actionRef.current.reload(); | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| colorLink: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProTable | |||
| size='small' | |||
| bordered={true} | |||
| scroll={{ x: 1300 }} | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| columns={[ | |||
| columns={[ { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| width: 100, | |||
| search: false, | |||
| }, | |||
| { | |||
| title: '广告位置', | |||
| dataIndex: 'name', | |||
| width: 240 | |||
| }, | |||
| { | |||
| title: '广告位置代码', | |||
| @@ -130,16 +138,11 @@ const PagesMainAdvertisementListTable: React.FC = ({ dispatch,getId, openModel } | |||
| ]} | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel , openModel}: any) => ({ | |||
| dictModel, | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(PagesMainAdvertisementListTable); | |||
| }))(PagesMainAdvertisementListTable); | |||
| @@ -9,13 +9,12 @@ import { | |||
| ProForm, | |||
| FormControlRender, | |||
| ProFormDependency, | |||
| ProFormSwitch | |||
| ProFormDigit | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, Modal, message, Image, Row, Col, Switch, Form, Typography } from 'antd'; | |||
| import { GetAdvertareaList, getCompanyList, PostAdvertscheduleAdd, PostAdvertscheduleUpdate } from '@/apis/api'; | |||
| import { GetAdvertareaList, getCompanyList, PostAdvertscheduleAdd, PostAdvertscheduleUpdate, GetAdvertscheduleDetail } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| import UploadModel from '@/components/Common/upload'; | |||
| import RichComponent from '@/components/Common/rich'; | |||
| const selectfieldNames = { label: 'name', value: 'id' }; | |||
| const selectfieldCompanyNames = { label: 'full_name', value: 'id' }; | |||
| @@ -35,7 +34,6 @@ const PagesMainAdvertisementPutinCreate: React.FC = ({ dispatch, dictModel, open | |||
| setUploadedFilephotoName(filename); | |||
| }; | |||
| const [richTxt, setRichTxt] = useState<string | number>(''); // 文章内容 | |||
| return ( | |||
| <> | |||
| @@ -48,7 +46,7 @@ const PagesMainAdvertisementPutinCreate: React.FC = ({ dispatch, dictModel, open | |||
| > | |||
| <Modal | |||
| open={openPreview} | |||
| title={id ? '编辑文章' : '添加文章'} | |||
| title={id ? '编辑投放' : '添加投放'} | |||
| centered | |||
| maskClosable={false} | |||
| footer={null} | |||
| @@ -62,18 +60,21 @@ const PagesMainAdvertisementPutinCreate: React.FC = ({ dispatch, dictModel, open | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| // let res = await GetArticleDetail({ id: id }) | |||
| // return res.data; | |||
| let res = await GetAdvertscheduleDetail({ id: id }) | |||
| setUploadedFilephotoName(res.data.image_url) | |||
| setDetail(res.data) | |||
| return res.data; | |||
| } else { | |||
| return { | |||
| area_id: null, | |||
| title: '', | |||
| cover_img: '', | |||
| doc_url: '', | |||
| section_id: null, | |||
| content: '', | |||
| stick_top: 0, | |||
| hot: 0, | |||
| author: '' | |||
| image_url: '', | |||
| ad_description: '', | |||
| target_url: '', | |||
| show_order: 0, | |||
| valid_date: '', | |||
| hide_ad: 0, | |||
| company_id: null, | |||
| } | |||
| } | |||
| }} | |||
| @@ -89,7 +90,7 @@ const PagesMainAdvertisementPutinCreate: React.FC = ({ dispatch, dictModel, open | |||
| } | |||
| }} | |||
| onFinish={async (values) => { | |||
| values.cover_img = uploadedFilephotoName ? uploadedFilephotoName : ''; | |||
| values.image_url = uploadedFilephotoName ? uploadedFilephotoName : ''; | |||
| console.log(values) | |||
| if (id) { | |||
| values.id = id; | |||
| @@ -122,26 +123,22 @@ const PagesMainAdvertisementPutinCreate: React.FC = ({ dispatch, dictModel, open | |||
| return res.data.advertareas; | |||
| }) | |||
| } | |||
| rules={[{ required: true, message: '请选择投放位置' }]} | |||
| /> | |||
| <Row gutter={[16, 16]}> | |||
| { | |||
| detail ? | |||
| <Col span={4}> | |||
| <UploadModel multiple={false} form_name="image_url" image_length={1} uploadTxt="上传封面图" image_type={1} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| <Col span={24} style={{ display: 'flex' }}> | |||
| <UploadModel multiple={false} form_name="image_url" image_length={1} uploadTxt="上传封面图" image_type={3} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| {uploadedFilephotoName ? <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginLeft: '16px', marginTop: '32px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${detail?.image_url}`} style={{ marginLeft: '16px', marginTop: '32px', width: '100px', height: '100px' }}></Image>} | |||
| </Col> : <> | |||
| <Col span={4}> | |||
| <UploadModel multiple={false} form_name="image_url" image_length={1} uploadTxt="上传封面图" image_type={1} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| <Col span={24} style={{ display: 'flex' }}> | |||
| <UploadModel multiple={false} form_name="image_url" image_length={1} uploadTxt="上传封面图" image_type={3} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| {uploadedFilephotoName ? <Col span={8}> <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||
| </Col> | |||
| </> | |||
| } | |||
| { | |||
| detail ? | |||
| <Col span={4}> | |||
| {uploadedFilephotoName ? <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginBottom: '16px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${detail?.image_url}`} style={{ marginTop: '16px', width: '200px', height: '200px' }}></Image>} | |||
| </Col> : <> | |||
| {uploadedFilephotoName ? <Col span={4}> <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||
| </> | |||
| } | |||
| </Row> | |||
| <ProFormText | |||
| label="说明" | |||
| @@ -155,12 +152,14 @@ const PagesMainAdvertisementPutinCreate: React.FC = ({ dispatch, dictModel, open | |||
| placeholder="请输入跳转网址" | |||
| rules={[{ required: true, message: '请输入跳转网址' }]} | |||
| /> | |||
| <ProFormText | |||
| <ProFormDigit | |||
| label="此广告展示顺序" | |||
| name="show_order" | |||
| placeholder="请输入此广告展示顺序,请输入优先级的数字" | |||
| name="show_order" | |||
| min={1} | |||
| rules={[{ required: true, message: '请输入此广告展示顺序,请输入优先级的数字' }]} | |||
| /> | |||
| <ProFormSegmented | |||
| name="hide_ad" | |||
| label="是否隐藏广告" | |||
| @@ -1,14 +1,15 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType} from '@ant-design/pro-components'; | |||
| import { connect, history } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable | |||
| ProTable, ProFormSelect | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, ConfigProvider, Image } from 'antd'; | |||
| import { GetAdvertscheduleList } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| import { Button, Image, ConfigProvider, Tag } from 'antd'; | |||
| import { GetAdvertscheduleList, getCompanyList, GetAdvertareaList} from '@/apis/api'; | |||
| const selectfieldNames = { label: 'full_name', value: 'id' }; | |||
| const selectfieldAreaNames = { label: 'name', value: 'id' }; | |||
| const PagesMainAdvertisementPutinTable: React.FC = ({ dispatch,getId, openModel }: any) => { | |||
| const PagesMainAdvertisementPutinTable: React.FC = ({ dispatch, openModel, getId }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| @@ -24,37 +25,116 @@ const PagesMainAdvertisementPutinTable: React.FC = ({ dispatch,getId, openModel | |||
| actionRef.current.reload(); | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| colorLink: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProTable | |||
| size='small' | |||
| bordered={true} | |||
| scroll={{ x: 1300 }} | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| columns={[ | |||
| columns={[ { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| width: 100, | |||
| search: false, | |||
| }, | |||
| { | |||
| title: '投放标题', | |||
| dataIndex: 'title', | |||
| width: 240 | |||
| }, | |||
| { | |||
| title: '投放位置', | |||
| dataIndex: 'area_name', | |||
| search: false | |||
| }, | |||
| { | |||
| title: '广告标题', | |||
| dataIndex: 'title' | |||
| title: '投放位置', | |||
| dataIndex: 'area_id', | |||
| hidden: true, | |||
| valueType: 'select', | |||
| renderFormItem: () => { | |||
| return ( | |||
| <ProFormSelect | |||
| width='lg' | |||
| fieldProps={{ | |||
| fieldNames: selectfieldAreaNames, | |||
| }} | |||
| request={async (keyword) => | |||
| GetAdvertareaList({ page: 1, pagesize: 100, keyword: keyword.keyWords }).then(res => { | |||
| return res.data.advertareas; | |||
| }) | |||
| } | |||
| placeholder="请选择投放位置" | |||
| /> | |||
| ) | |||
| } | |||
| }, | |||
| { | |||
| title: '广告投放位置', | |||
| dataIndex: 'area_name' | |||
| title: '投放描述', | |||
| dataIndex: 'ad_description', | |||
| search: false | |||
| }, | |||
| { | |||
| title: '广告描述', | |||
| dataIndex: 'ad_description' | |||
| title: '企业', | |||
| dataIndex: 'company_name', | |||
| search: false | |||
| }, | |||
| { | |||
| title: '是否显示', | |||
| title: '企业', | |||
| dataIndex: 'company_id', | |||
| hidden: true, | |||
| valueType: 'select', | |||
| renderFormItem: () => { | |||
| return ( | |||
| <ProFormSelect | |||
| showSearch | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| }} | |||
| request={async (keyword) => | |||
| getCompanyList({ page: 1, pagesize: 100, keyword: keyword.keyWords }).then(res => { | |||
| return res.data.list; | |||
| }) | |||
| } | |||
| placeholder="请选择企业" | |||
| /> | |||
| ) | |||
| } | |||
| }, | |||
| { | |||
| title: '投放状态', | |||
| dataIndex: 'hide_ad', | |||
| render: (_, record) => (<> | |||
| { | |||
| <> | |||
| {record.hide_ad === 0 && <Tag>未设置</Tag> } | |||
| {record.hide_ad === 1 && <Tag>隐藏</Tag>} | |||
| {record.hide_ad === 2 && <Tag color="green">显示</Tag> } | |||
| </> | |||
| } | |||
| </>), | |||
| valueType: 'select', | |||
| valueEnum: { | |||
| 0: { text: '全部' }, | |||
| 1: { | |||
| text: '隐藏广告', | |||
| }, | |||
| 2: { | |||
| text: '显示广告', | |||
| } | |||
| }, | |||
| }, | |||
| { | |||
| title: '操作', | |||
| @@ -95,14 +175,16 @@ const PagesMainAdvertisementPutinTable: React.FC = ({ dispatch,getId, openModel | |||
| pagesize: pageSize, | |||
| sort: 'id', | |||
| sortby: 'desc', | |||
| keyword: params.name, | |||
| keyword: params.title, | |||
| hide_ad: params.hide_ad ? params.hide_ad : 0, | |||
| company_id: params.company_id, | |||
| area_id: params.area_id | |||
| }).then(res => { | |||
| setList(res.data.advertschedules) | |||
| setTotal(res.data.total) | |||
| }) | |||
| } | |||
| headerTitle="投放广告" | |||
| headerTitle="广告位置列表" | |||
| toolBarRender={() => [ | |||
| <Button type="primary" onClick={() => { | |||
| dispatch({ type: 'openModel/getOpenModal', payload: true }) | |||
| @@ -112,16 +194,11 @@ const PagesMainAdvertisementPutinTable: React.FC = ({ dispatch,getId, openModel | |||
| ]} | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel , openModel}: any) => ({ | |||
| dictModel, | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(PagesMainAdvertisementPutinTable); | |||
| }))(PagesMainAdvertisementPutinTable); | |||
| @@ -8,7 +8,7 @@ import { | |||
| ProForm | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, Modal, message } from 'antd'; | |||
| import { PostCompanyDepartmentAdd, PostCompanyDepartmentEdit, getCompanyList, GetCompanyDepartmentInfo } from '@/apis/api'; | |||
| import { PostCompanyDepartmentAdd, PostCompanyDepartmentEdit, getCompanyList, GetCompanyDepartmentInfo, GetCompanyInfo } from '@/apis/api'; | |||
| const selectfieldNames = { label: 'full_name', value: 'id' }; | |||
| @@ -47,7 +47,7 @@ const PagesMainCompanyDepartmentCreate: React.FC = ({ dispatch, dictModel, openM | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await GetCompanyDepartmentInfo({id: id}) | |||
| let res = await GetCompanyDepartmentInfo({ id: id }) | |||
| return res.data; | |||
| } else { | |||
| return { | |||
| @@ -59,7 +59,6 @@ const PagesMainCompanyDepartmentCreate: React.FC = ({ dispatch, dictModel, openM | |||
| email: sessionStorage.getItem('company_info') ? JSON.parse(sessionStorage.getItem('company_info')).email : '' | |||
| } | |||
| } | |||
| }} | |||
| submitter={{ | |||
| searchConfig: { | |||
| @@ -96,6 +95,16 @@ const PagesMainCompanyDepartmentCreate: React.FC = ({ dispatch, dictModel, openM | |||
| defaultValue: sessionStorage.getItem('company_info') ? JSON.parse(sessionStorage.getItem('company_info')).full_name : '', | |||
| disabled: sessionStorage.getItem('company_info') ? true : false | |||
| }} | |||
| onChange={(value) => { | |||
| GetCompanyInfo({ id: value }).then(res => { | |||
| formRef.current.setFieldsValue({ | |||
| contact: sessionStorage.getItem('company_info') ? JSON.parse(sessionStorage.getItem('company_info')).contact : res.data.contact, | |||
| phone: sessionStorage.getItem('company_info') ? JSON.parse(sessionStorage.getItem('company_info')).phone : res.data.phone, | |||
| mobile: sessionStorage.getItem('company_info') ? JSON.parse(sessionStorage.getItem('company_info')).mobile : res.data.mobile, | |||
| email: sessionStorage.getItem('company_info') ? JSON.parse(sessionStorage.getItem('company_info')).email : res.data.email | |||
| }) | |||
| }) | |||
| }} | |||
| request={(keyword) => | |||
| getCompanyList({ page: 1, pagesize: 100, keyword: keyword.keyWords }).then(res => { | |||
| return res.data.list; | |||
| @@ -51,6 +51,12 @@ const PagesMainCompanyDepartmentTable: React.FC = ({ dispatch, getId, openModel | |||
| title: '所属企业', | |||
| dataIndex: 'company_name', | |||
| width: 300, | |||
| }, | |||
| { | |||
| title: '所属企业', | |||
| dataIndex: 'company_id', | |||
| width: 300, | |||
| hidden: true, | |||
| valueType: 'select', | |||
| renderFormItem: () => { | |||
| return ( | |||
| @@ -0,0 +1,109 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect, history } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable, TableDropdown, PageContainer | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, Image, ConfigProvider, Select, message } from 'antd'; | |||
| import { GetCompanyRecruiters, GetCompanyInfo, updateCompany, PostCompanyExport , PostCompanyTurnJobseeker} from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| const PagesMainCompanyListTable: React.FC = ({ dispatch, openModel, getId }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| const [page, setPage] = useState<number>(1) | |||
| const [pageSize, setPageSize] = useState<number>(10) | |||
| const setId = (id: number) => { | |||
| getId(id) | |||
| } | |||
| useEffect(() => { | |||
| if (!openModel.openModal) { | |||
| actionRef.current.reload(); | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| colorLink: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProTable | |||
| size='small' | |||
| bordered={true} | |||
| scroll={{ x: 1300 }} | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| columns={[ | |||
| { | |||
| title: '账号', | |||
| dataIndex: 'username' | |||
| }, { | |||
| title: '手机号', | |||
| dataIndex: 'mobile' | |||
| }, { | |||
| title: '绑定时间', | |||
| dataIndex: 'updated_at', | |||
| }, | |||
| { | |||
| title: '操作', | |||
| width: 300, | |||
| key: 'option', | |||
| valueType: 'option', | |||
| fixed: 'right', | |||
| render: (_, record, action) => [ | |||
| <Button key='1' type='link' onClick={() => { | |||
| PostCompanyTurnJobseeker({company_id:record.company_id, customer_id: record.id, role: 1}).then(res => { | |||
| message.success('解除授权成功'); | |||
| actionRef.current.reload(); | |||
| }) | |||
| }}>解除授权</Button> | |||
| ], | |||
| }, | |||
| ]} | |||
| 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>) => | |||
| GetCompanyRecruiters({ | |||
| page: page, | |||
| pagesize: pageSize, | |||
| sort: 'id', | |||
| sortby: 'desc', | |||
| }).then(res => { | |||
| setList(res.data.customers) | |||
| setTotal(res.data.total) | |||
| }) | |||
| } | |||
| headerTitle="管理已经授权的账号" | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(PagesMainCompanyListTable); | |||
| @@ -9,8 +9,9 @@ import { | |||
| ProFormCascader, | |||
| ProFormRadio, | |||
| FormControlRender, | |||
| ProFormSelect | |||
| } from '@ant-design/pro-components'; | |||
| import { Row, Col, Image, ConfigProvider, Modal, Switch, Form, message, } from 'antd'; | |||
| import { Row, Col, Image, ConfigProvider, Modal, Switch, Form, message, Button } from 'antd'; | |||
| import { addCompany, PostCompanyEdit, GetCompanyInfo } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| import { verifyPhone } from '@/utils/VerifyHelper'; | |||
| @@ -19,7 +20,7 @@ import MapComponent from '@/components/Common/map'; | |||
| import RichComponent from '@/components/Common/rich'; | |||
| import UploadModel from '@/components/Common/upload'; | |||
| const selectfieldNames = { label: 'name', value: 'id' }; | |||
| const selectfieldNames = { label: 'name', value: 'id', children: 'children' }; | |||
| const cascaderfieldNames = { label: 'name', value: 'id', children: 'children' }; | |||
| const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| @@ -45,10 +46,9 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| }; | |||
| const [uploadedFilephotosName, setUploadedFilephotosName] = useState<object[]>([]); | |||
| const photos: any = [] | |||
| const handleFileUploadedphotos = (filename: string) => { | |||
| photos.push({ photo: filename }) | |||
| setUploadedFilephotosName(photos); | |||
| setUploadedFilephotosName([...uploadedFilephotosName, { photo: filename }]); | |||
| }; | |||
| @@ -57,6 +57,8 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2009, type: 'setAreaList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2002, type: 'setNatureList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2003, type: 'setScaleList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2027, type: 'setIndustryPostList' } }) | |||
| }, []) | |||
| useEffect(() => { | |||
| @@ -88,9 +90,19 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| if (open && id) { | |||
| GetCompanyInfo({ id: id }).then(res => { | |||
| formMapRef?.current?.forEach((formInstanceRef) => { | |||
| res.data.nature_arr = [res.data.nature_text] | |||
| res.data.scale_arr = [res.data.scale_text] | |||
| res.data.location_arr = [ | |||
| res.data.province ? res.data.province : 0, | |||
| res.data.city ? res.data.city : 0, | |||
| res.data.district ? res.data.district : 0, | |||
| res.data.street ? res.data.street : 0 | |||
| ]; | |||
| setUploadedFilephotosName(res.data.company_photos) | |||
| formInstanceRef?.current?.setFieldsValue(res.data); | |||
| }); | |||
| setDetail(res.data) | |||
| }); | |||
| } else { | |||
| setDetail(null) | |||
| @@ -110,16 +122,22 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| values.photo = uploadedFilephotoName ? uploadedFilephotoName : ''; | |||
| values.license_path = uploadedFilelicenseName ? uploadedFilelicenseName : ''; | |||
| values.company_photos = uploadedFilephotosName ? uploadedFilephotosName : []; | |||
| values.nature = values.nature.length > 0 ? values.nature[values.nature.length - 1] : 0; | |||
| values.scale = values.scale.length > 0 ? values.scale[values.scale.length - 1] : 0; | |||
| values.status = 1; | |||
| console.log(values) | |||
| if (detail) { | |||
| values.id = detail.id; | |||
| values.nature = detail.nature ? detail.nature : 0; | |||
| values.scale = detail.scale ? detail.scale : 0; | |||
| delete values.nature_arr; | |||
| delete values.scale_arr; | |||
| let res = await PostCompanyEdit(values) | |||
| message.success('提交成功') | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| } else { | |||
| values.nature = values.nature_arr.length > 0 ? values.nature_arr[values.nature_arr.length - 1] : 0; | |||
| values.scale = values.scale_arr.length > 0 ? values.scale_arr[values.scale_arr.length - 1] : 0; | |||
| delete values.nature_arr; | |||
| delete values.scale_arr; | |||
| let res = await addCompany(values) | |||
| message.success('提交成功') | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| @@ -213,10 +231,22 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| placeholder="请输入官网" | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| label="所属行业" | |||
| name="industry" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| options: dictModel.industryPostList | |||
| }} | |||
| placeholder="请选择所属行业" | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormCascader | |||
| label="企业性质" | |||
| name="nature" | |||
| name="nature_arr" | |||
| fieldProps={{ | |||
| fieldNames: cascaderfieldNames, | |||
| options: dictModel.natureList, | |||
| @@ -228,7 +258,7 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| <Col span={8}> | |||
| <ProFormCascader | |||
| label="企业规模" | |||
| name="scale" | |||
| name="scale_arr" | |||
| fieldProps={{ | |||
| fieldNames: cascaderfieldNames, | |||
| options: dictModel.scaleList, | |||
| @@ -417,9 +447,9 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| { | |||
| detail ? | |||
| <Col span={8}> | |||
| {uploadedFilephotoName ? <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginBottom: '16px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${detail?.photo}`} style={{ marginBottom: '16px', width: '200px', height: '200px' }}></Image>} | |||
| {uploadedFilephotoName ? <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${detail?.photo}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image>} | |||
| </Col> : <> | |||
| {uploadedFilephotoName ? <Col span={8}> <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginBottom: '16px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||
| {uploadedFilephotoName ? <Col span={8}> <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||
| </> | |||
| } | |||
| </Row> | |||
| @@ -459,23 +489,38 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| { | |||
| detail ? | |||
| <Col span={8}> | |||
| {uploadedFilelicenseName ? <Image src={`${Imageprefix}${uploadedFilelicenseName}`} style={{ marginBottom: '16px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${detail?.license_path}`} style={{ marginBottom: '16px', width: '200px', height: '200px' }}></Image>} | |||
| {uploadedFilelicenseName ? <Image src={`${Imageprefix}${uploadedFilelicenseName}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${detail?.license_path}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image>} | |||
| </Col> : <> | |||
| {uploadedFilelicenseName ? <Col span={8}> <Image src={`${Imageprefix}${uploadedFilelicenseName}`} style={{ marginBottom: '16px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||
| {uploadedFilelicenseName ? <Col span={8}> <Image src={`${Imageprefix}${uploadedFilelicenseName}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||
| </> | |||
| } | |||
| </Row> | |||
| <Row gutter={[16, 16]}> | |||
| { | |||
| detail ? | |||
| <Col span={8}> | |||
| <Col span={24} style={{ display: 'flex' }}> | |||
| <UploadModel multiple={true} form_name="photo" image_length={1} uploadTxt="企业相册" image_type={3} onUploadComplete={handleFileUploadedphotos}></UploadModel> | |||
| {uploadedFilephotosName.length > 0 ? uploadedFilephotosName.map((item: any, index: number) => (<> | |||
| <div style={{ display: 'flex', flexDirection: 'column' }}> | |||
| <Button size='small' type='link' onClick={() => { | |||
| uploadedFilephotosName.splice(index, 1) | |||
| setUploadedFilephotosName([...uploadedFilephotosName]) | |||
| }}>删除</Button> | |||
| <Image src={`${Imageprefix}${item.photo}`} style={{ marginTop: '8px', marginLeft: '16px', width: '100px', height: '100px' }}></Image> | |||
| </div> | |||
| </>)) : ''} | |||
| </Col> : <> | |||
| <Col span={24} style={{ display: 'flex' }}> | |||
| {uploadedFilephotosName.length > 0 ? uploadedFilephotosName.map((item: any) => (<> | |||
| <Image src={`${Imageprefix}${item.photo}`} style={{ marginRight: '16px', width: '120px', height: '120px' }}></Image> | |||
| </>)) : ''} | |||
| <UploadModel multiple={true} form_name="license_path" image_length={5} uploadTxt="企业相册" image_type={3} onUploadComplete={handleFileUploadedphotos}></UploadModel> | |||
| {uploadedFilephotosName.length > 0 ? uploadedFilephotosName.map((item: any, index: number) => (<> | |||
| <div style={{ display: 'flex', flexDirection: 'column' }}> | |||
| <Button size='small' type='link' onClick={() => { | |||
| uploadedFilephotosName.splice(index, 1) | |||
| setUploadedFilephotosName([...uploadedFilephotosName]) | |||
| }}>删除</Button> | |||
| <Image src={`${Imageprefix}${item.photo}`} style={{ marginTop: '8px', marginLeft: '16px', width: '100px', height: '100px' }}></Image> | |||
| </div> | |||
| </>)) : ''} | |||
| </Col> | |||
| </> | |||
| } | |||
| @@ -529,4 +574,4 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainCompanyListCreate); | |||
| }))(PagesMainCompanyListCreate); | |||
| @@ -2,10 +2,10 @@ import { useRef, useState, useEffect } from 'react'; | |||
| import { connect, history } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable, TableDropdown | |||
| ProTable, TableDropdown, PageContainer | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, Image, ConfigProvider } from 'antd'; | |||
| import { getCompanyList, GetCompanyInfo } from '@/apis/api'; | |||
| import { Button, Image, ConfigProvider, Select, message } from 'antd'; | |||
| import { getCompanyList, GetCompanyInfo, updateCompany, PostCompanyExport } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| const PagesMainCompanyListTable: React.FC = ({ dispatch, openModel, getId }: any) => { | |||
| @@ -35,242 +35,373 @@ const PagesMainCompanyListTable: React.FC = ({ dispatch, openModel, getId }: any | |||
| } | |||
| }} | |||
| > | |||
| <ProTable | |||
| scroll={{ x: 1300 }} | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| columns={[ | |||
| { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| width: 100, | |||
| fixed: 'left', | |||
| }, | |||
| { | |||
| title: '企业名称', | |||
| dataIndex: 'full_name', | |||
| width: 300, | |||
| fixed: 'left', | |||
| }, | |||
| { | |||
| 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_text', | |||
| width: 100, | |||
| render: (_, record) => (<> | |||
| { | |||
| record.member_type_text && <Button type="primary" size='small' onClick={() => { | |||
| sessionStorage.setItem('vip_company_info', JSON.stringify(record)) | |||
| history.push({ | |||
| pathname: '/main/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正式', | |||
| <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: 'start_date', | |||
| search: false, | |||
| width: 200 | |||
| }, | |||
| { | |||
| title: '到期时间', | |||
| dataIndex: 'end_date', | |||
| search: false, | |||
| { | |||
| 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: '/main/company/vip' | |||
| }) | |||
| }}> | |||
| {record.member_type_text} | |||
| </Button> | |||
| } | |||
| width: 200 | |||
| }, { | |||
| title: '剩余点数', | |||
| dataIndex: 'code', | |||
| search: false, | |||
| width: 100 | |||
| }, | |||
| { | |||
| title: '会员状态', | |||
| dataIndex: 'member_status_text', | |||
| width: 100, | |||
| valueType: 'select', | |||
| valueEnum: { | |||
| 0: { text: '全部' }, | |||
| 1: { | |||
| text: '待审', | |||
| </>), | |||
| valueType: 'select', | |||
| valueEnum: { | |||
| 0: { text: '全部' }, | |||
| 1: { | |||
| text: '试用申请中', | |||
| }, | |||
| 2: { | |||
| text: '试用正式', | |||
| }, | |||
| 3: { | |||
| text: '普通申请中', | |||
| }, | |||
| 4: { | |||
| text: '普通正式', | |||
| }, | |||
| 5: { | |||
| text: 'VIP申请中', | |||
| }, | |||
| 6: { | |||
| text: 'VIP正式', | |||
| }, | |||
| }, | |||
| }, | |||
| { | |||
| 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: '推荐', | |||
| } | |||
| }, | |||
| }, | |||
| { | |||
| title: '企业照片', | |||
| dataIndex: 'photo', | |||
| search: false, | |||
| width: 200, | |||
| render: (_, record) => (<> | |||
| <Image src={`${Imageprefix + record.photo}`} width='100%' height={40} preview={false} /> | |||
| </> | |||
| ) | |||
| }, { | |||
| title: '照片审核', | |||
| dataIndex: 'photo_status_text', | |||
| search: false, | |||
| width: 100 | |||
| }, | |||
| { | |||
| title: '营业执照', | |||
| dataIndex: 'license_path', | |||
| search: false, | |||
| width: 200, | |||
| render: (_, record) => (<> | |||
| <Image src={`${Imageprefix}${record.license_path}`} width='100%' height={40} preview={false} /> | |||
| </> | |||
| ) | |||
| }, | |||
| { | |||
| title: '营业执照审核', | |||
| dataIndex: 'license_status_text', | |||
| search: false, | |||
| width: 200 | |||
| }, | |||
| { | |||
| title: '登录账号', | |||
| dataIndex: 'login_name', | |||
| width: 200 | |||
| }, | |||
| { | |||
| 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: '/main/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) => [ | |||
| <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: '/main/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: '/main/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: '/main/company/post' | |||
| }) | |||
| }) | |||
| }) | |||
| }, | |||
| }, | |||
| }, | |||
| { | |||
| name: '子账号解绑', | |||
| key: '4', | |||
| onClick: () => { | |||
| { | |||
| name: '子账号解绑', | |||
| key: '4', | |||
| onClick: () => { | |||
| }, | |||
| }, | |||
| }, | |||
| ]} | |||
| />, | |||
| ], | |||
| }, | |||
| ]} | |||
| 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) | |||
| ]} | |||
| />, | |||
| ], | |||
| }, | |||
| ]} | |||
| 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) | |||
| }) | |||
| } | |||
| }} | |||
| request={async (params = {} as Record<string, any>) => | |||
| getCompanyList({ | |||
| page: page, | |||
| pagesize: pageSize, | |||
| sort: 'id', | |||
| sortby: 'desc', | |||
| keyword: params.full_name, | |||
| }).then(res => { | |||
| setList(res.data.list) | |||
| setTotal(res.data.total) | |||
| }) | |||
| } | |||
| headerTitle="企业列表" | |||
| toolBarRender={() => [ | |||
| <Button type="primary" onClick={() => { | |||
| dispatch({ type: 'openModel/getOpenModal', payload: true }) | |||
| }}> | |||
| 添加企业 | |||
| </Button> | |||
| ]} | |||
| /> | |||
| 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> | |||
| ]} | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| @@ -16,7 +16,7 @@ import { | |||
| ProFormDigitRange | |||
| } from '@ant-design/pro-components'; | |||
| import { Row, Col, Image, ConfigProvider, Modal, Switch, Form, message, } from 'antd'; | |||
| import { getCompanyList, GetCompanyDepartmentList, PostCompanyJobAdd, PostCompanyJobEdit, PostCompanyJobInfo } from '@/apis/api'; | |||
| import { getCompanyList, GetCompanyDepartmentList, PostCompanyJobAdd, PostCompanyJobEdit, PostCompanyJobInfo, GetCompanyInfo, GetCompanyDepartmentInfo } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| import { verifyPhone } from '@/utils/VerifyHelper'; | |||
| import { disFrontData } from '@/utils/format' | |||
| @@ -36,28 +36,13 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| React.MutableRefObject<ProFormInstance<any> | undefined>[] | |||
| >([]); // 编辑模式 | |||
| const [openPreview, setOpenPreview] = useState(false); | |||
| const [detail, setDetail] = useState<CompanyType.Basic | null>(null) | |||
| const [detail, setDetail] = useState<CompanyType.Job | null>(null) | |||
| const [richTxt, setRichTxt] = useState<string | number>(''); // 企业简介 | |||
| const [mapSwitch, setMapSwitch] = useState<boolean>(false); // 选择地图 | |||
| const [lat, setLat] = useState<string | number>(''); | |||
| const [lng, setLng] = useState<string | number>(''); | |||
| const [uploadedFilephotoName, setUploadedFilephotoName] = useState<string>(''); | |||
| const handleFileUploadedphoto = (filename: string) => { | |||
| setUploadedFilephotoName(filename); | |||
| }; | |||
| const [uploadedFilelicenseName, setUploadedFilelicenseName] = useState<string>(''); | |||
| const handleFileUploadedlicense = (filename: string) => { | |||
| setUploadedFilelicenseName(filename); | |||
| }; | |||
| const [uploadedFilephotosName, setUploadedFilephotosName] = useState<object[]>([]); | |||
| const photos: any = [] | |||
| const handleFileUploadedphotos = (filename: string) => { | |||
| photos.push({ photo: filename }) | |||
| setUploadedFilephotosName(photos); | |||
| }; | |||
| useEffect(() => { | |||
| @@ -73,6 +58,8 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| 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' } }) | |||
| }, []) | |||
| useEffect(() => { | |||
| @@ -104,34 +91,91 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| 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) | |||
| }); | |||
| } else { | |||
| setDetail(null) | |||
| formMapRef?.current?.forEach((formInstanceRef) => { | |||
| formInstanceRef?.current?.setFieldsValue({ | |||
| company_id: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).id : null, | |||
| contact: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).contact : '', | |||
| phone: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).phone : '', | |||
| mobile: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).mobile : '', | |||
| email: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).email : '', | |||
| fax: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).email : '', | |||
| longitude: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).longitude : 0, | |||
| 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, | |||
| status: 1 | |||
| }); | |||
| }); | |||
| } | |||
| }} | |||
| > | |||
| <StepsForm<CompanyType.Basic> | |||
| <StepsForm<CompanyType.Job> | |||
| formMapRef={formMapRef} | |||
| formRef={formRef} | |||
| onFinish={async (values: CompanyType.Basic) => { | |||
| console.log(values) | |||
| values.province = values.location_arr[0] ? values.location_arr[0] : 0; | |||
| values.city = values.location_arr[1] ? values.location_arr[1] : 0; | |||
| values.district = values.location_arr[2] ? values.location_arr[2] : 0; | |||
| values.street = values.location_arr[3] ? values.location_arr[3] : 0; | |||
| delete values.location_arr; | |||
| values.photo = uploadedFilephotoName ? uploadedFilephotoName : ''; | |||
| values.license_path = uploadedFilelicenseName ? uploadedFilelicenseName : ''; | |||
| values.company_photos = uploadedFilephotosName ? uploadedFilephotosName : []; | |||
| values.nature = values.nature.length > 0 ? values.nature[values.nature.length - 1] : 0; | |||
| values.scale = values.scale.length > 0 ? values.scale[values.scale.length - 1] : 0; | |||
| values.status = 1; | |||
| console.log(values) | |||
| onFinish={async (values: CompanyType.Job) => { | |||
| values.job_type = values.job_type.slice(0, 3); | |||
| values.job_location = values.job_location.slice(0, 4); | |||
| // 年龄 | |||
| if (values.age_arr && values.age_arr.length > 0) { | |||
| values.age_min = values.age_arr[0] ? values.age_arr[0] : 0; | |||
| values.age_max = values.age_arr[1] ? values.age_arr[1] : 0; | |||
| delete values.age_arr; | |||
| } | |||
| // 所在地 | |||
| if (values.household_arr && values.household_arr.length > 0) { | |||
| values.household_province = values.household_arr[0] ? values.household_arr[0] : 0; | |||
| values.household_city = values.household_arr[1] ? values.household_arr[1] : 0; | |||
| delete values.household_arr; | |||
| } | |||
| // 籍贯 | |||
| if (values.location_arr && values.location_arr.length > 0) { | |||
| values.location_province = values.location_arr[0] ? values.location_arr[0] : 0; | |||
| values.location_city = values.location_arr[1] ? values.location_arr[1] : 0; | |||
| values.location_town = values.location_arr[2] ? values.location_arr[2] : 0; | |||
| delete values.location_arr; | |||
| } | |||
| values.describe_text = '<div>岗位职责</div>' + values.gangweizhize + '<div>任职要求</div>' + values.renzhiyaoqiu; | |||
| delete values.gangweizhize; | |||
| delete values.renzhiyaoqiu; | |||
| values.status = values.status ? values.status : 1; | |||
| if (detail) { | |||
| values.id = detail.id; | |||
| let res = await PostCompanyJobEdit(values) | |||
| message.success('提交成功') | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| } else { | |||
| let res = await PostCompanyJobAdd(values) | |||
| message.success('提交成功') | |||
| @@ -176,6 +220,30 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| 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: '请选择企业' }]} | |||
| onChange={(value) => { | |||
| GetCompanyInfo({ id: value }).then(res => { | |||
| formMapRef?.current?.forEach((formInstanceRef) => { | |||
| formInstanceRef?.current?.setFieldsValue({ | |||
| contact: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).contact : res.data.contact, | |||
| department_id: null, | |||
| phone: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).phone : res.data.phone, | |||
| mobile: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).mobile : res.data.mobile, | |||
| email: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).email : res.data.email, | |||
| fax: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).email : res.data.fax, | |||
| longitude: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).longitude : res.data.longitude, | |||
| latitude: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).latitude : res.data.latitude, | |||
| other_address: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).address : res.data.address, | |||
| interview_address: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).address : res.data.address, | |||
| phone_public: 2, | |||
| mobile_public: 2, | |||
| email_public: 2, | |||
| fax_public: 2, | |||
| }); | |||
| }); | |||
| }) | |||
| }} | |||
| request={(keyword) => | |||
| getCompanyList({ page: 1, pagesize: 100, keyword: keyword.keyWords }).then(res => { | |||
| return res.data.list; | |||
| @@ -196,6 +264,19 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| }} | |||
| onChange={(value) => { | |||
| GetCompanyDepartmentInfo({ id: value }).then(res => { | |||
| formMapRef?.current?.forEach((formInstanceRef) => { | |||
| formInstanceRef?.current?.setFieldsValue({ | |||
| contact: res.data.contact ? res.data.contact : JSON.parse(sessionStorage.getItem('post_company_info')).contact, | |||
| phone: res.data.phone ? res.data.phone : JSON.parse(sessionStorage.getItem('post_company_info')).phone, | |||
| mobile: res.data.mobile ? res.data.mobile : JSON.parse(sessionStorage.getItem('post_company_info')).mobile, | |||
| email: res.data.email ? res.data.email : JSON.parse(sessionStorage.getItem('post_company_info')).email, | |||
| }); | |||
| }); | |||
| }) | |||
| }} | |||
| request={async (params) => | |||
| GetCompanyDepartmentList({ page: 1, pagesize: 100, keyword: params.keyWords, company_id: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).id : company_id }).then(res => { | |||
| return res.data.rows; | |||
| @@ -259,6 +340,7 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| label="职位名称" | |||
| name="name" | |||
| placeholder="请输入职位名称" | |||
| rules={[{ required: true, message: '请输入职位名称' }]} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| @@ -274,7 +356,7 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| name="job_type" | |||
| fieldProps={{ | |||
| fieldNames: cascaderfieldNames, | |||
| treeData: dictModel.positionList, | |||
| treeData: dictModel.industryPostList, | |||
| multiple: true, | |||
| treeCheckable: true, | |||
| }} | |||
| @@ -315,21 +397,48 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| <Row gutter={[16, 16]}> | |||
| <Col span={24}> | |||
| <Form.Item | |||
| name='describe_text' | |||
| label="职位描述" | |||
| rules={[{ required: true }]} | |||
| name='gangweizhize' | |||
| label="岗位职责" | |||
| rules={[{ required: true, message: '请输入岗位职责' }]} | |||
| > | |||
| <FormControlRender> | |||
| {() => { | |||
| return ( | |||
| <ProFormDependency name={['gangweizhize']} > | |||
| {({ gangweizhize }, form) => { | |||
| return ( | |||
| <RichComponent placeholder="请输入岗位职责" defaultValue={gangweizhize} | |||
| onChange={(value) => { | |||
| form.formRef.current.setFieldsValue({ | |||
| gangweizhize: value | |||
| }) | |||
| }}></RichComponent> | |||
| ); | |||
| }} | |||
| </ProFormDependency> | |||
| ); | |||
| }} | |||
| </FormControlRender> | |||
| </Form.Item> | |||
| </Col> | |||
| <Col span={24}> | |||
| <Form.Item | |||
| name='renzhiyaoqiu' | |||
| label="任职要求" | |||
| rules={[{ required: true, message: '请输入任职要求' }]} | |||
| > | |||
| <FormControlRender> | |||
| {() => { | |||
| return ( | |||
| <ProFormDependency name={['describe_text']} > | |||
| {({ describe_text }, form) => { | |||
| <ProFormDependency name={['renzhiyaoqiu']} > | |||
| {({ renzhiyaoqiu }, form) => { | |||
| return ( | |||
| <RichComponent placeholder="请输入职位描述" defaultValue={describe_text} | |||
| <RichComponent placeholder="请输入任职要求" defaultValue={renzhiyaoqiu} | |||
| onChange={(value) => { | |||
| setRichTxt(value) | |||
| form.formRef.current.setFieldsValue({ | |||
| describe_text: value | |||
| renzhiyaoqiu: value | |||
| }) | |||
| }}></RichComponent> | |||
| ); | |||
| @@ -399,6 +508,8 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| }} | |||
| options={dictModel.payList} | |||
| placeholder="请选择薪资范围" | |||
| rules={[{ required: true, message: '请选择薪资范围' }]} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| @@ -868,8 +979,8 @@ const PagesMainCompanyListCreate: React.FC = ({ dispatch, dictModel, openModel, | |||
| { label: '未发布', value: 2 }, | |||
| { label: '暂停', value: 3 }, | |||
| { label: '锁定', value: 4 }, | |||
| { label: '锁定', value: 5 }, | |||
| { label: '锁定', value: 6 }, | |||
| { label: '回收站', value: 5 }, | |||
| { label: '已过期', value: 6 }, | |||
| ]} | |||
| /> | |||
| </Col> | |||
| @@ -5,7 +5,9 @@ import { | |||
| ProTable, ProFormSelect | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, ConfigProvider, } from 'antd'; | |||
| import { GetCompanyJobList, getCompanyList, GetCompanyInfo } from '@/apis/api'; | |||
| import { GetCompanyJobList, getCompanyList, GetCompanyInfo, PostJobExport } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| const selectfieldNames = { label: 'full_name', value: 'id' }; | |||
| const PagesMainCompanyPostTable: React.FC = ({ dispatch, getId, openModel }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| @@ -41,6 +43,12 @@ const PagesMainCompanyPostTable: React.FC = ({ dispatch, getId, openModel }: any | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| columns={[ | |||
| { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| width: 100, | |||
| fixed: 'left', | |||
| }, | |||
| { | |||
| title: '职位名称', | |||
| dataIndex: 'name', | |||
| @@ -49,13 +57,12 @@ const PagesMainCompanyPostTable: React.FC = ({ dispatch, getId, openModel }: any | |||
| }, | |||
| { | |||
| title: '所属企业', | |||
| dataIndex: 'company_name', | |||
| dataIndex: 'full_name', | |||
| width: 300, | |||
| valueType: 'select', | |||
| renderFormItem: () => { | |||
| return ( | |||
| <ProFormSelect | |||
| width='lg' | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| defaultValue: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).full_name : null, | |||
| @@ -82,6 +89,34 @@ const PagesMainCompanyPostTable: React.FC = ({ dispatch, getId, openModel }: any | |||
| search: false, | |||
| width: 100 | |||
| }, | |||
| { | |||
| title: '职位状态', | |||
| dataIndex: 'status', | |||
| width: 100, | |||
| hidden: true, | |||
| valueType: 'select', | |||
| valueEnum: { | |||
| 0: { text: '全部' }, | |||
| 1: { | |||
| text: '发布中', | |||
| }, | |||
| 2: { | |||
| text: '未发布', | |||
| }, | |||
| 3: { | |||
| text: '暂停', | |||
| }, | |||
| 4: { | |||
| text: '已锁定', | |||
| }, | |||
| 5: { | |||
| text: '回收站', | |||
| }, | |||
| 6: { | |||
| text: '已过期', | |||
| } | |||
| }, | |||
| }, | |||
| { | |||
| title: '状态', | |||
| dataIndex: 'status_text', | |||
| @@ -89,7 +124,7 @@ const PagesMainCompanyPostTable: React.FC = ({ dispatch, getId, openModel }: any | |||
| width: 100 | |||
| }, | |||
| { | |||
| title: '有效期', | |||
| title: '有效期(天)', | |||
| dataIndex: 'useful_life', | |||
| search: false, | |||
| width: 150 | |||
| @@ -131,6 +166,8 @@ const PagesMainCompanyPostTable: React.FC = ({ dispatch, getId, openModel }: any | |||
| sort: 'id', | |||
| sortby: 'desc', | |||
| keyword: params.name, | |||
| expired: params.expired, | |||
| status: params.status, | |||
| company_id: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).id : companyId | |||
| }).then(res => { | |||
| setList(res.data.rows) | |||
| @@ -146,6 +183,16 @@ const PagesMainCompanyPostTable: React.FC = ({ dispatch, getId, openModel }: any | |||
| }} | |||
| headerTitle="部门列表" | |||
| toolBarRender={() => [ | |||
| <Button type="primary" onClick={() => { | |||
| message.info('数据导出需要时间,请耐心等待') | |||
| PostJobExport().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 }) | |||
| }}> | |||
| @@ -0,0 +1,114 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProFormText, | |||
| ProForm, | |||
| ProFormSegmented, | |||
| ProFormDigit | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, Modal, message } from 'antd'; | |||
| import { PostCompanyFeechange } from '@/apis/api'; | |||
| const selectfieldNames = { label: 'full_name', value: 'id' }; | |||
| const PagesMainCompanyPostCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const formRef = useRef<ProFormInstance>(); | |||
| const [openPreview, setOpenPreview] = useState(false); | |||
| useEffect(() => { | |||
| setOpenPreview(openModel.openFeeModal) | |||
| }, [openModel.openFeeModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <Modal | |||
| open={openPreview} | |||
| title='编辑VIP' | |||
| centered | |||
| maskClosable={false} | |||
| footer={null} | |||
| destroyOnClose | |||
| width={1000} | |||
| onCancel={() => { | |||
| dispatch({ type: 'openModel/getOpenFeeModal', payload: false }) | |||
| }} | |||
| > | |||
| <ProForm<CompanyType.fee> | |||
| formRef={formRef} | |||
| submitter={{ | |||
| searchConfig: { | |||
| resetText: '取消', | |||
| submitText: '保存', | |||
| }, | |||
| render: (_, dom) => { return <Flex justify='flex-end'> <Space>{dom}</Space></Flex> }, | |||
| onReset: () => { | |||
| setOpenPreview(false) | |||
| } | |||
| }} | |||
| onFinish={async (values) => { | |||
| values.id = id; | |||
| let res = await PostCompanyFeechange(values) | |||
| message.success('提交成功') | |||
| dispatch({ type: 'openModel/getOpenFeeModal', payload: false }) | |||
| }} | |||
| > | |||
| <ProFormDigit | |||
| label="点数值" | |||
| placeholder="点数值" | |||
| name="fee" | |||
| min={0} | |||
| rules={[{ required: true, message: '请输入点数值' }]} | |||
| /> | |||
| <ProFormSegmented | |||
| name="change_type" | |||
| label="变更类型" | |||
| request={async () => [ | |||
| { | |||
| label: '增加', | |||
| value: 1, | |||
| }, | |||
| { | |||
| label: '扣减', | |||
| value: 2, | |||
| } | |||
| ]} | |||
| rules={[{ required: true, message: '请选择变更类型' }]} | |||
| /> | |||
| <ProFormText | |||
| name="remark" | |||
| label="备注说明" | |||
| placeholder="备注说明" | |||
| rules={[{ required: true, message: '请输入备注说明' }]} | |||
| /> | |||
| </ProForm> | |||
| </Modal> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainCompanyPostCreate); | |||
| @@ -5,7 +5,7 @@ import { | |||
| ProTable | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, Image, ConfigProvider, Input } from 'antd'; | |||
| import { PostCompanyViplist } from '@/apis/api'; | |||
| import { PostCompanyViplist ,PostCompanyFeechange} from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| @@ -17,7 +17,7 @@ const CompanyListPage: React.FC = ({ dispatch, getId, openModel }: any) => { | |||
| const [total, setTotal] = useState<number>(0) | |||
| const [page, setPage] = useState<number>(1) | |||
| const [pageSize, setPageSize] = useState<number>(10) | |||
| const [fullname, setFullname] = useState<string>(sessionStorage.getItem('vip_company_info') ? JSON.parse(sessionStorage.getItem('vip_company_info')).full_name : '') | |||
| const [fullname, setFullname] = useState<any>(sessionStorage.getItem('vip_company_info') ? JSON.parse(sessionStorage.getItem('vip_company_info')).full_name : '') | |||
| const setId = (id: number) => { | |||
| getId(id) | |||
| @@ -29,6 +29,12 @@ const CompanyListPage: React.FC = ({ dispatch, getId, openModel }: any) => { | |||
| } | |||
| }, [openModel.openModal]) | |||
| useEffect(() => { | |||
| if (!openModel.openFeeModal) { | |||
| actionRef.current.reload(); | |||
| } | |||
| }, [openModel.openFeeModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| @@ -49,8 +55,7 @@ const CompanyListPage: React.FC = ({ dispatch, getId, openModel }: any) => { | |||
| { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| width: 100, | |||
| search: false, | |||
| width: 80, | |||
| fixed: 'left', | |||
| }, | |||
| { | |||
| @@ -109,7 +114,7 @@ const CompanyListPage: React.FC = ({ dispatch, getId, openModel }: any) => { | |||
| title: '剩余点数', | |||
| dataIndex: 'balance_fee', | |||
| search: false, | |||
| width: 100 | |||
| width: 100, | |||
| }, | |||
| { | |||
| title: '业务员', | |||
| @@ -127,7 +132,11 @@ const CompanyListPage: React.FC = ({ dispatch, getId, openModel }: any) => { | |||
| <Button key='1' type='link' onClick={() => { | |||
| setId(record.id) | |||
| dispatch({ type: 'openModel/getOpenModal', payload: true }) | |||
| }}>编辑</Button> | |||
| }}>编辑</Button>, | |||
| <Button key='1' type='link' onClick={() => { | |||
| setId(record.id) | |||
| dispatch({ type: 'openModel/getOpenFeeModal', payload: true }) | |||
| }}>变更点数</Button> | |||
| ], | |||
| }, | |||
| ]} | |||
| @@ -14,10 +14,10 @@ import { PostRecruitmentUpdate, PostRecruitmentAdd, GetCompanyInfo, GetRecruitme | |||
| import MapComponent from '@/components/Common/map'; | |||
| import RichComponent from '@/components/Common/rich'; | |||
| import dayjs from "dayjs"; | |||
| const PagesMainCompanyDepartmentCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const PagesMainFairListCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const formRef = useRef<ProFormInstance>(); | |||
| const [openPreview, setOpenPreview] = useState(false); | |||
| const [detail, setDetail] = useState<CompanyType.Department | null>(null) | |||
| const [detail, setDetail] = useState<FairType.form | null>(null) | |||
| const [richTxt, setRichTxt] = useState<string | number>(''); // 招聘会内容 | |||
| @@ -51,15 +51,24 @@ const PagesMainCompanyDepartmentCreate: React.FC = ({ dispatch, dictModel, openM | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| }} | |||
| > | |||
| <ProForm<CompanyType.Department> | |||
| <ProForm<FairType.form> | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await GetRecruitmentDetail({ id: id }) | |||
| res.data.dateRange = [res.data.open_date, res.data.close_date ? res.data.close_date : new Date()]; | |||
| let res = await GetRecruitmentDetail({ id: id.id }) | |||
| res.data.dateRange = [res.data.open_date, res.data.close_date ? res.data.close_date : null]; | |||
| return res.data; | |||
| } else { | |||
| return { | |||
| title: '', | |||
| content: '', | |||
| open_date: '', | |||
| close_date: '', | |||
| address: '', | |||
| status: 0, | |||
| dateRange: [] | |||
| } | |||
| } | |||
| }} | |||
| submitter={{ | |||
| @@ -75,10 +84,10 @@ const PagesMainCompanyDepartmentCreate: React.FC = ({ dispatch, dictModel, openM | |||
| }} | |||
| onFinish={async (values) => { | |||
| values.open_date = values.dateRange[0]; | |||
| values.close_date = values.dateRange[1]; | |||
| values.close_date = values.dateRange[1] ? values.dateRange[1] : ''; | |||
| delete values.dateRange; | |||
| if (id) { | |||
| values.id = id; | |||
| delete values.dateRange; | |||
| values.id = id.id; | |||
| let res = await PostRecruitmentUpdate(values) | |||
| message.success('提交成功') | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| @@ -123,7 +132,7 @@ const PagesMainCompanyDepartmentCreate: React.FC = ({ dispatch, dictModel, openM | |||
| </Form.Item> | |||
| <ProFormDateTimeRangePicker | |||
| name="dateRange" | |||
| label="选择有效的时间范围" | |||
| label="选择有效的日期时间范围" | |||
| fieldProps={{ | |||
| format: 'YYYY-MM-DD HH:mm:ss' | |||
| }} | |||
| @@ -156,7 +165,7 @@ const PagesMainCompanyDepartmentCreate: React.FC = ({ dispatch, dictModel, openM | |||
| </Row> | |||
| </ProForm> | |||
| </Modal> | |||
| </ConfigProvider> | |||
| </ConfigProvider > | |||
| </> | |||
| ); | |||
| }; | |||
| @@ -165,4 +174,7 @@ const PagesMainCompanyDepartmentCreate: React.FC = ({ dispatch, dictModel, openM | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainCompanyDepartmentCreate); | |||
| }))(PagesMainFairListCreate); | |||
| @@ -0,0 +1,173 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { connect } from '@umijs/max'; | |||
| import { | |||
| ProTable | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Modal, Tabs, Button, Select, Typography, Tag } from 'antd'; | |||
| import { GetRecruitmentDetail, GetRecruitmentBookList, PostRecruitmentBookUpdate } from '@/apis/api'; | |||
| import he from 'he'; | |||
| const selectfieldNames = { label: 'name', value: 'id' }; | |||
| const MainFairListDetail: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| const [page, setPage] = useState<number>(1) | |||
| const [pageSize, setPageSize] = useState<number>(10) | |||
| const [openPreview, setOpenPreview] = useState(false); | |||
| const [detail, setDetail] = useState(null) | |||
| useEffect(() => { | |||
| setOpenPreview(openModel.openFairDetailModal) | |||
| }, [openModel.openFairDetailModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| }} | |||
| > | |||
| <Modal | |||
| open={openPreview} | |||
| centered | |||
| footer={null} | |||
| okText="招聘会详情" | |||
| maskClosable={false} | |||
| destroyOnClose | |||
| width={1000} | |||
| onCancel={() => { | |||
| dispatch({ type: 'openModel/getOpenFairDetailModal', payload: false }) | |||
| }} | |||
| afterOpenChange={async (open) => { | |||
| if (open) { | |||
| let res = await GetRecruitmentDetail({ id: id.id }) | |||
| setDetail(res.data) | |||
| } | |||
| }} | |||
| > | |||
| { | |||
| detail && <> | |||
| <Tabs | |||
| destroyInactiveTabPane={true} | |||
| type="card" | |||
| items={[ | |||
| { | |||
| label: '招聘会详情', | |||
| key: '1', | |||
| children: ( | |||
| <> | |||
| <Typography.Title level={3}>{detail.title}</Typography.Title> | |||
| <Typography.Paragraph> {detail.status === 1 ? <Tag color="green">进行中</Tag> : <Tag color="red">已结束</Tag>} 活动时间:{detail.open_date}-{detail.close_date ? detail.close_date : '待定'}</Typography.Paragraph> | |||
| <div className="ql-editor" dangerouslySetInnerHTML={{ __html: he.decode(detail.content) }} /> | |||
| </> | |||
| ), | |||
| }, | |||
| { | |||
| label: '参与企业', | |||
| key: '2', | |||
| children: ( | |||
| <> | |||
| <ProTable | |||
| search={false} | |||
| size='small' | |||
| bordered={true} | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| columns={[ | |||
| { | |||
| title: '企业名称', | |||
| dataIndex: 'company_name', | |||
| fixed: 'left', | |||
| search: false | |||
| }, { | |||
| title: '审核状态', | |||
| dataIndex: 'status', | |||
| search: false, | |||
| render: (_, record) => (<> | |||
| { | |||
| <> | |||
| <Select | |||
| value={record.status === 0 ? '待审' : record.status === 2 ? '审核通过' : '审核不通过'} | |||
| options={[{ name: '通过', id: 2 }, { name: '不通过', id: 3 }]} | |||
| fieldNames={selectfieldNames} | |||
| onChange={(value) => { | |||
| PostRecruitmentBookUpdate({ | |||
| id: record.id, | |||
| recruitment_id: id.id, | |||
| company_id: record.company_id, | |||
| status: value | |||
| }).then(res => { | |||
| actionRef.current.reload() | |||
| }) | |||
| }}> | |||
| </Select> | |||
| </> | |||
| } | |||
| </>), | |||
| }, | |||
| { | |||
| title: '操作', | |||
| key: 'option', | |||
| valueType: 'option', | |||
| fixed: 'right', | |||
| render: (_, record, action) => [ | |||
| <Button key='1' type='link' onClick={() => { | |||
| }}>移除企业</Button>, | |||
| ], | |||
| }, | |||
| ]} | |||
| 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>) => | |||
| GetRecruitmentBookList({ | |||
| page: page, | |||
| pagesize: pageSize, | |||
| sort: 'id', | |||
| sortby: 'desc', | |||
| recruitment_id: id.id | |||
| }).then(res => { | |||
| setList(res.data.recruitmentbooks) | |||
| setTotal(res.data.total) | |||
| }) | |||
| } | |||
| /> | |||
| </> | |||
| ), | |||
| } | |||
| ]} | |||
| > | |||
| </Tabs> | |||
| </> | |||
| } | |||
| </Modal> | |||
| </ConfigProvider > | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(MainFairListDetail); | |||
| @@ -4,10 +4,10 @@ import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, ConfigProvider } from 'antd'; | |||
| import { Button, ConfigProvider, Tag } from 'antd'; | |||
| import { listRecruitment, GetRecruitmentDetail } from '@/apis/api'; | |||
| const FairListPage: React.FC = ({ dispatch, getId, openModel }: any) => { | |||
| const MainFairListPage: React.FC = ({ dispatch, getId, openModel }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| @@ -37,69 +37,90 @@ const FairListPage: React.FC = ({ dispatch, getId, openModel }: any) => { | |||
| > | |||
| <ProTable | |||
| size='small' | |||
| bordered={true} | |||
| scroll={{ x: 1300 }} | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| columns={[ | |||
| { | |||
| title: '招聘会名称', | |||
| dataIndex: 'title', | |||
| width: 300, | |||
| fixed: 'left', | |||
| }, { | |||
| title: '地点', | |||
| dataIndex: 'address', | |||
| width: 200 | |||
| }, { | |||
| title: '开始时间', | |||
| dataIndex: 'open_date', | |||
| width: 200 | |||
| }, { | |||
| title: '开通状态', | |||
| dataIndex: 'status', | |||
| width: 100 | |||
| }, { | |||
| title: '参与的企业总数', | |||
| dataIndex: 'join_count', | |||
| width: 120 | |||
| }, { | |||
| title: '已审核企业总数', | |||
| dataIndex: 'audit_count', | |||
| width: 120 | |||
| }, { | |||
| title: '参与职位数', | |||
| dataIndex: 'job_count', | |||
| width: 100 | |||
| }, { | |||
| title: '需求人数', | |||
| dataIndex: 'recruiting_num', | |||
| width: 100 | |||
| }, | |||
| { | |||
| 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={() => { | |||
| }}>详情</Button>, | |||
| <Button key='3' type='link' onClick={() => { | |||
| GetRecruitmentDetail({ id: record.id }).then(res => { | |||
| sessionStorage.setItem('recruitment_info', JSON.stringify(res.data)) | |||
| history.push({ | |||
| pathname: '/main/fair/company' | |||
| }) | |||
| }) | |||
| }}>加入企业</Button>, | |||
| ], | |||
| columns={[{ | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| width: 80, | |||
| }, | |||
| { | |||
| title: '招聘会名称', | |||
| dataIndex: 'title', | |||
| width: 400, | |||
| }, { | |||
| title: '地点', | |||
| dataIndex: 'address', | |||
| width: 200, | |||
| search: false | |||
| }, { | |||
| title: '开始时间', | |||
| dataIndex: 'open_date', | |||
| width: 200, | |||
| search: false | |||
| }, { | |||
| title: '开通状态', | |||
| dataIndex: 'status', | |||
| width: 100, | |||
| render: (_, record) => (<> | |||
| { | |||
| <> | |||
| {record.status === 1 ? <Tag color="green">进行中</Tag> : <Tag color="red">已结束</Tag>} | |||
| </> | |||
| } | |||
| </>), | |||
| valueType: 'select', | |||
| valueEnum: { | |||
| 0: { text: '全部' }, | |||
| 1: { | |||
| text: '进行中', | |||
| }, | |||
| 2: { | |||
| text: '已结束', | |||
| } | |||
| }, | |||
| }, { | |||
| title: '参与的企业总数', | |||
| dataIndex: 'join_count', | |||
| width: 120, | |||
| search: false | |||
| }, { | |||
| title: '已审核企业总数', | |||
| dataIndex: 'audit_count', | |||
| width: 120, | |||
| search: false | |||
| }, { | |||
| title: '参与职位数', | |||
| dataIndex: 'job_count', | |||
| width: 100, | |||
| search: false | |||
| }, { | |||
| title: '需求人数', | |||
| dataIndex: 'recruiting_num', | |||
| width: 100, | |||
| search: false | |||
| }, | |||
| { | |||
| title: '操作', | |||
| width: 120, | |||
| key: 'option', | |||
| valueType: 'option', | |||
| render: (_, record, action) => [ | |||
| <Button key='1' type='link' onClick={() => { | |||
| setId(record) | |||
| dispatch({ type: 'openModel/getOpenModal', payload: true }) | |||
| }}>编辑</Button>, | |||
| <Button key='2' type='link' onClick={() => { | |||
| setId(record) | |||
| dispatch({ type: 'openModel/getOpenFairDetailModal', payload: true }) | |||
| }}>详情</Button> | |||
| ], | |||
| }, | |||
| ]} | |||
| rowKey="id" | |||
| pagination={{ | |||
| @@ -124,6 +145,7 @@ const FairListPage: React.FC = ({ dispatch, getId, openModel }: any) => { | |||
| sort: 'id', | |||
| sortby: 'desc', | |||
| keyword: params.title, | |||
| status: params.status ? params.status : 0 | |||
| }).then(res => { | |||
| setList(res.data.recruitments) | |||
| setTotal(res.data.total) | |||
| @@ -149,4 +171,4 @@ const FairListPage: React.FC = ({ dispatch, getId, openModel }: any) => { | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, | |||
| openModel | |||
| }))(FairListPage); | |||
| }))(MainFairListPage); | |||
| @@ -1,14 +1,13 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType} from '@ant-design/pro-components'; | |||
| import { connect, history } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, ConfigProvider, Image } from 'antd'; | |||
| import { Button, ConfigProvider, Tag } from 'antd'; | |||
| import { GetFeedbackList } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel }: any) => { | |||
| const MainFeedbackListPage: React.FC = ({ dispatch, getId, openModel }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| @@ -24,17 +23,22 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| actionRef.current.reload(); | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| colorLink: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProTable | |||
| size='small' | |||
| bordered={true} | |||
| scroll={{ x: 1300 }} | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| @@ -91,7 +95,7 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| sort: 'id', | |||
| sortby: 'desc', | |||
| keyword: params.name, | |||
| customer_id: params.customer_id | |||
| }).then(res => { | |||
| setList(res.data.feedbacks) | |||
| setTotal(res.data.total) | |||
| @@ -100,16 +104,14 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| headerTitle="反馈列表" | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel , openModel}: any) => ({ | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, | |||
| openModel | |||
| }))(PagesMainInformationArticleTable); | |||
| }))(MainFeedbackListPage); | |||
| @@ -41,9 +41,6 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| setUploadedFileDocName(filename); | |||
| }; | |||
| const [richTxt, setRichTxt] = useState<string | number>(''); // 文章内容 | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| @@ -70,8 +67,12 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await GetArticleDetail({ id: id }) | |||
| setUploadedFilephotoName(res.data.cover_img) | |||
| setDetail(res.data) | |||
| return res.data; | |||
| } else { | |||
| setDetail(null) | |||
| setUploadedFilephotoName('') | |||
| return { | |||
| title: '', | |||
| cover_img: '', | |||
| @@ -118,24 +119,18 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| /> | |||
| <Row gutter={[16, 16]}> | |||
| { | |||
| { | |||
| detail ? | |||
| <Col span={4}> | |||
| <UploadModel multiple={false} form_name="cover_img" image_length={1} uploadTxt="上传封面图" image_type={1} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| <Col span={24} style={{ display: 'flex' }}> | |||
| <UploadModel multiple={false} form_name="cover_img" image_length={1} uploadTxt="上传封面图" image_type={3} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| {uploadedFilephotoName ? <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginLeft: '16px', marginTop: '32px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${detail?.cover_img}`} style={{ marginLeft: '16px', marginTop: '32px', width: '100px', height: '100px' }}></Image>} | |||
| </Col> : <> | |||
| <Col span={4}> | |||
| <UploadModel multiple={false} form_name="cover_img" image_length={1} uploadTxt="上传封面图" image_type={1} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| <Col span={24} style={{ display: 'flex' }}> | |||
| <UploadModel multiple={false} form_name="cover_img" image_length={1} uploadTxt="上传封面图" image_type={3} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| {uploadedFilephotoName ? <Col span={8}> <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||
| </Col> | |||
| </> | |||
| } | |||
| { | |||
| detail ? | |||
| <Col span={4}> | |||
| {uploadedFilephotoName ? <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginBottom: '16px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${detail?.cover_img}`} style={{ marginTop: '16px', width: '200px', height: '200px' }}></Image>} | |||
| </Col> : <> | |||
| {uploadedFilephotoName ? <Col span={4}> <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||
| </> | |||
| } | |||
| </Row> | |||
| <ProFormSwitch fieldProps={{ | |||
| checked: showUplaod, | |||
| @@ -152,7 +147,6 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| </> | |||
| } | |||
| <ProFormSelect | |||
| showSearch | |||
| name="section_id" | |||
| @@ -182,7 +176,6 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| return ( | |||
| <RichComponent placeholder="请输入文章内容" defaultValue={content} | |||
| onChange={(value) => { | |||
| setRichTxt(value) | |||
| form.formRef.current.setFieldsValue({ | |||
| content: value | |||
| }) | |||
| @@ -1,14 +1,15 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType} from '@ant-design/pro-components'; | |||
| import { connect, history } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable | |||
| ProTable, TableDropdown,ProFormSelect | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, ConfigProvider, Image } from 'antd'; | |||
| import { listArticle } from '@/apis/api'; | |||
| import { Button, Image, ConfigProvider, Select , Tag} from 'antd'; | |||
| import { listArticle, listSection} from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| const selectfieldNames = { label: 'name', value: 'id', children: 'childs' }; | |||
| const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel }: any) => { | |||
| const PagesMainInformationArticleTable: React.FC = ({ dispatch, openModel, getId }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| @@ -24,44 +25,95 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| actionRef.current.reload(); | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| colorLink: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProTable | |||
| size='small' | |||
| bordered={true} | |||
| scroll={{ x: 1300 }} | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| columns={[ | |||
| columns={[ { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| width: 100, | |||
| search: false, | |||
| }, | |||
| { | |||
| title: '文章名', | |||
| dataIndex: 'title' | |||
| dataIndex: 'title', | |||
| width: 400, | |||
| }, | |||
| { | |||
| title: '所属栏目', | |||
| 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', | |||
| search: false, | |||
| render: (_, record) => (<> | |||
| <Image src={`${Imageprefix}${record.cover_img}`} width={40} height={40} preview={false} /> | |||
| <Image src={`${Imageprefix}${record.cover_img}`} width={40} height={40}/> | |||
| </> | |||
| ) | |||
| }, | |||
| { | |||
| title: '置顶', | |||
| dataIndex: 'stick_top', | |||
| search: false | |||
| search: false, | |||
| render: (_, record) => (<> | |||
| { | |||
| <> | |||
| {record.stick_top === 1 ? <Tag color="green">置顶</Tag> : <Tag>未置顶</Tag>} | |||
| </> | |||
| } | |||
| </>), | |||
| }, | |||
| { | |||
| title: '热门', | |||
| dataIndex: 'hot', | |||
| search: false | |||
| search: false, | |||
| render: (_, record) => (<> | |||
| { | |||
| <> | |||
| {record.hot === 1 ? <Tag >普通</Tag> : <Tag color="red">热门推荐</Tag>} | |||
| </> | |||
| } | |||
| </>), | |||
| }, | |||
| { | |||
| title: '作者', | |||
| @@ -108,7 +160,7 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| sort: 'id', | |||
| sortby: 'desc', | |||
| keyword: params.name, | |||
| section_id: params.section_id | |||
| }).then(res => { | |||
| setList(res.data.articles) | |||
| setTotal(res.data.total) | |||
| @@ -124,16 +176,11 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| ]} | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel , openModel}: any) => ({ | |||
| dictModel, | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(PagesMainInformationArticleTable); | |||
| }))(PagesMainInformationArticleTable); | |||
| @@ -56,14 +56,29 @@ const PagesMainInformationSectionCreate: React.FC = ({ dispatch, dictModel, open | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await GetSectionDetail({ id: id }) | |||
| res.data.parent_id = res.data.parent_id == -1 ? null : res.data.parent_id | |||
| return res.data; | |||
| if (id.nextlevel) { | |||
| setDetail(null) | |||
| setUploadedFilephotoName('') | |||
| return { | |||
| name: '', | |||
| cover_img: '', | |||
| parent_id: id.nextlevel, | |||
| description: '', | |||
| display: 1 | |||
| }; | |||
| } else { | |||
| let res = await GetSectionDetail({ id: id.id }) | |||
| setUploadedFilephotoName(res.data.cover_img) | |||
| setDetail(res.data) | |||
| return res.data; | |||
| } | |||
| } else { | |||
| setDetail(null) | |||
| setUploadedFilephotoName('') | |||
| return { | |||
| name: '', | |||
| cover_img: '', | |||
| parent_id: null, | |||
| parent_id: -1, | |||
| description: '', | |||
| display: 1 | |||
| } | |||
| @@ -77,15 +92,21 @@ const PagesMainInformationSectionCreate: React.FC = ({ dispatch, dictModel, open | |||
| render: (_, dom) => { return <Flex justify='flex-end'> <Space>{dom}</Space></Flex> }, | |||
| onReset: () => { | |||
| setDetail(null) | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| setOpenPreview(false) | |||
| } | |||
| }} | |||
| onFinish={async (values) => { | |||
| values.parent_id = values.parent_id ? values.parent_id : -1; | |||
| values.cover_img = uploadedFilephotoName ? uploadedFilephotoName : ''; | |||
| if (id.nextlevel) { | |||
| values.parent_id = id.nextlevel; | |||
| } else if (detail && detail.id) { | |||
| values.parent_id = detail.parent_id | |||
| } else { | |||
| values.parent_id = -1 | |||
| } | |||
| values.cover_img = uploadedFilephotoName ? uploadedFilephotoName : ''; | |||
| console.log(values) | |||
| if (id) { | |||
| values.id = id; | |||
| if (detail) { | |||
| values.id = id.id; | |||
| let res = await updateSection(values) | |||
| message.success('提交成功') | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| @@ -112,38 +133,17 @@ const PagesMainInformationSectionCreate: React.FC = ({ dispatch, dictModel, open | |||
| <Row gutter={[16, 16]}> | |||
| { | |||
| detail ? | |||
| <Col span={4}> | |||
| <UploadModel multiple={false} form_name="cover_img" image_length={1} uploadTxt="上传封面图" image_type={1} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| <Col span={24} style={{ display: 'flex' }}> | |||
| <UploadModel multiple={false} form_name="cover_img" image_length={1} uploadTxt="上传封面图" image_type={3} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| {uploadedFilephotoName ? <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginLeft: '16px', marginTop: '32px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${detail?.cover_img}`} style={{ marginLeft: '16px', marginTop: '32px', width: '100px', height: '100px' }}></Image>} | |||
| </Col> : <> | |||
| <Col span={4}> | |||
| <UploadModel multiple={false} form_name="cover_img" image_length={1} uploadTxt="上传封面图" image_type={1} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| <Col span={24} style={{ display: 'flex' }}> | |||
| <UploadModel multiple={false} form_name="cover_img" image_length={1} uploadTxt="上传封面图" image_type={3} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| {uploadedFilephotoName ? <Col span={8}> <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||
| </Col> | |||
| </> | |||
| } | |||
| { | |||
| detail ? | |||
| <Col span={4}> | |||
| {uploadedFilephotoName ? <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginBottom: '16px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${detail?.cover_img}`} style={{ marginTop: '16px', width: '200px', height: '200px' }}></Image>} | |||
| </Col> : <> | |||
| {uploadedFilephotoName ? <Col span={4}> <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||
| </> | |||
| } | |||
| </Row> | |||
| <ProFormSelect | |||
| showSearch | |||
| name="parent_id" | |||
| label="上级栏目" | |||
| placeholder="请选择上级栏目" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames | |||
| }} | |||
| request={(keyword) => | |||
| listSection({ page: 1, pagesize: 100, keyword: keyword.keyWords }).then(res => { | |||
| return res.data.sections; | |||
| }) | |||
| } | |||
| /> | |||
| <ProFormSegmented | |||
| name="display" | |||
| label="是否显示" | |||
| @@ -1,14 +1,14 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType} from '@ant-design/pro-components'; | |||
| import { connect, history } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable | |||
| ProTable, TableDropdown | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, ConfigProvider , Image} from 'antd'; | |||
| import { listSection } from '@/apis/api'; | |||
| import { Button, Image, ConfigProvider, Select } from 'antd'; | |||
| import { listSection} from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| const PagesMainInformationSectionTable: React.FC = ({ dispatch,getId, openModel }: any) => { | |||
| const PagesMainInformationSectionTable: React.FC = ({ dispatch, openModel, getId }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| @@ -24,21 +24,30 @@ const PagesMainInformationSectionTable: React.FC = ({ dispatch,getId, openModel | |||
| actionRef.current.reload(); | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| colorLink: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProTable | |||
| size='small' | |||
| bordered={true} | |||
| scroll={{ x: 1300 }} | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| columns={[ | |||
| { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| width: 100, | |||
| search: false, | |||
| }, | |||
| { | |||
| title: '栏目名称', | |||
| dataIndex: 'name' | |||
| @@ -48,7 +57,7 @@ const PagesMainInformationSectionTable: React.FC = ({ dispatch,getId, openModel | |||
| dataIndex: 'cover_img', | |||
| search: false, | |||
| render: (_, record) => (<> | |||
| <Image src={`${Imageprefix}${record.cover_img}`} width='100%' height={40} preview={false} /> | |||
| <Image src={`${Imageprefix}${record.cover_img}`} width={40} height={40} /> | |||
| </> | |||
| ) | |||
| }, | |||
| @@ -65,12 +74,17 @@ const PagesMainInformationSectionTable: React.FC = ({ dispatch,getId, openModel | |||
| fixed: 'right', | |||
| render: (_, record, action) => [ | |||
| <Button key='1' type='link' onClick={() => { | |||
| setId(record.id) | |||
| setId(record) | |||
| dispatch({ type: 'openModel/getOpenModal', payload: true }) | |||
| }}>编辑</Button>, | |||
| <Button key='1' 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> | |||
| }}>删除</Button>, | |||
| ], | |||
| }, | |||
| ]} | |||
| @@ -111,18 +125,16 @@ const PagesMainInformationSectionTable: React.FC = ({ dispatch,getId, openModel | |||
| 添加栏目/频道 | |||
| </Button> | |||
| ]} | |||
| expandable={{ | |||
| childrenColumnName: 'childs', // 指定子节点数据的字段名 | |||
| }} | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel , openModel}: any) => ({ | |||
| dictModel, | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(PagesMainInformationSectionTable); | |||
| }))(PagesMainInformationSectionTable); | |||
| @@ -0,0 +1,102 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProFormText, | |||
| ProFormSelect, | |||
| ProForm | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, Modal, message } from 'antd'; | |||
| import { PostCustomerUpdate, GetCustomerDetail } from '@/apis/api'; | |||
| const selectfieldNames = { label: 'full_name', value: 'id' }; | |||
| const PagesMainJobseekerAccountCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const formRef = useRef<ProFormInstance>(); | |||
| const [openPreview, setOpenPreview] = useState(false); | |||
| const [detail, setDetail] = useState<ResumeType.account | null>(null) | |||
| useEffect(() => { | |||
| setOpenPreview(openModel.openModal) | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <Modal | |||
| open={openPreview} | |||
| title='编辑求职者账号' | |||
| centered | |||
| maskClosable={false} | |||
| footer={null} | |||
| destroyOnClose | |||
| width={1000} | |||
| onCancel={() => { | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| }} | |||
| > | |||
| <ProForm<CompanyType.Department> | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await GetCustomerDetail({ id: id.id }) | |||
| return res.data; | |||
| } | |||
| }} | |||
| submitter={{ | |||
| searchConfig: { | |||
| resetText: '取消', | |||
| submitText: '保存', | |||
| }, | |||
| render: (_, dom) => { return <Flex justify='flex-end'> <Space>{dom}</Space></Flex> }, | |||
| onReset: () => { | |||
| setDetail(null) | |||
| setOpenPreview(false) | |||
| } | |||
| }} | |||
| onFinish={async (values) => { | |||
| console.log(values) | |||
| values.id = id.id; | |||
| let res = await PostCustomerUpdate(values) | |||
| message.success('提交成功') | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| }} | |||
| > | |||
| <ProFormText | |||
| name="mobile" | |||
| label="手机号" | |||
| placeholder="请输入手机号" | |||
| /> | |||
| <ProFormText | |||
| name="email" | |||
| label="邮箱" | |||
| placeholder="请输入邮箱" | |||
| /> | |||
| </ProForm> | |||
| </Modal> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainJobseekerAccountCreate); | |||
| @@ -0,0 +1,165 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, ConfigProvider, Select } from 'antd'; | |||
| import { GetCustomerList, GetCustomerDetail, PostCustomerUpdate, PostCustomerDel } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| const selectfieldNames = { label: 'name', value: 'id' }; | |||
| const PagesMainJobseekerAccountTable: React.FC = ({ dispatch, getId, dictModel, openModel }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| const [page, setPage] = useState<number>(1) | |||
| const [pageSize, setPageSize] = useState<number>(10) | |||
| const setId = (id: number) => { | |||
| getId(id) | |||
| } | |||
| useEffect(() => { | |||
| if (!openModel.openModal) { | |||
| actionRef.current.reload(); | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| colorLink: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProTable | |||
| scroll={{ x: 1300 }} | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| columns={[ | |||
| { | |||
| title: '用户', | |||
| dataIndex: 'username', | |||
| width: 200 | |||
| }, { | |||
| title: '邮箱', | |||
| dataIndex: 'email', | |||
| search: false | |||
| }, | |||
| { | |||
| title: '联系方式', | |||
| dataIndex: 'mobile', | |||
| search: false | |||
| }, | |||
| { | |||
| title: '登录次数', | |||
| dataIndex: 'login_count', | |||
| search: false | |||
| }, | |||
| { | |||
| title: '账号状态', | |||
| dataIndex: 'status', | |||
| render: (_, record) => (<> | |||
| { | |||
| <> | |||
| <Select style={{ width: '100%' }} | |||
| value={record.status === 1 ? '使用' : '禁用'} | |||
| options={[{ name: '正常', id: 1 }, { name: '禁用', id: 2 }]} | |||
| fieldNames={selectfieldNames} | |||
| onChange={(value) => { | |||
| PostCustomerUpdate({ | |||
| id: record.id, | |||
| status: value | |||
| }).then(res => { | |||
| actionRef.current.reload() | |||
| }) | |||
| }}> | |||
| </Select> | |||
| </> | |||
| } | |||
| </>), | |||
| valueType: 'select', | |||
| valueEnum: { | |||
| 0: { text: '全部' }, | |||
| 1: { | |||
| text: '使用中', | |||
| }, | |||
| 2: { | |||
| text: '已禁用', | |||
| } | |||
| }, | |||
| }, | |||
| { | |||
| title: '注册日期', | |||
| dataIndex: 'created_at', | |||
| search: false | |||
| }, | |||
| { | |||
| title: '操作', | |||
| width: 100, | |||
| key: 'option', | |||
| valueType: 'option', | |||
| fixed: 'right', | |||
| render: (_, record, action) => [ | |||
| <Button key='1' type='link' onClick={() => { | |||
| setId(record) | |||
| dispatch({ type: 'openModel/getOpenModal', payload: true }) | |||
| }}>编辑</Button>, | |||
| ], | |||
| }, | |||
| ]} | |||
| 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>) => | |||
| GetCustomerList({ | |||
| page: page, | |||
| pagesize: pageSize, | |||
| sort: 'id', | |||
| sortby: 'desc', | |||
| keyword: params.username, | |||
| status: params.status, | |||
| role: 1 | |||
| }).then(res => { | |||
| setList(res.data.customers) | |||
| setTotal(res.data.total) | |||
| }) | |||
| } | |||
| headerTitle="简历列表" | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, | |||
| openModel | |||
| }))(PagesMainJobseekerAccountTable); | |||
| @@ -1,48 +1,31 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProFormText, | |||
| ProFormSegmented, | |||
| ProFormSelect, | |||
| ProForm, | |||
| FormControlRender, | |||
| ProFormDependency, | |||
| ProFormSwitch | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, Modal, message, Image, Row, Col, Switch, Form, Typography } from 'antd'; | |||
| import { addArticle, updateArticle, listSection, GetArticleDetail } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| import UploadModel from '@/components/Common/upload'; | |||
| import DragUpload from '@/components/Common/dragupload'; | |||
| import RichComponent from '@/components/Common/rich'; | |||
| const selectfieldNames = { label: 'name', value: 'id' }; | |||
| import { ConfigProvider, Modal, Tabs } from 'antd'; | |||
| import FormJobseekerResumeBasic from '../resume/basic'; | |||
| import FormJobseekerResumeContact from '../resume/contact'; | |||
| import FormJobseekerResumeCredential from '../resume/credential'; | |||
| import FormJobseekerResumeExperience from '../resume/experience'; | |||
| import FormJobseekerResumeIntroduction from '../resume/introduction'; | |||
| import FormJobseekerResumeSkill from '../resume/skill'; | |||
| import FormJobseekerResumeTrain from '../resume/train'; | |||
| import FormJobseekerResumeIntentionBasic from '../resume/intention/basic'; | |||
| import FormJobseekerResumeIntentionArea from '../resume/intention/area'; | |||
| import FormJobseekerResumeIntentionIndustry from '../resume/intention/industry'; | |||
| import FormJobseekerResumeIntentionPost from '../resume/intention/post'; | |||
| const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const formRef = useRef<ProFormInstance>(); | |||
| const PagesMainJobseekerListCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const [openPreview, setOpenPreview] = useState(false); | |||
| const [detail, setDetail] = useState<InformationType.article | null>(null) | |||
| useEffect(() => { | |||
| setOpenPreview(openModel.openModal) | |||
| }, [openModel.openModal]) | |||
| const [uploadedFilephotoName, setUploadedFilephotoName] = useState<string>(''); | |||
| const handleFileUploadedphoto = (filename: string) => { | |||
| setUploadedFilephotoName(filename); | |||
| }; | |||
| const [showUplaod, setShowUplaod] = useState<boolean>(false); | |||
| const [uploadedFileDocName, setUploadedFileDocName] = useState<string>(''); | |||
| const handleFileUploadedDoc = (filename: string) => { | |||
| setUploadedFileDocName(filename); | |||
| }; | |||
| const [richTxt, setRichTxt] = useState<string | number>(''); // 文章内容 | |||
| return ( | |||
| <> | |||
| @@ -55,175 +38,123 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| > | |||
| <Modal | |||
| open={openPreview} | |||
| title={id ? '编辑文章' : '添加文章'} | |||
| title={id ? '编辑简历' : '添加简历'} | |||
| centered | |||
| maskClosable={false} | |||
| footer={null} | |||
| destroyOnClose | |||
| width={1000} | |||
| width={'80%'} | |||
| onCancel={() => { | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| }} | |||
| > | |||
| <ProForm<InformationType.article> | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await GetArticleDetail({ id: id }) | |||
| return res.data; | |||
| } else { | |||
| return { | |||
| title: '', | |||
| cover_img: '', | |||
| doc_url: '', | |||
| section_id: null, | |||
| content: '', | |||
| stick_top: 0, | |||
| hot: 0, | |||
| author: '' | |||
| } | |||
| } | |||
| }} | |||
| submitter={{ | |||
| searchConfig: { | |||
| resetText: '取消', | |||
| submitText: '保存', | |||
| <Tabs | |||
| destroyInactiveTabPane={true} | |||
| type="card" | |||
| items={[ | |||
| { | |||
| label: '基本信息', | |||
| key: '1', | |||
| children: ( | |||
| <> | |||
| <FormJobseekerResumeBasic id={id}></FormJobseekerResumeBasic> | |||
| </> | |||
| ), | |||
| }, | |||
| render: (_, dom) => { return <Flex justify='flex-end'> <Space>{dom}</Space></Flex> }, | |||
| onReset: () => { | |||
| setDetail(null) | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| } | |||
| }} | |||
| onFinish={async (values) => { | |||
| values.cover_img = uploadedFilephotoName ? uploadedFilephotoName : ''; | |||
| console.log(values) | |||
| if (id) { | |||
| values.id = id; | |||
| let res = await updateArticle(values) | |||
| message.success('提交成功') | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| } else { | |||
| let res = await addArticle(values) | |||
| message.success('提交成功') | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| } | |||
| }} | |||
| > | |||
| <ProFormText | |||
| label="文章标题" | |||
| name="title" | |||
| placeholder="请输入文章标题" | |||
| rules={[{ required: true, message: '请输入文章标题' }]} | |||
| /> | |||
| <Row gutter={[16, 16]}> | |||
| { | |||
| detail ? | |||
| <Col span={4}> | |||
| <UploadModel multiple={false} form_name="cover_img" image_length={1} uploadTxt="上传封面图" image_type={1} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| </Col> : <> | |||
| <Col span={4}> | |||
| <UploadModel multiple={false} form_name="cover_img" image_length={1} uploadTxt="上传封面图" image_type={1} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| </Col> | |||
| label: '联系信息', | |||
| key: '2', | |||
| children: ( | |||
| <> | |||
| <FormJobseekerResumeContact id={id}></FormJobseekerResumeContact> | |||
| </> | |||
| } | |||
| ), | |||
| }, | |||
| { | |||
| detail ? | |||
| <Col span={4}> | |||
| {uploadedFilephotoName ? <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginBottom: '16px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${detail?.cover_img}`} style={{ marginTop: '16px', width: '200px', height: '200px' }}></Image>} | |||
| </Col> : <> | |||
| {uploadedFilephotoName ? <Col span={4}> <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||
| label: '个人简介', | |||
| key: '3', | |||
| children: ( | |||
| <> | |||
| <FormJobseekerResumeIntroduction id={id}></FormJobseekerResumeIntroduction> | |||
| </> | |||
| ), | |||
| }, | |||
| { | |||
| label: '专业技能掌握程度', | |||
| key: '4', | |||
| children: ( | |||
| <> | |||
| <FormJobseekerResumeSkill id={id}></FormJobseekerResumeSkill> | |||
| </> | |||
| ), | |||
| }, | |||
| { | |||
| label: '培训经历', | |||
| key: '5', | |||
| children: ( | |||
| <> | |||
| <FormJobseekerResumeTrain id={id}></FormJobseekerResumeTrain> | |||
| </> | |||
| ), | |||
| }, | |||
| { | |||
| label: '工作经历', | |||
| key: '6', | |||
| children: ( | |||
| <> | |||
| <FormJobseekerResumeExperience id={id}></FormJobseekerResumeExperience> | |||
| </> | |||
| ), | |||
| }, | |||
| { | |||
| label: '证书', | |||
| key: '7', | |||
| children: ( | |||
| <> | |||
| <FormJobseekerResumeCredential id={id}></FormJobseekerResumeCredential> | |||
| </> | |||
| ), | |||
| }, | |||
| { | |||
| label: '基本意向', | |||
| key: '8', | |||
| children: ( | |||
| <> | |||
| <FormJobseekerResumeIntentionBasic id={id}></FormJobseekerResumeIntentionBasic> | |||
| </> | |||
| ), | |||
| }, { | |||
| label: '意向地区', | |||
| key: '9', | |||
| children: ( | |||
| <> | |||
| <FormJobseekerResumeIntentionArea id={id}></FormJobseekerResumeIntentionArea> | |||
| </> | |||
| ), | |||
| }, { | |||
| label: '意向行业', | |||
| key: '10', | |||
| children: ( | |||
| <> | |||
| <FormJobseekerResumeIntentionIndustry id={id}></FormJobseekerResumeIntentionIndustry> | |||
| </> | |||
| ), | |||
| }, { | |||
| label: '意向职位', | |||
| key: '11', | |||
| children: ( | |||
| <> | |||
| <FormJobseekerResumeIntentionPost id={id}></FormJobseekerResumeIntentionPost> | |||
| </> | |||
| ), | |||
| } | |||
| </Row> | |||
| <ProFormSwitch fieldProps={{ | |||
| checked: showUplaod, | |||
| checkedChildren: '关闭上传文件', | |||
| unCheckedChildren: '开启上传文件', | |||
| onChange: (val) => { | |||
| setShowUplaod(val) | |||
| } | |||
| }} /> | |||
| { | |||
| showUplaod && <> | |||
| <DragUpload form_name="doc_url" uploadTxt="上传文件" onUploadComplete={handleFileUploadedDoc}></DragUpload> | |||
| <Typography.Paragraph copyable>链接:{`${Imageprefix}${uploadedFileDocName}`}</Typography.Paragraph> | |||
| </> | |||
| } | |||
| <ProFormSelect | |||
| showSearch | |||
| name="section_id" | |||
| label="栏目/频道" | |||
| placeholder="请选择栏目/频道" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames | |||
| }} | |||
| request={(keyword) => | |||
| listSection({ page: 1, pagesize: 100, keyword: keyword.keyWords }).then(res => { | |||
| return res.data.sections; | |||
| }) | |||
| } | |||
| /> | |||
| <Row gutter={[16, 16]}> | |||
| <Col span={24}> | |||
| <Form.Item | |||
| name='content' | |||
| label="文章内容" | |||
| rules={[{ required: true }]} | |||
| > | |||
| <FormControlRender> | |||
| {() => { | |||
| return ( | |||
| <ProFormDependency name={['content']} > | |||
| {({ content }, form) => { | |||
| return ( | |||
| <RichComponent placeholder="请输入文章内容" defaultValue={content} | |||
| onChange={(value) => { | |||
| setRichTxt(value) | |||
| form.formRef.current.setFieldsValue({ | |||
| content: value | |||
| }) | |||
| }}></RichComponent> | |||
| ); | |||
| }} | |||
| </ProFormDependency> | |||
| ); | |||
| }} | |||
| </FormControlRender> | |||
| </Form.Item> | |||
| </Col> | |||
| </Row> | |||
| <ProFormSegmented | |||
| name="stick_top" | |||
| label="是否置顶" | |||
| request={async () => [ | |||
| { label: '是', value: 1 }, | |||
| { label: '否', value: 2 } | |||
| ]} | |||
| rules={[{ required: true, message: '请选择是否置顶' }]} | |||
| /> | |||
| <ProFormSegmented | |||
| name="hot" | |||
| label="成为热门" | |||
| request={async () => [ | |||
| { label: '普通', value: 1 }, | |||
| { label: '热门推荐', value: 2 } | |||
| ]} | |||
| rules={[{ required: true, message: '请选择是否成为热门' }]} | |||
| /> | |||
| ]} | |||
| > | |||
| <ProFormText | |||
| name="author" | |||
| label="作者" | |||
| placeholder="请输入作者" | |||
| /> | |||
| </Tabs> | |||
| </ProForm> | |||
| </Modal> | |||
| </ConfigProvider> | |||
| </ConfigProvider > | |||
| </> | |||
| ); | |||
| }; | |||
| @@ -232,4 +163,4 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainInformationArticleCreate); | |||
| }))(PagesMainJobseekerListCreate); | |||
| @@ -0,0 +1,368 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Select, Descriptions, Radio, Modal, message, Image, Button, Row, Col, Input, Segmented, DatePicker } from 'antd'; | |||
| import { GetJobseekerDetail } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| import he from 'he'; | |||
| const selectfieldNames = { label: 'name', value: 'id' }; | |||
| import * as htmlDocx from "html-docx-js-typescript"; | |||
| import { saveAs } from 'file-saver' | |||
| const PagesMainJobseekerListExport: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const [openPreview, setOpenPreview] = useState(false); | |||
| const [detail, setDetail] = useState(null) | |||
| useEffect(() => { | |||
| setOpenPreview(openModel.openResumeDetailModal) | |||
| }, [openModel.openResumeDetailModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| }} | |||
| > | |||
| <Modal | |||
| open={openPreview} | |||
| centered | |||
| okText="下载简历" | |||
| maskClosable={false} | |||
| destroyOnClose | |||
| width={1000} | |||
| onCancel={() => { | |||
| dispatch({ type: 'openModel/getOpenResumeDetailModal', payload: false }) | |||
| }} | |||
| afterOpenChange={async (open) => { | |||
| if (open) { | |||
| let res = await GetJobseekerDetail({ customer_id: id.customer_id, application_id: id.id }) | |||
| setDetail(res.data) | |||
| } | |||
| }} | |||
| onOk={async () => { | |||
| const htmlContent = document.getElementById('export-container'); // 获取需要转换的HTML内容 | |||
| const convertedFile = htmlDocx.asBlob(htmlContent?.outerHTML!); | |||
| const fileData = await convertedFile; | |||
| saveAs((fileData as Blob), detail.seekername + '个人简历.docx') | |||
| }} | |||
| > | |||
| { | |||
| detail && <> | |||
| <div id="export-container"> | |||
| <h1 style={{ | |||
| fontWeight: 'bold', | |||
| textAlign: 'center', | |||
| marginBottom: '20px' | |||
| }}>个人简历</h1> | |||
| <div> | |||
| <div> | |||
| <div style={{ color: '#4fbe70', margin: '10px 0'}}> | |||
| <h3 >基本资料</h3> | |||
| </div> | |||
| <div> | |||
| <table border={1} style={{ borderCollapse: 'collapse', textAlign: 'center', width: '100%' }}> | |||
| <tbody> | |||
| <tr style={{ height: '30px' }}> | |||
| <td>姓 名</td> | |||
| <td>{detail.seekername}</td> | |||
| <td>性 别</td> | |||
| <td>{detail.gender}</td> | |||
| <td rowspan={6} style={{ textAlign: 'center', verticalAlign: 'middle' }}> | |||
| <img src={Imageprefix + detail.photo} alt="" width="90" height="150" /> | |||
| </td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td>出生日期</td> | |||
| <td>{detail.dob}</td> | |||
| <td>职 称</td> | |||
| <td>{detail.title_txt}</td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td>现居住地</td> | |||
| <td>{detail.now_level1_txt ? detail.now_level1_txt : ''}{detail.now_level2_txt ? detail.now_level2_txt : ''}{detail.now_level3_txt ? detail.now_level3_txt : ''}{detail.now_level4_txt ? detail.now_level4_txt : ''} | |||
| </td> | |||
| <td>户口所在地</td> | |||
| <td>{detail.now_level1_txt ? detail.now_level1_txt : ''}{detail.now_level2_txt ? detail.now_level2_txt : ''}{detail.now_level3_txt ? detail.now_level3_txt : ''}{detail.now_level4_txt ? detail.now_level4_txt : ''} | |||
| </td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td>学 历</td> | |||
| <td>{detail.education_txt}</td> | |||
| <td>婚姻状况</td> | |||
| <td>{detail.marital_status_txt}</td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td>民 族</td> | |||
| <td>{detail.ethnicity_txt}</td> | |||
| <td>政治面貌</td> | |||
| <td>{detail.political_status_txt}</td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td>体 重</td> | |||
| <td>{detail.weight}kg</td> | |||
| <td>身 高</td> | |||
| <td>{detail.height}cm</td> | |||
| </tr> | |||
| </tbody> | |||
| </table> | |||
| </div> | |||
| </div> | |||
| {/* 个人简介 */} | |||
| <div> | |||
| <div style={{ color: '#4fbe70', margin: '10px 0'}}> | |||
| <h3 >个人简介</h3> | |||
| </div> | |||
| <div> | |||
| <table border={1} style={{ borderCollapse: 'collapse', textAlign: 'center', width: '100%' }}> | |||
| <tbody> | |||
| <tr > | |||
| <td style={{ width: '20%' }}>个人简介</td> | |||
| <td style={{ width: '80%' }}> | |||
| <div dangerouslySetInnerHTML={{ __html: he.decode(detail.introduction) }} /></td> | |||
| </tr> | |||
| </tbody> | |||
| </table> | |||
| </div> | |||
| </div> | |||
| {/* 求职期望 */} | |||
| <div> | |||
| <div style={{ color: '#4fbe70', margin: '10px 0'}}> | |||
| <h3 >求职期望</h3> | |||
| </div> | |||
| <div> | |||
| <table border={1} style={{ borderCollapse: 'collapse', textAlign: 'center', width: '100%' }}> | |||
| <tbody> | |||
| <tr style={{ height: '30px' }}> | |||
| <td style={{ width: '20%' }}>求职类型</td> | |||
| <td style={{ width: '30%' }}>{detail.job_type_txt}</td> | |||
| <td style={{ width: '20%' }}>可到职日期</td> | |||
| <td style={{ width: '30%' }}>{detail.available_date_txt}</td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td style={{ width: '20%' }}>人才类型</td> | |||
| <td style={{ width: '30%' }}>{detail.talent_type_txt}</td> | |||
| <td style={{ width: '20%' }}>工作经验</td> | |||
| <td style={{ width: '30%' }}>{detail.work_experience}</td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td style={{ width: '20%' }}>月薪要求</td> | |||
| <td colspan={3} style={{ width: '80%' }}>{detail.salary_range_txt}</td> | |||
| </tr> | |||
| { | |||
| detail.desire_areas && detail.desire_areas.map((item, index) => ( | |||
| <tr style={{ height: '30px' }}> | |||
| <td style={{ width: '20%' }}>期望工作地区{index + 1}</td> | |||
| <td colspan={3} style={{ width: '80%' }}> | |||
| {item.level1_txt ? item.level1_txt : ''} | |||
| {item.level2_txt ? item.level2_txt : ''} | |||
| {item.level3_txt ? item.level3_txt : ''} | |||
| {item.level4_txt ? item.level4_txt : ''} | |||
| </td> | |||
| </tr> | |||
| )) | |||
| } | |||
| { | |||
| detail.desire_industrys && detail.desire_industrys.map((item, index) => ( | |||
| <tr style={{ height: '30px' }}> | |||
| <td style={{ width: '20%' }}>期望从事行业{index + 1}</td> | |||
| <td colspan={3} style={{ width: '80%' }}> | |||
| {item.industry_txt ? item.industry_txt : ''} | |||
| </td> | |||
| </tr> | |||
| )) | |||
| } | |||
| { | |||
| detail.desire_positions && detail.desire_positions.map((item, index) => ( | |||
| <tr style={{ height: '30px' }}> | |||
| <td style={{ width: '20%' }}>期望从事职位{index + 1}</td> | |||
| <td colspan={3} style={{ width: '80%' }}> | |||
| {item.level1_txt ? item.level1_txt : ''} | |||
| {item.level2_txt ? item.level2_txt : ''} | |||
| </td> | |||
| </tr> | |||
| )) | |||
| } | |||
| </tbody> | |||
| </table> | |||
| </div> | |||
| </div> | |||
| {/* 教育培训 */} | |||
| <div> | |||
| <div style={{ color: '#4fbe70', margin: '10px 0'}}> | |||
| <h3 >教育培训</h3> | |||
| </div> | |||
| <div> | |||
| <table border={1} style={{ borderCollapse: 'collapse', textAlign: 'center', width: '100%' }}> | |||
| <thead> | |||
| <th style={{ height: '30px', width: '20%' }}>起止时间</th> | |||
| <th style={{ height: '30px', width: '20%' }}>学校/培训机构</th> | |||
| <th style={{ height: '30px', width: '20%' }}>专业</th> | |||
| <th style={{ height: '30px', width: '20%' }}>曾担任的职务</th> | |||
| <th style={{ height: '30px', width: '20%' }}>获得证书奖项</th> | |||
| </thead> | |||
| <tbody> | |||
| { | |||
| detail.trainings && detail.trainings.map((item, index) => ( | |||
| <tr style={{ height: '30px' }}> | |||
| <td style={{ width: '20%' }}> | |||
| {item.start_year}.{item.start_month}至{item.end_year}.{item.end_month} | |||
| </td> | |||
| <td style={{ width: '20%' }}>{item.school_or_institution}</td> | |||
| <td style={{ width: '20%' }}>{item.major}</td> | |||
| <td style={{ width: '20%' }}>{item.positions_held}</td> | |||
| <td style={{ width: '20%' }}> | |||
| <div> | |||
| {item.certificate} | |||
| </div> | |||
| <div> | |||
| {item.awards} | |||
| </div> | |||
| </td> | |||
| </tr> | |||
| )) | |||
| } | |||
| </tbody> | |||
| </table> | |||
| </div> | |||
| </div> | |||
| {/* 工作经历 */} | |||
| <div> | |||
| <div style={{ color: '#4fbe70', margin: '10px 0'}}> | |||
| <h3 >工作经历</h3> | |||
| </div> | |||
| <div> | |||
| <table border={1} style={{ borderCollapse: 'collapse', textAlign: 'center', width: '100%' }}> | |||
| <thead> | |||
| <th style={{ height: '30px', width: '25%' }}>起止时间</th> | |||
| <th style={{ height: '30px', width: '25%' }}>单位名称</th> | |||
| <th style={{ height: '30px', width: '25%' }}>职位</th> | |||
| <th style={{ height: '30px', width: '25%' }}>离职原因</th> | |||
| </thead> | |||
| <tbody> | |||
| { | |||
| detail.experiences && detail.experiences.map((item, index) => ( | |||
| <tr style={{ height: '30px' }}> | |||
| <td style={{ width: '25%' }}> | |||
| {item.start_year}.{item.start_month}至{item.end_year}.{item.end_month} | |||
| </td> | |||
| <td style={{ width: '25%' }}>{item.company_name}</td> | |||
| <td style={{ width: '25%' }}>{item.position}</td> | |||
| <td style={{ width: '25%' }}>{item.reason_for_leaving}</td> | |||
| </tr> | |||
| )) | |||
| } | |||
| </tbody> | |||
| </table> | |||
| </div> | |||
| </div> | |||
| {/* 专业技能掌握能力 */} | |||
| <div> | |||
| <div style={{ color: '#4fbe70', margin: '10px 0'}}> | |||
| <h3 >专业技能掌握能力</h3> | |||
| </div> | |||
| <div> | |||
| <table border={1} style={{ borderCollapse: 'collapse', textAlign: 'center', width: '100%' }}> | |||
| <tbody> | |||
| <tr style={{ height: '30px' }}> | |||
| <td style={{ width: '25%' }}>英 语</td> | |||
| <td style={{ width: '25%' }}>{detail.english_txt}</td> | |||
| <td style={{ width: '25%' }}>粤 语</td> | |||
| <td style={{ width: '25%' }}>{detail.mandarin_txt}</td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td style={{ width: '25%' }}>国 语</td> | |||
| <td style={{ width: '25%' }}>{detail.cantonese_txt}</td> | |||
| <td style={{ width: '25%' }}>第二外语</td> | |||
| <td style={{ width: '25%' }}>{detail.other_language_txt}</td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td style={{ width: '25%' }}>计算机能力</td> | |||
| <td colspan={7} style={{ width: '75%' }}>{detail.computer_skills}</td> | |||
| </tr> | |||
| </tbody> | |||
| </table> | |||
| </div> | |||
| </div> | |||
| {/* 联系信息 */} | |||
| <div> | |||
| <div style={{ color: '#4fbe70', margin: '10px 0'}}> | |||
| <h3 >联系信息</h3> | |||
| </div> | |||
| <div> | |||
| <table border={1} style={{ borderCollapse: 'collapse', textAlign: 'center', width: '100%' }}> | |||
| <tbody> | |||
| <tr style={{ height: '30px' }}> | |||
| <td style={{ width: '15%' }}>移动电话</td> | |||
| <td style={{ width: '35%' }}>{detail.mobile}</td> | |||
| <td style={{ width: '15%' }}>固定电话</td> | |||
| <td style={{ width: '35%' }}>{detail.landline}</td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td style={{ width: '15%' }}>联系邮箱</td> | |||
| <td style={{ width: '35%' }}>{detail.email}</td> | |||
| <td style={{ width: '15%' }}>Q Q</td> | |||
| <td style={{ width: '35%' }}>{detail.qq}</td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td style={{ width: '15%' }}>通讯地址</td> | |||
| <td style={{ width: '35%' }}>{detail.mailing_address}</td> | |||
| <td style={{ width: '15%' }}>邮 编</td> | |||
| <td style={{ width: '35%' }}>{detail.postal_code}</td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td style={{ width: '15%' }}>个人主页</td> | |||
| <td colspan={3} style={{ width: '85%' }}>{detail.personal_website}</td> | |||
| </tr> | |||
| </tbody> | |||
| </table> | |||
| </div> | |||
| {/* 证书信息 */} | |||
| <div> | |||
| <div style={{ color: '#4fbe70', margin: '10px 0'}}> | |||
| <h3 >证书信息</h3> | |||
| </div> | |||
| <div> | |||
| <table border={1} style={{ borderCollapse: 'collapse', textAlign: 'center', width: '100%' }}> | |||
| <thead> | |||
| <th style={{ height: '30px', width: '25%' }}>证书名称</th> | |||
| <th style={{ height: '30px', width: '80%' }}>证书图片</th> | |||
| </thead> | |||
| <tbody> | |||
| { | |||
| detail.certificates && detail.certificates.map((item, index) => ( | |||
| <tr > | |||
| <td style={{ width: '25%' }}>{item.name}</td> | |||
| <td style={{ width: '80%' }}> | |||
| <img src={Imageprefix + item.certificate_photo} alt="" width="90" height="150" /> | |||
| </td> | |||
| </tr> | |||
| )) | |||
| } | |||
| </tbody> | |||
| </table> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| </> | |||
| } | |||
| </Modal> | |||
| </ConfigProvider > | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainJobseekerListExport); | |||
| @@ -33,7 +33,7 @@ const PagesMainJobseekerListExport: React.FC = ({ dispatch, dictModel, openModel | |||
| destroyOnClose | |||
| width={1000} | |||
| onCancel={() => { | |||
| dispatch({ type: 'openModel/openExportModal', payload: false }) | |||
| dispatch({ type: 'openModel/getOpenExportModal', payload: false }) | |||
| }} | |||
| afterOpenChange={async (open) => { | |||
| if (open) { | |||
| @@ -230,44 +230,104 @@ const PagesMainJobseekerListExport: React.FC = ({ dispatch, dictModel, openModel | |||
| <td style={{ width: '10%', textAlign: 'center' }}>获何种证书或奖励</td> | |||
| <td colSpan={9}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td rowSpan={7} style={{ width: '10%', textAlign: 'center' }}>介绍工作情况</td> | |||
| <td colSpan={5}></td> | |||
| <td rowSpan={5} colSpan={4}> | |||
| 相片或身份证复印处 | |||
| </td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={5}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={5}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={5}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={5}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={9}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={9}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td rowSpan={4} style={{ width: '10%', textAlign: 'center' }}>帮扶情况</td> | |||
| <td colSpan={9}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={9}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={9}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={9}></td> | |||
| </tr> | |||
| { | |||
| detail.intros ? <> | |||
| <tr style={{ height: '30px' }}> | |||
| <td rowSpan={detail.intros && detail.intros.length > 5 ? detail.intros.length + 2 : 7} style={{ width: '10%', textAlign: 'center' }}>介绍工作情况</td> | |||
| {/* 放第一条数据在第一行 */} | |||
| <td colSpan={5}> | |||
| {detail.intros && detail.intros.length > 0 && detail.intros[0].content} | |||
| </td> | |||
| <td rowSpan={5} colSpan={4}> | |||
| 相片或身份证复印处 | |||
| </td> | |||
| </tr> | |||
| {/* 放第二条到第五条数据 */} | |||
| {detail.intros && detail.intros.length > 5 && detail.intros.slice(1, 5).map((item, index) => (<> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={5}>{item.content}</td> | |||
| </tr> | |||
| </>))} | |||
| {/* 放第六条数据以及后面的 */} | |||
| {detail.intros && detail.intros.length > 5 && detail.intros.slice(5).map((item, index) => (<> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={9}>{item.content}</td> | |||
| </tr> | |||
| </>))} | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={9}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={9}></td> | |||
| </tr> | |||
| </> : <> | |||
| <tr style={{ height: '30px' }}> | |||
| <td rowSpan={7} style={{ width: '10%', textAlign: 'center' }}>介绍工作情况</td> | |||
| <td colSpan={5}> | |||
| </td> | |||
| <td rowSpan={5} colSpan={4}> | |||
| 相片或身份证复印处 | |||
| </td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={5}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={5}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={5}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={5}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={9}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={9}></td> | |||
| </tr> | |||
| </> | |||
| } | |||
| { | |||
| detail.assists ? <> | |||
| <tr style={{ height: '30px' }}> | |||
| <td rowSpan={detail.assists && detail.assists.length > 4 ? detail.assists.length + 2 : 4} style={{ width: '10%', textAlign: 'center' }}>帮扶情况</td> | |||
| <td colSpan={9}> | |||
| {detail.assists && detail.assists.length > 0 && detail.assists[0].content} | |||
| </td> | |||
| </tr> | |||
| {/* 帮扶情况 */} | |||
| {detail.assists && detail.assists.length > 0 && detail.assists.slice(1).map((item, index) => (<> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={9}>{item.content}</td> | |||
| </tr> | |||
| </>))} | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={9}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={9}></td> | |||
| </tr> | |||
| </> : <> | |||
| <tr style={{ height: '30px' }}> | |||
| <td rowSpan={4} style={{ width: '10%', textAlign: 'center' }}>帮扶情况</td> | |||
| <td colSpan={9}> | |||
| </td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={9}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={9}></td> | |||
| </tr> | |||
| <tr style={{ height: '30px' }}> | |||
| <td colSpan={9}></td> | |||
| </tr> | |||
| </> | |||
| } | |||
| </tbody> | |||
| </table> | |||
| </div> | |||
| @@ -0,0 +1,77 @@ | |||
| import { useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import { ConfigProvider, Modal, Tabs } from 'antd'; | |||
| import FormJobseekerHelpRecommend from '../resume/help/recommend'; | |||
| import FormJobseekerHelpAssist from '../resume/help/assist'; | |||
| const PagesMainJobseekerListHelp: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const [openPreview, setOpenPreview] = useState(false); | |||
| useEffect(() => { | |||
| setOpenPreview(openModel.openResumeHelpModal) | |||
| }, [openModel.openResumeHelpModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <Modal | |||
| open={openPreview} | |||
| title='工作帮扶情况' | |||
| centered | |||
| maskClosable={false} | |||
| footer={null} | |||
| destroyOnClose | |||
| width={1000} | |||
| onCancel={() => { | |||
| dispatch({ type: 'openModel/getOpenResumeHelpModal', payload: false }) | |||
| }} | |||
| > | |||
| <Tabs | |||
| destroyInactiveTabPane={true} | |||
| type="card" | |||
| items={[ | |||
| { | |||
| label: '介绍工作情况', | |||
| key: '1', | |||
| children: ( | |||
| <> | |||
| <FormJobseekerHelpRecommend id={id}></FormJobseekerHelpRecommend> | |||
| </> | |||
| ), | |||
| }, | |||
| { | |||
| label: '帮扶情况', | |||
| key: '2', | |||
| children: ( | |||
| <> | |||
| <FormJobseekerHelpAssist id={id}></FormJobseekerHelpAssist> | |||
| </> | |||
| ), | |||
| } | |||
| ]} | |||
| > | |||
| </Tabs> | |||
| </Modal> | |||
| </ConfigProvider > | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainJobseekerListHelp); | |||
| @@ -0,0 +1,308 @@ | |||
| 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, | |||
| ProFormDatePicker, | |||
| ProFormCascader, | |||
| ProFormDigit | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, message, Row, Col, Image } from 'antd'; | |||
| import { PostJobapplicantAdd, PostJobapplicantUpdate, GetJobapplicantDetail } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| import UploadModel from '@/components/Common/upload'; | |||
| import { verifyIdCard, verifySex } from '@/utils/VerifyHelper' | |||
| import { disAfterData } from '@/utils/format' | |||
| const selectfieldNames = { label: 'name', value: 'id' }; | |||
| const cascaderfieldNames = { label: 'name', value: 'id', children: 'children' }; | |||
| const PagesMainJobseekerListResumeBasic: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const formRef = useRef<ProFormInstance>(); | |||
| const [detail, setDetail] = useState<ResumeType.basic | null>(null) | |||
| 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' } }) | |||
| }, []) | |||
| const [uploadedFilephotoName, setUploadedFilephotoName] = useState<string>(''); | |||
| const handleFileUploadedphoto = (filename: string) => { | |||
| setUploadedFilephotoName(filename); | |||
| }; | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProForm<ResumeType.basic> | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await GetJobapplicantDetail({ customer_id: id.customer_id }) | |||
| res.data.reg_arr = [ | |||
| res.data.reg_level1 ? res.data.reg_level1 : 0, | |||
| res.data.reg_level2? res.data.reg_level2 : 0, | |||
| res.data.reg_level3 ? res.data.reg_level3 : 0, | |||
| res.data.reg_level4 ? res.data.reg_level4 : 0 | |||
| ] | |||
| res.data.now_arr = [ | |||
| res.data.now_level1 ? res.data.now_level1 : 0, | |||
| res.data.now_level2 ? res.data.now_level2 : 0, | |||
| res.data.now_level3 ? res.data.now_level3 : 0, | |||
| res.data.now_level4 ? res.data.now_level4 : 0 | |||
| ] | |||
| res.data.native_arr = ['', | |||
| res.data.native_place_txt ? res.data.native_place_txt : 0 | |||
| ] | |||
| setUploadedFilephotoName(res.data.photo) | |||
| setDetail(res.data) | |||
| return res.data; | |||
| } | |||
| }} | |||
| submitter={{ | |||
| searchConfig: { | |||
| resetText: '取消', | |||
| submitText: '保存', | |||
| }, | |||
| render: (_, dom) => { return <Flex justify='flex-end'> <Space>{dom}</Space></Flex> }, | |||
| onReset: () => { | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| } | |||
| }} | |||
| onFinish={async (values) => { | |||
| values.photo = uploadedFilephotoName ? uploadedFilephotoName : ''; | |||
| // 处理户口所在地 | |||
| for (let i = 0; i < 4; i++) { | |||
| values[`reg_level${i + 1}`] = values.reg_arr[i] || 0; | |||
| } | |||
| for (let i = 0; i < 4; i++) { | |||
| values[`now_level${i + 1}`] = values.now_arr[i] || 0; | |||
| } | |||
| if (values.native_arr && values.native_arr.length == 1) { | |||
| message.warning('请选择市'); | |||
| } else { | |||
| values.native_place = detail && detail.native_place != 0 ? detail.native_place : values.native_arr[1]; | |||
| } | |||
| let year = values.id_number.substring(6, 10); | |||
| let month = values.id_number.substring(10, 12); | |||
| let day = values.id_number.substring(12, 14); | |||
| values.dob = year + '-' + month + '-' + day; | |||
| values.gender = verifySex(values.id_number); | |||
| delete values.reg_arr; | |||
| delete values.now_arr; | |||
| delete values.native_arr; | |||
| if (detail) { | |||
| values.id = detail.id; | |||
| values.customer_id = detail.customer_id; | |||
| let res = await PostJobapplicantUpdate(values) | |||
| message.success('提交成功') | |||
| } else { | |||
| let res = await PostJobapplicantAdd(values) | |||
| message.success('提交成功') | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| } | |||
| }} | |||
| > | |||
| <Row gutter={[16, 16]}> | |||
| { | |||
| detail ? | |||
| <Col span={24} style={{ display: 'flex' }}> | |||
| <UploadModel multiple={false} form_name="photo" image_length={1} uploadTxt="个人照片" image_type={3} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| {uploadedFilephotoName ? <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginLeft: '16px', marginTop: '32px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${detail?.photo}`} style={{ marginLeft: '16px', marginTop: '32px', width: '100px', height: '100px' }}></Image>} | |||
| </Col> : <> | |||
| <Col span={24} style={{ display: 'flex' }}> | |||
| <UploadModel multiple={false} form_name="photo" image_length={1} uploadTxt="个人照片" image_type={3} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| {uploadedFilephotoName ? <Col span={8}> <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||
| </Col> | |||
| </> | |||
| } | |||
| <Col span={8}> | |||
| <ProFormText | |||
| label="姓名" | |||
| name="name" | |||
| placeholder="请输入姓名" | |||
| /> | |||
| </Col> | |||
| {/* <Col span={8}> | |||
| <ProFormSegmented | |||
| name="gender" | |||
| label="性别" | |||
| request={async () => [ | |||
| { label: '男', value: '男' }, | |||
| { label: '女', value: '女' } | |||
| ]} | |||
| /> | |||
| </Col> */} | |||
| {/* <Col span={8}> | |||
| <ProFormDatePicker | |||
| name="dob" | |||
| label="出生日期" | |||
| placeholder='请选择出生日期' | |||
| fieldProps={{ | |||
| disabledDate: disAfterData | |||
| }} | |||
| /> | |||
| </Col> */} | |||
| <Col span={8}> | |||
| <ProFormText | |||
| label="身份证" | |||
| name="id_number" | |||
| placeholder="请输入身份证" | |||
| validateTrigger='onBlur' | |||
| rules={[{ | |||
| required: false, | |||
| }, () => ({ | |||
| validator: (rule, value) => { | |||
| let info = verifyIdCard(value); | |||
| if (typeof (info) == 'boolean') { | |||
| return Promise.resolve(); | |||
| } | |||
| return Promise.reject(new Error(info)); | |||
| } | |||
| })]} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="education" | |||
| label="学历" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames | |||
| }} | |||
| options={dictModel.educationList} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormCascader | |||
| label="户口所在地" | |||
| name="reg_arr" | |||
| fieldProps={{ | |||
| fieldNames: cascaderfieldNames, | |||
| options: dictModel.areaList, | |||
| changeOnSelect: true | |||
| }} | |||
| placeholder="请选择户口所在地" | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormCascader | |||
| label="现居地" | |||
| name="now_arr" | |||
| fieldProps={{ | |||
| fieldNames: cascaderfieldNames, | |||
| options: dictModel.areaList, | |||
| changeOnSelect: true | |||
| }} | |||
| placeholder="请选择现居地" | |||
| rules={[{ required: true, message: '请选择现居地' }]} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="title" | |||
| label="职称" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames | |||
| }} | |||
| options={dictModel.titleList} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="marital_status" | |||
| label="婚姻状况" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames | |||
| }} | |||
| options={dictModel.maritalList} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="ethnicity" | |||
| label="民族" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames | |||
| }} | |||
| options={dictModel.ethnicityList} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="political_status" | |||
| label="政治面貌" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames | |||
| }} | |||
| options={dictModel.politicalList} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormCascader | |||
| label="籍贯" | |||
| name="native_arr" | |||
| fieldProps={{ | |||
| fieldNames: cascaderfieldNames, | |||
| options: dictModel.areaList, | |||
| changeOnSelect: true | |||
| }} | |||
| placeholder="请选择籍贯" | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormDigit | |||
| label="身高(厘米cm)" | |||
| placeholder="请输入身高(厘米cm)" | |||
| name="height" | |||
| min={0} | |||
| max={300} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormDigit | |||
| label="体重(千克kg)" | |||
| placeholder="请输入体重(千克kg)" | |||
| name="weight" | |||
| min={0} | |||
| max={300} | |||
| /> | |||
| </Col> | |||
| </Row> | |||
| </ProForm> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainJobseekerListResumeBasic); | |||
| @@ -0,0 +1,113 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProFormText, | |||
| ProForm, | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, Modal, message, Image, Row, Col, Switch, Form, Typography } from 'antd'; | |||
| import { PostJobapplicantAddcontact, PostJobapplicantUpdatecontact, GetJobapplicantContactdetail } from '@/apis/api'; | |||
| const PagesMainJobseekerListResumeContact: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const formRef = useRef<ProFormInstance>(); | |||
| const [detail, setDetail] = useState<ResumeType.contact | null>(null) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProForm<ResumeType.contact> | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await GetJobapplicantContactdetail({ customer_id: id.customer_id }) | |||
| setDetail(res.data) | |||
| return res.data; | |||
| } | |||
| }} | |||
| submitter={{ | |||
| searchConfig: { | |||
| resetText: '取消', | |||
| submitText: '保存', | |||
| }, | |||
| render: (_, dom) => { return <Flex justify='flex-end'> <Space>{dom}</Space></Flex> }, | |||
| onReset: () => { | |||
| } | |||
| }} | |||
| onFinish={async (values) => { | |||
| console.log(values) | |||
| if (detail) { | |||
| values.id = detail.id; | |||
| values.customer_id = detail.customer_id; | |||
| let res = await PostJobapplicantUpdatecontact(values) | |||
| message.success('提交成功') | |||
| } else { | |||
| let res = await PostJobapplicantAddcontact(values) | |||
| message.success('提交成功') | |||
| } | |||
| }} | |||
| > | |||
| <Row gutter={[16, 16]}> | |||
| <Col span={12}> | |||
| <ProFormText | |||
| label="固话" | |||
| name="landline" | |||
| placeholder="请输入固话" | |||
| /> | |||
| </Col> | |||
| <Col span={12}> | |||
| <ProFormText | |||
| label="手机号" | |||
| name="mobile" | |||
| placeholder="请输入手机号" | |||
| rules={[{ required: true, message: '请输入手机号' }]} | |||
| /> | |||
| </Col> | |||
| <Col span={12}> | |||
| <ProFormText | |||
| label="QQ" | |||
| name="qq" | |||
| placeholder="请输入QQ" | |||
| /> | |||
| </Col> | |||
| <Col span={12}> | |||
| <ProFormText | |||
| label="个人网站" | |||
| name="personal_website" | |||
| placeholder="请输入个人网站" | |||
| /> | |||
| </Col> | |||
| <Col span={12}> | |||
| <ProFormText | |||
| label="通信地址" | |||
| name="mailing_address" | |||
| placeholder="请输入通信地址" | |||
| /> | |||
| </Col> | |||
| <Col span={12}> | |||
| <ProFormText | |||
| label="邮编" | |||
| name="postal_code" | |||
| placeholder="请输入邮编" | |||
| /> | |||
| </Col> | |||
| </Row> | |||
| </ProForm> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainJobseekerListResumeContact); | |||
| @@ -0,0 +1,193 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| EditableProTable | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, message, Image, Row, Col } from 'antd'; | |||
| import { PostJobapplicantAddcertificate, PostJobapplicantDelcertificate, PostJobapplicantUpdatecertificate, PostJobapplicantListcertificate, PostJobapplicantCertificatedetail } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| import UploadModel from '@/components/Common/upload'; | |||
| const PagesMainJobseekerListResumeCredetial: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [editableKeys, setEditableRowKeys] = useState<React.Key[]>([]); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [originList, setOriginList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| const [uploadedFilephotoName, setUploadedFilephotoName] = useState<string>(''); | |||
| const handleFileUploadedphoto = (filename: string) => { | |||
| setUploadedFilephotoName(filename); | |||
| }; | |||
| useEffect(() => { | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2007, type: 'setOtherLanguageList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2008, type: 'setDegreeList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2023, type: 'setVehicleList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2024, type: 'setOvertimeList' } }) | |||
| }, []) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <EditableProTable | |||
| actionRef={actionRef} | |||
| rowKey="id" | |||
| loading={false} | |||
| request={async () => { | |||
| let res = await PostJobapplicantListcertificate({ | |||
| customer_id: id.customer_id, | |||
| sortby: 'asc', | |||
| sort: 'id' | |||
| }) | |||
| setList(res.data.jobapplicantcertificates) | |||
| setOriginList(res.data.jobapplicantcertificates) | |||
| setTotal(res.data.total) | |||
| return { | |||
| data: res.data.jobapplicantcertificates, | |||
| total: res.data.total, | |||
| success: true, | |||
| } | |||
| }} | |||
| columns={[ { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| editable: false, | |||
| width: 100 | |||
| }, | |||
| { | |||
| title: '证书名称', | |||
| dataIndex: 'name', | |||
| formItemProps: { | |||
| rules: [ | |||
| { | |||
| required: true, | |||
| message: '请输入证书名称', | |||
| }, | |||
| ], | |||
| }, | |||
| }, | |||
| { | |||
| title: '证书描述', | |||
| dataIndex: 'description', | |||
| formItemProps: { | |||
| rules: [ | |||
| { | |||
| required: true, | |||
| message: '请输入证书描述', | |||
| }, | |||
| ], | |||
| }, | |||
| }, | |||
| { | |||
| title: '证书', | |||
| dataIndex: 'certificate_photo', | |||
| formItemProps: { | |||
| rules: [ | |||
| { | |||
| required: true, | |||
| message: '请上传证书', | |||
| }, | |||
| ], | |||
| }, | |||
| render: (text, record) => ( | |||
| <> | |||
| <Image src={`${Imageprefix + record.certificate_photo}`} width={40} height={40} preview={false} /> | |||
| </> | |||
| ), | |||
| renderFormItem: (_, record, { isEditable }) => { | |||
| return isEditable ? <> | |||
| { | |||
| <Row> | |||
| <Col span={24} style={{ display: 'flex' }}> | |||
| <UploadModel multiple={false} form_name="certificate_photo" image_length={1} uploadTxt="证书" image_type={2} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| {uploadedFilephotoName ? <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginLeft: '16px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${record?.certificate_photo}`} style={{ marginLeft: '16px', marginTop: '32px', width: '100px', height: '100px' }}></Image>} | |||
| </Col> | |||
| </Row> | |||
| } | |||
| </> : | |||
| <> | |||
| { | |||
| <Row> | |||
| <Col span={24} style={{ display: 'flex' }}> | |||
| <UploadModel multiple={false} form_name="certificate_photo" image_length={1} uploadTxt="证书" image_type={2} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| {uploadedFilephotoName ? <Col span={8}> <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{marginLeft: '16px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||
| </Col> | |||
| </Row> | |||
| } | |||
| </>; | |||
| }, | |||
| }, | |||
| { | |||
| title: '操作', | |||
| valueType: 'option', | |||
| width: 200, | |||
| render: (text, record, _, action) => [ | |||
| <a | |||
| key="editable" | |||
| onClick={() => { | |||
| action?.startEditable?.(record.id); | |||
| }} | |||
| > | |||
| 编辑 | |||
| </a>, | |||
| <a | |||
| key="delete" | |||
| onClick={() => { | |||
| }} | |||
| > | |||
| 删除 | |||
| </a>, | |||
| ], | |||
| }, | |||
| ]} | |||
| editable={{ | |||
| type: 'single', | |||
| editableKeys, | |||
| onSave: async (rowKey, data: ResumeType.credential, row) => { | |||
| console.log(rowKey, data, row) | |||
| data.customer_id = id.customer_id; | |||
| data.certificate_photo = uploadedFilephotoName ? uploadedFilephotoName : ''; | |||
| delete data.index; | |||
| if (rowKey && originList.findIndex(item => item.id === rowKey) !== -1) { | |||
| data.id = rowKey; | |||
| let res = await PostJobapplicantUpdatecertificate(data) | |||
| message.success('提交成功') | |||
| actionRef.current.reload(); | |||
| } else { | |||
| delete data.id; | |||
| let res = await PostJobapplicantAddcertificate(data) | |||
| message.success('提交成功') | |||
| actionRef.current.reload(); | |||
| } | |||
| }, | |||
| onChange: setEditableRowKeys, | |||
| }} | |||
| recordCreatorProps={ | |||
| { | |||
| position: 'bottom', | |||
| record: () => ({ id: list.length > 0 ? (list[list.length - 1].id + 1).toFixed(0) : 0 }), | |||
| } | |||
| } | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainJobseekerListResumeCredetial); | |||
| @@ -0,0 +1,211 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| EditableProTable | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, message } from 'antd'; | |||
| import { PostJobapplicantAddexperience, PostJobapplicantDelexperience, PostJobapplicantUpdateexperience, PostJobapplicantListexperience, PostJobapplicantExperiencedetail } from '@/apis/api'; | |||
| const PagesMainJobseekerListResumeExperience: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [editableKeys, setEditableRowKeys] = useState<React.Key[]>([]); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [originList, setOriginList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| useEffect(() => { | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2007, type: 'setOtherLanguageList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2008, type: 'setDegreeList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2023, type: 'setVehicleList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2024, type: 'setOvertimeList' } }) | |||
| }, []) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <EditableProTable | |||
| actionRef={actionRef} | |||
| rowKey="id" | |||
| loading={false} | |||
| request={async () => { | |||
| let res = await PostJobapplicantListexperience({ | |||
| customer_id: id.customer_id, | |||
| sortby: 'asc', | |||
| sort: 'id' | |||
| }) | |||
| setList(res.data.jobapplicantexperiences) | |||
| setOriginList(res.data.jobapplicantexperiences) | |||
| setTotal(res.data.total) | |||
| return { | |||
| data: res.data.jobapplicantexperiences, | |||
| total: res.data.total, | |||
| success: true, | |||
| } | |||
| }} | |||
| columns={[ | |||
| { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| editable: false, | |||
| width: 100, | |||
| }, | |||
| { | |||
| title: '起止时间', | |||
| dataIndex: 'date', | |||
| valueType: 'dateRange', | |||
| fieldProps: { | |||
| format: 'YYYY-MM' | |||
| }, | |||
| width: 200, | |||
| formItemProps: { | |||
| rules: [ | |||
| { | |||
| required: true, | |||
| message: '请选择起止时间', | |||
| }, | |||
| ], | |||
| }, | |||
| render: (text, record, _, action) => ( | |||
| <> | |||
| { | |||
| `${record.start_year}-${record.start_month}至${record.end_year}-${record.end_month}` | |||
| } | |||
| </> | |||
| ), | |||
| }, | |||
| { | |||
| title: '是否至今', | |||
| dataIndex: 'end_today', | |||
| width: 100, | |||
| valueType: 'select', | |||
| fieldProps: { | |||
| options: [ | |||
| { label: '非至今', value: 1 }, | |||
| { label: '至今', value: 2 }, | |||
| ] | |||
| }, | |||
| formItemProps: { | |||
| rules: [ | |||
| { | |||
| required: true, | |||
| message: '请选择是否至今', | |||
| }, | |||
| ], | |||
| }, | |||
| }, | |||
| { | |||
| title: '公司名称', | |||
| dataIndex: 'company_name', | |||
| formItemProps: { | |||
| rules: [ | |||
| { | |||
| required: true, | |||
| message: '请输入公司名称', | |||
| }, | |||
| ], | |||
| }, | |||
| }, | |||
| { | |||
| title: '职位', | |||
| dataIndex: 'position', | |||
| formItemProps: { | |||
| rules: [ | |||
| { | |||
| required: true, | |||
| message: '请输入职位', | |||
| }, | |||
| ], | |||
| }, | |||
| }, | |||
| { | |||
| title: '离职原因', | |||
| dataIndex: 'reason_for_leaving', | |||
| formItemProps: { | |||
| rules: [ | |||
| { | |||
| required: true, | |||
| message: '请输入离职原因', | |||
| }, | |||
| ], | |||
| }, | |||
| }, | |||
| { | |||
| title: '操作', | |||
| valueType: 'option', | |||
| width: 200, | |||
| render: (text, record, _, action) => [ | |||
| <a | |||
| key="editable" | |||
| onClick={() => { | |||
| record.date = [`${record.start_year}-${record.start_month}`, `${record.end_year}-${record.end_month}`] | |||
| action?.startEditable?.(record.id); | |||
| }} | |||
| > | |||
| 编辑 | |||
| </a>, | |||
| <a | |||
| key="delete" | |||
| onClick={() => { | |||
| }} | |||
| > | |||
| 删除 | |||
| </a>, | |||
| ], | |||
| }, | |||
| ]} | |||
| editable={{ | |||
| type: 'single', | |||
| editableKeys, | |||
| onSave: async (rowKey, data: ResumeType.experience, row) => { | |||
| console.log(rowKey, data, row) | |||
| data.customer_id = id.customer_id; | |||
| let time1 = data.date[0].split('-'); | |||
| let time2 = data.date[1].split('-'); | |||
| data.start_year = parseInt(time1[0], 10); | |||
| data.start_month = parseInt(time1[1], 10); | |||
| data.end_year = parseInt(time2[0], 10); | |||
| data.end_month = parseInt(time2[1], 10); | |||
| delete data.date; | |||
| delete data.index; | |||
| if (rowKey && originList.findIndex(item => item.id === rowKey) !== -1) { | |||
| data.id = rowKey; | |||
| let res = await PostJobapplicantUpdateexperience(data) | |||
| message.success('提交成功') | |||
| actionRef.current.reload(); | |||
| } else { | |||
| delete data.id; | |||
| let res = await PostJobapplicantAddexperience(data) | |||
| message.success('提交成功') | |||
| actionRef.current.reload(); | |||
| } | |||
| }, | |||
| onChange: setEditableRowKeys, | |||
| }} | |||
| recordCreatorProps={ | |||
| { | |||
| position: 'bottom', | |||
| record: () => ({ id: list.length > 0 ? (list[list.length - 1].id + 1).toFixed(0) : 0 }), | |||
| } | |||
| } | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainJobseekerListResumeExperience); | |||
| @@ -0,0 +1,120 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, EditableFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| EditableProTable, | |||
| ProFormCascader, | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, message, Image, Row, Col, Cascader } from 'antd'; | |||
| import { | |||
| PostJobapplicantAddassistandintro, GetJobapplicantListassist, GetJobapplicantAssistdetail, PostJobapplicantUpdateassist | |||
| } from '@/apis/api'; | |||
| const PagesMainJobseekerListResumeHelpAssist: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const editableFormRef = useRef<EditableFormInstance>(); | |||
| const [editableKeys, setEditableRowKeys] = useState<React.Key[]>([]); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [originList, setOriginList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <EditableProTable | |||
| editableFormRef={editableFormRef} | |||
| actionRef={actionRef} | |||
| rowKey="id" | |||
| loading={false} | |||
| request={async () => { | |||
| let res = await GetJobapplicantListassist({ | |||
| customer_id: id.customer_id, | |||
| sortby: 'asc', | |||
| sort: 'id' | |||
| }) | |||
| setList(res.data.jobapplicantassists) | |||
| setOriginList(res.data.jobapplicantassists) | |||
| setTotal(res.data.total) | |||
| return { | |||
| data: res.data.jobapplicantassists, | |||
| total: res.data.total, | |||
| success: true, | |||
| } | |||
| }} | |||
| columns={[{ | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| editable: false, | |||
| width: 100 | |||
| }, | |||
| { | |||
| title: '帮扶情况', | |||
| dataIndex: 'content' | |||
| }, | |||
| { | |||
| title: '操作', | |||
| valueType: 'option', | |||
| width: 200, | |||
| render: (text, record, _, action) => [ | |||
| <a | |||
| key="editable" | |||
| onClick={async () => { | |||
| action?.startEditable?.(record.id); | |||
| }} | |||
| > | |||
| 编辑 | |||
| </a>, | |||
| <a | |||
| key="delete" | |||
| onClick={() => { | |||
| }} | |||
| > | |||
| 删除 | |||
| </a>, | |||
| ], | |||
| }, | |||
| ]} | |||
| editable={{ | |||
| type: 'single', | |||
| 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 PostJobapplicantUpdateassist({ 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, assist_content: [data.content] }) | |||
| message.success('提交成功') | |||
| actionRef.current.reload(); | |||
| } | |||
| }, | |||
| onChange: setEditableRowKeys | |||
| }} | |||
| recordCreatorProps={ | |||
| { | |||
| position: 'bottom', | |||
| record: () => ({ id: list.length > 0 ? (list[list.length - 1].id + 1).toFixed(0) : 0 }), | |||
| } | |||
| } | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainJobseekerListResumeHelpAssist); | |||
| @@ -0,0 +1,123 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, EditableFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| EditableProTable, | |||
| ProFormCascader, | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, message, Image, Row, Col, Cascader } from 'antd'; | |||
| import { | |||
| PostJobapplicantAddassistandintro, GetJobapplicantListintro, GetJobapplicantIntrodetail, PostJobapplicantUpdateintro, PostJobapplicantDelintro | |||
| } from '@/apis/api'; | |||
| const selectfieldNames = { label: 'name', value: 'id', children: 'childss' }; | |||
| const PagesMainJobseekerListResumeHelpRecommend: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const editableFormRef = useRef<EditableFormInstance>(); | |||
| const [editableKeys, setEditableRowKeys] = useState<React.Key[]>([]); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [originList, setOriginList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <EditableProTable | |||
| editableFormRef={editableFormRef} | |||
| actionRef={actionRef} | |||
| rowKey="id" | |||
| loading={false} | |||
| request={async () => { | |||
| let res = await GetJobapplicantListintro({ | |||
| customer_id: id.customer_id, | |||
| sortby: 'asc', | |||
| sort: 'id' | |||
| }) | |||
| setList(res.data.jobapplicantintros) | |||
| setOriginList(res.data.jobapplicantintros) | |||
| setTotal(res.data.total) | |||
| return { | |||
| data: res.data.jobapplicantintros, | |||
| total: res.data.total, | |||
| success: true, | |||
| } | |||
| }} | |||
| columns={[ { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| editable: false, | |||
| width: 100 | |||
| }, | |||
| { | |||
| title: '介绍情况', | |||
| dataIndex: 'content' | |||
| }, | |||
| { | |||
| title: '操作', | |||
| valueType: 'option', | |||
| width: 200, | |||
| render: (text, record, _, action) => [ | |||
| <a | |||
| key="editable" | |||
| onClick={async () => { | |||
| action?.startEditable?.(record.id); | |||
| }} | |||
| > | |||
| 编辑 | |||
| </a>, | |||
| <a | |||
| key="delete" | |||
| onClick={() => { | |||
| }} | |||
| > | |||
| 删除 | |||
| </a>, | |||
| ], | |||
| }, | |||
| ]} | |||
| editable={{ | |||
| type: 'single', | |||
| 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(); | |||
| // } | |||
| }, | |||
| onChange: setEditableRowKeys | |||
| }} | |||
| recordCreatorProps={ | |||
| { | |||
| position: 'bottom', | |||
| record: () => ({ id: list.length > 0 ? (list[list.length - 1].id + 1).toFixed(0) : 0 }), | |||
| } | |||
| } | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainJobseekerListResumeHelpRecommend); | |||
| @@ -0,0 +1,233 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, EditableFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| EditableProTable, | |||
| ProFormCascader, | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, message, Image, Row, Col, Cascader } from 'antd'; | |||
| import { PostJobapplicantAdddesirearea, PostJobapplicantDeldesirearea, PostJobapplicantUpdatedesirearea, PostJobapplicantListdesirearea, PostJobapplicantDesireareadetail, GetDictTree , GetDictDetail} from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| import UploadModel from '@/components/Common/upload'; | |||
| const cascaderfieldNames = { label: 'name', value: 'id', children: 'children' }; | |||
| const selectfieldNames = { label: 'name', value: 'id', children: 'childss' }; | |||
| const PagesMainJobseekerListResumeIntentionArea: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const editableFormRef = useRef<EditableFormInstance>(); | |||
| const [editableKeys, setEditableRowKeys] = useState<React.Key[]>([]); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [originList, setOriginList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| useEffect(() => { | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2009, type: 'setAreaList' } }) | |||
| }, []) | |||
| const [optionLevel2, setOptionLevel2] = useState<any>([]) | |||
| const [optionLevel3, setOptionLevel3] = useState<any>([]) | |||
| const [optionLevel4, setOptionLevel4] = useState<any>([]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <EditableProTable | |||
| editableFormRef={editableFormRef} | |||
| actionRef={actionRef} | |||
| rowKey="id" | |||
| loading={false} | |||
| request={async () => { | |||
| let res = await PostJobapplicantListdesirearea({ | |||
| customer_id: id.customer_id, | |||
| sortby: 'asc', | |||
| sort: 'id' | |||
| }) | |||
| setList(res.data.jobapplicantareas) | |||
| setOriginList(res.data.jobapplicantareas) | |||
| setTotal(res.data.total) | |||
| return { | |||
| data: res.data.jobapplicantareas, | |||
| total: res.data.total, | |||
| success: true, | |||
| } | |||
| }} | |||
| columns={[ { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| editable: false, | |||
| width: 100 | |||
| }, | |||
| { | |||
| title: '省级', | |||
| dataIndex: 'level1', | |||
| render: (text, record) => ( | |||
| <> | |||
| <span>{record.level1_txt}</span> | |||
| </> | |||
| ), | |||
| valueType: 'select', | |||
| fieldProps: (form, config) => { | |||
| return { | |||
| placeholder: '请选择省级', | |||
| options: dictModel.areaList, | |||
| fieldNames: selectfieldNames, | |||
| onChange: async (value, option) => { | |||
| let res = await GetDictTree({ code: option.code }) | |||
| setOptionLevel2(res.data.dicts) | |||
| editableFormRef.current?.setRowData?.(config.entity.id, { level2: 0 }); | |||
| editableFormRef.current?.setRowData?.(config.entity.id, { level3: 0 }); | |||
| editableFormRef.current?.setRowData?.(config.entity.id, { level4: 0 }); | |||
| } | |||
| } | |||
| }, | |||
| }, | |||
| { | |||
| title: '市级', | |||
| dataIndex: 'level2', | |||
| render: (text, record) => ( | |||
| <> | |||
| <span>{record.level2_txt}</span> | |||
| </> | |||
| ), | |||
| valueType: 'select', | |||
| fieldProps: (form, config) => { | |||
| return { | |||
| placeholder: '请选择市级', | |||
| options: optionLevel2, | |||
| fieldNames: selectfieldNames, | |||
| onChange: async (value, option) => { | |||
| let res = await GetDictTree({ code: option.code }) | |||
| setOptionLevel3(res.data.dicts) | |||
| editableFormRef.current?.setRowData?.(config.entity.id, { level3: 0 }); | |||
| editableFormRef.current?.setRowData?.(config.entity.id, { level4: 0 }); | |||
| } | |||
| } | |||
| }, | |||
| }, | |||
| { | |||
| title: '乡镇', | |||
| dataIndex: 'level3', | |||
| render: (text, record) => ( | |||
| <> | |||
| <span>{record.level3_txt}</span> | |||
| </> | |||
| ), | |||
| valueType: 'select', | |||
| fieldProps: (form, config) => { | |||
| return { | |||
| placeholder: '请选择乡镇', | |||
| options: optionLevel3, | |||
| fieldNames: selectfieldNames, | |||
| onChange: async (value, option) => { | |||
| let res = await GetDictTree({ code: option.code }) | |||
| setOptionLevel4(res.data.dicts) | |||
| editableFormRef.current?.setRowData?.(config.entity.id, { level4: 0 }); | |||
| } | |||
| } | |||
| }, | |||
| }, | |||
| { | |||
| title: '社区', | |||
| dataIndex: 'level4', | |||
| render: (text, record) => ( | |||
| <> | |||
| <span>{record.level4_txt}</span> | |||
| </> | |||
| ), | |||
| valueType: 'select', | |||
| fieldProps: { | |||
| placeholder: '请选择社区', | |||
| options: optionLevel4, | |||
| fieldNames: selectfieldNames, | |||
| }, | |||
| }, | |||
| { | |||
| title: '操作', | |||
| valueType: 'option', | |||
| width: 200, | |||
| render: (text, record, _, action) => [ | |||
| <a | |||
| key="editable" | |||
| onClick={async() => { | |||
| if(record.level1) { | |||
| let res = await GetDictDetail({ id: record.level1 }) | |||
| setOptionLevel2(res.data.childs) | |||
| } | |||
| if(record.level2) { | |||
| let res = await GetDictDetail({ id: record.level2 }) | |||
| setOptionLevel3(res.data.childs) | |||
| } | |||
| if(record.level3) { | |||
| let res = await GetDictDetail({ id: record.level3 }) | |||
| setOptionLevel4(res.data.childs) | |||
| } | |||
| action?.startEditable?.(record.id); | |||
| }} | |||
| > | |||
| 编辑 | |||
| </a>, | |||
| <a | |||
| key="delete" | |||
| onClick={() => { | |||
| }} | |||
| > | |||
| 删除 | |||
| </a>, | |||
| ], | |||
| }, | |||
| ]} | |||
| editable={{ | |||
| type: 'single', | |||
| editableKeys, | |||
| onSave: async (rowKey, data: ResumeType.intentionArea, row) => { | |||
| console.log(rowKey, data, row) | |||
| data.customer_id = id.customer_id; | |||
| delete data.index; | |||
| if (rowKey && originList.findIndex(item => item.id === rowKey) !== -1) { | |||
| data.id = rowKey; | |||
| let res = await PostJobapplicantUpdatedesirearea(data) | |||
| message.success('提交成功') | |||
| actionRef.current.reload(); | |||
| } else { | |||
| delete data.id; | |||
| let res = await PostJobapplicantAdddesirearea(data) | |||
| message.success('提交成功') | |||
| actionRef.current.reload(); | |||
| } | |||
| }, | |||
| onChange: setEditableRowKeys | |||
| }} | |||
| recordCreatorProps={ | |||
| { | |||
| position: 'bottom', | |||
| record: () => ({ id: list.length > 0 ? (list[list.length - 1].id + 1).toFixed(0) : 0 }), | |||
| } | |||
| } | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainJobseekerListResumeIntentionArea); | |||
| @@ -0,0 +1,202 @@ | |||
| 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, | |||
| ProFormDatePicker, | |||
| ProFormCascader, | |||
| ProFormDigit | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, Modal, message, Image, Row, Col, Switch, Form, Typography } from 'antd'; | |||
| import { PostJobapplicantAdddesirebase, PostJobapplicantDeldesirebase, PostJobapplicantUpdatedesirebase, PostJobapplicantDesirebasedetail } from '@/apis/api'; | |||
| const selectfieldNames = { label: 'name', value: 'id' }; | |||
| const PagesMainJobseekerListResumeIntentionBasic: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const formRef = useRef<ProFormInstance>(); | |||
| const [detail, setDetail] = useState<ResumeType.intentionBasic | null>(null) | |||
| useEffect(() => { | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2019, type: 'setJobTypeList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2020, type: 'setTalentTypeList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2021, type: 'setWorkExperienceList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2005, type: 'setScaleList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2013, type: 'setAvailableDateList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2014, type: 'setTitleList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2015, type: 'setSkillCertificationeList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2016, type: 'setAccommodationRequirementList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2017, type: 'setHolidayRestList' } }) | |||
| }, []) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProForm<ResumeType.intentionBasic> | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await PostJobapplicantDesirebasedetail({ customer_id: id.customer_id }) | |||
| setDetail(res.data) | |||
| return res.data; | |||
| } | |||
| }} | |||
| submitter={{ | |||
| searchConfig: { | |||
| resetText: '取消', | |||
| submitText: '保存', | |||
| }, | |||
| render: (_, dom) => { return <Flex justify='flex-end'> <Space>{dom}</Space></Flex> }, | |||
| onReset: () => { | |||
| } | |||
| }} | |||
| onFinish={async (values) => { | |||
| console.log(values) | |||
| if (detail) { | |||
| values.id = detail.id; | |||
| values.customer_id = detail.customer_id; | |||
| let res = await PostJobapplicantUpdatedesirebase(values) | |||
| message.success('提交成功') | |||
| } else { | |||
| values.customer_id = id.customer_id; | |||
| let res = await PostJobapplicantAdddesirebase(values) | |||
| message.success('提交成功') | |||
| } | |||
| }} | |||
| > | |||
| <Row gutter={[16, 16]}> | |||
| <Col span={24}> | |||
| <ProFormText | |||
| label="其他职位" | |||
| name="other_positions" | |||
| placeholder="请输入其他职位" | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="job_type" | |||
| label="求职类型" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| placeholder: '请选择求职类型' | |||
| }} | |||
| options={dictModel.jobTypeList} | |||
| rules={[{ required: true, message: '请选择求职类型' }]} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="talent_type" | |||
| label="人才类型" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| placeholder: '请选择人才类型' | |||
| }} | |||
| options={dictModel.talentTypeList} | |||
| rules={[{ required: true, message: '请选择人才类型' }]} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="work_experience" | |||
| label="工作经验" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| placeholder: '请选择工作经验' | |||
| }} | |||
| options={dictModel.workExperienceList} | |||
| rules={[{ required: true, message: '请选择工作经验' }]} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="salary_range" | |||
| label="月薪要求范围" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| placeholder: '请选择月薪要求范围' | |||
| }} | |||
| options={dictModel.scaleList} | |||
| rules={[{ required: true, message: '请选择月薪要求范围' }]} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="available_date" | |||
| label="可到职日期" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| placeholder: '请选择可到职日期' | |||
| }} | |||
| options={dictModel.availableDateList} | |||
| rules={[{ required: true, message: '请选择可到职日期' }]} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="title_requirement" | |||
| label="职称要求" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| placeholder: '请选择职称要求' | |||
| }} | |||
| options={dictModel.titleList} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="skill_certification" | |||
| label="技能认证" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| placeholder: '请选择技能认证' | |||
| }} | |||
| options={dictModel.skillCertificationeList} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="accommodation_requirement" | |||
| label="食宿要求" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| placeholder: '请选择食宿要求' | |||
| }} | |||
| options={dictModel.accommodationRequirementList} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="holiday_rest" | |||
| label="节假日休息情况" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| placeholder: '请选择节假日休息情况' | |||
| }} | |||
| options={dictModel.holidayRestList} | |||
| /> | |||
| </Col> | |||
| </Row> | |||
| </ProForm> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainJobseekerListResumeIntentionBasic); | |||
| @@ -0,0 +1,148 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, EditableFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| EditableProTable, | |||
| ProFormCascader, | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, message, Image, Row, Col, Cascader } from 'antd'; | |||
| import { | |||
| PostJobapplicantAdddesireindustry, | |||
| PostJobapplicantDeldesireindustry, | |||
| PostJobapplicantUpdatedesireindustry, | |||
| PostJobapplicantListdesireindustry, | |||
| PostJobapplicantDesireindustrydetail, | |||
| } from '@/apis/api'; | |||
| const selectfieldNames = { label: 'name', value: 'id', children: 'childss' }; | |||
| const PagesMainJobseekerListResumeIntentionIndustry: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const editableFormRef = useRef<EditableFormInstance>(); | |||
| const [editableKeys, setEditableRowKeys] = useState<React.Key[]>([]); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [originList, setOriginList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| useEffect(() => { | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2009, type: 'setAreaList' } }) | |||
| }, []) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <EditableProTable | |||
| editableFormRef={editableFormRef} | |||
| actionRef={actionRef} | |||
| rowKey="id" | |||
| loading={false} | |||
| request={async () => { | |||
| let res = await PostJobapplicantListdesireindustry({ | |||
| customer_id: id.customer_id, | |||
| sortby: 'asc', | |||
| sort: 'id' | |||
| }) | |||
| setList(res.data.jobapplicantindustrys) | |||
| setOriginList(res.data.jobapplicantindustrys) | |||
| setTotal(res.data.total) | |||
| return { | |||
| data: res.data.jobapplicantindustrys, | |||
| total: res.data.total, | |||
| success: true, | |||
| } | |||
| }} | |||
| columns={[ { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| editable: false, | |||
| width: 100 | |||
| }, | |||
| { | |||
| title: '行业', | |||
| dataIndex: 'industry', | |||
| render: (text, record) => ( | |||
| <> | |||
| <span>{record.industry_txt}</span> | |||
| </> | |||
| ), | |||
| valueType: 'select', | |||
| fieldProps: (form, config) => { | |||
| return { | |||
| placeholder: '请选择行业', | |||
| options: dictModel.industryPostList, | |||
| fieldNames: selectfieldNames, | |||
| } | |||
| }, | |||
| }, | |||
| { | |||
| title: '操作', | |||
| valueType: 'option', | |||
| width: 200, | |||
| render: (text, record, _, action) => [ | |||
| <a | |||
| key="editable" | |||
| onClick={async () => { | |||
| if(total > 3) { | |||
| message.error('最多添加3条意向行业') | |||
| return false; | |||
| } | |||
| action?.startEditable?.(record.post_id); | |||
| }} | |||
| > | |||
| 编辑 | |||
| </a>, | |||
| <a | |||
| key="delete" | |||
| onClick={() => { | |||
| }} | |||
| > | |||
| 删除 | |||
| </a>, | |||
| ], | |||
| }, | |||
| ]} | |||
| editable={{ | |||
| type: 'single', | |||
| editableKeys, | |||
| onSave: async (rowKey, data: ResumeType.intentionIndustry, row) => { | |||
| console.log(rowKey, data, row) | |||
| data.customer_id = id.customer_id; | |||
| if (rowKey && originList.findIndex(item => item.id === rowKey) !== -1) { | |||
| data.id = rowKey; | |||
| let res1 = await PostJobapplicantUpdatedesireindustry({ id: data.id, customer_id: data.customer_id, industry: data.industry }) | |||
| message.success('提交成功') | |||
| actionRef.current.reload(); | |||
| } else { | |||
| let res1 = await PostJobapplicantAdddesireindustry({ customer_id: data.customer_id, industry: data.industry }) | |||
| message.success('提交成功') | |||
| actionRef.current.reload(); | |||
| } | |||
| }, | |||
| onChange: setEditableRowKeys | |||
| }} | |||
| recordCreatorProps={ | |||
| { | |||
| position: 'bottom', | |||
| record: () => ({ id: list.length > 0 ? (list[list.length - 1].id + 1).toFixed(0) : 0 }), | |||
| } | |||
| } | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainJobseekerListResumeIntentionIndustry); | |||
| @@ -0,0 +1,219 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, EditableFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| EditableProTable, | |||
| ProFormCascader, | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, message, Image, Row, Col, Cascader } from 'antd'; | |||
| import { | |||
| PostJobapplicantAdddesireposition, | |||
| PostJobapplicantDeldesireposition, | |||
| PostJobapplicantUpdatedesireposition, | |||
| PostJobapplicantListdesireposition, | |||
| PostJobapplicantDesirepositiondetail, | |||
| GetDictTree, | |||
| GetDictDetail | |||
| } from '@/apis/api'; | |||
| const selectfieldNames = { label: 'name', value: 'id', children: 'childss' }; | |||
| const PagesMainJobseekerListResumeIntentionPost: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const editableFormRef = useRef<EditableFormInstance>(); | |||
| const [editableKeys, setEditableRowKeys] = useState<React.Key[]>([]); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [originList, setOriginList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| useEffect(() => { | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2009, type: 'setAreaList' } }) | |||
| }, []) | |||
| const [optionLevel2, setOptionLevel2] = useState<any>([]) | |||
| const [optionLevel3, setOptionLevel3] = useState<any>([]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <EditableProTable | |||
| editableFormRef={editableFormRef} | |||
| actionRef={actionRef} | |||
| rowKey="id" | |||
| loading={false} | |||
| request={async () => { | |||
| let res = await PostJobapplicantListdesireposition({ | |||
| customer_id: id.customer_id, | |||
| sortby: 'asc', | |||
| sort: 'id' | |||
| }) | |||
| const updatedPositions = await Promise.all( | |||
| res.data.jobapplicantpositions.filter(item => item.level1 !== 0).map(async (item: any, index: number) => { | |||
| const res1 = await GetDictDetail({ id: item.level1 }); | |||
| const res2 = await GetDictDetail({ id: res1.data.parent_id }); | |||
| return { | |||
| ...item, | |||
| post_id: item.id, | |||
| industry_txt: res2.data ? res2.data.name : '', | |||
| industry: res2.data ? res2.data.id : '' | |||
| }; | |||
| }) | |||
| ); | |||
| setList(updatedPositions) | |||
| setOriginList(updatedPositions) | |||
| setTotal(res.data.total) | |||
| return { | |||
| data: updatedPositions, | |||
| total: res.data.total, | |||
| success: true, | |||
| } | |||
| }} | |||
| columns={[ { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| editable: false, | |||
| width: 100 | |||
| }, | |||
| { | |||
| title: '行业大类', | |||
| dataIndex: 'industry', | |||
| render: (text, record) => ( | |||
| <> | |||
| <span>{record.industry_txt}</span> | |||
| </> | |||
| ), | |||
| valueType: 'select', | |||
| fieldProps: (form, config) => { | |||
| return { | |||
| placeholder: '请选择行业大类', | |||
| options: dictModel.industryPostList, | |||
| fieldNames: selectfieldNames, | |||
| onChange: async (value, option) => { | |||
| let res = await GetDictTree({ code: option.code }) | |||
| setOptionLevel2(res.data.dicts) | |||
| editableFormRef.current?.setRowData?.(config.entity.id, { level1: 0 }); | |||
| editableFormRef.current?.setRowData?.(config.entity.id, { level2: 0 }); | |||
| } | |||
| } | |||
| }, | |||
| }, | |||
| { | |||
| title: '行业二类', | |||
| dataIndex: 'level1', | |||
| render: (text, record) => ( | |||
| <> | |||
| <span>{record.level1_txt}</span> | |||
| </> | |||
| ), | |||
| valueType: 'select', | |||
| fieldProps: (form, config) => { | |||
| return { | |||
| placeholder: '请选择行业二类', | |||
| options: optionLevel2, | |||
| fieldNames: selectfieldNames, | |||
| onChange: async (value, option) => { | |||
| let res = await GetDictTree({ code: option.code }) | |||
| setOptionLevel3(res.data.dicts) | |||
| editableFormRef.current?.setRowData?.(config.entity.id, { level2: 0 }); | |||
| } | |||
| } | |||
| }, | |||
| }, | |||
| { | |||
| title: '职位', | |||
| dataIndex: 'level2', | |||
| render: (text, record) => ( | |||
| <> | |||
| <span>{record.level2_txt}</span> | |||
| </> | |||
| ), | |||
| valueType: 'select', | |||
| fieldProps: (form, config) => { | |||
| return { | |||
| placeholder: '请选择职位', | |||
| options: optionLevel3, | |||
| fieldNames: selectfieldNames, | |||
| } | |||
| }, | |||
| }, | |||
| { | |||
| title: '操作', | |||
| valueType: 'option', | |||
| width: 200, | |||
| render: (text, record, _, action) => [ | |||
| <a | |||
| key="editable" | |||
| onClick={async () => { | |||
| console.log(record) | |||
| if (record.level1) { | |||
| const res1 = await GetDictDetail({ id: record.level1 }); | |||
| const res2 = await GetDictDetail({ id: res1.data.parent_id }); | |||
| setOptionLevel2(res2.data.childs) | |||
| } | |||
| if (record.level2) { | |||
| let res1 = await GetDictDetail({ id: record.level2 }) | |||
| let res2 = await GetDictDetail({ id: res1.data.parent_id }) | |||
| setOptionLevel3(res2.data.childs) | |||
| } | |||
| action?.startEditable?.(record.id); | |||
| }} | |||
| > | |||
| 编辑 | |||
| </a>, | |||
| <a | |||
| key="delete" | |||
| onClick={() => { | |||
| }} | |||
| > | |||
| 删除 | |||
| </a>, | |||
| ], | |||
| }, | |||
| ]} | |||
| editable={{ | |||
| type: 'single', | |||
| 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) { | |||
| data.id = rowKey; | |||
| let res1 = await PostJobapplicantUpdatedesireposition({ id: data.id, customer_id: data.customer_id, level1: data.level1, level2: data.level2 }) | |||
| message.success('提交成功') | |||
| actionRef.current.reload(); | |||
| } else { | |||
| let res1 = await PostJobapplicantAdddesireposition({ customer_id: data.customer_id, level1: data.level1, level2: data.level2 }) | |||
| message.success('提交成功') | |||
| actionRef.current.reload(); | |||
| } | |||
| }, | |||
| onChange: setEditableRowKeys | |||
| }} | |||
| recordCreatorProps={ | |||
| { | |||
| position: 'bottom', | |||
| record: () => ({ id: list.length > 0 ? (list[list.length - 1].id + 1).toFixed(0) : 0 }), | |||
| } | |||
| } | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainJobseekerListResumeIntentionPost); | |||
| @@ -0,0 +1,101 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProForm, | |||
| FormControlRender, | |||
| ProFormDependency, | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, message, Row, Col, Form } from 'antd'; | |||
| import { PostJobapplicantAddintroduction, PostJobapplicantUpdateintroduction, GetJobapplicantIntroductiondetail } from '@/apis/api'; | |||
| import RichComponent from '@/components/Common/rich'; | |||
| const PagesMainJobseekerListResumeIntroduction: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const formRef = useRef<ProFormInstance>(); | |||
| const [detail, setDetail] = useState<ResumeType.introduction | null>(null) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProForm<ResumeType.introduction> | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await GetJobapplicantIntroductiondetail({ customer_id: id.customer_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/getOpenModal', payload: false }) | |||
| } | |||
| }} | |||
| onFinish={async (values) => { | |||
| if (detail) { | |||
| values.id = detail.id; | |||
| values.customer_id = detail.customer_id; | |||
| let res = await PostJobapplicantUpdateintroduction(values) | |||
| message.success('提交成功') | |||
| } else { | |||
| let res = await PostJobapplicantAddintroduction(values) | |||
| message.success('提交成功') | |||
| } | |||
| }} | |||
| > | |||
| <Row gutter={[16, 16]}> | |||
| <Col span={24}> | |||
| <Form.Item | |||
| name='description' | |||
| label="个人简介" | |||
| rules={[{ required: true, message: '请输入个人简介' }]} | |||
| > | |||
| <FormControlRender> | |||
| {() => { | |||
| return ( | |||
| <ProFormDependency name={['description']} > | |||
| {({ description }, form) => { | |||
| return ( | |||
| <RichComponent placeholder="请输入个人简介" defaultValue={description} | |||
| onChange={(value) => { | |||
| form.formRef.current.setFieldsValue({ | |||
| description: value | |||
| }) | |||
| }}></RichComponent> | |||
| ); | |||
| }} | |||
| </ProFormDependency> | |||
| ); | |||
| }} | |||
| </FormControlRender> | |||
| </Form.Item> | |||
| </Col> | |||
| </Row> | |||
| </ProForm> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainJobseekerListResumeIntroduction); | |||
| @@ -0,0 +1,180 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProFormText, | |||
| ProFormSelect, | |||
| ProForm, | |||
| ProFormDependency | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, message, Row, Col } from 'antd'; | |||
| import { PostJobapplicantAddskill, PostJobapplicantUpdateskill, PostJobapplicantSkilldetail } from '@/apis/api'; | |||
| const selectfieldNames = { label: 'name', value: 'id' }; | |||
| const PagesMainJobseekerListResumeSkill: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const formRef = useRef<ProFormInstance>(); | |||
| const [detail, setDetail] = useState<ResumeType.skill | null>(null) | |||
| useEffect(() => { | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2007, type: 'setOtherLanguageList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2008, type: 'setDegreeList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2023, type: 'setVehicleList' } }) | |||
| }, []) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProForm<ResumeType.skill> | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await PostJobapplicantSkilldetail({ customer_id: id.customer_id }) | |||
| setDetail(res.data) | |||
| return res.data; | |||
| } | |||
| }} | |||
| submitter={{ | |||
| searchConfig: { | |||
| resetText: '取消', | |||
| submitText: '保存', | |||
| }, | |||
| render: (_, dom) => { return <Flex justify='flex-end'> <Space>{dom}</Space></Flex> }, | |||
| onReset: () => { | |||
| } | |||
| }} | |||
| onFinish={async (values) => { | |||
| values.computer_skills = '电脑水平' + values.computer_skills; | |||
| if (detail) { | |||
| values.id = detail.id; | |||
| values.customer_id = detail.customer_id; | |||
| let res = await PostJobapplicantUpdateskill(values) | |||
| message.success('提交成功') | |||
| } else { | |||
| values.customer_id = id.customer_id; | |||
| let res = await PostJobapplicantAddskill(values) | |||
| message.success('提交成功') | |||
| } | |||
| }} | |||
| > | |||
| <Row gutter={[16, 16]}> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="english" | |||
| label="英语" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| placeholder: '请选择英语的掌握程度' | |||
| }} | |||
| options={dictModel.degreeList} | |||
| rules={[{ required: true, message: '请选择英语的掌握程度' }]} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="mandarin" | |||
| label="国语" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| placeholder: '请选择国语的掌握程度' | |||
| }} | |||
| options={dictModel.degreeList} | |||
| rules={[{ required: true, message: '请选择国语的掌握程度' }]} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="cantonese" | |||
| label="粤语" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| placeholder: '请选择粤语的掌握程度' | |||
| }} | |||
| options={dictModel.degreeList} | |||
| rules={[{ required: true, message: '请选择粤语的掌握程度' }]} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="other_language" | |||
| label="第二外语" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| placeholder: '请选择第二外语' | |||
| }} | |||
| options={dictModel.otherLanguageList} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="computer_skills" | |||
| label="电脑水平" | |||
| fieldProps={{ | |||
| fieldNames: { label: 'name', value: 'name' }, | |||
| placeholder: '请选择电脑水平' | |||
| }} | |||
| options={ | |||
| dictModel.degreeList.filter(item => [100103, 100101, 1001096].includes(item.id)) | |||
| } | |||
| rules={[{ required: true, message: '请选择电脑水平' }]} | |||
| /> | |||
| </Col> | |||
| <Col span={8}> | |||
| <ProFormSelect | |||
| name="vehicle_type" | |||
| label="交通工具" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| placeholder: '请选择交通工具' | |||
| }} | |||
| options={dictModel.vehicleList} | |||
| /> | |||
| </Col> | |||
| <ProFormDependency name={['vehicle_type']}> | |||
| {({ vehicle_type }) => { | |||
| { | |||
| return ( | |||
| vehicle_type === 1001101 && <Col span={8}> | |||
| <ProFormText | |||
| label="其他交通工具" | |||
| name="vehicle_type_other" | |||
| placeholder="请输入其他交通工具" | |||
| /> | |||
| </Col> | |||
| ); | |||
| } | |||
| }} | |||
| </ProFormDependency> | |||
| <Col span={8}> | |||
| <ProFormText | |||
| label="驾照类型" | |||
| name="drive_type" | |||
| placeholder="请输入驾照类型" | |||
| /> | |||
| </Col> | |||
| </Row> | |||
| </ProForm> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainJobseekerListResumeSkill); | |||
| @@ -0,0 +1,237 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| EditableProTable | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, message } from 'antd'; | |||
| import { PostJobapplicantAddtraining, PostJobapplicantDeltraining, PostJobapplicantUpdatetraining, PostJobapplicantListtraining, PostJobapplicantTrainingdetail } from '@/apis/api'; | |||
| const PagesMainJobseekerListResumeTrain: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [editableKeys, setEditableRowKeys] = useState<React.Key[]>([]); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [originList, setOriginList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| useEffect(() => { | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2007, type: 'setOtherLanguageList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2008, type: 'setDegreeList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2023, type: 'setVehicleList' } }) | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2024, type: 'setOvertimeList' } }) | |||
| }, []) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <EditableProTable | |||
| actionRef={actionRef} | |||
| rowKey="id" | |||
| loading={false} | |||
| request={async () => { | |||
| let res = await PostJobapplicantListtraining({ | |||
| customer_id: id.customer_id, | |||
| sortby: 'asc', | |||
| sort: 'id' | |||
| }) | |||
| setList(res.data.jobapplicanttrainings) | |||
| setOriginList(res.data.jobapplicanttrainings) | |||
| setTotal(res.data.total) | |||
| return { | |||
| data: res.data.jobapplicanttrainings, | |||
| total: res.data.total, | |||
| success: true, | |||
| } | |||
| }} | |||
| columns={[ | |||
| { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| editable: false, | |||
| width: 100 | |||
| }, | |||
| { | |||
| title: '起止时间', | |||
| dataIndex: 'date', | |||
| valueType: 'dateRange', | |||
| fieldProps: { | |||
| format: 'YYYY-MM' | |||
| }, | |||
| width: 200, | |||
| formItemProps: { | |||
| rules: [ | |||
| { | |||
| required: true, | |||
| message: '请选择起止时间', | |||
| }, | |||
| ], | |||
| }, | |||
| render: (text, record, _, action) => ( | |||
| <> | |||
| { | |||
| `${record.start_year}-${record.start_month}至${record.end_year}-${record.end_month}` | |||
| } | |||
| </> | |||
| ), | |||
| }, | |||
| { | |||
| title: '是否至今', | |||
| dataIndex: 'end_today', | |||
| width: 100, | |||
| valueType: 'select', | |||
| fieldProps: { | |||
| options: [ | |||
| { label: '非至今', value: 1 }, | |||
| { label: '至今', value: 2 }, | |||
| ] | |||
| }, | |||
| formItemProps: { | |||
| rules: [ | |||
| { | |||
| required: true, | |||
| message: '请选择是否至今', | |||
| }, | |||
| ], | |||
| }, | |||
| }, | |||
| { | |||
| title: '学校/培训机构', | |||
| dataIndex: 'school_or_institution', | |||
| formItemProps: { | |||
| rules: [ | |||
| { | |||
| required: true, | |||
| message: '请输入学校/培训机构', | |||
| }, | |||
| ], | |||
| }, | |||
| }, | |||
| { | |||
| title: '专业', | |||
| dataIndex: 'major', | |||
| formItemProps: { | |||
| rules: [ | |||
| { | |||
| required: true, | |||
| message: '请输入专业', | |||
| }, | |||
| ], | |||
| }, | |||
| }, | |||
| { | |||
| title: '获得证书', | |||
| dataIndex: 'certificate', | |||
| formItemProps: { | |||
| rules: [ | |||
| { | |||
| required: true, | |||
| message: '请输入获得证书', | |||
| }, | |||
| ], | |||
| }, | |||
| }, | |||
| { | |||
| title: '曾获学校奖项或技能比赛奖项', | |||
| dataIndex: 'awards', | |||
| formItemProps: { | |||
| rules: [ | |||
| { | |||
| required: true, | |||
| message: '请输入曾获学校奖项或技能比赛奖项', | |||
| }, | |||
| ], | |||
| }, | |||
| }, | |||
| { | |||
| title: '曾任职务', | |||
| dataIndex: 'positions_held', | |||
| formItemProps: { | |||
| rules: [ | |||
| { | |||
| required: true, | |||
| message: '请输入曾任职务', | |||
| }, | |||
| ], | |||
| }, | |||
| }, | |||
| { | |||
| title: '操作', | |||
| valueType: 'option', | |||
| width: 200, | |||
| render: (text, record, _, action) => [ | |||
| <a | |||
| key="editable" | |||
| onClick={() => { | |||
| record.date = [`${record.start_year}-${record.start_month}`, `${record.end_year}-${record.end_month}`] | |||
| action?.startEditable?.(record.id); | |||
| }} | |||
| > | |||
| 编辑 | |||
| </a>, | |||
| <a | |||
| key="delete" | |||
| onClick={() => { | |||
| }} | |||
| > | |||
| 删除 | |||
| </a>, | |||
| ], | |||
| }, | |||
| ]} | |||
| editable={{ | |||
| type: 'single', | |||
| editableKeys, | |||
| onSave: async (rowKey, data: ResumeType.train, row) => { | |||
| console.log(rowKey, data, row) | |||
| data.customer_id = id.customer_id; | |||
| let time1 = data.date[0].split('-'); | |||
| let time2 = data.date[1].split('-'); | |||
| data.start_year = parseInt(time1[0], 10); | |||
| data.start_month = parseInt(time1[1], 10); | |||
| data.end_year = parseInt(time2[0], 10); | |||
| data.end_month = parseInt(time2[1], 10); | |||
| delete data.date; | |||
| delete data.index; | |||
| if (rowKey && originList.findIndex(item => item.id === rowKey) !== -1) { | |||
| data.id = rowKey; | |||
| let res = await PostJobapplicantUpdatetraining(data) | |||
| message.success('提交成功') | |||
| actionRef.current.reload(); | |||
| } else { | |||
| delete data.id; | |||
| let res = await PostJobapplicantAddtraining(data) | |||
| message.success('提交成功') | |||
| actionRef.current.reload(); | |||
| } | |||
| }, | |||
| onChange: setEditableRowKeys, | |||
| }} | |||
| recordCreatorProps={ | |||
| { | |||
| position: 'bottom', | |||
| record: () => ({ id: list.length > 0 ? (list[list.length - 1].id + 1).toFixed(0) : 0 }), | |||
| } | |||
| } | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainJobseekerListResumeTrain); | |||
| @@ -1,14 +1,17 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType} from '@ant-design/pro-components'; | |||
| import type { ActionType } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, ConfigProvider, Image } from 'antd'; | |||
| import { PostJobseekerList } from '@/apis/api'; | |||
| import { Button, ConfigProvider, Image, message } from 'antd'; | |||
| import { PostJobseekerList, PostJobseekerExport } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel }: any) => { | |||
| const selectfieldNames = { label: 'name', value: 'id' }; | |||
| const PagesMainJobseekerListTable: React.FC = ({ dispatch, getId, dictModel, openModel }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| @@ -24,12 +27,30 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| actionRef.current.reload(); | |||
| } | |||
| }, [openModel.openModal]) | |||
| 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' } }) | |||
| }, []) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| colorLink: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| @@ -41,20 +62,176 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| columns={[ | |||
| { | |||
| title: '姓名', | |||
| dataIndex: 'seekername' | |||
| dataIndex: 'seekername', | |||
| width: 200 | |||
| }, { | |||
| title: '性别', | |||
| dataIndex: 'gender' | |||
| dataIndex: 'gender', | |||
| width: 80, | |||
| valueType: 'select', | |||
| valueEnum: { | |||
| '男': '男', | |||
| '女': '女' | |||
| } | |||
| }, { | |||
| title: '教育程度', | |||
| dataIndex: 'education_txt' | |||
| dataIndex: 'education_txt', | |||
| width: 120, | |||
| search: false | |||
| }, { | |||
| title: '教育程度', | |||
| dataIndex: 'education', | |||
| width: 120, | |||
| hidden: true, | |||
| valueType: 'select', | |||
| fieldProps: { | |||
| fieldNames: selectfieldNames, | |||
| options: dictModel.educationList | |||
| } | |||
| }, | |||
| { | |||
| title: '英语', | |||
| dataIndex: 'english_txt', | |||
| width: 120, | |||
| search: false | |||
| }, { | |||
| title: '英语', | |||
| dataIndex: 'english', | |||
| width: 120, | |||
| hidden: true, | |||
| valueType: 'select', | |||
| fieldProps: { | |||
| fieldNames: selectfieldNames, | |||
| options: dictModel.degreeList | |||
| } | |||
| }, | |||
| { | |||
| title: '国语', | |||
| dataIndex: 'mandarin_txt', | |||
| width: 120, | |||
| search: false | |||
| }, { | |||
| title: '国语', | |||
| dataIndex: 'mandarin', | |||
| width: 120, | |||
| hidden: true, | |||
| valueType: 'select', | |||
| fieldProps: { | |||
| fieldNames: selectfieldNames, | |||
| options: dictModel.degreeList | |||
| } | |||
| }, { | |||
| title: '粤语', | |||
| dataIndex: 'cantonese_txt', | |||
| width: 120, | |||
| search: false | |||
| }, { | |||
| title: '粤语', | |||
| dataIndex: 'cantonese', | |||
| width: 120, | |||
| hidden: true, | |||
| valueType: 'select', | |||
| fieldProps: { | |||
| fieldNames: selectfieldNames, | |||
| options: dictModel.degreeList | |||
| } | |||
| }, | |||
| { | |||
| title: '职称', | |||
| dataIndex: 'title_txt', | |||
| width: 120, | |||
| search: false | |||
| }, { | |||
| title: '手机号', | |||
| dataIndex: 'mobile' | |||
| title: '职称', | |||
| dataIndex: 'title', | |||
| width: 120, | |||
| hidden: true, | |||
| valueType: 'select', | |||
| fieldProps: { | |||
| fieldNames: selectfieldNames, | |||
| options: dictModel.titleList | |||
| } | |||
| }, | |||
| { | |||
| title: '政治面貌', | |||
| dataIndex: 'political_status_txt', | |||
| width: 120, | |||
| search: false | |||
| }, { | |||
| title: '政治面貌', | |||
| dataIndex: 'political_status', | |||
| width: 120, | |||
| hidden: true, | |||
| valueType: 'select', | |||
| fieldProps: { | |||
| fieldNames: selectfieldNames, | |||
| options: dictModel.politicalList | |||
| } | |||
| }, { | |||
| title: '月薪要求范围', | |||
| dataIndex: 'salary_range_txt', | |||
| width: 120, | |||
| search: false | |||
| }, { | |||
| title: '月薪要求', | |||
| dataIndex: 'salary_range_desire', | |||
| width: 120, | |||
| hidden: true, | |||
| valueType: 'select', | |||
| fieldProps: { | |||
| fieldNames: selectfieldNames, | |||
| options: dictModel.payList | |||
| } | |||
| }, | |||
| { | |||
| title: '审核状态', | |||
| dataIndex: 'status_txt', | |||
| width: 120, | |||
| search: false | |||
| }, | |||
| // { | |||
| // title: '审核状态', | |||
| // dataIndex: 'status', | |||
| // width: 120, | |||
| // hidden: true, | |||
| // valueType: 'select', | |||
| // valueEnum: { | |||
| // 0: '全部', | |||
| // 1: '待审核', | |||
| // 2: '审核通过', | |||
| // 3: '审核不通过' | |||
| // } | |||
| // }, | |||
| { | |||
| title: '简历是否可见', | |||
| dataIndex: 'hide_resume', | |||
| width: 120, | |||
| search: false, | |||
| render: (_, record) => (<> | |||
| { | |||
| <span> | |||
| {record.hide_resume == 1 ? '可见' : '不可见'} | |||
| </span> | |||
| } | |||
| </>), | |||
| }, | |||
| { | |||
| title: '简历是否在家政模块可见', | |||
| dataIndex: 'house_keeping_status', | |||
| width: 120, | |||
| search: false, | |||
| render: (_, record) => (<> | |||
| { | |||
| <span> | |||
| {record.house_keeping_status == 1 ? '可见' : '不可见'} | |||
| </span> | |||
| } | |||
| </>), | |||
| }, | |||
| { | |||
| title: '操作', | |||
| @@ -70,12 +247,12 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| }}>编辑</Button>, | |||
| <Button key='2' type='link' onClick={() => { | |||
| setId(record) | |||
| dispatch({ type: 'openModel/getOpenModal', payload: true }) | |||
| dispatch({ type: 'openModel/getOpenResumeHelpModal', payload: true }) | |||
| }}>工作帮扶情况</Button>, | |||
| // <Button key='2' type='link' onClick={() => { | |||
| // setId(record) | |||
| // dispatch({ type: 'openModel/getOpenRegisterModal', payload: true }) | |||
| // }}>就业服务登记表</Button>, | |||
| <Button key='2' type='link' onClick={() => { | |||
| setId(record) | |||
| dispatch({ type: 'openModel/getOpenResumeDetailModal', payload: true }) | |||
| }}>预览简历</Button>, | |||
| <Button key='4' type='link' onClick={() => { | |||
| setId(record) | |||
| dispatch({ type: 'openModel/getOpenExportModal', payload: true }) | |||
| @@ -106,12 +283,32 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| sort: 'id', | |||
| sortby: 'desc', | |||
| keyword: params.name, | |||
| gender: params.gender, | |||
| education: params.education, | |||
| english: params.english, | |||
| mandarin: params.mandarin, | |||
| cantonese: params.cantonese, | |||
| title: params.title, | |||
| political_status: params.political_status, | |||
| salary_range_desire: params.salary_range_desire, | |||
| status: params.status | |||
| }).then(res => { | |||
| setList(res.data.seekers) | |||
| setTotal(res.data.total) | |||
| }) | |||
| } | |||
| toolBarRender={() => [ | |||
| <Button type="primary" onClick={() => { | |||
| message.info('数据导出需要时间,请耐心等待') | |||
| PostJobseekerExport().then(res => { | |||
| let url = Imageprefix + res.data.excel_url; | |||
| window.open(url); | |||
| message.info('数据导出完毕') | |||
| }) | |||
| }}> | |||
| 导出数据 | |||
| </Button> | |||
| ]} | |||
| headerTitle="简历列表" | |||
| /> | |||
| </ConfigProvider> | |||
| @@ -124,7 +321,7 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| }; | |||
| export default connect(({ dictModel , openModel}: any) => ({ | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, | |||
| openModel | |||
| }))(PagesMainInformationArticleTable); | |||
| }))(PagesMainJobseekerListTable); | |||
| @@ -9,18 +9,19 @@ import { | |||
| ProForm, | |||
| FormControlRender, | |||
| ProFormDependency, | |||
| ProFormSwitch | |||
| ProFormCascader | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, Modal, message, Image, Row, Col, Switch, Form, Typography } from 'antd'; | |||
| import { GetRoleList, addAccount, updateAccount } from '@/apis/api'; | |||
| import { GetRoleList, addAccount, updateAccount, getUserDetail } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| import UploadModel from '@/components/Common/upload'; | |||
| const selectfieldNames = { label: 'name', value: 'id' }; | |||
| const cascaderfieldNames = { label: 'name', value: 'id', children: 'children' }; | |||
| const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const PagesPermissionAccountCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const formRef = useRef<ProFormInstance>(); | |||
| const [openPreview, setOpenPreview] = useState(false); | |||
| const [detail, setDetail] = useState<PermissionType.account | null>(null) | |||
| @@ -34,6 +35,11 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| setUploadedFilephotoName(filename); | |||
| }; | |||
| useEffect(() => { | |||
| dispatch({ type: 'dictModel/getList', payload: { code: 2009, type: 'setAreaList' } }) | |||
| }, []) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| @@ -59,7 +65,15 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await GetArticleDetail({ id: id }) | |||
| let res = await getUserDetail({ id: id }) | |||
| res.data.location_arr = [ | |||
| res.data.province ? res.data.province : 0, | |||
| res.data.city ? res.data.city : 0, | |||
| res.data.district ? res.data.district : 0, | |||
| res.data.street ? res.data.street : 0 | |||
| ]; | |||
| res.data.roleids = res.data.roleids.length > 0 ? res.data.roleids.split(',').map(Number) : [] | |||
| setDetail(res.data) | |||
| return res.data; | |||
| } else { | |||
| return { | |||
| @@ -69,7 +83,7 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| nickname: '', | |||
| avatar: '', | |||
| email: '', | |||
| roleids: '', | |||
| roleids: [], | |||
| } | |||
| } | |||
| }} | |||
| @@ -85,7 +99,13 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| } | |||
| }} | |||
| onFinish={async (values) => { | |||
| console.log(values) | |||
| values.province = values.location_arr[0] ? values.location_arr[0] : 0; | |||
| values.city = values.location_arr[1] ? values.location_arr[1] : 0; | |||
| values.district = values.location_arr[2] ? values.location_arr[2] : 0; | |||
| values.street = values.location_arr[3] ? values.location_arr[3] : 0; | |||
| delete values.location_arr; | |||
| values.roleids = values.roleids.join(',') | |||
| console.log(values.roleids) | |||
| if (id) { | |||
| values.id = id; | |||
| let res = await updateAccount(values) | |||
| @@ -105,13 +125,14 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| rules={[{ required: true, message: '请输入手机号' }]} | |||
| /> | |||
| <ProFormText | |||
| <ProFormText.Password | |||
| label="密码" | |||
| name="password" | |||
| placeholder="请输入密码" | |||
| rules={[{ required: true, message: '请输入密码' }]} | |||
| /> | |||
| <ProFormText | |||
| <ProFormText.Password | |||
| label="确认密码" | |||
| name="repassword" | |||
| placeholder="请输入确认密码" | |||
| @@ -125,22 +146,16 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| <Row gutter={[16, 16]}> | |||
| { | |||
| detail ? | |||
| <Col span={4}> | |||
| <UploadModel multiple={false} form_name="avatar" image_length={1} uploadTxt="上传头像" image_type={1} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| <Col span={24} style={{ display: 'flex' }}> | |||
| <UploadModel multiple={false} form_name="cover_img" image_length={1} uploadTxt="上传封面图" image_type={3} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| {uploadedFilephotoName ? <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginLeft: '16px', marginTop: '32px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${detail?.cover_img}`} style={{ marginLeft: '16px', marginTop: '32px', width: '100px', height: '100px' }}></Image>} | |||
| </Col> : <> | |||
| <Col span={4}> | |||
| <UploadModel multiple={false} form_name="avatar" image_length={1} uploadTxt="上传头像" image_type={1} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| <Col span={24} style={{ display: 'flex' }}> | |||
| <UploadModel multiple={false} form_name="cover_img" image_length={1} uploadTxt="上传封面图" image_type={3} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| {uploadedFilephotoName ? <Col span={8}> <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||
| </Col> | |||
| </> | |||
| } | |||
| { | |||
| detail ? | |||
| <Col span={4}> | |||
| {uploadedFilephotoName ? <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginBottom: '16px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${detail?.avatar}`} style={{ marginTop: '16px', width: '200px', height: '200px' }}></Image>} | |||
| </Col> : <> | |||
| {uploadedFilephotoName ? <Col span={4}> <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||
| </> | |||
| } | |||
| </Row> | |||
| <ProFormText | |||
| label="邮箱" | |||
| @@ -158,11 +173,21 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| }} | |||
| request={(keyword) => | |||
| GetRoleList({ page: 1, pagesize: 100, keyword: keyword.keyWords }).then(res => { | |||
| return res.data.roles; | |||
| return res.data.roles.filter(item => item.id !== 3 ); | |||
| }) | |||
| } | |||
| rules={[{ required: true, message: '请输入确认密码' }]} | |||
| /> | |||
| <ProFormCascader | |||
| label="选择社区" | |||
| name="location_arr" | |||
| fieldProps={{ | |||
| fieldNames: cascaderfieldNames, | |||
| options: dictModel.areaList, | |||
| changeOnSelect: true | |||
| }} | |||
| placeholder="企业所在地区" | |||
| /> | |||
| </ProForm> | |||
| </Modal> | |||
| @@ -175,4 +200,4 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainInformationArticleCreate); | |||
| }))(PagesPermissionAccountCreate); | |||
| @@ -1,14 +1,14 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType} from '@ant-design/pro-components'; | |||
| import { connect, history } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable | |||
| ProTable, TableDropdown | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, ConfigProvider, Image } from 'antd'; | |||
| import { getAccount } from '@/apis/api'; | |||
| import { Button, Image, ConfigProvider, Tag } from 'antd'; | |||
| import { getAccount} from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel }: any) => { | |||
| const PagesPermissionAccountTable: React.FC = ({ dispatch, openModel, getId }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| @@ -24,17 +24,20 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| actionRef.current.reload(); | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| colorLink: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProTable | |||
| size='small' | |||
| bordered={true} | |||
| scroll={{ x: 1300 }} | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| @@ -44,16 +47,23 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| dataIndex: 'mobile' | |||
| }, { | |||
| title: '昵称', | |||
| dataIndex: 'nickname' | |||
| dataIndex: 'nickname', | |||
| search: false, | |||
| }, { | |||
| title: '头像', | |||
| dataIndex: 'avatar' | |||
| dataIndex: 'avatar', | |||
| search: false, | |||
| }, { | |||
| title: '电子邮箱', | |||
| dataIndex: 'email' | |||
| dataIndex: 'email', | |||
| search: false, | |||
| }, { | |||
| title: '角色ID', | |||
| dataIndex: 'roleids' | |||
| dataIndex: 'roleids', | |||
| search: false, | |||
| }, | |||
| { | |||
| title: '操作', | |||
| @@ -94,7 +104,7 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| pagesize: pageSize, | |||
| sort: 'id', | |||
| sortby: 'desc', | |||
| keyword: params.name, | |||
| keyword: params.mobile, | |||
| }).then(res => { | |||
| setList(res.data.users) | |||
| @@ -111,16 +121,11 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| ]} | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel , openModel}: any) => ({ | |||
| dictModel, | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(PagesMainInformationArticleTable); | |||
| }))(PagesPermissionAccountTable); | |||
| @@ -12,13 +12,13 @@ import { | |||
| ProFormSwitch | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, Modal, message, Image, Row, Col, Switch, Form, Typography } from 'antd'; | |||
| import { addArticle, updateArticle, listSection, GetArticleDetail } from '@/apis/api'; | |||
| import { addPermission, updatePermission, getPermissionListWithchilds, GetDetailPermission} from '@/apis/api'; | |||
| const selectfieldNames = { label: 'name', value: 'id' }; | |||
| const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const PagesPermissionListCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const formRef = useRef<ProFormInstance>(); | |||
| const [openPreview, setOpenPreview] = useState(false); | |||
| const [detail, setDetail] = useState<PermissionType.list | null>(null) | |||
| @@ -53,9 +53,24 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await GetArticleDetail({ id: id }) | |||
| return res.data; | |||
| if (id.nextlevel) { | |||
| setDetail(null) | |||
| return { | |||
| name: '', | |||
| path: '', | |||
| action: '', | |||
| module: '', | |||
| p_type: '', | |||
| parent_id: id.nextlevel, | |||
| description: '' | |||
| }; | |||
| } else { | |||
| let res = await GetDetailPermission({ id: id.id }) | |||
| setDetail(res.data) | |||
| return res.data; | |||
| } | |||
| } else { | |||
| setDetail(null) | |||
| return { | |||
| name: '', | |||
| path: '', | |||
| @@ -66,6 +81,7 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| description: '', | |||
| } | |||
| } | |||
| }} | |||
| submitter={{ | |||
| searchConfig: { | |||
| @@ -79,14 +95,21 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| } | |||
| }} | |||
| onFinish={async (values) => { | |||
| if (id.nextlevel) { | |||
| values.parent_id = id.nextlevel; | |||
| } else if (detail && detail.id) { | |||
| values.parent_id = detail.parent_id; | |||
| } else { | |||
| values.parent_id = -1; | |||
| } | |||
| console.log(values) | |||
| if (id) { | |||
| values.id = id; | |||
| let res = await updateArticle(values) | |||
| if (detail) { | |||
| values.id = id.id; | |||
| let res = await updatePermission(values) | |||
| message.success('提交成功') | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| } else { | |||
| let res = await addArticle(values) | |||
| let res = await addPermission(values) | |||
| message.success('提交成功') | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| } | |||
| @@ -94,7 +117,7 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| > | |||
| <ProFormText | |||
| label="权限/菜单名称" | |||
| name="title" | |||
| name="name" | |||
| placeholder="请输入权限/菜单名称" | |||
| rules={[{ required: true, message: '请输入权限/菜单名称' }]} | |||
| /> | |||
| @@ -125,16 +148,6 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| ]} | |||
| rules={[{ required: true, message: '请选择是否置顶' }]} | |||
| /> | |||
| <ProFormSegmented | |||
| name="parent_id" | |||
| label="是否是顶级菜单" | |||
| request={async () => [ | |||
| { label: '是', value: -1 }, | |||
| { label: '否', value: 0 } | |||
| ]} | |||
| rules={[{ required: true, message: '请选择是否是顶级菜单' }]} | |||
| /> | |||
| <ProFormText | |||
| name="description" | |||
| label="描述" | |||
| @@ -152,4 +165,4 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainInformationArticleCreate); | |||
| }))(PagesPermissionListCreate); | |||
| @@ -1,13 +1,14 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType } from '@ant-design/pro-components'; | |||
| import { connect, history } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable | |||
| ProTable, TableDropdown | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, ConfigProvider, Tag } from 'antd'; | |||
| import { getPermissionListWithchilds } from '@/apis/api'; | |||
| import { Button, Image, ConfigProvider, Tag } from 'antd'; | |||
| import { getPermissionListWithchilds} from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| const PagesMainInformationArticleTable: React.FC = ({ dispatch, getId, openModel }: any) => { | |||
| const PagesPermissionListTable: React.FC = ({ dispatch, openModel, getId }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| @@ -23,45 +24,70 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch, getId, openModel | |||
| actionRef.current.reload(); | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| colorLink: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProTable | |||
| size='small' | |||
| search={false} | |||
| bordered={true} | |||
| scroll={{ x: 1300 }} | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| columns={[ | |||
| { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| width: 100, | |||
| search: false, | |||
| }, | |||
| { | |||
| title: '权限/菜单', | |||
| dataIndex: 'name', | |||
| width: 300, | |||
| search: false, | |||
| render: (_, record) => (<> | |||
| {record.p_type == 1 ? <>{record.name} <Tag>权限</Tag></> : <>{record.name} <Tag>菜单</Tag></>} | |||
| {record.p_type == 1 ? <>{record.name} <Tag>权限</Tag></> : <>{record.name} <Tag color='green'>菜单</Tag></>} | |||
| </> | |||
| ) | |||
| }, { | |||
| title: '权限/菜单', | |||
| dataIndex: 'p_type', | |||
| search: false, | |||
| width: 100, | |||
| render: (_, record) => (<> | |||
| {record.p_type == 1 ? <><Tag>权限</Tag></> : <> <Tag color='green'>菜单</Tag></>} | |||
| </> | |||
| ) | |||
| },{ | |||
| title: '路径', | |||
| dataIndex: 'path', | |||
| search: false | |||
| search: false, | |||
| width: 180, | |||
| }, { | |||
| title: '标识名称', | |||
| dataIndex: 'action', | |||
| search: false | |||
| search: false, | |||
| width: 180, | |||
| }, { | |||
| title: '指向页面', | |||
| dataIndex: 'module', | |||
| search: false | |||
| search: false, | |||
| width: 180, | |||
| }, { | |||
| title: '上级菜单id', | |||
| dataIndex: 'parent_id', | |||
| search: false, | |||
| width: 180, | |||
| render: (_, record) => (<> | |||
| {record.parent_id == -1 ? '当前已是顶级菜单' : record.parent_id} | |||
| </> | |||
| @@ -69,7 +95,8 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch, getId, openModel | |||
| }, { | |||
| title: '描述', | |||
| dataIndex: 'description', | |||
| search: false | |||
| search: false, | |||
| width: 180, | |||
| }, | |||
| { | |||
| title: '操作', | |||
| @@ -78,19 +105,18 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch, getId, openModel | |||
| valueType: 'option', | |||
| fixed: 'right', | |||
| render: (_, record, action) => [ | |||
| <> | |||
| <Button key='1' type='link' onClick={() => { | |||
| setId(record.id) | |||
| dispatch({ type: 'openModel/getOpenModal', payload: true }) | |||
| }}>编辑</Button> | |||
| { | |||
| record.p_type == 2 && <Button key='2' type='link' onClick={() => { | |||
| }}>添加下级菜单</Button> | |||
| } | |||
| </> | |||
| <Button key='1' type='link' onClick={() => { | |||
| setId(record) | |||
| dispatch({ type: 'openModel/getOpenModal', payload: true }) | |||
| }}>编辑</Button>, | |||
| <Button key='1' 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>, | |||
| ], | |||
| }, | |||
| ]} | |||
| @@ -136,16 +162,11 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch, getId, openModel | |||
| }} | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(PagesMainInformationArticleTable); | |||
| }))(PagesPermissionListTable); | |||
| @@ -1,4 +1,3 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| @@ -6,11 +5,11 @@ import { | |||
| ProFormText, | |||
| ProForm, | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, Modal, message} from 'antd'; | |||
| import { PostRoleAdd, PostRoleEdit } from '@/apis/api'; | |||
| import { ConfigProvider, Flex, Space, Modal, message } from 'antd'; | |||
| import { PostRoleAdd, PostRoleEdit, GetRoleDetail } from '@/apis/api'; | |||
| const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const PagesPermissionRoleCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const formRef = useRef<ProFormInstance>(); | |||
| const [openPreview, setOpenPreview] = useState(false); | |||
| const [detail, setDetail] = useState<PermissionType.role | null>(null) | |||
| @@ -45,7 +44,8 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await GetArticleDetail({ id: id }) | |||
| let res = await GetRoleDetail({ id: id }) | |||
| setDetail(res.data) | |||
| return res.data; | |||
| } else { | |||
| return { | |||
| @@ -109,4 +109,4 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainInformationArticleCreate); | |||
| }))(PagesPermissionRoleCreate); | |||
| @@ -1,14 +1,8 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Space, Collapse, Tag, Modal, message, Checkbox, Button, Row, Col, Input, Segmented, DatePicker } from 'antd'; | |||
| import { PostRoleAddpermission, getPermissionListWithchilds, getRoleGetpermissions } from '@/apis/api'; | |||
| import { CheckBox } from 'docx'; | |||
| const selectfieldNames = { label: 'name', value: 'id' }; | |||
| import { ConfigProvider, Space, Collapse, Tag, Modal, Row, Col, message} from 'antd'; | |||
| import { PostRoleAddpermission,PostRoleDelpermission, getPermissionListWithchilds, getRoleGetpermissions } from '@/apis/api'; | |||
| const PagesMainPermissionRoleDispense: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const [openPreview, setOpenPreview] = useState(false); | |||
| @@ -26,6 +20,19 @@ const PagesMainPermissionRoleDispense: React.FC = ({ dispatch, dictModel, openMo | |||
| ? [...selectedIds, tag] | |||
| : selectedIds.filter((t) => t !== tag); | |||
| setSelectedIds(nextSelectedTags); | |||
| if (checked) { | |||
| PostRoleAddpermission({ role_id: id, permission_id: tag }).then(res => { | |||
| message.success('分配成功') | |||
| }).catch(err => { | |||
| message.error('添加失败') | |||
| }) | |||
| } else { | |||
| PostRoleDelpermission({ role_id: id, permission_id: tag }).then(res => { | |||
| message.success('移除成功') | |||
| }).catch(err => { | |||
| message.error('移除成功') | |||
| }) | |||
| } | |||
| }; | |||
| // 递归函数用于收集所有权限ID | |||
| @@ -39,18 +46,20 @@ const PagesMainPermissionRoleDispense: React.FC = ({ dispatch, dictModel, openMo | |||
| return ids; | |||
| } | |||
| // 检查给定的 id 是否存在于 res.data 中,并返回对应的下标加 1 | |||
| function checkIdInData(ids, data) { | |||
| const result = []; | |||
| ids.forEach(id => { | |||
| const index = data.findIndex(item => item.id === id); | |||
| if (index !== -1) { | |||
| result.push((index + 1).toString()); | |||
| } | |||
| }); | |||
| // 去重 | |||
| const uniqueResult = [...new Set(result)]; | |||
| return uniqueResult; | |||
| function checkIdInData(ids : number, data :number) { | |||
| const result: any = []; | |||
| if(ids && ids.length > 0) { | |||
| ids.forEach(id => { | |||
| const index = data.findIndex(item => item.id === id); | |||
| if (index !== -1) { | |||
| result.push((index + 1).toString()); | |||
| } | |||
| }) // 去重 | |||
| const uniqueResult = [...new Set(result)]; | |||
| return uniqueResult; | |||
| } else { | |||
| return result; | |||
| } | |||
| } | |||
| return ( | |||
| <> | |||
| @@ -60,27 +69,36 @@ const PagesMainPermissionRoleDispense: React.FC = ({ dispatch, dictModel, openMo | |||
| }} | |||
| > | |||
| <Modal | |||
| title={'分配权限'} | |||
| open={openPreview} | |||
| centered | |||
| maskClosable={false} | |||
| destroyOnClose | |||
| width={1000} | |||
| onCancel={() => { | |||
| dispatch({ type: 'openModel/openExportModal', payload: false }) | |||
| dispatch({ type: 'openModel/getOpenDispenseModal', payload: false }) | |||
| }} | |||
| afterOpenChange={async (open) => { | |||
| if (open) { | |||
| setDetail(null) | |||
| setSelectedIds([]) | |||
| setCollapseKey([]) | |||
| let res = await getPermissionListWithchilds() | |||
| setDetail(res.data) | |||
| let resrole = await getRoleGetpermissions({ ids: id }) | |||
| const nextSelectedTags = resrole.data.permissions.flatMap(permission => | |||
| const nextSelectedTags = resrole.data.permissions.length > 0 ? resrole.data.permissions.flatMap(permission => | |||
| collectAllPermissionIds(permission) | |||
| ); | |||
| ) : [] | |||
| setSelectedIds(nextSelectedTags); | |||
| const uniqueIndexes = checkIdInData(nextSelectedTags, res.data.permissions); | |||
| console.log(uniqueIndexes); // 输出去重后的结果 | |||
| // 设置状态 | |||
| setCollapseKey(uniqueIndexes); | |||
| if(uniqueIndexes.length > 0) { | |||
| setCollapseKey(uniqueIndexes); | |||
| } else { | |||
| setCollapseKey(["1"]); | |||
| } | |||
| } | |||
| }} | |||
| onOk={async () => { | |||
| @@ -1,13 +1,14 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType} from '@ant-design/pro-components'; | |||
| import { connect, history } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable | |||
| ProTable, TableDropdown | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, ConfigProvider, Image } from 'antd'; | |||
| import { Button, Image, ConfigProvider, Tag } from 'antd'; | |||
| import { GetRoleList } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel }: any) => { | |||
| const PagesPermissionRoleTable: React.FC = ({ dispatch, openModel, getId }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| @@ -23,24 +24,29 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| actionRef.current.reload(); | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| colorLink: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProTable | |||
| size='small' | |||
| bordered={true} | |||
| scroll={{ x: 1300 }} | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| columns={[ | |||
| { | |||
| title: 'ID', | |||
| dataIndex: 'id' | |||
| dataIndex: 'id', | |||
| width: 100, | |||
| search: false, | |||
| }, | |||
| { | |||
| title: '角色名', | |||
| @@ -48,11 +54,13 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| }, | |||
| { | |||
| title: '别名', | |||
| dataIndex: 'code' | |||
| dataIndex: 'code', | |||
| search: false, | |||
| }, | |||
| { | |||
| title: '描述', | |||
| dataIndex: 'description' | |||
| dataIndex: 'description', | |||
| search: false, | |||
| }, | |||
| { | |||
| title: '操作', | |||
| @@ -98,7 +106,7 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| sort: 'id', | |||
| sortby: 'desc', | |||
| keyword: params.name, | |||
| }).then(res => { | |||
| setList(res.data.roles) | |||
| setTotal(res.data.total) | |||
| @@ -114,16 +122,11 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| ]} | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel , openModel}: any) => ({ | |||
| dictModel, | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(PagesMainInformationArticleTable); | |||
| }))(PagesPermissionRoleTable); | |||
| @@ -1,4 +1,3 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| @@ -6,21 +5,15 @@ import { | |||
| ProFormText, | |||
| ProFormSegmented, | |||
| ProFormSelect, | |||
| ProForm, | |||
| FormControlRender, | |||
| ProFormDependency, | |||
| ProFormSwitch | |||
| ProForm | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, Modal, message, Image, Row, Col, Switch, Form, Typography } from 'antd'; | |||
| import { PostDictAdd, PostDictUpdate } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| import UploadModel from '@/components/Common/upload'; | |||
| import { ConfigProvider, Flex, Space, Modal, message, Image, Row, Col, Switch } from 'antd'; | |||
| import {PostDictAdd, PostDictUpdate , GetDictDetail } from '@/apis/api'; | |||
| const selectfieldNames = { label: 'name', value: 'id' }; | |||
| const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const PagesSettingDictionaryCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const formRef = useRef<ProFormInstance>(); | |||
| const [openPreview, setOpenPreview] = useState(false); | |||
| const [detail, setDetail] = useState<SettingType.dict | null>(null) | |||
| @@ -29,11 +22,6 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| setOpenPreview(openModel.openModal) | |||
| }, [openModel.openModal]) | |||
| const [uploadedFilephotoName, setUploadedFilephotoName] = useState<string>(''); | |||
| const handleFileUploadedphoto = (filename: string) => { | |||
| setUploadedFilephotoName(filename); | |||
| }; | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| @@ -59,9 +47,23 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await GetArticleDetail({ id: id }) | |||
| return res.data; | |||
| if (id.nextlevel) { | |||
| setDetail(null) | |||
| return { | |||
| code: '', | |||
| parent_id: id.nextlevel, | |||
| name: '', | |||
| value: '', | |||
| display: '', | |||
| childs: null, | |||
| }; | |||
| } else { | |||
| let res = await GetDictDetail({ id: id.id }) | |||
| setDetail(res.data) | |||
| return res.data; | |||
| } | |||
| } else { | |||
| setDetail(null) | |||
| return { | |||
| code: '', | |||
| parent_id: -1, | |||
| @@ -80,13 +82,21 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| render: (_, dom) => { return <Flex justify='flex-end'> <Space>{dom}</Space></Flex> }, | |||
| onReset: () => { | |||
| setDetail(null) | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| setOpenPreview(false) | |||
| } | |||
| }} | |||
| onFinish={async (values) => { | |||
| if (id.nextlevel) { | |||
| values.parent_id = id.nextlevel; | |||
| } else if (detail && detail.id) { | |||
| values.parent_id = detail.parent_id | |||
| } else { | |||
| values.parent_id = -1 | |||
| } | |||
| values.childs = null | |||
| console.log(values) | |||
| if (id) { | |||
| values.id = id; | |||
| if (detail) { | |||
| values.id = id.id; | |||
| let res = await PostDictUpdate(values) | |||
| message.success('提交成功') | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| @@ -105,7 +115,7 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| /> | |||
| <ProFormText | |||
| label="字典标识名" | |||
| label="字典标识名,字典标识名为数字,带上上级的标识名,一般顶级为四位数字,例如:2009,一级为八位,例如:20090001,20090002,以此类推" | |||
| name="code" | |||
| placeholder="请输入字典标识名" | |||
| rules={[{ required: true, message: '请输入字典标识名' }]} | |||
| @@ -114,7 +124,6 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| label="字典代码值" | |||
| name="value" | |||
| placeholder="请输入字典代码值" | |||
| rules={[{ required: true, message: '请输入字典代码值' }]} | |||
| /> | |||
| <ProFormSegmented | |||
| name="display" | |||
| @@ -138,4 +147,4 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainInformationArticleCreate); | |||
| }))(PagesSettingDictionaryCreate); | |||
| @@ -1,14 +1,14 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType} from '@ant-design/pro-components'; | |||
| import { connect, history } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable | |||
| ProTable, TableDropdown | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, ConfigProvider, Image } from 'antd'; | |||
| import { GetDictList } from '@/apis/api'; | |||
| import { Button, Image, ConfigProvider, Tag } from 'antd'; | |||
| import { GetDictList} from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel }: any) => { | |||
| const PagesSettingDictionaryTable: React.FC = ({ dispatch, openModel, getId }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| @@ -24,17 +24,21 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| actionRef.current.reload(); | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| colorLink: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProTable | |||
| size='small' | |||
| search={false} | |||
| bordered={true} | |||
| scroll={{ x: 1300 }} | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| @@ -63,12 +67,17 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| fixed: 'right', | |||
| render: (_, record, action) => [ | |||
| <Button key='1' type='link' onClick={() => { | |||
| setId(record.id) | |||
| setId(record) | |||
| dispatch({ type: 'openModel/getOpenModal', payload: true }) | |||
| }}>编辑</Button>, | |||
| <Button key='1' 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> | |||
| }}>删除</Button>, | |||
| ], | |||
| }, | |||
| ]} | |||
| @@ -102,26 +111,24 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| setTotal(res.data.total) | |||
| }) | |||
| } | |||
| headerTitle="账号列表" | |||
| headerTitle="字典列表" | |||
| toolBarRender={() => [ | |||
| <Button type="primary" onClick={() => { | |||
| dispatch({ type: 'openModel/getOpenModal', payload: true }) | |||
| }}> | |||
| 添加账号 | |||
| 字典列表 | |||
| </Button> | |||
| ]} | |||
| expandable={{ | |||
| childrenColumnName: 'children', // 指定子节点数据的字段名 | |||
| }} | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel , openModel}: any) => ({ | |||
| dictModel, | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(PagesMainInformationArticleTable); | |||
| }))(PagesSettingDictionaryTable); | |||
| @@ -3,16 +3,11 @@ 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, | |||
| ProFormDependency, | |||
| ProFormSwitch | |||
| ProFormTextArea, | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, Modal, message, Image, Row, Col, Switch, Form, Typography } from 'antd'; | |||
| import { GetRoleList, addAccount, updateAccount } from '@/apis/api'; | |||
| import { GetTokenizerGet, PostTokenizerModify } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| import UploadModel from '@/components/Common/upload'; | |||
| @@ -45,7 +40,7 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| > | |||
| <Modal | |||
| open={openPreview} | |||
| title={id ? '编辑账号' : '添加账号'} | |||
| title='更新分词器' | |||
| centered | |||
| maskClosable={false} | |||
| footer={null} | |||
| @@ -59,17 +54,12 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await GetArticleDetail({ id: id }) | |||
| let res = await GetTokenizerGet({ id: id }) | |||
| setDetail(res.data) | |||
| return res.data; | |||
| } else { | |||
| return { | |||
| mobile: '', | |||
| password: '', | |||
| repassword: '', | |||
| nickname: '', | |||
| avatar: '', | |||
| email: '', | |||
| roleids: '', | |||
| text: '' | |||
| } | |||
| } | |||
| }} | |||
| @@ -85,82 +75,16 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| } | |||
| }} | |||
| onFinish={async (values) => { | |||
| console.log(values) | |||
| if (id) { | |||
| values.id = id; | |||
| let res = await updateAccount(values) | |||
| message.success('提交成功') | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| } else { | |||
| let res = await addAccount(values) | |||
| message.success('提交成功') | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| } | |||
| let res = await PostTokenizerModify(values) | |||
| message.success('提交成功') | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| }} | |||
| > | |||
| <ProFormText | |||
| label="手机号" | |||
| name="mobile" | |||
| placeholder="请输入手机号" | |||
| rules={[{ required: true, message: '请输入手机号' }]} | |||
| /> | |||
| <ProFormText | |||
| label="密码" | |||
| name="password" | |||
| placeholder="请输入密码" | |||
| rules={[{ required: true, message: '请输入密码' }]} | |||
| /> | |||
| <ProFormText | |||
| label="确认密码" | |||
| name="repassword" | |||
| placeholder="请输入确认密码" | |||
| rules={[{ required: true, message: '请输入确认密码' }]} | |||
| /> | |||
| <ProFormText | |||
| label="昵称" | |||
| name="nickname" | |||
| placeholder="请输入昵称" | |||
| /> | |||
| <Row gutter={[16, 16]}> | |||
| { | |||
| detail ? | |||
| <Col span={4}> | |||
| <UploadModel multiple={false} form_name="avatar" image_length={1} uploadTxt="上传头像" image_type={1} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| </Col> : <> | |||
| <Col span={4}> | |||
| <UploadModel multiple={false} form_name="avatar" image_length={1} uploadTxt="上传头像" image_type={1} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| </Col> | |||
| </> | |||
| } | |||
| { | |||
| detail ? | |||
| <Col span={4}> | |||
| {uploadedFilephotoName ? <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginBottom: '16px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${detail?.avatar}`} style={{ marginTop: '16px', width: '200px', height: '200px' }}></Image>} | |||
| </Col> : <> | |||
| {uploadedFilephotoName ? <Col span={4}> <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||
| </> | |||
| } | |||
| </Row> | |||
| <ProFormText | |||
| label="邮箱" | |||
| name="email" | |||
| placeholder="请输入邮箱" | |||
| /> | |||
| <ProFormSelect | |||
| showSearch | |||
| name="roleids" | |||
| label="选择角色" | |||
| placeholder="请选择角色" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldNames, | |||
| mode: 'multiple' | |||
| }} | |||
| request={(keyword) => | |||
| GetRoleList({ page: 1, pagesize: 100, keyword: keyword.keyWords }).then(res => { | |||
| return res.data.roles; | |||
| }) | |||
| } | |||
| <ProFormTextArea | |||
| name="text" | |||
| label="分词内容" | |||
| placeholder="请输入分词内容" | |||
| rules={[{ required: true, message: '请输入分词内容' }]} | |||
| /> | |||
| @@ -11,10 +11,6 @@ import { Imageprefix } from '@/constants'; | |||
| const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| const [page, setPage] = useState<number>(1) | |||
| const [pageSize, setPageSize] = useState<number>(10) | |||
| const setId = (id: number) => { | |||
| getId(id) | |||
| } | |||
| @@ -30,79 +26,39 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| colorLink: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProTable | |||
| scroll={{ x: 1300 }} | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| search={false} | |||
| columns={[ | |||
| { | |||
| title: 'CI ', | |||
| dataIndex: 'name' | |||
| }, | |||
| { | |||
| title: '配置内容', | |||
| dataIndex: 'value' | |||
| }, | |||
| { | |||
| title: '备注', | |||
| dataIndex: 'remark' | |||
| title: '分词内容', | |||
| dataIndex: 'text' | |||
| }, | |||
| { | |||
| title: '操作', | |||
| dataIndex: 'operation', | |||
| }, | |||
| { | |||
| 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={() => { | |||
| }}>删除</Button> | |||
| }}>更新分词器</Button> | |||
| ], | |||
| }, | |||
| ]} | |||
| 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>) => | |||
| GetTokenizerGet().then(res => { | |||
| setList(res.data.text) | |||
| setTotal(res.data.total) | |||
| setList([{text: res.data.text}]) | |||
| }) | |||
| } | |||
| headerTitle="分词器" | |||
| toolBarRender={() => [ | |||
| <Button type="primary" onClick={() => { | |||
| dispatch({ type: 'openModel/getOpenModal', payload: true }) | |||
| }}> | |||
| 添加账号 | |||
| </Button> | |||
| ]} | |||
| /> | |||
| </ConfigProvider> | |||
| @@ -11,13 +11,13 @@ import { | |||
| ProFormDependency | |||
| } from '@ant-design/pro-components'; | |||
| import { ConfigProvider, Flex, Space, Modal, message, Image, Row, Col, Switch, Form, Typography } from 'antd'; | |||
| import { PostSysconfigAdd, PostSysconfigUpdate } from '@/apis/api'; | |||
| import { PostSysconfigAdd, PostSysconfigUpdate, GetSysconfigDetail } from '@/apis/api'; | |||
| import RichComponent from '@/components/Common/rich'; | |||
| const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const PagesSettingSystemCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||
| const formRef = useRef<ProFormInstance>(); | |||
| const [openPreview, setOpenPreview] = useState(false); | |||
| const [detail, setDetail] = useState<PermissionType.account | null>(null) | |||
| const [detail, setDetail] = useState<SettingType.system | null>(null) | |||
| useEffect(() => { | |||
| setOpenPreview(openModel.openModal) | |||
| @@ -42,7 +42,7 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| > | |||
| <Modal | |||
| open={openPreview} | |||
| title={id ? '编辑账号' : '添加账号'} | |||
| title={id ? '编辑配置项' : '添加配置项'} | |||
| centered | |||
| maskClosable={false} | |||
| footer={null} | |||
| @@ -52,11 +52,12 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||
| }} | |||
| > | |||
| <ProForm<PermissionType.account> | |||
| <ProForm<SettingType.system> | |||
| formRef={formRef} | |||
| request={async () => { | |||
| if (id) { | |||
| let res = await GetArticleDetail({ id: id }) | |||
| let res = await GetSysconfigDetail({ id: id }) | |||
| setDetail(res.data) | |||
| return res.data; | |||
| } else { | |||
| return { | |||
| @@ -156,7 +157,7 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| <ProFormText | |||
| label="备注" | |||
| name="mobile" | |||
| name="remark" | |||
| placeholder="请输入备注" | |||
| rules={[{ required: true, message: '请输入备注' }]} | |||
| /> | |||
| @@ -172,4 +173,4 @@ const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, open | |||
| export default connect(({ dictModel, openModel }: any) => ({ | |||
| dictModel, openModel | |||
| }))(PagesMainInformationArticleCreate); | |||
| }))(PagesSettingSystemCreate); | |||
| @@ -1,14 +1,15 @@ | |||
| import { useRef, useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import type { ActionType} from '@ant-design/pro-components'; | |||
| import { connect, history } from '@umijs/max'; | |||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable | |||
| ProTable, TableDropdown | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, ConfigProvider, Image } from 'antd'; | |||
| import { Button, Image, ConfigProvider, Typography } from 'antd'; | |||
| import { GetSysconfigList } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| import he from 'he'; | |||
| const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel }: any) => { | |||
| const PagesSettingSystemTable: React.FC = ({ dispatch, openModel, getId }: any) => { | |||
| const actionRef = useRef<ActionType>(); | |||
| const [list, setList] = useState<object[]>([]) | |||
| const [total, setTotal] = useState<number>(0) | |||
| @@ -24,40 +25,54 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| actionRef.current.reload(); | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| colorLink: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <ProTable | |||
| size='small' | |||
| bordered={true} | |||
| scroll={{ x: 1300 }} | |||
| actionRef={actionRef} | |||
| dataSource={list} | |||
| columns={[ | |||
| { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| width: 100, | |||
| search: false, | |||
| }, | |||
| { | |||
| title: '备注', | |||
| dataIndex: 'remark' | |||
| dataIndex: 'remark', | |||
| width: 200, | |||
| search: false, | |||
| }, | |||
| { | |||
| title: '配置项', | |||
| dataIndex: 'name' | |||
| dataIndex: 'name', | |||
| width: 200, | |||
| }, | |||
| { | |||
| title: '配置内容', | |||
| dataIndex: 'value', | |||
| ellipsis: true | |||
| ellipsis: true, | |||
| search: false, | |||
| }, | |||
| { | |||
| title: '操作', | |||
| width: 300, | |||
| width: 200, | |||
| key: 'option', | |||
| valueType: 'option', | |||
| fixed: 'right', | |||
| render: (_, record, action) => [ | |||
| <Button key='1' type='link' onClick={() => { | |||
| setId(record.id) | |||
| @@ -92,7 +107,7 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| sort: 'id', | |||
| sortby: 'desc', | |||
| keyword: params.name, | |||
| }).then(res => { | |||
| setList(res.data.sysconfigs) | |||
| setTotal(res.data.total) | |||
| @@ -108,16 +123,11 @@ const PagesMainInformationArticleTable: React.FC = ({ dispatch,getId, openModel | |||
| ]} | |||
| /> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ dictModel , openModel}: any) => ({ | |||
| dictModel, | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(PagesMainInformationArticleTable); | |||
| }))(PagesSettingSystemTable); | |||
| @@ -2,7 +2,7 @@ export const DEFAULT_NAME = 'Umi Max'; | |||
| export const web: string = '/web'; | |||
| export const common: string = '/common'; | |||
| export type StringOptional = string | undefined; | |||
| export const Imageprefix: string = 'https://rcsc-test.jcjob.cn/img/'; | |||
| export const Imageprefix: string = process.env.NODE_ENV == 'production' ? 'https://admin1.jcjob.cn/img/' : 'https://rcsc-test.jcjob.cn/img/' | |||
| export const baseUrl: string = process.env.NODE_ENV == 'production' ? 'https://admin1.jcjob.cn/api' : 'https://rcsc-test.jcjob.cn/api' | |||
| @@ -55,7 +55,9 @@ export default { | |||
| holidayRestList: [], // code: 2017 | |||
| licenseList: [], // code: 2018 | |||
| vehicleList: [], // code: 2023 | |||
| overtimeList: [] // code: 2024 | |||
| overtimeList: [], // code: 2024 | |||
| industryPostList: [] // code: 2027 | |||
| }, | |||
| reducers: { | |||
| setXiaolanzhenList(state: any, { payload }: any) { | |||
| @@ -215,6 +217,13 @@ export default { | |||
| overtimeList: payload | |||
| } | |||
| }, | |||
| setIndustryPostList(state: any, { payload }: any) { | |||
| return { | |||
| ...state, | |||
| industryPostList: payload | |||
| } | |||
| }, | |||
| }, | |||
| effects: { | |||
| @@ -4,6 +4,8 @@ export default { | |||
| openModal: false, | |||
| openRegisterModal: false, // 简历列表的就业服务登记表开关 | |||
| openExportModal: false, // 简历登记表导出的开关 | |||
| openResumeDetailModal: false, // 预览简历 | |||
| openResumeHelpModal: false, // 帮扶简历 | |||
| editRegisterKey: '', | |||
| editRegister: { | |||
| seekername: false, | |||
| @@ -14,7 +16,11 @@ export default { | |||
| education: false | |||
| }, | |||
| needConfirmation: false, // 显示退出确认框 | |||
| openDispenseModal: false // 为角色分配权限开关 | |||
| openDispenseModal: false, // 为角色分配权限开关 | |||
| openFeeModal: false, // vip变更费用开关 | |||
| openFairDetailModal: false, // 预览招聘会 | |||
| }, | |||
| reducers: { | |||
| setOpenModal(state: any, { payload }: any) { | |||
| @@ -41,6 +47,31 @@ export default { | |||
| openDispenseModal: payload | |||
| } | |||
| }, | |||
| setOpenResumeDetailModal(state: any, { payload }: any) { | |||
| return { | |||
| ...state, | |||
| openResumeDetailModal: payload | |||
| } | |||
| }, | |||
| setOpenResumeHelpModal(state: any, { payload }: any) { | |||
| return { | |||
| ...state, | |||
| openResumeHelpModal: payload | |||
| } | |||
| }, | |||
| setOpenFeeModal(state: any, { payload }: any) { | |||
| return { | |||
| ...state, | |||
| openFeeModal: payload | |||
| } | |||
| }, | |||
| setOpenFairDetailModal(state: any, { payload }: any) { | |||
| return { | |||
| ...state, | |||
| openFairDetailModal: payload | |||
| } | |||
| }, | |||
| setEditRegister(state: any, { payload }: any) { | |||
| if (state.editRegisterKey && state.editRegisterKey !== payload.key) { | |||
| return { | |||
| @@ -140,6 +171,47 @@ export default { | |||
| console.log(error) | |||
| } | |||
| }, | |||
| *getOpenResumeDetailModal({ payload }: any, { put }: any): any { | |||
| try { | |||
| yield put({ | |||
| type: 'setOpenResumeDetailModal', | |||
| payload: payload | |||
| }) | |||
| } catch (error) { | |||
| console.log(error) | |||
| } | |||
| }, | |||
| *getOpenResumeHelpModal({ payload }: any, { put }: any): any { | |||
| try { | |||
| yield put({ | |||
| type: 'setOpenResumeHelpModal', | |||
| payload: payload | |||
| }) | |||
| } catch (error) { | |||
| console.log(error) | |||
| } | |||
| }, | |||
| *getOpenFeeModal({ payload }: any, { put }: any): any { | |||
| try { | |||
| yield put({ | |||
| type: 'setOpenFeeModal', | |||
| payload: payload | |||
| }) | |||
| } catch (error) { | |||
| console.log(error) | |||
| } | |||
| }, | |||
| *getOpenFairDetailModal({ payload }: any, { put }: any): any { | |||
| try { | |||
| yield put({ | |||
| type: 'setOpenFairDetailModal', | |||
| payload: payload | |||
| }) | |||
| } catch (error) { | |||
| console.log(error) | |||
| } | |||
| }, | |||
| *getEditRegister({ payload }: any, { put }: any): any { | |||
| try { | |||
| yield put({ | |||
| @@ -0,0 +1,38 @@ | |||
| import { useState, useEffect} from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainAdvertisementListTable from '@/components/Render/Main/Advertisement/List/table' | |||
| import PagesMainAdvertisementListCreate from '@/components/Render/Main/Advertisement/List/create' | |||
| const AdvertisementListPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<number>(0); | |||
| const getId = (value: number) => { | |||
| setId(value) | |||
| } | |||
| useEffect(() => { | |||
| if(!openModel.openModal) { | |||
| setId(0) | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <PagesMainAdvertisementListTable getId={getId}></PagesMainAdvertisementListTable> | |||
| <PagesMainAdvertisementListCreate id={id}></PagesMainAdvertisementListCreate> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(AdvertisementListPage); | |||
| @@ -0,0 +1,38 @@ | |||
| import { useState, useEffect} from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainAdvertisementPutinTable from '@/components/Render/Main/Advertisement/Putin/table' | |||
| import PagesMainAdvertisementPutinCreate from '@/components/Render/Main/Advertisement/Putin/create' | |||
| const AdvertisementListPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<number>(0); | |||
| const getId = (value: number) => { | |||
| setId(value) | |||
| } | |||
| useEffect(() => { | |||
| if(!openModel.openModal) { | |||
| setId(0) | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <PagesMainAdvertisementPutinTable getId={getId}></PagesMainAdvertisementPutinTable> | |||
| <PagesMainAdvertisementPutinCreate id={id}></PagesMainAdvertisementPutinCreate> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(AdvertisementListPage); | |||
| @@ -0,0 +1,38 @@ | |||
| import { useState, useEffect} from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainCompanyDepartmentTable from '@/components/Render/Main/Company/Department/table' | |||
| import PagesMainCompanyDepartmentCreate from '@/components/Render/Main/Company/Department/create' | |||
| const CompanyDepartmentPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<number>(0); | |||
| const getId = (value: number) => { | |||
| setId(value) | |||
| } | |||
| useEffect(() => { | |||
| if(!openModel.openModal) { | |||
| setId(0) | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <PagesMainCompanyDepartmentTable getId={getId}></PagesMainCompanyDepartmentTable> | |||
| <PagesMainCompanyDepartmentCreate id={id}></PagesMainCompanyDepartmentCreate> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(CompanyDepartmentPage); | |||
| @@ -0,0 +1,38 @@ | |||
| import { useState, useEffect} from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainCompanyListTable from '@/components/Render/Main/Company/List/table' | |||
| import PagesMainCompanyListCreate from '@/components/Render/Main/Company/List/create' | |||
| const CompanyListPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<number>(0); | |||
| const getId = (value: number) => { | |||
| setId(value) | |||
| } | |||
| useEffect(() => { | |||
| if(!openModel.openModal) { | |||
| setId(0) | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <PagesMainCompanyListTable getId={getId}></PagesMainCompanyListTable> | |||
| <PagesMainCompanyListCreate id={id}></PagesMainCompanyListCreate> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(CompanyListPage); | |||
| @@ -0,0 +1,38 @@ | |||
| import { useState, useEffect} from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainCompanyPostTable from '@/components/Render/Main/Company/Post/table' | |||
| import PagesMainCompanyPostCreate from '@/components/Render/Main/Company/Post/create' | |||
| const CompanyPostPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<number>(0); | |||
| const getId = (value: number) => { | |||
| setId(value) | |||
| } | |||
| useEffect(() => { | |||
| if(!openModel.openModal) { | |||
| setId(0) | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <PagesMainCompanyPostTable getId={getId}></PagesMainCompanyPostTable> | |||
| <PagesMainCompanyPostCreate id={id}></PagesMainCompanyPostCreate> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(CompanyPostPage); | |||
| @@ -0,0 +1,42 @@ | |||
| import { useState, useEffect} from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainCompanyVipTable from '@/components/Render/Main/Company/Vip/table' | |||
| import PagesMainCompanyVipCreate from '@/components/Render/Main/Company/Vip/create' | |||
| import PagesMainCompanyVipFee from '@/components/Render/Main/Company/Vip/fee' | |||
| const CompanyVipPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<number>(0); | |||
| const getId = (value: number) => { | |||
| setId(value) | |||
| } | |||
| useEffect(() => { | |||
| if(!openModel.openModal) { | |||
| setId(0) | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <PagesMainCompanyVipTable getId={getId}></PagesMainCompanyVipTable> | |||
| <PagesMainCompanyVipCreate id={id}></PagesMainCompanyVipCreate> | |||
| <PagesMainCompanyVipFee id={id}></PagesMainCompanyVipFee> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(CompanyVipPage); | |||
| @@ -0,0 +1,38 @@ | |||
| import { useState, useEffect} from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainFairCompanyTable from '@/components/Render/Main/Fair/Company/table' | |||
| import PagesMainFairCompanyCreate from '@/components/Render/Main/Fair/Company/create' | |||
| const FairCompanyPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<number>(0); | |||
| const getId = (value: number) => { | |||
| setId(value) | |||
| } | |||
| useEffect(() => { | |||
| if(!openModel.openModal) { | |||
| setId(0) | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <PagesMainFairCompanyTable getId={getId}></PagesMainFairCompanyTable> | |||
| <PagesMainFairCompanyCreate id={id}></PagesMainFairCompanyCreate> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(FairCompanyPage); | |||
| @@ -0,0 +1,41 @@ | |||
| import { useState, useEffect} from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainFairListTable from '@/components/Render/Main/Fair/List/table' | |||
| import PagesMainFairListCreate from '@/components/Render/Main/Fair/List/create' | |||
| import PagesMainFairListDetail from '@/components/Render/Main/Fair/List/detail' | |||
| const FairListPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<number>(0); | |||
| const getId = (value: number) => { | |||
| setId(value) | |||
| } | |||
| useEffect(() => { | |||
| if(!openModel.openModal) { | |||
| setId(0) | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <PagesMainFairListTable getId={getId}></PagesMainFairListTable> | |||
| <PagesMainFairListCreate id={id}></PagesMainFairListCreate> | |||
| <PagesMainFairListDetail id={id}></PagesMainFairListDetail> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(FairListPage); | |||
| @@ -0,0 +1,38 @@ | |||
| import { useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainFeedbackTable from '@/components/Render/Main/Feedback/table' | |||
| import PagesMainFeedbackCreate from '@/components/Render/Main/Feedback/create' | |||
| const FeedbackPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<number>(0); | |||
| const getId = (value: number) => { | |||
| setId(value) | |||
| } | |||
| useEffect(() => { | |||
| if (!openModel.openModal) { | |||
| setId(0) | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <PagesMainFeedbackTable getId={getId}></PagesMainFeedbackTable> | |||
| <PagesMainFeedbackCreate id={id}></PagesMainFeedbackCreate> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(FeedbackPage); | |||
| @@ -0,0 +1,38 @@ | |||
| import { useState, useEffect} from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainInformationArticleTable from '@/components/Render/Main/Information/Article/table' | |||
| import PagesMainInformationArticleCreate from '@/components/Render/Main/Information/Article/create' | |||
| const InformationArticlePage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<number>(0); | |||
| const getId = (value: number) => { | |||
| setId(value) | |||
| } | |||
| useEffect(() => { | |||
| if(!openModel.openModal) { | |||
| setId(0) | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <PagesMainInformationArticleTable getId={getId}></PagesMainInformationArticleTable> | |||
| <PagesMainInformationArticleCreate id={id}></PagesMainInformationArticleCreate> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(InformationArticlePage); | |||
| @@ -0,0 +1,38 @@ | |||
| import { useState, useEffect} from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainInformationSectionTable from '@/components/Render/Main/Information/Section/table' | |||
| import PagesMainInformationSectionCreate from '@/components/Render/Main/Information/Section/create' | |||
| const InformationSectionPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<number>(0); | |||
| const getId = (value: number) => { | |||
| setId(value) | |||
| } | |||
| useEffect(() => { | |||
| if(!openModel.openModal) { | |||
| setId(0) | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <PagesMainInformationSectionTable getId={getId}></PagesMainInformationSectionTable> | |||
| <PagesMainInformationSectionCreate id={id}></PagesMainInformationSectionCreate> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(InformationSectionPage); | |||
| @@ -0,0 +1,40 @@ | |||
| import { useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainJobseekerAccountTable from '@/components/Render/Main/Jobseeker/Account/table' | |||
| import PagesMainJobseekerAccountCreate from '@/components/Render/Main/Jobseeker/Account/create' | |||
| const JobseekerAccountPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<object>(null); | |||
| const getId = (value: number) => { | |||
| setId(value) | |||
| } | |||
| useEffect(() => { | |||
| if (!openModel.openModal) { | |||
| setId(0) | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <PagesMainJobseekerAccountTable getId={getId}></PagesMainJobseekerAccountTable> | |||
| <PagesMainJobseekerAccountCreate id={id}></PagesMainJobseekerAccountCreate> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(JobseekerAccountPage); | |||
| @@ -0,0 +1,47 @@ | |||
| import { useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainJobseekerListTable from '@/components/Render/Main/Jobseeker/List/table' | |||
| import PagesMainJobseekerListCreate from '@/components/Render/Main/Jobseeker/List/create' | |||
| import PagesMainJobseekerListRegister from '@/components/Render/Main/Jobseeker/List/register' | |||
| import PagesMainJobseekerListExport from '@/components/Render/Main/Jobseeker/List/export' | |||
| import PagesMainJobseekerListDetail from '@/components/Render/Main/Jobseeker/List/detail' | |||
| import PagesMainJobseekerListHelp from '@/components/Render/Main/Jobseeker/List/help' | |||
| const JobseekerListPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<object>(null); | |||
| const getId = (value: number) => { | |||
| setId(value) | |||
| } | |||
| useEffect(() => { | |||
| if (!openModel.openModal) { | |||
| setId(0) | |||
| } | |||
| }, [openModel.openModal]) | |||
| return ( | |||
| <> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <PagesMainJobseekerListTable getId={getId}></PagesMainJobseekerListTable> | |||
| <PagesMainJobseekerListCreate id={id}></PagesMainJobseekerListCreate> | |||
| <PagesMainJobseekerListRegister id={id}></PagesMainJobseekerListRegister> | |||
| <PagesMainJobseekerListExport id={id}></PagesMainJobseekerListExport> | |||
| <PagesMainJobseekerListDetail id={id}></PagesMainJobseekerListDetail> | |||
| <PagesMainJobseekerListHelp id={id}></PagesMainJobseekerListHelp> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(JobseekerListPage); | |||
| @@ -1,10 +1,11 @@ | |||
| import { useState, useEffect, useRef } from 'react'; | |||
| import { history } from '@umijs/max'; | |||
| import { history, useModel } from '@umijs/max'; | |||
| import type { CaptFieldRef } from '@ant-design/pro-components'; | |||
| import { LockOutlined, UserOutlined, FileImageOutlined, } from '@ant-design/icons'; | |||
| import { LoginForm, ProFormCaptcha, ProForm, ProFormText, ProFormDependency, } from '@ant-design/pro-components'; | |||
| import { message, Row, Col, Image, ConfigProvider } from 'antd'; | |||
| import { message, Row, Col, Image, ConfigProvider } from 'antd'; | |||
| import type { CSSProperties } from 'react'; | |||
| import { Login, PostSmsSend, GetCaptcha } from '@/apis/api'; | |||
| import { Login, PostSmsSend, GetCaptcha, GetUserMenulist } from '@/apis/api'; | |||
| const contentStyle: CSSProperties = { | |||
| display: 'flex', | |||
| alignItems: 'center', | |||
| @@ -12,12 +13,30 @@ const contentStyle: CSSProperties = { | |||
| paddingTop: '200px' | |||
| }; | |||
| function flattenPermissions(permissions: { id: number; action: string; childs?: { id: number; action: string }[] }[]): string[] { | |||
| const flattenedPermissions: string[] = []; | |||
| permissions.forEach(permission => { | |||
| flattenedPermissions.push(permission.action); | |||
| if (permission.childs) { | |||
| flattenedPermissions.push(...flattenPermissions(permission.childs)); | |||
| } | |||
| }); | |||
| return flattenedPermissions; | |||
| } | |||
| export default () => { | |||
| const { initialState, setInitialState } = useModel('@@initialState'); | |||
| const formRef = useRef(); | |||
| const captRef = useRef(); | |||
| const captchaRef = useRef<CaptFieldRef | null | undefined>(); | |||
| const [codeImage, setCodeImage] = useState<string>(''); | |||
| const [capt_id, setCaptId] = useState<string>(''); | |||
| useEffect(() => { | |||
| GetCaptcha().then(res => { | |||
| setCodeImage(res.data.img); | |||
| @@ -42,13 +61,20 @@ export default () => { | |||
| title="菊城人才后台管理系统" | |||
| subTitle="欢迎登录" | |||
| onFinish={async (values) => { | |||
| // 重新获取权限信息 | |||
| try { | |||
| values.sms_code = Number(values.sms_code) | |||
| debugger | |||
| let res = await Login(values) | |||
| message.success('登录成功!'); | |||
| // sessionStorage.setItem('token', '1212') | |||
| sessionStorage.setItem('token', res.data.jwttoken.accesstoken) | |||
| let permissions = []; | |||
| const res1 = await GetUserMenulist(); | |||
| permissions = flattenPermissions(res1.data.menulist); | |||
| // 重新获取权限信息 | |||
| setInitialState((s) => ({ | |||
| ...s, | |||
| permissions: permissions, | |||
| })); | |||
| history.push('/'); | |||
| } catch (error) { | |||
| captRef.current.resetFields(); | |||
| @@ -114,6 +140,7 @@ export default () => { | |||
| </Col> | |||
| <Col span={10}> | |||
| <Image src={codeImage} width='100%' height={40} preview={false} style={{ borderRadius: '8px' }} onClick={async () => { | |||
| let res = await GetCaptcha() | |||
| setCodeImage(res.data.img); | |||
| setCaptId(res.data.capt_id); | |||
| @@ -125,6 +152,7 @@ export default () => { | |||
| {({ mobile }) => { | |||
| return ( | |||
| <ProFormCaptcha | |||
| fieldRef={captchaRef} | |||
| fieldProps={{ | |||
| size: 'large', | |||
| prefix: <LockOutlined className={'prefixIcon'} /> | |||
| @@ -145,7 +173,7 @@ export default () => { | |||
| { | |||
| required: true, | |||
| message: '请输入验证码!', | |||
| }, | |||
| } | |||
| ]} | |||
| onGetCaptcha={async (value) => { | |||
| try { | |||
| @@ -156,6 +184,7 @@ export default () => { | |||
| let res = await GetCaptcha() | |||
| setCodeImage(res.data.img); | |||
| setCaptId(res.data.capt_id); | |||
| throw new Error() | |||
| } | |||
| }} | |||
| @@ -3,6 +3,8 @@ import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainCompanyListTable from '@/components/Render/Main/Company/List/table' | |||
| import PagesMainCompanyListCreate from '@/components/Render/Main/Company/List/create' | |||
| import PagesMainCompanyListBind from '@/components/Render/Main/Company/List/bind' | |||
| const CompanyListPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<number>(0); | |||
| @@ -28,6 +30,7 @@ const CompanyListPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| > | |||
| <PagesMainCompanyListTable getId={getId}></PagesMainCompanyListTable> | |||
| <PagesMainCompanyListCreate id={id}></PagesMainCompanyListCreate> | |||
| <PagesMainCompanyListBind id={id}></PagesMainCompanyListBind> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| @@ -3,6 +3,8 @@ import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainCompanyVipTable from '@/components/Render/Main/Company/Vip/table' | |||
| import PagesMainCompanyVipCreate from '@/components/Render/Main/Company/Vip/create' | |||
| import PagesMainCompanyVipFee from '@/components/Render/Main/Company/Vip/fee' | |||
| const CompanyVipPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<number>(0); | |||
| @@ -27,6 +29,8 @@ const CompanyVipPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| > | |||
| <PagesMainCompanyVipTable getId={getId}></PagesMainCompanyVipTable> | |||
| <PagesMainCompanyVipCreate id={id}></PagesMainCompanyVipCreate> | |||
| <PagesMainCompanyVipFee id={id}></PagesMainCompanyVipFee> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| @@ -3,6 +3,8 @@ import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainFairListTable from '@/components/Render/Main/Fair/List/table' | |||
| import PagesMainFairListCreate from '@/components/Render/Main/Fair/List/create' | |||
| import PagesMainFairListDetail from '@/components/Render/Main/Fair/List/detail' | |||
| const FairListPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<number>(0); | |||
| @@ -27,6 +29,7 @@ const FairListPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| > | |||
| <PagesMainFairListTable getId={getId}></PagesMainFairListTable> | |||
| <PagesMainFairListCreate id={id}></PagesMainFairListCreate> | |||
| <PagesMainFairListDetail id={id}></PagesMainFairListDetail> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| @@ -1,133 +1,40 @@ | |||
| import { EllipsisOutlined, PlusOutlined } from '@ant-design/icons'; | |||
| import type { ActionType, ProColumns } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable, TableDropdown, PageContainer, ModalForm, ProForm, | |||
| ProFormDateRangePicker, | |||
| ProFormSelect, | |||
| ProFormText, | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, Dropdown, Space, Tag, Form } from 'antd'; | |||
| import { useRef, useState } from 'react'; | |||
| export const waitTimePromise = async (time: number = 100) => { | |||
| return new Promise((resolve) => { | |||
| setTimeout(() => { | |||
| resolve(true); | |||
| }, time); | |||
| }); | |||
| }; | |||
| import { useState, useEffect } from 'react'; | |||
| import { connect } from '@umijs/max'; | |||
| import { ConfigProvider } from 'antd'; | |||
| import PagesMainJobseekerAccountTable from '@/components/Render/Main/Jobseeker/Account/table' | |||
| import PagesMainJobseekerAccountCreate from '@/components/Render/Main/Jobseeker/Account/create' | |||
| export const waitTime = async (time: number = 100) => { | |||
| await waitTimePromise(time); | |||
| }; | |||
| const columns: ProColumns[] = [ | |||
| { | |||
| title: 'ID', | |||
| dataIndex: 'id', | |||
| }, | |||
| { | |||
| title: '企业名称', | |||
| dataIndex: 'name', | |||
| }, | |||
| { | |||
| title: '来源', | |||
| dataIndex: 'state', | |||
| }, | |||
| { | |||
| title: '登录次数', | |||
| dataIndex: 'app_id', | |||
| }, | |||
| { | |||
| title: 'ApiKey', | |||
| dataIndex: 'api_key', | |||
| }, | |||
| { | |||
| title: 'SecretKey', | |||
| dataIndex: 'secret_key', | |||
| }, | |||
| { | |||
| title: '操作', | |||
| valueType: 'option', | |||
| key: 'option', | |||
| render: (text, record, _, action) => [ | |||
| <a | |||
| key="editable" | |||
| onClick={() => { | |||
| action?.startEditable?.(record.id); | |||
| }} | |||
| > | |||
| 编辑 | |||
| </a>, | |||
| ], | |||
| }, | |||
| ]; | |||
| const JobseekerAccountPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<object>(null); | |||
| const getId = (value: number) => { | |||
| setId(value) | |||
| } | |||
| useEffect(() => { | |||
| if (!openModel.openModal) { | |||
| setId(0) | |||
| } | |||
| }, [openModel.openModal]) | |||
| export default () => { | |||
| const [form] = Form.useForm<ProjectType.form>(); | |||
| const [data, setData] = useState([{id: 1}]) | |||
| return ( | |||
| <> | |||
| <PageContainer> | |||
| <ProTable | |||
| dataSource={data} | |||
| columns={columns} | |||
| pagination={{ | |||
| pageSize: 5, | |||
| onChange: (page) => console.log(page), | |||
| }} | |||
| toolBarRender={() => [ | |||
| <ModalForm<ProjectType.form> | |||
| title="新增项目" | |||
| trigger={ | |||
| <Button type="primary"> | |||
| <PlusOutlined /> | |||
| 新建表单 | |||
| </Button> | |||
| } | |||
| submitter={{ | |||
| render: (props, defaultDoms) => { | |||
| return [ | |||
| <Button | |||
| key="extra-reset" | |||
| onClick={() => { | |||
| props.reset(); | |||
| }} | |||
| > | |||
| 重置 | |||
| </Button>, | |||
| ...defaultDoms, | |||
| ]; | |||
| }, | |||
| }} | |||
| form={form} | |||
| autoFocusFirstInput | |||
| modalProps={{ | |||
| destroyOnClose: true, | |||
| onCancel: () => console.log('run'), | |||
| }} | |||
| submitTimeout={2000} | |||
| onFinish={async (values) => { | |||
| await waitTime(2000); | |||
| console.log(values.name); | |||
| return true; | |||
| }} | |||
| > | |||
| <ProFormText | |||
| name="name" | |||
| label="项目名" | |||
| placeholder="请输入项目名" | |||
| /> | |||
| <ProFormSelect | |||
| name="aip_id" | |||
| label="选择百度接口" | |||
| placeholder="请选择百度接口" | |||
| /> | |||
| </ModalForm> | |||
| ]} | |||
| /> | |||
| </PageContainer> | |||
| <ConfigProvider | |||
| theme={{ | |||
| token: { | |||
| colorPrimary: '#4FBE70', | |||
| } | |||
| }} | |||
| > | |||
| <PagesMainJobseekerAccountTable getId={getId}></PagesMainJobseekerAccountTable> | |||
| <PagesMainJobseekerAccountCreate id={id}></PagesMainJobseekerAccountCreate> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| }; | |||
| }; | |||
| export default connect(({ openModel }: any) => ({ | |||
| openModel | |||
| }))(JobseekerAccountPage); | |||
| @@ -5,7 +5,8 @@ import PagesMainJobseekerListTable from '@/components/Render/Main/Jobseeker/List | |||
| import PagesMainJobseekerListCreate from '@/components/Render/Main/Jobseeker/List/create' | |||
| import PagesMainJobseekerListRegister from '@/components/Render/Main/Jobseeker/List/register' | |||
| import PagesMainJobseekerListExport from '@/components/Render/Main/Jobseeker/List/export' | |||
| import PagesMainJobseekerListDetail from '@/components/Render/Main/Jobseeker/List/detail' | |||
| import PagesMainJobseekerListHelp from '@/components/Render/Main/Jobseeker/List/help' | |||
| const JobseekerListPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| const [id, setId] = useState<object>(null); | |||
| @@ -32,7 +33,9 @@ const JobseekerListPage: React.FC = ({ dispatch, openModel }: any) => { | |||
| <PagesMainJobseekerListCreate id={id}></PagesMainJobseekerListCreate> | |||
| <PagesMainJobseekerListRegister id={id}></PagesMainJobseekerListRegister> | |||
| <PagesMainJobseekerListExport id={id}></PagesMainJobseekerListExport> | |||
| <PagesMainJobseekerListDetail id={id}></PagesMainJobseekerListDetail> | |||
| <PagesMainJobseekerListHelp id={id}></PagesMainJobseekerListHelp> | |||
| </ConfigProvider> | |||
| </> | |||
| ); | |||
| @@ -1,5 +1,26 @@ | |||
| import { message } from "antd"; | |||
| export const verifySex = (idCard: string) => { | |||
| // 检查身份证号码长度 | |||
| if (idCard.length === 18) { | |||
| // 18位身份证号码 | |||
| const lastChar = idCard.charAt(17); | |||
| let genderCode; | |||
| if (lastChar === 'X' || lastChar == "x") { | |||
| genderCode = 10; // 将 'X' 转换为数字 10 | |||
| } else { | |||
| genderCode = parseInt(lastChar, 10); | |||
| } | |||
| return genderCode % 2 === 0 ? '女' : '男'; | |||
| } else if (idCard.length === 15) { | |||
| // 15位身份证号码 | |||
| const genderCode = parseInt(idCard.substring(13, 15), 10); | |||
| return genderCode % 2 === 0 ? '女' : '男'; | |||
| } else { | |||
| return '请输入有效的身份证号码'; | |||
| } | |||
| } | |||
| export const verifyIdCard = (idCard: string) => { | |||
| let regIdCard = | |||
| /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/; | |||