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
39 KiB
2 lines
39 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[78],{"500L":function(Pt,tt,d){"use strict";d.d(tt,"a",function(){return Y});var Lt=d("DZo9"),st=d("8z0m"),bt=d("+L6B"),Et=d("2/Rp"),Ot=d("2qtc"),dt=d("kLXV"),ht=d("9og8"),mt=d("k1fw"),yt=d("oBTY"),k=d("miYZ"),G=d("tsqr"),lt=d("tJVT"),et=d("q1tI"),N=d.n(et),at=d("m3rI"),ft=d("wzkS"),F=d("y5JW");function B(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */B=function(){return x};var g,x={},W=Object.prototype,E=W.hasOwnProperty,X=Object.defineProperty||function(e,t,r){e[t]=r.value},V=typeof Symbol=="function"?Symbol:{},R=V.iterator||"@@iterator",rt=V.asyncIterator||"@@asyncIterator",Q=V.toStringTag||"@@toStringTag";function S(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{S({},"")}catch(e){S=function(r,l,m){return r[l]=m}}function K(e,t,r,l){var m=t&&t.prototype instanceof M?t:M,_=Object.create(m.prototype),O=new n(l||[]);return X(_,"_invoke",{value:v(e,r,O)}),_}function H(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(l){return{type:"throw",arg:l}}}x.wrap=K;var T="suspendedStart",C="suspendedYield",I="executing",w="completed",U={};function M(){}function J(){}function $(){}var z={};S(z,R,function(){return this});var q=Object.getPrototypeOf,s=q&&q(q(u([])));s&&s!==W&&E.call(s,R)&&(z=s);var o=$.prototype=M.prototype=Object.create(z);function i(e){["next","throw","return"].forEach(function(t){S(e,t,function(r){return this._invoke(t,r)})})}function y(e,t){function r(m,_,O,A){var j=H(e[m],e,_);if(j.type!=="throw"){var it=j.arg,ct=it.value;return ct&&typeof ct=="object"&&E.call(ct,"__await")?t.resolve(ct.__await).then(function(nt){r("next",nt,O,A)},function(nt){r("throw",nt,O,A)}):t.resolve(ct).then(function(nt){it.value=nt,O(it)},function(nt){return r("throw",nt,O,A)})}A(j.arg)}var l;X(this,"_invoke",{value:function(_,O){function A(){return new t(function(j,it){r(_,O,j,it)})}return l=l?l.then(A,A):A()}})}function v(e,t,r){var l=T;return function(m,_){if(l===I)throw new Error("Generator is already running");if(l===w){if(m==="throw")throw _;return{value:g,done:!0}}for(r.method=m,r.arg=_;;){var O=r.delegate;if(O){var A=h(O,r);if(A){if(A===U)continue;return A}}if(r.method==="next")r.sent=r._sent=r.arg;else if(r.method==="throw"){if(l===T)throw l=w,r.arg;r.dispatchException(r.arg)}else r.method==="return"&&r.abrupt("return",r.arg);l=I;var j=H(e,t,r);if(j.type==="normal"){if(l=r.done?w:C,j.arg===U)continue;return{value:j.arg,done:r.done}}j.type==="throw"&&(l=w,r.method="throw",r.arg=j.arg)}}}function h(e,t){var r=t.method,l=e.iterator[r];if(l===g)return t.delegate=null,r==="throw"&&e.iterator.return&&(t.method="return",t.arg=g,h(e,t),t.method==="throw")||r!=="return"&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),U;var m=H(l,e.iterator,t.arg);if(m.type==="throw")return t.method="throw",t.arg=m.arg,t.delegate=null,U;var _=m.arg;return _?_.done?(t[e.resultName]=_.value,t.next=e.nextLoc,t.method!=="return"&&(t.method="next",t.arg=g),t.delegate=null,U):_:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,U)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function a(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function n(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function u(e){if(e||e===""){var t=e[R];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var r=-1,l=function m(){for(;++r<e.length;)if(E.call(e,r))return m.value=e[r],m.done=!1,m;return m.value=g,m.done=!0,m};return l.next=l}}throw new TypeError(typeof e+" is not iterable")}return J.prototype=$,X(o,"constructor",{value:$,configurable:!0}),X($,"constructor",{value:J,configurable:!0}),J.displayName=S($,Q,"GeneratorFunction"),x.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return!!t&&(t===J||(t.displayName||t.name)==="GeneratorFunction")},x.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,$):(e.__proto__=$,S(e,Q,"GeneratorFunction")),e.prototype=Object.create(o),e},x.awrap=function(e){return{__await:e}},i(y.prototype),S(y.prototype,rt,function(){return this}),x.AsyncIterator=y,x.async=function(e,t,r,l,m){m===void 0&&(m=Promise);var _=new y(K(e,t,r,l),m);return x.isGeneratorFunction(t)?_:_.next().then(function(O){return O.done?O.value:_.next()})},i(o),S(o,Q,"Generator"),S(o,R,function(){return this}),S(o,"toString",function(){return"[object Generator]"}),x.keys=function(e){var t=Object(e),r=[];for(var l in t)r.push(l);return r.reverse(),function m(){for(;r.length;){var _=r.pop();if(_ in t)return m.value=_,m.done=!1,m}return m.done=!0,m}},x.values=u,n.prototype={constructor:n,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(a),!t)for(var r in this)r.charAt(0)==="t"&&E.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=g)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function l(it,ct){return O.type="throw",O.arg=t,r.next=it,ct&&(r.method="next",r.arg=g),!!ct}for(var m=this.tryEntries.length-1;m>=0;--m){var _=this.tryEntries[m],O=_.completion;if(_.tryLoc==="root")return l("end");if(_.tryLoc<=this.prev){var A=E.call(_,"catchLoc"),j=E.call(_,"finallyLoc");if(A&&j){if(this.prev<_.catchLoc)return l(_.catchLoc,!0);if(this.prev<_.finallyLoc)return l(_.finallyLoc)}else if(A){if(this.prev<_.catchLoc)return l(_.catchLoc,!0)}else{if(!j)throw new Error("try statement without catch or finally");if(this.prev<_.finallyLoc)return l(_.finallyLoc)}}}},abrupt:function(t,r){for(var l=this.tryEntries.length-1;l>=0;--l){var m=this.tryEntries[l];if(m.tryLoc<=this.prev&&E.call(m,"finallyLoc")&&this.prev<m.finallyLoc){var _=m;break}}_&&(t==="break"||t==="continue")&&_.tryLoc<=r&&r<=_.finallyLoc&&(_=null);var O=_?_.completion:{};return O.type=t,O.arg=r,_?(this.method="next",this.next=_.finallyLoc,U):this.complete(O)},complete:function(t,r){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&r&&(this.next=r),U},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var l=this.tryEntries[r];if(l.finallyLoc===t)return this.complete(l.completion,l.afterLoc),a(l),U}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var l=this.tryEntries[r];if(l.tryLoc===t){var m=l.completion;if(m.type==="throw"){var _=m.arg;a(l)}return _}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,l){return this.delegate={iterator:u(t),resultName:r,nextLoc:l},this.method==="next"&&(this.arg=g),U}},x}function Y(g){var x=[];return g&&g.length>0&&(x=g.map(function(W){return{uid:W.id,id:W.id,name:W.title+F.c+W.filesize,url:W.url,filesize:W.filesize,status:"done",response:{id:W.id}}})),x}tt.b=function(g){var x=g.value,W=g.onChange,E=g.className,X=g.maxSize,V=X===void 0?150:X,R=g.title,rt=R===void 0?"\u4E0A\u4F20\u9644\u4EF6":R,Q=g.showRemoveModal,S=Q===void 0?!1:Q,K=g.accept,H=K===void 0?"":K,T=g.number,C=T===void 0?1e3:T,I=Object(et.useState)(!1),w=Object(lt.a)(I,2),U=w[0],M=w[1],J=Object(et.useState)([]),$=Object(lt.a)(J,2),z=$[0],q=$[1],s={multiple:!0,disabled:U,accept:H,withCredentials:!0,fileList:x,beforeUpload:function(y,v){var h=y.size/1024/1024;return z.concat(v).length>C?(G.b.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(C,"\u4E2A\u6587\u4EF6")),!1):h<V?!0:(G.b.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(V,"MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20")),!1)},action:"".concat(at.a.API_SERVER,"/api/attachments.json"),onChange:function(y){var v=Object(yt.a)(y.fileList);v.length>=C?M(!0):M(!1),q(Object(yt.a)(v)),v=v.map(function(h){var D;if(h==null||((D=h.response)===null||D===void 0)?void 0:D.id){var a;h.url="/api/attachments/".concat(h==null||((a=h.response)===null||a===void 0)?void 0:a.id)}return h.name.indexOf(F.c)===-1&&(h.name="".concat(h.name).concat(F.c).concat(Object(F.a)(h.size))),Object(mt.a)({},h)}),console.log("info:",y),W(v)},onRemove:function(){var i=Object(ht.a)(B().mark(function v(h){var D;return B().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(D=function(){var u=Object(ht.a)(B().mark(function e(){var t,r;return B().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(t=h.response?h.response.id:h.id,!t){m.next=8;break}return m.next=4,Object(ft.d)(h.response?h.response.id:h.uid);case 4:return r=m.sent,m.abrupt("return",r);case 8:return m.abrupt("return",!0);case 9:case"end":return m.stop()}},e)}));return function(){return u.apply(this,arguments)}}(),!S){n.next=5;break}return n.abrupt("return",new Promise(function(u,e){dt.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:N.a.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:function(){var t=Object(ht.a)(B().mark(function l(){var m;return B().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,D();case 2:m=O.sent,G.b.success("\u5220\u9664\u6210\u529F"),u(!0);case 5:case"end":return O.stop()}},l)}));function r(){return t.apply(this,arguments)}return r}(),onCancel:function(){return u(!1)}})}));case 5:return n.next=7,D();case 7:return n.abrupt("return",n.sent);case 8:case"end":return n.stop()}},v)}));function y(v){return i.apply(this,arguments)}return y}()};function o(i){i.preventDefault(),i.stopPropagation()}return N.a.createElement("div",{className:"multi-upload ".concat(E||"")},N.a.createElement(st.a,s,N.a.createElement(Et.a,{disabled:U,type:"primary",ghost:!0},rt),N.a.createElement("span",{onClick:o,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",V,"M) ")))}},lLeG:function(Pt,tt,d){Pt.exports={bg:"bg___f0e4_",flexRow:"flexRow___1-S6r",flexJustifyCenter:"flexJustifyCenter___3KkrV",flexAlignEnd:"flexAlignEnd___146T7",flexAlignCenter:"flexAlignCenter___2UVve",flexColumn:"flexColumn___nj9sg",formWrap:"formWrap___2eqbH",titleWrap:"titleWrap___1gkN2",fieldWrap:"fieldWrap___2l5q8",mdWrap:"mdWrap___38Ffu",backgroundFa:"backgroundFa___2gBUv",button:"button___3jgMh"}},tt94:function(Pt,tt,d){"use strict";d.r(tt);var Lt=d("+L6B"),st=d("2/Rp"),bt=d("sRBo"),Et=d("kaz8"),Ot=d("14J3"),dt=d("BMrR"),ht=d("jCWc"),mt=d("kPKH"),yt=d("giR+"),k=d("fyUT"),G=d("5NDa"),lt=d("5rEg"),et=d("sPJy"),N=d("bE4q"),at=d("k1fw"),ft=d("miYZ"),F=d("tsqr"),B=d("9og8"),Y=d("y8nQ"),g=d("Vl3Y"),x=d("tJVT"),W=d("q1tI"),E=d.n(W),X=d("9kvl"),V=d("55Ip"),R=d("1vsH"),rt=d("Ot1p"),Q=d("XYT7"),S=d("lLeG"),K=d.n(S),H=d("500L");function T(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */T=function(){return w};var I,w={},U=Object.prototype,M=U.hasOwnProperty,J=Object.defineProperty||function(p,c,f){p[c]=f.value},$=typeof Symbol=="function"?Symbol:{},z=$.iterator||"@@iterator",q=$.asyncIterator||"@@asyncIterator",s=$.toStringTag||"@@toStringTag";function o(p,c,f){return Object.defineProperty(p,c,{value:f,enumerable:!0,configurable:!0,writable:!0}),p[c]}try{o({},"")}catch(p){o=function(f,b,L){return f[b]=L}}function i(p,c,f,b){var L=c&&c.prototype instanceof u?c:u,P=Object.create(L.prototype),Z=new wt(b||[]);return J(P,"_invoke",{value:j(p,f,Z)}),P}function y(p,c,f){try{return{type:"normal",arg:p.call(c,f)}}catch(b){return{type:"throw",arg:b}}}w.wrap=i;var v="suspendedStart",h="suspendedYield",D="executing",a="completed",n={};function u(){}function e(){}function t(){}var r={};o(r,z,function(){return this});var l=Object.getPrototypeOf,m=l&&l(l(_t([])));m&&m!==U&&M.call(m,z)&&(r=m);var _=t.prototype=u.prototype=Object.create(r);function O(p){["next","throw","return"].forEach(function(c){o(p,c,function(f){return this._invoke(c,f)})})}function A(p,c){function f(L,P,Z,ot){var ut=y(p[L],p,P);if(ut.type!=="throw"){var vt=ut.arg,pt=vt.value;return pt&&typeof pt=="object"&&M.call(pt,"__await")?c.resolve(pt.__await).then(function(gt){f("next",gt,Z,ot)},function(gt){f("throw",gt,Z,ot)}):c.resolve(pt).then(function(gt){vt.value=gt,Z(vt)},function(gt){return f("throw",gt,Z,ot)})}ot(ut.arg)}var b;J(this,"_invoke",{value:function(P,Z){function ot(){return new c(function(ut,vt){f(P,Z,ut,vt)})}return b=b?b.then(ot,ot):ot()}})}function j(p,c,f){var b=v;return function(L,P){if(b===D)throw new Error("Generator is already running");if(b===a){if(L==="throw")throw P;return{value:I,done:!0}}for(f.method=L,f.arg=P;;){var Z=f.delegate;if(Z){var ot=it(Z,f);if(ot){if(ot===n)continue;return ot}}if(f.method==="next")f.sent=f._sent=f.arg;else if(f.method==="throw"){if(b===v)throw b=a,f.arg;f.dispatchException(f.arg)}else f.method==="return"&&f.abrupt("return",f.arg);b=D;var ut=y(p,c,f);if(ut.type==="normal"){if(b=f.done?a:h,ut.arg===n)continue;return{value:ut.arg,done:f.done}}ut.type==="throw"&&(b=a,f.method="throw",f.arg=ut.arg)}}}function it(p,c){var f=c.method,b=p.iterator[f];if(b===I)return c.delegate=null,f==="throw"&&p.iterator.return&&(c.method="return",c.arg=I,it(p,c),c.method==="throw")||f!=="return"&&(c.method="throw",c.arg=new TypeError("The iterator does not provide a '"+f+"' method")),n;var L=y(b,p.iterator,c.arg);if(L.type==="throw")return c.method="throw",c.arg=L.arg,c.delegate=null,n;var P=L.arg;return P?P.done?(c[p.resultName]=P.value,c.next=p.nextLoc,c.method!=="return"&&(c.method="next",c.arg=I),c.delegate=null,n):P:(c.method="throw",c.arg=new TypeError("iterator result is not an object"),c.delegate=null,n)}function ct(p){var c={tryLoc:p[0]};1 in p&&(c.catchLoc=p[1]),2 in p&&(c.finallyLoc=p[2],c.afterLoc=p[3]),this.tryEntries.push(c)}function nt(p){var c=p.completion||{};c.type="normal",delete c.arg,p.completion=c}function wt(p){this.tryEntries=[{tryLoc:"root"}],p.forEach(ct,this),this.reset(!0)}function _t(p){if(p||p===""){var c=p[z];if(c)return c.call(p);if(typeof p.next=="function")return p;if(!isNaN(p.length)){var f=-1,b=function L(){for(;++f<p.length;)if(M.call(p,f))return L.value=p[f],L.done=!1,L;return L.value=I,L.done=!0,L};return b.next=b}}throw new TypeError(typeof p+" is not iterable")}return e.prototype=t,J(_,"constructor",{value:t,configurable:!0}),J(t,"constructor",{value:e,configurable:!0}),e.displayName=o(t,s,"GeneratorFunction"),w.isGeneratorFunction=function(p){var c=typeof p=="function"&&p.constructor;return!!c&&(c===e||(c.displayName||c.name)==="GeneratorFunction")},w.mark=function(p){return Object.setPrototypeOf?Object.setPrototypeOf(p,t):(p.__proto__=t,o(p,s,"GeneratorFunction")),p.prototype=Object.create(_),p},w.awrap=function(p){return{__await:p}},O(A.prototype),o(A.prototype,q,function(){return this}),w.AsyncIterator=A,w.async=function(p,c,f,b,L){L===void 0&&(L=Promise);var P=new A(i(p,c,f,b),L);return w.isGeneratorFunction(c)?P:P.next().then(function(Z){return Z.done?Z.value:P.next()})},O(_),o(_,s,"Generator"),o(_,z,function(){return this}),o(_,"toString",function(){return"[object Generator]"}),w.keys=function(p){var c=Object(p),f=[];for(var b in c)f.push(b);return f.reverse(),function L(){for(;f.length;){var P=f.pop();if(P in c)return L.value=P,L.done=!1,L}return L.done=!0,L}},w.values=_t,wt.prototype={constructor:wt,reset:function(c){if(this.prev=0,this.next=0,this.sent=this._sent=I,this.done=!1,this.delegate=null,this.method="next",this.arg=I,this.tryEntries.forEach(nt),!c)for(var f in this)f.charAt(0)==="t"&&M.call(this,f)&&!isNaN(+f.slice(1))&&(this[f]=I)},stop:function(){this.done=!0;var c=this.tryEntries[0].completion;if(c.type==="throw")throw c.arg;return this.rval},dispatchException:function(c){if(this.done)throw c;var f=this;function b(vt,pt){return Z.type="throw",Z.arg=c,f.next=vt,pt&&(f.method="next",f.arg=I),!!pt}for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L],Z=P.completion;if(P.tryLoc==="root")return b("end");if(P.tryLoc<=this.prev){var ot=M.call(P,"catchLoc"),ut=M.call(P,"finallyLoc");if(ot&&ut){if(this.prev<P.catchLoc)return b(P.catchLoc,!0);if(this.prev<P.finallyLoc)return b(P.finallyLoc)}else if(ot){if(this.prev<P.catchLoc)return b(P.catchLoc,!0)}else{if(!ut)throw new Error("try statement without catch or finally");if(this.prev<P.finallyLoc)return b(P.finallyLoc)}}}},abrupt:function(c,f){for(var b=this.tryEntries.length-1;b>=0;--b){var L=this.tryEntries[b];if(L.tryLoc<=this.prev&&M.call(L,"finallyLoc")&&this.prev<L.finallyLoc){var P=L;break}}P&&(c==="break"||c==="continue")&&P.tryLoc<=f&&f<=P.finallyLoc&&(P=null);var Z=P?P.completion:{};return Z.type=c,Z.arg=f,P?(this.method="next",this.next=P.finallyLoc,n):this.complete(Z)},complete:function(c,f){if(c.type==="throw")throw c.arg;return c.type==="break"||c.type==="continue"?this.next=c.arg:c.type==="return"?(this.rval=this.arg=c.arg,this.method="return",this.next="end"):c.type==="normal"&&f&&(this.next=f),n},finish:function(c){for(var f=this.tryEntries.length-1;f>=0;--f){var b=this.tryEntries[f];if(b.finallyLoc===c)return this.complete(b.completion,b.afterLoc),nt(b),n}},catch:function(c){for(var f=this.tryEntries.length-1;f>=0;--f){var b=this.tryEntries[f];if(b.tryLoc===c){var L=b.completion;if(L.type==="throw"){var P=L.arg;nt(b)}return P}}throw new Error("illegal catch attempt")},delegateYield:function(c,f,b){return this.delegate={iterator:_t(c),resultName:f,nextLoc:b},this.method==="next"&&(this.arg=I),n}},w}var C=function(w){var U,M,J=w.shixunHomeworks,$=w.newCourse,z=w.globalSetting,q=w.loading,s=w.dispatch,o=w.match,i=g.a.useForm(),y=Object(x.a)(i,1),v=y[0],h=Object(W.useState)({}),D=Object(x.a)(h,2),a=D[0],n=D[1],u=Object(W.useRef)(),e=J.commonHomeWorkAddDefaultData;Object(W.useEffect)(function(){var r=o.params,l=r.coursesId,m=r.categoryId;s({type:"shixunHomeworks/addCommonHomeWorkDefaultData",payload:{category:m,coursesId:l,type:3}})},[]);var t=function(){var r=Object(B.a)(T().mark(function l(m){var _,O,A,j,it,ct,nt;return T().wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:if(!(a.min_num>a.max_num)){_t.next=3;break}return F.b.info("\u6700\u5927\u4EBA\u6570\u4E0D\u80FD\u5C0F\u4E8E\u6700\u5C0F\u4EBA\u6570"),_t.abrupt("return");case 3:return _=Object(at.a)({},a),_.attachment_ids&&(_.attachment_ids=_==null||((O=_.attachment_ids)===null||O===void 0)?void 0:O.map(function(p){return p.response.id})),_.reference_attachment_ids&&(_.reference_attachment_ids=_==null||((A=_.reference_attachment_ids)===null||A===void 0)?void 0:A.map(function(p){return p.response.id})),j=o.params,it=j.coursesId,ct=j.categoryId,_t.next=9,Object(Q.a)(Object(at.a)(Object(at.a)({coursesId:it,category:ct},_),{},{type:3}));case 9:nt=_t.sent,nt.status===0&&(Object(R.U)(["\u6559\u5B66\u8BFE\u5802","\u5206\u7EC4\u4F5C\u4E1A","\u65B0\u5EFA\u5206\u7EC4\u4F5C\u4E1A"]),X.c.push("/classrooms/".concat(o.params.coursesId,"/group_homework/").concat(nt.homework_id,"/detail")));case 11:case"end":return _t.stop()}},l)}));return function(m){return r.apply(this,arguments)}}();return E.a.createElement("section",{className:K.a.bg},e.course_name&&E.a.createElement("section",{className:"animated fadeIn"},E.a.createElement("aside",{className:"mt10"},e.category&&E.a.createElement(N.a,{separator:">"},E.a.createElement(N.a.Item,null,E.a.createElement(V.Link,{to:"/classrooms/".concat(e.course_id,"/group_homework")},e.course_name)),E.a.createElement(N.a.Item,null,E.a.createElement(V.Link,{to:"/classrooms/".concat(e.course_id,"/group_homework")},e.category.category_name)),E.a.createElement(N.a.Item,null,"\u65B0\u5EFA\u8BE6\u60C5")))),E.a.createElement("aside",{className:"font24 bold mt20 mb20"},"\u65B0\u5EFA\u5206\u7EC4\u4F5C\u4E1A"),E.a.createElement(g.a,{form:v,className:K.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){n(Object(at.a)({},v.getFieldsValue()))},initialValues:{base_on_project:!1},onFinish:t},E.a.createElement("div",{className:K.a.fieldWrap},E.a.createElement(g.a.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},E.a.createElement(lt.a,{maxLength:60,suffix:"".concat(((U=a.name)===null||U===void 0?void 0:U.length)||0,"/60"),placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"}))),E.a.createElement("div",{className:K.a.mdWrap},E.a.createElement(g.a.Item,{name:"description",label:"\u5185\u5BB9:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:5e3,message:"\u4F5C\u4E1A\u7B80\u4ECB\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"}]},E.a.createElement(rt.a,{watch:!0,defaultValue:a.intro})),E.a.createElement("div",null,E.a.createElement(g.a.Item,{name:"attachment_ids"},E.a.createElement(H.b,null))),E.a.createElement(dt.a,{gutter:[20,20]},E.a.createElement(mt.a,{flex:"230px"},E.a.createElement(g.a.Item,{name:"min_num",label:"\u5206\u7EC4\u8BBE\u7F6E",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u6BCF\u7EC4\u6700\u5C0F\u4EBA\u6570"}]},E.a.createElement(k.a,{style:{width:200},min:1,placeholder:"\u8BF7\u586B\u5199\u6BCF\u7EC4\u6700\u5C0F\u4EBA\u6570"}))),E.a.createElement(mt.a,{flex:"230px"},E.a.createElement(g.a.Item,{name:"max_num",label:E.a.createElement("div",null,"\xA0"),rules:[{required:!0,message:"\u8BF7\u586B\u5199\u6BCF\u7EC4\u6700\u5927\u4EBA\u6570"}]},E.a.createElement(k.a,{style:{width:200},max:10,placeholder:"\u8BF7\u586B\u5199\u6BCF\u7EC4\u6700\u5927\u4EBA\u6570"}))),E.a.createElement(mt.a,null,E.a.createElement("div",{className:"mt30"},"\uFF08\u5B66\u751F\u63D0\u4EA4\u4F5C\u54C1\u65F6\u9700\u8981\u5173\u8054\u540C\u7EC4\u6210\u5458\uFF0C\u7EC4\u5185\u6210\u5458\u4F5C\u54C1\u5171\u4EAB\uFF09"))),!(z==null||((M=z.setting)===null||M===void 0)?void 0:M.is_local)&&E.a.createElement(dt.a,null,E.a.createElement(mt.a,null,E.a.createElement(g.a.Item,{name:"base_on_project",valuePropName:"checked"},E.a.createElement(Et.a,{value:!0},"\u57FA\u4E8E\u9879\u76EE\u5B9E\u65BD")),E.a.createElement("span",{className:"c-light-black"},"\uFF08\u9009\u4E2D\uFF0C\u5219\u5FC5\u987B\u5728\u672C\u5E73\u53F0\u521B\u5EFA\u9879\u76EE\uFF0C\u9879\u76EE\u7BA1\u7406\u5458\u53EF\u4EE5\u63D0\u4EA4\u4F5C\u54C1\uFF1B\u4E0D\u9009\u4E2D\uFF0C\u65E0\u9700\u5728\u5E73\u53F0\u521B\u5EFA\u9879\u76EE\uFF0C\u4EFB\u610F\u5C0F\u7EC4\u6210\u5458\u5747\u53EF\u4EE5\u63D0\u4EA4\u4F5C\u54C1\uFF09")))),E.a.createElement("div",{className:K.a.mdWrap},E.a.createElement(g.a.Item,{name:"reference_answer",label:"\u53C2\u8003\u7B54\u6848:"},E.a.createElement(rt.a,{watch:!0,defaultValue:a.notice})),E.a.createElement("div",null,E.a.createElement(g.a.Item,{name:"reference_attachment_ids"},E.a.createElement(H.b,null)))),E.a.createElement("div",{className:K.a.backgroundFa},E.a.createElement("div",{className:"pt40 mb30"},E.a.createElement(g.a.Item,null,E.a.createElement(st.a,{size:"large",type:"primary",className:"".concat(K.a.button," mr20"),htmlType:"submit",loading:q["newCourse/editCourse"]||q["newCourse/submitCourse"]},"\u63D0\u4EA4"),E.a.createElement(st.a,{size:"large",type:"primary",ghost:!0,className:K.a.button,onClick:function(){return X.c.push("/classrooms/".concat(o.params.coursesId,"/group_homework"))}},"\u53D6\u6D88"))))))};tt.default=Object(X.a)(function(I){var w=I.shixunHomeworks,U=I.newCourse,M=I.loading,J=I.globalSetting;return{shixunHomeworks:w,newCourse:U,globalSetting:J,loading:M.effects}})(C)},wzkS:function(Pt,tt,d){"use strict";d.d(tt,"c",function(){return Et}),d.d(tt,"b",function(){return Ot}),d.d(tt,"d",function(){return dt}),d.d(tt,"a",function(){return mt}),d.d(tt,"e",function(){return yt});var Lt=d("9og8"),st=d("ErOA");function bt(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */bt=function(){return G};var k,G={},lt=Object.prototype,et=lt.hasOwnProperty,N=Object.defineProperty||function(s,o,i){s[o]=i.value},at=typeof Symbol=="function"?Symbol:{},ft=at.iterator||"@@iterator",F=at.asyncIterator||"@@asyncIterator",B=at.toStringTag||"@@toStringTag";function Y(s,o,i){return Object.defineProperty(s,o,{value:i,enumerable:!0,configurable:!0,writable:!0}),s[o]}try{Y({},"")}catch(s){Y=function(i,y,v){return i[y]=v}}function g(s,o,i,y){var v=o&&o.prototype instanceof rt?o:rt,h=Object.create(v.prototype),D=new z(y||[]);return N(h,"_invoke",{value:U(s,i,D)}),h}function x(s,o,i){try{return{type:"normal",arg:s.call(o,i)}}catch(y){return{type:"throw",arg:y}}}G.wrap=g;var W="suspendedStart",E="suspendedYield",X="executing",V="completed",R={};function rt(){}function Q(){}function S(){}var K={};Y(K,ft,function(){return this});var H=Object.getPrototypeOf,T=H&&H(H(q([])));T&&T!==lt&&et.call(T,ft)&&(K=T);var C=S.prototype=rt.prototype=Object.create(K);function I(s){["next","throw","return"].forEach(function(o){Y(s,o,function(i){return this._invoke(o,i)})})}function w(s,o){function i(v,h,D,a){var n=x(s[v],s,h);if(n.type!=="throw"){var u=n.arg,e=u.value;return e&&typeof e=="object"&&et.call(e,"__await")?o.resolve(e.__await).then(function(t){i("next",t,D,a)},function(t){i("throw",t,D,a)}):o.resolve(e).then(function(t){u.value=t,D(u)},function(t){return i("throw",t,D,a)})}a(n.arg)}var y;N(this,"_invoke",{value:function(h,D){function a(){return new o(function(n,u){i(h,D,n,u)})}return y=y?y.then(a,a):a()}})}function U(s,o,i){var y=W;return function(v,h){if(y===X)throw new Error("Generator is already running");if(y===V){if(v==="throw")throw h;return{value:k,done:!0}}for(i.method=v,i.arg=h;;){var D=i.delegate;if(D){var a=M(D,i);if(a){if(a===R)continue;return a}}if(i.method==="next")i.sent=i._sent=i.arg;else if(i.method==="throw"){if(y===W)throw y=V,i.arg;i.dispatchException(i.arg)}else i.method==="return"&&i.abrupt("return",i.arg);y=X;var n=x(s,o,i);if(n.type==="normal"){if(y=i.done?V:E,n.arg===R)continue;return{value:n.arg,done:i.done}}n.type==="throw"&&(y=V,i.method="throw",i.arg=n.arg)}}}function M(s,o){var i=o.method,y=s.iterator[i];if(y===k)return o.delegate=null,i==="throw"&&s.iterator.return&&(o.method="return",o.arg=k,M(s,o),o.method==="throw")||i!=="return"&&(o.method="throw",o.arg=new TypeError("The iterator does not provide a '"+i+"' method")),R;var v=x(y,s.iterator,o.arg);if(v.type==="throw")return o.method="throw",o.arg=v.arg,o.delegate=null,R;var h=v.arg;return h?h.done?(o[s.resultName]=h.value,o.next=s.nextLoc,o.method!=="return"&&(o.method="next",o.arg=k),o.delegate=null,R):h:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,R)}function J(s){var o={tryLoc:s[0]};1 in s&&(o.catchLoc=s[1]),2 in s&&(o.finallyLoc=s[2],o.afterLoc=s[3]),this.tryEntries.push(o)}function $(s){var o=s.completion||{};o.type="normal",delete o.arg,s.completion=o}function z(s){this.tryEntries=[{tryLoc:"root"}],s.forEach(J,this),this.reset(!0)}function q(s){if(s||s===""){var o=s[ft];if(o)return o.call(s);if(typeof s.next=="function")return s;if(!isNaN(s.length)){var i=-1,y=function v(){for(;++i<s.length;)if(et.call(s,i))return v.value=s[i],v.done=!1,v;return v.value=k,v.done=!0,v};return y.next=y}}throw new TypeError(typeof s+" is not iterable")}return Q.prototype=S,N(C,"constructor",{value:S,configurable:!0}),N(S,"constructor",{value:Q,configurable:!0}),Q.displayName=Y(S,B,"GeneratorFunction"),G.isGeneratorFunction=function(s){var o=typeof s=="function"&&s.constructor;return!!o&&(o===Q||(o.displayName||o.name)==="GeneratorFunction")},G.mark=function(s){return Object.setPrototypeOf?Object.setPrototypeOf(s,S):(s.__proto__=S,Y(s,B,"GeneratorFunction")),s.prototype=Object.create(C),s},G.awrap=function(s){return{__await:s}},I(w.prototype),Y(w.prototype,F,function(){return this}),G.AsyncIterator=w,G.async=function(s,o,i,y,v){v===void 0&&(v=Promise);var h=new w(g(s,o,i,y),v);return G.isGeneratorFunction(o)?h:h.next().then(function(D){return D.done?D.value:h.next()})},I(C),Y(C,B,"Generator"),Y(C,ft,function(){return this}),Y(C,"toString",function(){return"[object Generator]"}),G.keys=function(s){var o=Object(s),i=[];for(var y in o)i.push(y);return i.reverse(),function v(){for(;i.length;){var h=i.pop();if(h in o)return v.value=h,v.done=!1,v}return v.done=!0,v}},G.values=q,z.prototype={constructor:z,reset:function(o){if(this.prev=0,this.next=0,this.sent=this._sent=k,this.done=!1,this.delegate=null,this.method="next",this.arg=k,this.tryEntries.forEach($),!o)for(var i in this)i.charAt(0)==="t"&&et.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=k)},stop:function(){this.done=!0;var o=this.tryEntries[0].completion;if(o.type==="throw")throw o.arg;return this.rval},dispatchException:function(o){if(this.done)throw o;var i=this;function y(u,e){return D.type="throw",D.arg=o,i.next=u,e&&(i.method="next",i.arg=k),!!e}for(var v=this.tryEntries.length-1;v>=0;--v){var h=this.tryEntries[v],D=h.completion;if(h.tryLoc==="root")return y("end");if(h.tryLoc<=this.prev){var a=et.call(h,"catchLoc"),n=et.call(h,"finallyLoc");if(a&&n){if(this.prev<h.catchLoc)return y(h.catchLoc,!0);if(this.prev<h.finallyLoc)return y(h.finallyLoc)}else if(a){if(this.prev<h.catchLoc)return y(h.catchLoc,!0)}else{if(!n)throw new Error("try statement without catch or finally");if(this.prev<h.finallyLoc)return y(h.finallyLoc)}}}},abrupt:function(o,i){for(var y=this.tryEntries.length-1;y>=0;--y){var v=this.tryEntries[y];if(v.tryLoc<=this.prev&&et.call(v,"finallyLoc")&&this.prev<v.finallyLoc){var h=v;break}}h&&(o==="break"||o==="continue")&&h.tryLoc<=i&&i<=h.finallyLoc&&(h=null);var D=h?h.completion:{};return D.type=o,D.arg=i,h?(this.method="next",this.next=h.finallyLoc,R):this.complete(D)},complete:function(o,i){if(o.type==="throw")throw o.arg;return o.type==="break"||o.type==="continue"?this.next=o.arg:o.type==="return"?(this.rval=this.arg=o.arg,this.method="return",this.next="end"):o.type==="normal"&&i&&(this.next=i),R},finish:function(o){for(var i=this.tryEntries.length-1;i>=0;--i){var y=this.tryEntries[i];if(y.finallyLoc===o)return this.complete(y.completion,y.afterLoc),$(y),R}},catch:function(o){for(var i=this.tryEntries.length-1;i>=0;--i){var y=this.tryEntries[i];if(y.tryLoc===o){var v=y.completion;if(v.type==="throw"){var h=v.arg;$(y)}return h}}throw new Error("illegal catch attempt")},delegateYield:function(o,i,y){return this.delegate={iterator:q(o),resultName:i,nextLoc:y},this.method==="next"&&(this.arg=k),R}},G}function Et(k){return Object(st.c)("libraries/".concat(k,".json"))}function Ot(){return Object(st.c)("library_tags.json")}function dt(k){return ht.apply(this,arguments)}function ht(){return ht=Object(Lt.a)(bt().mark(function k(G){var lt;return bt().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return N.next=2,Object(st.b)("attachments/".concat(G,".json"));case 2:return lt=N.sent,N.abrupt("return",lt.status===0);case 4:case"end":return N.stop()}},k)})),ht.apply(this,arguments)}function mt(k){return Object(st.f)("libraries.json",k)}function yt(k,G){return Object(st.g)("libraries/".concat(k,".json"),G)}},y5JW:function(Pt,tt,d){"use strict";d.d(tt,"c",function(){return at}),d.d(tt,"a",function(){return ft});var Lt=d("DZo9"),st=d("8z0m"),bt=d("+L6B"),Et=d("2/Rp"),Ot=d("9og8"),dt=d("k1fw"),ht=d("oBTY"),mt=d("miYZ"),yt=d("tsqr"),k=d("q1tI"),G=d.n(k),lt=d("m3rI"),et=d("wzkS");function N(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */N=function(){return B};var F,B={},Y=Object.prototype,g=Y.hasOwnProperty,x=Object.defineProperty||function(a,n,u){a[n]=u.value},W=typeof Symbol=="function"?Symbol:{},E=W.iterator||"@@iterator",X=W.asyncIterator||"@@asyncIterator",V=W.toStringTag||"@@toStringTag";function R(a,n,u){return Object.defineProperty(a,n,{value:u,enumerable:!0,configurable:!0,writable:!0}),a[n]}try{R({},"")}catch(a){R=function(u,e,t){return u[e]=t}}function rt(a,n,u,e){var t=n&&n.prototype instanceof I?n:I,r=Object.create(t.prototype),l=new h(e||[]);return x(r,"_invoke",{value:o(a,u,l)}),r}function Q(a,n,u){try{return{type:"normal",arg:a.call(n,u)}}catch(e){return{type:"throw",arg:e}}}B.wrap=rt;var S="suspendedStart",K="suspendedYield",H="executing",T="completed",C={};function I(){}function w(){}function U(){}var M={};R(M,E,function(){return this});var J=Object.getPrototypeOf,$=J&&J(J(D([])));$&&$!==Y&&g.call($,E)&&(M=$);var z=U.prototype=I.prototype=Object.create(M);function q(a){["next","throw","return"].forEach(function(n){R(a,n,function(u){return this._invoke(n,u)})})}function s(a,n){function u(t,r,l,m){var _=Q(a[t],a,r);if(_.type!=="throw"){var O=_.arg,A=O.value;return A&&typeof A=="object"&&g.call(A,"__await")?n.resolve(A.__await).then(function(j){u("next",j,l,m)},function(j){u("throw",j,l,m)}):n.resolve(A).then(function(j){O.value=j,l(O)},function(j){return u("throw",j,l,m)})}m(_.arg)}var e;x(this,"_invoke",{value:function(r,l){function m(){return new n(function(_,O){u(r,l,_,O)})}return e=e?e.then(m,m):m()}})}function o(a,n,u){var e=S;return function(t,r){if(e===H)throw new Error("Generator is already running");if(e===T){if(t==="throw")throw r;return{value:F,done:!0}}for(u.method=t,u.arg=r;;){var l=u.delegate;if(l){var m=i(l,u);if(m){if(m===C)continue;return m}}if(u.method==="next")u.sent=u._sent=u.arg;else if(u.method==="throw"){if(e===S)throw e=T,u.arg;u.dispatchException(u.arg)}else u.method==="return"&&u.abrupt("return",u.arg);e=H;var _=Q(a,n,u);if(_.type==="normal"){if(e=u.done?T:K,_.arg===C)continue;return{value:_.arg,done:u.done}}_.type==="throw"&&(e=T,u.method="throw",u.arg=_.arg)}}}function i(a,n){var u=n.method,e=a.iterator[u];if(e===F)return n.delegate=null,u==="throw"&&a.iterator.return&&(n.method="return",n.arg=F,i(a,n),n.method==="throw")||u!=="return"&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+u+"' method")),C;var t=Q(e,a.iterator,n.arg);if(t.type==="throw")return n.method="throw",n.arg=t.arg,n.delegate=null,C;var r=t.arg;return r?r.done?(n[a.resultName]=r.value,n.next=a.nextLoc,n.method!=="return"&&(n.method="next",n.arg=F),n.delegate=null,C):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,C)}function y(a){var n={tryLoc:a[0]};1 in a&&(n.catchLoc=a[1]),2 in a&&(n.finallyLoc=a[2],n.afterLoc=a[3]),this.tryEntries.push(n)}function v(a){var n=a.completion||{};n.type="normal",delete n.arg,a.completion=n}function h(a){this.tryEntries=[{tryLoc:"root"}],a.forEach(y,this),this.reset(!0)}function D(a){if(a||a===""){var n=a[E];if(n)return n.call(a);if(typeof a.next=="function")return a;if(!isNaN(a.length)){var u=-1,e=function t(){for(;++u<a.length;)if(g.call(a,u))return t.value=a[u],t.done=!1,t;return t.value=F,t.done=!0,t};return e.next=e}}throw new TypeError(typeof a+" is not iterable")}return w.prototype=U,x(z,"constructor",{value:U,configurable:!0}),x(U,"constructor",{value:w,configurable:!0}),w.displayName=R(U,V,"GeneratorFunction"),B.isGeneratorFunction=function(a){var n=typeof a=="function"&&a.constructor;return!!n&&(n===w||(n.displayName||n.name)==="GeneratorFunction")},B.mark=function(a){return Object.setPrototypeOf?Object.setPrototypeOf(a,U):(a.__proto__=U,R(a,V,"GeneratorFunction")),a.prototype=Object.create(z),a},B.awrap=function(a){return{__await:a}},q(s.prototype),R(s.prototype,X,function(){return this}),B.AsyncIterator=s,B.async=function(a,n,u,e,t){t===void 0&&(t=Promise);var r=new s(rt(a,n,u,e),t);return B.isGeneratorFunction(n)?r:r.next().then(function(l){return l.done?l.value:r.next()})},q(z),R(z,V,"Generator"),R(z,E,function(){return this}),R(z,"toString",function(){return"[object Generator]"}),B.keys=function(a){var n=Object(a),u=[];for(var e in n)u.push(e);return u.reverse(),function t(){for(;u.length;){var r=u.pop();if(r in n)return t.value=r,t.done=!1,t}return t.done=!0,t}},B.values=D,h.prototype={constructor:h,reset:function(n){if(this.prev=0,this.next=0,this.sent=this._sent=F,this.done=!1,this.delegate=null,this.method="next",this.arg=F,this.tryEntries.forEach(v),!n)for(var u in this)u.charAt(0)==="t"&&g.call(this,u)&&!isNaN(+u.slice(1))&&(this[u]=F)},stop:function(){this.done=!0;var n=this.tryEntries[0].completion;if(n.type==="throw")throw n.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var u=this;function e(O,A){return l.type="throw",l.arg=n,u.next=O,A&&(u.method="next",u.arg=F),!!A}for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t],l=r.completion;if(r.tryLoc==="root")return e("end");if(r.tryLoc<=this.prev){var m=g.call(r,"catchLoc"),_=g.call(r,"finallyLoc");if(m&&_){if(this.prev<r.catchLoc)return e(r.catchLoc,!0);if(this.prev<r.finallyLoc)return e(r.finallyLoc)}else if(m){if(this.prev<r.catchLoc)return e(r.catchLoc,!0)}else{if(!_)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return e(r.finallyLoc)}}}},abrupt:function(n,u){for(var e=this.tryEntries.length-1;e>=0;--e){var t=this.tryEntries[e];if(t.tryLoc<=this.prev&&g.call(t,"finallyLoc")&&this.prev<t.finallyLoc){var r=t;break}}r&&(n==="break"||n==="continue")&&r.tryLoc<=u&&u<=r.finallyLoc&&(r=null);var l=r?r.completion:{};return l.type=n,l.arg=u,r?(this.method="next",this.next=r.finallyLoc,C):this.complete(l)},complete:function(n,u){if(n.type==="throw")throw n.arg;return n.type==="break"||n.type==="continue"?this.next=n.arg:n.type==="return"?(this.rval=this.arg=n.arg,this.method="return",this.next="end"):n.type==="normal"&&u&&(this.next=u),C},finish:function(n){for(var u=this.tryEntries.length-1;u>=0;--u){var e=this.tryEntries[u];if(e.finallyLoc===n)return this.complete(e.completion,e.afterLoc),v(e),C}},catch:function(n){for(var u=this.tryEntries.length-1;u>=0;--u){var e=this.tryEntries[u];if(e.tryLoc===n){var t=e.completion;if(t.type==="throw"){var r=t.arg;v(e)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(n,u,e){return this.delegate={iterator:D(n),resultName:u,nextLoc:e},this.method==="next"&&(this.arg=F),C}},B}var at="\u3000\u3000";function ft(F){var B=["Bytes","KB","MB","GB","TB"];if(F==0)return"0 Byte";var Y=parseInt(""+Math.floor(Math.log(F)/Math.log(1024)),10);return(F/Math.pow(1024,Y)).toFixed(1)+" "+B[Y]}tt.b=function(F){var B=F.value,Y=B===void 0?[]:B,g=F.onChange,x=F.className,W=F.maxSize,E=W===void 0?150:W,X=F.title,V=X===void 0?"\u6587\u4EF6\u4E0A\u4F20":X,R=F.accept,rt=R===void 0?null:R,Q={multiple:!1,fileList:Y,accept:rt,withCredentials:!0,beforeUpload:function(H){var T=H.size/1024/1024;return T<E?!0:(yt.b.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(E,"MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20")),!1)},action:"".concat(lt.a.API_SERVER,"/api/attachments.json"),onChange:function(H){var T=Object(ht.a)(H.fileList);T=T.map(function(C){return C.name.indexOf(at)===-1&&(C.name="".concat(C.name).concat(at).concat(ft(C.size))),Object(dt.a)({},C)}),g(T)},onRemove:function(){var K=Object(Ot.a)(N().mark(function T(C){var I,w;return N().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(I=C.response?C.response.id:C.uid,!I){M.next=8;break}return M.next=4,Object(et.d)(C.response?C.response.id:C.id);case 4:return w=M.sent,M.abrupt("return",w);case 8:return M.abrupt("return",!0);case 9:case"end":return M.stop()}},T)}));function H(T){return K.apply(this,arguments)}return H}()};function S(K){K.preventDefault(),K.stopPropagation()}return G.a.createElement("div",{className:"single-upload ".concat(x||"")},G.a.createElement(st.a,Q,G.a.createElement(Et.a,{type:"primary",title:Y.length>0?"\u6BCF\u6B21\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u8D44\u6E90\uFF0C \u5220\u9664\u4E0B\u9762\u8D44\u6E90\u53EF\u91CD\u65B0\u4E0A\u4F20 ":"",disabled:Y.length>0,ghost:!0},V),G.a.createElement("span",{onClick:S,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",E,"M) ")))}}}]);
|