您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

p__Information__Section__index.cc7f355e.async.js 13KB

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