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.

2 lines
4.7 KiB

3 years ago
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[816],{51975:function(q,O,n){"use strict";n.r(O),n.d(O,{default:function(){return L}});var _=n(57663),b=n(71577),v=n(3182),c=n(11849),I=n(93224),C=n(94043),p=n.n(C),R=n(4614);function P(a,r){return y.apply(this,arguments)}function y(){return y=(0,v.Z)(p().mark(function a(r,t){return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,R.WY)("/api/luigi/author/seek",(0,c.Z)({method:"GET",params:(0,c.Z)({},r)},t||{})));case 1:case"end":return e.stop()}},a)})),y.apply(this,arguments)}var m=n(67294),ee=n(43358),G=n(34041),te=n(20228),U=n(11382),$=n(57337),A=n(23279),F=n.n(A),h=n(85893);function B(a){var r=a.fetchOptions,t=a.debounceTimeout,u=t===void 0?800:t,e=a.initOption,i=(0,I.Z)(a,["fetchOptions","debounceTimeout","initOption"]),d=m.useState(!1),l=(0,$.Z)(d,2),f=l[0],o=l[1],s=[],g=null;if(e&&typeof e=="string"){var j=JSON.parse(e);s.push(j),g=j.value}var Y=m.useState(s),x=(0,$.Z)(Y,2),w=x[0],E=x[1],Z=m.useRef(0),M=m.useMemo(function(){var H=function(Q){Z.current+=1;var X=Z.current;E([]),o(!0),r(Q).then(function(k){X===Z.current&&(E(k),o(!1))})};return F()(H,u)},[r,u]);return(0,h.jsx)(G.Z,(0,c.Z)((0,c.Z)({showSearch:!0,labelInValue:!0,filterOption:!1,defaultValue:g,onSearch:M,notFoundContent:f?(0,h.jsx)(U.Z,{size:"small"}):null},i),{},{options:w}))}var D=B,z=function(r){return(0,h.jsx)(D,{initOption:r.value,fetchOptions:function(){var t=(0,v.Z)(p().mark(function u(e){var i,d,l;return p().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,P({name:e});case 2:if(d=o.sent,!((i=d.data)!==null&&i!==void 0&&i.list)){o.next=5;break}return o.abrupt("return",(l=d.data.list)===null||l===void 0?void 0:l.map(function(s){var g={label:s.name,value:s.id,key:s.id};return g}));case 5:return o.abrupt("return",void 0);case 6:case"end":return o.stop()}},u)}));return function(u){return t.apply(this,arguments)}}(),onChange:function(u){r.onChange(u)},style:{width:"100%"}})},W=z;function ne(a,r){return S.apply(this,arguments)}function S(){return S=_asyncToGenerator(_regeneratorRuntime.mark(function a(r,t){return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/api/luigi/poem/detail",_objectSpread({method:"GET",params:_objectSpread({},r)},t||{})));case 1:case"end":return e.stop()}},a)})),S.apply(this,arguments)}function N(a,r){return T.apply(this,arguments)}function T(){return T=(0,v.Z)(p().mark(function a(r,t){return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,R.WY)("/api/luigi/poem/list",(0,c.Z)({method:"POST",headers:{"Content-Type":"application/json"},data:r},t||{})));case 1:case"end":return e.stop()}},a)})),T.apply(this,arguments)}var V=n(49101),J=n(99542),K=[{dataIndex:"index",valueType:"indexBorder",width:48},{title:"\u6807\u9898",dataIndex:"title",ellipsis:!0,hideInSearch:!0,tip:"\u6807\u9898\u8FC7\u957F\u4F1A\u81EA\u52A8\u6536\u7F29",formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u72B6\u6001",dataIndex:"status",valueType:"select",valueEnum:{0:{text:"\u672A\u6821\u51C6",status:"Error"},1:{text:"\u5DF2\u6821\u51C6",status:"Success"}}},{title:"\u4F5C\u8005",dataIndex:"authorName",hideInSearch:!0},{title:"\u4F5C\u8005",dataIndex:"author",hideInTable:!0,formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]},renderFormItem:function(r,t){var u=t.type,e=t.defaultRender,i=(0,I.Z)(t,["type","defaultRender"]);return(0,h.jsx)(W,(0,c.Z)({},i))}},{title:"\u9996\u884C",dataIndex:"line",hideInSearch:!0}],L=function(){var a=(0,m.useRef)();return(0,h.jsx)(J.ZP,{columns:K,actionRef:a,cardBordered:!0,request:(0,v.Z)(p().mark(function r(){var t,u,e,i,d,l,f=arguments;return p().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return e=f.length>0&&f[0]!==void 0?f[0]:{},i=[],e.author&&(d=e.author,typeof e.author=="string"&&(d=JSON.parse(e.author)),i.push({key:"authorId",val:d.value})),e.status&&i.push({key:"status",val:e.status}),s.next=6,N({current:e.current