|
1 |
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[284],{21134:function(re,Z,e){var j=e(1413),u=e(45987),i=e(62435),F=e(92767),m=e(86074),V=["fieldProps","request","params","proFieldProps"],h=function(d,S){var D=d.fieldProps,P=d.request,I=d.params,t=d.proFieldProps,z=(0,u.Z)(d,V);return(0,m.jsx)(F.Z,(0,j.Z)({valueType:"segmented",fieldProps:D,ref:S,request:P,params:I,filedConfig:{customLightMode:!0},proFieldProps:t},z))},E=i.forwardRef(h);Z.Z=E},5966:function(re,Z,e){var j=e(97685),u=e(1413),i=e(45987),F=e(21770),m=e(23323),V=e(55241),h=e(97435),E=e(62435),x=e(92767),d=e(86074),S=["fieldProps","proFieldProps"],D=["fieldProps","proFieldProps"],P="text",I=function(s){var l=s.fieldProps,$=s.proFieldProps,R=(0,i.Z)(s,S);return(0,d.jsx)(x.Z,(0,u.Z)({valueType:P,fieldProps:l,filedConfig:{valueType:P},proFieldProps:$},R))},t=function(s){var l=(0,F.Z)(s.open||!1,{value:s.open,onChange:s.onOpenChange}),$=(0,j.Z)(l,2),R=$[0],q=$[1];return(0,d.jsx)(m.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(te){var O,n=te.getFieldValue(s.name||[]);return(0,d.jsx)(V.Z,(0,u.Z)((0,u.Z)({getPopupContainer:function(a){return a&&a.parentNode?a.parentNode:a},onOpenChange:function(a){return q(a)},content:(0,d.jsxs)("div",{style:{padding:"4px 0"},children:[(O=s.statusRender)===null||O===void 0?void 0:O.call(s,n),s.strengthText?(0,d.jsx)("div",{style:{marginTop:10},children:(0,d.jsx)("span",{children:s.strengthText})}):null]}),overlayStyle:{width:240},placement:"rightTop"},s.popoverProps),{},{open:R,children:s.children}))}})},z=function(s){var l=s.fieldProps,$=s.proFieldProps,R=(0,i.Z)(s,D),q=(0,E.useState)(!1),J=(0,j.Z)(q,2),te=J[0],O=J[1];return l!=null&&l.statusRender&&R.name?(0,d.jsx)(t,{name:R.name,statusRender:l==null?void 0:l.statusRender,popoverProps:l==null?void 0:l.popoverProps,strengthText:l==null?void 0:l.strengthText,open:te,onOpenChange:O,children:(0,d.jsx)("div",{children:(0,d.jsx)(x.Z,(0,u.Z)({valueType:"password",fieldProps:(0,u.Z)((0,u.Z)({},(0,h.Z)(l,["statusRender","popoverProps","strengthText"])),{},{onBlur:function(o){var a;l==null||(a=l.onBlur)===null||a===void 0||a.call(l,o),O(!1)},onClick:function(o){var a;l==null||(a=l.onClick)===null||a===void 0||a.call(l,o),O(!0)}}),proFieldProps:$,filedConfig:{valueType:P}},R))})}):(0,d.jsx)(x.Z,(0,u.Z)({valueType:"password",fieldProps:l,proFieldProps:$,filedConfig:{valueType:P}},R))},W=I;W.Password=z,W.displayName="ProFormComponent",Z.Z=W},67119:function(re,Z,e){var j=e(59530),u=e(55375),i=e(68872),F=e(32443),m=e(86074),V=function(E){var x=E.onUploadComplete,d=E.uploadTxt,S=E.image_type,D=E.form_name,P=E.image_length,I=E.multiple,t=function(W){x&&x(W)};return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(F.Z,{label:d,name:D,icon:null,title:d,fieldProps:{maxCount:P,multiple:I,fileList:[],listType:"picture-card",showUploadList:!1,customRequest:function(W){var N=new FormData;N.append("image",W.file),console.log(N),(0,j.request)(u.FH+"/common/image/upload?imgtype="+S,{method:"post",data:N,Headers:{Authorization:sessionStorage.getItem("token"),"X-Requested-With":null}}).then(function(s){t(s.data.filename)}).catch(function(s){console.log(s),i.ZP.error("\u4E0A\u4F20\u5931\u8D25")})}}})})};Z.Z=V},55375:function(re,Z,e){e.d(Z,{FH:function(){return m},VO:function(){return F}});var j="Umi Max",u="/web",i="/common";console.log("production");var F="https://admin1.jcjob.cn/img/",m="https://admin1.jcjob.cn/api"},60624:function(re,Z,e){e.r(Z),e.d(Z,{default:function(){return ie}});var j=e(5574),u=e.n(j),i=e(62435),F=e(59530),m=e(28459),V=e(15009),h=e.n(V),E=e(99289),x=e.n(E),d=e(67211),S=e(98163),D=e(14726),P=e(39680),I=e(55375),t=e(86074),z=function(c){var A=c.dispatch,G=c.openModel,X=c.getId,g=(0,i.useRef)(),y=(0,i.useState)([]),w=u()(y,2),Q=w[0],K=w[1],Y=(0,i.useState)(0),ne=u()(Y,2),ae=ne[0],B=ne[1],_=(0,i.useState)(1),k=u()(_,2),le=k[0],H=k[1],oe=(0,i.useState)(10),se=u()(oe,2),L=se[0],M=se[1],f=function(T){X(T)};return(0,i.useEffect)(function(){G.openModal||g.current.reload()},[G.openModal]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(m.ZP,{theme:{token:{colorPrimary:"#4FBE70",colorLink:"#4FBE70"}},children:(0,t.jsx)(d.Z,{size:"small",bordered:!0,scroll:{x:1300},actionRef:g,dataSource:Q,columns:[{title:"ID",dataIndex:"id",width:100,search:!1},{title:"\u680F\u76EE\u540D\u79F0",dataIndex:"name"},{title:"\u5C01\u9762\u56FE",dataIndex:"cover_img",search:!1,render:function(T,C){return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(S.Z,{src:"".concat(I.VO).concat(C.cover_img),width:40,height:40})})}},{title:"\u63CF\u8FF0",dataIndex:"description",search:!1},{title:"\u64CD\u4F5C",width:300,key:"option",valueType:"option",fixed:"right",render:function(T,C,b){return[(0,t.jsx)(D.ZP,{type:"link",onClick:function(){f(C),A({type:"openModel/getOpenModal",payload:!0})},children:"\u7F16\u8F91"},"1"),(0,t.jsx)(D.ZP,{type:"link",onClick:function(){C.nextlevel=C.id,f(C),A({type:"openModel/getOpenModal",payload:!0})},children:"\u6DFB\u52A0\u4E0B\u7EA7\u680F\u76EE"},"1"),(0,t.jsx)(D.ZP,{type:"link",onClick:function(){},children:"\u5220\u9664"},"2")]}}],rowKey:"id",pagination:{current:le,pageSize:L,showSizeChanger:!0,total:ae,pageSizeOptions:[9,18,27,99],onChange:function(T,C){H(T),M(C)},onShowSizeChange:function(T,C){H(T),M(C)}},request:x()(h()().mark(function p(){var T,C=arguments;return h()().wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:return T=C.length>0&&C[0]!==void 0?C[0]:{},ee.abrupt("return",(0,P.DGC)({page:le,pagesize:L,sort:"id",sortby:"desc",keyword:T.name}).then(function(de){K(de.data.sections),B(de.data.total)}));case 2:case"end":return ee.stop()}},p)})),headerTitle:"\u680F\u76EE/\u9891\u9053",toolBarRender:function(){return[(0,t.jsx)(D.ZP,{type:"primary",onClick:function(){A({type:"openModel/getOpenModal",payload:!0})},children:"\u6DFB\u52A0\u680F\u76EE/\u9891\u9053"})]},expandable:{childrenColumnName:"childs"}})})})},W=(0,F.connect)(function(U){var c=U.openModel;return{openModel:c}})(z),N=e(97269),s=e(5966),l=e(21134),$=e(17788),R=e(86250),q=e(42075),J=e(68872),te=e(71230),O=e(15746),n=e(67119),o={label:"name",value:"id"},a=function(c){var A=c.dispatch,G=c.dictModel,X=c.openModel,g=c.id,y=(0,i.useRef)(),w=(0,i.useState)(!1),Q=u()(w,2),K=Q[0],Y=Q[1],ne=(0,i.useState)(null),ae=u()(ne,2),B=ae[0],_=ae[1];(0,i.useEffect)(function(){Y(X.openModal)},[X.openModal]);var k=(0,i.useState)(""),le=u()(k,2),H=le[0],oe=le[1],se=function(M){oe(M)};return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(m.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:(0,t.jsx)($.Z,{open:K,title:g?"\u7F16\u8F91\u680F\u76EE/\u9891\u9053":"\u6DFB\u52A0\u680F\u76EE/\u9891\u9053",centered:!0,maskClosable:!1,footer:null,destroyOnClose:!0,width:1e3,onCancel:function(){A({type:"openModel/getOpenModal",payload:!1})},children:(0,t.jsxs)(N.A,{formRef:y,request:x()(h()().mark(function L(){var M;return h()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(!g){p.next=15;break}if(!g.nextlevel){p.next=7;break}return _(null),oe(""),p.abrupt("return",{name:"",cover_img:"",parent_id:g.nextlevel,description:"",display:1});case 7:return p.next=9,(0,P.PoI)({id:g.id});case 9:return M=p.sent,oe(M.data.cover_img),_(M.data),p.abrupt("return",M.data);case 13:p.next=18;break;case 15:return _(null),oe(""),p.abrupt("return",{name:"",cover_img:"",parent_id:-1,description:"",display:1});case 18:case"end":return p.stop()}},L)})),submitter:{searchConfig:{resetText:"\u53D6\u6D88",submitText:"\u4FDD\u5B58"},render:function(M,f){return(0,t.jsxs)(R.Z,{justify:"flex-end",children:[" ",(0,t.jsx)(q.Z,{children:f})]})},onReset:function(){_(null),Y(!1)}},onFinish:function(){var L=x()(h()().mark(function M(f){var p,T;return h()().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(g.nextlevel?f.parent_id=g.nextlevel:B&&B.id?f.parent_id=B.parent_id:f.parent_id=-1,f.cover_img=H||"",console.log(f),!B){b.next=12;break}return f.id=g.id,b.next=7,(0,P.$nt)(f);case 7:p=b.sent,J.ZP.success("\u63D0\u4EA4\u6210\u529F"),A({type:"openModel/getOpenModal",payload:!1}),b.next=17;break;case 12:return b.next=14,(0,P.qGV)(f);case 14:T=b.sent,J.ZP.success("\u63D0\u4EA4\u6210\u529F"),A({type:"openModel/getOpenModal",payload:!1});case 17:case"end":return b.stop()}},M)}));return function(M){return L.apply(this,arguments)}}(),children:[(0,t.jsx)(s.Z,{label:"\u680F\u76EE\u540D\u79F0",name:"name",placeholder:"\u8BF7\u8F93\u5165\u680F\u76EE\u540D\u79F0",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u680F\u76EE\u540D\u79F0"}]}),(0,t.jsx)(s.Z,{name:"description",label:"\u63CF\u8FF0",placeholder:"\u8BF7\u8F93\u5165\u63CF\u8FF0",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0"}]}),(0,t.jsx)(te.Z,{gutter:[16,16],children:B?(0,t.jsxs)(O.Z,{span:24,style:{display:"flex"},children:[(0,t.jsx)(n.Z,{multiple:!1,form_name:"cover_img",image_length:1,uploadTxt:"\u4E0A\u4F20\u5C01\u9762\u56FE",image_type:3,onUploadComplete:se}),H?(0,t.jsx)(S.Z,{src:"".concat(I.VO).concat(H),style:{marginLeft:"16px",marginTop:"32px",width:"100px",height:"100px"}}):(0,t.jsx)(S.Z,{src:"".concat(I.VO).concat(B==null?void 0:B.cover_img),style:{marginLeft:"16px",marginTop:"32px",width:"100px",height:"100px"}})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(O.Z,{span:24,style:{display:"flex"},children:[(0,t.jsx)(n.Z,{multiple:!1,form_name:"cover_img",image_length:1,uploadTxt:"\u4E0A\u4F20\u5C01\u9762\u56FE",image_type:3,onUploadComplete:se}),H?(0,t.jsxs)(O.Z,{span:8,children:[" ",(0,t.jsx)(S.Z,{src:"".concat(I.VO).concat(H),style:{marginTop:"32px",width:"100px",height:"100px"}})," "]}):""]})})}),(0,t.jsx)(l.Z,{name:"display",label:"\u662F\u5426\u663E\u793A",request:x()(h()().mark(function L(){return h()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",[{label:"\u662F",value:1},{label:"\u5426",value:2}]);case 1:case"end":return f.stop()}},L)}))})]})})})})},r=(0,F.connect)(function(U){var c=U.dictModel,A=U.openModel;return{dictModel:c,openModel:A}})(a),v=function(c){var A=c.dispatch,G=c.openModel,X=(0,i.useState)(0),g=u()(X,2),y=g[0],w=g[1],Q=function(Y){w(Y)};return(0,i.useEffect)(function(){G.openModal||w(0)},[G.openModal]),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(m.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:[(0,t.jsx)(W,{getId:Q}),(0,t.jsx)(r,{id:y})]})})},ie=(0,F.connect)(function(U){var c=U.openModel;return{openModel:c}})(v)},86250:function(re,Z,e){e.d(Z,{Z:function(){return O}});var j=e(62435),u=e(93967),i=e.n(u),F=e(98423),m=e(98065),V=e(53124),h=e(92030),E=e(45503);const x=["wrap","nowrap","wrap-reverse"],d=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],S=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],D=(n,o)=>{const a=o.wrap===!0?"wrap":o.wrap;return{[`${n}-wrap-${a}`]:a&&x.includes(a)}},P=(n,o)=>{const a={};return S.forEach(r=>{a[`${n}-align-${r}`]=o.align===r}),a[`${n}-align-stretch`]=!o.align&&!!o.vertical,a},I=(n,o)=>{const a={};return d.forEach(r=>{a[`${n}-justify-${r}`]=o.justify===r}),a};function t(n,o){return i()(Object.assign(Object.assign(Object.assign({},D(n,o)),P(n,o)),I(n,o)))}var z=t;const W=n=>{const{componentCls:o}=n;return{[o]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},N=n=>{const{componentCls:o}=n;return{[o]:{"&-gap-small":{gap:n.flexGapSM},"&-gap-middle":{gap:n.flexGap},"&-gap-large":{gap:n.flexGapLG}}}},s=n=>{const{componentCls:o}=n,a={};return x.forEach(r=>{a[`${o}-wrap-${r}`]={flexWrap:r}}),a},l=n=>{const{componentCls:o}=n,a={};return S.forEach(r=>{a[`${o}-align-${r}`]={alignItems:r}}),a},$=n=>{const{componentCls:o}=n,a={};return d.forEach(r=>{a[`${o}-justify-${r}`]={justifyContent:r}}),a},R=()=>({});var q=(0,h.I$)("Flex",n=>{const{paddingXS:o,padding:a,paddingLG:r}=n,v=(0,E.TS)(n,{flexGapSM:o,flexGap:a,flexGapLG:r});return[W(v),N(v),s(v),l(v),$(v)]},R,{resetStyle:!1}),J=function(n,o){var a={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&o.indexOf(r)<0&&(a[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,r=Object.getOwnPropertySymbols(n);v<r.length;v++)o.indexOf(r[v])<0&&Object.prototype.propertyIsEnumerable.call(n,r[v])&&(a[r[v]]=n[r[v]]);return a},O=j.forwardRef((n,o)=>{const{prefixCls:a,rootClassName:r,className:v,style:ie,flex:U,gap:c,children:A,vertical:G=!1,component:X="div"}=n,g=J(n,["prefixCls","rootClassName","className","style","flex","gap","children","vertical","component"]),{flex:y,direction:w,getPrefixCls:Q}=j.useContext(V.E_),K=Q("flex",a),[Y,ne,ae]=q(K),B=G!=null?G:y==null?void 0:y.vertical,_=i()(v,r,y==null?void 0:y.className,K,ne,ae,z(K,n),{[`${K}-rtl`]:w==="rtl",[`${K}-gap-${c}`]:(0,m.n)(c),[`${K}-vertical`]:B}),k=Object.assign(Object.assign({},y==null?void 0:y.style),ie);return U&&(k.flex=U),c&&!(0,m.n)(c)&&(k.gap=c),Y(j.createElement(X,Object.assign({ref:o,className:_,style:k},(0,F.Z)(g,["justify","wrap","align"])),A))})}}]);
|