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__Permission__Account__index.77e0798e.async.js 15KB

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