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.943f28ef.async.js 11KB

1
  1. "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[597],{8214:function(ne,A,e){var m=e(1413),c=e(45987),n=e(62435),f=e(66758),E=e(34176),B=e(86074),h=["fieldProps","request","params","proFieldProps"],U=function(p,y){var $=p.fieldProps,s=p.request,t=p.params,i=p.proFieldProps,l=(0,c.Z)(p,h),Z=(0,n.useContext)(f.Z);return(0,B.jsx)(E.Z,(0,m.Z)({valueType:"cascader",fieldProps:(0,m.Z)({getPopupContainer:Z.getPopupContainer},$),ref:y,request:s,params:t,filedConfig:{customLightMode:!0},proFieldProps:i},l))};A.Z=n.forwardRef(U)},64317:function(ne,A,e){var m=e(1413),c=e(45987),n=e(22270),f=e(62435),E=e(66758),B=e(34176),h=e(86074),U=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],R=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],p=function(l,Z){var M=l.fieldProps,L=l.children,O=l.params,W=l.proFieldProps,K=l.mode,I=l.valueEnum,S=l.request,_=l.showSearch,u=l.options,P=(0,c.Z)(l,U),D=(0,f.useContext)(E.Z);return(0,h.jsx)(B.Z,(0,m.Z)((0,m.Z)({valueEnum:(0,n.h)(I),request:S,params:O,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,m.Z)({options:u,mode:K,showSearch:_,getPopupContainer:D.getPopupContainer},M),ref:Z,proFieldProps:W},P),{},{children:L}))},y=f.forwardRef(function(i,l){var Z=i.fieldProps,M=i.children,L=i.params,O=i.proFieldProps,W=i.mode,K=i.valueEnum,I=i.request,S=i.options,_=(0,c.Z)(i,R),u=(0,m.Z)({options:S,mode:W||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label"},Z),P=(0,f.useContext)(E.Z);return(0,h.jsx)(B.Z,(0,m.Z)((0,m.Z)({valueEnum:(0,n.h)(K),request:I,params:L,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,m.Z)({getPopupContainer:P.getPopupContainer},u),ref:l,proFieldProps:O},_),{},{children:M}))}),$=f.forwardRef(p),s=y,t=$;t.SearchSelect=s,t.displayName="ProFormComponent",A.Z=t},67119:function(ne,A,e){var m=e(5574),c=e.n(m),n=e(62435),f=e(59530),E=e(55375),B=e(42075),h=e(68872),U=e(98163),R=e(32443),p=e(86074),y=function(s){var t=s.onUploadComplete,i=s.uploadTxt,l=s.image_type,Z=s.form_name,M=s.image_length,L=s.multiple,O=s.imageUrl,W=function(P){P&&t(P)},K=(0,n.useState)(O),I=c()(K,2),S=I[0],_=I[1];return(0,n.useEffect)(function(){_(O)},[O]),(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)(B.Z,{children:[(0,p.jsx)(R.Z,{label:i,name:Z,icon:null,title:i,fieldProps:{maxCount:M,multiple:L,fileList:[],listType:"picture-card",showUploadList:!1,customRequest:function(P){var D=new FormData;D.append("image",P.file),console.log(D),(0,f.request)(E.FH+"/common/image/upload?imgtype="+l,{method:"post",data:D,Headers:{Authorization:sessionStorage.getItem("token"),"X-Requested-With":null}}).then(function(b){_(b.data.filename),W(b.data.filename)}).catch(function(b){console.log(b),h.ZP.error("\u4E0A\u4F20\u5931\u8D25")})}}}),S&&(0,p.jsx)(U.Z,{src:"".concat(E.VO).concat(S),width:102,height:102,style:{borderRadius:8}})]})})};A.Z=y},22271:function(ne,A,e){e.r(A),e.d(A,{default:function(){return me}});var m=e(5574),c=e.n(m),n=e(62435),f=e(59530),E=e(28459),B=e(15009),h=e.n(B),U=e(99289),R=e.n(U),p=e(95338),y=e(14726),$=e(86738),s=e(39680),t=e(86074),i=function(d){var x=d.dispatch,z=d.openModel,G=d.getId,g=(0,n.useRef)(),Q=(0,n.useState)([]),N=c()(Q,2),H=N[0],q=N[1],Y=(0,n.useState)(0),ee=c()(Y,2),te=ee[0],X=ee[1],ae=(0,n.useState)(1),oe=c()(ae,2),w=oe[0],V=oe[1],re=(0,n.useState)(10),k=c()(re,2),C=k[0],o=k[1],a=function(v){G(v)};return(0,n.useEffect)(function(){z.openModal||g.current.reload()},[z.openModal]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(E.ZP,{theme:{token:{colorPrimary:"#4FBE70",colorLink:"#4FBE70"}},children:(0,t.jsx)(p.Z,{scroll:{y:480,x:"auto"},bordered:!0,actionRef:g,dataSource:H,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(v,F,j){return[(0,t.jsx)(y.ZP,{type:"link",onClick:function(){a(F.id),x({type:"openModel/getOpenModal",payload:!0})},children:"\u7F16\u8F91"},"1"),(0,t.jsx)($.Z,{title:"\u662F\u5426\u5220\u9664",onConfirm:function(le){PostActivityaddressDel({id:F.id}).then(function(he){var se;message.success("\u5220\u9664\u6210\u529F"),(se=g.current)===null||se===void 0||se.reload()})},okText:"\u5220\u9664",cancelText:"\u53D6\u6D88",children:(0,t.jsx)(y.ZP,{danger:!0,type:"link",children:"\u5220\u9664"})})]}}],rowKey:"id",pagination:{current:w,pageSize:C,showSizeChanger:!0,total:te,pageSizeOptions:[9,18,27,99],onChange:function(v,F){V(v),o(F)},onShowSizeChange:function(v,F){V(v),o(F)}},request:R()(h()().mark(function r(){var v,F=arguments;return h()().wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return v=F.length>0&&F[0]!==void 0?F[0]:{},J.abrupt("return",(0,s.D05)({page:w,pagesize:C,sort:"id",sortby:"desc",keyword:v.mobile}).then(function(le){q(le.data.users),X(le.data.total)}));case 2:case"end":return J.stop()}},r)})),headerTitle:"\u8D26\u53F7\u5217\u8868",toolBarRender:function(){return[(0,t.jsx)(y.ZP,{type:"primary",onClick:function(){x({type:"openModel/getOpenModal",payload:!0})},children:"\u6DFB\u52A0\u8D26\u53F7"})]}})})})},l=(0,f.connect)(function(T){var d=T.openModel;return{openModel:d}})(i),Z=e(97269),M=e(5966),L=e(64317),O=e(8214),W=e(17788),K=e(86250),I=e(42075),S=e(68872),_=e(71230),u=e(15746),P=e(98163),D=e(55375),b=e(67119),ie={label:"name",value:"id"},de={label:"name",value:"id",children:"children"},ue=function(d){var x=d.dispatch,z=d.dictModel,G=d.openModel,g=d.id,Q=(0,n.useRef)(),N=(0,n.useState)(!1),H=c()(N,2),q=H[0],Y=H[1],ee=(0,n.useState)(null),te=c()(ee,2),X=te[0],ae=te[1];(0,n.useEffect)(function(){Y(G.openModal)},[G.openModal]);var oe=(0,n.useState)(""),w=c()(oe,2),V=w[0],re=w[1],k=function(o){re(o)};return(0,n.useEffect)(function(){x({type:"dictModel/getList",payload:{code:2009,type:"setAreaList"}})},[]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(E.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:(0,t.jsx)(W.Z,{open:q,title:g?"\u7F16\u8F91\u8D26\u53F7":"\u6DFB\u52A0\u8D26\u53F7",centered:!0,maskClosable:!1,footer:null,destroyOnClose:!0,width:1e3,onCancel:function(){x({type:"openModel/getOpenModal",payload:!1})},children:(0,t.jsx)(Z.A,{formRef:Q,request:R()(h()().mark(function C(){var o;return h()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!g){r.next=10;break}return r.next=3,(0,s.nEl)({id:g});case 3:return o=r.sent,o.data.location_arr=[o.data.province?o.data.province:0,o.data.city?o.data.city:0,o.data.district?o.data.district:0,o.data.street?o.data.street:0],o.data.roleids=o.data.roleids.length>0?o.data.roleids.split(",").map(Number):[],ae(o.data),r.abrupt("return",o.data);case 10:return r.abrupt("return",{mobile:"",password:"",repassword:"",nickname:"",avatar:"",email:"",roleids:[]});case 11:case"end":return r.stop()}},C)})),submitter:{searchConfig:{resetText:"\u53D6\u6D88",submitText:"\u4FDD\u5B58"},render:function(o,a){return(0,t.jsxs)(K.Z,{justify:"flex-end",children:[" ",(0,t.jsx)(I.Z,{children:a})]})},onReset:function(){ae(null),x({type:"openModel/getOpenModal",payload:!1})}},onFinish:function(){var C=R()(h()().mark(function o(a){var r,v;return h()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(a.province=a.location_arr&&a.location_arr.length>0&&a.location_arr[0]?a.location_arr[0]:0,a.city=a.location_arr&&a.location_arr.length>0&&a.location_arr[1]?a.location_arr[1]:0,a.district=a.location_arr&&a.location_arr.length>0&&a.location_arr[2]?a.location_arr[2]:0,a.street=a.location_arr&&a.location_arr.length>0&&a.location_arr[3]?a.location_arr[3]:0,delete a.location_arr,a.roleids=a.roleids.join(","),console.log(a.roleids),!g){j.next=16;break}return a.id=g,j.next=11,(0,s.sGo)(a);case 11:r=j.sent,S.ZP.success("\u63D0\u4EA4\u6210\u529F"),x({type:"openModel/getOpenModal",payload:!1}),j.next=21;break;case 16:return j.next=18,(0,s.jF5)(a);case 18:v=j.sent,S.ZP.success("\u63D0\u4EA4\u6210\u529F"),x({type:"openModel/getOpenModal",payload:!1});case 21:case"end":return j.stop()}},o)}));return function(o){return C.apply(this,arguments)}}(),children:(0,t.jsxs)(_.Z,{gutter:[16,16],children:[X?(0,t.jsxs)(u.Z,{span:24,style:{display:"flex"},children:[(0,t.jsx)(b.Z,{multiple:!1,form_name:"cover_img",image_length:1,uploadTxt:"\u4E0A\u4F20\u5C01\u9762\u56FE",image_type:3,onUploadComplete:k}),V?(0,t.jsx)(P.Z,{src:"".concat(D.VO).concat(V),style:{marginLeft:"16px",marginTop:"32px",width:"100px",height:"100px"}}):(0,t.jsx)(P.Z,{src:"".concat(D.VO).concat(X==null?void 0:X.cover_img),style:{marginLeft:"16px",marginTop:"32px",width:"100px",height:"100px"}})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(u.Z,{span:24,style:{display:"flex"},children:[(0,t.jsx)(b.Z,{multiple:!1,form_name:"cover_img",image_length:1,uploadTxt:"\u4E0A\u4F20\u5C01\u9762\u56FE",image_type:3,onUploadComplete:k}),V?(0,t.jsxs)(u.Z,{span:8,children:[" ",(0,t.jsx)(P.Z,{src:"".concat(D.VO).concat(V),style:{marginTop:"32px",width:"100px",height:"100px"}})," "]}):""]})}),(0,t.jsx)(u.Z,{span:12,children:(0,t.jsx)(M.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)(u.Z,{span:12,children:(0,t.jsx)(M.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)(u.Z,{span:12,children:(0,t.jsx)(M.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)(u.Z,{span:12,children:(0,t.jsx)(M.Z,{label:"\u6635\u79F0",name:"nickname",placeholder:"\u8BF7\u8F93\u5165\u6635\u79F0"})}),(0,t.jsx)(u.Z,{span:12,children:(0,t.jsx)(M.Z,{label:"\u90AE\u7BB1",name:"email",placeholder:"\u8BF7\u8F93\u5165\u90AE\u7BB1"})}),(0,t.jsx)(u.Z,{span:12,children:(0,t.jsx)(L.Z,{showSearch:!0,name:"roleids",label:"\u9009\u62E9\u89D2\u8272",placeholder:"\u8BF7\u9009\u62E9\u89D2\u8272",fieldProps:{fieldNames:ie,mode:"multiple"},request:function(o){return(0,s.ccM)({page:1,pagesize:100,keyword:o.keyWords}).then(function(a){return a.data.roles.filter(function(r){return r.id!==3})})},rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u786E\u8BA4\u5BC6\u7801"}]})}),(0,t.jsx)(u.Z,{span:12,children:(0,t.jsx)(O.Z,{label:"\u9009\u62E9\u793E\u533A",name:"location_arr",fieldProps:{fieldNames:de,options:z.areaList,changeOnSelect:!0},placeholder:"\u4F01\u4E1A\u6240\u5728\u5730\u533A"})})]})})})})})},ce=(0,f.connect)(function(T){var d=T.dictModel,x=T.openModel;return{dictModel:d,openModel:x}})(ue),pe=function(d){var x=d.dispatch,z=d.openModel,G=(0,n.useState)(0),g=c()(G,2),Q=g[0],N=g[1],H=function(Y){N(Y)};return(0,n.useEffect)(function(){z.openModal||N(0)},[z.openModal]),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(E.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:[(0,t.jsx)(l,{getId:H}),(0,t.jsx)(ce,{id:Q})]})})},me=(0,f.connect)(function(T){var d=T.openModel;return{openModel:d}})(pe)}}]);