You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
3.6 KiB
1 lines
3.6 KiB
"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}}]);
|
|
|