"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6840],{45592:function(U,p,e){e.r(p);var P=e(25359),l=e.n(P),f=e(57213),M=e.n(f),v=e(49811),E=e.n(v),O=e(54306),b=e.n(O),j=e(50336),r=e(40882),i=e(61786),B=e(36428),T=e(33045),m=e(93236),C=e(48970),A=e(90627),d=e(23674),_=e(62086),R=A.Z.PermissionController.permissionTree;p.default=function(){var y=(0,d.useLocation)(),g=(0,d.useParams)();console.log(y),console.log(g);var h=(0,m.useRef)(),I=(0,m.useState)([]),D=b()(I,2),u=D[0],L=D[1],K=function(){var s=E()(l()().mark(function n(o){var c,a;return l()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,adminCreate(M()({},o));case 2:c=t.sent,a=c.success,a&&d.history.goBack();case 5:case"end":return t.stop()}},n)}));return function(o){return s.apply(this,arguments)}}();return(0,m.useEffect)(function(){R().then(function(s){var n=s.data;L(n)})},[]),(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(j._z,{children:(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(r.A,{style:{width:800},onFinish:function(){var s=E()(l()().mark(function n(o){return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:console.log(o),K(o);case 2:case"end":return a.stop()}},n)}));return function(n){return s.apply(this,arguments)}}(),formRef:h,submitter:{searchConfig:{submitText:"\u4FDD\u5B58"},resetButtonProps:{style:{display:"none"}},submitButtonProps:{}},children:[(0,_.jsxs)(r.A.Group,{children:[(0,_.jsx)(i.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],width:"md",name:"mobile",label:"\u624B\u673A\u53F7",placeholder:"\u8BF7\u8F93\u5165"}),(0,_.jsx)(i.Z.Password,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],width:"md",name:"password",label:"\u5BC6\u7801",placeholder:"\u8BF7\u8F93\u5165"})]}),(0,_.jsxs)(r.A.Group,{children:[(0,_.jsx)(i.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],width:"md",name:"nickname",label:"\u6635\u79F0",placeholder:"\u8BF7\u8F93\u5165"}),(0,_.jsx)(r.A.Item,{label:"\u5934\u50CF",name:"avatar",children:(0,_.jsx)(C.Z,{fileType:"image",defaultValue:"",count:1,mode:""})})]}),(0,_.jsx)(B.Z.Group,{name:"status",radioType:"button",label:"\u72B6\u6001",options:[{label:"\u6B63\u5E38",value:0},{label:"\u51BB\u7ED3",value:1},{label:"\u7981\u7528",value:2}]}),(0,_.jsx)(r.A.Item,{label:"\u8BBE\u7F6E\u6743\u9650",name:"permission_ids",children:(u==null?void 0:u.length)>0&&(0,_.jsx)(T.Z,{checkable:!0,multiple:!0,showLine:!0,showIcon:!1,defaultExpandAll:!0,onCheck:function(n){h.current.setFieldsValue({permission_ids:n})},fieldNames:{title:"name",key:"id"},treeData:u})})]})})})})}}}]);
