|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[52338,88314,72286],{51811:function(e,n,t){function s(e){var n=!0;if(e.length>0){for(var t=0;t<e.length;t++)if(0==e[t].compile_success||!e[t].compile_success){n=!1;break}}else n=!1;return n}function a(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=[],s=0;s<e.length;s++){var a=e[s],i=n?"".concat(n,"/").concat(a.name):"".concat(a.name);t.push({title:a.name,isLeaf:"tree"!==a.type,key:i})}return t}function i(e,n,t){for(var s=0;s<e.length;s++){var a=e[s];if(a.key===n){a.children=t;break}a.children&&i(a.children,n,t)}return e}function c(e,n,t){var s;return function(){var a=this,i=arguments,c=function(){s=null,t||e.apply(a,i)},l=t&&!s;clearTimeout(s),s=setTimeout(c,n),l&&e.apply(a,i)}}t.d(n,{Ax:function(){return i},Ds:function(){return c},KI:function(){return l},SI:function(){return a},f1:function(){return s}});var l=t(67871).Z.API_SERVER},76478:function(e,n,t){t.d(n,{Z:function(){return E}});var s=t(10574),a=t.n(s),i=t(39343),c=t.n(i),l=t(11006),r=t.n(l),o=t(59301),u="list___KhJas",d="row___GGtIx",m="title___o_xqf",p="size___OVRoL",h="download___ZLcIH",f="preview___gi0kI",x="annotation___KVSwj",v=t(73287),j=t.n(v),g=t(78075),_="imageDimensions___a7crR",y="img___Kroat",k=t(71418),b=t(2859),w=t(15830),Z=t(85578),N=t(37712),S=function(e){var n=e.data,t=e.className,s=e.style,i=void 0===s?{}:s,l=e.onClose,u=e.onOk,d=(0,o.useRef)(null),m=(0,o.useRef)(null),p=(0,o.useState)(!1),h=r()(p,2),f=h[0],x=h[1],v=(0,o.useState)("正在加载中"),g=r()(v,2),S=g[0],C=g[1];(0,o.useEffect)((function(){null!=n&&n.visible?document.body.setAttribute("data-custom","height"):document.body.removeAttribute("data-custom"),null!=n&&n.src&&I()}),[null==n?void 0:n.visible]);var I=function(){var e=c()(a()().mark((function e(){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x(!0),C("正在加载中"),e.next=4,(0,Z.ZJ)(null==n?void 0:n.src);case 4:t=e.sent,d.current.src="",d.current.src=t,d.current.onload=function(){P()},x(!1),C("");case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=c()(a()().mark((function e(t){var s;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x(!0),C("正在保存中"),e.next=4,(0,w.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:n.title,file:t.dataUrl}});case 4:if(null==(s=e.sent)||!s.id){e.next=10;break}return e.next=8,(0,w.ZP)("/api/attachments/".concat(n.id,"/add_subitem.json"),{method:"post",body:{subitem_id:null==s?void 0:s.id,settings:JSON.stringify(t.state)}});case 8:0===e.sent.status&&u();case 10:x(!1),C("");case 12:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=function(){m.current=new b.hP(d.current),m.current.addEventListener("render",E),m.current.addEventListener("beforeclose",l),m.current.show(),console.log(m.current,"22222"),null!=n&&n.snapshotData&&m.current.restoreState(n.snapshotData),setTimeout((function(){var e;(e=document.querySelector('a[href="https://markerjs.com/"]'))&&e.parentNode&&(e.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"选择"},{name:'[data-action="delete"]',title:"删除元素"},{name:'[data-action="undo"]',title:"撤销"},{name:'[data-type-name="FrameMarker"]',title:"矩形"},{name:'[data-type-name="FreehandMarker"]',title:"画线"},{name:'[data-type-name="ArrowMarker"]',title:"箭头"},{name:'[data-type-name="TextMarker"]',title:"文本"},{name:'[data-type-name="EllipseMarker"]',title:"椭圆"},{name:'[data-type-name="HighlightMarker"]',title:"方块"},{name:'[data-type-name="CalloutMarker"]',title:"注释"},{name:'[data-action="render"]',title:"保存"},{name:'[data-action="close"]',title:"退出"}].forEach((function(e){var n=document.querySelector(e.name);n&&n.setAttribute("title",e.title)}))}),300)};return(0,N.jsx)(o.Fragment,{children:(null==n?void 0:n.visible)&&(0,N.jsxs)("div",{className:j()(_,t),style:i,children:[(0,N.jsx)(k.Z,{spinning:f,tip:S,style:{position:"absolute"}}),(0,N.jsx)("img",{className:y,ref:d})]})})},C=t(67871),I=t(58696),E=function(e){var n=e.className,t=e.style,s=e.dataSource,i=void 0===s?[]:s,l=e.authority,v=void 0!==l&&l,_=e.callback,y=e.showDimensions,k=void 0===y||y,b=(0,o.useState)({content:"",type:""}),E=r()(b,2),P=E[0],R=E[1],M=(0,o.useState)({}),T=r()(M,2),L=T[0],D=T[1],A=(0,o.useState)(!1),O=r()(A,2),V=O[0],H=O[1],Y=(0,o.useState)({title:"",visible:!1,src:"",snapshotData:{}}),F=r()(Y,2),z=F[0],B=F[1],G=(0,o.useRef)(),J=function(){var e=c()(a()().mark((function e(n){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(D(n),"txt"!==n.file_type){e.next=6;break}return e.next=4,(0,w.ZP)(n.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:t=e.sent,G.current=t;case 6:R({type:n.file_type,content:C.Z.API_SERVER+n.url});case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),W=function(e){var n;B({visible:!0,src:C.Z.API_SERVER+e.url,id:e.id,title:e.title,snapshotData:null==e||null===(n=e.subitem)||void 0===n?void 0:n.settings})},q=function(){var e=c()(a()().mark((function e(n){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:R({type:n.file_type,content:C.Z.API_SERVER+(null==n||null===(t=n.subitem)||void 0===t?void 0:t.url)});case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return null!=i&&i.length?(0,N.jsxs)(o.Fragment,{children:[(0,N.jsx)("div",{className:j()(u,n),style:t,children:i.map((function(e,n){var t,s,a;return(0,N.jsxs)("div",{className:d,children:[(0,N.jsxs)("div",{className:m,onClick:function(){return J(e)},children:[(0,N.jsx)("i",{className:"iconfont icon-fujian1"}),(0,N.jsx)("span",{title:e.title,children:e.title})]}),(0,N.jsx)("div",{className:p,children:e.filesize}),(0,N.jsxs)("div",{className:h,onClick:function(){var n;(0,Z.Nd)("","".concat(C.Z.API_SERVER).concat(null===(n=e.url)||void 0===n?void 0:n.replace("disposition=inline","")))},children:[(0,N.jsx)("i",{className:"iconfont icon-xiazai4"}),"下载"]}),!["other","download"].includes(null==e?void 0:e.file_type)&&(0,N.jsxs)("div",{className:f,onClick:function(){return J(e)},children:[(0,N.jsx)("i",{className:"iconfont icon-yulan"}),"预览"]}),["image"].includes(null==e?void 0:e.file_type)&&k&&(v?(0,N.jsxs)("div",{className:x,onClick:function(){return W(e)},children:[(0,N.jsx)("i",{className:"iconfont icon-pizhu"}),null!==(t=e.subitem)&&void 0!==t&&t.id?"修改批注":"批注"]}):(null===(s=e.subitem)||void 0===s?void 0:s.id)&&(0,N.jsxs)("div",{className:x,onClick:function(){return q(e)},children:[(0,N.jsx)("i",{className:"iconfont icon-chakanlaoshipizhu1"}),"查看老师批注"]})),["image"].includes(null==e?void 0:e.file_type)&&(null===(a=e.subitem)||void 0===a?void 0:a.id)&&(0,N.jsxs)("div",{className:h,style:{marginLeft:20},onClick:function(){var n;(0,Z.Nd)("","".concat(C.Z.API_SERVER).concat(null==e||null===(n=e.subitem)||void 0===n||null===(n=n.url)||void 0===n?void 0:n.replace("disposition=inline","")))},children:[(0,N.jsx)("i",{className:"iconfont icon-xiazai4"}),"下载批注文件"]}),["office"].includes(null==e?void 0:e.file_type)&&(0,I.eB)()&&["xlsx","docx","pptx"].includes(null==e?void 0:e.file_sub)&&k&&(0,N.jsxs)("div",{className:x,onClick:function(){H(!0),J(e)},children:[(0,N.jsx)("i",{className:"iconfont icon-pizhu"}),e.is_edit?"修改批注":"批注"]}),e.is_edit&&(0,I.dE)()&&k&&(0,N.jsxs)("div",{className:x,onClick:function(){J(e)},children:[(0,N.jsx)("i",{className:"iconfont icon-sousuo7"}),"查看老师批注"]})]},n)}))}),(0,N.jsx)(g.Z,{close:!0,data:null==P?void 0:P.content,type:null==P?void 0:P.type,hasMask:!0,editOffice:V?"edit":"view",monacoEditor:{value:G.current,language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onImgDimensions:v&&k&&"image"===P.type?function(){return W(L)}:null,onClose:function(){_(),H(!1),R({content:"",type:""})}}),(0,N.jsx)(S,{onOk:function(){_(),B({visible:!1})},onClose:function(){return B({visible:!1})},data:z})]}):null}},72286:function(e,n,t){t.d(n,{z:function(){return N},Z:function(){return S}});var s=t(10574),a=t.n(s),i=t(39343),c=t.n(i),l=t(26801),r=t.n(l),o=t(93923),u=t.n(o),d=t(11006),m=t.n(d),p=t(59301),h=t(48826),f=t(8591),x=t(43418),v=t(3113),j=t(67871),g=t(68074),_=t(37712),y=" ";function k(e){if(0==e)return"0 Byte";var n=parseInt(""+Math.floor(Math.log(e)/Math.log(1024)),10);return(e/Math.pow(1024,n)).toFixed(1)+" "+["Bytes","KB","MB","GB","TB"][n]}var b=t(60936),w=t(89392);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var Z=h.Z.Dragger;function N(e){var n=[];return e&&e.length>0&&(n=e.map((function(e){return{uid:e.id,id:e.id,name:e.title+y+e.filesize,url:e.url,filesize:e.filesize,status:"done",response:{id:e.id}}}))),n}var S=function(e){var n=e.value,t=e.onChange,s=e.action,i=e.data,l=e.className,o=e.maxSize,d=void 0===o?150:o,N=e.title,S=void 0===N?"上传附件":N,C=e.showRemoveModal,I=void 0!==C&&C,E=e.accept,P=void 0===E?"":E,R=e.additionalText,M=e.isDragger,T=e.number,L=void 0===T?1e3:T,D=e.aloneClear,A=void 0!==D&&D,O=(0,p.useState)(!1),V=m()(O,2),H=V[0],Y=V[1],F=(0,p.useState)(n||[]),z=m()(F,2),B=z[0],G=z[1],J=(0,p.useState)(1),W=m()(J,2),q=W[0],U=W[1];(0,p.useEffect)((function(){n&&(1===q&&G(u()(n)),U(2),L===(null==n?void 0:n.length)&&Y(!0))}),[n]);var K,$=function(){setTimeout((function(){B.pop(),G(u()(B))}),500)},Q={multiple:!0,disabled:H,accept:P,withCredentials:!0,fileList:B,beforeUpload:function(e,n){var t=e.size/1024/1024;return B.concat(n).length>L?(B.pop(),G(u()(B)),f.ZP.error("最多只能上传".concat(L,"个文件")),A?Promise.reject():($(),!1)):t<d||(f.ZP.error("该文件无法上传。超过文件大小限制(".concat(d,"MB).")),A?Promise.reject():($(),!1))},data:i,action:s||"".concat(j.Z.API_SERVER,"/api/attachments.json"),onChange:function(e){var n,s;(B="removed"===e.file.status?e.fileList:(0,w.uniqBy)([].concat(u()(e.fileList),u()(B)),"uid"),"done"!==e.file.status||-1!==(null===(n=e.file)||void 0===n||null===(n=n.response)||void 0===n?void 0:n.status))?(B.length>=L?Y(!0):Y(!1),G(u()(B)),B=B.map((function(e){var n,t;null!=e&&null!==(n=e.response)&&void 0!==n&&n.id&&(e.url="/api/attachments/".concat(null==e||null===(t=e.response)||void 0===t?void 0:t.id));return-1===e.name.indexOf(y)&&(e.name="".concat(e.name).concat(y).concat(k(e.size))),r()({},e)})),console.log("info:",e,B),t(B)):f.ZP.error(null===(s=e.file)||void 0===s||null===(s=s.response)||void 0===s?void 0:s.message)},onRemove:(K=c()(a()().mark((function e(n){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=function(){var e=c()(a()().mark((function e(){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n.response?n.response.id:n.id)){e.next=8;break}return e.next=4,(0,g.JZ)(n.response?n.response.id:n.uid);case 4:return t=e.sent,e.abrupt("return",Promise.resolve(t));case 8:return e.abrupt("return",!0);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!I){e.next=5;break}return e.abrupt("return",new Promise((function(e,n){var s;x.Z.confirm({centered:!0,width:530,okText:"确定",cancelText:"取消",title:"提示",content:(0,_.jsx)("div",{className:"tc font16",children:"是否确认删除?"}),onOk:(s=c()(a()().mark((function n(){return a()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t();case 2:n.sent,f.ZP.success("删除成功"),e(!0);case 5:case"end":return n.stop()}}),n)}))),function(){return s.apply(this,arguments)}),onCancel:function(){return e(!1)}})})));case 5:return e.next=7,t();case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e)}))),function(e){return K.apply(this,arguments)})};return(0,_.jsxs)("div",{className:"multi-upload ".concat(l||""),children:[M&&(0,_.jsxs)(Z,r()(r()({},Q),{},{children:[(0,_.jsx)("p",{className:"ant-upload-drag-icon",children:(0,_.jsx)(b.Z,{})}),(0,_.jsxs)("p",{className:"ant-upload-text",children:["点击上传图标,选择要上传的文件或将文件拖拽到此",(0,_.jsx)("br",{}),"(单个文件最大限制为",d,"MB)"," "]}),R]})),!M&&(0,_.jsxs)(h.Z,r()(r()({},Q),{},{children:[(0,_.jsxs)(v.ZP,{disabled:H,className:"upload_button",children:[(0,_.jsx)("img",{className:"aBtn_img",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4="}),S]}),(0,_.jsxs)("span",{onClick:function(e){e.preventDefault(),e.stopPropagation()},className:"upload_text",children:["(单个文件最大",d,"MB)"," "]})]}))]})}},61173:function(e,n,t){t.d(n,{Z:function(){return m}});var s=t(11006),a=t.n(s),i=t(59301),c=t(89472),l=t(3113),r=t(91671),o=t(66549),u=t(99174),d=t(37712),m=function(){var e=(0,i.useState)(""),n=a()(e,2),t=n[0],s=n[1],m=(0,i.useState)(0),p=a()(m,2),h=p[0],f=p[1],x=(0,i.useRef)("");function v(e){27==e.keyCode&&x.current&&j()}function j(){document.body.style.overflow="auto",s("")}(0,i.useEffect)((function(){return c.Z.subscribe("preview-image",(function(e){s(e),document.body.style.overflow="hidden"}))}),[]),(0,i.useEffect)((function(){return document.addEventListener("keydown",v),function(){document.removeEventListener("keydown",v)}}),[]),(0,i.useEffect)((function(){x.current=t}),[t]);var g=(0,i.useRef)(),_=(0,i.useRef)();return(0,d.jsx)(i.Fragment,{children:t?(0,d.jsxs)("div",{className:"image-preview-container",ref:g,onClick:function(e){e.nativeEvent.target!==g.current&&e.nativeEvent.target!==_.current||j()},children:[(0,d.jsxs)("div",{className:"button-group",children:[(0,d.jsxs)(l.ZP,{onClick:function(){f(h+90)},children:["旋转",(0,d.jsx)(r.Z,{})]}),(0,d.jsxs)(l.ZP,{href:t,children:["下载",(0,d.jsx)(o.Z,{})]}),(0,d.jsxs)(l.ZP,{onClick:j,children:["关闭",(0,d.jsx)(u.Z,{})]})]}),(0,d.jsx)("div",{className:"preview-wrp-group",ref:_,children:(0,d.jsx)("img",{className:"image-preview",src:t,alt:"预览大图",style:{transform:"rotate(".concat(h,"deg)")}})})]}):null})}},74921:function(e,n,t){t.d(n,{h:function(){return v}});var s=t(26801),a=t.n(s),i=t(11006),c=t.n(i),l=t(59301),r=t(57809),o=t(78241),u=t(3113),d=t(89780),m=t.n(d),p=(t(83164),t(45215),t(37712)),h=r.default.Option,f={labelCol:{span:4},wrapperCol:{span:20}},x={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function v(e){var n=e.value,t=e.onChange,s=e.mode,i=e.options,r=void 0===i?{}:i,o=(0,l.useRef)(),u=(0,l.useState)(),d=c()(u,2),h=d[0],f=d[1];return(0,l.useEffect)((function(){if(h){var e=function(e){var n=e.getValue();t&&t(n)};return h.on("change",e),function(){h.off("change",e)}}}),[h,t]),(0,l.useEffect)((function(){h&&h.setOption("mode",s)}),[h,s]),(0,l.useEffect)((function(){h&&(n===h.getValue()&&""!==n||setTimeout((function(){h.setValue(n||"")}),300))}),[h,n]),(0,l.useEffect)((function(){if(o.current&&!h){var e=m().fromTextArea(o.current,a()({mode:s,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},r));f(e)}}),[o.current,h]),(0,p.jsx)("div",{className:"my-codemirror-container",children:(0,p.jsx)("textarea",{ref:o})})}n.Z=function(e){var n=e.callback,t=e.onCancel,s=(0,l.useState)("python"),i=c()(s,2),d=i[0],m=i[1];return(0,p.jsxs)(o.Z,a()(a()({},f),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){n(e)},children:[(0,p.jsx)(o.Z.Item,{label:"代码语言",name:"language",children:(0,p.jsx)(r.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){m(x[e][1])},children:Object.keys(x).map((function(e){return(0,p.jsx)(h,{value:e,children:x[e][0]},e)}))})}),(0,p.jsx)(o.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,p.jsx)(v,{mode:d})}),(0,p.jsxs)("div",{className:"flex-container flex-end",children:[(0,p.jsx)(u.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,p.jsx)(u.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))}},22387:function(e,n,t){t.d(n,{Z:function(){return ue}});var s=t(98190),a=t.n(s),i=t(10574),c=t.n(i),l=t(39343),r=t.n(l),o=t(11006),u=t.n(o),d=t(22060),m=t.n(d),p=t(59301),h=t(89780),f=t.n(h),x=t(76374),v=(t(83164),t(6313),t(25717),t(99498),t(25419),t(67549),t(80416)),j=t(37712),g=function(e){var n=e.value,t=void 0===n?"":n,s=(e.className,e.showTextOnly,e.showLines,e.style,(0,p.useMemo)((function(){return""}),[t]));return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)("div",{dangerouslySetInnerHTML:{__html:s}})})},_=t(26801),y=t.n(_),k=[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}];function b(e){var n=e.onActionCallback,t=e.title,s=e.icon,a=e.actionName,i=e.className,c=void 0===i?"":i,l=e.children;return(0,j.jsxs)("a",{title:t,className:c,onClick:function(){n(a)},children:[(0,j.jsx)("i",{className:"md-iconfont ".concat(s)}),l]})}var w=function(e){var n=e.watch,t=e.showNullButton,s=e.showNullProgramButton,a=e.onActionCallback,i=e.fullScreen,c=e.insertTemp,l=e.hidetoolBar,r=[].concat(k,[{title:"".concat(n?"关闭实时预览":"开启实时预览"),icon:"".concat(n?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return(0,j.jsxs)("ul",{className:"markdown-toolbar-container",children:[!l&&r.map((function(e,n){return(0,j.jsx)("li",{children:e.actionName?(0,j.jsx)(b,y()(y()({},e),{},{onActionCallback:a})):(0,j.jsx)("span",{className:"v-line"})},n)})),t?(0,j.jsx)("li",{children:(0,j.jsx)(b,{icon:"icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:a,children:(0,j.jsx)("span",{className:"fill-tip",children:"点击插入\b填空项"})})}):null,s?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("li",{children:(0,j.jsx)(b,{icon:"icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:a,children:(0,j.jsx)("span",{className:"fill-tip",children:"添加单行填空项"})})}),(0,j.jsx)("li",{children:(0,j.jsx)(b,{icon:"icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:a,children:(0,j.jsx)("span",{className:"fill-tip",children:"添加多行填空项"})})})]}):null,c&&(0,j.jsx)("li",{children:(0,j.jsx)(b,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(c),onActionCallback:a,children:(0,j.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),(0,j.jsx)("li",{className:"btn-full-screen",children:(0,j.jsx)(b,{icon:"".concat(i?"icon-shrink":"icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:a})})]})},Z=t(90463),N=t(78241),S=t(1056),C=t(3113),I={labelCol:{span:4},wrapperCol:{span:20}},E=function(e){var n=e.callback,t=e.onCancel;return(0,j.jsxs)(N.Z,y()(y()({},I),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){n(e)},children:[(0,j.jsx)(N.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,j.jsx)(S.Z,{})}),(0,j.jsx)(N.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,j.jsx)(S.Z,{})}),(0,j.jsxs)("div",{className:"flex-container flex-end",children:[(0,j.jsx)(C.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,j.jsx)(C.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))},P=t(74921),R=t(8591),M=t(51811),T=N.Z.useForm,L={width:280,marginRight:10},D={labelCol:{span:5},wrapperCol:{span:19}},A=function(e){var n=e.callback,t=e.onCancel,s=T(),a=u()(s,1)[0],i=(0,p.useRef)();function c(e,n){-1!==e.status?a.setFieldsValue({src:"/api/attachments/".concat(e.id),type:n.type}):R.ZP.error(e.message)}return(0,j.jsxs)(N.Z,y()(y()({form:a},D),{},{className:"upload-image-panel",onFinish:function(e){n(y()(y()({},e),{},{name:i.current}))},style:{width:470,overflow:"hidden"},children:[(0,j.jsx)(N.Z.Item,{label:"图片地址",required:!0,children:(0,j.jsxs)("div",{className:"flex-container",children:[(0,j.jsx)(N.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}],children:(0,j.jsx)(S.Z,{style:L})}),(0,j.jsx)(O,{onFileChange:function(e){var n=e.target.files[0];i.current=n.name,V(n,c)}})]})}),(0,j.jsx)(N.Z.Item,{label:"图片描述",name:"alt",children:(0,j.jsx)(S.Z,{style:{width:264}})}),(0,j.jsxs)(N.Z.Item,{style:{textAlign:"right"},children:[(0,j.jsx)(C.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,j.jsx)(C.ZP,{type:"default",onClick:t,children:"取消"})]})]}))};function O(e){var n=e.onFileChange;return(0,j.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,j.jsx)("input",{type:"file",onChange:n})]})}function V(e,n){if(!e)throw new String("没有文件");var t=new FormData;t.append("editormd-image-file",e),t.append("file_param_name","editormd-image-file"),t.append("byxhr","true");var s=new window.XMLHttpRequest;s.withCredentials=!0,s.addEventListener("load",(function(t){n(JSON.parse(t.target.responseText),e)}),!1),s.addEventListener("error",(function(e){console.error(e)}),!1),s.open("POST","".concat(M.KI,"/api/attachments.json")),s.send(t)}var H,Y,F=t(5112),z=t(85731),B=F.ZP.Group,G={margin:"0 8px"},J=function(e){var n=e.callback,t=e.onCancel;return(0,j.jsxs)(N.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){n(e)},children:[(0,j.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,j.jsx)("span",{style:G,children:"单元格数:"}),(0,j.jsx)("span",{style:G,children:"行数"}),(0,j.jsx)(N.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,j.jsx)(z.Z,{})}),(0,j.jsx)("span",{style:G,children:"列数"}),(0,j.jsx)(N.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,j.jsx)(z.Z,{})})]}),(0,j.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,j.jsx)("span",{style:G,children:"对齐方式:"}),(0,j.jsx)(N.Z.Item,{name:"align",children:(0,j.jsxs)(B,{children:[(0,j.jsx)(F.ZP,{value:"default",children:(0,j.jsx)("i",{className:"fa fa-align-justify"})}),(0,j.jsx)(F.ZP,{value:"left",children:(0,j.jsx)("i",{className:"fa fa-align-left"})}),(0,j.jsx)(F.ZP,{value:"center",children:(0,j.jsx)("i",{className:"fa fa-align-center"})}),(0,j.jsx)(F.ZP,{value:"right",children:(0,j.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,j.jsxs)("div",{className:"flex-container flex-end",children:[(0,j.jsx)(C.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,j.jsx)(C.ZP,{type:"ghost",onClick:t,children:"取消"})]})]})},W=t(67871),q=t(15830),U=t(1012),K=t(43418),$="link",Q="upload-image",X="code-block",ee="add-table",ne="------------",te={default:ne,left:":".concat(ne),center:":".concat(ne,":"),right:"".concat(ne,":")},se=t(86219);var ae="@▁▁@";function ie(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var ce=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",le=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],re=(H={},m()(H,ce+"-B","bold"),m()(H,ce+"-I","italic"),H),oe=(Y={},m()(Y,$,"添加链接"),m()(Y,X,"添加代码块"),m()(Y,Q,"添加文件"),m()(Y,ee,"添加表格"),Y),ue=function(e){var n=e.defaultValue,t=void 0===n?"":n,s=e.onChange,i=e.width,l=void 0===i?"100%":i,o=e.height,d=void 0===o?400:o,h=e.miniToolbar,_=void 0!==h&&h,y=e.isFocus,k=void 0!==y&&y,b=e.watch,N=e.insertTemp,S=e.mode,C=void 0===S?"markdown":S,I=e.id,M=void 0===I?"markdown-editor-id":I,T=e.showResizeBar,L=void 0!==T&&T,D=e.noStorage,O=void 0!==D&&D,H=e.showNullButton,Y=void 0!==H&&H,F=e.showNullProgramButton,z=void 0!==F&&F,B=e.hidetoolBar,G=void 0!==B&&B,ne=e.fullScreen,ce=void 0!==ne&&ne,ue=e.onBlur,de=e.onCMBeforeChange,me=e.onFullScreen,pe=e.className,he=void 0===pe?"":pe,fe=e.disablePaste,xe=void 0!==fe&&fe,ve=e.disabled,je=void 0!==ve&&ve,ge=e.disabledFill,_e=void 0!==ge&&ge,ye=e.placeholder,ke=void 0===ye?"":ye,be=e.values,we=void 0===be?"":be,Ze=(0,p.useState)(null),Ne=u()(Ze,2),Se=Ne[0],Ce=Ne[1],Ie=(0,p.useState)(t),Ee=u()(Ie,2),Pe=Ee[0],Re=Ee[1],Me=(0,p.useState)(b),Te=u()(Me,2),Le=Te[0],De=Te[1],Ae=(0,p.useState)(ce),Oe=u()(Ae,2),Ve=Oe[0],He=Oe[1],Ye=(0,p.useState)(""),Fe=u()(Ye,2),ze=Fe[0],Be=Fe[1],Ge=(0,p.useState)(0),Je=u()(Ge,2),We=Je[0],qe=Je[1],Ue=(0,p.useState)(d),Ke=u()(Ue,2),$e=Ke[0],Qe=Ke[1],Xe=(0,p.useState)(!1),en=u()(Xe,2),nn=(en[0],en[1]),tn=(0,p.useRef)((0,U.Z)()),sn=(0,p.useRef)(!1),an=(0,p.useRef)(),cn=(0,p.useRef)(),ln=(0,p.useRef)(),rn=(0,p.useRef)(),on=(0,p.useRef)(),un=function(){var e=r()(c()().mark((function e(){var n,t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,q.ZP)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:tn.current}});case 2:null!=(t=e.sent)&&null!==(n=t.attachments)&&void 0!==n&&n.length&&(console.log("cm:",Se,cn),t.attachments.map((function(e){e.content_type.indexOf("image")>-1?Se.replaceSelection(".concat(e.content_type,")")):e.content_type.indexOf("video")>-1?Se.replaceSelection('<video width="100%" controls src="'.concat(W.Z.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):e.content_type.indexOf("pdf")>-1?Se.replaceSelection('<a href="'.concat(W.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,'&disposition=inline" target="_blank">').concat(e.name,"</a>")):Se.replaceSelection("[".concat(e.name,"](").concat(W.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")"))})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,p.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Re(we),null==Se||Se.setValue(we),window.scrollTo(0,e)}),[we]),(0,p.useEffect)((function(){null==me||me(Ve)}),[Ve]),(0,p.useEffect)((function(){if(cn.current){var e=function(e,t){if(!xe){var s=t.clipboardData;if(s){var a=s.types.toString(),i=s.items;if("Files"===a||s.types.indexOf("Files")>-1){if(t.preventDefault(),"stex"==C)return;try{var c,l=i[1];"file"===(null===(c=i[0])||void 0===c?void 0:c.kind)&&(l=i[0]);var r=l.getAsFile(),o=r.name.split(".").pop();V(r,(function(e){var t,s,a;e.id?(null==r||null===(t=r.type)||void 0===t?void 0:t.indexOf("image"))>-1?n.replaceSelection(".concat(e.content_type,")")):(null==r||null===(s=r.type)||void 0===s?void 0:s.indexOf("video"))>-1?n.replaceSelection('<video width="100%" controls src="'.concat(W.Z.API_SERVER,"/api/attachments/").concat(e.id,'"></video>')):(null==r||null===(a=r.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(W.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(r.type,'&disposition=inline" target="_blank">').concat(r.name,"</a>")):le.includes(o)?n.replaceSelection('<a href="'.concat(W.Z.API_SERVER,"/api/attachments/").concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(r.name,"</a>")):n.replaceSelection("[".concat(r.name,"](").concat(W.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(t){R.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}t.preventDefault()},n=f().fromTextArea(cn.current,{mode:C,lineNumbers:!_,lineWrapping:!0,value:t,autoCloseTags:!z,autoCloseBrackets:!0});return n.on("keyup",(function(e,t){8===t.keyCode&&(""==e.getValue()?n.setOption("placeholder",ke):n.setOption("placeholder",null))})),n.on("keydown",(function(e,n){if(8===n.keyCode){var t=function(e,n){var t=e.getDoc(),s=t.getCursor(),a=t.getLine(s.line),i=a.charAt(s.ch-1),c=a.lastIndexOf("@▁@",s.ch),l=a.lastIndexOf("@▁▁@",s.ch),r=c>l?c:l,o=c>l?3:4;if(-1===ae.indexOf(i))return null;if(console.log("change1:",n,e,a,s,r,c,l,i),r>=0&&s.ch-r<5){var u=r+o;return t.replaceRange("",{line:s.line,ch:r},{line:s.line,ch:u}),{line:s.line,ch:u}}return null}(e);t&&n.preventDefault()}})),k&&n.focus(),n.on("paste",e),n.on("dragleave",(function(e,n){ln.current.classList.remove("mouse-hover-md")})),n.on("dragover",(function(e,n){ln.current.classList.add("mouse-hover-md")})),n.on("drop",(function(e,t){var s;if(ln.current.classList.add("mouse-hover-md"),(s=t.dataTransfer.files).length>0){t.preventDefault(),t.stopPropagation();for(var a=function(){var e=s[i],t=e.name.split(".").pop();V(e,(function(s){var a,i,c;s.id?(null==e||null===(a=e.type)||void 0===a?void 0:a.indexOf("image"))>-1?n.replaceSelection(".concat(s.content_type,")")):(null==e||null===(i=e.type)||void 0===i?void 0:i.indexOf("video"))>-1?n.replaceSelection('<video width="100%" controls src="'.concat(W.Z.API_SERVER,"/api/attachments/").concat(s.id,'"></video>')):(null==e||null===(c=e.type)||void 0===c?void 0:c.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(W.Z.API_SERVER,"/api/attachments/").concat(s.id,"?type=").concat(e.type,'&disposition=inline" target="_blank">').concat(e.name,"</a>")):le.includes(t)?n.replaceSelection('<a href="'.concat(W.Z.API_SERVER,"/api/attachments/").concat(s.id,'?type=office&disposition=inline" target="_blank">').concat(e.name,"</a>")):n.replaceSelection("[".concat(e.name,"](").concat(W.Z.API_SERVER,"/api/attachments/").concat(s.id,"?type=").concat(s.content_type,")")):401===(null==s?void 0:s.status)&&(document.location.href="/user/login")}))},i=0;i<s.length;i++)a()}})),je&&n.on("beforeChange",(function(e,n){"paste"!==n.origin&&"+input"!==n.origin||n.cancel()})),Ce(n),function(){n.off("paste",e)}}}),[]);var dn=(0,p.useCallback)((function(){ln.current}),[$e,ln,Ve]);(0,p.useEffect)((function(){if(Se){var e=function(){var e=new x.Z((function(e){var n,t=a()(e);try{for(t.s();!(n=t.n()).done;){var s=n.value;(s.target.offsetHeight>0||s.target.offsetWidth>0)&&(dn(),Se.setSize("100%","100%"),Se.refresh())}}catch(e){t.e(e)}finally{t.f()}}));return e.observe(cn.current.parentElement),e}();return function(){var n,t;null!==(n=cn.current)&&void 0!==n&&n.parentElement&&e.unobserve(null===(t=cn.current)||void 0===t?void 0:t.parentElement)}}}),[Se,dn]),(0,p.useEffect)((function(){if(Se){for(var e=[],n=function(){var n=u()(s[t],2),a=n[0],i=n[1],c=m()({},a,(function(){mn(i)}));e.push(c),Se.addKeyMap(c)},t=0,s=Object.entries(re);t<s.length;t++)n();return an.current=setInterval((function(){sn.current&&un()}),4e3),function(){clearInterval(an.current);for(var n=0,t=e;n<t.length;n++){var s=t[n];Se.removeKeyMap(s)}}}}),[Se]),(0,p.useEffect)((function(){ce!==Ve&&He(ce)}),[ce]),(0,se.Z)((function(){if(!O&&We>0){var e=(new Date).getTime(),n=window.sessionStorage.getItem(M);e>=We+1e4&&(!n||n!==Pe)&&(window.sessionStorage.setItem(M,Pe),nn(!0))}}),1e4),(0,p.useEffect)((function(){De(b)}),[Se,b]),(0,p.useEffect)((function(){Se&&k&&Se.focus()}),[Se,k]),(0,p.useEffect)((function(){if(Le&&Se){var e=function(e){var n=e.target;if(on.current){var t=n.scrollTop/n.scrollHeight;on.current.scrollTop=on.current.scrollHeight*t}},n=Se.getScrollerElement();return n.addEventListener("scroll",e),function(){n.removeEventListener("scroll",e)}}}),[Se,Le]),(0,p.useEffect)((function(){if(Se&&de){var e=function(e,n){de(e,n)};return Se.on("beforeChange",e),function(){Se.off("beforeChange",e)}}}),[Se,de]),(0,p.useEffect)((function(){if(Se&&ue){var e=function(){ue(Se.getValue())};return Se.on("blur",e),function(){Se.off("blur",e)}}}),[Se,ue]),(0,p.useEffect)((function(){if(Se){var e=function(e,n){var t=e.getValue();Re(t),qe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),s&&(z?s(t,vn(t)):s(t))};return Se.on("change",e),function(){Se.off("change",e)}}}),[Se,s]),(0,p.useEffect)((function(){if(Se)if(null==t)Se.setValue(""),Re("");else{var e=window.scrollY||window.pageYOffset;t!==Se.getValue()&&(Se.setValue(t),Re(t),Se.setCursor(je?1:Se.lineCount(),0),window.scrollTo(0,e))}}),[Se,t]);var mn=(0,p.useCallback)((function(e){var n=Se.getCursor(),t=Se.getSelection(),s=t.split("\n");switch(e){case"bold":return Se.replaceSelection("**"+t+"**"),""===t&&Se.setCursor(n.line,n.ch+2),Se.focus();case"italic":return Se.replaceSelection("*"+t+"*"),""===t&&Se.setCursor(n.line,n.ch+1),Se.focus();case"code":return Se.replaceSelection("`"+t+"`"),""===t&&Se.setCursor(n.line,n.ch+1),Se.focus();case"inline-latex":return Se.replaceSelection("`$$"+t+"$$`"),""===t&&Se.setCursor(n.line,n.ch+3),Se.focus();case"latex":return Se.replaceSelection("```latex\n"+t+"\n```"),Se.setCursor(n.line+1,t.length+1),Se.focus();case"line-break":return Se.replaceSelection("<br/>\n"),Se.focus();case"list-ul":return""===t?Se.replaceSelection("- "+t):Se.replaceSelection(s.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),Se.focus();case"list-ol":return""===t?Se.replaceSelection("1. "+t):Se.replaceSelection(s.map((function(e,n){return""===e?"":"".concat(n+1,". ").concat(e)})).join("\n")),Se.focus();case"add-null-ch":return""===t&&Se.setCursor(n.line,n.ch),Se.replaceSelection("▁"),Se.focus();case"add-signal":return""===t&&Se.setCursor(n.line,n.ch),Se.replaceSelection("@▁@"),Se.focus();case"add-multiple":return""===t&&Se.setCursor(n.line,n.ch),Se.replaceSelection(ae),Se.focus();case"inster-template-1":return""===t&&Se.setCursor(n.line,n.ch),Se.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),Se.focus();case"eraser":return Se.setValue(""),Se.focus();case"trigger-watch":return De(!Le),Se.focus();case"trigger-full-screen":return He(!Ve),Se.focus();case $:return void Be($);case X:return void Be(X);case Q:return void Be(Q);case ee:return void Be(ee);default:throw new Error}}),[Se,Le,Ve]),pn=(0,p.useCallback)((function(e){switch(Be(""),ze){case $:var n=e.title,t=e.link;return Se.replaceSelection("[".concat(n,"](").concat(t,")")),Se.focus();case X:var s=e.language,a=e.content;return Se.replaceSelection(["```"+s,a,"```"].join("\n")),Se.focus();case Q:var i=e.src,c=e.alt;return c?Se.replaceSelection(".concat(i,' "').concat(c,'" )')):Se.replaceSelection("")),Se.focus();case ee:for(var l=e.row,r=e.col,o=e.align,u="\n",d=0;d<l;d++){for(var m=[],p=[],h=0;h<r;h++)1===d&&p.push(te[o]),m.push(" ");1===d&&(u+="| ".concat(p.join(" | ")," |\n")),u+="| ".concat(m.join(1===r?"":" | ")," |\n")}return Se.replaceSelection(u+"\n"),Se.focus();default:throw new Error}}),[Se,ze]),hn=(0,p.useMemo)((function(){switch(ze){case $:return(0,j.jsx)(E,{callback:pn,onCancel:fn});case X:return(0,j.jsx)(P.Z,{callback:pn,onCancel:fn});case Q:return(0,j.jsx)(A,{callback:pn,onCancel:fn});case ee:return(0,j.jsx)(J,{callback:pn,onCancel:fn});default:return null}}),[ze]);function fn(){Be("")}(0,p.useEffect)((function(){if(rn.current){var e=function(e){a=!0,i=e.pageY},n=function(){a=!1},t=function(e){if(a){var n=e.pageY-i;n<0&&(n=0),n>300&&(n=300),Qe(d+n+"px")}},s=rn.current,a=!1,i=0;return s.addEventListener("mousedown",e),document.addEventListener("mousemove",t),document.addEventListener("mouseup",n),function(){s.removeEventListener("mousedown",e),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)}}}),[Se,rn]),(0,p.useEffect)((function(){Qe(d)}),[d]);var xn={width:ie(l),height:ie($e)},vn=((0,p.useMemo)((function(){if(We){var e=new Date(We),n=e.getHours(),t=e.getMinutes(),s=e.getSeconds();return t=t<10?"0"+t:t,s=s<10?"0"+s:s,"".concat(n=n<10?"0"+n:n,":").concat(t,":").concat(s)}return 0}),[We]),function(e){var n=[];if(z){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,t,s){n.push({multiLine:!("@▁@"===e)})}))}return n});return(0,j.jsxs)(p.Fragment,{children:[(0,j.jsx)("div",{className:"markdown-editor-wrapper",ref:ln,children:(0,j.jsxs)("div",{className:"markdown-editor-container ".concat(he," ").concat(Le?"on-preview":""," ").concat(_?"mini":""," ").concat(Ve?"full-screen":""),style:xn,children:[(0,j.jsx)(w,{insertTemp:N,watch:Le,fullScreen:Ve,showNullButton:Y,showNullProgramButton:z,onActionCallback:mn,hidetoolBar:G,uuid:tn.current,setOpenPhones:function(){sn.current=!0}}),(0,j.jsxs)("div",{className:"markdown-editor-body",children:[(0,j.jsx)("div",{className:"codemirror-container",children:(0,j.jsx)("textarea",{ref:cn,placeholder:ke})}),Le?(0,j.jsxs)("div",{ref:on,className:"preview-container",children:["stex"===C&&(0,j.jsx)(g,{value:Pe}),"stex"!==C&&(0,j.jsx)(v.Z,{disabledFill:_e,showProgramFill:z,value:Pe})]}):null]})]})}),L?(0,j.jsx)("a",{ref:rn,className:"editor-resize"}):null,(0,j.jsx)(Z.Z,{children:oe[ze]?(0,j.jsx)(K.Z,{centered:!0,title:oe[ze],open:!0,onCancel:fn,footer:null,className:"markdown-popup-form",children:hn}):null})]})}},90463:function(e,n,t){t.d(n,{Z:function(){return p}});var s=t(94312),a=t.n(s),i=t(24127),c=t.n(i),l=t(93242),r=t.n(l),o=t(10564),u=t.n(o),d=t(59301),m=t(4676),p=function(e){r()(t,e);var n=u()(t);function t(e){var s;a()(this,t),s=n.call(this,e);var i=window.document;return s.node=i.createElement("div"),i.body.appendChild(s.node),s}return c()(t,[{key:"render",value:function(){var e=this.props.children;return(0,m.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),t}(d.Component)},86219:function(e,n,t){t.d(n,{Z:function(){return a}});var s=t(59301);function a(e,n){var t=(0,s.useRef)();(0,s.useEffect)((function(){t.current=e})),(0,s.useEffect)((function(){if(null!==n){var e=setInterval((function(){t.current()}),n);return function(){return clearInterval(e)}}}),[n])}},33446:function(e,n,t){t.r(n),t.d(n,{default:function(){return W}});var s=t(10574),a=t.n(s),i=t(39343),c=t.n(i),l=t(26801),r=t.n(l),o=t(11006),u=t.n(o),d=t(59301),m=t(22211),p=t(43418),h=t(78241),f=t(8591),x=t(66104),v=t(95237),j=t(43604),g=t(71418),_=t(28103),y=t(3113),k=t(85731),b=t(6848),w=t(68742),Z=t(47966),N=t(61173),S=t(15830),C=t(22387),I=t(89472),E=t(78075),P=t(9498),R=t.n(P),M=t(67871),T=t(76478),L=t(36554),D=t(1056),A=t(37712),O=(0,m.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.shixunHomeworks,t=e.dispatch,s=(0,m.useParams)(),i=(0,d.useState)(!0),l=u()(i,2),o=(l[0],l[1],h.Z.useForm()),x=u()(o,1)[0];return(0,A.jsx)(A.Fragment,{children:(0,A.jsxs)(p.Z,{centered:!0,title:"调分",open:"调分"===n.actionTabs.key,okText:"确定",cancelText:"取消",onOk:c()(a()().mark((function e(){var i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x.validateFields();case 2:return i=x.getFieldsValue(),e.next=5,(0,S.ZP)("/api/student_works/".concat(n.actionTabs.id,"/adjust_score.json"),{method:"post",body:r()({},i)});case 5:0===e.sent.status&&(f.ZP.success("评阅成功"),x.resetFields(),t({type:"shixunHomeworks/setActionTabs",payload:{}}),t({type:"shixunHomeworks/getStudentWorkCommon",payload:r()({},s)}));case 7:case"end":return e.stop()}}),e)}))),onCancel:function(){t({type:"shixunHomeworks/setActionTabs",payload:{}})},children:[(0,A.jsx)("p",{className:"tc",children:"该学生的最终成绩将不会按照评分规则进行计算"}),(0,A.jsxs)(h.Z,{form:x,layout:"horizontal",children:[(0,A.jsxs)("div",{style:{display:"flex",alignItems:"baseline"},children:[(0,A.jsx)(h.Z.Item,{label:"成绩",name:"score",rules:[{required:!0,message:"请输入!"}],children:(0,A.jsx)(k.Z,{min:0,placeholder:"请填写分数"})}),(0,A.jsx)("span",{className:"ml10",children:"分"})]}),(0,A.jsx)("div",{children:(0,A.jsx)(h.Z.Item,{name:"comment",children:(0,A.jsx)(D.Z.TextArea,{placeholder:"请填写您对作品调分的原因",rows:8})})})]})]})})})),V={flex_box_center:"flex_box_center___tMwax",flex_space_between:"flex_space_between___8GJsg",flex_box_vertical_center:"flex_box_vertical_center___IFELt",flex_box_center_end:"flex_box_center_end___IrFRG",flex_box_column:"flex_box_column___s0LgG",bg:"bg___sFhaA",title:"title___bk4oD",replyList:"replyList___bjk6g","nav-tab":"nav-tab___uLRSr",buttonFixed:"buttonFixed___twN45",exitComment:"exitComment___rlGpw",nextComment:"nextComment___NmNBo",modal:"modal___tWPO8",MdEditor:"MdEditor___AAxeb"},H=t(80416),Y=t(89392),F=t(72286),z=(0,m.connect)((function(e){return{classroomList:e.classroomList,loading:e.loading}}))((function(e){var n=e.classroomList,t=(e.loading,e.dispatch),s=((0,m.useParams)(),h.Z.useForm()),i=u()(s,1)[0];return(0,A.jsx)(p.Z,{centered:!0,title:"补交附件",open:"补交附件"===n.actionTabs.key,bodyStyle:{minHeight:200},onOk:c()(a()().mark((function e(){var s,c,l;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.validateFields();case 2:return c=r()({},i.getFieldValue()),l=n.actionTabs.selectArrs,c.attachment_ids=null===(s=c.attachment_ids)||void 0===s?void 0:s.map((function(e){return e.response.id})),e.next=7,(0,L.mz)(r()(r()({},c),{},{homeworkId:l.work_id}));case 7:0===e.sent.status&&(i.resetFields(),t({type:"shixunHomeworks/getStudentWorkSupplyDetail",payload:r()({},n.actionTabs.params)}),t({type:"classroomList/setActionTabs",payload:{}}));case 9:case"end":return e.stop()}}),e)}))),onCancel:function(){i.resetFields(),t({type:"classroomList/setActionTabs",payload:{}})},children:(0,A.jsxs)(h.Z,{form:i,initialValues:{},children:[(0,A.jsx)(h.Z.Item,{name:"attachment_ids",rules:[{required:!0,message:"请上传附件"}],children:(0,A.jsx)(F.Z,{})}),(0,A.jsx)(h.Z.Item,{name:"description",children:(0,A.jsx)(D.Z.TextArea,{placeholder:"请在此输入补交附件的原因,最大限制100个字符",rows:7})})]})})})),B=t(85578),G=t(58696),J=t(60638),W=(0,m.connect)((function(e){var n=e.shixunHomeworks,t=e.loading,s=e.user;return{shixunHomeworks:n,globalSetting:e.globalSetting,user:s,loading:t.effects}}))((function(e){var n,t,s,i,l,o,P,D,W,q,U,K,$,Q,X,ee,ne,te,se,ae,ie=e.shixunHomeworks,ce=(e.globalSetting,e.loading),le=e.user,re=e.dispatch,oe=(0,m.useSearchParams)(),ue=u()(oe,1)[0],de=(0,m.useParams)(),me=(0,d.useRef)(),pe=le.userInfo,he=ie.studentWorkDetail,fe=ie.studentWorkCommon,xe=ie.studentWorkSupplyDetail,ve=(ie.workList,(0,d.useState)("")),je=u()(ve,2),ge=je[0],_e=je[1],ye=(0,d.useState)({show:!1,type:0,active:null}),ke=u()(ye,2),be=ke[0],we=ke[1],Ze=(0,d.useState)({show:!1,type:0,active:null}),Ne=u()(Ze,2),Se=Ne[0],Ce=Ne[1],Ie=p.Z.useModal(),Ee=u()(Ie,2),Pe=Ee[0],Re=Ee[1],Me=(0,d.useState)({last:!1}),Te=u()(Me,2),Le=Te[0],De=Te[1],Ae=(0,d.useState)({last:!1}),Oe=u()(Ae,2),Ve=Oe[0],He=Oe[1],Ye=h.Z.useForm(),Fe=u()(Ye,1)[0],ze=(0,d.useState)(!1),Be=u()(ze,2),Ge=Be[0],Je=Be[1],We=(0,d.useState)(""),qe=u()(We,2),Ue=qe[0],Ke=qe[1],$e=(0,d.useState)({content:"",type:""}),Qe=u()($e,2),Xe=Qe[0],en=Qe[1],nn=(0,d.useRef)(),tn=((0,m.useLocation)(),function(){re({type:"shixunHomeworks/getStudentWorkCommon",payload:r()({},de)})});function sn(){return sn=c()(a()().mark((function e(){var n,t,s,i,c,l,o,u;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=JSON.parse(sessionStorage.all_student_works_params||"{}"),i={},ue.get("ids")&&(i.course_group=ue.get("ids").split(",")),e.next=5,re({type:"shixunHomeworks/getAllStudentWorks",payload:r()(r()(r()({},de),s),i)});case 5:c=e.sent,(l=null===(n=c.all_student_works)||void 0===n?void 0:n.map((function(e){return String(e.student_work_id)})).indexOf(de.userId))===(null===(t=c.all_student_works)||void 0===t?void 0:t.length)-1?De({last:!0}):De(null===(o=c.all_student_works)||void 0===o?void 0:o[l+1]),He(0===l?{last:!0}:null===(u=c.all_student_works)||void 0===u?void 0:u[l-1]);case 9:case"end":return e.stop()}}),e)}))),sn.apply(this,arguments)}(0,d.useEffect)((function(){re({type:"shixunHomeworks/getStudentWorkDetail",payload:r()({},de)}),re({type:"shixunHomeworks/getStudentWorkSupplyDetail",payload:r()({},de)}),tn(),function(){sn.apply(this,arguments)}(),me.current.onclick=function(e){"IMG"===e.target.nodeName&&""!==e.target.alt&&I.Z.publish("preview-image",e.target.src)}}),[de.categoryId,de.userId]),(0,d.useEffect)((function(){return re({type:"globalSetting/footerToggle",payload:!1}),function(){re({type:"globalSetting/footerToggle",payload:!0})}}),[]);var an=function(e){var n;Pe.confirm({title:"是否确认删除?",onOk:(n=c()(a()().mark((function n(){return a()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,re({type:"shixunHomeworks/deleteReply",payload:{object_id:e.id,object_type:"journals_for_message"}});case 2:0===n.sent.status&&(f.ZP.success("删除成功"),tn());case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},cn=function(e){var n;Pe.confirm({title:"是否确认删除?",onOk:(n=c()(a()().mark((function n(){return a()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,L.QC)({score_id:e.comment_id,userId:de.userId});case 2:0===n.sent.status&&(f.ZP.success("删除成功"),tn());case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},ln=function(){var e=c()(a()().mark((function e(n){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.attachment_ids=null===(t=n.attachment_ids)||void 0===t?void 0:t.map((function(e){var n;return null==e||null===(n=e.response)||void 0===n?void 0:n.id})),e.next=3,(0,L.yy)(r()(r()({},n),{},{userId:de.userId}));case 3:0===e.sent.status&&(Fe.resetFields(),f.ZP.success("提交成功"),tn());case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),rn=function(){var e=c()(a()().mark((function e(n){var t,s,i,c,l;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Fe.getFieldsValue(),s=t.comment,i=t.score,c=t.attachment_ids,l=!(0,Y.isNil)(i),!(s||l||c)){e.next=5;break}return p.Z.confirm({centered:!0,okText:"离开",cancelText:"取消",title:"离开此页提示",content:(0,A.jsx)("div",{className:"tc",children:"系统可能不会保存您所做的更改"}),onOk:function(){Fe.resetFields(),"last"===n?m.history.push(ue.get("ids")?"/classrooms/".concat(null==de?void 0:de.coursesId,"/common_homework/").concat(null==de?void 0:de.categoryId,"/review/").concat(null==Ve?void 0:Ve.student_work_id,"?ids=").concat(ue.get("ids")):"/classrooms/".concat(null==de?void 0:de.coursesId,"/common_homework/").concat(null==de?void 0:de.categoryId,"/review/").concat(null==Ve?void 0:Ve.student_work_id)):"read"===n?m.history.push(ue.get("ids")?"/classrooms/".concat(null==de?void 0:de.coursesId,"/common_homework/").concat(null==de?void 0:de.categoryId,"/review/").concat(null==Le?void 0:Le.student_work_id,"?ids=").concat(ue.get("ids")):"/classrooms/".concat(null==de?void 0:de.coursesId,"/common_homework/").concat(null==de?void 0:de.categoryId,"/review/").concat(null==Le?void 0:Le.student_work_id)):m.history.push("/classrooms/".concat(de.coursesId,"/common_homework/").concat(de.categoryId,"/detail"))}}),e.abrupt("return");case 5:"last"===n?m.history.push(ue.get("ids")?"/classrooms/".concat(null==de?void 0:de.coursesId,"/common_homework/").concat(null==de?void 0:de.categoryId,"/review/").concat(null==Ve?void 0:Ve.student_work_id,"?ids=").concat(ue.get("ids")):"/classrooms/".concat(null==de?void 0:de.coursesId,"/common_homework/").concat(null==de?void 0:de.categoryId,"/review/").concat(null==Ve?void 0:Ve.student_work_id)):"read"===n?m.history.push(ue.get("ids")?"/classrooms/".concat(null==de?void 0:de.coursesId,"/common_homework/").concat(null==de?void 0:de.categoryId,"/review/").concat(null==Le?void 0:Le.student_work_id,"?ids=").concat(ue.get("ids")):"/classrooms/".concat(null==de?void 0:de.coursesId,"/common_homework/").concat(null==de?void 0:de.categoryId,"/review/").concat(null==Le?void 0:Le.student_work_id)):m.history.push("/classrooms/".concat(de.coursesId,"/common_homework/").concat(de.categoryId,"/detail"));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,A.jsxs)("section",{className:"edu-container",ref:me,children:[(0,A.jsxs)("section",{className:"animated fadeIn",children:[(0,A.jsx)("aside",{className:"mt10",children:pe&&(0,A.jsxs)(x.Z,{separator:">",children:[(0,A.jsx)(x.Z.Item,{children:(0,A.jsx)(m.Link,{to:"/classrooms/".concat(de.coursesId,"/common_homework/").concat(null!=he&&null!==(n=he.category)&&void 0!==n&&n.main?"":null==he||null===(t=he.category)||void 0===t?void 0:t.category_id),children:null==pe||null===(s=pe.course)||void 0===s?void 0:s.course_name})}),(0,A.jsx)(x.Z.Item,{children:(0,A.jsx)(m.Link,{to:"/classrooms/".concat(de.coursesId,"/common_homework/").concat(null!=he&&null!==(i=he.category)&&void 0!==i&&i.main?"":null==he||null===(l=he.category)||void 0===l?void 0:l.category_id),children:null==he||null===(o=he.category)||void 0===o?void 0:o.category_name})}),(0,A.jsx)(x.Z.Item,{children:(0,A.jsx)(m.Link,{to:"/classrooms/".concat(de.coursesId,"/common_homework/").concat(de.categoryId,"/detail"),children:"作业详情"})}),(0,A.jsx)(x.Z.Item,{children:null==he?void 0:he.author_name})]})}),(0,A.jsx)("aside",{className:[V.title,"mt20"].join(" "),children:(0,A.jsxs)(v.Z,{style:{width:"100%"},children:[(0,A.jsxs)(j.Z,{flex:"1",children:[(0,A.jsx)(m.Link,{to:"/classrooms/".concat(de.coursesId,"/common_homework"),children:(0,A.jsx)(w.Z,{className:"font16 c-black"})}),(0,A.jsx)("strong",{className:"font20 ml5",children:null==he?void 0:he.homework_name}),(0,A.jsx)(B.VV,{status:null==he?void 0:he.homework_status})]}),(0,A.jsx)(j.Z,{children:(0,G.dE)()&&(null==he||null===(P=he.homework_status)||void 0===P?void 0:P.includes("补交中"))&&(0,A.jsx)("span",{onClick:function(){re({type:"classroomList/setActionTabs",payload:{key:"补交附件",params:de,selectArrs:{homework_id:de.commonHomeworkId,work_id:de.userId}}})},className:"c-blue current font14",children:"补交附件"})})]})})]}),(0,A.jsx)("ul",{className:V["nav-tab"],children:(0,A.jsx)("li",{className:"active",children:"作业详情"})}),(0,A.jsx)("section",{className:[V.bg,"pt30","pl30","pr30","pb30"].join(" "),children:(0,A.jsxs)(g.Z,{spinning:ce["shixunHomeworks/getStudentWorkDetail"]||ce["shixunHomeworks/getStudentWorkSupplyDetail"],children:[(null==he?void 0:he.description)&&(0,A.jsxs)("aside",{children:[(0,A.jsxs)("div",{className:"font16",children:["内容",(0,A.jsx)("span",{style:{color:"#FA6400",fontSize:14},children:"(当前支持批注的文档类型:.docx、.xlsx、.pptx)"})]}),(0,A.jsx)("div",{className:"mt20",children:(0,A.jsx)(H.Z,{value:(null==he?void 0:he.description)||"暂无~"})}),(0,A.jsx)(T.Z,{authority:(0,G.GJ)(),callback:function(){re({type:"shixunHomeworks/getStudentWorkDetail",payload:r()({},de)})},dataSource:null==he?void 0:he.attachments}),(0,A.jsxs)("aside",{className:"tr",children:[(0,A.jsx)("span",{className:" c-light-black",children:R()(he.commit_time).format("YYYY-MM-DD HH:mm")}),(0,A.jsx)("span",{className:"ml10",children:he.commit_user_name}),(0,A.jsx)("span",{className:"ml10 c-light-black",children:"提交"}),(0,A.jsx)("span",{className:"ml30 c-light-black",children:R()(he.update_time).format("YYYY-MM-DD HH:mm")}),(0,A.jsx)("span",{className:"ml10",children:he.update_user_name}),(0,A.jsx)("span",{className:"ml10 c-light-black",children:"更新"})]})]}),(null==he?void 0:he.redo_description)&&(0,A.jsxs)("aside",{children:[(0,A.jsx)(_.Z,{}),(0,A.jsx)("div",{className:"font16",children:"重做记录"}),(0,A.jsx)("div",{className:"pl30 mt20",children:(0,A.jsx)(H.Z,{value:(null==he?void 0:he.redo_description)||"暂无~"})}),(0,A.jsx)(T.Z,{authority:(0,G.GJ)(),callback:function(){re({type:"shixunHomeworks/getStudentWorkDetail",payload:r()({},de)})},dataSource:null==he?void 0:he.redo_attachments}),(0,A.jsxs)("aside",{className:"tr",children:[(0,A.jsx)("span",{className:" c-light-black",children:R()(he.redo_commit_time).format("YYYY-MM-DD HH:mm")}),(0,A.jsx)("span",{className:"ml10",children:he.commit_user_name}),(0,A.jsx)("span",{className:"ml10 c-light-black",children:"提交"}),(0,A.jsx)("span",{className:"ml30 c-light-black",children:R()(he.redo_update_time).format("YYYY-MM-DD HH:mm")}),(0,A.jsx)("span",{className:"ml10",children:he.update_user_name}),(0,A.jsx)("span",{className:"ml10 c-light-black",children:"更新"})]})]}),(null==xe?void 0:xe.revise_reason)&&(0,A.jsxs)("aside",{children:[(0,A.jsx)(_.Z,{}),(0,A.jsx)("div",{className:"font16",children:"补交内容"}),(0,A.jsx)("div",{className:"pl30 mt20",children:(0,A.jsx)(H.Z,{value:(null==xe?void 0:xe.revise_reason)||"暂无~"})}),(0,A.jsx)(T.Z,{authority:(0,G.GJ)(),callback:function(){re({type:"shixunHomeworks/getStudentWorkSupplyDetail",payload:r()({},de)})},dataSource:null==xe?void 0:xe.revise_attachments}),(0,A.jsxs)("aside",{className:"tr",children:[(0,A.jsx)("span",{className:"ml30 c-light-black",children:R()(xe.atta_update_time).format("YYYY-MM-DD HH:mm")}),(0,A.jsx)("span",{className:"ml10",children:xe.atta_update_user}),(0,A.jsx)("span",{className:"ml10 c-light-black",children:"更新"})]})]})]})}),(null==he?void 0:he.anonymous_comment)&&(0,G.G5)()&&(0,A.jsxs)("section",{className:[V.bg,"mt30","pt30","pl30","pr30","pb30"].join(" "),children:[(0,A.jsx)("p",{children:"匿评学生"}),!(null==he||null===(D=he.no_commented_user_names)||void 0===D||!D.length)&&(0,A.jsxs)("p",{children:["未完成匿评:",he.no_commented_user_names.join("、")]}),(0,A.jsxs)("div",{children:["已完成匿评:",null===(W=he.commented_user_names)||void 0===W?void 0:W.join("、")]})]}),((0,G.RV)()||(null==he||null===(q=he.homework_status)||void 0===q?void 0:q.includes("匿评中")))&&(0,A.jsxs)("section",{children:[(0,A.jsxs)("aside",{className:[V.replyList,"bg-white"].join(" "),children:[(0,A.jsxs)(v.Z,{gutter:[10,20],children:[(0,A.jsx)(j.Z,{flex:1}),(0,A.jsx)(j.Z,{style:{lineHeight:"40px"},children:(0,G.GJ)()&&(null==fe?void 0:fe.ultimate)&&(0,A.jsx)("span",{className:"font-16 c-blue current",onClick:function(){re({type:"shixunHomeworks/setActionTabs",payload:{key:"调分",selectArrs:he,id:de.userId,params:de}})},children:"调分"})}),(0,A.jsx)(j.Z,{children:(0,G.G5)()&&((null==he||null===(U=he.homework_status)||void 0===U?void 0:U.includes("提交中"))||(null==he||null===(K=he.homework_status)||void 0===K?void 0:K.includes("补交中"))||(null==he||null===($=he.homework_status)||void 0===$?void 0:$.includes("进行中")))&&(0,A.jsx)(y.ZP,{style:{width:"124px",height:"40px"},type:"primary",onClick:function(){return Je(!0)},children:"打回重做"})})]}),!fe.is_author&&!(null!=fe&&fe.ultimate)&&((0,G.GJ)()||(null==he||null===(Q=he.homework_status)||void 0===Q?void 0:Q.includes("匿评中")))&&(0,A.jsx)("aside",{children:(0,A.jsxs)(h.Z,{layout:"vertical",form:Fe,onFinish:function(e){return ln(e)},children:[(0,A.jsx)(h.Z.Item,{label:"评语",name:"comment",rules:[{required:!0,message:"请输入评语"}],children:(0,A.jsx)(C.Z,{placeholder:"请输入评语",defaultValue:"",height:250})}),(0,A.jsx)("div",{children:(0,A.jsx)(h.Z.Item,{name:"attachment_ids",children:(0,A.jsx)(F.Z,{})})}),(0,A.jsx)("div",{className:"mt10",children:(0,A.jsxs)(v.Z,{children:[(0,A.jsx)(j.Z,{flex:"1",children:(0,A.jsxs)(v.Z,{align:"middle",justify:"start",children:[(0,A.jsx)(j.Z,{children:(0,A.jsx)(h.Z.Item,{noStyle:!0,name:"score",rules:[{required:!(0,G.GJ)(),message:"请填写分数"}],children:(0,A.jsx)(k.Z,{step:.1,min:0,style:{width:100},size:"middle",placeholder:"请填写分数"})})}),(0,A.jsx)(j.Z,{children:(0,A.jsx)("span",{className:"ml5 mr20",children:"分"})})]})}),(0,A.jsx)(j.Z,{})]})}),(0,G.GJ)()&&(0,A.jsx)(h.Z.Item,{label:"仅课堂老师可见",name:"hidden_comment",style:{marginTop:10},children:(0,A.jsx)(C.Z,{placeholder:"请输入评语",defaultValue:"",height:250})}),(0,A.jsx)("aside",{className:"".concat(V.buttonFixed),children:(0,A.jsx)("aside",{className:"edu-container",children:(0,A.jsxs)(v.Z,{align:"middle",children:[(0,A.jsx)(j.Z,{flex:"1",children:(0,A.jsx)(y.ZP,{type:"default",onClick:function(){return rn("list")},children:"返回列表"})}),(0,A.jsxs)(j.Z,{flex:"1",className:"tr",children:[!(0,G.dE)()&&(0,A.jsx)(y.ZP,{type:"default",onClick:function(){return rn("last")},disabled:null==Ve?void 0:Ve.last,children:"上一个"}),!(0,G.dE)()&&(0,A.jsx)(y.ZP,{type:"default",disabled:null==Le?void 0:Le.last,style:{marginLeft:"20px",marginRight:"20px"},onClick:function(){return rn("read")},children:"下一个"}),(0,A.jsx)(y.ZP,{htmlType:"submit",type:"primary",children:"提交评阅"})]})]})})})]})})]}),((0,G.RV)()||(null==he||null===(X=he.homework_status)||void 0===X?void 0:X.includes("匿评中"))||(null==he||null===(ee=he.homework_status)||void 0===ee?void 0:ee.includes("申诉中")))&&(0,A.jsxs)("aside",{className:[V.replyList,"bg-white"].join(" "),children:[(0,A.jsxs)("p",{style:{color:"#000000",fontWeight:500},children:["点评内容(",null==fe||null===(ne=fe.comment_scores)||void 0===ne?void 0:ne.length,")"]}),(0,A.jsx)(_.Z,{}),null==fe||null===(te=fe.comment_scores)||void 0===te?void 0:te.map((function(e,n){var t,s,i,l,r,o;return(0,A.jsxs)("aside",{children:[(0,A.jsxs)(v.Z,{gutter:[12,12],children:[(0,A.jsxs)(j.Z,{flex:"40px",children:["--"===(null==e?void 0:e.user_image_url)&&(0,A.jsx)("img",{className:V.headpic,width:"40",src:J.xp}),"--"!==(null==e?void 0:e.user_image_url)&&(0,A.jsx)("img",{className:V.headpic,width:"40",src:"".concat(M.Z.IMG_SERVER,"/images/").concat(null==e?void 0:e.user_image_url)})]}),(0,A.jsxs)(j.Z,{flex:"1",children:[(0,A.jsxs)(v.Z,{align:"middle",children:[(0,A.jsx)(j.Z,{span:24,children:(0,A.jsxs)(v.Z,{children:[(0,A.jsxs)(j.Z,{flex:1,children:[(0,A.jsx)("span",{className:"c-light-black",children:null==e?void 0:e.user_name}),(0,A.jsx)("span",{className:"c-light-black ml10",children:R()(null==e?void 0:e.comment_time).format("YYYY-MM-DD HH:mm")}),null!==e.score&&(0,A.jsxs)("span",{className:"ml30 c-orange",children:[e.score,"分"]})]}),(0,A.jsx)(j.Z,{children:(0,A.jsxs)("aside",{children:[e.delete&&(0,A.jsx)("span",{className:"c-blue current",onClick:function(){cn(e)},children:"删除"}),e.can_appeal&&(0,A.jsx)("span",{className:"c-blue current",onClick:function(){we({show:!0,type:1,active:n})},children:"申诉"}),e.can_reply&&(0,A.jsx)("span",{className:"c-blue current ml10",onClick:function(){return we({show:!0,type:0,active:n})},children:"回复"}),!e.can_reply&&(0,A.jsx)("span",{className:"c-light-black ml10",children:"失效"})]})})]})}),(0,A.jsxs)(j.Z,{span:24,children:[e.content&&(0,A.jsx)(H.Z,{value:e.content}),!e.content&&(0,A.jsx)("span",{className:"c-light-black",children:"暂未写评语"}),null==e||null===(t=e.attachments)||void 0===t?void 0:t.map((function(e,n){return(0,A.jsx)("div",{children:(0,A.jsxs)("a",{href:"".concat(M.Z.API_SERVER).concat(e.url),children:[(0,A.jsx)("span",{className:"iconfont icon-fujian c-green font14"}),(0,A.jsx)("span",{className:"ml10 c-black",children:e.title}),(0,A.jsx)("span",{className:"c-light-black ml20 font12",children:e.filesize})]})},n)}))]}),(0,A.jsxs)("div",{className:"w100",children:[(0,A.jsx)(_.Z,{}),(0,A.jsxs)("aside",{className:[V.comment,"w100"].join(" "),children:[e.appeal_info&&""!=e.appeal_info&&(0,A.jsx)("aside",{children:(0,A.jsx)(v.Z,{children:(0,A.jsx)(j.Z,{span:24,children:(0,A.jsxs)(v.Z,{children:[(0,A.jsxs)(j.Z,{flex:"50px",children:["--"===(null==e||null===(s=e.appeal_info)||void 0===s?void 0:s.user_image_url)&&(0,A.jsx)("img",{className:V.headpic,width:"40",src:J.xp}),"--"!==(null==e||null===(i=e.appeal_info)||void 0===i?void 0:i.user_image_url)&&(0,A.jsx)("img",{className:V.headpic,width:"40",src:"".concat(M.Z.IMG_SERVER,"/images/").concat(null==e||null===(l=e.appeal_info)||void 0===l?void 0:l.user_image_url)})]}),(0,A.jsxs)(j.Z,{flex:"1",children:[(0,A.jsxs)(v.Z,{children:[(0,A.jsxs)(j.Z,{flex:"1",children:[null==e||null===(r=e.appeal_info)||void 0===r?void 0:r.user_name,(0,A.jsx)("span",{className:"c-light-black ml10",children:R()(null==e||null===(o=e.appeal_info)||void 0===o?void 0:o.time).format("YYYY-MM-DD HH:mm")}),1===(null==e?void 0:e.appeal_status)&&(0,A.jsx)("span",{className:"tag-style bg-blue ml10",children:"申诉中"}),2===(null==e?void 0:e.appeal_status)&&(0,A.jsx)("span",{className:"tag-style bg-grey-ede c-light-black ml10",children:"申诉已撤销"}),3===(null==e?void 0:e.appeal_status)&&(0,A.jsx)("span",{className:"tag-style bg-blue ml10",children:"申诉成功"}),4===(null==e?void 0:e.appeal_status)&&(0,A.jsx)("span",{className:"tag-style bg-grey-ede c-light-black ml10",children:"申诉被拒绝"}),5===(null==e?void 0:e.appeal_status)&&(0,A.jsx)("span",{className:"tag-style bg-grey-ede c-light-black ml10",children:"申诉失败"})]}),(0,A.jsxs)(j.Z,{children:[1===(null==e?void 0:e.appeal_status)&&e.can_appeal&&(0,A.jsx)("span",{onClick:function(){var e;p.Z.confirm({title:(0,A.jsxs)("div",{children:["撤销申诉后,无法再对本评阅记录进行申诉",(0,A.jsx)("br",{}),"是否确认撤销申诉"]}),onOk:(e=c()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:tn();case 1:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},className:"c-blue current",children:"撤销申诉"}),1===(null==e?void 0:e.appeal_status)&&(0,G.GJ)()&&(0,A.jsx)("span",{onClick:function(){var n;p.Z.confirm({title:(0,A.jsxs)("div",{children:["此匿评成绩将被废弃,评阅人的作品将被违规扣分",(0,A.jsx)("br",{}),"是否确认接受申诉"]}),onOk:(n=c()(a()().mark((function n(){var t;return a()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,S.ZP)("/api/student_works/".concat(de.userId,"/deal_appeal_score.json"),{method:"post",body:{score_id:e.score_id,status:3}});case 2:0===(null==(t=n.sent)?void 0:t.status)&&tn();case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},className:"c-red current",children:"接受申诉"}),1===(null==e?void 0:e.appeal_status)&&(0,G.GJ)()&&(0,A.jsx)("span",{onClick:function(){var n;p.Z.confirm({title:(0,A.jsxs)("div",{children:["此匿评成绩将被认为合理",(0,A.jsx)("br",{}),"是否确认拒绝申诉"]}),onOk:(n=c()(a()().mark((function n(){var t;return a()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,S.ZP)("/api/student_works/".concat(de.userId,"/deal_appeal_score.json"),{method:"post",body:{score_id:e.score_id,status:4}});case 2:0===(null==(t=n.sent)?void 0:t.status)&&tn();case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},className:"c-light-black current ml10",children:"拒绝申诉"})]})]}),(0,A.jsx)(H.Z,{value:null==e?void 0:e.appeal_info.content})]}),(0,A.jsx)(j.Z,{})]})})})}),e.journals.map((function(n,t){var s,a,i,c;return(0,A.jsxs)("aside",{children:[(0,A.jsx)(v.Z,{children:(0,A.jsx)(j.Z,{span:24,children:(0,A.jsxs)(v.Z,{children:[(0,A.jsxs)(j.Z,{flex:"50px",children:["--"===(null==n||null===(s=n.user_info)||void 0===s?void 0:s.user_image_url)&&(0,A.jsx)("img",{className:V.headpic,width:"40",src:J.xp}),"--"!==(null==n||null===(a=n.user_info)||void 0===a?void 0:a.user_image_url)&&(0,A.jsx)("img",{className:V.headpic,width:"40",src:"".concat(M.Z.IMG_SERVER,"/images/").concat(null==n||null===(i=n.user_info)||void 0===i?void 0:i.user_image_url)})]}),(0,A.jsxs)(j.Z,{flex:"1",children:[null==n||null===(c=n.user_info)||void 0===c?void 0:c.user_name,(0,A.jsx)("span",{className:"c-light-black ml10",children:R()(null==n?void 0:n.time).format("YYYY-MM-DD HH:mm")}),(0,A.jsx)(H.Z,{value:n.content})]}),(0,A.jsx)(j.Z,{children:(null==n?void 0:n.can_delete)&&(0,A.jsx)(b.Z,{title:"删除",children:(0,A.jsx)(Z.Z,{className:"current c-light-black",onClick:function(){an(n)}})})})]})})},t),t!==e.journals.length-1&&(0,A.jsx)(_.Z,{})]},t)}))]})]})]}),be.show&&n===be.active&&(0,A.jsxs)("aside",{className:["bg-white"].join(" "),children:[(0,A.jsx)(C.Z,{onChange:function(e){_e(e)},height:150,isFocus:!0,watch:!0}),(0,A.jsx)(v.Z,{children:(0,A.jsxs)(j.Z,{span:24,className:"tr",children:[(0,A.jsx)(y.ZP,{type:"default",size:"middle",onClick:c()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:we({show:!1,type:0,active:n});case 1:case"end":return e.stop()}}),e)}))),children:"取消"}),(0,A.jsx)(y.ZP,{type:"primary",size:"middle",className:"ml20",onClick:c()(a()().mark((function t(){var s;return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(""!==ge){t.next=4;break}f.ZP.error("请输入内容"),t.next=14;break;case 4:if(0!==be.type){t.next=10;break}return t.next=7,(0,L.qP)({comment:ge,userId:de.userId,score_id:e.score_id});case 7:s=t.sent,t.next=13;break;case 10:return t.next=12,(0,L.R$)({comment:ge,score_id:e.score_id,userId:de.userId});case 12:s=t.sent;case 13:0===s.status&&(f.ZP.success("操作成功"),we({show:!1,type:0,active:n}),tn());case 14:case"end":return t.stop()}}),t)}))),children:0===be.type?"回复":"申诉"})]})})]})]})]},n),(0,A.jsx)(_.Z,{})]},n)}))]}),(0,G.GJ)()&&(0,A.jsxs)("aside",{className:[V.replyList,"bg-white"].join(" "),children:[(0,A.jsxs)("p",{style:{color:"#000000",fontWeight:500},children:["点评内容-仅课堂老师可见(",null==fe||null===(se=fe.hidden_comment_scores)||void 0===se?void 0:se.length,")"]}),(0,A.jsx)(_.Z,{}),null==fe||null===(ae=fe.hidden_comment_scores)||void 0===ae?void 0:ae.map((function(e,n){var t,s,i,l,r,o;return(0,A.jsxs)("aside",{children:[(0,A.jsxs)(v.Z,{gutter:[12,12],children:[(0,A.jsxs)(j.Z,{flex:"40px",children:["--"===(null==e?void 0:e.user_image_url)&&(0,A.jsx)("img",{className:V.headpic,width:"40",src:J.xp}),"--"!==(null==e?void 0:e.user_image_url)&&(0,A.jsx)("img",{className:V.headpic,width:"40",src:"".concat(M.Z.IMG_SERVER,"/images/").concat(null==e?void 0:e.user_image_url)})]}),(0,A.jsxs)(j.Z,{flex:"1",children:[(0,A.jsxs)(v.Z,{align:"middle",children:[(0,A.jsx)(j.Z,{span:24,children:(0,A.jsxs)(v.Z,{children:[(0,A.jsxs)(j.Z,{flex:1,children:[(0,A.jsx)("span",{className:"c-light-black",children:null==e?void 0:e.user_name}),(0,A.jsx)("span",{className:"c-light-black ml10",children:R()(null==e?void 0:e.comment_time).format("YYYY-MM-DD HH:mm")})]}),(0,A.jsx)(j.Z,{children:0===n?(0,A.jsxs)("aside",{children:[e.delete&&(0,A.jsx)("span",{className:"c-blue current",onClick:function(){cn(e)},children:"删除"}),e.can_appeal&&(0,A.jsx)("span",{className:"c-blue current",onClick:function(){Ce({show:!0,type:1,active:n})},children:"申诉"}),e.can_reply&&(0,A.jsx)("span",{className:"c-blue current ml10",onClick:function(){return Ce({show:!0,type:0,active:n})},children:"回复"})]}):(0,A.jsxs)("aside",{children:[e.delete&&(0,A.jsx)("span",{className:"c-blue current",onClick:function(){cn(e)},children:"删除"}),e.can_appeal&&(0,A.jsx)("span",{className:"c-blue current",onClick:function(){Ce({show:!0,type:1,active:n})},children:"申诉"}),e.can_reply&&(0,A.jsx)("span",{className:"c-blue current ml10",onClick:function(){return Ce({show:!0,type:0,active:n})},children:"回复"}),!e.can_reply&&(0,A.jsx)("span",{className:"c-light-black ml10",children:"失效"})]})})]})}),(0,A.jsxs)(j.Z,{span:24,children:[e.hidden_comment&&(0,A.jsx)(H.Z,{value:e.hidden_comment}),!e.hidden_comment&&(0,A.jsx)("span",{className:"c-light-black",children:"暂未写评语"}),null==e||null===(t=e.attachments)||void 0===t?void 0:t.map((function(e,n){return(0,A.jsx)("div",{children:(0,A.jsxs)("a",{href:"".concat(M.Z.API_SERVER).concat(e.url),children:[(0,A.jsx)("span",{className:"iconfont icon-fujian c-green font14"}),(0,A.jsx)("span",{className:"ml10 c-black",children:e.title}),(0,A.jsx)("span",{className:"c-light-black ml20 font12",children:e.filesize})]})},n)}))]}),(0,A.jsxs)("div",{className:"w100",children:[(0,A.jsx)(_.Z,{}),(0,A.jsxs)("aside",{className:[V.comment,"w100"].join(" "),children:[e.appeal_info&&""!=e.appeal_info&&(0,A.jsx)("aside",{children:(0,A.jsx)(v.Z,{children:(0,A.jsx)(j.Z,{span:24,children:(0,A.jsxs)(v.Z,{children:[(0,A.jsxs)(j.Z,{flex:"50px",children:["--"===(null==e||null===(s=e.appeal_info)||void 0===s?void 0:s.user_image_url)&&(0,A.jsx)("img",{className:V.headpic,width:"40",src:J.xp}),"--"!==(null==e||null===(i=e.appeal_info)||void 0===i?void 0:i.user_image_url)&&(0,A.jsx)("img",{className:V.headpic,width:"40",src:"".concat(M.Z.IMG_SERVER,"/images/").concat(null==e||null===(l=e.appeal_info)||void 0===l?void 0:l.user_image_url)})]}),(0,A.jsxs)(j.Z,{flex:"1",children:[(0,A.jsxs)(v.Z,{children:[(0,A.jsxs)(j.Z,{flex:"1",children:[null==e||null===(r=e.appeal_info)||void 0===r?void 0:r.user_name,(0,A.jsx)("span",{className:"c-light-black ml10",children:R()(null==e||null===(o=e.appeal_info)||void 0===o?void 0:o.time).format("YYYY-MM-DD HH:mm")}),1===(null==e?void 0:e.appeal_status)&&(0,A.jsx)("span",{className:"tag-style bg-blue ml10",children:"申诉中"}),2===(null==e?void 0:e.appeal_status)&&(0,A.jsx)("span",{className:"tag-style bg-grey-ede c-light-black ml10",children:"申诉已撤销"}),3===(null==e?void 0:e.appeal_status)&&(0,A.jsx)("span",{className:"tag-style bg-blue ml10",children:"申诉成功"}),4===(null==e?void 0:e.appeal_status)&&(0,A.jsx)("span",{className:"tag-style bg-grey-ede c-light-black ml10",children:"申诉被拒绝"}),5===(null==e?void 0:e.appeal_status)&&(0,A.jsx)("span",{className:"tag-style bg-grey-ede c-light-black ml10",children:"申诉失败"})]}),(0,A.jsxs)(j.Z,{children:[1===(null==e?void 0:e.appeal_status)&&e.can_appeal&&(0,A.jsx)("span",{onClick:function(){var e;p.Z.confirm({title:(0,A.jsxs)("div",{children:["撤销申诉后,无法再对本评阅记录进行申诉",(0,A.jsx)("br",{}),"是否确认撤销申诉"]}),onOk:(e=c()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:tn();case 1:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},className:"c-blue current",children:"撤销申诉"}),1===(null==e?void 0:e.appeal_status)&&(0,G.GJ)()&&(0,A.jsx)("span",{onClick:function(){var n;p.Z.confirm({title:(0,A.jsxs)("div",{children:["此匿评成绩将被废弃,评阅人的作品将被违规扣分",(0,A.jsx)("br",{}),"是否确认接受申诉"]}),onOk:(n=c()(a()().mark((function n(){var t;return a()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,S.ZP)("/api/student_works/".concat(de.userId,"/deal_appeal_score.json"),{method:"post",body:{score_id:e.score_id,status:3}});case 2:0===(null==(t=n.sent)?void 0:t.status)&&tn();case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},className:"c-red current",children:"接受申诉"}),1===(null==e?void 0:e.appeal_status)&&(0,G.GJ)()&&(0,A.jsx)("span",{onClick:function(){var n;p.Z.confirm({title:(0,A.jsxs)("div",{children:["此匿评成绩将被认为合理",(0,A.jsx)("br",{}),"是否确认拒绝申诉"]}),onOk:(n=c()(a()().mark((function n(){var t;return a()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,S.ZP)("/api/student_works/".concat(de.userId,"/deal_appeal_score.json"),{method:"post",body:{score_id:e.score_id,status:4}});case 2:0===(null==(t=n.sent)?void 0:t.status)&&tn();case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},className:"c-light-black current ml10",children:"拒绝申诉"})]})]}),(0,A.jsx)(H.Z,{value:null==e?void 0:e.appeal_info.content})]}),(0,A.jsx)(j.Z,{})]})})})}),e.journals.map((function(n,t){var s,a,i,c;return(0,A.jsxs)("aside",{children:[(0,A.jsx)(v.Z,{children:(0,A.jsx)(j.Z,{span:24,children:(0,A.jsxs)(v.Z,{children:[(0,A.jsxs)(j.Z,{flex:"50px",children:["--"===(null==n||null===(s=n.user_info)||void 0===s?void 0:s.user_image_url)&&(0,A.jsx)("img",{className:V.headpic,width:"40",src:J.xp}),"--"!==(null==n||null===(a=n.user_info)||void 0===a?void 0:a.user_image_url)&&(0,A.jsx)("img",{className:V.headpic,width:"40",src:"".concat(M.Z.IMG_SERVER,"/images/").concat(null==n||null===(i=n.user_info)||void 0===i?void 0:i.user_image_url)})]}),(0,A.jsxs)(j.Z,{flex:"1",children:[null==n||null===(c=n.user_info)||void 0===c?void 0:c.user_name,(0,A.jsx)("span",{className:"c-light-black ml10",children:R()(null==n?void 0:n.time).format("YYYY-MM-DD HH:mm")}),(0,A.jsx)(H.Z,{value:n.hidden_comment})]}),(0,A.jsx)(j.Z,{children:(null==n?void 0:n.can_delete)&&(0,A.jsx)(b.Z,{title:"删除",children:(0,A.jsx)(Z.Z,{className:"current c-light-black",onClick:function(){an(n)}})})})]})})},t),t!==e.journals.length-1&&(0,A.jsx)(_.Z,{})]},t)}))]})]})]}),Se.show&&n===Se.active&&(0,A.jsxs)("aside",{className:["bg-white"].join(" "),children:[(0,A.jsx)(C.Z,{onChange:function(e){_e(e)},height:150,isFocus:!0,watch:!0}),(0,A.jsx)(v.Z,{children:(0,A.jsxs)(j.Z,{span:24,className:"tr",children:[(0,A.jsx)(y.ZP,{type:"default",size:"middle",onClick:c()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ce({show:!1,type:0,active:n});case 1:case"end":return e.stop()}}),e)}))),children:"取消"}),(0,A.jsx)(y.ZP,{type:"primary",size:"middle",className:"ml20",onClick:c()(a()().mark((function t(){var s;return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(""!==ge){t.next=4;break}f.ZP.error("请输入内容"),t.next=14;break;case 4:if(0!==Se.type){t.next=10;break}return t.next=7,(0,L.qP)({hidden_comment:ge,userId:de.userId,score_id:e.score_id});case 7:s=t.sent,t.next=13;break;case 10:return t.next=12,(0,L.R$)({comment:ge,score_id:e.score_id,userId:de.userId});case 12:s=t.sent;case 13:0===s.status&&(f.ZP.success("操作成功"),Ce({show:!1,type:0,active:n}),tn());case 14:case"end":return t.stop()}}),t)}))),children:0===Se.type?"回复":"申诉"})]})})]})]})]},n),(0,A.jsx)(_.Z,{})]},n)}))]})]}),(0,A.jsx)(O,{}),(0,A.jsx)(z,{}),(0,A.jsx)(N.Z,{}),(0,A.jsx)(p.Z,{title:"确认打回重做",open:Ge,destroyOnClose:!0,forceRender:!0,onCancel:function(){Je(!1)},onOk:c()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ue){e.next=3;break}return f.ZP.info("评语不能为空"),e.abrupt("return");case 3:return e.next=5,(0,S.ZP)("/api/student_works/".concat(de.userId,"/redo_modal.json"),{method:"post",body:{comment:Ue,id:de.userId}});case 5:0===(null==(n=e.sent)?void 0:n.status)&&(f.ZP.info("打回重做成功"),Je(!1),tn());case 7:case"end":return e.stop()}}),e)}))),width:700,children:(0,A.jsxs)("div",{style:{padding:"32px"},children:[(0,A.jsxs)("span",{children:["确认将",null==he?void 0:he.author_name,"的作业打回重做吗"]}),(0,A.jsxs)("div",{style:{marginTop:"20px"},children:[(0,A.jsxs)("label",{children:[(0,A.jsx)("span",{style:{marginRight:"5px",color:"red"},children:"*"}),"评语:"]}),(0,A.jsx)(C.Z,{className:V.MdEditor,onChange:function(e){return Ke(e)},defaultValue:"",height:250})]})]})}),Re,(0,A.jsx)(E.Z,{close:!0,data:null==Xe?void 0:Xe.content,type:null==Xe?void 0:Xe.type,hasMask:!0,monacoEditor:{value:nn.current,language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onClose:function(){return en({content:"",type:""})}})]})}))},68074:function(e,n,t){t.d(n,{$J:function(){return r},JZ:function(){return u},bN:function(){return p},jP:function(){return m},rO:function(){return o}});var s=t(10574),a=t.n(s),i=t(39343),c=t.n(i),l=t(15830);function r(e){return(0,l.U2)("libraries/".concat(e,".json"))}function o(){return(0,l.U2)("library_tags.json")}function u(e){return d.apply(this,arguments)}function d(){return(d=c()(a()().mark((function e(n){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.IV)("attachments/".concat(n,".json"));case 2:return t=e.sent,e.abrupt("return",0===t.status);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e){return(0,l.v_)("libraries.json",e)}function p(e,n){return(0,l.gz)("libraries/".concat(e,".json"),n)}}}]); |