nili
8 months ago
12 changed files with 136 additions and 120 deletions
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@ |
|||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[39],{84702:function(Q,v,e){e.r(v);var j=e(15009),d=e.n(j),P=e(99289),p=e.n(P),A=e(5574),m=e.n(A),x=e(90930),I=e(85601),U=e(35312),s=e(8232),C=e(55241),T=e(10397),B=e(14726),R=e(17788),i=e(96365),E=e(67294),h=e(48357),n=e(85893),W=function(){var b=(0,E.useState)(!1),f=m()(b,2),K=f[0],u=f[1],L=s.Z.useForm(),y=m()(L,1),o=y[0],Z=(0,E.useState)([]),M=m()(Z,2),F=M[0],S=M[1],g=(0,U.useModel)("@@initialState"),c=g.initialState,l=c==null?void 0:c.currentUser,$=l&&l.role&&l.role<2,G=function(r){o.setFieldsValue(r),u(!0)},O=[{title:"\u5E94\u7528\u540D",dataIndex:"name"},{title:"code",dataIndex:"code"},{title:"\u4E0B\u8F7D\u5730\u5740",dataIndex:"url",renderText:function(r){return(0,n.jsx)(C.Z,{overlayInnerStyle:{padding:0},content:(0,n.jsx)(T.Z,{value:r||"",bordered:!1}),children:(0,n.jsx)("a",{children:r})})}}],N=[].concat(O,[{title:"secret",dataIndex:"secret",ellipsis:!0,copyable:!0},{title:"\u64CD\u4F5C",width:80,renderText:function(r){return(0,n.jsx)("a",{onClick:function(){return G(r)},children:"\u7F16\u8F91"},"edit")}}]),V=function(){o.submit()},z=function(){u(!1)},D=function(){var _=p()(d()().mark(function r(){var t;return d()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,h.ln)();case 2:t=a.sent,t.data&&S(t.data);case 4:case"end":return a.stop()}},r)}));return function(){return _.apply(this,arguments)}}();(0,E.useEffect)(function(){D()},[]);var J=function(){o.resetFields(),u(!0)},X=function(){var _=p()(d()().mark(function r(t){return d()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,(0,h.XJ)(t);case 3:a.next=8;break;case 5:return a.prev=5,a.t0=a.catch(0),a.abrupt("return");case 8:u(!1),D();case 10:case"end":return a.stop()}},r,null,[[0,5]])}));return function(t){return _.apply(this,arguments)}}();return(0,n.jsxs)(x._z,{children:[l&&l.role&&l.role<2&&(0,n.jsx)(B.ZP,{style:{marginBottom:"20px"},onClick:J,children:"\u65B0\u5EFA\u5E94\u7528"}),(0,n.jsx)(I.Z,{search:!1,columns:$?N:O,dataSource:F}),(0,n.jsx)(R.Z,{title:"\u7F16\u8F91",visible:K,onOk:V,onCancel:z,children:(0,n.jsxs)(s.Z,{form:o,onFinish:X,children:[(0,n.jsx)(s.Z.Item,{name:"id",style:{display:"none"},children:(0,n.jsx)(i.Z,{type:"hidden"})}),(0,n.jsx)(s.Z.Item,{name:"code",style:{display:"none"},children:(0,n.jsx)(i.Z,{type:"hidden"})}),(0,n.jsx)(s.Z.Item,{label:"\u5E94\u7528\u540D",name:"name",children:(0,n.jsx)(i.Z,{})}),(0,n.jsx)(s.Z.Item,{label:"\u4E0B\u8F7D\u5730\u5740",name:"url",children:(0,n.jsx)(i.Z,{})})]})})]})};v.default=W}}]); |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue