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

3 years ago
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[727],{5966:function(K,I,e){"use strict";var p=e(22122),D=e(81253),B=e(67294),l=e(64837),m=["fieldProps","proFieldProps"],R=["fieldProps","proFieldProps"],O="text",E=function(v){var a=v.fieldProps,o=v.proFieldProps,s=(0,D.Z)(v,m);return B.createElement(l.Z,(0,p.Z)({mode:"edit",valueType:O,fieldProps:a,filedConfig:{valueType:O},proFieldProps:o},s))},U=function(v){var a=v.fieldProps,o=v.proFieldProps,s=(0,D.Z)(v,R);return B.createElement(l.Z,(0,p.Z)({mode:"edit",valueType:"password",fieldProps:a,proFieldProps:o,filedConfig:{valueType:O}},s))},T=E;T.Password=U,T.displayName="ProFormComponent",I.Z=T},79667:function(K,I,e){"use strict";var p=e(3182),D=e(57337),B=e(94043),l=e.n(B),m=e(96006),R=e(67294),O=e(9265),E=e(85893),U=function(c){var v=R.useState(),a=(0,D.Z)(v,2),o=a[0],s=a[1];return R.useEffect(function(){if(!!c.value){var f=function(){var h=(0,p.Z)(l().mark(function n(){var Z,M,C,A,r;return l().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return j.next=2,(0,m.l)({id:c.value});case 2:A=j.sent,r={key:(Z=A.data)===null||Z===void 0?void 0:Z.id,label:(M=A.data)===null||M===void 0?void 0:M.name,value:(C=A.data)===null||C===void 0?void 0:C.id},s(r);case 5:case"end":return j.stop()}},n)}));return function(){return h.apply(this,arguments)}}();f()}},[c.value]),c.value&&!o?null:(0,E.jsx)(O.Z,{initOption:o,fetchOptions:function(){var f=(0,p.Z)(l().mark(function h(n){var Z,M,C;return l().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,m.tc)({name:n});case 2:if(M=r.sent,!((Z=M.data)!==null&&Z!==void 0&&Z.list)){r.next=5;break}return r.abrupt("return",(C=M.data.list)===null||C===void 0?void 0:C.map(function(S){var j={label:S.name,value:S.id,key:S.id};return j}));case 5:return r.abrupt("return",void 0);case 6:case"end":return r.stop()}},h)}));return function(h){return f.apply(this,arguments)}}(),onChange:c.onChange,style:{width:"100%"}})};I.Z=U},9265:function(K,I,e){"use strict";var p=e(11849),D=e(43358),B=e(34041),l=e(20228),m=e(11382),R=e(57337),O=e(93224),E=e(23279),U=e.n(E),T=e(67294),c=e(85893);function v(a){var o=a.fetchOptions,s=a.debounceTimeout,f=s===void 0?800:s,h=a.initOption,n=(0,O.Z)(a,["fetchOptions","debounceTimeout","initOption"]),Z=T.useState(!1),M=(0,R.Z)(Z,2),C=M[0],A=M[1],r=[],S=null;h&&(r.push(h),S=h.value);var j=T.useState(r),L=(0,R.Z)(j,2),$=L[0],b=L[1],i=T.useRef(0),t=T.useMemo(function(){var P=function(_){i.current+=1;var g=i.current;b([]),A(!0),o(_).then(function(d){g===i.current&&(b(d),A(!1))})};return U()(P,f)},[o,f]);return(0,c.jsx)(B.Z,(0,p.Z)((0,p.Z)({showSearch:!0,filterOption:!1,defaultValue:S,onSearch:t,notFoundContent:C?(0,c.jsx)(m.Z,{size:"small"}):null},n),{},{options:$}))}I.Z=v},86489:function(K,I,e){"use strict";e.r(I),e.d(I,{default:function(){return $}});var p=e(57663),D=e(71577),B=e(62350),l=e(75443),m=e(3182),R=e(402),O=e(61859),E=e(11849),U=e(47673),T=e(4107),c=e(93224),v=e(94043),a=e.n(v),o=e(79667),s=e(96006),f=e(39750),h=e(67294),n=e(34792),Z=e(48086),M=e(71975),C=e(5966),A=e(90672),r=e(85893),S=function(i){var t=(0,h.useRef)();return(0,r.jsxs)(M.a,{title:i.formTitle,formRef:t,layout:"horizontal",trigger:i.trigger,autoFocusFirstInput:!0,drawerProps:{destroyOnClose:!0},onVisibleChange:function(){var P=(0,m.Z)(a().mark(function u(_){var g,d;return a().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(!(!_||!i.authorId)){F.next=2;break}return F.abrupt("return");case 2:return F.next=4,(0,s.l)({id:i.authorId});case 4:g=F.sent,g.data&&((d=t.current)===null||d===void 0||d.setFieldsValue(g.data));case 6:case"end":return F.stop()}},u)}));return function(u){return P.apply(this,arguments)}}(),onFinish:function(){var P=(0,m.Z)(a().mark(function u(_){var g;return a().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,(0,s.xB)((0,E.Z)((0,E.Z)({},_),{},{id:i.authorId}));case 2:if(g=y.sent,!g.code){y.next=7;break}return Z.default.success("\u63D0\u4EA4\u6210\u529F"),i.refresh&&i.refresh(),y.abrupt("return",!0);case 7:return y.abrupt("return",!1);case 8:case"end":return y.st