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
7.5 KiB

(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[816],{5966:function(K,I,e){"use strict";var B=e(22122),F=e(81253),O=e(67294),x=e(64837),p=["fieldProps","proFieldProps"],c=["fieldProps","proFieldProps"],P="text",M=function(f){var h=f.fieldProps,E=f.proFieldProps,j=(0,F.Z)(f,p);return O.createElement(x.Z,(0,B.Z)({mode:"edit",valueType:P,fieldProps:h,filedConfig:{valueType:P},proFieldProps:E},j))},d=function(f){var h=f.fieldProps,E=f.proFieldProps,j=(0,F.Z)(f,c);return O.createElement(x.Z,(0,B.Z)({mode:"edit",valueType:"password",fieldProps:h,proFieldProps:E,filedConfig:{valueType:P}},j))},y=M;y.Password=d,y.displayName="ProFormComponent",I.Z=y},86146:function(K,I,e){"use strict";e.r(I),e.d(I,{default:function(){return X}});var B=e(57663),F=e(71577),O=e(62350),x=e(75443),p=e(3182),c=e(11849),P=e(93224),M=e(94043),d=e.n(M),y=e(79667),Z=e(42588),f=e(39750),h=e(67294),E=e(13062),j=e(71230),b=e(89032),R=e(15746),k=e(47673),S=e(4107),q=e(9715),g=e(22712),_=e(34792),L=e(48086),A=e(28991),U={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},w=U,N=e(27029),D=function(l,t){return h.createElement(N.Z,(0,A.Z)((0,A.Z)({},l),{},{ref:t,icon:w}))};D.displayName="MinusCircleOutlined";var V=h.forwardRef(D),Y=e(49101),G=e(71975),z=e(5966),W=e(90672),r=e(85893),H=function(l){var t=(0,h.useRef)();return(0,r.jsxs)(G.a,{title:l.formTitle,formRef:t,layout:"horizontal",trigger:l.trigger,autoFocusFirstInput:!0,drawerProps:{destroyOnClose:!0},onVisibleChange:function(){var m=(0,p.Z)(d().mark(function n(s){var o,a;return d().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(!(!s||!l.poemId)){v.next=2;break}return v.abrupt("return");case 2:return v.next=4,(0,Z.Cn)({id:l.poemId});case 4:o=v.sent,o.data&&((a=t.current)===null||a===void 0||a.setFieldsValue(o.data));case 6:case"end":return v.stop()}},n)}));return function(n){return m.apply(this,arguments)}}(),onFinish:function(){var m=(0,p.Z)(d().mark(function n(s){var o;return d().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,(0,Z.Z6)((0,c.Z)((0,c.Z)({},s),{},{id:l.poemId}));case 2:if(o=u.sent,!o.code){u.next=7;break}return L.default.success("\u63D0\u4EA4\u6210\u529F"),l.refresh&&l.refresh(),u.abrupt("return",!0);case 7:return u.abrupt("return",!1);case 8:case"end":return u.stop()}},n)}));return function(n){return m.apply(this,arguments)}}(),children:[(0,r.jsx)(z.Z,{width:"md",name:"title",label:"\u6807\u9898",placeholder:"\u8BF7\u8F93\u5165"}),(0,r.jsx)(g.Z.Item,{style:{width:"40%"},label:(0,r.jsx)("span",{children:"\u4F5C\u8005"}),name:"authorId",shouldUpdate:!0,children:(0,r.jsx)(y.Z,{})}),(0,r.jsx)(W.Z,{fieldProps:{autoSize:!0},width:"md",name:"content",label:"\u5185\u5BB9",placeholder:"\u8BF7\u8F93\u5165"}),(0,r.jsx)(z.Z,{width:"md",name:"line",label:"\u9996\u884C",placeholder:"\u8BF7\u8F93\u5165"}),(0,r.jsx)(W.Z,{fieldProps:{autoSize:!0},width:"md",name:"translation",label:"\u7FFB\u8BD1",placeholder:"\u8BF7\u8F93\u5165"}),(0,r.jsx)(g.Z.List,{name:"noteList",children:function(n,s,o){var a=s.add,u=s.remove,v=o.errors;return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(g.Z.Item,{label:"\u6CE8\u89E3",required:!1,children:[n.map(function(i){return(0,r.jsxs)(j.Z,{style:{marginBottom:"20px"},justify:"space-between",children:[(0,r.jsx)(R.Z,{span:10,children:(0,r.jsx)(g.Z.Item,(0,c.Z)((0,c.Z)({},i),{},{label:"\u5F15\u6587",name:[i.name,"citation"],validateTrigger:["onChange","onBlur"],rules:[{required:!0,whitespace:!0,message:"\u5F15\u6587\u4E0D\u80FD\u4E3A\u7A7A"}],noStyle:!0,children:(0,r.jsx)(S.Z,{placeholder:"\u5F15\u6587"})}))}),(0,r.jsx)(R.Z,{span:10,children:(0,r.jsx)(g.Z.Item,(0,c.Z)((0,c.Z)({},i),{},{label:"\u6CE8\u91CA",name:[i.name,"annotation"],validateTrigger:["onChange","onBlur"],rules:[{required:!0,whitespace:!0,message:"\u6CE8\u91CA\u4E0D\u80FD\u4E3A\u7A7A"}],noStyle:!0,children:(0,r.jsx)(S.Z,{placeholder:"\u6CE8\u91CA"})}))}),n.length>0?(0,r.jsx)(V,{className:"dynamic-delete-button",onClick:function(){return u(i.name)}}):null]},i.key)}),(0,r.jsxs)(g.Z.Item,{children:[(0,r.jsx)(F.Z,{type:"dashed",onClick:function(){return a()},style:{width:"60%"},icon:(0,r.jsx)(Y.Z,{}),children:"\u6DFB\u52A0\u6CE8\u89E3"}),(0,r.jsx)(g.Z.ErrorList,{errors:v})]})]})})}})]})},$=H,J=e(579),Q=[{dataIndex:"id",title:"id"},{title:"\u6807\u9898",dataIndex:"title",ellipsis:!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:"authorId",hideInTable:!0,formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]},renderFormItem:function(l,t){var m=t.type,n=t.defaultRender,s=(0,P.Z)(t,["type","defaultRender"]);return(0,r.jsx)(y.Z,(0,c.Z)({},s))}},{title:"\u64CD\u4F5C",valueType:"option",key:"option",width:"25%",render:function(l,t,m,n){return[(0,r.jsx)($,{poemId:t.id,formTitle:t.title||"\u7F16\u8F91",trigger:(0,r.jsx)("a",{href:"#",children:"\u7F16\u8F91"}),refresh:function(){return n==null?void 0:n.reload()}},t.id),(0,r.jsx)(J.Z,{originId:t.id,formTitle:t.title||"\u7F16\u8F91",trigger:(0,r.jsx)("a",{href:"#",children:"\u6DFB\u52A0\u91D1\u53E5"})},"add_verse_"+t.id),(0,r.jsx)(x.Z,{title:"\u786E\u5B9A\u5220\u9664\u5417?",onConfirm:(0,p.Z)(d().mark(function s(){return d().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,Z.Z6)({id:t.id,status:-1});case 2:n==null||n.reload();case 3:case"end":return a.stop()}},s)})),okText:"Yes",cancelText:"No",children:(0,r.jsx)("a",{href:"#",children:"\u5220\u9664"})},"delete"+t.id),(0,r.jsx)(x.Z,{title:"\u786E\u5B9A\u6807\u8BB0\u5417?",onConfirm:(0,p.Z)(d().mark(function s(){return d().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,Z.Z6)({id:t.id,status:t.status==0?1:0});case 2:n==null||n.reload();case 3:case"end":return a.stop()}},s)})),okText:"Yes",cancelText:"No",children:(0,r.jsx)("a",{href:"#",children:t.status==0?"\u6821\u51C6":"\u53D6\u6D88\u6821\u51C6"})},"mark_"+t.id)]}}],X=function(){var C=(0,h.useRef)();return(0,r.jsx)(f.ZP,{columns:Q,actionRef:C,cardBordered:!0,request:(0,p.Z)(d().mark(function l(){var t,m,n,s,o,a,u=arguments;return d().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return n=u.length>0&&u[0]!==void 0?u[0]:{},s=[],o=["authorId","title","status","id"],Object.keys(n).forEach(function(T){o.includes(T)&&n[T]&&s.push({key:T,val:n[T]})}),i.next=6,(0,Z.Tg)({current:n.current,pageSize:n.pageSize,query:s});case 6:return a=i.sent,i.abrupt("return",{data:(t=a.data)===null||t===void 0?void 0:t.list,total:(m=a.data)===null||m===void 0?void 0:m.total});case 8:case"end":return i.stop()}},l)})),columnsState:{persistenceKey:"pro-table-singe-demos",persistenceType:"localStorage"},rowKey:"id",search:{labelWidth:"auto"},pagination:{pageSize:20},form:{syncToUrl:function(t,m){return m==="get"?(0,c.Z)((0,c.Z)({},t),{},{created_at:[t.startTime,t.endTime]}):t}},headerTitle:"\u5217\u8868",dateFormatter:"string",toolBarRender:function(){return[(0,r.jsx)($,{trigger:(0,r.jsx)(F.Z,{type:"primary",children:"\u7F16\u8F91"}),formTitle:"\u521B\u5EFA"},"new")]}})}}}]);