nili
8 months ago
8 changed files with 71 additions and 8 deletions
File diff suppressed because one or more lines are too long
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(H,p,e){e.r(p);var j=e(15009),u=e.n(j),P=e(99289),v=e.n(P),A=e(5574),m=e.n(A),U=e(90930),C=e(85601),T=e(35312),t=e(8232),x=e(10397),I=e(14726),B=e(17788),i=e(96365),E=e(67294),f=e(48357),r=e(85893),b=function(){var R=(0,E.useState)(!1),h=m()(R,2),W=h[0],d=h[1],K=t.Z.useForm(),L=m()(K,1),o=L[0],y=(0,E.useState)([]),M=m()(y,2),F=M[0],Z=M[1],S=(0,T.useModel)("@@initialState"),c=S.initialState,l=c==null?void 0:c.currentUser,g=l&&l.role&&l.role<2,$=function(_){o.setFieldsValue(_),d(!0)},O=[{title:"\u6E38\u620F",dataIndex:"name"},{title:"\u4E0B\u8F7D\u5730\u5740",dataIndex:"url",renderText:function(_){return(0,r.jsx)(x.Z,{size:120,value:_||"",bordered:!1})}}],z=[].concat(O,[{title:"secret",dataIndex:"secret",ellipsis:!0,copyable:!0},{title:"\u64CD\u4F5C",width:80,renderText:function(_){return(0,r.jsx)("a",{onClick:function(){return $(_)},children:"\u7F16\u8F91"},"edit")}}]),G=function(){o.submit()},N=function(){d(!1)},D=function(){var a=v()(u()().mark(function _(){var s;return u()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,f.ln)();case 2:s=n.sent,s.data&&Z(s.data);case 4:case"end":return n.stop()}},_)}));return function(){return a.apply(this,arguments)}}();(0,E.useEffect)(function(){D()},[]);var V=function(){o.resetFields(),d(!0)},J=function(){var a=v()(u()().mark(function _(s){return u()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,(0,f.XJ)(s);case 3:n.next=8;break;case 5:return n.prev=5,n.t0=n.catch(0),n.abrupt("return");case 8:d(!1),D();case 10:case"end":return n.stop()}},_,null,[[0,5]])}));return function(s){return a.apply(this,arguments)}}();return(0,r.jsxs)(U._z,{children:[l&&l.role&&l.role<2&&(0,r.jsx)(I.ZP,{style:{marginBottom:"20px"},onClick:V,children:"\u65B0\u5EFA\u5E94\u7528"}),(0,r.jsx)(C.Z,{search:!1,columns:g?z:O,dataSource:F}),(0,r.jsx)(B.Z,{title:"\u7F16\u8F91",visible:W,onOk:G,onCancel:N,children:(0,r.jsxs)(t.Z,{form:o,onFinish:J,children:[(0,r.jsx)(t.Z.Item,{name:"id",style:{display:"none"},children:(0,r.jsx)(i.Z,{type:"hidden"})}),(0,r.jsx)(t.Z.Item,{name:"code",style:{display:"none"},children:(0,r.jsx)(i.Z,{type:"hidden"})}),(0,r.jsx)(t.Z.Item,{label:"\u5E94\u7528\u540D",name:"name",children:(0,r.jsx)(i.Z,{})}),(0,r.jsx)(t.Z.Item,{label:"\u4E0B\u8F7D\u5730\u5740",name:"url",children:(0,r.jsx)(i.Z,{})})]})})]})};p.default=b}}]); |
@ -0,0 +1 @@ |
|||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[39],{40110:function(y,o,e){var c=e(1413),s=e(67294),O=e(509),m=e(91146),E=function(D,P){return s.createElement(m.Z,(0,c.Z)((0,c.Z)({},D),{},{ref:P,icon:O.Z}))};E.displayName="SearchOutlined",o.Z=s.forwardRef(E)},84702:function(y,o,e){e.r(o);var c=e(15009),s=e.n(c),O=e(99289),m=e.n(O),E=e(5574),v=e.n(E),D=e(90930),P=e(85601),R=e(35312),i=e(8232),u=e(96365),Z=e(42075),p=e(14726),L=e(71230),A=e(10397),W=e(55241),g=e(17788),M=e(67294),I=e(48357),F=e(40110),n=e(85893),S=function(){var b=(0,M.useState)(!1),x=v()(b,2),$=x[0],f=x[1],z=i.Z.useForm(),N=v()(z,1),h=N[0],G=(0,M.useState)([]),U=v()(G,2),V=U[0],J=U[1],X=(0,R.useModel)("@@initialState"),j=X.initialState,d=j==null?void 0:j.currentUser,H=d&&d.role&&d.role<2,Q=function(r){h.setFieldsValue(r),f(!0)},T=[{title:"\u6E38\u620F",dataIndex:"name",filterDropdown:function(r){var a=r.setSelectedKeys,l=r.selectedKeys,t=r.confirm,ne=r.clearFilters;return(0,n.jsxs)("div",{style:{padding:8},children:[(0,n.jsx)(u.Z,{placeholder:"\u641C\u7D22\u8D26\u53F7",value:l[0],onChange:function(K){return a(K.target.value?[K.target.value]:[])},onPressEnter:function(){return t()},style:{marginBottom:8,display:"block"}}),(0,n.jsxs)(Z.Z,{children:[(0,n.jsx)(p.ZP,{onClick:function(){return t()},type:"primary",children:"\u641C\u7D22"}),(0,n.jsx)(p.ZP,{onClick:function(){return ne()},type:"link",children:"\u6E05\u9664"})]})]})},onFilter:function(r,a){var l;return a==null||(l=a.name)===null||l===void 0?void 0:l.includes(r)},filterIcon:function(r){return(0,n.jsx)(F.Z,{style:{color:r?"#1890ff":void 0},onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0})}},{title:"\u4E0B\u8F7D\u5730\u5740",dataIndex:"url",renderText:function(r){return r&&(0,n.jsxs)(L.Z,{align:"middle",children:[(0,n.jsx)(A.Z,{size:80,value:r||"",bordered:!1}),(0,n.jsx)(W.Z,{overlayInnerStyle:{padding:0},content:(0,n.jsx)(A.Z,{size:300,value:r||"",bordered:!1}),children:(0,n.jsx)("a",{children:"\u67E5\u770B\u5927\u56FE"})})]})}}],Y=[].concat(T,[{title:"secret",dataIndex:"secret",ellipsis:!0,copyable:!0},{title:"\u64CD\u4F5C",width:80,renderText:function(r){return(0,n.jsx)("a",{onClick:function(){return Q(r)},children:"\u7F16\u8F91"},"edit")}}]),k=function(){h.submit()},w=function(){f(!1)},B=function(){var _=m()(s()().mark(function r(){var a;return s()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,I.ln)();case 2:a=t.sent,a.data&&J(a.data);case 4:case"end":return t.stop()}},r)}));return function(){return _.apply(this,arguments)}}();(0,M.useEffect)(function(){B()},[]);var q=function(){h.resetFields(),f(!0)},ee=function(){var _=m()(s()().mark(function r(a){return s()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,I.XJ)(a);case 3:t.next=8;break;case 5:return t.prev=5,t.t0=t.catch(0),t.abrupt("return");case 8:f(!1),B();case 10:case"end":return t.stop()}},r,null,[[0,5]])}));return function(a){return _.apply(this,arguments)}}();return(0,n.jsxs)(D._z,{children:[d&&d.role&&d.role<2&&(0,n.jsx)(p.ZP,{style:{marginBottom:"20px"},onClick:q,children:"\u65B0\u5EFA\u5E94\u7528"}),(0,n.jsx)(P.Z,{search:!1,columns:H?Y:T,dataSource:V}),(0,n.jsx)(g.Z,{title:"\u7F16\u8F91",visible:$,onOk:k,onCancel:w,children:(0,n.jsxs)(i.Z,{form:h,onFinish:ee,children:[(0,n.jsx)(i.Z.Item,{name:"id",style:{display:"none"},children:(0,n.jsx)(u.Z,{type:"hidden"})}),(0,n.jsx)(i.Z.Item,{name:"code",style:{display:"none"},children:(0,n.jsx)(u.Z,{type:"hidden"})}),(0,n.jsx)(i.Z.Item,{label:"\u5E94\u7528\u540D",name:"name",children:(0,n.jsx)(u.Z,{})}),(0,n.jsx)(i.Z.Item,{label:"\u4E0B\u8F7D\u5730\u5740",name:"url",children:(0,n.jsx)(u.Z,{})})]})})]})};o.default=S}}]); |
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue