"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[284],{86615:function(me,G,e){var P=e(1413),v=e(45987),r=e(22270),B=e(78045),M=e(62435),H=e(28614),d=e(49994),K=e(86074),E=["fieldProps","options","radioType","layout","proFieldProps","valueEnum"],j=M.forwardRef(function(f,U){var D=f.fieldProps,Z=f.options,T=f.radioType,k=f.layout,A=f.proFieldProps,t=f.valueEnum,J=(0,v.Z)(f,E);return(0,K.jsx)(d.Z,(0,P.Z)((0,P.Z)({valueType:T==="button"?"radioButton":"radio",ref:U,valueEnum:(0,r.h)(t,void 0)},J),{},{fieldProps:(0,P.Z)({options:Z,layout:k},D),proFieldProps:A,filedConfig:{customLightMode:!0}}))}),L=M.forwardRef(function(f,U){var D=f.fieldProps,Z=f.children;return(0,K.jsx)(B.ZP,(0,P.Z)((0,P.Z)({},D),{},{ref:U,children:Z}))}),_=(0,H.G)(L,{valuePropName:"checked",ignoreWidth:!0}),i=_;i.Group=j,i.Button=B.ZP.Button,i.displayName="ProFormComponent",G.Z=i},67119:function(me,G,e){var P=e(5574),v=e.n(P),r=e(62435),B=e(59530),M=e(55375),H=e(42075),d=e(68872),K=e(98163),E=e(32443),j=e(86074),L=function(i){var f=i.onUploadComplete,U=i.uploadTxt,D=i.image_type,Z=i.form_name,T=i.image_length,k=i.multiple,A=i.imageUrl,t=function(n){n&&f(n)},J=(0,r.useState)(A),q=v()(J,2),N=q[0],ee=q[1];return(0,r.useEffect)(function(){ee(A)},[A]),(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)(H.Z,{children:[(0,j.jsx)(E.Z,{label:U,name:Z,icon:null,title:U,fieldProps:{maxCount:T,multiple:k,fileList:[],listType:"picture-card",showUploadList:!1,customRequest:function(n){var o=new FormData;o.append("image",n.file),console.log(o),(0,B.request)(M.FH+"/common/image/upload?imgtype="+D,{method:"post",data:o,Headers:{Authorization:sessionStorage.getItem("token"),"X-Requested-With":null}}).then(function(a){ee(a.data.filename),t(a.data.filename)}).catch(function(a){console.log(a),d.ZP.error("\u4E0A\u4F20\u5931\u8D25")})}}}),N&&(0,j.jsx)(K.Z,{src:"".concat(M.VO).concat(N),width:102,height:102,style:{borderRadius:8}})]})})};G.Z=L},60624:function(me,G,e){e.r(G),e.d(G,{default:function(){return X}});var P=e(5574),v=e.n(P),r=e(62435),B=e(59530),M=e(28459),H=e(15009),d=e.n(H),K=e(99289),E=e.n(K),j=e(95338),L=e(97269),_=e(98163),i=e(14726),f=e(17788),U=e(86738),D=e(68872),Z=e(78045),T=e(39680),k=e(55375),A=e(67119),t=e(86074),J=function(u){var S=u.dispatch,w=u.openModel,h=u.getId,p=(0,r.useRef)(),Q=(0,r.useState)([]),C=v()(Q,2),z=C[0],te=C[1],V=(0,r.useState)(0),ne=v()(V,2),ae=ne[0],W=ne[1],oe=(0,r.useState)(1),de=v()(oe,2),ie=de[0],le=de[1],re=(0,r.useState)(10),ce=v()(re,2),y=ce[0],g=ce[1],s=function(F){h(F)};(0,r.useEffect)(function(){if(!w.openModal){var O;(O=p.current)===null||O===void 0||O.reload()}},[w.openModal]);var x=(0,r.useState)(""),pe=v()(x,2),ve=pe[0],R=pe[1],Ee=(0,r.useRef)(""),Ce=function(F){R(F)};return(0,r.useEffect)(function(){Ee.current=ve},[ve]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(M.ZP,{theme:{token:{colorPrimary:"#4FBE70",colorLink:"#4FBE70"}},children:(0,t.jsx)(j.Z,{scroll:{y:480,x:"auto"},bordered:!0,actionRef:p,dataSource:z,search:{span:8,labelWidth:"auto"},rowSelection:{type:"checkbox"},columns:[{title:"ID",dataIndex:"id",width:200,search:!1},{title:"\u680F\u76EE\u540D\u79F0",dataIndex:"name",width:200},{title:"\u680F\u76EE\u7F16\u7801",dataIndex:"code",width:200},{title:"\u53EF\u89C1",dataIndex:"display",width:200,valueEnum:{0:{text:"\u5168\u90E8"},1:{text:"\u53EF\u89C1",status:"Processing"},2:{text:"\u4E0D\u53EF\u89C1",status:"Error"}}},{title:"\u5C01\u9762\u56FE",dataIndex:"cover_img",search:!1,width:200,render:function(F,c){return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(_.Z,{src:"".concat(k.VO).concat(c.cover_img),width:40,height:40})})}},{title:"\u63CF\u8FF0",dataIndex:"description",width:200,search:!1},{title:"\u64CD\u4F5C",key:"option",valueType:"option",render:function(F,c,fe){return[(0,t.jsx)(i.ZP,{type:"link",onClick:function(){s(c),S({type:"openModel/getOpenModal",payload:!0})},children:"\u7F16\u8F91"},"1"),(0,t.jsx)(i.ZP,{size:"small",type:"link",onClick:function(){f.Z.confirm({title:"\u66F4\u6362\u56FE\u7247",content:(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(L.A,{submitter:{render:!1},children:(0,t.jsx)(A.Z,{multiple:!1,form_name:"photo",image_length:1,uploadTxt:"\u66F4\u6362\u56FE\u7247",image_type:3,imageUrl:c.photo,onUploadComplete:Ce})})}),onOk:function(){return E()(d()().mark(function ge(){var Y;return d()().wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:(Y=p.current)===null||Y===void 0||Y.reload();case 1:case"end":return xe.stop()}},ge)}))()},onCancel:function(){console.log("Cancel")},okText:"\u4FDD\u5B58",cancelText:"\u53D6\u6D88",centered:!0})},children:"\u66F4\u6362\u56FE\u7247"}),(0,t.jsx)(i.ZP,{type:"link",onClick:function(){c.nextlevel=c.id,s(c),S({type:"openModel/getOpenModal",payload:!0})},children:"\u6DFB\u52A0\u4E0B\u7EA7\u680F\u76EE"},"1"),(0,t.jsx)(U.Z,{title:"\u662F\u5426\u5220\u9664",onConfirm:function(b){(0,T.WOH)({id:c.id}).then(function(ge){D.ZP.success("\u5220\u9664\u6210\u529F"),p.current.reload()})},okText:"\u5220\u9664",cancelText:"\u53D6\u6D88",children:(0,t.jsx)(i.ZP,{danger:!0,type:"link",children:"\u5220\u9664"},"delete")})]}}],rowKey:"id",pagination:{current:ie,pageSize:y,showSizeChanger:!0,total:ae,pageSizeOptions:[9,18,27,99],onChange:function(F,c){le(F),g(c)},onShowSizeChange:function(F,c){le(F),g(c)}},request:E()(d()().mark(function O(){var F,c=arguments;return d()().wrap(function($){for(;;)switch($.prev=$.next){case 0:return F=c.length>0&&c[0]!==void 0?c[0]:{},$.abrupt("return",(0,T.DGC)({page:ie,pagesize:y,sort:"id",sortby:"desc",keyword:F.name}).then(function(b){te(b.data.sections),W(b.data.total)}));case 2:case"end":return $.stop()}},O)})),headerTitle:"\u680F\u76EE/\u9891\u9053",toolBarRender:function(){return[(0,t.jsx)(i.ZP,{type:"primary",onClick:function(){f.Z.confirm({title:"\u8BF7\u9009\u62E9\u5BF9\u6279\u91CF\u6570\u636E\u8FDB\u884C\u4F55\u79CD\u64CD\u4F5C",content:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{children:"\u53C2\u6570\uFF1Aid, display"}),(0,t.jsxs)(Z.ZP.Group,{size:"small",onChange:function(){var c=E()(d()().mark(function fe($){var b;return d()().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:(b=p.current)===null||b===void 0||b.reload();case 1:case"end":return Y.stop()}},fe)}));return function(fe){return c.apply(this,arguments)}}(),children:[(0,t.jsx)(Z.ZP,{value:1,children:"\u53EF\u89C1"}),(0,t.jsx)(Z.ZP,{value:1,children:"\u4E0D\u53EF\u89C1"})]})]}),onOk:function(){},onCancel:function(){console.log("Cancel")},okText:"\u4FDD\u5B58",cancelText:"\u53D6\u6D88",centered:!0})},children:"\u6279\u91CF\u7BA1\u7406\u53EF\u89C1\u72B6\u6001"}),(0,t.jsx)(i.ZP,{type:"primary",onClick:function(){S({type:"openModel/getOpenModal",payload:!0})},children:"\u6DFB\u52A0\u680F\u76EE/\u9891\u9053"})]},expandable:{childrenColumnName:"childs"}})})})},q=(0,B.connect)(function(I){var u=I.openModel;return{openModel:u}})(J),N=e(5966),ee=e(86615),se=e(86250),n=e(42075),o=e(71230),a=e(15746),l={label:"name",value:"id"},m=function(u){var S=u.dispatch,w=u.dictModel,h=u.openModel,p=u.id,Q=(0,r.useRef)(),C=(0,r.useState)(!1),z=v()(C,2),te=z[0],V=z[1],ne=(0,r.useState)(null),ae=v()(ne,2),W=ae[0],oe=ae[1];(0,r.useEffect)(function(){V(h.openModal)},[h.openModal]);var de=(0,r.useState)(""),ie=v()(de,2),le=ie[0],re=ie[1],ce=function(g){re(g)};return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(M.ZP,{theme:{token:{colorPrimary:"#4FBE70"},components:{Segmented:{itemSelectedBg:"#19be6e",itemSelectedColor:"#ffffff"}}},children:(0,t.jsx)(f.Z,{open:te,title:p?"\u7F16\u8F91\u680F\u76EE/\u9891\u9053":"\u6DFB\u52A0\u680F\u76EE/\u9891\u9053",centered:!0,maskClosable:!1,footer:null,destroyOnClose:!0,width:1e3,onCancel:function(){S({type:"openModel/getOpenModal",payload:!1})},children:(0,t.jsx)(L.A,{formRef:Q,request:E()(d()().mark(function y(){var g;return d()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(!p){x.next=15;break}if(!p.nextlevel){x.next=7;break}return oe(null),re(""),x.abrupt("return",{name:"",code:"",cover_img:"",parent_id:p.nextlevel,description:"",display:1,park:2});case 7:return x.next=9,(0,T.PoI)({id:p.id});case 9:return g=x.sent,re(g.data.cover_img),oe(g.data),x.abrupt("return",g.data);case 13:x.next=18;break;case 15:return oe(null),re(""),x.abrupt("return",{name:"",code:"",cover_img:"",parent_id:-1,description:"",display:1,park:2});case 18:case"end":return x.stop()}},y)})),submitter:{searchConfig:{resetText:"\u53D6\u6D88",submitText:"\u4FDD\u5B58"},render:function(g,s){return(0,t.jsxs)(se.Z,{justify:"flex-end",children:[" ",(0,t.jsx)(n.Z,{children:s})]})},onReset:function(){oe(null),V(!1)}},onFinish:function(){var y=E()(d()().mark(function g(s){var x,pe;return d()().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:if(p.nextlevel?s.parent_id=p.nextlevel:W&&W.id?s.parent_id=W.parent_id:s.parent_id=-1,s.cover_img=le||"",console.log(s),!W){R.next=12;break}return s.id=p.id,R.next=7,(0,T.$nt)(s);case 7:x=R.sent,D.ZP.success("\u63D0\u4EA4\u6210\u529F"),S({type:"openModel/getOpenModal",payload:!1}),R.next=17;break;case 12:return R.next=14,(0,T.qGV)(s);case 14:pe=R.sent,D.ZP.success("\u63D0\u4EA4\u6210\u529F"),S({type:"openModel/getOpenModal",payload:!1});case 17:case"end":return R.stop()}},g)}));return function(g){return y.apply(this,arguments)}}(),children:(0,t.jsxs)(o.Z,{gutter:[16,16],children:[(0,t.jsx)(a.Z,{span:24,children:(0,t.jsx)(A.Z,{multiple:!1,form_name:"cover_img",image_length:1,uploadTxt:"\u4E0A\u4F20\u5C01\u9762\u56FE",image_type:3,imageUrl:le,onUploadComplete:ce})}),(0,t.jsx)(a.Z,{span:8,children:(0,t.jsx)(N.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)(a.Z,{span:16,children:(0,t.jsx)(N.Z,{label:"\u680F\u76EE\u7F16\u7801\uFF0C\u7528\u82F1\u6587\u5B57\u6BCD\u8868\u793A\uFF0C\u4E0D\u53EF\u91CD\u590D",name:"code",placeholder:"\u680F\u76EE\u7F16\u7801\uFF0C\u7528\u82F1\u6587\u5B57\u6BCD\u8868\u793A\uFF0C\u4E0D\u53EF\u91CD\u590D",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u680F\u76EE\u7F16\u7801\uFF0C\u7528\u82F1\u6587\u5B57\u6BCD\u8868\u793A\uFF0C\u4E0D\u53EF\u91CD"}]})}),(0,t.jsx)(a.Z,{span:8,children:(0,t.jsx)(N.Z,{name:"description",label:"\u63CF\u8FF0",placeholder:"\u8BF7\u8F93\u5165\u63CF\u8FF0",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0"}]})}),(0,t.jsx)(a.Z,{span:8,children:(0,t.jsx)(ee.Z.Group,{name:"display",label:"\u662F\u5426\u663E\u793A",request:E()(d()().mark(function y(){return d()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",[{label:"\u662F",value:1},{label:"\u5426",value:2}]);case 1:case"end":return s.stop()}},y)}))})}),(0,t.jsx)(a.Z,{span:8,children:(0,t.jsx)(ee.Z.Group,{name:"park",label:"\u662F\u5426\u662F\u79D1\u521B\u56ED\u680F\u76EE",request:E()(d()().mark(function y(){return d()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",[{label:"\u662F",value:1},{label:"\u5426",value:2}]);case 1:case"end":return s.stop()}},y)}))})})]})})})})})},he=(0,B.connect)(function(I){var u=I.dictModel,S=I.openModel;return{dictModel:u,openModel:S}})(m),ue=function(u){var S=u.dispatch,w=u.openModel,h=(0,r.useState)(0),p=v()(h,2),Q=p[0],C=p[1],z=function(V){C(V)};return(0,r.useEffect)(function(){w.openModal||C(0)},[w.openModal]),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(M.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:[(0,t.jsx)(q,{getId:z}),(0,t.jsx)(he,{id:Q})]})})},X=(0,B.connect)(function(I){var u=I.openModel;return{openModel:u}})(ue)},86250:function(me,G,e){e.d(G,{Z:function(){return se}});var P=e(62435),v=e(93967),r=e.n(v),B=e(98423),M=e(98065),H=e(53124),d=e(92030),K=e(45503);const E=["wrap","nowrap","wrap-reverse"],j=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],L=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],_=(n,o)=>{const a=o.wrap===!0?"wrap":o.wrap;return{[`${n}-wrap-${a}`]:a&&E.includes(a)}},i=(n,o)=>{const a={};return L.forEach(l=>{a[`${n}-align-${l}`]=o.align===l}),a[`${n}-align-stretch`]=!o.align&&!!o.vertical,a},f=(n,o)=>{const a={};return j.forEach(l=>{a[`${n}-justify-${l}`]=o.justify===l}),a};function U(n,o){return r()(Object.assign(Object.assign(Object.assign({},_(n,o)),i(n,o)),f(n,o)))}var D=U;const Z=n=>{const{componentCls:o}=n;return{[o]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},T=n=>{const{componentCls:o}=n;return{[o]:{"&-gap-small":{gap:n.flexGapSM},"&-gap-middle":{gap:n.flexGap},"&-gap-large":{gap:n.flexGapLG}}}},k=n=>{const{componentCls:o}=n,a={};return E.forEach(l=>{a[`${o}-wrap-${l}`]={flexWrap:l}}),a},A=n=>{const{componentCls:o}=n,a={};return L.forEach(l=>{a[`${o}-align-${l}`]={alignItems:l}}),a},t=n=>{const{componentCls:o}=n,a={};return j.forEach(l=>{a[`${o}-justify-${l}`]={justifyContent:l}}),a},J=()=>({});var q=(0,d.I$)("Flex",n=>{const{paddingXS:o,padding:a,paddingLG:l}=n,m=(0,K.TS)(n,{flexGapSM:o,flexGap:a,flexGapLG:l});return[Z(m),T(m),k(m),A(m),t(m)]},J,{resetStyle:!1}),N=function(n,o){var a={};for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&o.indexOf(l)<0&&(a[l]=n[l]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,l=Object.getOwnPropertySymbols(n);m{const{prefixCls:a,rootClassName:l,className:m,style:he,flex:ue,gap:X,children:I,vertical:u=!1,component:S="div"}=n,w=N(n,["prefixCls","rootClassName","className","style","flex","gap","children","vertical","component"]),{flex:h,direction:p,getPrefixCls:Q}=P.useContext(H.E_),C=Q("flex",a),[z,te,V]=q(C),ne=u!=null?u:h==null?void 0:h.vertical,ae=r()(m,l,h==null?void 0:h.className,C,te,V,D(C,n),{[`${C}-rtl`]:p==="rtl",[`${C}-gap-${X}`]:(0,M.n)(X),[`${C}-vertical`]:ne}),W=Object.assign(Object.assign({},h==null?void 0:h.style),he);return ue&&(W.flex=ue),X&&!(0,M.n)(X)&&(W.gap=X),z(P.createElement(S,Object.assign({ref:o,className:ae,style:W},(0,B.Z)(w,["justify","wrap","align"])),I))})}}]);