(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8054],{95816:function(Ie,H,n){"use strict";n.r(H),n.d(H,{default:function(){return Fe}});var Re=n(57338),ne=n(273),Me=n(57663),N=n(71577),be=n(62350),J=n(24565),S=n(2824),o=n(39428),Te=n(34792),v=n(48086),x=n(3182),te=n(49101),p=n(67294),re=n(28790),ue=n(85224),le=n(16894),se=n(12826),Ee=n(71194),Q=n(50146),Be=n(9715),M=n(55843),we=n(47673),P=n(4107),Oe=n(43358),X=n(34041),t=n(85893),ie=function(a){var d=X.Z.Option,A=X.Z.OptGroup;return(0,t.jsx)(Q.Z,{title:a.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:a.modalVisible,bodyStyle:{padding:"32px 40px 1px 48px"},footer:null,onCancel:function(){a.onCancel()},destroyOnClose:!0,maskClosable:!1,children:(0,t.jsxs)(M.Z,{layout:"horizontal",labelCol:{span:6},preserve:!1,initialValues:a.values,onFinish:a.onFinish,children:[(0,t.jsx)(M.Z.Item,{name:"id",hidden:!0,children:(0,t.jsx)(P.Z,{})}),(0,t.jsx)(M.Z.Item,{name:"name",label:"\u4F01\u4E1A\u540D\u79F0",rules:[{required:!0,max:30}],children:(0,t.jsx)(P.Z,{placeholder:"\u8BF7\u8F93\u5165\u4F01\u4E1A\u540D\u79F0"})}),(0,t.jsx)(M.Z.Item,{name:"adminName",label:"\u7BA1\u7406\u5458\u59D3\u540D",rules:[{required:!0,max:20}],children:(0,t.jsx)(P.Z,{placeholder:"\u8BF7\u8F93\u5165\u7BA1\u7406\u5458\u59D3\u540D"})}),(0,t.jsx)(M.Z.Item,{name:"email",label:"\u767B\u9646\u8D26\u53F7(\u624B\u673A\u53F7)",tooltip:"\u521D\u59CB\u5BC6\u7801\u4E3A:123456",rules:[{required:!0,max:50,message:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7"},{pattern:/^1[3-9][0-9]{9}$/,message:"\u624B\u673A\u53F7\u683C\u5F0F\u4E0D\u6B63\u786E"}],children:(0,t.jsx)(P.Z,{placeholder:"\u624B\u673A\u53F7\u662F\u767B\u5F55\u8D26\u6237",disabled:!!a.values.id})}),(0,t.jsx)(M.Z.Item,{name:"remark",label:"\u5907\u6CE8",rules:[{max:100}],children:(0,t.jsx)(P.Z,{placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"})}),(0,t.jsxs)(M.Z.Item,{children:[(0,t.jsx)(N.Z,{htmlType:"button",style:{float:"right",left:10},onClick:a.onCancel,children:"\u53D6\u6D88"}),(0,t.jsx)(N.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})})},oe=ie,Pe=n(13062),de=n(71230),$e=n(89032),ce=n(15746),Ge=n(32157),fe=n(7573),Ve=n(63185),he=n(9676),F=n(48971),j=n(96690),I={companyPage:function(a){return(0,F.WY)((0,j.w)()+"/api/company/companypage",{method:"POST",data:a})},addCompany:function(a){return(0,F.WY)((0,j.w)()+"/api/company/add",{method:"POST",data:a})},updateCompany:function(a){return(0,F.WY)((0,j.w)()+"/api/company/update",{method:"POST",data:a})},removeCompany:function(a){return(0,F.WY)((0,j.w)()+"/api/company/delete",{method:"POST",data:a})},Enable:function(a){return(0,F.WY)((0,j.w)()+"/api/company/enable/?Id=".concat(a),{method:"Get"})},Disable:function(a){return(0,F.WY)((0,j.w)()+"/api/company/disable/?Id=".concat(a),{method:"Get"})},addRoleMenu:function(a){return(0,F.WY)((0,j.w)()+"/api/roles/addorupdatemenurole",{method:"POST",data:a})},GetMenu:function(a){return(0,F.WY)((0,j.w)()+"\u200B/api/menu/menuparmytrees?getType=".concat(a.getType,"&&type=").concat(a.type),{method:"Get"})},GetRoleMenu:function(a){return(0,F.WY)((0,j.w)()+"/api/roles/getmenurole/?RoleId=".concat(a))},menutreepage:function(a){return(0,F.WY)((0,j.w)()+"/api\u200B/menu/getmenutreepage",{method:"post",data:a})}},me=n(62255),ve=function(a){var d=(0,p.useState)([]),A=(0,S.Z)(d,2),e=A[0],h=A[1],k=(0,p.useState)(),Y=(0,S.Z)(k,2),E=Y[0],B=Y[1],K=(0,p.useState)(!1),R=(0,S.Z)(K,2),b=R[0],D=R[1],L=(0,p.useState)(!1),U=(0,S.Z)(L,2),$=U[0],y=U[1];(0,p.useEffect)((0,x.Z)((0,o.Z)().mark(function c(){var m,l,w;return(0,o.Z)().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:m=[],l=[],me.Z.from(a.values).forEach(function(T){T.isParentMenu||m.push(T.id),T.id!==null&&typeof T.id!="undefined"&&l.push(T)}),B(m),w=a.treeData,G(w)===l.length?(y(!0),D(!1)):(y(!1),a.values.length==0?D(!1):D(!0)),h(w);case 7:case"end":return O.stop()}},c)})),[a.modalVisible]);function G(c){for(var m=c.length,l=0;l0&&(0,t.jsx)(ue.Z,{extra:(0,t.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,t.jsx)("a",{style:{fontWeight:600},children:l.length})," ","\u9879 \xA0\xA0"]}),children:(0,t.jsx)(J.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){var u,r;Ze(l),w([]),(u=y.current)===null||u===void 0||(r=u.reloadAndRest)===null||r===void 0||r.call(u)},onCancel:function(){},children:(0,t.jsx)("a",{href:"#",children:"\u6279\u91CF\u5220\u9664"})},"primary")}),(0,t.jsx)(oe,{onFinish:function(){var f=(0,x.Z)((0,o.Z)().mark(function u(r){var g,C;return(0,o.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(C=!1,!r.id){s.next=7;break}return s.next=4,Ce(r);case 4:C=s.sent,s.next=11;break;case 7:return r.phone=r.email,s.next=10,ye(r);case 10:C=s.sent;case 11:C&&(e(!1),V(void 0),y.current&&y.current.reload()),(g=y.current)===null||g===void 0||g.reload();case 13:case"end":return s.stop()}},u)}));return function(u){return f.apply(this,arguments)}}(),onCancel:function(){e(!1),b({})},modalVisible:A,values:R||{}}),R&&Object.keys(R).length?(0,t.jsx)(pe,{treeData:T,onSubmit:function(){var f=(0,x.Z)((0,o.Z)().mark(function u(r){var g,C;return(0,o.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return g={sysRoleId:R.sysRoleId,sysMenuId:r},s.next=3,ge(g);case 3:C=s.sent,C&&(E(!1),b({}),y.current&&y.current.reload());case 5:case"end":return s.stop()}},u)}));return function(u){return f.apply(this,arguments)}}(),onCancel:function(){E(!1),b({})},modalVisible:Y,values:Ae||{},datas:R||{}}):null,(0,t.jsx)(ne.Z,{width:600,visible:U,onClose:function(){V(void 0),$(!1)},closable:!1,children:(Z==null?void 0:Z.name)&&(0,t.jsx)(se.ZP,{column:2,title:Z==null?void 0:Z.name,request:(0,x.Z)((0,o.Z)().mark(function f(){return(0,o.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",{data:Z||{}});case 1:case"end":return r.stop()}},f)})),params:{id:Z==null?void 0:Z.name},columns:ee})})]})},Fe=Se}}]);