選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

p__Permission__Account__index.d5b3851b.async.js 13KB

1
  1. "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[597],{8214:function(re,W,e){var m=e(1413),g=e(45987),s=e(62435),C=e(66758),y=e(49994),b=e(86074),x=["fieldProps","request","params","proFieldProps"],G=function(f,F){var O=f.fieldProps,t=f.request,T=f.params,c=f.proFieldProps,u=(0,g.Z)(f,x),E=(0,s.useContext)(C.Z);return(0,b.jsx)(y.Z,(0,m.Z)({valueType:"cascader",fieldProps:(0,m.Z)({getPopupContainer:E.getPopupContainer},O),ref:F,request:t,params:T,filedConfig:{customLightMode:!0},proFieldProps:c},u))};W.Z=s.forwardRef(G)},64317:function(re,W,e){var m=e(1413),g=e(45987),s=e(22270),C=e(62435),y=e(66758),b=e(49994),x=e(86074),G=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],D=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],f=function(u,E){var _=u.fieldProps,z=u.children,A=u.params,V=u.proFieldProps,w=u.mode,B=u.valueEnum,K=u.request,h=u.showSearch,I=u.options,a=(0,g.Z)(u,G),n=(0,C.useContext)(y.Z);return(0,x.jsx)(b.Z,(0,m.Z)((0,m.Z)({valueEnum:(0,s.h)(B),request:K,params:A,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,m.Z)({options:I,mode:w,showSearch:h,getPopupContainer:n.getPopupContainer},_),ref:E,proFieldProps:V},a),{},{children:z}))},F=C.forwardRef(function(c,u){var E=c.fieldProps,_=c.children,z=c.params,A=c.proFieldProps,V=c.mode,w=c.valueEnum,B=c.request,K=c.options,h=(0,g.Z)(c,D),I=(0,m.Z)({options:K,mode:V||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label"},E),a=(0,C.useContext)(y.Z);return(0,x.jsx)(b.Z,(0,m.Z)((0,m.Z)({valueEnum:(0,s.h)(w),request:B,params:z,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,m.Z)({getPopupContainer:a.getPopupContainer},I),ref:u,proFieldProps:A},h),{},{children:_}))}),O=C.forwardRef(f),t=F,T=O;T.SearchSelect=t,T.displayName="ProFormComponent",W.Z=T},67119:function(re,W,e){var m=e(5574),g=e.n(m),s=e(62435),C=e(59530),y=e(55375),b=e(42075),x=e(68872),G=e(98163),D=e(32443),f=e(86074),F=function(t){var T=t.onUploadComplete,c=t.uploadTxt,u=t.image_type,E=t.form_name,_=t.image_length,z=t.multiple,A=t.imageUrl,V=function(a){a&&T(a)},w=(0,s.useState)(A),B=g()(w,2),K=B[0],h=B[1];return(0,s.useEffect)(function(){h(A)},[A]),(0,f.jsx)(f.Fragment,{children:(0,f.jsxs)(b.Z,{children:[(0,f.jsx)(D.Z,{label:c,name:E,icon:null,title:c,fieldProps:{maxCount:_,multiple:z,fileList:[],listType:"picture-card",showUploadList:!1,customRequest:function(a){var n=new FormData;n.append("image",a.file),console.log(n),(0,C.request)(y.FH+"/common/image/upload?imgtype="+u,{method:"post",data:n,Headers:{Authorization:sessionStorage.getItem("token"),"X-Requested-With":null}}).then(function(o){h(o.data.filename),V(o.data.filename)}).catch(function(o){console.log(o),x.ZP.error("\u4E0A\u4F20\u5931\u8D25")})}}}),K&&(0,f.jsx)(G.Z,{src:"".concat(y.VO).concat(K),width:102,height:102,style:{borderRadius:8}})]})})};W.Z=F},22271:function(re,W,e){e.r(W),e.d(W,{default:function(){return X}});var m=e(5574),g=e.n(m),s=e(62435),C=e(59530),y=e(28459),b=e(15009),x=e.n(b),G=e(99289),D=e.n(G),f=e(95338),F=e(14726),O=e(39680),t=e(86074),T=function(d){var j=d.dispatch,H=d.openModel,P=d.getId,S=(0,s.useRef)(),Q=(0,s.useState)([]),M=g()(Q,2),J=M[0],q=M[1],Y=(0,s.useState)(0),ee=g()(Y,2),te=ee[0],$=ee[1],se=(0,s.useState)(1),ie=g()(se,2),ne=ie[0],k=ie[1],ue=(0,s.useState)(10),oe=g()(ue,2),L=oe[0],i=oe[1],r=function(Z){P(Z)};return(0,s.useEffect)(function(){H.openModal||S.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)(f.Z,{scroll:{y:480,x:"auto"},bordered:!0,actionRef:S,dataSource:J,search:{span:8,labelWidth:"auto"},columns:[{title:"\u624B\u673A\u53F7\u7801",dataIndex:"mobile"},{title:"\u6635\u79F0",dataIndex:"nickname",search:!1},{title:"\u5934\u50CF",dataIndex:"avatar",search:!1},{title:"\u7535\u5B50\u90AE\u7BB1",dataIndex:"email",search:!1},{title:"\u89D2\u8272ID",dataIndex:"roleids",search:!1},{title:"\u64CD\u4F5C",key:"option",valueType:"option",render:function(Z,N,U){return[(0,t.jsx)(F.ZP,{type:"link",onClick:function(){r(N.id),j({type:"openModel/getOpenModal",payload:!0})},children:"\u7F16\u8F91"},"1"),(0,t.jsx)(F.ZP,{type:"link",onClick:function(){},children:"\u5220\u9664"},"2")]}}],rowKey:"id",pagination:{current:ne,pageSize:L,showSizeChanger:!0,total:te,pageSizeOptions:[9,18,27,99],onChange:function(Z,N){k(Z),i(N)},onShowSizeChange:function(Z,N){k(Z),i(N)}},request:D()(x()().mark(function p(){var Z,N=arguments;return x()().wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return Z=N.length>0&&N[0]!==void 0?N[0]:{},ae.abrupt("return",(0,O.D05)({page:ne,pagesize:L,sort:"id",sortby:"desc",keyword:Z.mobile}).then(function(ce){q(ce.data.users),$(ce.data.total)}));case 2:case"end":return ae.stop()}},p)})),headerTitle:"\u8D26\u53F7\u5217\u8868",toolBarRender:function(){return[(0,t.jsx)(F.ZP,{type:"primary",onClick:function(){j({type:"openModel/getOpenModal",payload:!0})},children:"\u6DFB\u52A0\u8D26\u53F7"})]}})})})},c=(0,C.connect)(function(R){var d=R.openModel;return{openModel:d}})(T),u=e(97269),E=e(5966),_=e(64317),z=e(8214),A=e(17788),V=e(86250),w=e(42075),B=e(68872),K=e(71230),h=e(15746),I=e(98163),a=e(55375),n=e(67119),o={label:"name",value:"id"},l={label:"name",value:"id",children:"children"},v=function(d){var j=d.dispatch,H=d.dictModel,P=d.openModel,S=d.id,Q=(0,s.useRef)(),M=(0,s.useState)(!1),J=g()(M,2),q=J[0],Y=J[1],ee=(0,s.useState)(null),te=g()(ee,2),$=te[0],se=te[1];(0,s.useEffect)(function(){Y(P.openModal)},[P.openModal]);var ie=(0,s.useState)(""),ne=g()(ie,2),k=ne[0],ue=ne[1],oe=function(i){ue(i)};return(0,s.useEffect)(function(){j({type:"dictModel/getList",payload:{code:2009,type:"setAreaList"}})},[]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(y.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:(0,t.jsx)(A.Z,{open:q,title:S?"\u7F16\u8F91\u8D26\u53F7":"\u6DFB\u52A0\u8D26\u53F7",centered:!0,maskClosable:!1,footer:null,destroyOnClose:!0,width:1e3,onCancel:function(){j({type:"openModel/getOpenModal",payload:!1})},children:(0,t.jsx)(u.A,{formRef:Q,request:D()(x()().mark(function L(){var i;return x()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(!S){p.next=10;break}return p.next=3,(0,O.nEl)({id:S});case 3:return i=p.sent,i.data.location_arr=[i.data.province?i.data.province:0,i.data.city?i.data.city:0,i.data.district?i.data.district:0,i.data.street?i.data.street:0],i.data.roleids=i.data.roleids.length>0?i.data.roleids.split(",").map(Number):[],se(i.data),p.abrupt("return",i.data);case 10:return p.abrupt("return",{mobile:"",password:"",repassword:"",nickname:"",avatar:"",email:"",roleids:[]});case 11:case"end":return p.stop()}},L)})),submitter:{searchConfig:{resetText:"\u53D6\u6D88",submitText:"\u4FDD\u5B58"},render:function(i,r){return(0,t.jsxs)(V.Z,{justify:"flex-end",children:[" ",(0,t.jsx)(w.Z,{children:r})]})},onReset:function(){se(null),j({type:"openModel/getOpenModal",payload:!1})}},onFinish:function(){var L=D()(x()().mark(function i(r){var p,Z;return x()().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:if(r.province=r.location_arr&&r.location_arr.length>0&&r.location_arr[0]?r.location_arr[0]:0,r.city=r.location_arr&&r.location_arr.length>0&&r.location_arr[1]?r.location_arr[1]:0,r.district=r.location_arr&&r.location_arr.length>0&&r.location_arr[2]?r.location_arr[2]:0,r.street=r.location_arr&&r.location_arr.length>0&&r.location_arr[3]?r.location_arr[3]:0,delete r.location_arr,r.roleids=r.roleids.join(","),console.log(r.roleids),!S){U.next=16;break}return r.id=S,U.next=11,(0,O.sGo)(r);case 11:p=U.sent,B.ZP.success("\u63D0\u4EA4\u6210\u529F"),j({type:"openModel/getOpenModal",payload:!1}),U.next=21;break;case 16:return U.next=18,(0,O.jF5)(r);case 18:Z=U.sent,B.ZP.success("\u63D0\u4EA4\u6210\u529F"),j({type:"openModel/getOpenModal",payload:!1});case 21:case"end":return U.stop()}},i)}));return function(i){return L.apply(this,arguments)}}(),children:(0,t.jsxs)(K.Z,{gutter:[16,16],children:[$?(0,t.jsxs)(h.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:oe}),k?(0,t.jsx)(I.Z,{src:"".concat(a.VO).concat(k),style:{marginLeft:"16px",marginTop:"32px",width:"100px",height:"100px"}}):(0,t.jsx)(I.Z,{src:"".concat(a.VO).concat($==null?void 0:$.cover_img),style:{marginLeft:"16px",marginTop:"32px",width:"100px",height:"100px"}})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(h.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:oe}),k?(0,t.jsxs)(h.Z,{span:8,children:[" ",(0,t.jsx)(I.Z,{src:"".concat(a.VO).concat(k),style:{marginTop:"32px",width:"100px",height:"100px"}})," "]}):""]})}),(0,t.jsx)(h.Z,{span:12,children:(0,t.jsx)(E.Z,{label:"\u624B\u673A\u53F7",name:"mobile",placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7"}]})}),(0,t.jsx)(h.Z,{span:12,children:(0,t.jsx)(E.Z.Password,{label:"\u5BC6\u7801",name:"password",placeholder:"\u8BF7\u8F93\u5165\u5BC6\u7801",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5BC6\u7801"}]})}),(0,t.jsx)(h.Z,{span:12,children:(0,t.jsx)(E.Z.Password,{label:"\u786E\u8BA4\u5BC6\u7801",name:"repassword",placeholder:"\u8BF7\u8F93\u5165\u786E\u8BA4\u5BC6\u7801",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u786E\u8BA4\u5BC6\u7801"}]})}),(0,t.jsx)(h.Z,{span:12,children:(0,t.jsx)(E.Z,{label:"\u6635\u79F0",name:"nickname",placeholder:"\u8BF7\u8F93\u5165\u6635\u79F0"})}),(0,t.jsx)(h.Z,{span:12,children:(0,t.jsx)(E.Z,{label:"\u90AE\u7BB1",name:"email",placeholder:"\u8BF7\u8F93\u5165\u90AE\u7BB1"})}),(0,t.jsx)(h.Z,{span:12,children:(0,t.jsx)(_.Z,{showSearch:!0,name:"roleids",label:"\u9009\u62E9\u89D2\u8272",placeholder:"\u8BF7\u9009\u62E9\u89D2\u8272",fieldProps:{fieldNames:o,mode:"multiple"},request:function(i){return(0,O.ccM)({page:1,pagesize:100,keyword:i.keyWords}).then(function(r){return r.data.roles.filter(function(p){return p.id!==3})})},rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u786E\u8BA4\u5BC6\u7801"}]})}),(0,t.jsx)(h.Z,{span:12,children:(0,t.jsx)(z.Z,{label:"\u9009\u62E9\u793E\u533A",name:"location_arr",fieldProps:{fieldNames:l,options:H.areaList,changeOnSelect:!0},placeholder:"\u4F01\u4E1A\u6240\u5728\u5730\u533A"})})]})})})})})},de=(0,C.connect)(function(R){var d=R.dictModel,j=R.openModel;return{dictModel:d,openModel:j}})(v),le=function(d){var j=d.dispatch,H=d.openModel,P=(0,s.useState)(0),S=g()(P,2),Q=S[0],M=S[1],J=function(Y){M(Y)};return(0,s.useEffect)(function(){H.openModal||M(0)},[H.openModal]),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(y.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:[(0,t.jsx)(c,{getId:J}),(0,t.jsx)(de,{id:Q})]})})},X=(0,C.connect)(function(R){var d=R.openModel;return{openModel:d}})(le)},86250:function(re,W,e){e.d(W,{Z:function(){return I}});var m=e(62435),g=e(93967),s=e.n(g),C=e(98423),y=e(98065),b=e(53124),x=e(92030),G=e(45503);const D=["wrap","nowrap","wrap-reverse"],f=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],F=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],O=(a,n)=>{const o=n.wrap===!0?"wrap":n.wrap;return{[`${a}-wrap-${o}`]:o&&D.includes(o)}},t=(a,n)=>{const o={};return F.forEach(l=>{o[`${a}-align-${l}`]=n.align===l}),o[`${a}-align-stretch`]=!n.align&&!!n.vertical,o},T=(a,n)=>{const o={};return f.forEach(l=>{o[`${a}-justify-${l}`]=n.justify===l}),o};function c(a,n){return s()(Object.assign(Object.assign(Object.assign({},O(a,n)),t(a,n)),T(a,n)))}var u=c;const E=a=>{const{componentCls:n}=a;return{[n]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},_=a=>{const{componentCls:n}=a;return{[n]:{"&-gap-small":{gap:a.flexGapSM},"&-gap-middle":{gap:a.flexGap},"&-gap-large":{gap:a.flexGapLG}}}},z=a=>{const{componentCls:n}=a,o={};return D.forEach(l=>{o[`${n}-wrap-${l}`]={flexWrap:l}}),o},A=a=>{const{componentCls:n}=a,o={};return F.forEach(l=>{o[`${n}-align-${l}`]={alignItems:l}}),o},V=a=>{const{componentCls:n}=a,o={};return f.forEach(l=>{o[`${n}-justify-${l}`]={justifyContent:l}}),o},w=()=>({});var B=(0,x.I$)("Flex",a=>{const{paddingXS:n,padding:o,paddingLG:l}=a,v=(0,G.TS)(a,{flexGapSM:n,flexGap:o,flexGapLG:l});return[E(v),_(v),z(v),A(v),V(v)]},w,{resetStyle:!1}),K=function(a,n){var o={};for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&n.indexOf(l)<0&&(o[l]=a[l]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,l=Object.getOwnPropertySymbols(a);v<l.length;v++)n.indexOf(l[v])<0&&Object.prototype.propertyIsEnumerable.call(a,l[v])&&(o[l[v]]=a[l[v]]);return o},I=m.forwardRef((a,n)=>{const{prefixCls:o,rootClassName:l,className:v,style:de,flex:le,gap:X,children:R,vertical:d=!1,component:j="div"}=a,H=K(a,["prefixCls","rootClassName","className","style","flex","gap","children","vertical","component"]),{flex:P,direction:S,getPrefixCls:Q}=m.useContext(b.E_),M=Q("flex",o),[J,q,Y]=B(M),ee=d!=null?d:P==null?void 0:P.vertical,te=s()(v,l,P==null?void 0:P.className,M,q,Y,u(M,a),{[`${M}-rtl`]:S==="rtl",[`${M}-gap-${X}`]:(0,y.n)(X),[`${M}-vertical`]:ee}),$=Object.assign(Object.assign({},P==null?void 0:P.style),de);return le&&($.flex=le),X&&!(0,y.n)(X)&&($.gap=X),J(m.createElement(j,Object.assign({ref:n,className:te,style:$},(0,C.Z)(H,["justify","wrap","align"])),R))})}}]);