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.2c73d620.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),d=e(62435),E=e(66758),x=e(16764),W=e(86074),y=["fieldProps","request","params","proFieldProps"],M=function(u,D){var T=u.fieldProps,t=u.request,R=u.params,v=u.proFieldProps,m=(0,p.Z)(u,y),g=(0,d.useContext)(E.Z);return(0,W.jsx)(x.Z,(0,f.Z)({valueType:"cascader",fieldProps:(0,f.Z)({getPopupContainer:g.getPopupContainer},T),ref:D,request:t,params:R,filedConfig:{customLightMode:!0},proFieldProps:v},m))};U.Z=d.forwardRef(M)},64317:function(ae,U,e){var f=e(1413),p=e(45987),d=e(22270),E=e(62435),x=e(66758),W=e(16764),y=e(86074),M=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],F=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],u=function(m,g){var B=m.fieldProps,i=m.children,r=m.params,Z=m.proFieldProps,O=m.mode,K=m.valueEnum,N=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,d.h)(K),request:N,params:r,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,f.Z)({options:C,mode:O,showSearch:_,getPopupContainer:o.getPopupContainer},B),ref:g,proFieldProps:Z},n),{},{children:i}))},D=E.forwardRef(function(v,m){var g=v.fieldProps,B=v.children,i=v.params,r=v.proFieldProps,Z=v.mode,O=v.valueEnum,K=v.request,N=v.options,_=(0,p.Z)(v,F),C=(0,f.Z)({options:N,mode:Z||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label"},g),n=(0,E.useContext)(x.Z);return(0,y.jsx)(W.Z,(0,f.Z)((0,f.Z)({valueEnum:(0,d.h)(O),request:K,params:i,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,f.Z)({getPopupContainer:n.getPopupContainer},C),ref:m,proFieldProps:r},_),{},{children:B}))}),T=E.forwardRef(u),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),d=e(45987),E=e(21770),x=e(23323),W=e(55241),y=e(97435),M=e(62435),F=e(16764),u=e(86074),D=["fieldProps","proFieldProps"],T=["fieldProps","proFieldProps"],t="text",R=function(i){var r=i.fieldProps,Z=i.proFieldProps,O=(0,d.Z)(i,D);return(0,u.jsx)(F.Z,(0,p.Z)({valueType:t,fieldProps:r,filedConfig:{valueType:t},proFieldProps:Z},O))},v=function(i){var r=(0,E.Z)(i.open||!1,{value:i.open,onChange:i.onOpenChange}),Z=(0,f.Z)(r,2),O=Z[0],K=Z[1];return(0,u.jsx)(x.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(_){var C,n=_.getFieldValue(i.name||[]);return(0,u.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,u.jsxs)("div",{style:{padding:"4px 0"},children:[(C=i.statusRender)===null||C===void 0?void 0:C.call(i,n),i.strengthText?(0,u.jsx)("div",{style:{marginTop:10},children:(0,u.jsx)("span",{children:i.strengthText})}):null]}),overlayStyle:{width:240},placement:"rightTop"},i.popoverProps),{},{open:O,children:i.children}))}})},m=function(i){var r=i.fieldProps,Z=i.proFieldProps,O=(0,d.Z)(i,T),K=(0,M.useState)(!1),N=(0,f.Z)(K,2),_=N[0],C=N[1];return r!=null&&r.statusRender&&O.name?(0,u.jsx)(v,{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,u.jsx)("div",{children:(0,u.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,u.jsx)(F.Z,(0,p.Z)({valueType:"password",fieldProps:r,proFieldProps:Z,filedConfig:{valueType:t}},O))},g=R;g.Password=m,g.displayName="ProFormComponent",U.Z=g},67119:function(ae,U,e){var f=e(59530),p=e(55375),d=e(68872),E=e(32443),x=e(86074),W=function(M){var F=M.onUploadComplete,u=M.uploadTxt,D=M.image_type,T=M.form_name,t=M.image_length,R=M.multiple,v=function(g){F&&F(g)};return(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(E.Z,{label:u,name:T,icon:null,title:u,fieldProps:{maxCount:t,multiple:R,fileList:[],listType:"picture-card",showUploadList:!1,customRequest:function(g){var B=new FormData;B.append("image",g.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(i){v(i.data.filename)}).catch(function(i){console.log(i),d.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),d=e(62435),E=e(59530),x=e(28459),W=e(15009),y=e.n(W),M=e(99289),F=e.n(M),u=e(67211),D=e(14726),T=e(39680),t=e(86074),R=function(h){var I=h.dispatch,H=h.openModel,j=h.getId,L=(0,d.useRef)(),Q=(0,d.useState)([]),A=p()(Q,2),J=A[0],q=A[1],Y=(0,d.useState)(0),ee=p()(Y,2),te=ee[0],V=ee[1],se=(0,d.useState)(1),ie=p()(se,2),oe=ie[0],k=ie[1],ue=(0,d.useState)(10),re=p()(ue,2),z=re[0],c=re[1],l=function($){j($)};return(0,d.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)(u.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($,w,G){return[(0,t.jsx)(D.ZP,{type:"link",onClick:function(){l(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($,w){k($),c(w)},onShowSizeChange:function($,w){k($),c(w)}},request:F()(y()().mark(function P(){var $,w=arguments;return y()().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return $=w.length>0&&w[0]!==void 0?w[0]:{},ne.abrupt("return",(0,T.D05)({page:oe,pagesize:z,sort:"id",sortby:"desc",keyword:$.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"})]}})})})},v=(0,E.connect)(function(b){var h=b.openModel;return{openModel:h}})(R),m=e(97269),g=e(5966),B=e(64317),i=e(8214),r=e(17788),Z=e(86250),O=e(42075),K=e(68872),N=e(71230),_=e(15746),C=e(98163),n=e(55375),o=e(67119),a={label:"name",value:"id"},s={label:"name",value:"id",children:"children"},S=function(h){var I=h.dispatch,H=h.dictModel,j=h.openModel,L=h.id,Q=(0,d.useRef)(),A=(0,d.useState)(!1),J=p()(A,2),q=J[0],Y=J[1],ee=(0,d.useState)(null),te=p()(ee,2),V=te[0],se=te[1];(0,d.useEffect)(function(){Y(j.openModal)},[j.openModal]);var ie=(0,d.useState)(""),oe=p()(ie,2),k=oe[0],ue=oe[1],re=function(c){ue(c)};return(0,d.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 c;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 c=P.sent,c.data.location_arr=[c.data.province?c.data.province:0,c.data.city?c.data.city:0,c.data.district?c.data.district:0,c.data.street?c.data.street:0],c.data.roleids=c.data.roleids.length>0?c.data.roleids.split(",").map(Number):[],se(c.data),P.abrupt("return",c.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(c,l){return(0,t.jsxs)(Z.Z,{justify:"flex-end",children:[" ",(0,t.jsx)(O.Z,{children:l})]})},onReset:function(){se(null),I({type:"openModel/getOpenModal",payload:!1})}},onFinish:function(){var z=F()(y()().mark(function c(l){var P,$;return y()().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(l.province=l.location_arr&&l.location_arr.length>0&&l.location_arr[0]?l.location_arr[0]:0,l.city=l.location_arr&&l.location_arr.length>0&&l.location_arr[1]?l.location_arr[1]:0,l.district=l.location_arr&&l.location_arr.length>0&&l.location_arr[2]?l.location_arr[2]:0,l.street=l.location_arr&&l.location_arr.length>0&&l.location_arr[3]?l.location_arr[3]:0,delete l.location_arr,l.roleids=l.roleids.join(","),console.log(l.roleids),!L){G.next=16;break}return l.id=L,G.next=11,(0,T.sGo)(l);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)(l);case 18:$=G.sent,K.ZP.success("\u63D0\u4EA4\u6210\u529F"),I({type:"openModel/getOpenModal",payload:!1});case 21:case"end":return G.stop()}},c)}));return function(c){return z.apply(this,arguments)}}(),children:[(0,t.jsx)(g.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)(g.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)(g.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)(g.Z,{label:"\u6635\u79F0",name:"nickname",placeholder:"\u8BF7\u8F93\u5165\u6635\u79F0"}),(0,t.jsx)(N.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)(g.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(c){return(0,T.ccM)({page:1,pagesize:100,keyword:c.keyWords}).then(function(l){return l.data.roles.filter(function(P){return P.id!==3})})},rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u786E\u8BA4\u5BC6\u7801"}]}),(0,t.jsx)(i.Z,{label:"\u9009\u62E9\u793E\u533A",name:"location_arr",fieldProps:{fieldNames:s,options:H.areaList,changeOnSelect:!0},placeholder:"\u4F01\u4E1A\u6240\u5728\u5730\u533A"})]})})})})},de=(0,E.connect)(function(b){var h=b.dictModel,I=b.openModel;return{dictModel:h,openModel:I}})(S),le=function(h){var I=h.dispatch,H=h.openModel,j=(0,d.useState)(0),L=p()(j,2),Q=L[0],A=L[1],J=function(Y){A(Y)};return(0,d.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)(v,{getId:J}),(0,t.jsx)(de,{id:Q})]})})},X=(0,E.connect)(function(b){var h=b.openModel;return{openModel:h}})(le)},86250:function(ae,U,e){e.d(U,{Z:function(){return C}});var f=e(62435),p=e(93967),d=e.n(p),E=e(98423),x=e(98065),W=e(53124),y=e(92030),M=e(45503);const F=["wrap","nowrap","wrap-reverse"],u=["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(s=>{a[`${n}-align-${s}`]=o.align===s}),a[`${n}-align-stretch`]=!o.align&&!!o.vertical,a},R=(n,o)=>{const a={};return u.forEach(s=>{a[`${n}-justify-${s}`]=o.justify===s}),a};function v(n,o){return d()(Object.assign(Object.assign(Object.assign({},T(n,o)),t(n,o)),R(n,o)))}var m=v;const g=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}}}},i=n=>{const{componentCls:o}=n,a={};return F.forEach(s=>{a[`${o}-wrap-${s}`]={flexWrap:s}}),a},r=n=>{const{componentCls:o}=n,a={};return D.forEach(s=>{a[`${o}-align-${s}`]={alignItems:s}}),a},Z=n=>{const{componentCls:o}=n,a={};return u.forEach(s=>{a[`${o}-justify-${s}`]={justifyContent:s}}),a},O=()=>({});var K=(0,y.I$)("Flex",n=>{const{paddingXS:o,padding:a,paddingLG:s}=n,S=(0,M.TS)(n,{flexGapSM:o,flexGap:a,flexGapLG:s});return[g(S),B(S),i(S),r(S),Z(S)]},O,{resetStyle:!1}),N=function(n,o){var a={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&o.indexOf(s)<0&&(a[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var S=0,s=Object.getOwnPropertySymbols(n);S<s.length;S++)o.indexOf(s[S])<0&&Object.prototype.propertyIsEnumerable.call(n,s[S])&&(a[s[S]]=n[s[S]]);return a},C=f.forwardRef((n,o)=>{const{prefixCls:a,rootClassName:s,className:S,style:de,flex:le,gap:X,children:b,vertical:h=!1,component:I="div"}=n,H=N(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=h!=null?h:j==null?void 0:j.vertical,te=d()(S,s,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))})}}]);