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.
NewEduCoderBuild/p__Classrooms__Lists__Gradu...

1 line
50 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[21578,88314],{68742:function(e,n,t){t.d(n,{Z:function(){return l}});var a=t(38329),r=t(59301),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},c=t(91851),o=function(e,n){return r.createElement(c.Z,(0,a.Z)({},e,{ref:n,icon:i}))};var l=r.forwardRef(o)},47966:function(e,n,t){t.d(n,{Z:function(){return l}});var a=t(38329),r=t(59301),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},c=t(91851),o=function(e,n){return r.createElement(c.Z,(0,a.Z)({},e,{ref:n,icon:i}))};var l=r.forwardRef(o)},11419:function(e,n,t){t.d(n,{Z:function(){return l}});var a=t(38329),r=t(59301),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z"}}]},name:"like",theme:"outlined"},c=t(91851),o=function(e,n){return r.createElement(c.Z,(0,a.Z)({},e,{ref:n,icon:i}))};var l=r.forwardRef(o)},51811:function(e,n,t){function a(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 r(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=[],a=0;a<e.length;a++){var r=e[a],i=n?"".concat(n,"/").concat(r.name):"".concat(r.name);t.push({title:r.name,isLeaf:"tree"!==r.type,key:i})}return t}function i(e,n,t){for(var a=0;a<e.length;a++){var r=e[a];if(r.key===n){r.children=t;break}r.children&&i(r.children,n,t)}return e}function c(e,n,t){var a;return function(){var r=this,i=arguments,c=function(){a=null,t||e.apply(r,i)},o=t&&!a;clearTimeout(a),a=setTimeout(c,n),o&&e.apply(r,i)}}t.d(n,{Ax:function(){return i},Ds:function(){return c},KI:function(){return o},SI:function(){return r},f1:function(){return a}});var o=t(67871).Z.API_SERVER},74921:function(e,n,t){t.d(n,{h:function(){return x}});var a=t(26801),r=t.n(a),i=t(11006),c=t.n(i),o=t(59301),l=t(57809),s=t(78241),u=t(3113),d=t(89780),p=t.n(d),f=(t(83164),t(45215),t(37712)),m=l.default.Option,h={labelCol:{span:4},wrapperCol:{span:20}},g={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 x(e){var n=e.value,t=e.onChange,a=e.mode,i=e.options,l=void 0===i?{}:i,s=(0,o.useRef)(),u=(0,o.useState)(),d=c()(u,2),m=d[0],h=d[1];return(0,o.useEffect)((function(){if(m){var e=function(e){var n=e.getValue();t&&t(n)};return m.on("change",e),function(){m.off("change",e)}}}),[m,t]),(0,o.useEffect)((function(){m&&m.setOption("mode",a)}),[m,a]),(0,o.useEffect)((function(){m&&(n===m.getValue()&&""!==n||setTimeout((function(){m.setValue(n||"")}),300))}),[m,n]),(0,o.useEffect)((function(){if(s.current&&!m){var e=p().fromTextArea(s.current,r()({mode:a,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},l));h(e)}}),[s.current,m]),(0,f.jsx)("div",{className:"my-codemirror-container",children:(0,f.jsx)("textarea",{ref:s})})}n.Z=function(e){var n=e.callback,t=e.onCancel,a=(0,o.useState)("python"),i=c()(a,2),d=i[0],p=i[1];return(0,f.jsxs)(s.Z,r()(r()({},h),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){n(e)},children:[(0,f.jsx)(s.Z.Item,{label:"代码语言",name:"language",children:(0,f.jsx)(l.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){p(g[e][1])},children:Object.keys(g).map((function(e){return(0,f.jsx)(m,{value:e,children:g[e][0]},e)}))})}),(0,f.jsx)(s.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,f.jsx)(x,{mode:d})}),(0,f.jsxs)("div",{className:"flex-container flex-end",children:[(0,f.jsx)(u.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,f.jsx)(u.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))}},22387:function(e,n,t){t.d(n,{Z:function(){return ue}});var a=t(98190),r=t.n(a),i=t(10574),c=t.n(i),o=t(39343),l=t.n(o),s=t(11006),u=t.n(s),d=t(22060),p=t.n(d),f=t(59301),m=t(89780),h=t.n(m),g=t(76374),x=(t(83164),t(6313),t(25717),t(99498),t(25419),t(67549),t(80416)),v=t(37712),j=function(e){var n=e.value,t=void 0===n?"":n,a=(e.className,e.showTextOnly,e.showLines,e.style,(0,f.useMemo)((function(){return""}),[t]));return(0,v.jsx)(v.Fragment,{children:(0,v.jsx)("div",{dangerouslySetInnerHTML:{__html:a}})})},y=t(26801),b=t.n(y),_=[{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 k(e){var n=e.onActionCallback,t=e.title,a=e.icon,r=e.actionName,i=e.className,c=void 0===i?"":i,o=e.children;return(0,v.jsxs)("a",{title:t,className:c,onClick:function(){n(r)},children:[(0,v.jsx)("i",{className:"md-iconfont ".concat(a)}),o]})}var w=function(e){var n=e.watch,t=e.showNullButton,a=e.showNullProgramButton,r=e.onActionCallback,i=e.fullScreen,c=e.insertTemp,o=e.hidetoolBar,l=[].concat(_,[{title:"".concat(n?"关闭实时预览":"开启实时预览"),icon:"".concat(n?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return(0,v.jsxs)("ul",{className:"markdown-toolbar-container",children:[!o&&l.map((function(e,n){return(0,v.jsx)("li",{children:e.actionName?(0,v.jsx)(k,b()(b()({},e),{},{onActionCallback:r})):(0,v.jsx)("span",{className:"v-line"})},n)})),t?(0,v.jsx)("li",{children:(0,v.jsx)(k,{icon:"icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r,children:(0,v.jsx)("span",{className:"fill-tip",children:"点击插入\b填空项"})})}):null,a?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("li",{children:(0,v.jsx)(k,{icon:"icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:r,children:(0,v.jsx)("span",{className:"fill-tip",children:"添加单行填空项"})})}),(0,v.jsx)("li",{children:(0,v.jsx)(k,{icon:"icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:r,children:(0,v.jsx)("span",{className:"fill-tip",children:"添加多行填空项"})})})]}):null,c&&(0,v.jsx)("li",{children:(0,v.jsx)(k,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(c),onActionCallback:r,children:(0,v.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),(0,v.jsx)("li",{className:"btn-full-screen",children:(0,v.jsx)(k,{icon:"".concat(i?"icon-shrink":"icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})})]})},S=t(90463),C=t(78241),N=t(1056),Z=t(3113),E={labelCol:{span:4},wrapperCol:{span:20}},O=function(e){var n=e.callback,t=e.onCancel;return(0,v.jsxs)(C.Z,b()(b()({},E),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){n(e)},children:[(0,v.jsx)(C.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,v.jsx)(N.Z,{})}),(0,v.jsx)(C.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,v.jsx)(N.Z,{})}),(0,v.jsxs)("div",{className:"flex-container flex-end",children:[(0,v.jsx)(Z.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,v.jsx)(Z.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))},P=t(74921),T=t(8591),I=t(51811),R=C.Z.useForm,L={width:280,marginRight:10},A={labelCol:{span:5},wrapperCol:{span:19}},H=function(e){var n=e.callback,t=e.onCancel,a=R(),r=u()(a,1)[0],i=(0,f.useRef)();function c(e,n){-1!==e.status?r.setFieldsValue({src:"/api/attachments/".concat(e.id),type:n.type}):T.ZP.error(e.message)}return(0,v.jsxs)(C.Z,b()(b()({form:r},A),{},{className:"upload-image-panel",onFinish:function(e){n(b()(b()({},e),{},{name:i.current}))},style:{width:470,overflow:"hidden"},children:[(0,v.jsx)(C.Z.Item,{label:"图片地址",required:!0,children:(0,v.jsxs)("div",{className:"flex-container",children:[(0,v.jsx)(C.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}],children:(0,v.jsx)(N.Z,{style:L})}),(0,v.jsx)(V,{onFileChange:function(e){var n=e.target.files[0];i.current=n.name,D(n,c)}})]})}),(0,v.jsx)(C.Z.Item,{label:"图片描述",name:"alt",children:(0,v.jsx)(N.Z,{style:{width:264}})}),(0,v.jsxs)(C.Z.Item,{style:{textAlign:"right"},children:[(0,v.jsx)(Z.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,v.jsx)(Z.ZP,{type:"default",onClick:t,children:"取消"})]})]}))};function V(e){var n=e.onFileChange;return(0,v.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,v.jsx)("input",{type:"file",onChange:n})]})}function D(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 a=new window.XMLHttpRequest;a.withCredentials=!0,a.addEventListener("load",(function(t){n(JSON.parse(t.target.responseText),e)}),!1),a.addEventListener("error",(function(e){console.error(e)}),!1),a.open("POST","".concat(I.KI,"/api/attachments.json")),a.send(t)}var F,M,B=t(5112),z=t(85731),$=B.ZP.Group,q={margin:"0 8px"},X=function(e){var n=e.callback,t=e.onCancel;return(0,v.jsxs)(C.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){n(e)},children:[(0,v.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,v.jsx)("span",{style:q,children:"单元格数:"}),(0,v.jsx)("span",{style:q,children:"行数"}),(0,v.jsx)(C.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,v.jsx)(z.Z,{})}),(0,v.jsx)("span",{style:q,children:"列数"}),(0,v.jsx)(C.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,v.jsx)(z.Z,{})})]}),(0,v.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,v.jsx)("span",{style:q,children:"对齐方式:"}),(0,v.jsx)(C.Z.Item,{name:"align",children:(0,v.jsxs)($,{children:[(0,v.jsx)(B.ZP,{value:"default",children:(0,v.jsx)("i",{className:"fa fa-align-justify"})}),(0,v.jsx)(B.ZP,{value:"left",children:(0,v.jsx)("i",{className:"fa fa-align-left"})}),(0,v.jsx)(B.ZP,{value:"center",children:(0,v.jsx)("i",{className:"fa fa-align-center"})}),(0,v.jsx)(B.ZP,{value:"right",children:(0,v.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,v.jsxs)("div",{className:"flex-container flex-end",children:[(0,v.jsx)(Z.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,v.jsx)(Z.ZP,{type:"ghost",onClick:t,children:"取消"})]})]})},Y=t(67871),J=t(15830),W=t(1012),K=t(43418),U="link",G="upload-image",Q="code-block",ee="add-table",ne="------------",te={default:ne,left:":".concat(ne),center:":".concat(ne,":"),right:"".concat(ne,":")},ae=t(86219);var re="@▁▁@";function ie(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var ce=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",oe=["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"],le=(F={},p()(F,ce+"-B","bold"),p()(F,ce+"-I","italic"),F),se=(M={},p()(M,U,"添加链接"),p()(M,Q,"添加代码块"),p()(M,G,"添加文件"),p()(M,ee,"添加表格"),M),ue=function(e){var n=e.defaultValue,t=void 0===n?"":n,a=e.onChange,i=e.width,o=void 0===i?"100%":i,s=e.height,d=void 0===s?400:s,m=e.miniToolbar,y=void 0!==m&&m,b=e.isFocus,_=void 0!==b&&b,k=e.watch,C=e.insertTemp,N=e.mode,Z=void 0===N?"markdown":N,E=e.id,I=void 0===E?"markdown-editor-id":E,R=e.showResizeBar,L=void 0!==R&&R,A=e.noStorage,V=void 0!==A&&A,F=e.showNullButton,M=void 0!==F&&F,B=e.showNullProgramButton,z=void 0!==B&&B,$=e.hidetoolBar,q=void 0!==$&&$,ne=e.fullScreen,ce=void 0!==ne&&ne,ue=e.onBlur,de=e.onCMBeforeChange,pe=e.onFullScreen,fe=e.className,me=void 0===fe?"":fe,he=e.disablePaste,ge=void 0!==he&&he,xe=e.disabled,ve=void 0!==xe&&xe,je=e.disabledFill,ye=void 0!==je&&je,be=e.placeholder,_e=void 0===be?"":be,ke=e.values,we=void 0===ke?"":ke,Se=(0,f.useState)(null),Ce=u()(Se,2),Ne=Ce[0],Ze=Ce[1],Ee=(0,f.useState)(t),Oe=u()(Ee,2),Pe=Oe[0],Te=Oe[1],Ie=(0,f.useState)(k),Re=u()(Ie,2),Le=Re[0],Ae=Re[1],He=(0,f.useState)(ce),Ve=u()(He,2),De=Ve[0],Fe=Ve[1],Me=(0,f.useState)(""),Be=u()(Me,2),ze=Be[0],$e=Be[1],qe=(0,f.useState)(0),Xe=u()(qe,2),Ye=Xe[0],Je=Xe[1],We=(0,f.useState)(d),Ke=u()(We,2),Ue=Ke[0],Ge=Ke[1],Qe=(0,f.useState)(!1),en=u()(Qe,2),nn=(en[0],en[1]),tn=(0,f.useRef)((0,W.Z)()),an=(0,f.useRef)(!1),rn=(0,f.useRef)(),cn=(0,f.useRef)(),on=(0,f.useRef)(),ln=(0,f.useRef)(),sn=(0,f.useRef)(),un=function(){var e=l()(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,J.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:",Ne,cn),t.attachments.map((function(e){e.content_type.indexOf("image")>-1?Ne.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):e.content_type.indexOf("video")>-1?Ne.replaceSelection('<video width="100%" controls src="'.concat(Y.Z.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):e.content_type.indexOf("pdf")>-1?Ne.replaceSelection('<a href="'.concat(Y.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,'&disposition=inline" target="_blank">').concat(e.name,"</a>")):Ne.replaceSelection("[".concat(e.name,"](").concat(Y.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,f.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Te(we),null==Ne||Ne.setValue(we),window.scrollTo(0,e)}),[we]),(0,f.useEffect)((function(){null==pe||pe(De)}),[De]),(0,f.useEffect)((function(){if(cn.current){var e=function(e,t){if(!ge){var a=t.clipboardData;if(a){var r=a.types.toString(),i=a.items;if("Files"===r||a.types.indexOf("Files")>-1){if(t.preventDefault(),"stex"==Z)return;try{var c,o=i[1];"file"===(null===(c=i[0])||void 0===c?void 0:c.kind)&&(o=i[0]);var l=o.getAsFile(),s=l.name.split(".").pop();D(l,(function(e){var t,a,r;e.id?(null==l||null===(t=l.type)||void 0===t?void 0:t.indexOf("image"))>-1?n.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==l||null===(a=l.type)||void 0===a?void 0:a.indexOf("video"))>-1?n.replaceSelection('<video width="100%" controls src="'.concat(Y.Z.API_SERVER,"/api/attachments/").concat(e.id,'"></video>')):(null==l||null===(r=l.type)||void 0===r?void 0:r.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(Y.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(l.type,'&disposition=inline" target="_blank">').concat(l.name,"</a>")):oe.includes(s)?n.replaceSelection('<a href="'.concat(Y.Z.API_SERVER,"/api/attachments/").concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(l.name,"</a>")):n.replaceSelection("[".concat(l.name,"](").concat(Y.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){T.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}t.preventDefault()},n=h().fromTextArea(cn.current,{mode:Z,lineNumbers:!y,lineWrapping:!0,value:t,autoCloseTags:!z,autoCloseBrackets:!0});return n.on("keyup",(function(e,t){8===t.keyCode&&(""==e.getValue()?n.setOption("placeholder",_e):n.setOption("placeholder",null))})),n.on("keydown",(function(e,n){if(8===n.keyCode){var t=function(e,n){var t=e.getDoc(),a=t.getCursor(),r=t.getLine(a.line),i=r.charAt(a.ch-1),c=r.lastIndexOf("@▁@",a.ch),o=r.lastIndexOf("@▁▁@",a.ch),l=c>o?c:o,s=c>o?3:4;if(-1===re.indexOf(i))return null;if(console.log("change1:",n,e,r,a,l,c,o,i),l>=0&&a.ch-l<5){var u=l+s;return t.replaceRange("",{line:a.line,ch:l},{line:a.line,ch:u}),{line:a.line,ch:u}}return null}(e);t&&n.preventDefault()}})),_&&n.focus(),n.on("paste",e),n.on("dragleave",(function(e,n){on.current.classList.remove("mouse-hover-md")})),n.on("dragover",(function(e,n){on.current.classList.add("mouse-hover-md")})),n.on("drop",(function(e,t){var a;if(on.current.classList.add("mouse-hover-md"),(a=t.dataTransfer.files).length>0){t.preventDefault(),t.stopPropagation();for(var r=function(){var e=a[i],t=e.name.split(".").pop();D(e,(function(a){var r,i,c;a.id?(null==e||null===(r=e.type)||void 0===r?void 0:r.indexOf("image"))>-1?n.replaceSelection("![,](/api/attachments/".concat(a.id,"?type=").concat(a.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(Y.Z.API_SERVER,"/api/attachments/").concat(a.id,'"></video>')):(null==e||null===(c=e.type)||void 0===c?void 0:c.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(Y.Z.API_SERVER,"/api/attachments/").concat(a.id,"?type=").concat(e.type,'&disposition=inline" target="_blank">').concat(e.name,"</a>")):oe.includes(t)?n.replaceSelection('<a href="'.concat(Y.Z.API_SERVER,"/api/attachments/").concat(a.id,'?type=office&disposition=inline" target="_blank">').concat(e.name,"</a>")):n.replaceSelection("[".concat(e.name,"](").concat(Y.Z.API_SERVER,"/api/attachments/").concat(a.id,"?type=").concat(a.content_type,")")):401===(null==a?void 0:a.status)&&(document.location.href="/user/login")}))},i=0;i<a.length;i++)r()}})),ve&&n.on("beforeChange",(function(e,n){"paste"!==n.origin&&"+input"!==n.origin||n.cancel()})),Ze(n),function(){n.off("paste",e)}}}),[]);var dn=(0,f.useCallback)((function(){on.current}),[Ue,on,De]);(0,f.useEffect)((function(){if(Ne){var e=function(){var e=new g.Z((function(e){var n,t=r()(e);try{for(t.s();!(n=t.n()).done;){var a=n.value;(a.target.offsetHeight>0||a.target.offsetWidth>0)&&(dn(),Ne.setSize("100%","100%"),Ne.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)}}}),[Ne,dn]),(0,f.useEffect)((function(){if(Ne){for(var e=[],n=function(){var n=u()(a[t],2),r=n[0],i=n[1],c=p()({},r,(function(){pn(i)}));e.push(c),Ne.addKeyMap(c)},t=0,a=Object.entries(le);t<a.length;t++)n();return rn.current=setInterval((function(){an.current&&un()}),4e3),function(){clearInterval(rn.current);for(var n=0,t=e;n<t.length;n++){var a=t[n];Ne.removeKeyMap(a)}}}}),[Ne]),(0,f.useEffect)((function(){ce!==De&&Fe(ce)}),[ce]),(0,ae.Z)((function(){if(!V&&Ye>0){var e=(new Date).getTime(),n=window.sessionStorage.getItem(I);e>=Ye+1e4&&(!n||n!==Pe)&&(window.sessionStorage.setItem(I,Pe),nn(!0))}}),1e4),(0,f.useEffect)((function(){Ae(k)}),[Ne,k]),(0,f.useEffect)((function(){Ne&&_&&Ne.focus()}),[Ne,_]),(0,f.useEffect)((function(){if(Le&&Ne){var e=function(e){var n=e.target;if(sn.current){var t=n.scrollTop/n.scrollHeight;sn.current.scrollTop=sn.current.scrollHeight*t}},n=Ne.getScrollerElement();return n.addEventListener("scroll",e),function(){n.removeEventListener("scroll",e)}}}),[Ne,Le]),(0,f.useEffect)((function(){if(Ne&&de){var e=function(e,n){de(e,n)};return Ne.on("beforeChange",e),function(){Ne.off("beforeChange",e)}}}),[Ne,de]),(0,f.useEffect)((function(){if(Ne&&ue){var e=function(){ue(Ne.getValue())};return Ne.on("blur",e),function(){Ne.off("blur",e)}}}),[Ne,ue]),(0,f.useEffect)((function(){if(Ne){var e=function(e,n){var t=e.getValue();Te(t),Je((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),a&&(z?a(t,xn(t)):a(t))};return Ne.on("change",e),function(){Ne.off("change",e)}}}),[Ne,a]),(0,f.useEffect)((function(){if(Ne)if(null==t)Ne.setValue(""),Te("");else{var e=window.scrollY||window.pageYOffset;t!==Ne.getValue()&&(Ne.setValue(t),Te(t),Ne.setCursor(ve?1:Ne.lineCount(),0),window.scrollTo(0,e))}}),[Ne,t]);var pn=(0,f.useCallback)((function(e){var n=Ne.getCursor(),t=Ne.getSelection(),a=t.split("\n");switch(e){case"bold":return Ne.replaceSelection("**"+t+"**"),""===t&&Ne.setCursor(n.line,n.ch+2),Ne.focus();case"italic":return Ne.replaceSelection("*"+t+"*"),""===t&&Ne.setCursor(n.line,n.ch+1),Ne.focus();case"code":return Ne.replaceSelection("`"+t+"`"),""===t&&Ne.setCursor(n.line,n.ch+1),Ne.focus();case"inline-latex":return Ne.replaceSelection("`$$"+t+"$$`"),""===t&&Ne.setCursor(n.line,n.ch+3),Ne.focus();case"latex":return Ne.replaceSelection("```latex\n"+t+"\n```"),Ne.setCursor(n.line+1,t.length+1),Ne.focus();case"line-break":return Ne.replaceSelection("<br/>\n"),Ne.focus();case"list-ul":return""===t?Ne.replaceSelection("- "+t):Ne.replaceSelection(a.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),Ne.focus();case"list-ol":return""===t?Ne.replaceSelection("1. "+t):Ne.replaceSelection(a.map((function(e,n){return""===e?"":"".concat(n+1,". ").concat(e)})).join("\n")),Ne.focus();case"add-null-ch":return""===t&&Ne.setCursor(n.line,n.ch),Ne.replaceSelection("▁"),Ne.focus();case"add-signal":return""===t&&Ne.setCursor(n.line,n.ch),Ne.replaceSelection("@▁@"),Ne.focus();case"add-multiple":return""===t&&Ne.setCursor(n.line,n.ch),Ne.replaceSelection(re),Ne.focus();case"inster-template-1":return""===t&&Ne.setCursor(n.line,n.ch),Ne.replaceSelection("\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作"),Ne.focus();case"eraser":return Ne.setValue(""),Ne.focus();case"trigger-watch":return Ae(!Le),Ne.focus();case"trigger-full-screen":return Fe(!De),Ne.focus();case U:return void $e(U);case Q:return void $e(Q);case G:return void $e(G);case ee:return void $e(ee);default:throw new Error}}),[Ne,Le,De]),fn=(0,f.useCallback)((function(e){switch($e(""),ze){case U:var n=e.title,t=e.link;return Ne.replaceSelection("[".concat(n,"](").concat(t,")")),Ne.focus();case Q:var a=e.language,r=e.content;return Ne.replaceSelection(["```"+a,r,"```"].join("\n")),Ne.focus();case G:var i=e.src,c=e.alt;return c?Ne.replaceSelection("![ ".concat(c," ]( ").concat(i,' "').concat(c,'" )')):Ne.replaceSelection("![,](".concat(i,")")),Ne.focus();case ee:for(var o=e.row,l=e.col,s=e.align,u="\n",d=0;d<o;d++){for(var p=[],f=[],m=0;m<l;m++)1===d&&f.push(te[s]),p.push(" ");1===d&&(u+="| ".concat(f.join(" | ")," |\n")),u+="| ".concat(p.join(1===l?"":" | ")," |\n")}return Ne.replaceSelection(u+"\n"),Ne.focus();default:throw new Error}}),[Ne,ze]),mn=(0,f.useMemo)((function(){switch(ze){case U:return(0,v.jsx)(O,{callback:fn,onCancel:hn});case Q:return(0,v.jsx)(P.Z,{callback:fn,onCancel:hn});case G:return(0,v.jsx)(H,{callback:fn,onCancel:hn});case ee:return(0,v.jsx)(X,{callback:fn,onCancel:hn});default:return null}}),[ze]);function hn(){$e("")}(0,f.useEffect)((function(){if(ln.current){var e=function(e){r=!0,i=e.pageY},n=function(){r=!1},t=function(e){if(r){var n=e.pageY-i;n<0&&(n=0),n>300&&(n=300),Ge(d+n+"px")}},a=ln.current,r=!1,i=0;return a.addEventListener("mousedown",e),document.addEventListener("mousemove",t),document.addEventListener("mouseup",n),function(){a.removeEventListener("mousedown",e),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)}}}),[Ne,ln]),(0,f.useEffect)((function(){Ge(d)}),[d]);var gn={width:ie(o),height:ie(Ue)},xn=((0,f.useMemo)((function(){if(Ye){var e=new Date(Ye),n=e.getHours(),t=e.getMinutes(),a=e.getSeconds();return t=t<10?"0"+t:t,a=a<10?"0"+a:a,"".concat(n=n<10?"0"+n:n,":").concat(t,":").concat(a)}return 0}),[Ye]),function(e){var n=[];if(z){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,t,a){n.push({multiLine:!("@▁@"===e)})}))}return n});return(0,v.jsxs)(f.Fragment,{children:[(0,v.jsx)("div",{className:"markdown-editor-wrapper",ref:on,children:(0,v.jsxs)("div",{className:"markdown-editor-container ".concat(me," ").concat(Le?"on-preview":""," ").concat(y?"mini":""," ").concat(De?"full-screen":""),style:gn,children:[(0,v.jsx)(w,{insertTemp:C,watch:Le,fullScreen:De,showNullButton:M,showNullProgramButton:z,onActionCallback:pn,hidetoolBar:q,uuid:tn.current,setOpenPhones:function(){an.current=!0}}),(0,v.jsxs)("div",{className:"markdown-editor-body",children:[(0,v.jsx)("div",{className:"codemirror-container",children:(0,v.jsx)("textarea",{ref:cn,placeholder:_e})}),Le?(0,v.jsxs)("div",{ref:sn,className:"preview-container",children:["stex"===Z&&(0,v.jsx)(j,{value:Pe}),"stex"!==Z&&(0,v.jsx)(x.Z,{disabledFill:ye,showProgramFill:z,value:Pe})]}):null]})]})}),L?(0,v.jsx)("a",{ref:ln,className:"editor-resize"}):null,(0,v.jsx)(S.Z,{children:se[ze]?(0,v.jsx)(K.Z,{centered:!0,title:se[ze],open:!0,onCancel:hn,footer:null,className:"markdown-popup-form",children:mn}):null})]})}},90463:function(e,n,t){t.d(n,{Z:function(){return f}});var a=t(94312),r=t.n(a),i=t(24127),c=t.n(i),o=t(93242),l=t.n(o),s=t(10564),u=t.n(s),d=t(59301),p=t(4676),f=function(e){l()(t,e);var n=u()(t);function t(e){var a;r()(this,t),a=n.call(this,e);var i=window.document;return a.node=i.createElement("div"),i.body.appendChild(a.node),a}return c()(t,[{key:"render",value:function(){var e=this.props.children;return(0,p.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 r}});var a=t(59301);function r(e,n){var t=(0,a.useRef)();(0,a.useEffect)((function(){t.current=e})),(0,a.useEffect)((function(){if(null!==n){var e=setInterval((function(){t.current()}),n);return function(){return clearInterval(e)}}}),[n])}},61518:function(e,n,t){t.r(n),t.d(n,{default:function(){return Y}});var a=t(26801),r=t.n(a),i=t(11006),c=t.n(i),o=t(59301),l=t(22211),s=t(66104),u=t(99313),d=t(68742),p=t(85578),f=t(10574),m=t.n(f),h=t(39343),g=t.n(h),x=t(22387),v=t(67871),j=t(80416),y=t(43418),b=t(8591),_=t(37712),k=(0,l.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.shixunHomeworks,t=e.dispatch;(0,l.useParams)();return(0,_.jsx)(y.Z,{centered:!0,title:"提示",open:"删除"===n.actionTabs.key,okText:"确定",cancelText:"取消",onOk:g()(m()().mark((function e(){return m()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({type:"shixunHomeworks/deleteReply",payload:{object_id:n.actionTabs.selectArr.id,object_type:"journals_for_message"}});case 2:0===e.sent.status&&(b.ZP.success("删除成功"),t({type:"shixunHomeworks/setActionTabs",payload:{}}),t({type:"shixunHomeworks/getReplyList",payload:r()({},n.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){t({type:"shixunHomeworks/setActionTabs",payload:{}})},children:(0,_.jsx)("p",{children:"确定要删除该条回复吗?"})})})),w=t(9498),S=t.n(w),C=t(95237),N=t(43604),Z=t(1056),E=t(3113),O=t(6848),P=t(41867),T=t(47966),I=t(11419),R={flex_box_center:"flex_box_center___rwkot",flex_space_between:"flex_space_between___CV5Yi",flex_box_vertical_center:"flex_box_vertical_center___meeO5",flex_box_center_end:"flex_box_center_end___RXqc0",flex_box_column:"flex_box_column___HwZxi",listItem:"listItem___Cb1Ly",description:"description___UqYVS",liked:"liked___xlDpa",likedActive:"likedActive___GqNt1",reply:"reply___R3gEt",replyList:"replyList___AA3m5",comment:"comment___JuJKy"};S().locale("ZH-cn");var L=(0,l.connect)((function(e){var n=e.graduation,t=e.classroomList,a=e.loading;return{graduation:n,globalSetting:e.globalSetting,classroomList:t,loading:a.effects}}))((function(e){var n=e.graduation,t=e.classroomList,a=(e.globalSetting,e.loading,e.dispatch),i=(0,o.useState)(r()({},(0,l.useParams)())),s=c()(i,2),u=s[0],d=(s[1],(0,o.useState)(!1)),p=c()(d,2),f=p[0],h=p[1],y=(0,o.useState)(-1),w=c()(y,2),L=w[0],A=w[1],H=(0,o.useState)(""),V=c()(H,2),D=V[0],F=V[1],M=n.detail,B=(t.detailLeftMenus,n.graduationDetail,n.replyList);n.workDetail;return u.page_size=10,(0,o.useEffect)((function(){a({type:"graduation/getReplyList",payload:r()({},u)}),a({type:"graduation/getTopisDetail",payload:r()({},u)})}),[u.categoryId]),(0,_.jsxs)("section",{className:R.bg,children:[(0,_.jsxs)("section",{className:" edu-container",children:[(0,_.jsxs)("aside",{className:[R.desc,"c-black","font14","bg-white"].join(" "),children:[(0,_.jsx)("h1",{className:R.description,children:M.description}),(0,_.jsx)("div",{className:"mt30",children:(0,_.jsxs)("ul",{className:R.listItem,children:[(0,_.jsxs)("li",{children:[(0,_.jsx)("span",{className:"c-light-black",children:"课题类型:"}),(0,_.jsx)("span",{children:{1:"设计",2:"论文",3:"创作"}[null==M?void 0:M.topic_type]||"--"})]}),(0,_.jsxs)("li",{children:[(0,_.jsx)("span",{className:"c-light-black",children:"课题来源:"}),(0,_.jsx)("span",{children:{1:"生产/社会实际",2:"结合科研",3:"其它"}[null==M?void 0:M.topic_source]||"--"})]}),(0,_.jsxs)("li",{children:[(0,_.jsx)("span",{className:"c-light-black",children:"课题性质1"}),(0,_.jsx)("span",{children:{1:"真题",2:"模拟题"}[null==M?void 0:M.topic_property_first]||"--"})]}),(0,_.jsxs)("li",{children:[(0,_.jsx)("span",{className:"c-light-black",children:"课题性质2"}),(0,_.jsx)("span",{children:{1:"纵向课题",2:"横向课题",3:"自选"}[null==M?void 0:M.topic_property_second]||"--"})]}),(0,_.jsxs)("li",{children:[(0,_.jsx)("span",{className:"c-light-black",children:"课题重复情况:"}),(0,_.jsx)("span",{children:{1:"新题",2:"往届题,有新要求",3:"往届题,无新要求"}[null==M?void 0:M.topic_repeat]||"--"})]}),(0,_.jsxs)("li",{children:[(0,_.jsx)("span",{className:"c-light-black",children:"调研或实习地点:"}),(0,_.jsx)("span",{children:M.city||"--"})]}),(0,_.jsxs)("li",{className:"fl with50",children:[(0,_.jsx)("span",{className:"c-light-black",children:"课题来源单位:"}),(0,_.jsx)("span",{children:M.source_unit||"--"})]})]})})]}),(0,_.jsxs)("aside",{className:[R.reply,"bg-white","mt20"].join(" "),children:[f&&(0,_.jsx)(x.Z,{onChange:function(e){F(e)},height:200,isFocus:!0,watch:!0}),(0,_.jsxs)(C.Z,{onClick:function(){h(!0)},children:[(0,_.jsx)(N.Z,{flex:"1",children:!f&&(0,_.jsx)(Z.Z,{size:"middle",className:"current",placeholder:"说点什么",disabled:!0})}),(0,_.jsx)(N.Z,{children:(0,_.jsx)(E.ZP,{type:"primary",size:"middle",onClick:g()(m()().mark((function e(){return m()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==D){e.next=4;break}b.ZP.error("请输入内容"),e.next=8;break;case 4:return e.next=6,a({type:"graduation/createReply",payload:{journals_for_message:{jour_id:u.categoryId,jour_type:"HomeworkCommon",reply_id:1,notes:D}}});case 6:0===e.sent.status&&(b.ZP.success("发布成功"),a({type:"graduation/getReplyList",payload:r()({},u)}),h(!1));case 8:case"end":return e.stop()}}),e)}))),children:"发表"})})]})]}),(null==B?void 0:B.comments)&&""!=B.comments&&(0,_.jsx)("aside",{className:[R.replyList,"bg-white"].join(" "),children:null==B?void 0:B.comments.map((function(e,n){var t,i;return(0,_.jsxs)(C.Z,{gutter:[12,12],children:[(0,_.jsx)(N.Z,{flex:"40px",children:(0,_.jsx)("img",{width:"40",src:"".concat(v.Z.IMG_SERVER,"/images/").concat(null==e||null===(t=e.author)||void 0===t?void 0:t.image_url)})}),(0,_.jsx)(N.Z,{flex:"1",children:(0,_.jsxs)(C.Z,{align:"middle",children:[(0,_.jsxs)(N.Z,{span:24,children:[(0,_.jsx)("span",{className:"c-light-black",children:null==e||null===(i=e.author)||void 0===i?void 0:i.name}),(0,_.jsxs)("span",{className:"c-light-black ml10",children:[S()(null==e?void 0:e.created_on).fromNow()," 发布"]})]}),(0,_.jsx)(N.Z,{span:24,children:(0,_.jsx)(j.Z,{value:e.content})}),e.children&&(0,_.jsx)("aside",{className:R.comment,children:e.children.map((function(n,t){return(0,_.jsxs)(C.Z,{children:[(0,_.jsx)(N.Z,{span:24,children:(0,_.jsxs)(C.Z,{children:[(0,_.jsxs)(N.Z,{flex:"1",children:[n.author.name,(0,_.jsx)("span",{className:"c-light-black ml10",children:S()(null==n?void 0:n.created_on).fromNow()})]}),(0,_.jsx)(N.Z,{children:(0,_.jsx)(O.Z,{title:"删除",children:(0,_.jsx)(T.Z,{className:"current",onClick:function(){a({type:"graduation/setActionTabs",payload:{key:"删除",params:u,selectArr:e}})}})})})]})}),(0,_.jsx)(N.Z,{children:(0,_.jsx)("strong",{children:(0,_.jsx)(j.Z,{value:n.content})})})]},t)}))}),(0,_.jsxs)(N.Z,{span:24,className:"mt5 c-light-black",children:[L===n&&(0,_.jsxs)("aside",{children:[(0,_.jsx)(x.Z,{onChange:function(e){F(e)},height:150,isFocus:!0}),(0,_.jsx)(C.Z,{children:(0,_.jsx)(N.Z,{span:24,className:"tr",children:(0,_.jsx)(E.ZP,{type:"primary",size:"middle",onClick:g()(m()().mark((function n(){return m()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(""!==D){n.next=4;break}b.ZP.error("请输入内容"),n.next=9;break;case 4:return n.next=6,a({type:"graduation/createReply",payload:{journals_for_message:{jour_id:u.categoryId,jour_type:"HomeworkCommon",m_parent_id:e.id,reply_id:1,notes:D}}});case 6:a({type:"graduation/getReplyList",payload:r()({},u)}),b.ZP.success("发布成功"),A(-1);case 9:case"end":return n.stop()}}),n)}))),children:"发表"})})})]}),L!==n&&(0,_.jsxs)("div",{className:"tr",children:[(0,_.jsx)("span",{className:"iconfont icon-huifu1 mr5 ml30",onClick:function(){return A(n)}}),e.liked&&(0,_.jsxs)("span",{className:"c-orange",children:[(0,_.jsx)(I.Z,{className:"mr5 ml30",onClick:g()(m()().mark((function n(){return m()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,a({type:"graduation/replyUnLike",payload:{object_id:e.id,object_type:"message"}});case 2:a({type:"graduation/getReplyList",payload:r()({},u)});case 3:case"end":return n.stop()}}),n)})))}),e.praises_count]}),!e.liked&&(0,_.jsxs)("span",{children:[(0,_.jsx)(I.Z,{className:"mr5 ml30",onClick:g()(m()().mark((function n(){return m()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,a({type:"graduation/replyLike",payload:{object_id:e.id,object_type:"message"}});case 2:a({type:"graduation/getReplyList",payload:r()({},u)});case 3:case"end":return n.stop()}}),n)})))}),e.praises_count]})]})]})]})})]},n)}))})]}),(0,_.jsx)("aside",{className:"tc mt30 pb30",children:(0,_.jsx)(P.Z,{defaultCurrent:1,total:null==B?void 0:B.total_count,hideOnSinglePage:!0,current:u.page||1,onChange:function(e){u.page=e,a({type:"graduation/getReplyList",payload:r()({},u)})}})}),(0,_.jsx)(k,{})]})})),A=t(78241),H=t(72315),V=t(27161),D=t.n(V),F=["graduation","dispatch"],M=(0,l.connect)((function(e){return{graduation:e.graduation}}))((function(e){var n=e.graduation,t=e.dispatch,a=(D()(e,F),(0,l.useParams)());return(0,_.jsx)(y.Z,{centered:!0,title:"提示",open:"拒绝"===n.actionTabs.key,okText:"确定",cancelText:"取消",onOk:g()(m()().mark((function e(){return m()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({type:"graduation/refuseTopic",payload:r()({student_graduation_topic:n.actionTabs.selectArrs.id},a)});case 2:0===e.sent.status&&(b.ZP.success("拒绝成功"),t({type:"graduation/setActionTabs",payload:{}}),t({type:"graduation/getTopisDetailList",payload:r()({},n.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){t({type:"graduation/setActionTabs",payload:{}})},children:(0,_.jsx)("p",{children:"是否确认拒绝学生选题?"})})})),B=t(57809),z=["graduation","dispatch"],$=(0,l.connect)((function(e){return{graduation:e.graduation}}))((function(e){var n,t=e.graduation,a=e.dispatch,i=(D()(e,z),(0,l.useParams)()),o=t.detailList,s=A.Z.useForm(),u=c()(s,1)[0];return(0,_.jsxs)(y.Z,{centered:!0,title:"同意选题",open:"同意"===t.actionTabs.key,okText:"确定",cancelText:"取消",onOk:g()(m()().mark((function e(){var n,c;return m()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.validateFields();case 2:return c=u.getFieldsValue(),e.next=5,a({type:"graduation/agreeTopic",payload:r()({group_id:c.group_id,course_group_name:null==o||null===(n=o.group_list)||void 0===n?void 0:n.filter((function(e){return e.group_id==c.group_id}))[0].group_name,student_graduation_topic:t.actionTabs.selectArrs.id},i)});case 5:0===e.sent.status&&(b.ZP.success("同意成功"),a({type:"graduation/setActionTabs",payload:{}}),a({type:"graduation/getTopisDetailList",payload:r()({},t.actionTabs.params)}));case 7:case"end":return e.stop()}}),e)}))),onCancel:function(){a({type:"graduation/setActionTabs",payload:{}})},children:[(0,_.jsx)("p",{children:"确认同意学生的选题,将学生加入我的分班"}),(0,_.jsx)(A.Z,{form:u,children:(0,_.jsx)(A.Z.Item,{name:"group_id",label:"选择:",rules:[{required:!0,message:"请选择分班"}],children:(0,_.jsx)(B.default,{placeholder:"请选择分班",size:"middle",children:null==o||null===(n=o.group_list)||void 0===n?void 0:n.map((function(e,n){return(0,_.jsx)(B.default.Option,{value:e.group_id,children:e.group_name})}))})})})]})})),q=(0,l.connect)((function(e){return{graduation:e.graduation,loading:e.loading.effects}}))((function(e){var n=e.graduation,t=e.loading,a=e.dispatch,i=(0,o.useState)(r()({},(0,l.useParams)())),s=c()(i,2),u=s[0],d=(s[1],(0,l.useLocation)(),n.detailList),p=(0,o.useState)({}),f=c()(p,2),m=(f[0],f[1],A.Z.useForm()),h=(c()(m,1)[0],[{title:"序号",dataIndex:"name",width:200,align:"center",render:function(e,n,t){return t+1}},{title:"姓名",dataIndex:"student_name"},{title:"学号",dataIndex:"student_id"},{title:"分班",dataIndex:"class_group_name"},{title:"选题时间",dataIndex:"selected_time"},{title:"确认结果",dataIndex:"result",render:function(e){return"已拒绝"===e?(0,_.jsx)("span",{className:"c-orange",children:"已拒绝"}):e}},{title:"操作",dataInex:"action",render:function(e,n){return(0,_.jsxs)("div",{children:[("待确认"===n.result||"已同意"===n.result)&&(0,_.jsx)("span",{className:"current",onClick:function(){a({type:"graduation/setActionTabs",payload:{key:"拒绝",selectArrs:n,params:u}})},children:"拒绝"}),"待确认"===n.result&&(0,_.jsx)("span",{className:"current ml20 c-blue",onClick:function(){a({type:"graduation/setActionTabs",payload:{key:"同意",selectArrs:n,params:u}})},children:"同意"})]})}}]);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("section",{className:"minH500 bg-white ",children:[(0,_.jsx)(H.Z,{loading:t["graduation/getTopisDetailList"],pagination:!1,dataSource:d.users_list,columns:h}),(0,_.jsx)(M,{}),(0,_.jsx)($,{})]}),(0,_.jsx)("aside",{className:"tc mb50 mt30",children:(0,_.jsx)(P.Z,{hideOnSinglePage:!0,showSizeChanger:!1,onChange:function(e,n){u.page=e,u.limit=20,a({type:"graduation/getTopisDetailList",payload:r()({},u)})},defaultCurrent:u.page||1,current:u.page||1,defaultPageSize:15,total:n.users_count})})]})})),X={flex_box_center:"flex_box_center___D_8YV",flex_space_between:"flex_space_between___DI3Lx",flex_box_vertical_center:"flex_box_vertical_center___HQIdb",flex_box_center_end:"flex_box_center_end___jBPdg",flex_box_column:"flex_box_column___oBJ_R",title:"title___vQC28",menuTabs:"menuTabs___ZWqcp",rightMenu:"rightMenu___JdFEE",shixunDetail:"shixunDetail___rsPHS"},Y=(0,l.connect)((function(e){var n=e.graduation,t=e.loading;return{graduation:n,globalSetting:e.globalSetting,loading:t.effects}}))((function(e){var n=e.graduation,t=(e.globalSetting,e.loading,e.dispatch),a=(0,l.useParams)(),i=((0,l.useLocation)(),(0,l.useSearchParams)()),f=c()(i,1)[0],m=(0,o.useState)([]),h=c()(m,2),g=(h[0],h[1],(0,o.useState)(f.get("tabs")||0)),x=c()(g,2),v=x[0],j=(x[1],n.detailList);a.category=f.get("category_id"),(0,o.useEffect)((function(){t({type:"graduation/getTopisDetailList",payload:r()({},a)})}),[a.coursesId]);var y=[{name:"选题列表",id:0,compontent:(0,_.jsx)(q,{})},{name:"选题描述",id:1,compontent:(0,_.jsx)(L,{})}];return(0,_.jsx)("section",{children:(0,_.jsxs)("div",{className:"edu-container",children:[j.course_name&&(0,_.jsxs)("section",{className:"animated fadeIn",children:[(0,_.jsx)("aside",{className:"mt10",children:(0,_.jsxs)(s.Z,{separator:">",children:[(0,_.jsx)(s.Z.Item,{children:(0,_.jsx)(l.Link,{to:"/classrooms/".concat(j.course_id,"/shixun_homework"),children:j.course_name})}),(0,_.jsx)(s.Z.Item,{children:(0,_.jsx)(l.Link,{to:"/classrooms/".concat(j.course_id,"/graduation_topics/").concat(j.graduation_id),children:"毕设选题"})}),(0,_.jsx)(s.Z.Item,{children:"选题详情"})]})}),(0,_.jsxs)("aside",{className:[X.title,"mt20"].join(" "),children:[(0,_.jsx)(l.Link,{to:"/classrooms/".concat(j.course_id,"/graduation_topics/").concat(j.graduation_id),children:(0,_.jsx)(d.Z,{className:"font16 c-black"})}),(0,_.jsx)("strong",{className:"font20 ml5",children:j.graduation_topic_name}),(0,_.jsx)(p.VV,{status:[j.status_name]})]})]}),(0,_.jsxs)("aside",{className:"mt30 relative",children:[(0,_.jsx)("aside",{className:X.rightMenu,children:(0,_.jsxs)(l.Link,{className:X.shixunDetail,to:"/classrooms/".concat(a.coursesId,"/graduation_topics/").concat(a.categoryId,"/edit"),children:[(0,_.jsx)("span",{className:"iconfont icon-shixunxiangqing"}),"编辑选题"]})}),(0,_.jsx)(u.Z,{defaultActiveKey:v,className:X.menuTabs,children:y.map((function(e,n){return(0,_.jsx)(u.Z.TabPane,{tab:e.name,children:e.compontent},e.id)}))})]})]})})}))},66104:function(e,n,t){t.d(n,{Z:function(){return O}});var a=t(73287),r=t.n(a),i=t(45659),c=t(3286),o=t(59301),l=t(92343),s=t(36355),u=t(42884),d=t(91857);const p=e=>{let{children:n}=e;const{getPrefixCls:t}=o.useContext(s.E_),a=t("breadcrumb");return o.createElement("li",{className:`${a}-separator`,"aria-hidden":"true"},""===n?n:n||"/")};p.__ANT_BREADCRUMB_SEPARATOR=!0;var f=p,m=function(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)n.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(t[a[r]]=e[a[r]])}return t};function h(e,n,t,a){if(null==t)return null;const{className:i,onClick:l}=n,s=m(n,["className","onClick"]),u=Object.assign(Object.assign({},(0,c.Z)(s,{data:!0,aria:!0})),{onClick:l});return void 0!==a?o.createElement("a",Object.assign({},u,{className:r()(`${e}-link`,i),href:a}),t):o.createElement("span",Object.assign({},u,{className:r()(`${e}-link`,i)}),t)}function g(e,n){return(t,a,r,i,c)=>{if(n)return n(t,a,r,i);const o=function(e,n){if(void 0===e.title||null===e.title)return null;const t=Object.keys(n).join("|");return"object"==typeof e.title?e.title:String(e.title).replace(new RegExp(`:(${t})`,"g"),((e,t)=>n[t]||e))}(t,a);return h(e,t,o,c)}}var x=function(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)n.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(t[a[r]]=e[a[r]])}return t};const v=e=>{const{prefixCls:n,separator:t="/",children:a,menu:r,overlay:i,dropdownProps:c,href:l}=e;const s=(e=>{if(r||i){const t=Object.assign({},c);if(r){const e=r||{},{items:n}=e,a=x(e,["items"]);t.menu=Object.assign(Object.assign({},a),{items:null==n?void 0:n.map(((e,n)=>{var{key:t,title:a,label:r,path:i}=e,c=x(e,["key","title","label","path"]);let s=null!=r?r:a;return i&&(s=o.createElement("a",{href:`${l}${i}`},s)),Object.assign(Object.assign({},c),{key:null!=t?t:n,label:s})}))})}else i&&(t.overlay=i);return o.createElement(d.Z,Object.assign({placement:"bottom"},t),o.createElement("span",{className:`${n}-overlay-link`},e,o.createElement(u.Z,null)))}return e})(a);return null!=s?o.createElement(o.Fragment,null,o.createElement("li",null,s),t&&o.createElement(f,null,t)):null},j=e=>{const{prefixCls:n,children:t,href:a}=e,r=x(e,["prefixCls","children","href"]),{getPrefixCls:i}=o.useContext(s.E_),c=i("breadcrumb",n);return o.createElement(v,Object.assign({},r,{prefixCls:c}),h(c,r,t,a))};j.__ANT_BREADCRUMB_ITEM=!0;var y=j,b=t(17313),_=t(83116),k=t(37613);const w=e=>{const{componentCls:n,iconCls:t}=e;return{[n]:Object.assign(Object.assign({},(0,b.Wf)(e)),{color:e.itemColor,fontSize:e.fontSize,[t]:{fontSize:e.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:e.linkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${e.paddingXXS}px`,borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",marginInline:-e.marginXXS,"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover}},(0,b.Qy)(e)),"li:last-child":{color:e.lastItemColor},[`${n}-separator`]:{marginInline:e.separatorMargin,color:e.separatorColor},[`${n}-link`]:{[`\n > ${t} + span,\n > ${t} + a\n `]:{marginInlineStart:e.marginXXS}},[`${n}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",padding:`0 ${e.paddingXXS}px`,marginInline:-e.marginXXS,[`> ${t}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover,a:{color:e.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}};var S=(0,_.Z)("Breadcrumb",(e=>{const n=(0,k.TS)(e,{});return[w(n)]}),(e=>({itemColor:e.colorTextDescription,lastItemColor:e.colorText,iconFontSize:e.fontSize,linkColor:e.colorTextDescription,linkHoverColor:e.colorText,separatorColor:e.colorTextDescription,separatorMargin:e.marginXS}))),C=function(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)n.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(t[a[r]]=e[a[r]])}return t};function N(e){const{breadcrumbName:n,children:t}=e,a=C(e,["breadcrumbName","children"]),r=Object.assign({title:n},a);return t&&(r.menu={items:t.map((e=>{var{breadcrumbName:n}=e,t=C(e,["breadcrumbName"]);return Object.assign(Object.assign({},t),{title:n})}))}),r}var Z=function(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)n.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(t[a[r]]=e[a[r]])}return t};const E=e=>{const{prefixCls:n,separator:t="/",style:a,className:u,rootClassName:d,routes:p,items:m,children:h,itemRender:x,params:j={}}=e,y=Z(e,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:b,direction:_,breadcrumb:k}=o.useContext(s.E_);let w;const C=b("breadcrumb",n),[E,O]=S(C),P=function(e,n){return(0,o.useMemo)((()=>e||(n?n.map(N):null)),[e,n])}(m,p);const T=g(C,x);if(P&&P.length>0){const e=[],n=m||p;w=P.map(((a,r)=>{const{path:i,key:l,type:s,menu:u,overlay:d,onClick:p,className:m,separator:h,dropdownProps:g}=a,x=((e,n)=>{if(void 0===n)return n;let t=(n||"").replace(/^\//,"");return Object.keys(e).forEach((n=>{t=t.replace(`:${n}`,e[n])})),t})(j,i);void 0!==x&&e.push(x);const y=null!=l?l:r;if("separator"===s)return o.createElement(f,{key:y},h);const b={},_=r===P.length-1;u?b.menu=u:d&&(b.overlay=d);let{href:k}=a;return e.length&&void 0!==x&&(k=`#/${e.join("/")}`),o.createElement(v,Object.assign({key:y},b,(0,c.Z)(a,{data:!0,aria:!0}),{className:m,dropdownProps:g,href:k,separator:_?"":t,onClick:p,prefixCls:C}),T(a,j,n,e,k))}))}else if(h){const e=(0,i.Z)(h).length;w=(0,i.Z)(h).map(((n,a)=>{if(!n)return n;const r=a===e-1;return(0,l.Tm)(n,{separator:r?"":t,key:a})}))}const I=r()(C,null==k?void 0:k.className,{[`${C}-rtl`]:"rtl"===_},u,d,O),R=Object.assign(Object.assign({},null==k?void 0:k.style),a);return E(o.createElement("nav",Object.assign({className:I,style:R},y),o.createElement("ol",null,w)))};E.Item=y,E.Separator=f;var O=E}}]);