You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

p__Information__Section__index.c00a46ce.async.js 12KB

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