| import access from "@/access"; | |||||
| export default [ | export default [ | ||||
| { path: '/login', component: './Login', layout: false, access: 'login' }, | { path: '/login', component: './Login', layout: false, access: 'login' }, | ||||
| layout: false | layout: false | ||||
| }, | }, | ||||
| { | { | ||||
| name: '首页', | |||||
| name: '数据总览', | |||||
| path: '/home', | path: '/home', | ||||
| component: './Home', | component: './Home', | ||||
| access: 'home', | access: 'home', | ||||
| { | { | ||||
| name: '系统管理', | name: '系统管理', | ||||
| path: '/setting', | path: '/setting', | ||||
| access: 'setting', | |||||
| routes: [ | routes: [ | ||||
| { | { | ||||
| name: '系统设置', | name: '系统设置', | ||||
| component: './Feedback', | component: './Feedback', | ||||
| access: 'feedback', | access: 'feedback', | ||||
| }, | }, | ||||
| { | |||||
| name: '公共户口管理', | |||||
| path: '/publichouse/list', | |||||
| component: './Publichouse', | |||||
| access: 'publichouse', | |||||
| }, | |||||
| // { | // { | ||||
| // name: '统计管理', | // name: '统计管理', | ||||
| // path: '/setting', | // path: '/setting', |
| "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[628],{21687:function(je,D,C){C.d(D,{Z:function(){return Se}});var r=C(62435),G=C(93967),m=C.n(G),v=C(53124),P=C(98423),j=e=>{const{prefixCls:t,className:s,style:n,size:a,shape:i}=e,c=m()({[`${t}-lg`]:a==="large",[`${t}-sm`]:a==="small"}),l=m()({[`${t}-circle`]:i==="circle",[`${t}-square`]:i==="square",[`${t}-round`]:i==="round"}),o=r.useMemo(()=>typeof a=="number"?{width:a,height:a,lineHeight:`${a}px`}:{},[a]);return r.createElement("span",{className:m()(t,c,l,s),style:Object.assign(Object.assign({},o),n)})},T=C(54548),Z=C(92030),W=C(45503);const X=new T.E4("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),x=e=>({height:e,lineHeight:(0,T.bf)(e)}),f=e=>Object.assign({width:e},x(e)),J=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:X,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),I=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},x(e)),K=e=>{const{skeletonAvatarCls:t,gradientFromColor:s,controlHeight:n,controlHeightLG:a,controlHeightSM:i}=e;return{[`${t}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:s},f(n)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},f(a)),[`${t}${t}-sm`]:Object.assign({},f(i))}},Q=e=>{const{controlHeight:t,borderRadiusSM:s,skeletonInputCls:n,controlHeightLG:a,controlHeightSM:i,gradientFromColor:c,calc:l}=e;return{[`${n}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:c,borderRadius:s},I(t,l)),[`${n}-lg`]:Object.assign({},I(a,l)),[`${n}-sm`]:Object.assign({},I(i,l))}},L=e=>Object.assign({width:e},x(e)),U=e=>{const{skeletonImageCls:t,imageSizeBase:s,gradientFromColor:n,borderRadiusSM:a,calc:i}=e;return{[`${t}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:n,borderRadius:a},L(i(s).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},L(s)),{maxWidth:i(s).mul(4).equal(),maxHeight:i(s).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},z=(e,t,s)=>{const{skeletonButtonCls:n}=e;return{[`${s}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${s}${n}-round`]:{borderRadius:t}}},B=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},x(e)),Y=e=>{const{borderRadiusSM:t,skeletonButtonCls:s,controlHeight:n,controlHeightLG:a,controlHeightSM:i,gradientFromColor:c,calc:l}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${s}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:c,borderRadius:t,width:l(n).mul(2).equal(),minWidth:l(n).mul(2).equal()},B(n,l))},z(e,n,s)),{[`${s}-lg`]:Object.assign({},B(a,l))}),z(e,a,`${s}-lg`)),{[`${s}-sm`]:Object.assign({},B(i,l))}),z(e,i,`${s}-sm`))},_=e=>{const{componentCls:t,skeletonAvatarCls:s,skeletonTitleCls:n,skeletonParagraphCls:a,skeletonButtonCls:i,skeletonInputCls:c,skeletonImageCls:l,controlHeight:o,controlHeightLG:d,controlHeightSM:u,gradientFromColor:g,padding:$,marginSM:p,borderRadius:b,titleHeight:h,blockRadius:E,paragraphLiHeight:A,controlHeightXS:R,paragraphMarginTop:O}=e;return{[`${t}`]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:$,verticalAlign:"top",[`${s}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:g},f(o)),[`${s}-circle`]:{borderRadius:"50%"},[`${s}-lg`]:Object.assign({},f(d)),[`${s}-sm`]:Object.assign({},f(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${n}`]:{width:"100%",height:h,background:g,borderRadius:E,[`+ ${a}`]:{marginBlockStart:u}},[`${a}`]:{padding:0,"> li":{width:"100%",height:A,listStyle:"none",background:g,borderRadius:E,"+ li":{marginBlockStart:R}}},[`${a}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${n}, ${a} > li`]:{borderRadius:b}}},[`${t}-with-avatar ${t}-content`]:{[`${n}`]:{marginBlockStart:p,[`+ ${a}`]:{marginBlockStart:O}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Y(e)),K(e)),Q(e)),U(e)),[`${t}${t}-block`]:{width:"100%",[`${i}`]:{width:"100%"},[`${c}`]:{width:"100%"}},[`${t}${t}-active`]:{[` | |||||
| "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[687],{21687:function(je,D,C){C.d(D,{Z:function(){return Se}});var r=C(62435),G=C(93967),m=C.n(G),v=C(53124),P=C(98423),j=e=>{const{prefixCls:t,className:s,style:n,size:a,shape:i}=e,c=m()({[`${t}-lg`]:a==="large",[`${t}-sm`]:a==="small"}),l=m()({[`${t}-circle`]:i==="circle",[`${t}-square`]:i==="square",[`${t}-round`]:i==="round"}),o=r.useMemo(()=>typeof a=="number"?{width:a,height:a,lineHeight:`${a}px`}:{},[a]);return r.createElement("span",{className:m()(t,c,l,s),style:Object.assign(Object.assign({},o),n)})},T=C(54548),Z=C(92030),W=C(45503);const X=new T.E4("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),x=e=>({height:e,lineHeight:(0,T.bf)(e)}),f=e=>Object.assign({width:e},x(e)),J=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:X,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),I=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},x(e)),K=e=>{const{skeletonAvatarCls:t,gradientFromColor:s,controlHeight:n,controlHeightLG:a,controlHeightSM:i}=e;return{[`${t}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:s},f(n)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},f(a)),[`${t}${t}-sm`]:Object.assign({},f(i))}},Q=e=>{const{controlHeight:t,borderRadiusSM:s,skeletonInputCls:n,controlHeightLG:a,controlHeightSM:i,gradientFromColor:c,calc:l}=e;return{[`${n}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:c,borderRadius:s},I(t,l)),[`${n}-lg`]:Object.assign({},I(a,l)),[`${n}-sm`]:Object.assign({},I(i,l))}},L=e=>Object.assign({width:e},x(e)),U=e=>{const{skeletonImageCls:t,imageSizeBase:s,gradientFromColor:n,borderRadiusSM:a,calc:i}=e;return{[`${t}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:n,borderRadius:a},L(i(s).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},L(s)),{maxWidth:i(s).mul(4).equal(),maxHeight:i(s).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},z=(e,t,s)=>{const{skeletonButtonCls:n}=e;return{[`${s}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${s}${n}-round`]:{borderRadius:t}}},B=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},x(e)),Y=e=>{const{borderRadiusSM:t,skeletonButtonCls:s,controlHeight:n,controlHeightLG:a,controlHeightSM:i,gradientFromColor:c,calc:l}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${s}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:c,borderRadius:t,width:l(n).mul(2).equal(),minWidth:l(n).mul(2).equal()},B(n,l))},z(e,n,s)),{[`${s}-lg`]:Object.assign({},B(a,l))}),z(e,a,`${s}-lg`)),{[`${s}-sm`]:Object.assign({},B(i,l))}),z(e,i,`${s}-sm`))},_=e=>{const{componentCls:t,skeletonAvatarCls:s,skeletonTitleCls:n,skeletonParagraphCls:a,skeletonButtonCls:i,skeletonInputCls:c,skeletonImageCls:l,controlHeight:o,controlHeightLG:d,controlHeightSM:u,gradientFromColor:g,padding:$,marginSM:p,borderRadius:b,titleHeight:h,blockRadius:E,paragraphLiHeight:A,controlHeightXS:R,paragraphMarginTop:O}=e;return{[`${t}`]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:$,verticalAlign:"top",[`${s}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:g},f(o)),[`${s}-circle`]:{borderRadius:"50%"},[`${s}-lg`]:Object.assign({},f(d)),[`${s}-sm`]:Object.assign({},f(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${n}`]:{width:"100%",height:h,background:g,borderRadius:E,[`+ ${a}`]:{marginBlockStart:u}},[`${a}`]:{padding:0,"> li":{width:"100%",height:A,listStyle:"none",background:g,borderRadius:E,"+ li":{marginBlockStart:R}}},[`${a}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${n}, ${a} > li`]:{borderRadius:b}}},[`${t}-with-avatar ${t}-content`]:{[`${n}`]:{marginBlockStart:p,[`+ ${a}`]:{marginBlockStart:O}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Y(e)),K(e)),Q(e)),U(e)),[`${t}${t}-block`]:{width:"100%",[`${i}`]:{width:"100%"},[`${c}`]:{width:"100%"}},[`${t}${t}-active`]:{[` | |||||
| ${n}, | ${n}, | ||||
| ${a} > li, | ${a} > li, | ||||
| ${s}, | ${s}, |
| </head> | </head> | ||||
| <body> | <body> | ||||
| <div id="root"></div> | <div id="root"></div> | ||||
| <script src="/umi.f9f85c2a.js"></script> | |||||
| <script src="/umi.8cdc18ca.js"></script> | |||||
| </body> | </body> | ||||
| </html> | </html> |
| "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[371],{86587:function(t,u,e){e.r(u);var n=e(86074),a=function(){return(0,n.jsx)(n.Fragment,{children:"\u9875\u9762\u5F00\u53D1\u4E2D\u3002\u3002\u3002"})};u.default=a}}]); |
| "antd": "^5.4.0", | "antd": "^5.4.0", | ||||
| "dayjs": "^1.11.12", | "dayjs": "^1.11.12", | ||||
| "docx": "^8.5.0", | "docx": "^8.5.0", | ||||
| "echarts": "^5.6.0", | |||||
| "file-saver": "^2.0.5", | "file-saver": "^2.0.5", | ||||
| "he": "^1.2.0", | "he": "^1.2.0", | ||||
| "html-docx-js": "^0.3.1", | "html-docx-js": "^0.3.1", | ||||
| "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", | "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", | ||||
| "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" | "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" | ||||
| }, | }, | ||||
| "node_modules/echarts": { | |||||
| "version": "5.6.0", | |||||
| "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.6.0.tgz", | |||||
| "integrity": "sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==", | |||||
| "dependencies": { | |||||
| "tslib": "2.3.0", | |||||
| "zrender": "5.6.1" | |||||
| } | |||||
| }, | |||||
| "node_modules/echarts/node_modules/tslib": { | |||||
| "version": "2.3.0", | |||||
| "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", | |||||
| "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" | |||||
| }, | |||||
| "node_modules/ee-first": { | "node_modules/ee-first": { | ||||
| "version": "1.1.1", | "version": "1.1.1", | ||||
| "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", | ||||
| "peerDependencies": { | "peerDependencies": { | ||||
| "zod": "^3.18.0" | "zod": "^3.18.0" | ||||
| } | } | ||||
| }, | |||||
| "node_modules/zrender": { | |||||
| "version": "5.6.1", | |||||
| "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.6.1.tgz", | |||||
| "integrity": "sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==", | |||||
| "dependencies": { | |||||
| "tslib": "2.3.0" | |||||
| } | |||||
| }, | |||||
| "node_modules/zrender/node_modules/tslib": { | |||||
| "version": "2.3.0", | |||||
| "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", | |||||
| "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" | |||||
| } | } | ||||
| } | } | ||||
| } | } |
| "antd": "^5.4.0", | "antd": "^5.4.0", | ||||
| "dayjs": "^1.11.12", | "dayjs": "^1.11.12", | ||||
| "docx": "^8.5.0", | "docx": "^8.5.0", | ||||
| "echarts": "^5.6.0", | |||||
| "file-saver": "^2.0.5", | "file-saver": "^2.0.5", | ||||
| "he": "^1.2.0", | "he": "^1.2.0", | ||||
| "html-docx-js": "^0.3.1", | "html-docx-js": "^0.3.1", |
| import React from 'react'; | import React from 'react'; | ||||
| export async function getRoutes() { | export async function getRoutes() { | ||||
| const routes = {"1":{"path":"/login","layout":false,"access":"login","id":"1"},"2":{"path":"/","redirect":"/home","parentId":"ant-design-pro-layout","id":"2"},"3":{"path":"/login","layout":false,"id":"3"},"4":{"name":"首页","path":"/home","access":"home","parentId":"ant-design-pro-layout","id":"4"},"5":{"name":"企业管理","access":"company","path":"/company","parentId":"ant-design-pro-layout","id":"5"},"6":{"name":"所有企业","path":"/company/list","access":"member","parentId":"5","id":"6"},"7":{"name":"VIP列表","path":"/company/vip","access":"vip","parentId":"5","id":"7"},"8":{"name":"部门管理","path":"/company/department","access":"department","parentId":"5","id":"8"},"9":{"name":"职位管理","path":"/company/post","access":"job","parentId":"5","id":"9"},"10":{"name":"求职者管理","access":"jobSeeker","path":"/jobseeker","parentId":"ant-design-pro-layout","id":"10"},"11":{"name":"简历列表","path":"/jobseeker/list","access":"jobResume","parentId":"10","id":"11"},"12":{"name":"求职者账号列表","path":"/jobseeker/account","access":"customerList","parentId":"10","id":"12"},"13":{"name":"招聘会管理","access":"jobFair","path":"/fair","parentId":"ant-design-pro-layout","id":"13"},"14":{"name":"招聘会列表","path":"/fair/list","access":"jobFairList","parentId":"13","id":"14"},"15":{"name":"新闻资讯","access":"information","path":"/information","parentId":"ant-design-pro-layout","id":"15"},"16":{"name":"栏目/频道","path":"/information/section","access":"section","parentId":"15","id":"16"},"17":{"name":"文章列表","path":"/information/article","access":"article","parentId":"15","id":"17"},"18":{"name":"广告/活动管理","access":"advertisement","path":"/advertisement","parentId":"ant-design-pro-layout","id":"18"},"19":{"name":"广告/活动列表","path":"/advertisement/list","access":"advertisementList","parentId":"18","id":"19"},"20":{"name":"广告/活动投放","path":"/advertisement/putin","access":"putIn","parentId":"18","id":"20"},"21":{"name":"春节引流活动管理","access":"activity","path":"/activity","parentId":"ant-design-pro-layout","id":"21"},"22":{"name":"活动门店","path":"/activity/list","access":"activityAddress","parentId":"21","id":"22"},"23":{"name":"账号权限","path":"/permission","access":"permission","parentId":"ant-design-pro-layout","id":"23"},"24":{"name":"权限管理","path":"/permission/list","access":"list","parentId":"23","id":"24"},"25":{"name":"角色管理","path":"/permission/role","access":"role","parentId":"23","id":"25"},"26":{"name":"账号管理","path":"/permission/account","access":"account","parentId":"23","id":"26"},"27":{"name":"系统管理","path":"/setting","parentId":"ant-design-pro-layout","id":"27"},"28":{"name":"系统设置","path":"/setting/system","access":"other","parentId":"27","id":"28"},"29":{"name":"字典设置","path":"/setting/dictionary","access":"dictionaryList","parentId":"27","id":"29"},"30":{"name":"分词器","path":"/setting/other","access":"otherTokenizer","parentId":"27","id":"30"},"31":{"name":"反馈管理","path":"/feedback/list","access":"feedback","parentId":"ant-design-pro-layout","id":"31"},"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":"/home","parentId":"ant-design-pro-layout","id":"2"},"3":{"path":"/login","layout":false,"id":"3"},"4":{"name":"数据总览","path":"/home","access":"home","parentId":"ant-design-pro-layout","id":"4"},"5":{"name":"企业管理","access":"company","path":"/company","parentId":"ant-design-pro-layout","id":"5"},"6":{"name":"所有企业","path":"/company/list","access":"member","parentId":"5","id":"6"},"7":{"name":"VIP列表","path":"/company/vip","access":"vip","parentId":"5","id":"7"},"8":{"name":"部门管理","path":"/company/department","access":"department","parentId":"5","id":"8"},"9":{"name":"职位管理","path":"/company/post","access":"job","parentId":"5","id":"9"},"10":{"name":"求职者管理","access":"jobSeeker","path":"/jobseeker","parentId":"ant-design-pro-layout","id":"10"},"11":{"name":"简历列表","path":"/jobseeker/list","access":"jobResume","parentId":"10","id":"11"},"12":{"name":"求职者账号列表","path":"/jobseeker/account","access":"customerList","parentId":"10","id":"12"},"13":{"name":"招聘会管理","access":"jobFair","path":"/fair","parentId":"ant-design-pro-layout","id":"13"},"14":{"name":"招聘会列表","path":"/fair/list","access":"jobFairList","parentId":"13","id":"14"},"15":{"name":"新闻资讯","access":"information","path":"/information","parentId":"ant-design-pro-layout","id":"15"},"16":{"name":"栏目/频道","path":"/information/section","access":"section","parentId":"15","id":"16"},"17":{"name":"文章列表","path":"/information/article","access":"article","parentId":"15","id":"17"},"18":{"name":"广告/活动管理","access":"advertisement","path":"/advertisement","parentId":"ant-design-pro-layout","id":"18"},"19":{"name":"广告/活动列表","path":"/advertisement/list","access":"advertisementList","parentId":"18","id":"19"},"20":{"name":"广告/活动投放","path":"/advertisement/putin","access":"putIn","parentId":"18","id":"20"},"21":{"name":"春节引流活动管理","access":"activity","path":"/activity","parentId":"ant-design-pro-layout","id":"21"},"22":{"name":"活动门店","path":"/activity/list","access":"activityAddress","parentId":"21","id":"22"},"23":{"name":"账号权限","path":"/permission","access":"permission","parentId":"ant-design-pro-layout","id":"23"},"24":{"name":"权限管理","path":"/permission/list","access":"list","parentId":"23","id":"24"},"25":{"name":"角色管理","path":"/permission/role","access":"role","parentId":"23","id":"25"},"26":{"name":"账号管理","path":"/permission/account","access":"account","parentId":"23","id":"26"},"27":{"name":"系统管理","path":"/setting","access":"setting","parentId":"ant-design-pro-layout","id":"27"},"28":{"name":"系统设置","path":"/setting/system","access":"other","parentId":"27","id":"28"},"29":{"name":"字典设置","path":"/setting/dictionary","access":"dictionaryList","parentId":"27","id":"29"},"30":{"name":"分词器","path":"/setting/other","access":"otherTokenizer","parentId":"27","id":"30"},"31":{"name":"反馈管理","path":"/feedback/list","access":"feedback","parentId":"ant-design-pro-layout","id":"31"},"32":{"name":"公共户口管理","path":"/publichouse/list","access":"publichouse","parentId":"ant-design-pro-layout","id":"32"},"ant-design-pro-layout":{"id":"ant-design-pro-layout","path":"/","isLayout":true}} as const; | |||||
| return { | return { | ||||
| routes, | routes, | ||||
| routeComponents: { | routeComponents: { | ||||
| '29': React.lazy(() => import(/* webpackChunkName: "p__Setting__Dictionary__index" */'@/pages/Setting/Dictionary/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')), | '30': React.lazy(() => import(/* webpackChunkName: "p__Setting__Other__index" */'@/pages/Setting/Other/index.tsx')), | ||||
| '31': React.lazy(() => import(/* webpackChunkName: "p__Feedback__index" */'@/pages/Feedback/index.tsx')), | '31': React.lazy(() => import(/* webpackChunkName: "p__Feedback__index" */'@/pages/Feedback/index.tsx')), | ||||
| '32': React.lazy(() => import(/* webpackChunkName: "p__Publichouse__index" */'@/pages/Publichouse/index.tsx')), | |||||
| 'ant-design-pro-layout': React.lazy(() => import(/* webpackChunkName: "umi__plugin-layout__Layout" */'E:/项目/outpackage/rencaishichanghoutai/src/.umi/plugin-layout/Layout.tsx')), | 'ant-design-pro-layout': React.lazy(() => import(/* webpackChunkName: "umi__plugin-layout__Layout" */'E:/项目/outpackage/rencaishichanghoutai/src/.umi/plugin-layout/Layout.tsx')), | ||||
| }, | }, | ||||
| }; | }; |
| try { | try { | ||||
| const res = await GetUserMenulist(); | const res = await GetUserMenulist(); | ||||
| permissions = flattenPermissions(res.data.menulist); | permissions = flattenPermissions(res.data.menulist); | ||||
| } catch (error) { | } catch (error) { | ||||
| console.error('Failed to fetch user permissions:', error); | console.error('Failed to fetch user permissions:', error); | ||||
| } | } |
| content: '', | content: '', | ||||
| stick_top: 0, | stick_top: 0, | ||||
| hot: 0, | hot: 0, | ||||
| author: '' | |||||
| author: '', | |||||
| random_show: 1, | |||||
| disabled_status: 1 | |||||
| } | } | ||||
| } | } | ||||
| }} | }} |
| target_url: '', | target_url: '', | ||||
| show_order: 0, | show_order: 0, | ||||
| valid_date: null, | valid_date: null, | ||||
| hide_ad: 0, | |||||
| hide_ad: 2, | |||||
| company_id: null, | company_id: null, | ||||
| } | } | ||||
| } | } |
| import { Row, Col, Image, ConfigProvider, Modal, Switch, Form, message, Button } from 'antd'; | import { Row, Col, Image, ConfigProvider, Modal, Switch, Form, message, Button } from 'antd'; | ||||
| import { addCompany, PostCompanyEdit, GetCompanyInfo } from '@/apis/api'; | import { addCompany, PostCompanyEdit, GetCompanyInfo } from '@/apis/api'; | ||||
| import { Imageprefix } from '@/constants'; | import { Imageprefix } from '@/constants'; | ||||
| import { verifyPhone } from '@/utils/VerifyHelper'; | |||||
| import { findAncestors } from '@/utils/dataHelper' | |||||
| import { disAfterData } from '@/utils/format' | import { disAfterData } from '@/utils/format' | ||||
| import MapComponent from '@/components/Common/map'; | import MapComponent from '@/components/Common/map'; | ||||
| import RichComponent from '@/components/Common/rich'; | import RichComponent from '@/components/Common/rich'; | ||||
| if (open && id) { | if (open && id) { | ||||
| GetCompanyInfo({ id: id }).then(res => { | GetCompanyInfo({ id: id }).then(res => { | ||||
| formMapRef?.current?.forEach((formInstanceRef) => { | formMapRef?.current?.forEach((formInstanceRef) => { | ||||
| res.data.nature_arr = [res.data.nature_text] | |||||
| res.data.scale_arr = [res.data.scale_text] | |||||
| res.data.industry_arr = [res.data.industry]; | |||||
| res.data.nature_arr = findAncestors(dictModel.natureList, res.data.nature).concat([res.data.nature]) | |||||
| res.data.scale_arr = findAncestors(dictModel.scaleList, res.data.scale).concat([res.data.scale]) | |||||
| res.data.location_arr = [ | res.data.location_arr = [ | ||||
| res.data.province ? res.data.province : 0, | res.data.province ? res.data.province : 0, | ||||
| res.data.city ? res.data.city : 0, | res.data.city ? res.data.city : 0, | ||||
| formMapRef={formMapRef} | formMapRef={formMapRef} | ||||
| formRef={formRef} | formRef={formRef} | ||||
| onFinish={async (values: CompanyType.Basic) => { | onFinish={async (values: CompanyType.Basic) => { | ||||
| console.log(values) | |||||
| values.industry = values.industry_arr && values.industry_arr.length > 0 && values.industry_arr[0] ? values.industry_arr[0] : 0; | |||||
| values.province = values.location_arr && values.location_arr[0] ? values.location_arr[0] : 0; | values.province = values.location_arr && values.location_arr[0] ? values.location_arr[0] : 0; | ||||
| values.city = values.location_arr && values.location_arr[1] ? values.location_arr[1] : 0; | values.city = values.location_arr && values.location_arr[1] ? values.location_arr[1] : 0; | ||||
| values.district = values.location_arr && values.location_arr[2] ? values.location_arr[2] : 0; | values.district = values.location_arr && values.location_arr[2] ? values.location_arr[2] : 0; | ||||
| values.street = values.location_arr && values.location_arr[3] ? values.location_arr[3] : 0; | values.street = values.location_arr && values.location_arr[3] ? values.location_arr[3] : 0; | ||||
| values.nature = values.nature_arr && values.nature_arr.length > 0 ? values.nature_arr[values.nature_arr.length - 1] : 0; | |||||
| values.scale = values.scale_arr && values.scale_arr.length > 0 ? values.scale_arr[values.scale_arr.length - 1] : 0; | |||||
| delete values.nature_arr; | |||||
| delete values.scale_arr; | |||||
| delete values.location_arr; | delete values.location_arr; | ||||
| delete values.industry_arr; | |||||
| values.photo = uploadedFilephotoName ? uploadedFilephotoName : ''; | values.photo = uploadedFilephotoName ? uploadedFilephotoName : ''; | ||||
| values.license_path = uploadedFilelicenseName ? uploadedFilelicenseName : ''; | values.license_path = uploadedFilelicenseName ? uploadedFilelicenseName : ''; | ||||
| values.company_photos = uploadedFilephotosName ? uploadedFilephotosName : []; | values.company_photos = uploadedFilephotosName ? uploadedFilephotosName : []; | ||||
| console.log(values) | console.log(values) | ||||
| if (detail) { | if (detail) { | ||||
| values.id = detail.id; | values.id = detail.id; | ||||
| values.nature = detail.nature ? detail.nature : 0; | |||||
| values.scale = detail.scale ? detail.scale : 0; | |||||
| values.nature = values.nature_arr && values.nature_arr.length > 0 ? values.nature_arr[values.nature_arr.length - 1] : 0; | |||||
| values.scale = values.scale_arr && values.scale_arr.length > 0 ? values.scale_arr[values.scale_arr.length - 1] : 0; | |||||
| delete values.nature_arr; | delete values.nature_arr; | ||||
| delete values.scale_arr; | delete values.scale_arr; | ||||
| let res = await PostCompanyEdit(values) | let res = await PostCompanyEdit(values) | ||||
| message.success('提交成功') | message.success('提交成功') | ||||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | dispatch({ type: 'openModel/getOpenModal', payload: false }) | ||||
| } else { | } else { | ||||
| values.nature = values.nature_arr && values.nature_arr.length > 0 ? values.nature_arr[values.nature_arr.length - 1] : 0; | |||||
| values.scale = values.scale_arr && 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) | let res = await addCompany(values) | ||||
| message.success('提交成功') | message.success('提交成功') | ||||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | dispatch({ type: 'openModel/getOpenModal', payload: false }) | ||||
| /> | /> | ||||
| </Col> | </Col> | ||||
| <Col span={8}> | <Col span={8}> | ||||
| <ProFormSelect | |||||
| <ProFormCascader | |||||
| label="所属行业" | label="所属行业" | ||||
| name="industry" | |||||
| name="industry_arr" | |||||
| fieldProps={{ | fieldProps={{ | ||||
| fieldNames: selectfieldNames, | |||||
| options: dictModel.industryPostList | |||||
| fieldNames: cascaderfieldNames, | |||||
| options: dictModel.industryPostList, | |||||
| changeOnSelect: true | |||||
| }} | }} | ||||
| rules={[{ required: true, message: '请选择所属行业' }]} | rules={[{ required: true, message: '请选择所属行业' }]} | ||||
| placeholder="请选择所属行业" | placeholder="请选择所属行业" | ||||
| /> | /> | ||||
| </Col> | </Col> | ||||
| <Col span={8}> | <Col span={8}> | ||||
| <ProFormCascader | <ProFormCascader | ||||
| changeOnSelect: true | changeOnSelect: true | ||||
| }} | }} | ||||
| rules={[{ required: true, message: '请选择企业规模' }]} | rules={[{ required: true, message: '请选择企业规模' }]} | ||||
| placeholder="请选择企业规模" | placeholder="请选择企业规模" | ||||
| /> | /> | ||||
| </Col> | </Col> | ||||
| > | > | ||||
| <Row gutter={[16, 16]}> | <Row gutter={[16, 16]}> | ||||
| <Col span={24}> | <Col span={24}> | ||||
| <ProFormText.Password | |||||
| {id ? <ProFormText.Password | |||||
| name="login_pwd" | |||||
| label="登录密码" | |||||
| fieldProps={{ | |||||
| size: 'large', | |||||
| }} | |||||
| placeholder={'请输入登录密码'} | |||||
| /> : <ProFormText.Password | |||||
| name="login_pwd" | name="login_pwd" | ||||
| label="登录密码" | label="登录密码" | ||||
| fieldProps={{ | fieldProps={{ | ||||
| message: '请输入登录密码', | message: '请输入登录密码', | ||||
| }, | }, | ||||
| ]} | ]} | ||||
| /> | |||||
| />} | |||||
| </Col> | </Col> | ||||
| </Row> | </Row> |
| import { | import { | ||||
| ProTable, TableDropdown, PageContainer | ProTable, TableDropdown, PageContainer | ||||
| } from '@ant-design/pro-components'; | } from '@ant-design/pro-components'; | ||||
| import { Button, Image, ConfigProvider, Select, message } from 'antd'; | |||||
| import { Button, Image, ConfigProvider, Select, message, DatePicker } from 'antd'; | |||||
| import { getCompanyList, GetCompanyInfo, updateCompany, PostCompanyExport, getRoleGetpermissionids } from '@/apis/api'; | import { getCompanyList, GetCompanyInfo, updateCompany, PostCompanyExport, getRoleGetpermissionids } from '@/apis/api'; | ||||
| import { Imageprefix } from '@/constants'; | import { Imageprefix } from '@/constants'; | ||||
| import { findId } from '@/utils/dataHelper'; | import { findId } from '@/utils/dataHelper'; | ||||
| const [addButton, setAddButton] = useState<boolean>(true) | const [addButton, setAddButton] = useState<boolean>(true) | ||||
| const [editButton, setEditButton] = useState<boolean>(true) | const [editButton, setEditButton] = useState<boolean>(true) | ||||
| actionRef={actionRef} | actionRef={actionRef} | ||||
| dataSource={list} | dataSource={list} | ||||
| columns={[ | columns={[ | ||||
| { | |||||
| title: '筛选日期', | |||||
| dataIndex: 'date_range', | |||||
| hidden: true, | |||||
| width: 120, | |||||
| valueType: 'dateRange', | |||||
| }, | |||||
| { | { | ||||
| title: 'ID', | title: 'ID', | ||||
| dataIndex: 'id', | dataIndex: 'id', | ||||
| { | { | ||||
| title: '开始时间', | title: '开始时间', | ||||
| dataIndex: 'start_date', | dataIndex: 'start_date', | ||||
| search: false, | |||||
| width: 140 | width: 140 | ||||
| }, | }, | ||||
| { | { | ||||
| dataIndex: 'login_name', | dataIndex: 'login_name', | ||||
| width: 200 | width: 200 | ||||
| }, | }, | ||||
| { | { | ||||
| title: '操作', | title: '操作', | ||||
| width: 300, | width: 300, | ||||
| member_type: params.member_type, | member_type: params.member_type, | ||||
| member_status: params.member_status, | member_status: params.member_status, | ||||
| status: params.status, | status: params.status, | ||||
| start_date: params.date_range ? params.date_range[0] : '', | |||||
| end_date: params.date_range ? params.date_range[1] : '', | |||||
| }).then(res => { | }).then(res => { | ||||
| setList(res.data.list) | setList(res.data.list) | ||||
| setTotal(res.data.total) | setTotal(res.data.total) |
| import { Button, ConfigProvider,message } from 'antd'; | import { Button, ConfigProvider,message } from 'antd'; | ||||
| import { GetCompanyJobList, getCompanyList, GetCompanyInfo, PostJobExport } from '@/apis/api'; | import { GetCompanyJobList, getCompanyList, GetCompanyInfo, PostJobExport } from '@/apis/api'; | ||||
| import { Imageprefix } from '@/constants'; | import { Imageprefix } from '@/constants'; | ||||
| const selectfieldNames = { label: 'full_name', value: 'id' }; | const selectfieldNames = { label: 'full_name', value: 'id' }; | ||||
| const PagesMainCompanyPostTable: React.FC = ({ dispatch, getId, openModel }: any) => { | const PagesMainCompanyPostTable: React.FC = ({ dispatch, getId, openModel }: any) => { | ||||
| const actionRef = useRef<ActionType>(); | const actionRef = useRef<ActionType>(); | ||||
| actionRef={actionRef} | actionRef={actionRef} | ||||
| dataSource={list} | dataSource={list} | ||||
| columns={[ | columns={[ | ||||
| { | |||||
| title: '筛选日期', | |||||
| dataIndex: 'date_range', | |||||
| hidden: true, | |||||
| width: 120, | |||||
| valueType: 'dateRange', | |||||
| }, | |||||
| { | { | ||||
| title: 'ID', | title: 'ID', | ||||
| dataIndex: 'id', | dataIndex: 'id', | ||||
| width: 100, | width: 100, | ||||
| fixed: 'left', | fixed: 'left', | ||||
| }, | }, | ||||
| { | |||||
| title: '职位名称', | |||||
| dataIndex: 'name', | |||||
| width: 200, | |||||
| fixed: 'left' | |||||
| }, | |||||
| { | { | ||||
| title: '所属企业', | title: '所属企业', | ||||
| dataIndex: 'full_name', | dataIndex: 'full_name', | ||||
| ) | ) | ||||
| } | } | ||||
| }, | }, | ||||
| { | |||||
| title: '职位名称', | |||||
| dataIndex: 'name', | |||||
| width: 200, | |||||
| fixed: 'left' | |||||
| }, | |||||
| { | { | ||||
| title: '点击次数', | title: '点击次数', | ||||
| dataIndex: 'click_count', | dataIndex: 'click_count', | ||||
| keyword: params.name, | keyword: params.name, | ||||
| expired: params.expired, | expired: params.expired, | ||||
| status: params.status, | status: params.status, | ||||
| company_id: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).id : companyId | |||||
| company_id: sessionStorage.getItem('post_company_info') ? JSON.parse(sessionStorage.getItem('post_company_info')).id : companyId, | |||||
| start_date: params.date_range ? params.date_range[0] : '', | |||||
| end_date: params.date_range ? params.date_range[1] : '', | |||||
| }).then(res => { | }).then(res => { | ||||
| setList(res.data.rows) | setList(res.data.rows) | ||||
| setTotal(res.data.total) | setTotal(res.data.total) |
| actionRef={actionRef} | actionRef={actionRef} | ||||
| dataSource={list} | dataSource={list} | ||||
| columns={[ | columns={[ | ||||
| { | |||||
| title: '筛选日期', | |||||
| dataIndex: 'date_range', | |||||
| hidden: true, | |||||
| width: 120, | |||||
| valueType: 'dateRange', | |||||
| }, | |||||
| { | { | ||||
| title: 'ID', | title: 'ID', | ||||
| dataIndex: 'id', | dataIndex: 'id', | ||||
| ) | ) | ||||
| } | } | ||||
| }, | }, | ||||
| { | { | ||||
| title: '见习基地', | title: '见习基地', | ||||
| dataIndex: 'probation_text', | dataIndex: 'probation_text', | ||||
| pagesize: pageSize, | pagesize: pageSize, | ||||
| sort: 'id', | sort: 'id', | ||||
| sortby: 'desc', | sortby: 'desc', | ||||
| keyword: fullname | |||||
| keyword: fullname, | |||||
| start_date: params.date_range ? params.date_range[0] : '', | |||||
| end_date: params.date_range ? params.date_range[1] : '', | |||||
| }).then(res => { | }).then(res => { | ||||
| setList(res.data.list) | setList(res.data.list) | ||||
| setTotal(res.data.total) | setTotal(res.data.total) |
| ProForm, | ProForm, | ||||
| ProFormSegmented | ProFormSegmented | ||||
| } from '@ant-design/pro-components'; | } from '@ant-design/pro-components'; | ||||
| import { ConfigProvider, Flex, Space, Modal, message, Form, Row, Col, Switch } from 'antd'; | |||||
| import { ConfigProvider, Flex, Space, Modal, message, Form, Row, Col, Image } from 'antd'; | |||||
| import { PostRecruitmentUpdate, PostRecruitmentAdd, GetCompanyInfo, GetRecruitmentDetail } from '@/apis/api'; | import { PostRecruitmentUpdate, PostRecruitmentAdd, GetCompanyInfo, GetRecruitmentDetail } from '@/apis/api'; | ||||
| import MapComponent from '@/components/Common/map'; | import MapComponent from '@/components/Common/map'; | ||||
| import RichComponent from '@/components/Common/rich'; | import RichComponent from '@/components/Common/rich'; | ||||
| import UploadModel from '@/components/Common/upload'; | |||||
| import { Imageprefix } from '@/constants'; | |||||
| import dayjs from "dayjs"; | import dayjs from "dayjs"; | ||||
| const PagesMainFairListCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | const PagesMainFairListCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | ||||
| const formRef = useRef<ProFormInstance>(); | const formRef = useRef<ProFormInstance>(); | ||||
| const [richTxt, setRichTxt] = useState<string | number>(''); // 招聘会内容 | const [richTxt, setRichTxt] = useState<string | number>(''); // 招聘会内容 | ||||
| const [mapSwitch, setMapSwitch] = useState<boolean>(false); // 选择地图 | const [mapSwitch, setMapSwitch] = useState<boolean>(false); // 选择地图 | ||||
| const [uploadedFilephotoName, setUploadedFilephotoName] = useState<string>(''); | |||||
| const handleFileUploadedphoto = (filename: string) => { | |||||
| setUploadedFilephotoName(filename); | |||||
| }; | |||||
| useEffect(() => { | useEffect(() => { | ||||
| setOpenPreview(openModel.openModal) | setOpenPreview(openModel.openModal) | ||||
| res.data.dateRange = [res.data.open_date, res.data.close_date ? res.data.close_date : null]; | res.data.dateRange = [res.data.open_date, res.data.close_date ? res.data.close_date : null]; | ||||
| return res.data; | return res.data; | ||||
| } else { | } else { | ||||
| setUploadedFilephotoName('') | |||||
| return { | return { | ||||
| title: '', | title: '', | ||||
| content: '', | content: '', | ||||
| close_date: '', | close_date: '', | ||||
| address: '', | address: '', | ||||
| status: 0, | status: 0, | ||||
| photo: '', | |||||
| dateRange: [] | dateRange: [] | ||||
| } | } | ||||
| } | } | ||||
| onFinish={async (values) => { | onFinish={async (values) => { | ||||
| values.open_date = values.dateRange[0]; | values.open_date = values.dateRange[0]; | ||||
| values.close_date = values.dateRange[1] ? values.dateRange[1] : ''; | values.close_date = values.dateRange[1] ? values.dateRange[1] : ''; | ||||
| values.photo = uploadedFilephotoName ? uploadedFilephotoName : ''; | |||||
| delete values.dateRange; | delete values.dateRange; | ||||
| if (id) { | if (id) { | ||||
| values.id = id.id; | values.id = id.id; | ||||
| }} | }} | ||||
| </FormControlRender> | </FormControlRender> | ||||
| </Form.Item> | </Form.Item> | ||||
| <ProFormDateTimeRangePicker | <ProFormDateTimeRangePicker | ||||
| name="dateRange" | name="dateRange" | ||||
| label="选择有效的日期时间范围" | label="选择有效的日期时间范围" | ||||
| rules={[{ required: true, message: '请选择有效的时间范围' }]} | rules={[{ required: true, message: '请选择有效的时间范围' }]} | ||||
| /> | /> | ||||
| <Row gutter={[16, 16]}> | <Row gutter={[16, 16]}> | ||||
| { | |||||
| detail ? | |||||
| <Col span={6}> | |||||
| <UploadModel multiple={false} form_name="photo" image_length={1} uploadTxt="上传招聘会照片" image_type={3} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||||
| </Col> : <> | |||||
| <Col span={6}> | |||||
| <UploadModel multiple={false} form_name="photo" image_length={1} uploadTxt="上传招聘会照片" image_type={3} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||||
| </Col> | |||||
| </> | |||||
| } | |||||
| { | |||||
| detail ? | |||||
| <Col span={6}> | |||||
| {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={6}> <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginTop: '32px', width: '100px', height: '100px' }}></Image> </Col> : ''} | |||||
| </> | |||||
| } | |||||
| {/* <Col span={24}> | {/* <Col span={24}> | ||||
| <Switch checked={mapSwitch} checkedChildren='地图已显示' unCheckedChildren="地图已关闭" onChange={(val) => { | <Switch checked={mapSwitch} checkedChildren='地图已显示' unCheckedChildren="地图已关闭" onChange={(val) => { | ||||
| setMapSwitch(val) | setMapSwitch(val) | ||||
| <Col span={24}> | <Col span={24}> | ||||
| <ProFormSegmented | <ProFormSegmented | ||||
| name="status" | name="status" | ||||
| label="职位状态" | |||||
| label="招聘会状态" | |||||
| request={async () => [ | request={async () => [ | ||||
| { label: '开启', value: 1 }, | { label: '开启', value: 1 }, | ||||
| { label: '结束', value: 2 } | { label: '结束', value: 2 } |
| doc_url: '', | doc_url: '', | ||||
| section_id: null, | section_id: null, | ||||
| content: '', | content: '', | ||||
| stick_top: 0, | |||||
| hot: 0, | |||||
| stick_top: 2, | |||||
| hot: 1, | |||||
| author: '' | author: '' | ||||
| } | } | ||||
| } | } |
| theme={{ | theme={{ | ||||
| token: { | token: { | ||||
| colorPrimary: '#4FBE70', | colorPrimary: '#4FBE70', | ||||
| } , components: { | |||||
| }, components: { | |||||
| Segmented: { | Segmented: { | ||||
| itemSelectedBg: '#19be6e', | itemSelectedBg: '#19be6e', | ||||
| itemSelectedColor: '#ffffff' | itemSelectedColor: '#ffffff' | ||||
| cover_img: '', | cover_img: '', | ||||
| parent_id: id.nextlevel, | parent_id: id.nextlevel, | ||||
| description: '', | description: '', | ||||
| display: 1 | |||||
| display: 1, | |||||
| park: 2 | |||||
| }; | }; | ||||
| } else { | } else { | ||||
| let res = await GetSectionDetail({ id: id.id }) | let res = await GetSectionDetail({ id: id.id }) | ||||
| placeholder="请输入栏目名称" | placeholder="请输入栏目名称" | ||||
| rules={[{ required: true, message: '请输入栏目名称' }]} | rules={[{ required: true, message: '请输入栏目名称' }]} | ||||
| /> | /> | ||||
| <ProFormText | |||||
| <ProFormText | |||||
| label="栏目编码,用英文字母表示,编码不能与其他栏目编码重复" | label="栏目编码,用英文字母表示,编码不能与其他栏目编码重复" | ||||
| name="code" | name="code" | ||||
| placeholder="请输入栏目编码,用英文字母表示,编码不能与其他栏目编码重复" | placeholder="请输入栏目编码,用英文字母表示,编码不能与其他栏目编码重复" | ||||
| { label: '否', value: 2 } | { label: '否', value: 2 } | ||||
| ]} | ]} | ||||
| /> | /> | ||||
| <ProFormSegmented | |||||
| name="park" | |||||
| label="是否是科创园栏目" | |||||
| request={async () => [ | |||||
| { label: '是', value: 1 }, | |||||
| { label: '否', value: 2 } | |||||
| ]} | |||||
| /> | |||||
| </ProForm> | </ProForm> | ||||
| </Modal> | </Modal> | ||||
| </ConfigProvider> | </ConfigProvider> |
| actionRef={actionRef} | actionRef={actionRef} | ||||
| dataSource={list} | dataSource={list} | ||||
| columns={[ | columns={[ | ||||
| { | |||||
| title: '筛选日期', | |||||
| dataIndex: 'date_range', | |||||
| hidden: true, | |||||
| width: 120, | |||||
| valueType: 'dateRange', | |||||
| }, | |||||
| { | { | ||||
| title: '姓名', | title: '姓名', | ||||
| dataIndex: 'seekername', | dataIndex: 'seekername', | ||||
| title: params.title, | title: params.title, | ||||
| political_status: params.political_status, | political_status: params.political_status, | ||||
| salary_range_desire: params.salary_range_desire, | salary_range_desire: params.salary_range_desire, | ||||
| status: params.status ? Number(params.status) : 0 | |||||
| status: params.status ? Number(params.status) : 0, | |||||
| start_date: params.date_range ? params.date_range[0] : '', | |||||
| end_date: params.date_range ? params.date_range[1] : '', | |||||
| }).then(res => { | }).then(res => { | ||||
| setList(res.data.seekers) | setList(res.data.seekers) | ||||
| setTotal(res.data.total) | setTotal(res.data.total) |
| 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, | |||||
| ProFormCascader, | |||||
| ProFormDatePicker | |||||
| } from '@ant-design/pro-components'; | |||||
| import { ConfigProvider, Flex, Space, Modal, message, Image, Row, Col, Switch, Form, Typography, Divider } 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'; | |||||
| import he from 'he'; | |||||
| import { isArrayOfType } from '@/utils/dataHelper'; | |||||
| const selectfieldNames = { label: 'name', value: 'id' }; | |||||
| const cascaderfieldNames = { label: 'name', value: 'id', children: 'childs' }; | |||||
| const PagesMainInformationArticleCreate: React.FC = ({ dispatch, dictModel, openModel, id }: any) => { | |||||
| const formRef = useRef<ProFormInstance>(); | |||||
| const [openPreview, setOpenPreview] = useState(false); | |||||
| const [detail, setDetail] = useState<InformationType.article | null>(null) | |||||
| useEffect(() => { | |||||
| setOpenPreview(openModel.openModal) | |||||
| }, [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', | |||||
| } | |||||
| }} | |||||
| > | |||||
| <Modal | |||||
| open={openPreview} | |||||
| title={id ? '编辑公共户口' : '添加公共户口'} | |||||
| centered | |||||
| maskClosable={false} | |||||
| footer={null} | |||||
| destroyOnClose | |||||
| width={1000} | |||||
| onCancel={() => { | |||||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||||
| }} | |||||
| > | |||||
| <ProForm<InformationType.article> | |||||
| formRef={formRef} | |||||
| request={async () => { | |||||
| if (id) { | |||||
| let res = await GetArticleDetail({ id: id }) | |||||
| setUploadedFilephotoName(res.data.cover_img) | |||||
| res.data.section_arr = [res.data.section_name] | |||||
| setDetail(res.data) | |||||
| return res.data; | |||||
| } else { | |||||
| setDetail(null) | |||||
| setUploadedFilephotoName('') | |||||
| return { | |||||
| title: '', | |||||
| cover_img: '', | |||||
| doc_url: '', | |||||
| section_id: null, | |||||
| content: '', | |||||
| stick_top: 0, | |||||
| hot: 0, | |||||
| author: '' | |||||
| } | |||||
| } | |||||
| }} | |||||
| 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) => { | |||||
| values.cover_img = uploadedFilephotoName ? uploadedFilephotoName : ''; | |||||
| if (id) { | |||||
| values.id = id; | |||||
| // 判断是字符串数组还是数字数组 | |||||
| if (isArrayOfType(values.section_arr, 'string')) { | |||||
| // 是字符串 | |||||
| values.section_id = detail?.section_id | |||||
| } else { | |||||
| values.section_id = values.section_arr.length > 0 ? values.section_arr[values.section_arr.length - 1] : 0; | |||||
| delete values.section_arr; | |||||
| } | |||||
| let res = await updateArticle(values) | |||||
| message.success('提交成功') | |||||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||||
| } else { | |||||
| values.section_id = values.section_arr.length > 0 ? values.section_arr[values.section_arr.length - 1] : 0; | |||||
| delete values.section_arr; | |||||
| let res = await addArticle(values) | |||||
| message.success('提交成功') | |||||
| dispatch({ type: 'openModel/getOpenModal', payload: false }) | |||||
| } | |||||
| }} | |||||
| > | |||||
| <Row gutter={[16, 16]}> | |||||
| <Col span={24}> | |||||
| <Divider orientation="left" plain >户口本信息</Divider> | |||||
| </Col> | |||||
| <Col span={8}> | |||||
| <ProFormText | |||||
| name="author" | |||||
| label="户口本存放位编号" | |||||
| placeholder="436346" | |||||
| rules={[{ required: true, message: '请输入户口本存放位编号' }]} | |||||
| /> | |||||
| </Col> | |||||
| <Col span={8}> | |||||
| <ProFormText | |||||
| name="author" | |||||
| label="单位名称" | |||||
| placeholder="菊城人才市场" | |||||
| rules={[{ required: true, message: '请输入单位名称' }]} | |||||
| /> | |||||
| </Col> | |||||
| <Col span={8}> | |||||
| <ProFormText | |||||
| name="author" | |||||
| label="入户人数" | |||||
| placeholder="10" | |||||
| /> | |||||
| </Col> | |||||
| <Col span={24}> | |||||
| <Divider orientation="left" plain >入户人员信息</Divider> | |||||
| </Col> | |||||
| <Col span={8}> | |||||
| <ProFormSegmented | |||||
| name="gender" | |||||
| label="是否随家人迁入" | |||||
| request={async () => [ | |||||
| { label: '是', value: 1 }, | |||||
| { label: '否', value: 2 } | |||||
| ]} | |||||
| /> | |||||
| </Col> | |||||
| <Col span={16}> | |||||
| <ProFormSelect | |||||
| width={'md'} | |||||
| name="education" | |||||
| label="选择随迁人员" | |||||
| fieldProps={{ | |||||
| fieldNames: selectfieldNames | |||||
| }} | |||||
| options={dictModel.educationList} | |||||
| /> | |||||
| </Col> | |||||
| <Col span={8}> | |||||
| <ProFormText | |||||
| name="author" | |||||
| label="姓名" | |||||
| placeholder="10" | |||||
| /> | |||||
| </Col> | |||||
| <Col span={8}> | |||||
| <ProFormText | |||||
| label="身份证" | |||||
| name="id_number" | |||||
| placeholder="请输入身份证" | |||||
| validateTrigger='onBlur' | |||||
| rules={[{ | |||||
| required: false, | |||||
| }, () => ({ | |||||
| validator: (rule, value) => { | |||||
| let info = verifyIdCard(value); | |||||
| if (typeof (info) == 'boolean') { | |||||
| return Promise.resolve(); | |||||
| } | |||||
| return Promise.reject(new Error(info)); | |||||
| } | |||||
| })]} | |||||
| /> | |||||
| </Col> | |||||
| <Col span={8}> | |||||
| <ProFormSegmented | |||||
| name="gender" | |||||
| label="性别" | |||||
| request={async () => [ | |||||
| { label: '男', value: '男' }, | |||||
| { label: '女', value: '女' } | |||||
| ]} | |||||
| /> | |||||
| </Col> | |||||
| <Col span={8}> | |||||
| <ProFormSelect | |||||
| name="education" | |||||
| label="学历" | |||||
| fieldProps={{ | |||||
| fieldNames: selectfieldNames | |||||
| }} | |||||
| options={dictModel.educationList} | |||||
| /> | |||||
| </Col> | |||||
| <Col span={8}> | |||||
| <ProFormSelect | |||||
| name="political_status" | |||||
| label="政治面貌" | |||||
| fieldProps={{ | |||||
| fieldNames: selectfieldNames | |||||
| }} | |||||
| options={dictModel.politicalList} | |||||
| /> | |||||
| </Col> | |||||
| <Col span={8}> | |||||
| <ProFormText | |||||
| name="author" | |||||
| label="毕业院校" | |||||
| placeholder="10" | |||||
| /> | |||||
| </Col> | |||||
| <Col span={8}> | |||||
| <ProFormText | |||||
| name="author" | |||||
| label="专业" | |||||
| placeholder="10" | |||||
| /> | |||||
| </Col> | |||||
| <Col span={8}> | |||||
| <ProFormCascader | |||||
| label="籍贯" | |||||
| name="native_arr" | |||||
| fieldProps={{ | |||||
| fieldNames: cascaderfieldNames, | |||||
| options: dictModel.areaList, | |||||
| changeOnSelect: true | |||||
| }} | |||||
| placeholder="请选择籍贯" | |||||
| /> | |||||
| </Col> | |||||
| <Col span={8}> | |||||
| <ProFormSelect | |||||
| name="marital_status" | |||||
| label="婚姻状况" | |||||
| fieldProps={{ | |||||
| fieldNames: selectfieldNames | |||||
| }} | |||||
| options={dictModel.maritalList} | |||||
| /> | |||||
| </Col> | |||||
| <Col span={8}> | |||||
| <ProFormText | |||||
| name="author" | |||||
| label="联系电话" | |||||
| placeholder="10" | |||||
| /> | |||||
| </Col> | |||||
| <Col span={8}> | |||||
| <ProFormDatePicker | |||||
| name="dob" | |||||
| label="入户时间" | |||||
| placeholder='请选择入户时间' | |||||
| width={'lg'} | |||||
| /> | |||||
| </Col> | |||||
| <Col span={8}> | |||||
| <ProFormText | |||||
| name="author" | |||||
| label="备注" | |||||
| placeholder="10" | |||||
| /> | |||||
| </Col> | |||||
| </Row> | |||||
| </ProForm> | |||||
| </Modal> | |||||
| </ConfigProvider> | |||||
| </> | |||||
| ); | |||||
| }; | |||||
| export default connect(({ dictModel, openModel }: any) => ({ | |||||
| dictModel, openModel | |||||
| }))(PagesMainInformationArticleCreate); |
| import { useRef, useState, useEffect } from 'react'; | |||||
| import { connect, history } from '@umijs/max'; | |||||
| import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||||
| import { | |||||
| ProTable, TableDropdown,ProFormSelect | |||||
| } from '@ant-design/pro-components'; | |||||
| import { Button, Image, ConfigProvider, Popconfirm, message , Tag} from 'antd'; | |||||
| import { listArticle, listSection, delArticle} from '@/apis/api'; | |||||
| import { Imageprefix } from '@/constants'; | |||||
| const selectfieldNames = { label: 'name', value: 'id', children: 'childs' }; | |||||
| const PagesMainInformationArticleTable: 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: 'ID', | |||||
| dataIndex: 'id', | |||||
| width: 100, | |||||
| search: false, | |||||
| }, | |||||
| { | |||||
| 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}/> | |||||
| </> | |||||
| ) | |||||
| }, | |||||
| { | |||||
| title: '置顶', | |||||
| dataIndex: 'stick_top', | |||||
| search: false, | |||||
| render: (_, record) => (<> | |||||
| { | |||||
| <> | |||||
| {record.stick_top === 1 ? <Tag color="green">置顶</Tag> : <Tag>未置顶</Tag>} | |||||
| </> | |||||
| } | |||||
| </>), | |||||
| }, | |||||
| { | |||||
| title: '热门', | |||||
| dataIndex: 'hot', | |||||
| search: false, | |||||
| render: (_, record) => (<> | |||||
| { | |||||
| <> | |||||
| {record.hot === 1 ? <Tag >普通</Tag> : <Tag color="red">热门推荐</Tag>} | |||||
| </> | |||||
| } | |||||
| </>), | |||||
| }, | |||||
| { | |||||
| title: '作者', | |||||
| dataIndex: 'author', | |||||
| search: false | |||||
| }, | |||||
| { | |||||
| 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>, | |||||
| <Popconfirm | |||||
| title="是否删除" | |||||
| onConfirm={(e) => { | |||||
| delArticle({ id: record.id }).then(res => { | |||||
| message.success('删除成功') | |||||
| actionRef.current.reload(); | |||||
| }) | |||||
| }} | |||||
| okText="删除" | |||||
| cancelText="取消" | |||||
| > | |||||
| <a | |||||
| key="delete" | |||||
| > | |||||
| 删除 | |||||
| </a> | |||||
| </Popconfirm> | |||||
| ], | |||||
| }, | |||||
| ]} | |||||
| 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>) => | |||||
| listArticle({ | |||||
| page: page, | |||||
| pagesize: pageSize, | |||||
| sort: 'id', | |||||
| sortby: 'desc', | |||||
| keyword: params.name, | |||||
| section_id: params.section_id | |||||
| }).then(res => { | |||||
| setList(res.data.articles) | |||||
| setTotal(res.data.total) | |||||
| }) | |||||
| } | |||||
| headerTitle="文章列表" | |||||
| toolBarRender={() => [ | |||||
| <Button type="primary" onClick={() => { | |||||
| dispatch({ type: 'openModel/getOpenModal', payload: true }) | |||||
| }}> | |||||
| 添加文章 | |||||
| </Button> | |||||
| ]} | |||||
| /> | |||||
| </ConfigProvider> | |||||
| </> | |||||
| ); | |||||
| }; | |||||
| export default connect(({ openModel }: any) => ({ | |||||
| openModel | |||||
| }))(PagesMainInformationArticleTable); |
| import Guide from '@/components/Guide'; | |||||
| import { trim } from '@/utils/format'; | |||||
| import { PageContainer } from '@ant-design/pro-components'; | |||||
| import { useModel } from '@umijs/max'; | |||||
| import styles from './index.less'; | |||||
| import { useRef, useState, useEffect } from 'react'; | |||||
| import { ConfigProvider, Flex, Space, Modal, message, Image, Row, Col, Spin, Card, DatePicker, Radio } from 'antd'; | |||||
| import { | |||||
| PieChartOutlined, | |||||
| HomeOutlined, | |||||
| UserOutlined, | |||||
| MailOutlined, | |||||
| PropertySafetyOutlined, | |||||
| } from '@ant-design/icons'; | |||||
| import * as echarts from 'echarts'; | |||||
| import dayjs from 'dayjs'; | |||||
| import type { Dayjs } from 'dayjs'; | |||||
| import { PostJobseekerList, PostCompanyViplist, GetCompanyJobList, getCompanyList } from '@/apis/api'; | |||||
| const HomePage: React.FC = () => { | const HomePage: React.FC = () => { | ||||
| const chartRef = useRef(null); | |||||
| const [companyAllTotal, setCompanyAllTotal] = useState<number>(0) | |||||
| const [jobseekerAllTotal, setJobseekerAllTotal] = useState<number>(0) | |||||
| const [postAllTotal, setPostAllTotal] = useState<number>(0) | |||||
| const [vipAllTotal, setVipAllTotal] = useState<number>(0) | |||||
| const [timeRadio, setTimeRadio] = useState<number>(0) | |||||
| const [timeRange, setTimeRange] = useState<[Date, Date] | [String, String] | null>(null); | |||||
| const [data, setData] = useState<number[]>([]) | |||||
| useEffect(() => { | |||||
| getCompanyList().then(res => { | |||||
| setCompanyAllTotal(res.data.total ? res.data.total : 0) | |||||
| }) | |||||
| PostJobseekerList().then(res => { | |||||
| setJobseekerAllTotal(res.data.total ? res.data.total : 0) | |||||
| }) | |||||
| GetCompanyJobList().then(res => { | |||||
| setPostAllTotal(res.data.total ? res.data.total : 0) | |||||
| }) | |||||
| PostCompanyViplist().then(res => { | |||||
| setVipAllTotal(res.data.total ? res.data.total : 0) | |||||
| }) | |||||
| }, []) | |||||
| const [loading, setLoading] = useState<boolean>(false); | |||||
| const [companyTotal, setCompanyTotal] = useState<number>(0) | |||||
| const [jobseekerTotal, setJobseekerTotal] = useState<number>(0) | |||||
| const [postTotal, setPostTotal] = useState<number>(0) | |||||
| const [vipTotal, setVipTotal] = useState<number>(0) | |||||
| useEffect(() => { | |||||
| fetchData(); | |||||
| }, [timeRange]); | |||||
| const fetchData = () => { | |||||
| setLoading(true); | |||||
| let params = timeRange ? { start_date: timeRange[0], end_date: timeRange[1] } : {}; | |||||
| if (timeRadio == 5) { | |||||
| params = timeRange ? { start_date: timeRange[0], end_date: timeRange[1] } : {}; | |||||
| } else { | |||||
| params = timeRange ? { start_date: formatDate(timeRange[0]), end_date: formatDate(timeRange[1]) } : {}; | |||||
| } | |||||
| Promise.all([ | |||||
| getCompanyList(params).then(res => setCompanyTotal(res.data.total ? res.data.total : 0)), | |||||
| PostJobseekerList(params).then(res => setJobseekerTotal(res.data.total ? res.data.total : 0)), | |||||
| GetCompanyJobList(params).then(res => setPostTotal(res.data.total ? res.data.total : 0)), | |||||
| PostCompanyViplist(params).then(res => setVipTotal(res.data.total ? res.data.total : 0)), | |||||
| ]).finally(() => { | |||||
| setLoading(false); | |||||
| }); | |||||
| }; | |||||
| const handleTimeChange = (e) => { | |||||
| setTimeRadio(e.target.value); | |||||
| const today = new Date(); | |||||
| let start_date, end_date; | |||||
| switch (e.target.value) { | |||||
| case 0: | |||||
| setTimeRange(null); | |||||
| break; | |||||
| case 1: | |||||
| start_date = new Date(today); | |||||
| start_date.setDate(today.getDate() - 3); | |||||
| end_date = today; | |||||
| setTimeRange([start_date, end_date]); | |||||
| break; | |||||
| case 2: | |||||
| start_date = new Date(today); | |||||
| start_date.setDate(today.getDate() - 7); | |||||
| end_date = today; | |||||
| setTimeRange([start_date, end_date]); | |||||
| break; | |||||
| case 3: | |||||
| start_date = new Date(today); | |||||
| start_date.setDate(today.getDate() - 15); | |||||
| end_date = today; | |||||
| setTimeRange([start_date, end_date]); | |||||
| break; | |||||
| case 4: | |||||
| start_date = new Date(today); | |||||
| start_date.setDate(today.getDate() - 30); | |||||
| end_date = today; | |||||
| setTimeRange([start_date, end_date]); | |||||
| break; | |||||
| case 5: | |||||
| setTimeRange(null); | |||||
| break; | |||||
| default: | |||||
| setTimeRange(null); | |||||
| } | |||||
| }; | |||||
| const formatDate = (date) => { | |||||
| const year = date.getFullYear(); | |||||
| const month = String(date.getMonth() + 1).padStart(2, '0'); | |||||
| const day = String(date.getDate()).padStart(2, '0'); | |||||
| return `${year}-${month}-${day}`; | |||||
| }; | |||||
| useEffect(() => { | |||||
| const chartDom = chartRef.current; | |||||
| const myChart = echarts.init(chartDom); | |||||
| const option = { | |||||
| tooltip: { | |||||
| trigger: 'axis', | |||||
| }, | |||||
| legend: { | |||||
| show: true, | |||||
| }, | |||||
| xAxis: { | |||||
| type: 'category', | |||||
| data: ['企业数', '求职者', '职位数', '企业VIP'], | |||||
| }, | |||||
| yAxis: { | |||||
| type: 'value', | |||||
| }, | |||||
| series: [ | |||||
| { | |||||
| type: 'bar', | |||||
| barWidth: "60%", | |||||
| data: [ | |||||
| { | |||||
| name: '企业数', | |||||
| label: { | |||||
| show: true, | |||||
| verticalAlign: 'middle', | |||||
| position: 'insideBottom', | |||||
| distance: 15, | |||||
| formatter: companyTotal, | |||||
| fontSize: 16, | |||||
| rich: { | |||||
| name: {} | |||||
| } | |||||
| }, | |||||
| value: companyTotal, | |||||
| itemStyle: { | |||||
| color: '#BF7FF1' | |||||
| } | |||||
| }, | |||||
| { | |||||
| name: '求职者', | |||||
| label: { | |||||
| show: true, | |||||
| verticalAlign: 'middle', | |||||
| position: 'insideBottom', | |||||
| distance: 15, | |||||
| formatter: jobseekerTotal, | |||||
| fontSize: 16, | |||||
| rich: { | |||||
| name: {} | |||||
| } | |||||
| }, | |||||
| value: jobseekerTotal, | |||||
| itemStyle: { | |||||
| color: '#3FAAF6' | |||||
| } | |||||
| }, | |||||
| { | |||||
| name: '职位数', | |||||
| value: postTotal, | |||||
| label: { | |||||
| show: true, | |||||
| verticalAlign: 'middle', | |||||
| position: 'insideBottom', | |||||
| distance: 15, | |||||
| formatter: postTotal, | |||||
| fontSize: 16, | |||||
| rich: { | |||||
| name: {} | |||||
| } | |||||
| }, | |||||
| itemStyle: { | |||||
| color: '#EA667B' | |||||
| } | |||||
| }, | |||||
| { | |||||
| name: '企业VIP', | |||||
| value: vipTotal, | |||||
| label: { | |||||
| show: true, | |||||
| verticalAlign: 'middle', | |||||
| position: 'insideBottom', | |||||
| distance: 15, | |||||
| formatter: vipTotal, | |||||
| fontSize: 16, | |||||
| rich: { | |||||
| name: {} | |||||
| } | |||||
| }, | |||||
| itemStyle: { | |||||
| color: '#19be6e' | |||||
| } | |||||
| }, | |||||
| ] | |||||
| } | |||||
| ] | |||||
| }; | |||||
| myChart.setOption(option); | |||||
| return () => { | |||||
| myChart.dispose(); | |||||
| }; | |||||
| }, [companyTotal, jobseekerTotal, postTotal, vipTotal]); | |||||
| return ( | return ( | ||||
| <>页面开发中。。。</> | |||||
| <> | |||||
| <Row gutter={[20, 20]}> | |||||
| <Col span={18}> | |||||
| <Space direction='vertical' size={30} style={{ width: '100%' }}> | |||||
| <Flex vertical> | |||||
| <h3>数据概览</h3> | |||||
| <Row gutter={[20, 20]}> | |||||
| <Col span={6}> | |||||
| <Flex justify='space-around' align='center' style={{ background: 'linear-gradient(to right, #5470FF,#BF7FF1)', height: 100, borderRadius: 10 }}> | |||||
| <Flex vertical justify='space-around' align='stretch' style={{ height: 80, color: '#ffffff' }}> | |||||
| <div style={{ fontSize: 20 }}>企业数</div> | |||||
| <div style={{ fontWeight: 'bold', fontSize: 32 }}>{companyAllTotal}</div> | |||||
| </Flex> | |||||
| <Flex vertical justify='space-between'> | |||||
| <HomeOutlined style={{ fontSize: 48, color: 'rgb(225,202,252)' }} /> | |||||
| </Flex> | |||||
| </Flex> | |||||
| </Col> | |||||
| <Col span={6}> | |||||
| <Flex justify='space-around' align='center' style={{ background: 'linear-gradient(to right, #3FAAF6,#767BFA)', height: 100, borderRadius: 10 }}> | |||||
| <Flex vertical justify='space-around' align='stretch' style={{ height: 80, color: '#ffffff' }}> | |||||
| <div style={{ fontSize: 20 }}>求职者</div> | |||||
| <div style={{ fontWeight: 'bold', fontSize: 32 }}>{jobseekerAllTotal}</div> | |||||
| </Flex> | |||||
| <Flex vertical justify='space-between'> | |||||
| <UserOutlined style={{ fontSize: 48, color: 'rgb(225,202,252)' }} /> | |||||
| </Flex> | |||||
| </Flex> | |||||
| </Col> | |||||
| <Col span={6}> | |||||
| <Flex justify='space-around' align='center' style={{ background: 'linear-gradient(to right, #EA667B,#F4A060)', height: 100, borderRadius: 10 }}> | |||||
| <Flex vertical justify='space-around' align='stretch' style={{ height: 80, color: '#ffffff' }}> | |||||
| <div style={{ fontSize: 20 }}>职位数</div> | |||||
| <div style={{ fontWeight: 'bold', fontSize: 32 }}>{postAllTotal}</div> | |||||
| </Flex> | |||||
| <Flex vertical justify='space-between'> | |||||
| <MailOutlined style={{ fontSize: 48, color: 'rgb(225,202,252)' }} /> | |||||
| </Flex> | |||||
| </Flex> | |||||
| </Col> | |||||
| <Col span={6}> | |||||
| <Flex justify='space-around' align='center' style={{ background: 'linear-gradient(to right,#A4E164,#19be6e)', height: 100, borderRadius: 10 }}> | |||||
| <Flex vertical justify='space-around' align='stretch' style={{ height: 80, color: '#ffffff' }}> | |||||
| <div style={{ fontSize: 20 }}>企业VIP</div> | |||||
| <div style={{ fontWeight: 'bold', fontSize: 32 }}>{vipAllTotal}</div> | |||||
| </Flex> | |||||
| <Flex vertical justify='space-between'> | |||||
| <PropertySafetyOutlined style={{ fontSize: 48, color: 'rgb(225,202,252)' }} /> | |||||
| </Flex> | |||||
| </Flex> | |||||
| </Col> | |||||
| </Row> | |||||
| </Flex> | |||||
| <Row> | |||||
| <Col span={12}> | |||||
| {/* 柱状图 */} | |||||
| <Spin spinning={loading}> | |||||
| <Space direction='vertical' style={{ width: '100%', background: '#ffffff', padding: '20px', borderRadius: 10 }}> | |||||
| <Flex justify='space-between' align='center' > | |||||
| <Space style={{ fontSize: 16, fontWeight: 'bold' }}><PieChartOutlined />使用情况</Space> | |||||
| <Space direction='vertical'> | |||||
| <Radio.Group value={timeRadio} defaultValue={0} size='small' onChange={async (e) => { | |||||
| handleTimeChange(e) | |||||
| }}> | |||||
| <Radio.Button value={0}>全部</Radio.Button> | |||||
| <Radio.Button value={1}>三天</Radio.Button> | |||||
| <Radio.Button value={2}>七天</Radio.Button> | |||||
| <Radio.Button value={3}>15天</Radio.Button> | |||||
| <Radio.Button value={4}>30天</Radio.Button> | |||||
| <Radio.Button value={5}>自定义</Radio.Button> | |||||
| </Radio.Group> | |||||
| {timeRadio == 5 ? <Space direction='vertical' align='end' style={{ width: '100%' }}> | |||||
| <DatePicker.RangePicker size='small' onChange={(date, dateString) => { | |||||
| setCompanyTotal(0) | |||||
| setJobseekerTotal(0) | |||||
| setPostTotal(0) | |||||
| setVipTotal(0) | |||||
| setTimeRange([dateString[0], dateString[1]]); | |||||
| }} /> | |||||
| </Space> : ''} | |||||
| </Space> | |||||
| </Flex> | |||||
| <div className="echarts-container" > | |||||
| <div ref={chartRef} style={{ height: '400px', width: '100%' }} /> | |||||
| </div> | |||||
| </Space> | |||||
| </Spin> | |||||
| </Col> | |||||
| </Row> | |||||
| </Space> | |||||
| </Col> | |||||
| </Row > | |||||
| </> | |||||
| ); | ); | ||||
| }; | }; | ||||
| import { LoginForm, ProFormCaptcha, ProForm, ProFormText, ProFormDependency, } from '@ant-design/pro-components'; | 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 type { CSSProperties } from 'react'; | ||||
| import { Login, PostSmsSend, GetCaptcha, GetUserMenulist , getRoleGetpermissionids} from '@/apis/api'; | |||||
| import { Login, PostSmsSend, GetCaptcha, GetUserMenulist, getRoleGetpermissionids } from '@/apis/api'; | |||||
| const contentStyle: CSSProperties = { | const contentStyle: CSSProperties = { | ||||
| display: 'flex', | display: 'flex', | ||||
| alignItems: 'center', | alignItems: 'center', | ||||
| title="菊城人才后台管理系统" | title="菊城人才后台管理系统" | ||||
| subTitle="欢迎登录" | subTitle="欢迎登录" | ||||
| onFinish={async (values) => { | onFinish={async (values) => { | ||||
| // 重新获取权限信息 | |||||
| try { | try { | ||||
| values.sms_code = Number(values.sms_code) | values.sms_code = Number(values.sms_code) | ||||
| let res = await Login(values) | let res = await Login(values) |
| import { useState, useEffect} from 'react'; | |||||
| import { connect } from '@umijs/max'; | |||||
| import { ConfigProvider } from 'antd'; | |||||
| import PagesMainPublicHouseTable from '@/components/Render/Main/Publichouse/table' | |||||
| import PagesMainPublicHouseCreate from '@/components/Render/Main/Publichouse/create' | |||||
| const PublicHousePage: 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', | |||||
| } | |||||
| }} | |||||
| > | |||||
| <PagesMainPublicHouseTable getId={getId}></PagesMainPublicHouseTable> | |||||
| <PagesMainPublicHouseCreate id={id}></PagesMainPublicHouseCreate> | |||||
| </ConfigProvider> | |||||
| </> | |||||
| ); | |||||
| }; | |||||
| export default connect(({ openModel }: any) => ({ | |||||
| openModel | |||||
| }))(PublicHousePage); | |||||
| /^(^[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])$)$/; | /^(^[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])$)$/; | ||||
| if (regIdCard.test(idCard)) { | if (regIdCard.test(idCard)) { | ||||
| if (idCard.length == 18) { | if (idCard.length == 18) { | ||||
| let idCardWi = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, | |||||
| let idCardWi:any = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, | |||||
| 5, 8, 4, 2); | 5, 8, 4, 2); | ||||
| let idCardY = new Array(1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2); | let idCardY = new Array(1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2); | ||||
| let idCardWiSum = 0; | |||||
| let idCardWiSum : any = 0; | |||||
| for (let i = 0; i < 17; i++) { | for (let i = 0; i < 17; i++) { | ||||
| idCardWiSum += idCard.substring(i, i + 1) * idCardWi[i]; | idCardWiSum += idCard.substring(i, i + 1) * idCardWi[i]; | ||||
| } | } |
| // 判断是字符串数组还是number数组 | // 判断是字符串数组还是number数组 | ||||
| export const isArrayOfType = (arr: [], type: 'string' | 'number'): boolean => { | export const isArrayOfType = (arr: [], type: 'string' | 'number'): boolean => { | ||||
| return arr.every(item => typeof item === type); | return arr.every(item => typeof item === type); | ||||
| } | |||||
| export function findAncestors(data: any, targetId: number): number[] { | |||||
| const ancestors: number[] = []; | |||||
| function traverse(node: any): boolean { | |||||
| if (node.id === targetId) { | |||||
| return true; | |||||
| } | |||||
| if (node.children) { | |||||
| for (const child of node.children) { | |||||
| if (traverse(child)) { | |||||
| ancestors.unshift(node.id); | |||||
| return true; | |||||
| } | |||||
| } | |||||
| } | |||||
| return false; | |||||
| } | |||||
| for (const node of data) { | |||||
| traverse(node); | |||||
| } | |||||
| return ancestors; | |||||
| } | |||||
| export function findAncestorsHanzi (data: any, nativePlaceTxt: string): any { | |||||
| const result: any = []; | |||||
| const findAncestors = (list: any, targetName: string, path: any = []): any => { | |||||
| for (const item of list) { | |||||
| if (item.name === targetName) { | |||||
| return [...path, item]; | |||||
| } | |||||
| if (item.children) { | |||||
| const foundPath = findAncestors(item.children, targetName, [...path, item]); | |||||
| if (foundPath.length > 0) { | |||||
| return foundPath; | |||||
| } | |||||
| } | |||||
| } | |||||
| return []; | |||||
| }; | |||||
| const ancestors = findAncestors(data, nativePlaceTxt); | |||||
| return ancestors; | |||||
| }; | |||||
| export function findItemById(arr: any[], id: number): any | false { | |||||
| for (const item of arr) { | |||||
| if (item.id === id) { | |||||
| return true; | |||||
| } | |||||
| if (item.children && Array.isArray(item.children)) { | |||||
| const result = findItemById(item.children, id); | |||||
| if (result) { | |||||
| return true; | |||||
| } | |||||
| } | |||||
| } | |||||
| return false; | |||||
| } | } |