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