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