From 27772a06db301e4673c0a7d6dc64ad4e59318c0d Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 17 Sep 2019 14:00:02 +0800 Subject: [PATCH 01/55] md --- .../src/modules/courses/coursesPublic/CoursesMarkdown.js | 2 +- public/react/src/modules/forums/MemoNew.js | 4 ++-- public/react/src/modules/paths/PathNew.js | 4 ++-- public/react/src/modules/projectPackages/MDEditors.js | 2 +- public/react/src/modules/tpm/TPMsettings/TPMsettings.js | 4 ++-- public/react/src/modules/tpm/challengesnew/TPManswer.js | 4 ++-- public/react/src/modules/tpm/challengesnew/TPMevaluation.js | 4 ++-- public/react/src/modules/tpm/challengesnew/editorMD.js | 4 ++-- public/react/src/modules/tpm/newshixuns/Newshixuns.js | 4 ++-- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/CoursesMarkdown.js b/public/react/src/modules/courses/coursesPublic/CoursesMarkdown.js index 4510a7080..fea6c79be 100644 --- a/public/react/src/modules/courses/coursesPublic/CoursesMarkdown.js +++ b/public/react/src/modules/courses/coursesPublic/CoursesMarkdown.js @@ -141,7 +141,7 @@ function create_editorMD(id, width, high, placeholder, imageUrl, callback, initV $("#" + _id + " [type=\"inline\"]").bind("click", function () { _editorName.cm.replaceSelection("`$$$$`"); var __Cursor = _editorName.cm.getDoc().getCursor(); - _editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2); + _editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 3); _editorName.cm.focus(); }); $("[type=\"inline\"]").attr("title", "行内公式"); diff --git a/public/react/src/modules/forums/MemoNew.js b/public/react/src/modules/forums/MemoNew.js index a20708234..2f6eb196d 100644 --- a/public/react/src/modules/forums/MemoNew.js +++ b/public/react/src/modules/forums/MemoNew.js @@ -101,9 +101,9 @@ function create_editorMD(id, width, high, placeholder, imageUrl, callback){ }); $("#"+ id +" [type=\"inline\"]").bind("click", function(){ - editorName.cm.replaceSelection("$$$$"); + editorName.cm.replaceSelection("`$$$$`"); var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line, __Cursor.ch-2); + editorName.cm.setCursor(__Cursor.line, __Cursor.ch-3); editorName.cm.focus(); }); $("[type=\"inline\"]").attr("title", "行内公式"); diff --git a/public/react/src/modules/paths/PathNew.js b/public/react/src/modules/paths/PathNew.js index 4e1621bc5..588c1a895 100644 --- a/public/react/src/modules/paths/PathNew.js +++ b/public/react/src/modules/paths/PathNew.js @@ -58,9 +58,9 @@ function create_editorMD(id, width, high, placeholder, imageUrl,initValue, callb }); $("#" + id + " [type=\"inline\"]").bind("click", function () { - editorName.cm.replaceSelection("$$$$"); + editorName.cm.replaceSelection("`$$$$`"); var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2); + editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 3); editorName.cm.focus(); }); $("[type=\"inline\"]").attr("title", "行内公式"); diff --git a/public/react/src/modules/projectPackages/MDEditors.js b/public/react/src/modules/projectPackages/MDEditors.js index 61e26db23..abd1d2da8 100644 --- a/public/react/src/modules/projectPackages/MDEditors.js +++ b/public/react/src/modules/projectPackages/MDEditors.js @@ -168,7 +168,7 @@ function create_editorMD(id, width, high, placeholder, imageUrl, callback, initV $("#" + _id + " [type=\"inline\"]").bind("click", function () { _editorName.cm.replaceSelection("`$$$$`"); var __Cursor = _editorName.cm.getDoc().getCursor(); - _editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2); + _editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 3); _editorName.cm.focus(); }); $("[type=\"inline\"]").attr("title", "行内公式"); diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js index b2767887d..7acaf98d6 100644 --- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js +++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js @@ -156,9 +156,9 @@ function create_editorMD(id, width, high, placeholder, imageUrl,initValue, callb }); $("#" + id + " [type=\"inline\"]").bind("click", function () { - editorName.cm.replaceSelection("$$$$"); + editorName.cm.replaceSelection("`$$$$`"); var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2); + editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 3); editorName.cm.focus(); }); $("[type=\"inline\"]").attr("title", "行内公式"); diff --git a/public/react/src/modules/tpm/challengesnew/TPManswer.js b/public/react/src/modules/tpm/challengesnew/TPManswer.js index d29516422..bc9523422 100644 --- a/public/react/src/modules/tpm/challengesnew/TPManswer.js +++ b/public/react/src/modules/tpm/challengesnew/TPManswer.js @@ -130,9 +130,9 @@ function create_editorMD(id, width, high, placeholder, imageUrl, callback) { }); $("#" + id + " [type=\"inline\"]").bind("click", function () { - editorName.cm.replaceSelection("$$$$"); + editorName.cm.replaceSelection("`$$$$`"); var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2); + editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 3); editorName.cm.focus(); }); $("[type=\"inline\"]").attr("title", "行内公式"); diff --git a/public/react/src/modules/tpm/challengesnew/TPMevaluation.js b/public/react/src/modules/tpm/challengesnew/TPMevaluation.js index dd074fc0d..a8e70cb44 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMevaluation.js +++ b/public/react/src/modules/tpm/challengesnew/TPMevaluation.js @@ -73,9 +73,9 @@ function create_editorMD(id, width, high, placeholder, imageUrl, callback) { }); $("#" + id + " [type=\"inline\"]").bind("click", function () { - editorName.cm.replaceSelection("$$$$"); + editorName.cm.replaceSelection("`$$$$`"); var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2); + editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 3); editorName.cm.focus(); }); $("[type=\"inline\"]").attr("title", "行内公式"); diff --git a/public/react/src/modules/tpm/challengesnew/editorMD.js b/public/react/src/modules/tpm/challengesnew/editorMD.js index 70834ea50..50f15b601 100644 --- a/public/react/src/modules/tpm/challengesnew/editorMD.js +++ b/public/react/src/modules/tpm/challengesnew/editorMD.js @@ -51,9 +51,9 @@ function create_editorMD(id, width, high, placeholder, imageUrl, callback) { }); $("#" + id + " [type=\"inline\"]").bind("click", function () { - editorName.cm.replaceSelection("$$$$"); + editorName.cm.replaceSelection("`$$$$`"); var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2); + editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 3); editorName.cm.focus(); }); $("[type=\"inline\"]").attr("title", "行内公式"); diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js index c2c464618..b33552e49 100644 --- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js +++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js @@ -160,9 +160,9 @@ function create_editorMD(id, width, high, placeholder, imageUrl, callback) { }); $("#" + id + " [type=\"inline\"]").bind("click", function () { - editorName.cm.replaceSelection("$$$$"); + editorName.cm.replaceSelection("`$$$$`"); var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2); + editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 3); editorName.cm.focus(); }); $("[type=\"inline\"]").attr("title", "行内公式"); From bca96139e1438ec593df14b222367616d5694866 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 17 Sep 2019 14:35:34 +0800 Subject: [PATCH 02/55] this --- public/react/src/modules/paths/PathNew.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/react/src/modules/paths/PathNew.js b/public/react/src/modules/paths/PathNew.js index 588c1a895..d9da9c0d4 100644 --- a/public/react/src/modules/paths/PathNew.js +++ b/public/react/src/modules/paths/PathNew.js @@ -48,6 +48,8 @@ function create_editorMD(id, width, high, placeholder, imageUrl,initValue, callb imageUploadURL: imageUrl,//url onload: function () { // this.previewing(); + var id = this.id; + var editorName = this; $("#" + id + " [type=\"latex\"]").bind("click", function () { editorName.cm.replaceSelection("```latex"); editorName.cm.replaceSelection("\n"); From eac298a583fbce83aa6ae9e830625ca76764b4ef Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 17 Sep 2019 15:32:33 +0800 Subject: [PATCH 03/55] string --- public/editormd/lib/marked.min.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/editormd/lib/marked.min.js b/public/editormd/lib/marked.min.js index 88ec3e856..6f14c6e7c 100644 --- a/public/editormd/lib/marked.min.js +++ b/public/editormd/lib/marked.min.js @@ -11,4 +11,6 @@ out+=this.renderer.em(this.output(cap[2]||cap[1]), cap.input) */ // 0.4.0 /^ *(#{1,6}) ——》/^ *(#{1,6}) 去掉了一个空格 TODO 行内公式带_ -!function(e){"use strict";var t={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:d,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6})*([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:d,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:d,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function n(e){this.tokens=[],this.tokens.links={},this.options=e||m.defaults,this.rules=t.normal,this.options.pedantic?this.rules=t.pedantic:this.options.gfm&&(this.options.tables?this.rules=t.tables:this.rules=t.gfm)}t._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,t._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,t.def=p(t.def).replace("label",t._label).replace("title",t._title).getRegex(),t.bullet=/(?:[*+-]|\d+\.)/,t.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,t.item=p(t.item,"gm").replace(/bull/g,t.bullet).getRegex(),t.list=p(t.list).replace(/bull/g,t.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+t.def.source+")").getRegex(),t._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",t._comment=//,t.html=p(t.html,"i").replace("comment",t._comment).replace("tag",t._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),t.paragraph=p(t.paragraph).replace("hr",t.hr).replace("heading",t.heading).replace("lheading",t.lheading).replace("tag",t._tag).getRegex(),t.blockquote=p(t.blockquote).replace("paragraph",t.paragraph).getRegex(),t.normal=f({},t),t.gfm=f({},t.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6})+([^\n]+?) *#* *(?:\n+|$)/}),t.gfm.paragraph=p(t.paragraph).replace("(?!","(?!"+t.gfm.fences.source.replace("\\1","\\2")+"|"+t.list.source.replace("\\1","\\3")+"|").getRegex(),t.tables=f({},t.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),t.pedantic=f({},t.normal,{html:p("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",t._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),n.rules=t,n.lex=function(e,t){return new n(t).lex(e)},n.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},n.prototype.token=function(e,n){var r,s,i,l,o,a,h,p,u,c,g,d,f;for(e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:i.replace(/\n+$/,"")});else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2],text:i[3]||""});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(n&&(i=this.rules.nptable.exec(e))&&(a={type:"table",header:b(i[1].replace(/^ *| *\| *$/g,"")),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3]?i[3].replace(/\n$/,"").split("\n"):[]}).header.length===a.align.length){for(e=e.substring(i[0].length),p=0;p ?/gm,""),this.token(i,n),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),g=(l=i[2]).length>1,this.tokens.push({type:"list_start",ordered:g,start:g?+l:""}),r=!1,c=(i=i[0].match(this.rules.item)).length,p=0;p1&&o.length>1||(e=i.slice(p+1).join("\n")+e,p=c-1)),s=r||/\n\n(?!\s*$)/.test(a),p!==c-1&&(r="\n"===a.charAt(a.length-1),s||(s=r)),f=void 0,(d=/^\[[ xX]\] /.test(a))&&(f=" "!==a[1],a=a.replace(/^\[[ xX]\] +/,"")),this.tokens.push({type:s?"loose_item_start":"list_item_start",task:d,checked:f}),this.token(a,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(e))e=e.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===i[1]||"script"===i[1]||"style"===i[1]),text:i[0]});else if(n&&(i=this.rules.def.exec(e)))e=e.substring(i[0].length),i[3]&&(i[3]=i[3].substring(1,i[3].length-1)),u=i[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[u]||(this.tokens.links[u]={href:i[2],title:i[3]});else if(n&&(i=this.rules.table.exec(e))&&(a={type:"table",header:b(i[1].replace(/^ *| *\| *$/g,"")),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3]?i[3].replace(/(?: *\| *)?\n$/,"").split("\n"):[]}).header.length===a.align.length){for(e=e.substring(i[0].length),p=0;p?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:d,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)|^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)/,em:/^_([^\s][\s\S]*?[^\s_])_(?!_)|^_([^\s_][\s\S]*?[^\s])_(?!_)|^\*([^\s][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*][\s\S]*?[^\s])\*(?!\*)|^_([^\s_])_(?!_)|^\*([^\s*])\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:d,text:/^[\s\S]+?(?=[\\/g,">").replace(/"/g,""").replace(/'/g,"'")}function h(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function p(e,t){return e=e.source||e,t=t||"",{replace:function(t,n){return n=(n=n.source||n).replace(/(^|[^\[])\^/g,"$1"),e=e.replace(t,n),this},getRegex:function(){return new RegExp(e,t)}}}function u(e,t){return c[" "+e]||(/^[^:]+:\/*[^/]*$/.test(e)?c[" "+e]=e+"/":c[" "+e]=e.replace(/[^/]*$/,"")),e=c[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+t:e+t}r._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,r._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,r._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,r.autolink=p(r.autolink).replace("scheme",r._scheme).replace("email",r._email).getRegex(),r._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,r.tag=p(r.tag).replace("comment",t._comment).replace("attribute",r._attribute).getRegex(),r._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,r._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f()\\]*\)|[^\s\x00-\x1f()\\])*?)/,r._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,r.link=p(r.link).replace("label",r._label).replace("href",r._href).replace("title",r._title).getRegex(),r.reflink=p(r.reflink).replace("label",r._label).getRegex(),r.normal=f({},r),r.pedantic=f({},r.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",r._label).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",r._label).getRegex()}),r.gfm=f({},r.normal,{escape:p(r.escape).replace("])","~|])").getRegex(),url:p(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("email",r._email).getRegex(),_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:p(r.text).replace("]|","~]|").replace("|","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|").getRegex()}),r.breaks=f({},r.gfm,{br:p(r.br).replace("{2,}","*").getRegex(),text:p(r.gfm.text).replace("{2,}","*").getRegex()}),s.rules=r,s.output=function(e,t,n){return new s(t,n).output(e)},s.prototype.output=function(e){for(var t,n,r,i,l,o="";e;)if(l=this.rules.escape.exec(e))e=e.substring(l[0].length),o+=l[1];else if(l=this.rules.autolink.exec(e))e=e.substring(l[0].length),r="@"===l[2]?"mailto:"+(n=a(this.mangle(l[1]))):n=a(l[1]),o+=this.renderer.link(r,null,n);else if(this.inLink||!(l=this.rules.url.exec(e))){if(l=this.rules.tag.exec(e))!this.inLink&&/^/i.test(l[0])&&(this.inLink=!1),e=e.substring(l[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(l[0]):a(l[0]):l[0];else if(l=this.rules.link.exec(e))e=e.substring(l[0].length),this.inLink=!0,r=l[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r))?(r=t[1],i=t[3]):i="":i=l[3]?l[3].slice(1,-1):"",r=r.trim().replace(/^<([\s\S]*)>$/,"$1"),o+=this.outputLink(l,{href:s.escapes(r),title:s.escapes(i)}),this.inLink=!1;else if((l=this.rules.reflink.exec(e))||(l=this.rules.nolink.exec(e))){if(e=e.substring(l[0].length),t=(l[2]||l[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){o+=l[0].charAt(0),e=l[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(l,t),this.inLink=!1}else if(l=this.rules.strong.exec(e))e=e.substring(l[0].length),o+=this.renderer.strong(this.output(l[4]||l[3]||l[2]||l[1]));else if(l=this.rules.em.exec(e))e=e.substring(l[0].length),o+=this.renderer.em(this.output(l[6]||l[5]||l[4]||l[3]||l[2]||l[1]));else if(l=this.rules.code.exec(e))e=e.substring(l[0].length),o+=this.renderer.codespan(a(l[2].trim(),!0));else if(l=this.rules.br.exec(e))e=e.substring(l[0].length),o+=this.renderer.br();else if(l=this.rules.del.exec(e))e=e.substring(l[0].length),o+=this.renderer.del(this.output(l[1]));else if(l=this.rules.text.exec(e))e=e.substring(l[0].length),o+=this.renderer.text(a(this.smartypants(l[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else l[0]=this.rules._backpedal.exec(l[0])[0],e=e.substring(l[0].length),"@"===l[2]?r="mailto:"+(n=a(l[0])):(n=a(l[0]),r="www."===l[1]?"http://"+n:n),o+=this.renderer.link(r,null,n);return o},s.escapes=function(e){return e?e.replace(s.rules._escapes,"$1"):e},s.prototype.outputLink=function(e,t){var n=t.href,r=t.title?a(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,a(e[1]))},s.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},s.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,s=0;s.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},i.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
'+(n?e:a(e,!0))+"
\n":"
"+(n?e:a(e,!0))+"
"},i.prototype.blockquote=function(e){return"
\n"+e+"
\n"},i.prototype.html=function(e){return e},i.prototype.heading=function(e,t,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},i.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},i.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},i.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},i.prototype.checkbox=function(e){return" "},i.prototype.paragraph=function(e){return"

    "+e+"

    \n"},i.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},i.prototype.tablerow=function(e){return"\n"+e+"\n"},i.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},i.prototype.strong=function(e){return""+e+""},i.prototype.em=function(e){return""+e+""},i.prototype.codespan=function(e){return""+e+""},i.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},i.prototype.del=function(e){return""+e+""},i.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(h(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return n}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return n}this.options.baseUrl&&!g.test(e)&&(e=u(this.options.baseUrl,e));try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return n}var s='
    "},i.prototype.image=function(e,t,n){this.options.baseUrl&&!g.test(e)&&(e=u(this.options.baseUrl,e));var r=''+n+'":">"},i.prototype.text=function(e){return e},l.prototype.strong=l.prototype.em=l.prototype.codespan=l.prototype.del=l.prototype.text=function(e){return e},l.prototype.link=l.prototype.image=function(e,t,n){return""+n},l.prototype.br=function(){return""},o.parse=function(e,t){return new o(t).parse(e)},o.prototype.parse=function(e){this.inline=new s(e.links,this.options),this.inlineText=new s(e.links,f({},this.options,{renderer:new l})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},o.prototype.next=function(){return this.token=this.tokens.pop()},o.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},o.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},o.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,h(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,s="",i="";for(n="",e=0;et)n.splice(t);else for(;n.lengthAn error occurred:

    "+a(e.message+"",!0)+"
    ";throw e}}d.exec=d,m.options=m.setOptions=function(e){return f(m.defaults,e),m},m.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new i,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},m.defaults=m.getDefaults(),m.Parser=o,m.parser=o.parse,m.Renderer=i,m.TextRenderer=l,m.Lexer=n,m.lexer=n.lex,m.InlineLexer=s,m.inlineLexer=s.output,m.parse=m,"undefined"!=typeof module&&"object"==typeof exports?module.exports=m:"function"==typeof define&&define.amd?define(function(){return m}):e.marked=m}(this||("undefined"!=typeof window?window:global)); +/*if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");*/ +!function(e){"use strict";var t={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:d,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6})*([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:d,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:d,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function n(e){this.tokens=[],this.tokens.links={},this.options=e||m.defaults,this.rules=t.normal,this.options.pedantic?this.rules=t.pedantic:this.options.gfm&&(this.options.tables?this.rules=t.tables:this.rules=t.gfm)}t._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,t._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,t.def=p(t.def).replace("label",t._label).replace("title",t._title).getRegex(),t.bullet=/(?:[*+-]|\d+\.)/,t.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,t.item=p(t.item,"gm").replace(/bull/g,t.bullet).getRegex(),t.list=p(t.list).replace(/bull/g,t.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+t.def.source+")").getRegex(),t._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",t._comment=//,t.html=p(t.html,"i").replace("comment",t._comment).replace("tag",t._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),t.paragraph=p(t.paragraph).replace("hr",t.hr).replace("heading",t.heading).replace("lheading",t.lheading).replace("tag",t._tag).getRegex(),t.blockquote=p(t.blockquote).replace("paragraph",t.paragraph).getRegex(),t.normal=f({},t),t.gfm=f({},t.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6})+([^\n]+?) *#* *(?:\n+|$)/}),t.gfm.paragraph=p(t.paragraph).replace("(?!","(?!"+t.gfm.fences.source.replace("\\1","\\2")+"|"+t.list.source.replace("\\1","\\3")+"|").getRegex(),t.tables=f({},t.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),t.pedantic=f({},t.normal,{html:p("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",t._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),n.rules=t,n.lex=function(e,t){return new n(t).lex(e)},n.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},n.prototype.token=function(e,n){var r,s,i,l,o,a,h,p,u,c,g,d,f;for(e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:i.replace(/\n+$/,"")});else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2],text:i[3]||""});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(n&&(i=this.rules.nptable.exec(e))&&(a={type:"table",header:b(i[1].replace(/^ *| *\| *$/g,"")),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3]?i[3].replace(/\n$/,"").split("\n"):[]}).header.length===a.align.length){for(e=e.substring(i[0].length),p=0;p ?/gm,""),this.token(i,n),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),g=(l=i[2]).length>1,this.tokens.push({type:"list_start",ordered:g,start:g?+l:""}),r=!1,c=(i=i[0].match(this.rules.item)).length,p=0;p1&&o.length>1||(e=i.slice(p+1).join("\n")+e,p=c-1)),s=r||/\n\n(?!\s*$)/.test(a),p!==c-1&&(r="\n"===a.charAt(a.length-1),s||(s=r)),f=void 0,(d=/^\[[ xX]\] /.test(a))&&(f=" "!==a[1],a=a.replace(/^\[[ xX]\] +/,"")),this.tokens.push({type:s?"loose_item_start":"list_item_start",task:d,checked:f}),this.token(a,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(e))e=e.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===i[1]||"script"===i[1]||"style"===i[1]),text:i[0]});else if(n&&(i=this.rules.def.exec(e)))e=e.substring(i[0].length),i[3]&&(i[3]=i[3].substring(1,i[3].length-1)),u=i[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[u]||(this.tokens.links[u]={href:i[2],title:i[3]});else if(n&&(i=this.rules.table.exec(e))&&(a={type:"table",header:b(i[1].replace(/^ *| *\| *$/g,"")),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3]?i[3].replace(/(?: *\| *)?\n$/,"").split("\n"):[]}).header.length===a.align.length){for(e=e.substring(i[0].length),p=0;p?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:d,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)|^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)/,em:/^_([^\s][\s\S]*?[^\s_])_(?!_)|^_([^\s_][\s\S]*?[^\s])_(?!_)|^\*([^\s][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*][\s\S]*?[^\s])\*(?!\*)|^_([^\s_])_(?!_)|^\*([^\s*])\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:d,text:/^[\s\S]+?(?=[\\/g,">").replace(/"/g,""").replace(/'/g,"'")}function h(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function p(e,t){return e=e.source||e,t=t||"",{replace:function(t,n){return n=(n=n.source||n).replace(/(^|[^\[])\^/g,"$1"),e=e.replace(t,n),this},getRegex:function(){return new RegExp(e,t)}}}function u(e,t){return c[" "+e]||(/^[^:]+:\/*[^/]*$/.test(e)?c[" "+e]=e+"/":c[" "+e]=e.replace(/[^/]*$/,"")),e=c[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+t:e+t}r._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,r._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,r._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,r.autolink=p(r.autolink).replace("scheme",r._scheme).replace("email",r._email).getRegex(),r._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,r.tag=p(r.tag).replace("comment",t._comment).replace("attribute",r._attribute).getRegex(),r._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,r._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f()\\]*\)|[^\s\x00-\x1f()\\])*?)/,r._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,r.link=p(r.link).replace("label",r._label).replace("href",r._href).replace("title",r._title).getRegex(),r.reflink=p(r.reflink).replace("label",r._label).getRegex(),r.normal=f({},r),r.pedantic=f({},r.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",r._label).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",r._label).getRegex()}),r.gfm=f({},r.normal,{escape:p(r.escape).replace("])","~|])").getRegex(),url:p(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("email",r._email).getRegex(),_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:p(r.text).replace("]|","~]|").replace("|","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|").getRegex()}),r.breaks=f({},r.gfm,{br:p(r.br).replace("{2,}","*").getRegex(),text:p(r.gfm.text).replace("{2,}","*").getRegex()}),s.rules=r,s.output=function(e,t,n){return new s(t,n).output(e)},s.prototype.output=function(e){for(var t,n,r,i,l,o="";e;)if(l=this.rules.escape.exec(e))e=e.substring(l[0].length),o+=l[1];else if(l=this.rules.autolink.exec(e))e=e.substring(l[0].length),r="@"===l[2]?"mailto:"+(n=a(this.mangle(l[1]))):n=a(l[1]),o+=this.renderer.link(r,null,n);else if(this.inLink||!(l=this.rules.url.exec(e))){if(l=this.rules.tag.exec(e))!this.inLink&&/^
    /i.test(l[0])&&(this.inLink=!1),e=e.substring(l[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(l[0]):a(l[0]):l[0];else if(l=this.rules.link.exec(e))e=e.substring(l[0].length),this.inLink=!0,r=l[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r))?(r=t[1],i=t[3]):i="":i=l[3]?l[3].slice(1,-1):"",r=r.trim().replace(/^<([\s\S]*)>$/,"$1"),o+=this.outputLink(l,{href:s.escapes(r),title:s.escapes(i)}),this.inLink=!1;else if((l=this.rules.reflink.exec(e))||(l=this.rules.nolink.exec(e))){if(e=e.substring(l[0].length),t=(l[2]||l[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){o+=l[0].charAt(0),e=l[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(l,t),this.inLink=!1}else if(l=this.rules.strong.exec(e))e=e.substring(l[0].length),o+=this.renderer.strong(this.output(l[4]||l[3]||l[2]||l[1]));else if(l=this.rules.em.exec(e))e=e.substring(l[0].length),o+=this.renderer.em(this.output(l[6]||l[5]||l[4]||l[3]||l[2]||l[1]));else if(l=this.rules.code.exec(e))e=e.substring(l[0].length),o+=this.renderer.codespan(a(l[2].trim(),!0));else if(l=this.rules.br.exec(e))e=e.substring(l[0].length),o+=this.renderer.br();else if(l=this.rules.del.exec(e))e=e.substring(l[0].length),o+=this.renderer.del(this.output(l[1]));else if(l=this.rules.text.exec(e))e=e.substring(l[0].length),o+=this.renderer.text(a(this.smartypants(l[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else l[0]=this.rules._backpedal.exec(l[0])[0],e=e.substring(l[0].length),"@"===l[2]?r="mailto:"+(n=a(l[0])):(n=a(l[0]),r="www."===l[1]?"http://"+n:n),o+=this.renderer.link(r,null,n);return o},s.escapes=function(e){return e?e.replace(s.rules._escapes,"$1"):e},s.prototype.outputLink=function(e,t){var n=t.href,r=t.title?a(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,a(e[1]))},s.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},s.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,s=0;s.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},i.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
    '+(n?e:a(e,!0))+"
    \n":"
    "+(n?e:a(e,!0))+"
    "},i.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},i.prototype.html=function(e){return e},i.prototype.heading=function(e,t,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},i.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},i.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},i.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},i.prototype.checkbox=function(e){return" "},i.prototype.paragraph=function(e){return"

    "+e+"

    \n"},i.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},i.prototype.tablerow=function(e){return"\n"+e+"\n"},i.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},i.prototype.strong=function(e){return""+e+""},i.prototype.em=function(e){return""+e+""},i.prototype.codespan=function(e){return""+e+""},i.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},i.prototype.del=function(e){return""+e+""},i.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(h(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return n}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return n}this.options.baseUrl&&!g.test(e)&&(e=u(this.options.baseUrl,e));try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return n}var s='
    "},i.prototype.image=function(e,t,n){this.options.baseUrl&&!g.test(e)&&(e=u(this.options.baseUrl,e));var r=''+n+'":">"},i.prototype.text=function(e){return e},l.prototype.strong=l.prototype.em=l.prototype.codespan=l.prototype.del=l.prototype.text=function(e){return e},l.prototype.link=l.prototype.image=function(e,t,n){return""+n},l.prototype.br=function(){return""},o.parse=function(e,t){return new o(t).parse(e)},o.prototype.parse=function(e){this.inline=new s(e.links,this.options),this.inlineText=new s(e.links,f({},this.options,{renderer:new l})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},o.prototype.next=function(){return this.token=this.tokens.pop()},o.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},o.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},o.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,h(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,s="",i="";for(n="",e=0;et)n.splice(t);else for(;n.lengthAn error occurred:

    "+a(e.message+"",!0)+"
    ";throw e}}d.exec=d,m.options=m.setOptions=function(e){return f(m.defaults,e),m},m.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new i,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},m.defaults=m.getDefaults(),m.Parser=o,m.parser=o.parse,m.Renderer=i,m.TextRenderer=l,m.Lexer=n,m.lexer=n.lex,m.InlineLexer=s,m.inlineLexer=s.output,m.parse=m,"undefined"!=typeof module&&"object"==typeof exports?module.exports=m:"function"==typeof define&&define.amd?define(function(){return m}):e.marked=m}(this||("undefined"!=typeof window?window:global)); + From f9ee0733cf7515357f16a0e6bf423210bafcd9d9 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 17 Sep 2019 16:14:11 +0800 Subject: [PATCH 04/55] =?UTF-8?q?=E6=96=B0=E5=BB=BA=EF=BC=8C=E7=84=B6?= =?UTF-8?q?=E5=90=8E=E5=88=A0=E9=99=A4CD=E9=80=89=E9=A1=B9=EF=BC=8C?= =?UTF-8?q?=E5=86=8D=E8=BE=93=E5=85=A5=E9=A2=98=E5=B9=B2=EF=BC=8C=E4=BC=9A?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E5=88=B0=E8=BF=99=E9=87=8C=EF=BC=8C=E4=B8=94?= =?UTF-8?q?index=E6=98=AF3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/exercise/new/SingleEditor.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/react/src/modules/courses/exercise/new/SingleEditor.js b/public/react/src/modules/courses/exercise/new/SingleEditor.js index b3c2842f5..1e2005360 100644 --- a/public/react/src/modules/courses/exercise/new/SingleEditor.js +++ b/public/react/src/modules/courses/exercise/new/SingleEditor.js @@ -182,6 +182,10 @@ class SingleEditor extends Component{ this.setState({ standard_answers }) } onOptionContentChange = (value, index) => { + if (index >= this.state.question_choices.length) { + // TODO 新建,然后删除CD选项,再输入题干,会调用到这里,且index是3 + return; + } let question_choices = this.state.question_choices.slice(0); question_choices[index] = value; this.setState({ question_choices }) From 38073532b69de8dc2e452f24109671c881fe6e16 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 17 Sep 2019 17:21:36 +0800 Subject: [PATCH 05/55] =?UTF-8?q?extract-css-assets-webpack-plugin=20=20?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/config/webpack.config.prod.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/config/webpack.config.prod.js b/public/react/config/webpack.config.prod.js index ddc111b9c..27512b1dc 100644 --- a/public/react/config/webpack.config.prod.js +++ b/public/react/config/webpack.config.prod.js @@ -1,5 +1,5 @@ 'use strict'; - +// extract-css-assets-webpack-plugin const autoprefixer = require('autoprefixer'); const path = require('path'); const webpack = require('webpack'); From f824d93473349ee8f0255e6c94bbdbc25ed0cb0c Mon Sep 17 00:00:00 2001 From: p31729568 Date: Wed, 18 Sep 2019 09:10:01 +0800 Subject: [PATCH 06/55] tiding: use system avatar when tiding type is System --- app/views/tidings/_tiding.json.jbuilder | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/views/tidings/_tiding.json.jbuilder b/app/views/tidings/_tiding.json.jbuilder index 210e5c8f8..b53574274 100644 --- a/app/views/tidings/_tiding.json.jbuilder +++ b/app/views/tidings/_tiding.json.jbuilder @@ -18,9 +18,7 @@ json.time tiding.how_long_time json.new_tiding tiding.unread?(@onclick_time) # 需要系统头像 -show_system_user = tiding.trigger_user_id.zero? || - (tiding.trigger_user_id == 1 && tiding.tiding_type == 'System') || - tiding.anonymous? +show_system_user = tiding.trigger_user_id.zero? || tiding.tiding_type == 'System' || tiding.anonymous? json.trigger_user do if show_system_user From fd8b631651a738265f39c76799e46f6aa0b63c9c Mon Sep 17 00:00:00 2001 From: p31729568 Date: Wed, 18 Sep 2019 09:13:30 +0800 Subject: [PATCH 07/55] tiding: fix student join course tiding content error --- app/decorators/tiding_decorator.rb | 2 +- config/locales/tidings/zh-CN.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/decorators/tiding_decorator.rb b/app/decorators/tiding_decorator.rb index df642a074..851c3d075 100644 --- a/app/decorators/tiding_decorator.rb +++ b/app/decorators/tiding_decorator.rb @@ -81,7 +81,7 @@ module TidingDecorator end def student_join_course_content - I18n.t(locale_format) % Course.find_by(id: container_id)&.name + I18n.t(locale_format) % [trigger_user.show_real_name, Course.find_by(id: container_id)&.name] end def teacher_join_course_content diff --git a/config/locales/tidings/zh-CN.yml b/config/locales/tidings/zh-CN.yml index 21c020d04..ce6fd57b0 100644 --- a/config/locales/tidings/zh-CN.yml +++ b/config/locales/tidings/zh-CN.yml @@ -19,7 +19,7 @@ "9_2_end": "你提交的加入课堂申请:%s(教师), 审核未通过" "7_1_end": "你提交的加入课堂申请:%s(助教), 审核已通过" "7_2_end": "你提交的加入课堂申请:%s(助教), 审核未通过" - StudentJoinCourse_end: "加入了课堂:%s(学生)" + StudentJoinCourse_end: "%s 加入了课堂:%s(学生)" TeacherJoinCourse: "2_end": "%s将你加入课堂:%s(教师)" "3_end": "%s将你加入课堂:%s(助教)" From c436e780d437a1fafb960aac46f01a64c0a7df9a Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 18 Sep 2019 09:16:13 +0800 Subject: [PATCH 08/55] callback && callback() --- public/react/src/common/util/ShareUtil.js | 74 ++++++++++++----------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/public/react/src/common/util/ShareUtil.js b/public/react/src/common/util/ShareUtil.js index e591effaf..1ea3326d9 100644 --- a/public/react/src/common/util/ShareUtil.js +++ b/public/react/src/common/util/ShareUtil.js @@ -16,41 +16,45 @@ const urlDoneMap = {} function requestForSignatrue (callback) { const currentUrl = window.location.href.split('#')[0] - if (window.wx && !urlDoneMap[currentUrl]) { - const wx = window.wx - const url = '/wechats/js_sdk_signature.json' - urlDoneMap[currentUrl] = true - // window.encodeURIComponent() - axios.post(url, { - url: window.__testUrl || currentUrl, - }).then((response) => { - console.log('got res') - const data = response.data; - wx.config({ - debug: false, - appId: data.appid, - timestamp: data.timestamp, - nonceStr: data.noncestr, - signature: data.signature, - jsApiList: [ - 'onMenuShareTimeline',// - 'onMenuShareAppMessage', - 'onMenuShareQQ', - 'onMenuShareWeibo', - 'onMenuShareQZone' - ] - }); - wx.ready(function () { - callback && callback() - }); - wx.error(function (res) { - console.log('wx is error') - console.log(res) - //alert(res.errMsg);//错误提示 - }); - }).catch((error) => { - console.log(error) - }) + if (window.wx) { + if (urlDoneMap[currentUrl]) { + callback && callback() + } else { + const wx = window.wx + const url = '/wechats/js_sdk_signature.json' + urlDoneMap[currentUrl] = true + // window.encodeURIComponent() + axios.post(url, { + url: window.__testUrl || currentUrl, + }).then((response) => { + console.log('got res') + const data = response.data; + wx.config({ + debug: false, + appId: data.appid, + timestamp: data.timestamp, + nonceStr: data.noncestr, + signature: data.signature, + jsApiList: [ + 'onMenuShareTimeline',// + 'onMenuShareAppMessage', + 'onMenuShareQQ', + 'onMenuShareWeibo', + 'onMenuShareQZone' + ] + }); + wx.ready(function () { + callback && callback() + }); + wx.error(function (res) { + console.log('wx is error') + console.log(res) + //alert(res.errMsg);//错误提示 + }); + }).catch((error) => { + console.log(error) + }) + } } } /** From 4cb8898f46f8caf3c8397ccb8071a143c2817ff0 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 18 Sep 2019 10:57:18 +0800 Subject: [PATCH 09/55] dispose --- public/react/src/modules/page/component/monaco/TPIMonaco.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/react/src/modules/page/component/monaco/TPIMonaco.js b/public/react/src/modules/page/component/monaco/TPIMonaco.js index 6d53cfac7..c16e5eb65 100644 --- a/public/react/src/modules/page/component/monaco/TPIMonaco.js +++ b/public/react/src/modules/page/component/monaco/TPIMonaco.js @@ -245,6 +245,10 @@ class TPIMonaco extends Component { // extend_editor.clearHistory() } } + componentWillUnmount() { + editor_monaco.dispose() + } + componentDidMount() { checkIfLoaded(() => { let value = [ From 64d888bab19a1246d742d67748014ed0aff7cf5a Mon Sep 17 00:00:00 2001 From: p31729568 Date: Wed, 18 Sep 2019 11:29:29 +0800 Subject: [PATCH 10/55] admins: fix user list page --- app/models/user_extension.rb | 2 +- app/views/admins/users/index.html.erb | 2 +- config/locales/users/zh-CN.yml | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/models/user_extension.rb b/app/models/user_extension.rb index 98afcb165..0a2249308 100644 --- a/app/models/user_extension.rb +++ b/app/models/user_extension.rb @@ -1,6 +1,6 @@ class UserExtension < ApplicationRecord # identity 0: 教师教授 1: 学生, 2: 专业人士, 3: 开发者 - enum identity: { teacher: 0, student: 1, professional: 2, developer: 3, cnmooc: 4, unselect: -1 } + enum identity: { teacher: 0, student: 1, professional: 2, developer: 3, enterprise: 4, unselect: -1 } belongs_to :user, touch: true belongs_to :school, optional: true diff --git a/app/views/admins/users/index.html.erb b/app/views/admins/users/index.html.erb index 0892b5641..4b8307a7a 100644 --- a/app/views/admins/users/index.html.erb +++ b/app/views/admins/users/index.html.erb @@ -12,7 +12,7 @@
    - <% identity_options = [['全部', '']] + UserExtension.identities.map { |k, v| [I18n.t("user.identity.#{k}"), v] } %> + <% identity_options = [['全部', ''], ['教师', 0], ['学生', 1], ['专业人士', 2]] %> <%= select_tag(:identity, options_for_select(identity_options), class: 'form-control') %>
    diff --git a/config/locales/users/zh-CN.yml b/config/locales/users/zh-CN.yml index 48b8ca075..dc49b6617 100644 --- a/config/locales/users/zh-CN.yml +++ b/config/locales/users/zh-CN.yml @@ -13,7 +13,9 @@ professional: 专业人士 developer: 从业者 enterprise: 组织 + unselect: 未选择 "0": 教师 "1": 学生 "2": 专业人士 - "3": 专业人士 \ No newline at end of file + "3": 从业者 + "4": 组织 \ No newline at end of file From b239ac5ddefd80da9084ce233cda85da01f83b97 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 18 Sep 2019 11:40:36 +0800 Subject: [PATCH 11/55] https://www.trustie.net/issues/24251 --- public/react/src/modules/comment/CommentInput.js | 2 +- public/react/src/modules/page/MainContentContainer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/comment/CommentInput.js b/public/react/src/modules/comment/CommentInput.js index 18708332b..e627caa1a 100644 --- a/public/react/src/modules/comment/CommentInput.js +++ b/public/react/src/modules/comment/CommentInput.js @@ -68,7 +68,7 @@ class CommentInput extends Component {
    + style={{ 'float': 'left', 'marginTop': '6px', 'fontSize': '12px', 'color': '#ff6800'}}> 请勿粘贴答案,否则将造成账号禁用等后果!
    diff --git a/public/react/src/modules/page/MainContentContainer.js b/public/react/src/modules/page/MainContentContainer.js index 50eacdd4b..e217fa386 100644 --- a/public/react/src/modules/page/MainContentContainer.js +++ b/public/react/src/modules/page/MainContentContainer.js @@ -530,7 +530,7 @@ class MainContentContainer extends Component { let codeContent = this.state.repositoryCode; if (window['editor_CodeMirror']) { codeContent = window.editor_CodeMirror.getValue(); - } else if (window.editor_monaco) { + } else if (window.editor_monaco && window.editor_monaco.getModel()) { // (编程切选择题) 如果dispose了,model为空 codeContent = window.editor_monaco.getValue() } if (checkIfCodeChanged === true && this.oldRepositoryCode == codeContent) { From 2f042357610a9237ba56e6272b75729f0959c0df Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 18 Sep 2019 13:37:40 +0800 Subject: [PATCH 12/55] this.editor_monaco --- public/react/src/modules/page/component/monaco/TPIMonaco.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/page/component/monaco/TPIMonaco.js b/public/react/src/modules/page/component/monaco/TPIMonaco.js index c16e5eb65..615623cd1 100644 --- a/public/react/src/modules/page/component/monaco/TPIMonaco.js +++ b/public/react/src/modules/page/component/monaco/TPIMonaco.js @@ -246,7 +246,7 @@ class TPIMonaco extends Component { } } componentWillUnmount() { - editor_monaco.dispose() + this.editor_monaco && this.editor_monaco.dispose() } componentDidMount() { From 66026a77aca5d8ef4c55ee0e6598c784990da3c1 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 18 Sep 2019 14:16:47 +0800 Subject: [PATCH 13/55] =?UTF-8?q?//=20=E5=8A=A0=E4=BA=86dispose=EF=BC=8C?= =?UTF-8?q?=E5=BA=94=E8=AF=A5=E4=B8=8D=E4=BC=9A=E9=87=8D=E7=8E=B0=E4=BA=86?= =?UTF-8?q?=EF=BC=8C=E6=9A=82=E6=97=B6=E6=B3=A8=E9=87=8A=E6=8E=89reload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/page/MainContentContainer.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/page/MainContentContainer.js b/public/react/src/modules/page/MainContentContainer.js index e217fa386..ea029e744 100644 --- a/public/react/src/modules/page/MainContentContainer.js +++ b/public/react/src/modules/page/MainContentContainer.js @@ -308,11 +308,12 @@ class MainContentContainer extends Component { // }) }).then((fetchRepositoryCodeResponse) => { // monaca 需要刷新,不然无法编辑 - if (this.retryAndRefresh && fetchRepositoryCodeResponse.data.content) { - this.retryAndRefresh = false; - window.location.reload() - return; - } + // 加了dispose,应该不会重现了,暂时注释掉reload + // if (this.retryAndRefresh && fetchRepositoryCodeResponse.data.content) { + // this.retryAndRefresh = false; + // window.location.reload() + // return; + // } // 空字符串还是正常切换 if (fetchRepositoryCodeResponse.data.status == 0) { readingRepoTimes = readingRepoTimes + 1; From 5c621b0fb080ad1545e48d410df332abc4d79355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 18 Sep 2019 15:28:12 +0800 Subject: [PATCH 14/55] =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesPublic/NewShixunModel.js | 38 +++++++++++++------ .../courses/coursesPublic/Newshixunmodel.css | 21 +++++++++- 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js index fbb97cbb5..26ebf2099 100644 --- a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js +++ b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js @@ -346,18 +346,28 @@ class NewShixunModel extends Component{ this.props.hideNewShixunModelType()} visible={this.props.NewShixunModelType} height={'100%'} > -
    +
    - this.props.hideNewShixunModelType()}>返回 - this.belongto("mine")}>我的实训 + {/*this.props.hideNewShixunModelType()}>返回*/} + this.belongto("mine")}>我的实训 this.belongto("all")}>全部实训
    @@ -511,15 +521,21 @@ class NewShixunModel extends Component{ :shixun_list.length===0? :"" } - { - shixun_list===undefined?"":shixun_list.length===0?"":
    - - -
    } +
    + +
    + { + shixun_list===undefined?"":shixun_list.length===0?"":
    + + +
    } +
    diff --git a/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css b/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css index 2e8abce53..3bf843326 100644 --- a/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css +++ b/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css @@ -195,7 +195,7 @@ width: 100px; height: 38px; border-radius: 3px; - border: 1px solid rgba(191,191,191,1); + /*border: 1px solid rgba(191,191,191,1);*/ } .ntopsj { @@ -248,3 +248,22 @@ color: #4CACFF; } +.newshixunbottombtn{ + position: fixed; + z-index: 1000; + bottom: 0px; + width: 100%; + height: 63px; + background: rgba(255,255,255,1); + box-shadow: 0px -4px 4px 0px rgba(0,0,0,0.05); +} + + +.mb100{ + margin-bottom: 100px !important; +} + +.padding13-30 { + padding: 13px 30px; + box-sizing: border-box; +} \ No newline at end of file From 041351e501b754b19657b8465a084b9db3d8d67e Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 18 Sep 2019 15:34:33 +0800 Subject: [PATCH 15/55] configShareForCustom --- public/react/src/common/util/ShareUtil.js | 6 +++--- .../src/modules/tpm/shixunchild/Challenges/Challenges.js | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/public/react/src/common/util/ShareUtil.js b/public/react/src/common/util/ShareUtil.js index 1ea3326d9..c11ed6381 100644 --- a/public/react/src/common/util/ShareUtil.js +++ b/public/react/src/common/util/ShareUtil.js @@ -119,14 +119,14 @@ export function configShareForCourses () { } // detail -export function configShareForCustom (title, desc, path, imgUrl) { +export function configShareForCustom (title, desc, imgUrl, path) { requestForSignatrue(() => { console.log('configShareForCustom', host) - + const _path = window.location.href.split('#')[0]; var shareData = { title: title, desc: desc, - link: `${host}/${path}`, + link: `${host}/${path || _path}`, imgUrl: imgUrl || window.__testImageUrl || host + '/react/build/images/share_logo_icon.jpg' }; diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js index ef94f7fa4..e637bf42e 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js @@ -8,7 +8,7 @@ import PropTypes from 'prop-types'; import classNames from 'classnames'; -import { getImageUrl ,markdownToHTML} from 'educoder' +import { getImageUrl ,markdownToHTML, configShareForCustom} from 'educoder' import { CircularProgress } from 'material-ui/Progress'; @@ -51,6 +51,7 @@ class Challenges extends Component { if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { }else{ + configShareForCustom(this.props.shixunsDetails.name, response.data.description) this.setState({ ChallengesDataList: response.data, sumidtype: false, From 274d56fef3284775c120a4bd6af5cdbb45578b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 18 Sep 2019 16:14:27 +0800 Subject: [PATCH 16/55] =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesPublic/NewShixunModel.js | 21 +++++++++++++------ .../courses/coursesPublic/Newshixunmodel.css | 4 ++-- public/react/src/modules/home/shixunsHome.js | 16 +++++++------- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js index 26ebf2099..72b709a8e 100644 --- a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js +++ b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js @@ -78,7 +78,7 @@ class NewShixunModel extends Component{ {item.map((list,key)=>{ return( - {list.name} + {list.name} ) })} @@ -340,6 +340,12 @@ class NewShixunModel extends Component{ `body{ overflow: hidden !important; } .ant-drawer-content{ overflow:auto !important; background: #f5f5f5; } .yslbottomsj{position: absolute;bottom: -8px;} + .ant-drawer-close{ + font-size:24px !important; + } + .ant-drawer-body { + padding: 24px 24px 24px 0px; + } ` } @@ -353,7 +359,7 @@ class NewShixunModel extends Component{ height={'100%'} > -
    +
    @@ -365,11 +371,14 @@ class NewShixunModel extends Component{ .ant-input, .ant-input .ant-input-suffix{ background-color: #fff !important; } + .packinput .ant-input{ + border: 1px solid rgba(217,217,217,1) !important; + } ` } - @@ -449,7 +458,7 @@ class NewShixunModel extends Component{ ` } - {JSON.stringify(item.description) == "{}"?"":
    + {JSON.stringify(item.description) == "{}"?"":
    } {item.challenge_names.length===0?"":
    @@ -533,7 +542,7 @@ class NewShixunModel extends Component{ { shixun_list===undefined?"":shixun_list.length===0?"":
    - +
    }
    diff --git a/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css b/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css index 3bf843326..f0f45a468 100644 --- a/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css +++ b/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css @@ -259,8 +259,8 @@ } -.mb100{ - margin-bottom: 100px !important; +.mb60shixun{ + margin-bottom: 60px !important; } .padding13-30 { diff --git a/public/react/src/modules/home/shixunsHome.js b/public/react/src/modules/home/shixunsHome.js index a60080379..5677193d5 100644 --- a/public/react/src/modules/home/shixunsHome.js +++ b/public/react/src/modules/home/shixunsHome.js @@ -408,7 +408,7 @@ class ShixunsHome extends Component { - {item.username} +

    {item.username}

    ) @@ -422,7 +422,7 @@ class ShixunsHome extends Component { - {item.username} +

    {item.username}

    ) @@ -436,7 +436,7 @@ class ShixunsHome extends Component { - {item.username} +

    {item.username}

    ) @@ -452,7 +452,7 @@ class ShixunsHome extends Component {
  • - {item.username} +

    {item.username}

  • ) @@ -484,7 +484,7 @@ class ShixunsHome extends Component { - {item.username} +

    {item.username}

    ) @@ -498,7 +498,7 @@ class ShixunsHome extends Component { - {item.username} +

    {item.username}

    ) @@ -512,7 +512,7 @@ class ShixunsHome extends Component { - {item.username} +

    {item.username}

    ) @@ -528,7 +528,7 @@ class ShixunsHome extends Component {
  • - {item.username} +

    {item.username}

  • ) From 4b6a0d76483d9bfb28db7b0f463c50509298d42b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 18 Sep 2019 16:29:53 +0800 Subject: [PATCH 17/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/coursesPublic/NewShixunModel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js index 72b709a8e..bae89a7ba 100644 --- a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js +++ b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js @@ -344,7 +344,7 @@ class NewShixunModel extends Component{ font-size:24px !important; } .ant-drawer-body { - padding: 24px 24px 24px 0px; + padding:15px 24px 24px 0px; } ` } @@ -428,7 +428,7 @@ class NewShixunModel extends Component{ {shixun_list===undefined?"":shixun_list.length===0?"":shixun_list.map((item,key)=>{ return( -
    +
    From 2ef7958428b1322f9996c38fca900aaec78163a5 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Wed, 18 Sep 2019 16:37:05 +0800 Subject: [PATCH 18/55] codemirror --- public/react/public/css/css_min_all.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/public/css/css_min_all.css b/public/react/public/css/css_min_all.css index e24882ec4..dc8331c69 100755 --- a/public/react/public/css/css_min_all.css +++ b/public/react/public/css/css_min_all.css @@ -1656,7 +1656,7 @@ html>body #ajax-indicator-base { position: fixed; } .fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{animation:a 2s infinite linear}.fa-pulse{animation:a 1s infinite steps(8)}@keyframes a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-aws:before{content:"\f375"}.fa-backward:before{content:"\f04a"}.fa-balance-scale:before{content:"\f24e"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bicycle:before{content:"\f206"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blind:before{content:"\f29d"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-book:before{content:"\f02d"}.fa-book-open:before{content:"\f518"}.fa-bookmark:before{content:"\f02e"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-btc:before{content:"\f15a"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-certificate:before{content:"\f0a3"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-square:before{content:"\f14a"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-credit-card:before{content:"\f09d"}.fa-crop:before{content:"\f125"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-deviantart:before{content:"\f1bd"}.fa-diagnoses:before{content:"\f470"}.fa-dice:before{content:"\f522"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-divide:before{content:"\f529"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-excel:before{content:"\f1c3"}.fa-file-image:before{content:"\f1c5"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fire:before{content:"\f06d"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-fulcrum:before{content:"\f50b"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-gift:before{content:"\f06b"}.fa-git:before{content:"\f1d3"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-martini:before{content:"\f000"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hashtag:before{content:"\f292"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-heart:before{content:"\f004"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-houzz:before{content:"\f27c"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-internet-explorer:before{content:"\f26b"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-joget:before{content:"\f3b7"}.fa-joomla:before{content:"\f1aa"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-meh:before{content:"\f11a"}.fa-memory:before{content:"\f538"}.fa-mercury:before{content:"\f223"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-moon:before{content:"\f186"}.fa-motorcycle:before{content:"\f21c"}.fa-mouse-pointer:before{content:"\f245"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nintendo-switch:before{content:"\f418"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-old-republic:before{content:"\f510"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-paint-brush:before{content:"\f1fc"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-people-carry:before{content:"\f4ce"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-volume:before{content:"\f2a0"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-plane:before{content:"\f072"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poo:before{content:"\f2fe"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-r-project:before{content:"\f4f7"}.fa-random:before{content:"\f074"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-rendact:before{content:"\f3e4"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-retweet:before{content:"\f079"}.fa-ribbon:before{content:"\f4d6"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-rupee-sign:before{content:"\f156"}.fa-safari:before{content:"\f267"}.fa-sass:before{content:"\f41e"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-search:before{content:"\f002"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shower:before{content:"\f2cc"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skull:before{content:"\f54c"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowflake:before{content:"\f2dc"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-spinner:before{content:"\f110"}.fa-spotify:before{content:"\f1bc"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-star:before{content:"\f005"}.fa-star-half:before{content:"\f089"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toolbox:before{content:"\f552"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-train:before{content:"\f238"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-moving:before{content:"\f4df"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-glass:before{content:"\f4e3"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:Font Awesome\ 5 Brands;font-style:normal;font-weight:400;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:Font Awesome\ 5 Brands}@font-face{font-family:Font Awesome\ 5 Free;font-style:normal;font-weight:400;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-weight:400}@font-face{font-family:Font Awesome\ 5 Free;font-style:normal;font-weight:900;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.far,.fas{font-family:Font Awesome\ 5 Free}.fa,.fas{font-weight:900} /*! Editor.md v1.5.0 | editormd.min.css | Open source online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-06-09 */ -@charset "UTF-8";/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */.fa-ul,.markdown-body .task-list-item,li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}.editormd-form br,.markdown-body hr:after{clear:both}.editormd{width:90%;height:640px;margin:0 auto 15px;text-align:left;overflow:hidden;position:relative;border:1px solid #ddd;font-family:"微软雅黑", "Meiryo UI","Microsoft YaHei","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif}.editormd *,.editormd :after,.editormd :before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.editormd a{text-decoration:none}.editormd img{border:none;vertical-align:middle}.editormd .editormd-html-textarea,.editormd .editormd-markdown-textarea,.editormd>textarea{width:0;height:0;outline:0;resize:none}.editormd .editormd-html-textarea,.editormd .editormd-markdown-textarea{display:none}.editormd button,.editormd input[type=text],.editormd input[type=button],.editormd input[type=submit],.editormd select,.editormd textarea{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none}.editormd ::-webkit-scrollbar{height:10px;width:7px;background:rgba(0,0,0,.1)}.editormd ::-webkit-scrollbar:hover{background:rgba(0,0,0,.2)}.editormd ::-webkit-scrollbar-thumb{background:rgba(0,0,0,.3);-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;border-radius:6px}.editormd ::-webkit-scrollbar-thumb:hover{-webkit-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-moz-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-ms-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-o-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);background-color:rgba(0,0,0,.4)}.editormd-user-unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.editormd-toolbar{width:100%;min-height:37px;background:#fff;display:none;position:absolute;top:0;left:0;z-index:10;border-bottom:1px solid #ddd}.editormd-toolbar-container{padding:0 8px;min-height:35px;-o-user-select:none;user-select:none}.editormd-toolbar-container,.markdown-body .octicon{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.editormd-menu,.markdown-body ol,.markdown-body td,.markdown-body th,.markdown-body ul{padding:0}.editormd-menu{margin:0;list-style:none}.editormd-menu>li{margin:0;padding:5px 1px;display:inline-block;position:relative}.editormd-menu>li.divider{display:inline-block;text-indent:-9999px;margin:0 5px;height:65%;border-right:1px solid #ddd}.editormd-menu>li>a{outline:0;color:#666;display:inline-block;min-width:24px;font-size:16px;text-decoration:none;text-align:center;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;border:1px solid #fff;transition:all 300ms ease-out}.editormd-dropdown-menu>li>a:hover,.editormd-menu>li>a{-webkit-transition:all 300ms ease-out;-moz-transition:all 300ms ease-out}.editormd-menu>li>a.active,.editormd-menu>li>a:hover{border:1px solid #ddd;background:#eee}.editormd-menu>li>a>.fa{text-align:center;display:block;padding:5px}.editormd-menu>li>a>.editormd-bold{padding:5px 2px;display:inline-block;font-weight:700}.editormd-menu>li:hover .editormd-dropdown-menu{display:block}.editormd-menu>li+li>a{margin-left:3px}.editormd-dropdown-menu{display:none;background:#fff;border:1px solid #ddd;width:148px;list-style:none;position:absolute;top:33px;left:0;z-index:100;-webkit-box-shadow:1px 2px 6px rgba(0,0,0,.15);-moz-box-shadow:1px 2px 6px rgba(0,0,0,.15);-ms-box-shadow:1px 2px 6px rgba(0,0,0,.15);-o-box-shadow:1px 2px 6px rgba(0,0,0,.15);box-shadow:1px 2px 6px rgba(0,0,0,.15)}.editormd-dropdown-menu:after,.editormd-dropdown-menu:before{width:0;height:0;display:block;content:"";position:absolute;top:-11px;left:8px;border:5px solid transparent}.editormd-dropdown-menu:before{border-bottom-color:#ccc}.editormd-dropdown-menu:after{border-bottom-color:#fff;top:-10px}.editormd-dropdown-menu>li>a{color:#666;display:block;text-decoration:none;padding:8px 10px}.editormd-dropdown-menu>li>a:hover{background:#f6f6f6;transition:all 300ms ease-out}.editormd-dropdown-menu>li+li{border-top:1px solid #ddd}.editormd-container{margin:0;width:100%;height:100%;overflow:hidden;padding:35px 0 0;position:relative;background:#fff;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.editormd-dialog{color:#666;position:fixed;z-index:99999;display:none;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 10px rgba(0,0,0,.3);-moz-box-shadow:0 0 10px rgba(0,0,0,.3);-ms-box-shadow:0 0 10px rgba(0,0,0,.3);-o-box-shadow:0 0 10px rgba(0,0,0,.3);box-shadow:0 0 10px rgba(0,0,0,.3);background:#fff;font-size:14px}.editormd-dialog-container{position:relative;padding:20px;line-height:1.4}.editormd-dialog-container h1{font-size:24px;margin-bottom:10px}.editormd-dialog-container h1 .fa{color:#2C7EEA;padding-right:5px}.editormd-dialog-container h1 small{padding-left:5px;font-weight:400;font-size:12px;color:#999}.editormd-dialog-container select{color:#999;padding:3px 8px;border:1px solid #ddd}.editormd-dialog-close{position:absolute;top:12px;right:15px;font-size:18px;color:#ccc;-webkit-transition:color 300ms ease-out;-moz-transition:color 300ms ease-out;transition:color 300ms ease-out}.editormd-dialog-close:hover{color:#999}.editormd-dialog-header{padding:11px 20px;border-bottom:1px solid #eee;-webkit-transition:background 300ms ease-out;-moz-transition:background 300ms ease-out;transition:background 300ms ease-out}.editormd-dialog-header:hover{background:#f6f6f6}.editormd-dialog-title{font-size:14px}.editormd-dialog-footer{padding:10px 0 0;text-align:right}.editormd-dialog-info{width:420px}.editormd-dialog-info h1{font-weight:400}.editormd-dialog-info .editormd-dialog-container{padding:20px 25px 25px}.editormd-dialog-info .editormd-dialog-close{top:10px;right:10px}.editormd-dialog-info .hover-link:hover,.editormd-dialog-info p>a{color:#2196F3}.editormd-dialog-info .hover-link{color:#666}.editormd-dialog-info a .fa-external-link{display:none}.editormd-dialog-info a:hover{color:#2196F3}.editormd-dialog-info a:hover .fa-external-link{display:inline-block}.editormd-container-mask,.editormd-dialog-mask,.editormd-mask{display:none;width:100%;height:100%;position:absolute;top:0;left:0}.editormd-dialog-mask-bg,.editormd-mask{background:#fff;opacity:.5;filter:alpha(opacity=50)}.editormd-mask{position:fixed;background:#000;opacity:.2;filter:alpha(opacity=20);z-index:99998}.editormd-container-mask,.editormd-dialog-mask-con{background:url(../images/loading.gif)center center no-repeat;-webkit-background-size:32px 32px;-moz-background-size:32px 32px;-o-background-size:32px 32px;background-size:32px 32px}.editormd-container-mask{z-index:20;display:block;background-color:#fff}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2){.editormd-container-mask,.editormd-dialog-mask-con{background-image:url(../images/loading@2x.gif)}}@media only screen and (-webkit-min-device-pixel-ratio:3),only screen and (min-device-pixel-ratio:3){.editormd-container-mask,.editormd-dialog-mask-con{background-image:url(../images/loading@3x.gif)}}.editormd-code-block-dialog textarea,.editormd-preformatted-text-dialog textarea{width:100%;height:400px;margin-bottom:6px;overflow:auto;border:1px solid #eee;background:#fff;padding:15px;resize:none}.editormd-code-toolbar{color:#999;font-size:14px;margin:-5px 0 10px}.editormd-grid-table{width:99%;display:table;border:1px solid #ddd;border-collapse:collapse}.editormd-grid-table-row{width:100%;display:table-row}.editormd-grid-table-row a{font-size:1.4em;width:5%;height:36px;color:#999;text-align:center;display:table-cell;vertical-align:middle;border:1px solid #ddd;text-decoration:none;-webkit-transition:background-color 300ms ease-out,color 100ms ease-in;-moz-transition:background-color 300ms ease-out,color 100ms ease-in;transition:background-color 300ms ease-out,color 100ms ease-in}.editormd-grid-table-row a.selected{color:#666;background-color:#eee}.editormd-grid-table-row a:hover{color:#777;background-color:#f6f6f6}.editormd-tab-head{list-style:none;border-bottom:1px solid #ddd}.editormd-tab-head li{display:inline-block}.editormd-tab-head li a{color:#999;display:block;padding:6px 12px 5px;text-align:center;text-decoration:none;margin-bottom:-1px;border:1px solid #ddd;-webkit-border-top-left-radius:3px;-moz-border-top-left-radius:3px;-ms-border-top-left-radius:3px;-o-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-moz-border-top-right-radius:3px;-ms-border-top-right-radius:3px;-o-border-top-right-radius:3px;border-top-right-radius:3px;background:#f6f6f6;-webkit-transition:all 300ms ease-out;-moz-transition:all 300ms ease-out;transition:all 300ms ease-out}.editormd-tab-head li a:hover{color:#666;background:#eee}.editormd-tab-head li.active a{color:#666;background:#fff;border-bottom-color:#fff}.editormd-tab-head li+li{margin-left:3px}.editormd-tab-box{padding:20px 0}.editormd-form{color:#666}.editormd-form label{float:left;display:block;width:75px;text-align:left;padding:7px 0 15px 5px;margin:0 0 2px;font-weight:400}.editormd-form iframe{display:none}.editormd-form input:focus{outline:0}.editormd-form input[type=text],.editormd-form input[type=number]{color:#999;padding:4px;border:1px solid #ddd}.editormd-form input[type=number]{width:40px;display:inline-block;padding:6px 8px}.editormd-form input[type=text]{display:inline-block;width:264px}.editormd-form .fa-btns{display:inline-block}.editormd-form .fa-btns a{color:#999;padding:7px 10px 0 0;display:inline-block;text-decoration:none;text-align:center}.editormd-form .fa-btns .fa{font-size:1.3em}.editormd-form .fa-btns label{float:none;display:inline-block;width:auto;text-align:left;padding:0 0 0 5px;cursor:pointer}.fa-fw,.fa-li{text-align:center}.editormd-dialog-container .editormd-btn,.editormd-dialog-container button,.editormd-dialog-container input[type=submit],.editormd-dialog-footer .editormd-btn,.editormd-dialog-footer button,.editormd-dialog-footer input[type=submit],.editormd-form .editormd-btn,.editormd-form button,.editormd-form input[type=submit]{color:#666;min-width:75px;cursor:pointer;background:#fff;padding:3px 10px;border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-transition:background 300ms ease-out;-moz-transition:background 300ms ease-out;transition:background 300ms ease-out}.editormd-dialog-container .editormd-btn:hover,.editormd-dialog-container button:hover,.editormd-dialog-container input[type=submit]:hover,.editormd-dialog-footer .editormd-btn:hover,.editormd-dialog-footer button:hover,.editormd-dialog-footer input[type=submit]:hover,.editormd-form .editormd-btn:hover,.editormd-form button:hover,.editormd-form input[type=submit]:hover{background:#eee}.editormd-dialog-container .editormd-btn+.editormd-btn,.editormd-dialog-footer .editormd-btn+.editormd-btn,.editormd-form .editormd-btn+.editormd-btn{margin-left:8px}.editormd-file-input{width:75px;height:32px;margin-left:8px;position:relative;display:inline-block}.editormd-file-input input[type=file]{width:75px;height:32px;opacity:0;cursor:pointer;background:#000;display:inline-block;position:absolute;top:0;right:0}.editormd-file-input input[type=file]::-webkit-file-upload-button{visibility:hidden}.editormd-file-input:hover input[type=submit]{background:#eee}.editormd .CodeMirror,.editormd-preview{display:inline-block;width:50%;height:100%;vertical-align:top;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0}.editormd-preview{position:absolute;top:35px;right:0;overflow:auto;line-height:1.6;display:none;background:#fff}.fa,.fa-stack{display:inline-block}.editormd .CodeMirror{z-index:10;float:left;border-right:1px solid #ddd;font-size:14px;font-family:"YaHei Consolas Hybrid",Consolas,"微软雅黑","Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,Monaco,courier,monospace;line-height:1.6;margin-top:35px}.editormd .CodeMirror pre{font-size:14px;padding:0 12px}.editormd .CodeMirror-linenumbers{padding:0 5px}.editormd .CodeMirror-focused .CodeMirror-selected,.editormd .CodeMirror-selected{background:#70B7FF}.editormd .CodeMirror,.editormd .CodeMirror-scroll,.editormd .editormd-preview{-webkit-overflow-scrolling:touch}.editormd .styled-background{background-color:#ff7}.editormd .CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.editormd .CodeMirror-empty.CodeMirror-focused{outline:0}.editormd .CodeMirror pre.CodeMirror-placeholder{color:#999}.editormd .cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.editormd .cm-tab{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=)right no-repeat}/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */ +@charset "UTF-8";/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */.fa-ul,.markdown-body .task-list-item,li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}.editormd-form br,.markdown-body hr:after{clear:both}.editormd{width:90%;height:640px;margin:0 auto 15px;text-align:left;overflow:hidden;position:relative;border:1px solid #ddd;font-family:"微软雅黑", "Meiryo UI","Microsoft YaHei","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif}.editormd *,.editormd :after,.editormd :before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.editormd a{text-decoration:none}.editormd img{border:none;vertical-align:middle}.editormd .editormd-html-textarea,.editormd .editormd-markdown-textarea,.editormd>textarea{width:0;height:0;outline:0;resize:none}.editormd .editormd-html-textarea,.editormd .editormd-markdown-textarea{display:none}.editormd button,.editormd input[type=text],.editormd input[type=button],.editormd input[type=submit],.editormd select,.editormd textarea{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none}.editormd ::-webkit-scrollbar{height:10px;width:7px;background:rgba(0,0,0,.1)}.editormd ::-webkit-scrollbar:hover{background:rgba(0,0,0,.2)}.editormd ::-webkit-scrollbar-thumb{background:rgba(0,0,0,.3);-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;border-radius:6px}.editormd ::-webkit-scrollbar-thumb:hover{-webkit-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-moz-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-ms-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-o-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);background-color:rgba(0,0,0,.4)}.editormd-user-unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.editormd-toolbar{width:100%;min-height:37px;background:#fff;display:none;position:absolute;top:0;left:0;z-index:10;border-bottom:1px solid #ddd}.editormd-toolbar-container{padding:0 8px;min-height:35px;-o-user-select:none;user-select:none}.editormd-toolbar-container,.markdown-body .octicon{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.editormd-menu,.markdown-body ol,.markdown-body td,.markdown-body th,.markdown-body ul{padding:0}.editormd-menu{margin:0;list-style:none}.editormd-menu>li{margin:0;padding:5px 1px;display:inline-block;position:relative}.editormd-menu>li.divider{display:inline-block;text-indent:-9999px;margin:0 5px;height:65%;border-right:1px solid #ddd}.editormd-menu>li>a{outline:0;color:#666;display:inline-block;min-width:24px;font-size:16px;text-decoration:none;text-align:center;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;border:1px solid #fff;transition:all 300ms ease-out}.editormd-dropdown-menu>li>a:hover,.editormd-menu>li>a{-webkit-transition:all 300ms ease-out;-moz-transition:all 300ms ease-out}.editormd-menu>li>a.active,.editormd-menu>li>a:hover{border:1px solid #ddd;background:#eee}.editormd-menu>li>a>.fa{text-align:center;display:block;padding:5px}.editormd-menu>li>a>.editormd-bold{padding:5px 2px;display:inline-block;font-weight:700}.editormd-menu>li:hover .editormd-dropdown-menu{display:block}.editormd-menu>li+li>a{margin-left:3px}.editormd-dropdown-menu{display:none;background:#fff;border:1px solid #ddd;width:148px;list-style:none;position:absolute;top:33px;left:0;z-index:100;-webkit-box-shadow:1px 2px 6px rgba(0,0,0,.15);-moz-box-shadow:1px 2px 6px rgba(0,0,0,.15);-ms-box-shadow:1px 2px 6px rgba(0,0,0,.15);-o-box-shadow:1px 2px 6px rgba(0,0,0,.15);box-shadow:1px 2px 6px rgba(0,0,0,.15)}.editormd-dropdown-menu:after,.editormd-dropdown-menu:before{width:0;height:0;display:block;content:"";position:absolute;top:-11px;left:8px;border:5px solid transparent}.editormd-dropdown-menu:before{border-bottom-color:#ccc}.editormd-dropdown-menu:after{border-bottom-color:#fff;top:-10px}.editormd-dropdown-menu>li>a{color:#666;display:block;text-decoration:none;padding:8px 10px}.editormd-dropdown-menu>li>a:hover{background:#f6f6f6;transition:all 300ms ease-out}.editormd-dropdown-menu>li+li{border-top:1px solid #ddd}.editormd-container{margin:0;width:100%;height:100%;overflow:hidden;padding:35px 0 0;position:relative;background:#fff;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.editormd-dialog{color:#666;position:fixed;z-index:99999;display:none;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 10px rgba(0,0,0,.3);-moz-box-shadow:0 0 10px rgba(0,0,0,.3);-ms-box-shadow:0 0 10px rgba(0,0,0,.3);-o-box-shadow:0 0 10px rgba(0,0,0,.3);box-shadow:0 0 10px rgba(0,0,0,.3);background:#fff;font-size:14px}.editormd-dialog-container{position:relative;padding:20px;line-height:1.4}.editormd-dialog-container h1{font-size:24px;margin-bottom:10px}.editormd-dialog-container h1 .fa{color:#2C7EEA;padding-right:5px}.editormd-dialog-container h1 small{padding-left:5px;font-weight:400;font-size:12px;color:#999}.editormd-dialog-container select{color:#999;padding:3px 8px;border:1px solid #ddd}.editormd-dialog-close{position:absolute;top:12px;right:15px;font-size:18px;color:#ccc;-webkit-transition:color 300ms ease-out;-moz-transition:color 300ms ease-out;transition:color 300ms ease-out}.editormd-dialog-close:hover{color:#999}.editormd-dialog-header{padding:11px 20px;border-bottom:1px solid #eee;-webkit-transition:background 300ms ease-out;-moz-transition:background 300ms ease-out;transition:background 300ms ease-out}.editormd-dialog-header:hover{background:#f6f6f6}.editormd-dialog-title{font-size:14px}.editormd-dialog-footer{padding:10px 0 0;text-align:right}.editormd-dialog-info{width:420px}.editormd-dialog-info h1{font-weight:400}.editormd-dialog-info .editormd-dialog-container{padding:20px 25px 25px}.editormd-dialog-info .editormd-dialog-close{top:10px;right:10px}.editormd-dialog-info .hover-link:hover,.editormd-dialog-info p>a{color:#2196F3}.editormd-dialog-info .hover-link{color:#666}.editormd-dialog-info a .fa-external-link{display:none}.editormd-dialog-info a:hover{color:#2196F3}.editormd-dialog-info a:hover .fa-external-link{display:inline-block}.editormd-container-mask,.editormd-dialog-mask,.editormd-mask{display:none;width:100%;height:100%;position:absolute;top:0;left:0}.editormd-dialog-mask-bg,.editormd-mask{background:#fff;opacity:.5;filter:alpha(opacity=50)}.editormd-mask{position:fixed;background:#000;opacity:.2;filter:alpha(opacity=20);z-index:99998}.editormd-container-mask,.editormd-dialog-mask-con{background:url(../images/loading.gif)center center no-repeat;-webkit-background-size:32px 32px;-moz-background-size:32px 32px;-o-background-size:32px 32px;background-size:32px 32px}.editormd-container-mask{z-index:20;display:block;background-color:#fff}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2){.editormd-container-mask,.editormd-dialog-mask-con{background-image:url(../images/loading@2x.gif)}}@media only screen and (-webkit-min-device-pixel-ratio:3),only screen and (min-device-pixel-ratio:3){.editormd-container-mask,.editormd-dialog-mask-con{background-image:url(../images/loading@3x.gif)}}.editormd-code-block-dialog textarea,.editormd-preformatted-text-dialog textarea{width:100%;height:400px;margin-bottom:6px;overflow:auto;border:1px solid #eee;background:#fff;padding:15px;resize:none}.editormd-code-toolbar{color:#999;font-size:14px;margin:-5px 0 10px}.editormd-grid-table{width:99%;display:table;border:1px solid #ddd;border-collapse:collapse}.editormd-grid-table-row{width:100%;display:table-row}.editormd-grid-table-row a{font-size:1.4em;width:5%;height:36px;color:#999;text-align:center;display:table-cell;vertical-align:middle;border:1px solid #ddd;text-decoration:none;-webkit-transition:background-color 300ms ease-out,color 100ms ease-in;-moz-transition:background-color 300ms ease-out,color 100ms ease-in;transition:background-color 300ms ease-out,color 100ms ease-in}.editormd-grid-table-row a.selected{color:#666;background-color:#eee}.editormd-grid-table-row a:hover{color:#777;background-color:#f6f6f6}.editormd-tab-head{list-style:none;border-bottom:1px solid #ddd}.editormd-tab-head li{display:inline-block}.editormd-tab-head li a{color:#999;display:block;padding:6px 12px 5px;text-align:center;text-decoration:none;margin-bottom:-1px;border:1px solid #ddd;-webkit-border-top-left-radius:3px;-moz-border-top-left-radius:3px;-ms-border-top-left-radius:3px;-o-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-moz-border-top-right-radius:3px;-ms-border-top-right-radius:3px;-o-border-top-right-radius:3px;border-top-right-radius:3px;background:#f6f6f6;-webkit-transition:all 300ms ease-out;-moz-transition:all 300ms ease-out;transition:all 300ms ease-out}.editormd-tab-head li a:hover{color:#666;background:#eee}.editormd-tab-head li.active a{color:#666;background:#fff;border-bottom-color:#fff}.editormd-tab-head li+li{margin-left:3px}.editormd-tab-box{padding:20px 0}.editormd-form{color:#666}.editormd-form label{float:left;display:block;width:75px;text-align:left;padding:7px 0 15px 5px;margin:0 0 2px;font-weight:400}.editormd-form iframe{display:none}.editormd-form input:focus{outline:0}.editormd-form input[type=text],.editormd-form input[type=number]{color:#999;padding:4px;border:1px solid #ddd}.editormd-form input[type=number]{width:40px;display:inline-block;padding:6px 8px}.editormd-form input[type=text]{display:inline-block;width:264px}.editormd-form .fa-btns{display:inline-block}.editormd-form .fa-btns a{color:#999;padding:7px 10px 0 0;display:inline-block;text-decoration:none;text-align:center}.editormd-form .fa-btns .fa{font-size:1.3em}.editormd-form .fa-btns label{float:none;display:inline-block;width:auto;text-align:left;padding:0 0 0 5px;cursor:pointer}.fa-fw,.fa-li{text-align:center}.editormd-dialog-container .editormd-btn,.editormd-dialog-container button,.editormd-dialog-container input[type=submit],.editormd-dialog-footer .editormd-btn,.editormd-dialog-footer button,.editormd-dialog-footer input[type=submit],.editormd-form .editormd-btn,.editormd-form button,.editormd-form input[type=submit]{color:#666;min-width:75px;cursor:pointer;background:#fff;padding:3px 10px;border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-transition:background 300ms ease-out;-moz-transition:background 300ms ease-out;transition:background 300ms ease-out}.editormd-dialog-container .editormd-btn:hover,.editormd-dialog-container button:hover,.editormd-dialog-container input[type=submit]:hover,.editormd-dialog-footer .editormd-btn:hover,.editormd-dialog-footer button:hover,.editormd-dialog-footer input[type=submit]:hover,.editormd-form .editormd-btn:hover,.editormd-form button:hover,.editormd-form input[type=submit]:hover{background:#eee}.editormd-dialog-container .editormd-btn+.editormd-btn,.editormd-dialog-footer .editormd-btn+.editormd-btn,.editormd-form .editormd-btn+.editormd-btn{margin-left:8px}.editormd-file-input{width:75px;height:32px;margin-left:8px;position:relative;display:inline-block}.editormd-file-input input[type=file]{width:75px;height:32px;opacity:0;cursor:pointer;background:#000;display:inline-block;position:absolute;top:0;right:0}.editormd-file-input input[type=file]::-webkit-file-upload-button{visibility:hidden}.editormd-file-input:hover input[type=submit]{background:#eee}.editormd .CodeMirror,.editormd-preview{display:inline-block;width:50%;height:100%;vertical-align:top;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0}.editormd-preview{position:absolute;top:35px;right:0;overflow:auto;line-height:1.6;display:none;background:#fff}.fa,.fa-stack{display:inline-block}.editormd .CodeMirror{z-index:10;float:left;border-right:1px solid #ddd;font-size:14px;font-family:"YaHei Consolas Hybrid",Consolas,"微软雅黑","Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,Monaco,courier,monospace;line-height:1.6;margin-top:35px}.editormd .CodeMirror pre{font-size:14px!important;padding:0 12px}.editormd .CodeMirror-linenumbers{padding:0 5px}.editormd .CodeMirror-focused .CodeMirror-selected,.editormd .CodeMirror-selected{background:#70B7FF}.editormd .CodeMirror,.editormd .CodeMirror-scroll,.editormd .editormd-preview{-webkit-overflow-scrolling:touch}.editormd .styled-background{background-color:#ff7}.editormd .CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.editormd .CodeMirror-empty.CodeMirror-focused{outline:0}.editormd .CodeMirror pre.CodeMirror-placeholder{color:#999}.editormd .cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.editormd .cm-tab{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=)right no-repeat}/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */ /* 重置掉些样式 */ .tpi_content p, .tpi_content dl, .tpi_content ol, .tpi_content ul, From 98473ed7e04da1da73e0240b39f418ac2690a910 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 19 Sep 2019 09:24:51 +0800 Subject: [PATCH 19/55] =?UTF-8?q?=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95APM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 3 +++ Gemfile.lock | 2 ++ config/newrelic.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 config/newrelic.yml diff --git a/Gemfile b/Gemfile index 28df2328c..8c2425e40 100644 --- a/Gemfile +++ b/Gemfile @@ -96,3 +96,6 @@ gem 'searchkick' gem 'aasm' gem 'enumerize' + +# 性能监控 +gem 'newrelic_rpm' diff --git a/Gemfile.lock b/Gemfile.lock index 6a4a7e08f..9ea3504c9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -169,6 +169,7 @@ GEM multipart-post (2.0.0) mustermann (1.0.3) mysql2 (0.5.2) + newrelic_rpm (6.6.0.358) nio4r (2.3.1) nokogiri (1.8.4) mini_portile2 (~> 2.3.0) @@ -378,6 +379,7 @@ DEPENDENCIES kaminari (~> 1.1, >= 1.1.1) listen (>= 3.0.5, < 3.2) mysql2 (>= 0.4.4, < 0.6.0) + newrelic_rpm oauth2 pdfkit puma (~> 3.11) diff --git a/config/newrelic.yml b/config/newrelic.yml new file mode 100644 index 000000000..175de6f73 --- /dev/null +++ b/config/newrelic.yml @@ -0,0 +1,45 @@ +# +# This file configures the New Relic Agent. New Relic monitors Ruby, Java, +# .NET, PHP, Python, Node, and Go applications with deep visibility and low +# overhead. For more information, visit www.newrelic.com. +# +# Generated September 19, 2019 +# +# This configuration file is custom generated for educoder_1 +# +# For full documentation of agent configuration options, please refer to +# https://docs.newrelic.com/docs/agents/ruby-agent/installation-configuration/ruby-agent-configuration + +common: &default_settings + # Required license key associated with your New Relic account. + license_key: e546e66be1c6d1bab2bbdd97e7bd8ef239b7e9cf + + # Your application name. Renaming here affects where data displays in New + # Relic. For more details, see https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/renaming-applications + app_name: Educoder_test + + # To disable the agent regardless of other settings, uncomment the following: + # agent_enabled: false + + # Logging level for log/newrelic_agent.log + log_level: error + + +# Environment-specific settings are in this section. +# RAILS_ENV or RACK_ENV (as appropriate) is used to determine the environment. +# If your application has other named environments, configure them here. +development: + <<: *default_settings + app_name: Educoder_test + +test: + <<: *default_settings + # It doesn't make sense to report to New Relic from automated test runs. + monitor_mode: false + +staging: + <<: *default_settings + app_name: Educoder_test + +production: + <<: *default_settings From a7c41acc052d47b752921f5099f204932262f8fa Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 19 Sep 2019 09:30:09 +0800 Subject: [PATCH 20/55] configShareForCustom --- public/react/src/common/util/ShareUtil.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/common/util/ShareUtil.js b/public/react/src/common/util/ShareUtil.js index c11ed6381..bd34e2edb 100644 --- a/public/react/src/common/util/ShareUtil.js +++ b/public/react/src/common/util/ShareUtil.js @@ -122,11 +122,11 @@ export function configShareForCourses () { export function configShareForCustom (title, desc, imgUrl, path) { requestForSignatrue(() => { console.log('configShareForCustom', host) - const _path = window.location.href.split('#')[0]; + const _url = window.location.href.split('#')[0]; var shareData = { title: title, desc: desc, - link: `${host}/${path || _path}`, + link: path ? `${host}/${path}` : _url, imgUrl: imgUrl || window.__testImageUrl || host + '/react/build/images/share_logo_icon.jpg' }; From 1ba633947cd24cef92975b350150365a883c0d01 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 19 Sep 2019 09:43:49 +0800 Subject: [PATCH 21/55] =?UTF-8?q?=E6=92=91=E5=BC=80=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E6=9D=A1=EF=BC=8C=E9=98=B2=E6=8A=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/usersInfo/video/InfosVideo.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/react/src/modules/user/usersInfo/video/InfosVideo.css b/public/react/src/modules/user/usersInfo/video/InfosVideo.css index 4722fde63..39e0ff123 100644 --- a/public/react/src/modules/user/usersInfo/video/InfosVideo.css +++ b/public/react/src/modules/user/usersInfo/video/InfosVideo.css @@ -1,3 +1,7 @@ +/* 撑开滚动条,防抖 */ +.educontent > .itemWrap { + min-height: 400px; +} .itemWrap { display: flex; flex-wrap: wrap; From 08caf76007402c63624c66d1b60c7a2365e57e1e Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 19 Sep 2019 09:48:55 +0800 Subject: [PATCH 22/55] =?UTF-8?q?=E9=98=B2=E6=8A=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/usersInfo/usersInfo.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/react/src/modules/user/usersInfo/usersInfo.css b/public/react/src/modules/user/usersInfo/usersInfo.css index a0cd3ba21..69b4bcd00 100644 --- a/public/react/src/modules/user/usersInfo/usersInfo.css +++ b/public/react/src/modules/user/usersInfo/usersInfo.css @@ -429,4 +429,8 @@ .topsicinline{ display: inline-block; +} +/* 防抖 */ +.educontent .square-list { + min-height: 400px; } \ No newline at end of file From eaf1dfdde34adc57f20e74f04379a8185af60ab1 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 19 Sep 2019 09:56:14 +0800 Subject: [PATCH 23/55] =?UTF-8?q?=E6=80=A7=E8=83=BD=E5=88=86=E6=9E=90apm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 3 --- Gemfile.lock | 1 - config/newrelic.yml | 45 --------------------------------------------- 3 files changed, 49 deletions(-) delete mode 100644 config/newrelic.yml diff --git a/Gemfile b/Gemfile index 8c2425e40..28df2328c 100644 --- a/Gemfile +++ b/Gemfile @@ -96,6 +96,3 @@ gem 'searchkick' gem 'aasm' gem 'enumerize' - -# 性能监控 -gem 'newrelic_rpm' diff --git a/Gemfile.lock b/Gemfile.lock index 9ea3504c9..8aa2daa6a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -169,7 +169,6 @@ GEM multipart-post (2.0.0) mustermann (1.0.3) mysql2 (0.5.2) - newrelic_rpm (6.6.0.358) nio4r (2.3.1) nokogiri (1.8.4) mini_portile2 (~> 2.3.0) diff --git a/config/newrelic.yml b/config/newrelic.yml deleted file mode 100644 index 175de6f73..000000000 --- a/config/newrelic.yml +++ /dev/null @@ -1,45 +0,0 @@ -# -# This file configures the New Relic Agent. New Relic monitors Ruby, Java, -# .NET, PHP, Python, Node, and Go applications with deep visibility and low -# overhead. For more information, visit www.newrelic.com. -# -# Generated September 19, 2019 -# -# This configuration file is custom generated for educoder_1 -# -# For full documentation of agent configuration options, please refer to -# https://docs.newrelic.com/docs/agents/ruby-agent/installation-configuration/ruby-agent-configuration - -common: &default_settings - # Required license key associated with your New Relic account. - license_key: e546e66be1c6d1bab2bbdd97e7bd8ef239b7e9cf - - # Your application name. Renaming here affects where data displays in New - # Relic. For more details, see https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/renaming-applications - app_name: Educoder_test - - # To disable the agent regardless of other settings, uncomment the following: - # agent_enabled: false - - # Logging level for log/newrelic_agent.log - log_level: error - - -# Environment-specific settings are in this section. -# RAILS_ENV or RACK_ENV (as appropriate) is used to determine the environment. -# If your application has other named environments, configure them here. -development: - <<: *default_settings - app_name: Educoder_test - -test: - <<: *default_settings - # It doesn't make sense to report to New Relic from automated test runs. - monitor_mode: false - -staging: - <<: *default_settings - app_name: Educoder_test - -production: - <<: *default_settings From 8fcf60db5248b9091d4f70f3eb0edffb3a3382e7 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 19 Sep 2019 10:04:24 +0800 Subject: [PATCH 24/55] configShareForCustom --- public/react/src/modules/paths/PathDetail/PathDetailIndex.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js index c8cece9fd..16c7d43c3 100644 --- a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js +++ b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import {getImageUrl,markdownToHTML} from 'educoder'; +import {getImageUrl,markdownToHTML, configShareForCustom} from 'educoder'; import DetailTop from './DetailTop.js'; import DetailCards from './DetailCards.js' import AddCollaborators from "./addCollaborators.js"; @@ -164,6 +164,7 @@ class PathDetailIndex extends Component{ // window.location.href = "/403"; return; } + configShareForCustom(result.data.name, result.data.description) if(result.data.allow_visit===true){ this.setState({ From f0391bb23cb422a0f257e7036a25ffce2abf9aa5 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 19 Sep 2019 10:31:03 +0800 Subject: [PATCH 25/55] this._scrollToTop() --- public/react/src/modules/courses/busyWork/NewWorkForm.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/NewWorkForm.js b/public/react/src/modules/courses/busyWork/NewWorkForm.js index f5d4d9eb4..27413ba04 100644 --- a/public/react/src/modules/courses/busyWork/NewWorkForm.js +++ b/public/react/src/modules/courses/busyWork/NewWorkForm.js @@ -73,7 +73,6 @@ class NewWorkForm extends Component{ setTimeout(() => { this.contentMdRef.current.setValue(data.description || '') this.answerMdRef.current.setValue(data.reference_answer || '') - }, 2000) this.props.form.setFieldsValue({ @@ -86,8 +85,13 @@ class NewWorkForm extends Component{ } else { // new } + this._scrollToTop() + } + _scrollToTop = () => { + setTimeout(() => { + $("html").animate({ scrollTop: 0 }) + }, 1500) } - // 输入title changeTitle=(e)=>{ @@ -289,6 +293,7 @@ class NewWorkForm extends Component{ } componentDidMount() { window.$('.groupSetting .ant-form-item-label > label').addClass('ant-form-item-required') + this._scrollToTop() } render(){ From 9cc8fd35399b33eade040fd85a4fb5676a7015fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 19 Sep 2019 10:31:54 +0800 Subject: [PATCH 26/55] =?UTF-8?q?=E5=AE=9E=E8=B7=B5=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E7=BB=93=E6=9E=9C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../paths/SchoolStatistics/FirstTab.js | 413 ++++++------- .../paths/SchoolStatistics/SecondTab.js | 550 +++++++++--------- .../src/modules/user/usersInfo/InfosTopics.js | 22 +- 3 files changed, 502 insertions(+), 483 deletions(-) diff --git a/public/react/src/modules/paths/SchoolStatistics/FirstTab.js b/public/react/src/modules/paths/SchoolStatistics/FirstTab.js index 2dc7afda8..8783c522c 100644 --- a/public/react/src/modules/paths/SchoolStatistics/FirstTab.js +++ b/public/react/src/modules/paths/SchoolStatistics/FirstTab.js @@ -1,203 +1,212 @@ -import React,{ Component } from "react"; -import {Pagination} from 'antd'; -import axios from 'axios'; - - -const $ = window.$; -const echarts = require('echarts'); -function InitChapterUsageSituation(_data){ - var Color = ['#49A9EE', '#FFD86E', '#98D87D', '#8996E6','#F3857B', '#B97BF3','#4DE8B4','#f76d0c','#510cf7','#def70c','#3bf70c','#0cf7e1']; - - var option = { - title: { - show:false - }, - tooltip : { - trigger: 'item', - formatter: "{d}%" - }, - legend: { - //orient: 'vertical', - // top: 'middle', - bottom: 30, - //left: 20, - data:["第1章", "第2章", "第3章", "第4章", "第5章"], - selectedMode:false - }, - series : [{ - name: '使用情况', - type: 'pie', - radius : '50%', - center: ['50%', '40%'], - selectedMode: 'single', - label: { - normal: { - // {abg|} - // {a|{a}}\n - formatter: ' {b|{b}} ', - backgroundColor: '#eee', - borderColor: '#aaa', - borderWidth: 1, - borderRadius: 4, - rich: { - a: { - color: '#999', - lineHeight: 22, - align: 'center' - }, - hr: { - borderColor: '#aaa', - width: '100%', - borderWidth: 0.5, - height: 0 - }, - b: { - fontSize: 16, - lineHeight: 33 - }, - per: { - color: '#eee', - backgroundColor: '#334455', - padding: [2, 4], - borderRadius: 2 - } - - } - }, - - }, - data: _data, - // [{"value":19,"name":"\u7b2c1\u7ae0"},{"value":45,"name":"\u7b2c2\u7ae0"},{"value":16,"name":"\u7b2c3\u7ae0"},{"value":10,"name":"\u7b2c4\u7ae0"},{"value":10,"name":"\u7b2c5\u7ae0"}], - itemStyle: { - emphasis: { - shadowBlur: 10, - shadowOffsetX: 0, - shadowColor: 'rgba(0, 0, 0, 0.5)' - }, - normal:{ - show: true, - color: function(params) { - return Color[params.dataIndex] - } - } - } - }] - }; - - var myChart = echarts.init(document.getElementById('chapterUsageSituation')); - myChart.setOption(option); -} -class FirstTab extends Component{ - constructor(props){ - super(props); - this.state = { - page:1, - total:undefined - } - } - - onChange=(pageNumber)=>{ - this.setState({ - page:pageNumber - }) - this.getData(pageNumber); - } - - getData=(page)=>{ - var pathId = this.props.match.params.pathId; - - const url = `/paths/${pathId}/statistics.json?page=`+page; - axios.get(url, { - }) - .then((response) => { - // TODO 没用,404返回的error - if (response.data.status == 404) { - this.props.showSnackbar('未找到对应数据,请查看地址是否正确。') - return - } - this.setState({ ...response.data }) - const _data = response.data.stage_info.map( (item, index) => { - return { - value: item.value, - name: item.stage_no - } - }) - InitChapterUsageSituation(_data); - - const { course_count, learn_count, school_total_count, subject_name, subject_id } = response.data - this.props.initBannerData({ - course_count, - learn_count, - school_total_count, - subject_name, - subject_id - }) - this.setState({ - total:response.data.school_total_count - }) - }) - .catch(function (error) { - console.log(error); - }); - } - - componentDidMount(){ - let {page}=this.state; - this.getData(page); - } - - render(){ - const { schools, stage_info,page,total } = this.state; - return( -
    -
    -
    -

    课堂使用概况共{total}条记录

    -
    - - - - - - - - - {/* - course_count: 30 - homework_count: 117 - name: "国防科技大学" - student_count: 2700 - */} - - { - schools && schools.map( (school, index) => { - return ( - - - - - - - ) - }) - } - -
    序号所属院校课堂学生选用实训
    { index + 1 }{school.name}{school.course_count}{school.student_count}{school.homework_count}
    -
    -
    - { - total > 10 && - - } -
    -
    -
    -
    -

    章节使用情况

    -
    -
    -
    - ) - } -} +import React,{ Component } from "react"; +import {Pagination} from 'antd'; +import axios from 'axios'; + + +const $ = window.$; +const echarts = require('echarts'); +function InitChapterUsageSituation(_data){ + var myChart = echarts.init(document.getElementById('chapterUsageSituation')); + myChart.showLoading({ + text: "数据获取中", + effect: 'whirling' + }) + var Color = ['#49A9EE', '#FFD86E', '#98D87D', '#8996E6','#F3857B', '#B97BF3','#4DE8B4','#f76d0c','#510cf7','#def70c','#3bf70c','#0cf7e1']; + + var option = { + title: { + show:false + }, + tooltip : { + trigger: 'item', + formatter: "{d}%" + }, + legend: { + //orient: 'vertical', + // top: 'middle', + bottom: 30, + //left: 20, + data:["第1章", "第2章", "第3章", "第4章", "第5章"], + selectedMode:false + }, + series : [{ + name: '使用情况', + type: 'pie', + radius : '50%', + center: ['50%', '40%'], + selectedMode: 'single', + label: { + normal: { + // {abg|} + // {a|{a}}\n + formatter: ' {b|{b}} ', + backgroundColor: '#eee', + borderColor: '#aaa', + borderWidth: 1, + borderRadius: 4, + rich: { + a: { + color: '#999', + lineHeight: 22, + align: 'center' + }, + hr: { + borderColor: '#aaa', + width: '100%', + borderWidth: 0.5, + height: 0 + }, + b: { + fontSize: 16, + lineHeight: 33 + }, + per: { + color: '#eee', + backgroundColor: '#334455', + padding: [2, 4], + borderRadius: 2 + } + + } + }, + + }, + data: _data, + // [{"value":19,"name":"\u7b2c1\u7ae0"},{"value":45,"name":"\u7b2c2\u7ae0"},{"value":16,"name":"\u7b2c3\u7ae0"},{"value":10,"name":"\u7b2c4\u7ae0"},{"value":10,"name":"\u7b2c5\u7ae0"}], + itemStyle: { + emphasis: { + shadowBlur: 10, + shadowOffsetX: 0, + shadowColor: 'rgba(0, 0, 0, 0.5)' + }, + normal:{ + show: true, + color: function(params) { + return Color[params.dataIndex] + } + } + } + }] + }; + + + + setTimeout(() => { + myChart.setOption(option); + myChart.hideLoading(); + }, 1000) +} +class FirstTab extends Component{ + constructor(props){ + super(props); + this.state = { + page:1, + total:undefined + } + } + + onChange=(pageNumber)=>{ + this.setState({ + page:pageNumber + }) + this.getData(pageNumber); + } + + getData=(page)=>{ + var pathId = this.props.match.params.pathId; + + const url = `/paths/${pathId}/statistics.json?page=`+page; + axios.get(url, { + }) + .then((response) => { + // TODO 没用,404返回的error + if (response.data.status == 404) { + this.props.showSnackbar('未找到对应数据,请查看地址是否正确。') + return + } + this.setState({ ...response.data }) + const _data = response.data.stage_info.map( (item, index) => { + return { + value: item.value, + name: item.stage_no + } + }) + InitChapterUsageSituation(_data); + + const { course_count, learn_count, school_total_count, subject_name, subject_id } = response.data + this.props.initBannerData({ + course_count, + learn_count, + school_total_count, + subject_name, + subject_id + }) + this.setState({ + total:response.data.school_total_count + }) + }) + .catch(function (error) { + console.log(error); + }); + } + + componentDidMount(){ + let {page}=this.state; + this.getData(page); + } + + render(){ + const { schools, stage_info,page,total } = this.state; + return( +
    +
    +
    +

    课堂使用概况共{total}条记录

    +
    + + + + + + + + + {/* + course_count: 30 + homework_count: 117 + name: "国防科技大学" + student_count: 2700 + */} + + { + schools && schools.map( (school, index) => { + return ( + + + + + + + ) + }) + } + +
    序号所属院校课堂学生选用实训
    { index + 1 }{school.name}{school.course_count}{school.student_count}{school.homework_count}
    +
    +
    + { + total > 10 && + + } +
    +
    +
    +
    +

    章节使用情况

    +
    +
    +
    + ) + } +} export default FirstTab; \ No newline at end of file diff --git a/public/react/src/modules/paths/SchoolStatistics/SecondTab.js b/public/react/src/modules/paths/SchoolStatistics/SecondTab.js index c58ac6f9b..5fefef219 100644 --- a/public/react/src/modules/paths/SchoolStatistics/SecondTab.js +++ b/public/react/src/modules/paths/SchoolStatistics/SecondTab.js @@ -1,271 +1,281 @@ -import React,{ Component } from "react"; -import axios from 'axios'; - - -const $ = window.$; -const echarts = require('echarts'); -function InitShixunStudyStatistics(yAxisMonth_a, barData_a, mapByNumber, myChart){ - let yAxisMonth = yAxisMonth_a -// [ -// "1-1", "1-2", "1-3", "1-4", "2-1", "2-2", "2-3", "3-1", -// "1-1", "1-2", "1-3", "1-4", "2-1", "2-2", "2-3", "3-1", -// "1-1", "1-2", "1-3", "1-4", "2-1", "2-2", "2-3", "3-1", "3-2"]; - let barData = barData_a -// [ -// 1164, 739, 784, 720, 726, 556, 381, 432, -// 1164, 739, 784, 720, 726, 556, 381, 432, -// 1164, 739, 784, 720, 726, 556, 381, 432, 239]; - -// let yAxisMonth = yAxisMonth_a; -// let barData = barData_a; - - let barDataTwo = []; - let coordData2 = []; - let coordData = []; - for (let i = 0; i < barData.length; i++) { - barDataTwo.push(Math.max.apply(Math, barData) + 5000); - coordData.push({ - "coord": [Number(barData[i]) - 1, i] - }); - coordData2.push({ - "coord": [Math.max.apply(Math, barData) + 5000, i] - }) - } - var option = { - backgroundColor: "#fff", - title: { - text: '' - }, - legend: null, - tooltip: { - trigger: 'axis', - axisPointer: { - type: 'none' - }, - formatter: function(params) { - return params[0].name + ":" + (mapByNumber[params[0].name] && mapByNumber[params[0].name].shixun_name) + "
    " + '学习人数: ' + params[0].value; - } - }, - grid: { - containLabel: true, - left: "30px", - top: "0", - bottom:"10px" - }, - yAxis: [{ - data: yAxisMonth, - inverse: true, - axisLine: { - show: false - }, - axisTick: { - show: false - }, - axisLabel: { - margin: 10, - textStyle: { - fontSize: 12, - color: '#747A7F' - }, - formatter: function(value) { - return '{Sunny|' + value + '}'; - }, - rich: { - value: { - lineHeight: 20 - }, - Sunny: { - height: 25, - padding: [0, 8, 0, 8], - align: 'center', - backgroundColor: '#fff' - } - } - } - },{ - data: yAxisMonth, - inverse: true, - axisLine: { - show: false - }, - axisTick: { - show: false - }, - axisLabel: { - show: false - } - } - ], - xAxis: [{ - type: "value", - splitLine: { - show: false - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - axisLine: { - show: false - } - }, { - type: "value", - splitLine: { - show: false - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - axisLine: { - show: false - } - }], - series: [{ - z: 10, - xAxisIndex: 0, - yAxisIndex: 0, - name: '', - type: 'pictorialBar', - data: barData, - barCategoryGap: '90%', - label: { - normal: { - show: true, - position: 'inside', - textStyle: { - fontSize: 12, - color: '#666' - } - } - }, - symbolRepeat: false, - symbolSize: ['100%', 25], - symbolOffset: [-16.5, 0], - itemStyle: { - normal: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ - offset: 0, - color: '#FFD86E' - }], false), - borderRadius:'10' - } - }, - symbolClip: true, - symbolPosition: 'end', - symbol: 'rect' - }] - }; - myChart.setOption(option); -} -class SecondTab extends Component{ - constructor(props){ - super(props); - this.state = { - - } - } - - componentDidMount(){ - var pathId = this.props.match.params.pathId; - - var myChart = echarts.init(document.getElementById('shixunStudyStatistics')); - myChart.showLoading({ - text: "数据获取中", - effect: 'whirling' - }) - const url = `/paths/${pathId}/shixun_report.json` - axios.get(url, { - }) - .then((response) => { - // TODO 没用,404返回的error - if (response.data.status == 404) { - this.props.showSnackbar('未找到对应数据,请查看地址是否正确。') - return - } - - /** - let yAxisMonth = ["1-1", "1-2", "1-3", "1-4", "2-1", "2-2", "2-3", "3-1", "3-2"]; - let barData = [1164, 739, 784, 720, 726, 556, 381, 432, 239]; - - { - "number": "6-1", - "shixun_name": "网页抓取及信息提取", - "member_count": 0, - "school_count": 0 - } - */ - let yAxisMonth = [] - let barData = [] - let shixunList = [] - let mapByNumber = {} - const _data = response.data.shixun_lists.forEach( (ar, index) => { - ar.forEach( (item, itemIndex) => { - shixunList.push(item) - yAxisMonth.push(item.number) - barData.push(item.member_count) - mapByNumber[item.number] = item - }) - }) - this.setState({ shixunList }, () => { - InitShixunStudyStatistics(yAxisMonth, barData, mapByNumber, myChart); - myChart.hideLoading() - }) - - - }) - .catch(function (error) { - console.log(error); - }); - } - - render(){ - const { shixunList } = this.state; - return( -
    -
    -
    -

    实训使用详情

    -
    - - - - - - - - - - - - { - shixunList && shixunList.map( (shixun, index) => { - return ( - - - - - - ) - }) - } - - -
    章节实训名称学习人数受用院校
    {shixun.number}{shixun.shixun_name}{shixun.member_count}{shixun.school_count}
    -
    -
    -
    -
    -

    实训学习统计

    -
    -
    -
    - ) - } -} +import React,{ Component } from "react"; +import axios from 'axios'; + + +const $ = window.$; +const echarts = require('echarts'); +function InitShixunStudyStatistics(yAxisMonth_a, barData_a, mapByNumber, myChart){ + let yAxisMonth = yAxisMonth_a +// [ +// "1-1", "1-2", "1-3", "1-4", "2-1", "2-2", "2-3", "3-1", +// "1-1", "1-2", "1-3", "1-4", "2-1", "2-2", "2-3", "3-1", +// "1-1", "1-2", "1-3", "1-4", "2-1", "2-2", "2-3", "3-1", "3-2"]; + let barData = barData_a +// [ +// 1164, 739, 784, 720, 726, 556, 381, 432, +// 1164, 739, 784, 720, 726, 556, 381, 432, +// 1164, 739, 784, 720, 726, 556, 381, 432, 239]; + +// let yAxisMonth = yAxisMonth_a; +// let barData = barData_a; + + let barDataTwo = []; + let coordData2 = []; + let coordData = []; + for (let i = 0; i < barData.length; i++) { + barDataTwo.push(Math.max.apply(Math, barData) + 5000); + coordData.push({ + "coord": [Number(barData[i]) - 1, i] + }); + coordData2.push({ + "coord": [Math.max.apply(Math, barData) + 5000, i] + }) + } + var option = { + backgroundColor: "#fff", + title: { + text: '' + }, + legend: null, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'none' + }, + formatter: function(params) { + return params[0].name + ":" + (mapByNumber[params[0].name] && mapByNumber[params[0].name].shixun_name) + "
    " + '学习人数: ' + params[0].value; + } + }, + grid: { + containLabel: true, + left: "30px", + top: "0", + bottom:"10px" + }, + yAxis: [{ + data: yAxisMonth, + inverse: true, + axisLine: { + show: false + }, + axisTick: { + show: false + }, + axisLabel: { + margin: 10, + textStyle: { + fontSize: 12, + color: '#747A7F' + }, + formatter: function(value) { + return '{Sunny|' + value + '}'; + }, + rich: { + value: { + lineHeight: 20 + }, + Sunny: { + height: 25, + padding: [0, 8, 0, 8], + align: 'center', + backgroundColor: '#fff' + } + } + } + },{ + data: yAxisMonth, + inverse: true, + axisLine: { + show: false + }, + axisTick: { + show: false + }, + axisLabel: { + show: false + } + } + ], + xAxis: [{ + type: "value", + splitLine: { + show: false + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + axisLine: { + show: false + } + }, { + type: "value", + splitLine: { + show: false + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + }, + axisLine: { + show: false + } + }], + series: [{ + z: 10, + xAxisIndex: 0, + yAxisIndex: 0, + name: '', + type: 'pictorialBar', + data: barData, + barCategoryGap: '90%', + label: { + normal: { + show: true, + position: 'inside', + textStyle: { + fontSize: 12, + color: '#666' + } + } + }, + symbolRepeat: false, + symbolSize: ['100%', 25], + symbolOffset: [-16.5, 0], + itemStyle: { + normal: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ + offset: 0, + color: '#FFD86E' + }], false), + borderRadius:'10' + } + }, + symbolClip: true, + symbolPosition: 'end', + symbol: 'rect' + }] + }; + myChart.setOption(option); +} +class SecondTab extends Component{ + constructor(props){ + super(props); + this.state = { + } + } + + componentDidMount(){ + var pathId = this.props.match.params.pathId; + + var myCharts = echarts.init(document.getElementById('showloding')); + myCharts.showLoading({ + text: "数据获取中", + effect: 'whirling' + }) + const url = `/paths/${pathId}/shixun_report.json` + axios.get(url, { + }) + .then((response) => { + // TODO 没用,404返回的error + if (response.data.status == 404) { + this.props.showSnackbar('未找到对应数据,请查看地址是否正确。') + return + } + + /** + let yAxisMonth = ["1-1", "1-2", "1-3", "1-4", "2-1", "2-2", "2-3", "3-1", "3-2"]; + let barData = [1164, 739, 784, 720, 726, 556, 381, 432, 239]; + + { + "number": "6-1", + "shixun_name": "网页抓取及信息提取", + "member_count": 0, + "school_count": 0 + } + */ + let yAxisMonth = [] + let barData = [] + let shixunList = [] + let mapByNumber = {} + const _data = response.data.shixun_lists.forEach( (ar, index) => { + ar.forEach( (item, itemIndex) => { + shixunList.push(item) + yAxisMonth.push(item.number) + barData.push(item.member_count) + mapByNumber[item.number] = item + }) + }) + + this.setState({ + shixunList + }) + var myChart = echarts.init(document.getElementById('shixunStudyStatistics')); + myChart.showLoading({ + text: "数据获取中", + effect: 'whirling' + }) + setTimeout(() => { + InitShixunStudyStatistics(yAxisMonth, barData, mapByNumber, myChart); + myCharts.hideLoading(); + myChart.hideLoading(); + }, 1000) + + }) + .catch(function (error) { + console.log(error); + }); + } + + render(){ + const { shixunList } = this.state; + return( +
    +
    +
    +

    实训使用详情

    +
    + + + + + + + + + + + + { + shixunList && shixunList.map( (shixun, index) => { + return ( + + + + + + ) + }) + } + + +
    章节实训名称学习人数受用院校
    {shixun.number}{shixun.shixun_name}{shixun.member_count}{shixun.school_count}
    +
    +
    +
    +
    +

    实训学习统计

    + {shixunList===undefined?
    :""} + {shixunList===undefined?"":
    } +
    +
    + ) + } +} export default SecondTab; \ No newline at end of file diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js index 8da80aad3..f9525487e 100644 --- a/public/react/src/modules/user/usersInfo/InfosTopics.js +++ b/public/react/src/modules/user/usersInfo/InfosTopics.js @@ -370,17 +370,17 @@ class InfosTopics extends Component{ { ` - ::-webkit-scrollbar-thumb { - background-color: #cde5fe; - - box-shadow: 0px 0px black; - } - - - ::-webkit-scrollbar-track { - -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0); - background-color: #fff; - } + // ::-webkit-scrollbar-thumb { + // background-color: #cde5fe; + // + // box-shadow: 0px 0px black; + // } + // + // + // ::-webkit-scrollbar-track { + // -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0); + // background-color: #fff; + // } .shaiContent li.shaiItem { padding: 0px 9px; From aacbb90166fc106adf6b5cb2d88427627575a85a Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 19 Sep 2019 10:52:03 +0800 Subject: [PATCH 27/55] ImageLayer2 --- public/react/src/common/educoder.js | 2 +- .../src/common/hooks/{ImageLayerHook.js => ImageLayer2.js} | 4 ++-- .../src/modules/courses/busyWork/CommonWorkAppraise.js | 3 ++- public/react/src/modules/message/js/Leftdialogue.js | 6 +++--- public/react/src/modules/message/js/Rightdialogue.js | 6 +++--- .../src/modules/user/modal/RealNameCertificationModal.js | 6 +++--- 6 files changed, 14 insertions(+), 13 deletions(-) rename public/react/src/common/hooks/{ImageLayerHook.js => ImageLayer2.js} (96%) diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js index fcd0ba7e4..ec4659de7 100644 --- a/public/react/src/common/educoder.js +++ b/public/react/src/common/educoder.js @@ -63,7 +63,7 @@ export { default as Clappr } from './components/media/Clappr' export { default as AliyunUploader } from './components/media/AliyunUploader' -export { default as ImageLayerHook } from './hooks/ImageLayerHook' +export { default as ImageLayer2 } from './hooks/ImageLayer2' // 外部 export { default as CBreadcrumb } from '../modules/courses/common/CBreadcrumb' diff --git a/public/react/src/common/hooks/ImageLayerHook.js b/public/react/src/common/hooks/ImageLayer2.js similarity index 96% rename from public/react/src/common/hooks/ImageLayerHook.js rename to public/react/src/common/hooks/ImageLayer2.js index f41cfb0d2..2b1979c74 100644 --- a/public/react/src/common/hooks/ImageLayerHook.js +++ b/public/react/src/common/hooks/ImageLayer2.js @@ -2,7 +2,7 @@ import React, { useState, useEffect, memo } from 'react'; import ImageLayer from '../../modules/page/layers/ImageLayer'; import { isImageExtension } from 'educoder'; const $ = window.$; -function ImageLayerHook(props) { +function ImageLayer2(props) { const [showImage, setShowImage] = useState(false) const [imageSrc, setImageSrc] = useState('') @@ -45,4 +45,4 @@ function ImageLayerHook(props) { ) } -export default memo(ImageLayerHook) \ No newline at end of file +export default memo(ImageLayer2) \ No newline at end of file diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js index 04ccb3ea1..dc82de540 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js @@ -2,7 +2,7 @@ import React,{Component} from "React"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; import {Link} from 'react-router-dom'; import locale from 'antd/lib/date-picker/locale/zh_CN'; -import { WordsBtn, MarkdownToHtml, markdownToHTML } from 'educoder'; +import { WordsBtn, MarkdownToHtml, markdownToHTML, ImageLayer2 } from 'educoder'; import axios from 'axios'; import Modals from '../../modals/Modals'; import CoursesListType from '../coursesPublic/CoursesListType'; @@ -197,6 +197,7 @@ class CommonWorkAppraise extends Component{ border-bottom: none !important; } `} +
    {(description || (attachments && attachments.length != 0)) &&
    diff --git a/public/react/src/modules/message/js/Leftdialogue.js b/public/react/src/modules/message/js/Leftdialogue.js index c809bc9c9..eb9f18189 100644 --- a/public/react/src/modules/message/js/Leftdialogue.js +++ b/public/react/src/modules/message/js/Leftdialogue.js @@ -5,7 +5,7 @@ import { } from "antd"; import axios from 'axios'; import moment from 'moment'; -import {getImageUrl,markdownToHTML,ImageLayerHook} from 'educoder'; +import {getImageUrl,markdownToHTML,ImageLayer2} from 'educoder'; import "../css/messagemy.css" import WriteaprivateletterModal from '../messagemodal/WriteaprivateletterModal'; //私信页面 @@ -51,8 +51,8 @@ class Leftdialogue extends Component{
    - - + +
    this.mydelete(this.props.objeysl.sender.id,this.props.objeysl.id)} >删除 diff --git a/public/react/src/modules/message/js/Rightdialogue.js b/public/react/src/modules/message/js/Rightdialogue.js index a414f5d52..cc4511fad 100644 --- a/public/react/src/modules/message/js/Rightdialogue.js +++ b/public/react/src/modules/message/js/Rightdialogue.js @@ -5,7 +5,7 @@ import { } from "antd"; import axios from 'axios'; import moment from 'moment'; -import {getImageUrl,markdownToHTML,ImageLayerHook} from 'educoder'; +import {getImageUrl,markdownToHTML,ImageLayer2} from 'educoder'; import "../css/messagemy.css" import WriteaprivateletterModal from '../messagemodal/WriteaprivateletterModal'; //私信页面 @@ -51,8 +51,8 @@ class Rightdialogue extends Component{
    - - + +
    this.mydelete(this.props.objeysl.sender.id,this.props.objeysl.id)} diff --git a/public/react/src/modules/user/modal/RealNameCertificationModal.js b/public/react/src/modules/user/modal/RealNameCertificationModal.js index 412cb58c7..9af082fea 100644 --- a/public/react/src/modules/user/modal/RealNameCertificationModal.js +++ b/public/react/src/modules/user/modal/RealNameCertificationModal.js @@ -2,7 +2,7 @@ import React, { Component } from "react"; import { message, Icon, Input, Form, Upload} from "antd"; import axios from 'axios' import ModalWrapper from "../../courses/common/ModalWrapper" -import { City, getUploadActionUrl, getImageUrl, ImageLayerHook, getUploadActionUrlOfAuth } from 'educoder' +import { City, getUploadActionUrl, getImageUrl, ImageLayer2, getUploadActionUrlOfAuth } from 'educoder' import '../account/common.css' import authImg from '../../../images/account/auth.png' @@ -308,8 +308,8 @@ class RealNameCertificationModal extends Component{ From f74e2cd231c6af19047cfef12a571bdaddbcd4ad Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 19 Sep 2019 11:22:30 +0800 Subject: [PATCH 28/55] =?UTF-8?q?=E5=BC=80=E6=94=BE=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E8=AE=BF=E9=97=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 11 +++++++++++ app/models/user.rb | 23 +++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2ce52d405..8797c4074 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -14,6 +14,7 @@ class ApplicationController < ActionController::Base #before_action :check_account DCODES = %W(2 3 4 5 6 7 8 9 a b c f e f g h i j k l m n o p q r s t u v w x y z) + OPENKEY = "79e33abd4b6588941ab7622aed1e67e8" helper_method :current_user @@ -246,6 +247,16 @@ class ApplicationController < ActionController::Base User.current = find_current_user uid_logger("user_setup: " + (User.current.logged? ? "#{User.current.try(:login)} (id=#{User.current.try(:id)})" : "anonymous")) + # 开放课程通过链接访问的用户 + if !User.current.logged? && !params[:chinaoocTimestamp].blank? && !params[:websiteName].blank? && !params[:chinaoocKey].blank? + content = "#{OPENKEY}#{params[:websiteName]}#{params[:chinaoocTimestamp]}" + if Digest::MD5.hexdigest(content) == params[:chinaoocKey] + user = User.open_class_user + start_user_session(user) if user + User.current = user + end + end + if !User.current.logged? && Rails.env.development? User.current = User.find 1 end diff --git a/app/models/user.rb b/app/models/user.rb index 12759ea4d..ebf68cce6 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -610,6 +610,29 @@ class User < ApplicationRecord admin? || business? end + # 149课程的评审用户数据创建(包含创建课堂学生) + def open_class_user + user = User.find_by(login: "OpenClassUser") + unless user + ActiveRecord::Base.transaction do + user_params = {status: 1, login: "OpenClassUser", lastname: "开放课程", + nickname: "开放课程", professional_certification: 1, certification: 1, grade: 0, + password: "12345678", phone: "11122223333", profile_completed: 1} + user = User.create!(user_params) + + UserExtension.create!(user_id: user.id, gender: 0, school_id: 117, :identity => 1, :student_id => "openclassuser") + + subject = Subject.find_by(id: 149) + if subject + subject.courses.each do |course| + CourseMember.create!(course_id: course.id, role: 4, user_id: user.id) if !course.course_students.exists?(user_id: user.id) + end + end + end + end + user + end + protected def validate_password_length # 管理员的初始密码是5位 From 78a6273e53e336ab09bab08802bc05e31fb20933 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Thu, 19 Sep 2019 13:41:50 +0800 Subject: [PATCH 29/55] admins: school list && destory school --- .../javascripts/admins/schools/index.js | 4 ++ app/assets/stylesheets/admins/schools.scss | 3 ++ app/controllers/admins/schools_controller.rb | 30 ++++++++++++ app/libs/util/file_manage.rb | 8 ++++ app/models/department.rb | 2 +- app/models/school.rb | 1 + app/queries/admins/school_query.rb | 23 +++++++++ app/views/admins/schools/index.html.erb | 16 +++++++ app/views/admins/schools/index.js.erb | 1 + .../admins/schools/shared/_list.html.erb | 48 +++++++++++++++++++ app/views/admins/shared/_sidebar.html.erb | 1 + config/routes.rb | 1 + 12 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 app/assets/javascripts/admins/schools/index.js create mode 100644 app/assets/stylesheets/admins/schools.scss create mode 100644 app/controllers/admins/schools_controller.rb create mode 100644 app/queries/admins/school_query.rb create mode 100644 app/views/admins/schools/index.html.erb create mode 100644 app/views/admins/schools/index.js.erb create mode 100644 app/views/admins/schools/shared/_list.html.erb diff --git a/app/assets/javascripts/admins/schools/index.js b/app/assets/javascripts/admins/schools/index.js new file mode 100644 index 000000000..20ea080fb --- /dev/null +++ b/app/assets/javascripts/admins/schools/index.js @@ -0,0 +1,4 @@ +$(document).on('turbolinks:load', function() { + if ($('body.admins-schools-index-page').length > 0) { + } +}); \ No newline at end of file diff --git a/app/assets/stylesheets/admins/schools.scss b/app/assets/stylesheets/admins/schools.scss new file mode 100644 index 000000000..8dff1eaff --- /dev/null +++ b/app/assets/stylesheets/admins/schools.scss @@ -0,0 +1,3 @@ +.admins-schools-index-page { + +} \ No newline at end of file diff --git a/app/controllers/admins/schools_controller.rb b/app/controllers/admins/schools_controller.rb new file mode 100644 index 000000000..8c4f1d59e --- /dev/null +++ b/app/controllers/admins/schools_controller.rb @@ -0,0 +1,30 @@ +class Admins::SchoolsController < Admins::BaseController + def index + params[:sort_by] ||= 'created_at' + params[:sort_direction] ||= 'desc' + + schools = Admins::SchoolQuery.call(params) + + @schools = paginate schools + + school_ids = @schools.map(&:id) + @department_count = Department.where(school_id: school_ids).group(:school_id).count + end + + def destroy + users = User.joins(:user_extension).where(user_extensions: { school_id: current_school.id }) + + ActiveRecord::Base.transaction do + users.update_all(profile_completed: false) + current_school.destroy! + end + + render_delete_success + end + + private + + def current_school + @_current_school ||= School.find(params[:id]) + end +end \ No newline at end of file diff --git a/app/libs/util/file_manage.rb b/app/libs/util/file_manage.rb index f592ca4e7..b6cd79e57 100644 --- a/app/libs/util/file_manage.rb +++ b/app/libs/util/file_manage.rb @@ -18,10 +18,18 @@ module Util::FileManage File.exist?(disk_filename(source_type, source_id)) end + def exists?(source) + File.exist?(disk_filename(source.class, source.id)) + end + def disk_file_url(source_type, source_id) File.join('/images', relative_path, "#{source_type}", "#{source_id}") end + def source_disk_file_url(source) + File.join('/images', relative_path, "#{source.class}", "#{source.id}") + end + def disk_auth_filename(source_type, source_id, type) File.join(storage_path, "#{source_type}", "#{source_id}#{type}") end diff --git a/app/models/department.rb b/app/models/department.rb index 3b0672cce..2c537fd91 100644 --- a/app/models/department.rb +++ b/app/models/department.rb @@ -5,7 +5,7 @@ class Department < ApplicationRecord has_many :member_users, through: :department_members, source: :user has_many :user_extensions, dependent: :nullify - has_many :apply_add_departments + has_many :apply_add_departments, dependent: :destroy scope :without_deleted, -> { where(is_delete: false) } diff --git a/app/models/school.rb b/app/models/school.rb index 24de02496..387b6b5d8 100644 --- a/app/models/school.rb +++ b/app/models/school.rb @@ -17,6 +17,7 @@ class School < ApplicationRecord has_many :partners, dependent: :destroy has_many :apply_add_departments, dependent: :destroy + has_many :user_extensions, dependent: :nullify # 学校管理员 def manager?(user) diff --git a/app/queries/admins/school_query.rb b/app/queries/admins/school_query.rb new file mode 100644 index 000000000..7361588c4 --- /dev/null +++ b/app/queries/admins/school_query.rb @@ -0,0 +1,23 @@ +class Admins::SchoolQuery < ApplicationQuery + include CustomSortable + + attr_reader :params + + sort_columns :users_count, :created_at, default_by: :created_at, default_direction: :desc + + def initialize(params) + @params = params + end + + def call + schools = School.all + + keyword = strip_param(:keyword) + schools = schools.where('schools.name LIKE ?', "%#{keyword}%") if keyword + + schools = schools.joins(:user_extensions).group(:id) + schools = schools.select('schools.*, COUNT(*) AS users_count') + + custom_sort schools, params[:sort_by], params[:sort_direction] + end +end \ No newline at end of file diff --git a/app/views/admins/schools/index.html.erb b/app/views/admins/schools/index.html.erb new file mode 100644 index 000000000..0dd5b0bc5 --- /dev/null +++ b/app/views/admins/schools/index.html.erb @@ -0,0 +1,16 @@ +<% define_admin_breadcrumbs do %> + <% add_admin_breadcrumb('单位列表') %> +<% end %> + +
    + <%= form_tag(admins_schools_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %> + <%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2 ml-3', placeholder: '部门名称检索') %> + <%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %> + <% end %> + + <%#= javascript_void_link '新建单位', class: 'btn btn-primary', data: { toggle: 'modal', target: '.admin-create-school-modal' } %> +
    + +
    + <%= render partial: 'admins/schools/shared/list', locals: { schools: @schools } %> +
    \ No newline at end of file diff --git a/app/views/admins/schools/index.js.erb b/app/views/admins/schools/index.js.erb new file mode 100644 index 000000000..41a2454be --- /dev/null +++ b/app/views/admins/schools/index.js.erb @@ -0,0 +1 @@ +$('.school-list-container').html("<%= j(render partial: 'admins/schools/shared/list', locals: { schools: @schools }) %>"); \ No newline at end of file diff --git a/app/views/admins/schools/shared/_list.html.erb b/app/views/admins/schools/shared/_list.html.erb new file mode 100644 index 000000000..74df29cee --- /dev/null +++ b/app/views/admins/schools/shared/_list.html.erb @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + <% if schools.present? %> + <% schools.each do |school| %> + + + + + + + + + + + + + + <% end %> + <% else %> + <%= render 'admins/shared/no_data_for_table' %> + <% end %> + +
    IDLOGO标识码单位名称地区城市详细地址<%= sort_tag('用户数', name: 'users_count', path: admins_schools_path) %>部门数<%= sort_tag('创建时间', name: 'created_at', path: admins_schools_path) %>操作
    <%= school.id %> + <% if Util::FileManage.exists?(school) %> + <%= image_tag(Util::FileManage.source_disk_file_url(school).to_s + "?#{Time.now.to_i}", width: 40, height: 40, class: 'preview-image') %> + <% else %> + <%= content_tag(:span, '--', class: 'text-secondary') %> + <% end %> + <%= display_text school.identifier %><%= school.name %><%= school.province %><%= school.city %><%= school.address %><%= school.users_count %><%= @department_count.fetch(school.id, 0) %><%= school.created_at&.strftime('%Y-%m-%d %H:%M') %> + <%= delete_link '删除', admins_school_path(school, element: ".school-item-#{school.id}"), class: 'delete-school-action' %> +
    + +<%= render partial: 'admins/shared/paginate', locals: { objects: schools } %> \ No newline at end of file diff --git a/app/views/admins/shared/_sidebar.html.erb b/app/views/admins/shared/_sidebar.html.erb index da65099ca..2d9461f45 100644 --- a/app/views/admins/shared/_sidebar.html.erb +++ b/app/views/admins/shared/_sidebar.html.erb @@ -31,6 +31,7 @@
  • <%= sidebar_item_group('#schools-submenu', '单位管理', icon: 'building') do %> +
  • <%= sidebar_item(admins_schools_path, '单位列表', icon: 'university', controller: 'admins-schools') %>
  • <%= sidebar_item(admins_departments_path, '部门列表', icon: 'sitemap', controller: 'admins-departments') %>
  • <% end %> diff --git a/config/routes.rb b/config/routes.rb index ba851b2f2..e26016ab8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -926,6 +926,7 @@ Rails.application.routes.draw do resources :mirror_scripts, only: [:index, :new, :create, :edit, :update, :destroy] end resources :choose_mirror_repositories, only: [:new, :create] + resources :schools, only: [:index, :destroy] resources :departments, only: [:index, :create, :edit, :update, :destroy] do resource :department_member, only: [:create, :update, :destroy] post :merge, on: :collection From 8923da27c4805ad0487709e089c77ab37b4c91e9 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 19 Sep 2019 14:40:23 +0800 Subject: [PATCH 30/55] =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/page/component/monaco/TPIMonaco.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/react/src/modules/page/component/monaco/TPIMonaco.js b/public/react/src/modules/page/component/monaco/TPIMonaco.js index 615623cd1..a9820ad27 100644 --- a/public/react/src/modules/page/component/monaco/TPIMonaco.js +++ b/public/react/src/modules/page/component/monaco/TPIMonaco.js @@ -17,6 +17,8 @@ import * as monaco from 'monaco-editor' import { fromStore, toStore } from 'educoder' import './TPIMonacoConfig' + +// https://microsoft.github.io/monaco-editor/playground.html#customizing-the-appearence-exposed-colors monaco.editor.defineTheme('myCoolTheme', { base: 'vs-dark', inherit: true, @@ -35,6 +37,8 @@ monaco.editor.defineTheme('myCoolTheme', { // 'input.border': '#ffffff', 'editor.lineHighlightBorder': '#222c34', // .current-line + // 'editor.selectionBackground': '#FFFF0030', + // 'editor.selectionHighlightBackground' :'#0000FFFF', } }); From 7c832ca7d9145bcd67e4dd210c21c451d7edbd41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 19 Sep 2019 14:45:40 +0800 Subject: [PATCH 31/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 6 +- .../modules/courses/gradinforms/Eduinforms.js | 93 ++++++++++++++++++- 2 files changed, 92 insertions(+), 7 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index a89eacfa1..0eb6b50cd 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -38,13 +38,13 @@ export function initAxiosInterceptors(props) { // https://github.com/axios/axios/issues/1497 // TODO 读取到package.json中的配置? - var proxy = "http://localhost:3000" + var proxy = "http://localhost:3000"; // proxy = "http://testbdweb.trustie.net" // proxy = "http://testbdweb.educoder.net" // proxy = "https://testeduplus2.educoder.net" - proxy="http://47.96.87.25:48080" + proxy="http://47.96.87.25:48080"; // wy - proxy="https://pre-newweb.educoder.net" + proxy="https://pre-newweb.educoder.net"; proxy="https://test-newweb.educoder.net" // wy diff --git a/public/react/src/modules/courses/gradinforms/Eduinforms.js b/public/react/src/modules/courses/gradinforms/Eduinforms.js index 14bcfa11a..6e172977a 100644 --- a/public/react/src/modules/courses/gradinforms/Eduinforms.js +++ b/public/react/src/modules/courses/gradinforms/Eduinforms.js @@ -25,16 +25,61 @@ class Eduinforms extends Component{ eduintits:"", informs:[], yslbool:false, + dataquerys:{}, } } componentDidMount() { + console.log("Eduinformss"); console.log("获取到数据"); - console.log(this.props); - - this.getinputdata(); + // console.log(this.props); + const query = this.props.location.search; + // const type = query.split('?chinaoocTimestamp='); + // console.log("Eduinforms12345"); + // console.log(this.foo(query)); + // console.log(JSON.stringify(this.foo(query))); + var dataqueryss={} + try { + var foqus=this.foo(query); + if(JSON.stringify(foqus) ==="{}"){ + this.setState({ + dataquerys:{}, + }); + return + } + this.setState({ + dataquerys:foqus, + }); + dataqueryss=foqus; + }catch (e) { + this.setState({ + dataquerys:{}, + }) + } + this.getinputdatas(dataqueryss); } + foo=(url)=> { + var json = {}; + var regExp = /[\?\&](\w+)(=?)(\w*)/g; + var arr; + do { + arr = regExp.exec(url); + // console.log(arr); // arr = [完整的字符串, key, 等号或'', value或''] + + if (arr) { + var key = arr[1]; + var value = arr[3]; + // arr[2] === ''时, value = undefined + if (!arr[2]) + value = undefined; + + json[key] = value; + } + } while (arr); + + return json; + } getyslbooltrue(){ console.log("调用了getyslbooltrue"); this.setState({ @@ -54,7 +99,47 @@ class Eduinforms extends Component{ }) let url = `/courses/${this.props.match.params.coursesId}/informs.json`; // - axios.get(url).then((response) => { + axios.get(url, + {params:this.state.dataquerys} + ).then((response) => { + if(response){ + if(response.data){ + this.setState({ + informs:response.data.informs, + isSpin:false, + }) + }else { + this.setState({ + informs:[], + isSpin:false, + + }) + + } + }else { + this.setState({ + informs:[], + isSpin:false, + }) + + } + }).catch((error) => { + console.log(error) + this.setState({ + informs:[], + isSpin:false, + }) + }); + } + getinputdatas=(dataquerys)=>{ + this.setState({ + isSpin:true, + }) + let url = `/courses/${this.props.match.params.coursesId}/informs.json`; + // + axios.get(url, + {params:dataquerys} + ).then((response) => { if(response){ if(response.data){ this.setState({ From 63133c40731df82d9b9427d83795a9d639c52fe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 19 Sep 2019 15:09:43 +0800 Subject: [PATCH 32/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/gradinforms/Eduinforms.js | 6 +- public/react/src/modules/paths/Index.js | 2 +- .../paths/PathDetail/PathDetailIndex.js | 109 +++++++++++++++++- 3 files changed, 110 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/courses/gradinforms/Eduinforms.js b/public/react/src/modules/courses/gradinforms/Eduinforms.js index 6e172977a..f52471094 100644 --- a/public/react/src/modules/courses/gradinforms/Eduinforms.js +++ b/public/react/src/modules/courses/gradinforms/Eduinforms.js @@ -58,7 +58,7 @@ class Eduinforms extends Component{ } this.getinputdatas(dataqueryss); } - + //截取数据 foo=(url)=> { var json = {}; var regExp = /[\?\&](\w+)(=?)(\w*)/g; @@ -131,14 +131,14 @@ class Eduinforms extends Component{ }) }); } - getinputdatas=(dataquerys)=>{ + getinputdatas=(yslwebobject)=>{ this.setState({ isSpin:true, }) let url = `/courses/${this.props.match.params.coursesId}/informs.json`; // axios.get(url, - {params:dataquerys} + {params:yslwebobject} ).then((response) => { if(response){ if(response.data){ diff --git a/public/react/src/modules/paths/Index.js b/public/react/src/modules/paths/Index.js index 0f3bd349b..813251d28 100644 --- a/public/react/src/modules/paths/Index.js +++ b/public/react/src/modules/paths/Index.js @@ -43,7 +43,7 @@ class Index extends Component{ ()} > - + {/*编辑页面*/} ()} > diff --git a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js index 16c7d43c3..c04c74e87 100644 --- a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js +++ b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js @@ -146,11 +146,114 @@ class PathDetailIndex extends Component{ } componentDidMount(){ - this.getdatasindex() + const query = this.props.location.search; + // const type = query.split('?chinaoocTimestamp='); + // console.log("Eduinforms12345"); + // console.log(this.foo(query)); + // console.log(JSON.stringify(this.foo(query))); + var dataqueryss={} + try { + var foqus=this.foo(query); + if(JSON.stringify(foqus) ==="{}"){ + this.setState({ + dataquerys:{}, + }); + return + } + this.setState({ + dataquerys:foqus, + }); + dataqueryss=foqus; + }catch (e) { + this.setState({ + dataquerys:{}, + }) + } + this.getdatasindexs(undefined,dataqueryss) + } + //截取url 数据的 + foo=(url)=> { + var json = {}; + var regExp = /[\?\&](\w+)(=?)(\w*)/g; + var arr; + do { + arr = regExp.exec(url); + // console.log(arr); // arr = [完整的字符串, key, 等号或'', value或''] + + if (arr) { + var key = arr[1]; + var value = arr[3]; + // arr[2] === ''时, value = undefined + if (!arr[2]) + value = undefined; + + json[key] = value; + } + } while (arr); + + return json; } + getdatasindexs=(key,yslwebobject)=>{ + // yslwebobject 后端需要的接口 + let pathid=this.props.match.params.pathId; + let url="/paths/"+pathid+".json"; + axios.get(url, + {params:yslwebobject} + ).then((result)=>{ + if (result.data.status === 407 || result.data.status === 401) { + debugger + return; + } + + if (result.data.status === 403) { + debugger + // window.location.href = "/403"; + return; + } + configShareForCustom(result.data.name, result.data.description) + + if(result.data.allow_visit===true){ + this.setState({ + detailInfoList:result.data, + courses:result.data.courses, + pathtopskey:key===undefined?1:key, + // items: getItems(result.data.members.length), + }) + } - getdatasindex=(key)=>{ + }).catch((error)=>{ + console.log(error); + }) + + let righturl="/paths/"+pathid+"/right_banner.json"; + axios.get(righturl).then((result)=>{ + if (result.data.status === 407 || result.data.status === 401) { + debugger + return; + } + + if (result.data.status === 403) { + debugger + // window.location.href = "/403"; + return; + } + + this.setState({ + // detailInfoList:result.data, + tags:result.data.tags, + progress:result.data.progress, + members:result.data.members, + items: getItems(result.data.members.length), + }) + + }).catch((error)=>{ + console.log(error); + }) + }; + + getdatasindex=(key,yslwebobject)=>{ + // yslwebobject 后端需要的接口 let pathid=this.props.match.params.pathId; let url="/paths/"+pathid+".json"; axios.get(url).then((result)=>{ @@ -177,7 +280,7 @@ class PathDetailIndex extends Component{ }).catch((error)=>{ console.log(error); - }) + }); let righturl="/paths/"+pathid+"/right_banner.json"; From 411f98297c38daa5e1f890a9e3556e6c90a11b4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 19 Sep 2019 15:46:27 +0800 Subject: [PATCH 33/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/gradinforms/Eduinforms.js | 10 +++++----- .../modules/paths/PathDetail/PathDetailIndex.js | 17 ++++++++++------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/courses/gradinforms/Eduinforms.js b/public/react/src/modules/courses/gradinforms/Eduinforms.js index f52471094..38190afaf 100644 --- a/public/react/src/modules/courses/gradinforms/Eduinforms.js +++ b/public/react/src/modules/courses/gradinforms/Eduinforms.js @@ -45,12 +45,12 @@ class Eduinforms extends Component{ this.setState({ dataquerys:{}, }); - return + }else { + this.setState({ + dataquerys:foqus, + }); + dataqueryss=foqus; } - this.setState({ - dataquerys:foqus, - }); - dataqueryss=foqus; }catch (e) { this.setState({ dataquerys:{}, diff --git a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js index c04c74e87..50da053b2 100644 --- a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js +++ b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js @@ -146,6 +146,7 @@ class PathDetailIndex extends Component{ } componentDidMount(){ + debugger const query = this.props.location.search; // const type = query.split('?chinaoocTimestamp='); // console.log("Eduinforms12345"); @@ -158,18 +159,19 @@ class PathDetailIndex extends Component{ this.setState({ dataquerys:{}, }); - return + }else{ + this.setState({ + dataquerys:foqus, + }); + dataqueryss=foqus; } - this.setState({ - dataquerys:foqus, - }); - dataqueryss=foqus; }catch (e) { this.setState({ dataquerys:{}, }) } - this.getdatasindexs(undefined,dataqueryss) + debugger + this.getdatasindexs(undefined,dataqueryss); } //截取url 数据的 foo=(url)=> { @@ -194,6 +196,7 @@ class PathDetailIndex extends Component{ return json; } getdatasindexs=(key,yslwebobject)=>{ + debugger // yslwebobject 后端需要的接口 let pathid=this.props.match.params.pathId; let url="/paths/"+pathid+".json"; @@ -252,7 +255,7 @@ class PathDetailIndex extends Component{ }) }; - getdatasindex=(key,yslwebobject)=>{ + getdatasindex=(key)=>{ // yslwebobject 后端需要的接口 let pathid=this.props.match.params.pathId; let url="/paths/"+pathid+".json"; From 1940d2222fd9f7a27e4ddfd708b965e288e10892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 19 Sep 2019 15:49:34 +0800 Subject: [PATCH 34/55] b --- public/react/src/modules/paths/PathDetail/PathDetailIndex.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js index 50da053b2..84bdff5df 100644 --- a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js +++ b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js @@ -146,7 +146,7 @@ class PathDetailIndex extends Component{ } componentDidMount(){ - debugger + const query = this.props.location.search; // const type = query.split('?chinaoocTimestamp='); // console.log("Eduinforms12345"); @@ -170,7 +170,7 @@ class PathDetailIndex extends Component{ dataquerys:{}, }) } - debugger + this.getdatasindexs(undefined,dataqueryss); } //截取url 数据的 @@ -196,7 +196,6 @@ class PathDetailIndex extends Component{ return json; } getdatasindexs=(key,yslwebobject)=>{ - debugger // yslwebobject 后端需要的接口 let pathid=this.props.match.params.pathId; let url="/paths/"+pathid+".json"; From bd319f53ecfc2b1014d0285cf5dda512fa58ca9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 19 Sep 2019 16:07:01 +0800 Subject: [PATCH 35/55] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../paths/PathDetail/PathDetailIndex.js | 7 +- public/react/src/modules/tpm/TPMIndexHOC.js | 137 +++++++++++++++++- 2 files changed, 137 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js index 84bdff5df..883ed6875 100644 --- a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js +++ b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js @@ -83,7 +83,8 @@ class PathDetailIndex extends Component{ loadtype:false, courses:undefined, items: getItems(10), - pathtopskey:1 + pathtopskey:1, + dataquerys:{}, } this.onDragEnd = this.onDragEnd.bind(this); @@ -258,7 +259,9 @@ class PathDetailIndex extends Component{ // yslwebobject 后端需要的接口 let pathid=this.props.match.params.pathId; let url="/paths/"+pathid+".json"; - axios.get(url).then((result)=>{ + axios.get(url, + {params:this.state.dataquerys} + ).then((result)=>{ if (result.data.status === 407 || result.data.status === 401) { debugger return; diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index c366b21a3..581aef930 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -81,7 +81,8 @@ export function TPMIndexHOC(WrappedComponent) { isRender: false, AccountProfiletype: false, - globalLoading: false + globalLoading: false, + dataquerys:{}, } } @@ -165,7 +166,32 @@ export function TPMIndexHOC(WrappedComponent) { $.ajaxSetup({ cache: true }); - this.fetchUser(); + + //帮助后台传参数 + const query = this.props.location.search; + // const type = query.split('?chinaoocTimestamp='); + // console.log("Eduinforms12345"); + // console.log(this.foo(query)); + // console.log(JSON.stringify(this.foo(query))); + var dataqueryss={} + try { + var foqus=this.foo(query); + if(JSON.stringify(foqus) ==="{}"){ + this.setState({ + dataquerys:{}, + }); + }else{ + this.setState({ + dataquerys:foqus, + }); + dataqueryss=foqus; + } + }catch (e) { + this.setState({ + dataquerys:{}, + }) + } + this.fetchUsers(dataqueryss); let url=`/users/get_navigation_info.json`; axios.get(url, { @@ -260,9 +286,23 @@ export function TPMIndexHOC(WrappedComponent) { courseId = parseInt(type[2]) // url += `?course_id=${courseId}` } + var datay={}; + if(JSON.stringify(this.state.dataquerys) ==="{}"){ + datay={ + course_id:isNaN(courseId)?undefined:courseId, + school:1 + } + }else{ + datay={ + course_id:isNaN(courseId)?undefined:courseId, + school:1, + chinaoocTimestamp:this.state.dataquerys.chinaoocTimestamp, + websiteName:this.state.dataquerys.websiteName, + chinaoocKey:this.state.dataquerys.chinaoocKey, + } + } axios.get(url,{params:{ - course_id:isNaN(courseId)?undefined:courseId, - school:1 + datay } }, { @@ -301,7 +341,94 @@ export function TPMIndexHOC(WrappedComponent) { }).catch((error) => { console.log(error) }) - } + }; + fetchUsers = (yslurlobject) => { + let url = `/users/get_user_info.json` + let courseId; + let query = this.props.location.pathname; + const type = query.split('/'); + if (type[1] == 'courses' && type[2]) { + courseId = parseInt(type[2]) + // url += `?course_id=${courseId}` + } + var datay={}; + if(JSON.stringify(yslurlobject) ==="{}"){ + datay={ + course_id:isNaN(courseId)?undefined:courseId, + school:1 + } + }else{ + datay={ + course_id:isNaN(courseId)?undefined:courseId, + school:1, + chinaoocTimestamp:yslurlobject.chinaoocTimestamp, + websiteName:yslurlobject.websiteName, + chinaoocKey:yslurlobject.chinaoocKey, + } + } + axios.get(url,{params:{ + datay + } + }, + { + // withCredentials: true + } + ).then((response) => { + /* + { + "username": "黄井泉", + "login": "Hjqreturn", + "user_id": 12, + "image_url": "avatar/User/12", + "admin": true, + "is_teacher": false, + "tidding_count": 0 + } + */ + if(response=== undefined){ + return + } + if (response.data) { + this.initCommonState(response.data) + this.setState({ + tpmLoading: false, + coursedata: { + course_identity: response.data.course_identity >= 0 ? response.data.course_identity : undefined, + course_public: response.data.course_public, + name: response.data.course_name, + userid:response.data.user_id + }, + + }) + + } + + }).catch((error) => { + console.log(error) + }) + }; + //截取url 数据的 + foo=(url)=> { + var json = {}; + var regExp = /[\?\&](\w+)(=?)(\w*)/g; + var arr; + do { + arr = regExp.exec(url); + // console.log(arr); // arr = [完整的字符串, key, 等号或'', value或''] + + if (arr) { + var key = arr[1]; + var value = arr[3]; + // arr[2] === ''时, value = undefined + if (!arr[2]) + value = undefined; + + json[key] = value; + } + } while (arr); + + return json; + }; hideLoginDialog = () => { this.setState({ isRender: false From e33ad04bcb817df379cf0267458a7e24079ae96f Mon Sep 17 00:00:00 2001 From: p31729568 Date: Thu, 19 Sep 2019 16:13:48 +0800 Subject: [PATCH 36/55] ecs: add graduation_subitems list api --- app/controllers/ecs/graduation_subitems_controller.rb | 5 +++++ app/views/ecs/graduation_subitems/index.json.jbuilder | 8 ++++++++ config/routes.rb | 1 + 3 files changed, 14 insertions(+) create mode 100644 app/controllers/ecs/graduation_subitems_controller.rb create mode 100644 app/views/ecs/graduation_subitems/index.json.jbuilder diff --git a/app/controllers/ecs/graduation_subitems_controller.rb b/app/controllers/ecs/graduation_subitems_controller.rb new file mode 100644 index 000000000..b2570891d --- /dev/null +++ b/app/controllers/ecs/graduation_subitems_controller.rb @@ -0,0 +1,5 @@ +class Ecs::GraduationSubitemsController < Ecs::BaseController + def index + @graduation_subitems = current_year.ec_graduation_subitems#.reorder('ec_graduation_requirements.position ASC, ec_graduation_subitems.position ASC') + end +end \ No newline at end of file diff --git a/app/views/ecs/graduation_subitems/index.json.jbuilder b/app/views/ecs/graduation_subitems/index.json.jbuilder new file mode 100644 index 000000000..0a1235b1d --- /dev/null +++ b/app/views/ecs/graduation_subitems/index.json.jbuilder @@ -0,0 +1,8 @@ +json.graduation_subitems do + json.array! @graduation_subitems do |graduation_subitem| + json.extract! graduation_subitem, :id, :position, :content + json.graduation_requirement_position graduation_subitem.ec_graduation_requirement.position + end +end + +json.count @graduation_subitems.size \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index d759ab9bd..1647101ea 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -737,6 +737,7 @@ Rails.application.routes.draw do resource :graduation_course_supports, only: [:show, :create] resource :reach_evaluation, only: [:show, :create] resource :reach_criteria, only: [:create] + resources :graduation_subitems, only: [:index] end resources :ec_courses, only: [] do From cbeeb84a74c4d180fb5aeb3e88a5abc8787c8d20 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Thu, 19 Sep 2019 16:17:37 +0800 Subject: [PATCH 37/55] ecs: fix graduation subitem api order --- app/controllers/ecs/graduation_subitems_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/ecs/graduation_subitems_controller.rb b/app/controllers/ecs/graduation_subitems_controller.rb index b2570891d..03cf379bb 100644 --- a/app/controllers/ecs/graduation_subitems_controller.rb +++ b/app/controllers/ecs/graduation_subitems_controller.rb @@ -1,5 +1,6 @@ class Ecs::GraduationSubitemsController < Ecs::BaseController def index - @graduation_subitems = current_year.ec_graduation_subitems#.reorder('ec_graduation_requirements.position ASC, ec_graduation_subitems.position ASC') + subitems = current_year.ec_graduation_subitems.reorder('ec_graduation_requirements.position ASC, ec_graduation_subitems.position ASC') + @graduation_subitems = subitems.includes(:ec_graduation_requirement) end end \ No newline at end of file From 8b80e360c6bbf89337d7a62796a87b225fbe3c9a Mon Sep 17 00:00:00 2001 From: p31729568 Date: Thu, 19 Sep 2019 16:23:52 +0800 Subject: [PATCH 38/55] fix --- .../shared/_ec_graduation_subitem.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/ecs/graduation_course_supports/shared/_ec_graduation_subitem.json.jbuilder b/app/views/ecs/graduation_course_supports/shared/_ec_graduation_subitem.json.jbuilder index aee77c5b7..ced8a5c72 100644 --- a/app/views/ecs/graduation_course_supports/shared/_ec_graduation_subitem.json.jbuilder +++ b/app/views/ecs/graduation_course_supports/shared/_ec_graduation_subitem.json.jbuilder @@ -2,5 +2,5 @@ json.extract! ec_graduation_subitem, :id, :position, :content, :ec_graduation_re json.graduation_requirement_position ec_graduation_subitem.ec_graduation_requirement.position -json.course_supports ec_graduation_subitem.ec_course_supports, partial: 'ec_course_support', as: :ec_course_support +json.course_supports ec_graduation_subitem.ec_course_supports, partial: 'ecs/graduation_course_supports/shared/ec_course_support', as: :ec_course_support json.weights_total ec_graduation_subitem.ec_course_supports.to_a.sum(&:weights) From 9279b0d6e9e9c611dc17df9f38d39c9d46d0f6c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 19 Sep 2019 16:32:01 +0800 Subject: [PATCH 39/55] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMIndexHOC.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 581aef930..0f753b96c 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -301,9 +301,8 @@ export function TPMIndexHOC(WrappedComponent) { chinaoocKey:this.state.dataquerys.chinaoocKey, } } - axios.get(url,{params:{ + axios.get(url,{params: datay - } }, { // withCredentials: true @@ -366,9 +365,8 @@ export function TPMIndexHOC(WrappedComponent) { chinaoocKey:yslurlobject.chinaoocKey, } } - axios.get(url,{params:{ + axios.get(url,{params: datay - } }, { // withCredentials: true From 7fa93a38437caef207024bcf8a61fdc768287250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 19 Sep 2019 16:39:27 +0800 Subject: [PATCH 40/55] Merge branches 'dev_aliyun' and 'dev_ec' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun --- .../ecs/EcSetting/CourseSupports/index.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/ecs/EcSetting/CourseSupports/index.js b/public/react/src/modules/ecs/EcSetting/CourseSupports/index.js index 0d6771e79..eb32f66f0 100644 --- a/public/react/src/modules/ecs/EcSetting/CourseSupports/index.js +++ b/public/react/src/modules/ecs/EcSetting/CourseSupports/index.js @@ -61,13 +61,15 @@ class CourseSupports extends Component { this.setState({ data:response.data }) - } - if(response.data.graduation_subitems.length===0){ - this.setState({ + console.log(response.data.graduation_subitems.length) + if(response.data.graduation_subitems.length===0){ + this.setState({ Supportstype:true, Supportslist:'数据为空,请去毕业要求——>毕业要求指标点分解列表配置数据' - }) + }) + } } + }) .catch(function (error) { console.log(error); @@ -426,7 +428,7 @@ class CourseSupports extends Component { } render() { const Option = Select.Option; - let {data,ec_courses_list,editcourse,editnum,index,ec_year_id,schooldata,ecComponentState,hidesupport,supportid,Editkey,titlemessage,Supportstype,Supportslist,Supportssum,Supportsclass,major_school_id} = this.state; + let {data,ec_courses_list,editcourse,editnum,index,ec_year_id,Supportsclasskey,ecComponentState,hidesupport,supportid,Editkey,titlemessage,Supportstype,Supportslist,Supportssum,Supportsclass,major_school_id} = this.state; var list = (length) => { var res = []; for(var i = 0; i < length; i++) { @@ -510,15 +512,16 @@ class CourseSupports extends Component { { item.course_supports.map((t,kes)=>{ + return( -
    {t.name.length>12?t.name.substring(0, 10)+"...":t.name}
    + >{t.ec_course_name.length>12?t.ec_course_name.substring(0, 10)+"...":t.ec_course_name}
    ({t.weigths})
    From 22007f58bf7c88b49adbc0c8c2868dab5a2b12c0 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Thu, 19 Sep 2019 16:51:37 +0800 Subject: [PATCH 41/55] ecs: fix order bug --- app/controllers/ecs/graduation_course_supports_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/ecs/graduation_course_supports_controller.rb b/app/controllers/ecs/graduation_course_supports_controller.rb index 2a6d59024..c70121a0d 100644 --- a/app/controllers/ecs/graduation_course_supports_controller.rb +++ b/app/controllers/ecs/graduation_course_supports_controller.rb @@ -3,6 +3,7 @@ class Ecs::GraduationCourseSupportsController < Ecs::BaseController def show @graduation_subitems = current_year.ec_graduation_subitems + .reorder('ec_graduation_requirements.position ASC, ec_graduation_subitems.position ASC') .includes(:ec_graduation_requirement, ec_course_supports: :ec_course) @course_count = current_year.ec_courses.count From c2058ddc82cfc9b2bd3677336c2d3106efd5c6e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 19 Sep 2019 17:11:40 +0800 Subject: [PATCH 42/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTasksSubmitedit.js | 2 +- .../ecs/EcSetting/CourseSupports/index.js | 34 ++++++++++--------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index 35d9cdad2..02aa10e0d 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -389,7 +389,7 @@ class GraduationTasksSubmitedit extends Component{ let listid=[]; for(var list of fileList){ - listid.push(list.response.id) + listid.push(list.response == undefined ? list.id : list.response.id;) } this.props.form.validateFields((err, values) => { diff --git a/public/react/src/modules/ecs/EcSetting/CourseSupports/index.js b/public/react/src/modules/ecs/EcSetting/CourseSupports/index.js index eb32f66f0..2164669f3 100644 --- a/public/react/src/modules/ecs/EcSetting/CourseSupports/index.js +++ b/public/react/src/modules/ecs/EcSetting/CourseSupports/index.js @@ -15,7 +15,7 @@ class CourseSupports extends Component { this.state={ data:'', ec_courses_list:[], - editcourse:[{"weigths": 0, + editcourse:[{"weights": 0, "ec_course_name":'', "top_relation": false, "ec_course_id":'' @@ -155,12 +155,14 @@ class CourseSupports extends Component { if(item.course_supports.length>0){ this.setState({ editcourse:item.course_supports, - Editkey:key + Editkey:key, + index:subindex, }) }else if(item.course_supports.length===0){ this.setState({ editcourse:[{weights: 0,top_relation: false,ec_course_name:'',ec_course_id:''}], - Editkey:key + Editkey:key, + index:subindex, }) } @@ -175,7 +177,7 @@ class CourseSupports extends Component { Addcourse=(e)=>{ let {editcourse} =this.state; let neweditcourse=editcourse; - let newadd = {weigths: 0,top_relation: false,ec_course_name:'',ec_course_id:''}; + let newadd = {weights: 0,top_relation: false,ec_course_name:'',ec_course_id:''}; neweditcourse.push(newadd); this.setState({ editcourse:neweditcourse @@ -196,10 +198,10 @@ class CourseSupports extends Component { neweditcourse.splice(e,1); let newnum=0; for(var j=0;j{ - if(item.weigths===""){ - item.weigths=0; + if(item.weights===""){ + item.weights=0; } if(item.ec_course_id===""){ this.setState({ @@ -482,7 +484,7 @@ class CourseSupports extends Component {
    - 毕业要求指标点({data.subitems_count} + 毕业要求指标点({data.count} 课程体系({data.course_count}
    @@ -506,7 +508,7 @@ class CourseSupports extends Component { return (
  • 1134 ? 136*data.max_support_count : 1134+"px",margin: '0px 0px'}}> - {item.sequence_num} + {item.graduation_requirement_position+"-"+item.position} @@ -524,7 +526,7 @@ class CourseSupports extends Component { >{t.ec_course_name.length>12?t.ec_course_name.substring(0, 10)+"...":t.ec_course_name}
  • ({t.weigths})
    + >({t.weights})
    ) @@ -589,7 +591,7 @@ class CourseSupports extends Component { size="large" className={Supportssum===true?"inputWeight bor-red":"inputWeight"} id={key} - value={it.weigths} + value={it.weights} onInput={this.enterweight.bind(this)} /> From 0a41deee10c1e1217fee31f38146ecd0d495a5a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 19 Sep 2019 17:16:43 +0800 Subject: [PATCH 43/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/graduation/tasks/GraduationTasksSubmitedit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index 02aa10e0d..41768333a 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -389,7 +389,7 @@ class GraduationTasksSubmitedit extends Component{ let listid=[]; for(var list of fileList){ - listid.push(list.response == undefined ? list.id : list.response.id;) + listid.push(list.response == undefined ? list.id : list.response.id) } this.props.form.validateFields((err, values) => { From 3c828f3533e0c8fbcbba2fe61aab33dfa099f015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 19 Sep 2019 17:29:21 +0800 Subject: [PATCH 44/55] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/Listofworksstudentone.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 7aac55b20..ac2133aab 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -1455,9 +1455,9 @@ class Listofworksstudentone extends Component { } } componentDidCatch(error, info){ - console.log("-----------------------------905错误信息"); - console.log(error); - console.log(info); + // console.log("-----------------------------905错误信息"); + // console.log(error); + // console.log(info); } // componentWillReceiveProps(nextProps) { From 20c9a515d718294a3316b8a9f2298cf7e8411dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 19 Sep 2019 17:37:08 +0800 Subject: [PATCH 45/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../paths/SchoolStatistics/SecondTab.js | 14 +- .../paths/SchoolStatistics/ThirdTab.js | 492 +++++++++--------- 2 files changed, 258 insertions(+), 248 deletions(-) diff --git a/public/react/src/modules/paths/SchoolStatistics/SecondTab.js b/public/react/src/modules/paths/SchoolStatistics/SecondTab.js index 5fefef219..8716a14d5 100644 --- a/public/react/src/modules/paths/SchoolStatistics/SecondTab.js +++ b/public/react/src/modules/paths/SchoolStatistics/SecondTab.js @@ -237,7 +237,7 @@ class SecondTab extends Component{
    -

    实训使用详情

    +
    实训使用详情
    @@ -268,7 +268,17 @@ class SecondTab extends Component{
    -

    实训学习统计

    + +
    实训学习统计
    {shixunList===undefined?
    :""} {shixunList===undefined?"":
    { - return item.name - }) -// [{name: "湖南科技大学潇湘学院", 已通关: 0, 未通关: 4, sum: 4},{name: "长沙理工大学", 已通关: 0, 未通关: 7, sum: 7},{name: "安徽大学", 已通关: 1, 未通关: 8, sum: 9},{name: "湘潭大学兴湘学院", 已通关: 12, 未通关: 0, sum: 12}, -// {name: "湖南师范大学", 已通关: 10, 未通关: 2, sum: 12},{name: "湖南软件职业学院", 已通关: 11, 未通关: 1, sum: 12},{name: "湖南科技大学", 已通关: 91, 未通关: 34, sum: 125},{name: "湘潭大学", 已通关: 110, 未通关: 45, sum: 155}, -// {name: "湖南工业大学", 已通关: 133, 未通关: 41, sum: 174},{name: "国防科技大学", 已通关: 853, 未通关: 23, sum: 876}]; - // <% @schools.each do |s| %> - // data.push({name: "<%= s['name'] %>", '已通关': <%= s['pass_count'] %>, '未通关': <%= s['unpass_count'] %>}); - // <% end %> - - // =================右边要放的字段名及颜色=========== - var items = [{ - key: '学习人数', color: "#29BD8B" - }, { - key: '已通关', color: "#FF954C" - }, { - key: '未通关', color: "#CBCBCB" - }] - - data.forEach((d) => { - var sum = 0 - items.forEach((i) => { - sum += (d[i.key] || 0) - }) - d.sum = sum; - }) - - // =========================排序================ - data.sort((a, b) => a.sum - b.sum) - - var yData = _yData.reverse(); - // ["湖南科技大学潇湘学院", "长沙理工大学", "安徽大学", "湖南软件职业学院", "湖南师范大学", "湘潭大学兴湘学院", "湖南科技大学", "湘潭大学", "湖南工业大学", "国防科技大学"] - - var itemSeries = items.map((d, i) => { - var values = data.map((p) => p[d.key]) - return { - type: 'bar', - name: d.key, - data: values, - stack: 'all', - xAxisIndex: 1, - yAxisIndex: 1, - label: { - normal: { - color:'#FFF', - // show: ( i == 1 ? true :false), - show: true, - position: 'inside' - } - }, - itemStyle: { - normal: { - color: d.color - } - } - } - }) - - var option = { - backgroundColor: '#fff', // 背景 - tooltip : { - trigger: 'axis', - axisPointer : { - type : '' - } - }, - legend: { - data: ['学习人数','已通关','未通关'], - textStyle: { - color: '#05101A' - }, - right:"20px", - selectedMode:false - }, - grid: [{ - right: '56%', - top: '20', - containLabel: true - }, { - left: '45%', - width:'100%', - top: '20', - containLabel: true - }], - xAxis: [{ - type: 'value', - inverse: true, - splitLine: { - show: false - }, - axisLine: { - show: false - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - } - }, { - type: 'value', - gridIndex: 1, - splitLine: { - show: false - }, - axisLine: { - show: false - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - } - }], - yAxis: [{ - type: 'category', - data: yData, - max:10, - axisLine: { - show: false - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - } - }, { - type: 'category', - data: yData, - max:10, - gridIndex: 1, - axisLine: { - show: false - }, - axisTick: { - show: false - } - }], - series: [...itemSeries, - { - name: '总计', - type: 'bar', - data: data.map((d) => d.sum), - xAxisIndex: 1, - yAxisIndex: 1, - barCategoryGap:'40%', - stack: 'all', - label: { - normal: { - show: true, - position: 'inside', - color: '#666' - } - }, - itemStyle: { - normal: { - color: '#fff' - } - } - }, - // ===================左边=================== - { - type: 'bar', - data: data.map((d) => d.sum), - barCategoryGap:'40%', - label: { - normal: { - show: true, - position: 'left', - color: '#29BD8B' - } - }, - itemStyle: { - normal: { - color: '#29BD8B' - } - } - }] - } - myChart.setOption(option); -} -class ThirdTab extends Component{ - constructor(props){ - super(props); - } - - componentDidMount(){ - var pathId = this.props.match.params.pathId; - - var myChart = echarts.init(document.getElementById('collegeStatistic')); - myChart.showLoading({ - text: "数据获取中", - effect: 'whirling' - }) - - const url = `/paths/${pathId}/school_report.json` - axios.get(url, { - }) - .then((response) => { - // TODO 没用,404返回的error - if (response.data.status == 404) { - this.props.showSnackbar('未找到对应数据,请查看地址是否正确。') - return - } - this.setState({ ...response.data }) - // name: "湖南科技大学潇湘学院", 已通关: 0, 未通关: 4, sum: 4 - /** - "name": "国防科技大学", - "student_count": 9269, - "pass_count": 6061, - "unpass_count": 3208 - */ - const _data = response.data.schools.map( (item, index) => { - return { - name: item.name, - sum: item.student_count, - 已通关: item.pass_count, - 未通关: item.unpass_count, - } - }) - InitCollegeStatistic(_data, myChart); - myChart.hideLoading() - }) - .catch(function (error) { - console.log(error); - }); - } - - render(){ - return( -
    -

    院校学习情况

    -
    -
    - ) - } -} +import React,{ Component } from "react"; +import axios from 'axios'; + +const $ = window.$ +const echarts = require('echarts'); +function InitCollegeStatistic(_data, myChart){ + var data = _data + var _yData = data.map( item => { + return item.name + }) +// [{name: "湖南科技大学潇湘学院", 已通关: 0, 未通关: 4, sum: 4},{name: "长沙理工大学", 已通关: 0, 未通关: 7, sum: 7},{name: "安徽大学", 已通关: 1, 未通关: 8, sum: 9},{name: "湘潭大学兴湘学院", 已通关: 12, 未通关: 0, sum: 12}, +// {name: "湖南师范大学", 已通关: 10, 未通关: 2, sum: 12},{name: "湖南软件职业学院", 已通关: 11, 未通关: 1, sum: 12},{name: "湖南科技大学", 已通关: 91, 未通关: 34, sum: 125},{name: "湘潭大学", 已通关: 110, 未通关: 45, sum: 155}, +// {name: "湖南工业大学", 已通关: 133, 未通关: 41, sum: 174},{name: "国防科技大学", 已通关: 853, 未通关: 23, sum: 876}]; + // <% @schools.each do |s| %> + // data.push({name: "<%= s['name'] %>", '已通关': <%= s['pass_count'] %>, '未通关': <%= s['unpass_count'] %>}); + // <% end %> + + // =================右边要放的字段名及颜色=========== + var items = [{ + key: '学习人数', color: "#29BD8B" + }, { + key: '已通关', color: "#FF954C" + }, { + key: '未通关', color: "#CBCBCB" + }] + + data.forEach((d) => { + var sum = 0 + items.forEach((i) => { + sum += (d[i.key] || 0) + }) + d.sum = sum; + }) + + // =========================排序================ + data.sort((a, b) => a.sum - b.sum) + + var yData = _yData.reverse(); + // ["湖南科技大学潇湘学院", "长沙理工大学", "安徽大学", "湖南软件职业学院", "湖南师范大学", "湘潭大学兴湘学院", "湖南科技大学", "湘潭大学", "湖南工业大学", "国防科技大学"] + + var itemSeries = items.map((d, i) => { + var values = data.map((p) => p[d.key]) + return { + type: 'bar', + name: d.key, + data: values, + stack: 'all', + xAxisIndex: 1, + yAxisIndex: 1, + label: { + normal: { + color:'#FFF', + // show: ( i == 1 ? true :false), + show: true, + position: 'inside' + } + }, + itemStyle: { + normal: { + color: d.color + } + } + } + }) + + var option = { + backgroundColor: '#fff', // 背景 + tooltip : { + trigger: 'axis', + axisPointer : { + type : '' + } + }, + legend: { + data: ['学习人数','已通关','未通关'], + textStyle: { + color: '#05101A' + }, + right:"20px", + selectedMode:false + }, + grid: [{ + right: '56%', + top: '20', + containLabel: true + }, { + left: '45%', + width:'100%', + top: '20', + containLabel: true + }], + xAxis: [{ + type: 'value', + inverse: true, + splitLine: { + show: false + }, + axisLine: { + show: false + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + } + }, { + type: 'value', + gridIndex: 1, + splitLine: { + show: false + }, + axisLine: { + show: false + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + } + }], + yAxis: [{ + type: 'category', + data: yData, + max:10, + axisLine: { + show: false + }, + axisLabel: { + show: false + }, + axisTick: { + show: false + } + }, { + type: 'category', + data: yData, + max:10, + gridIndex: 1, + axisLine: { + show: false + }, + axisTick: { + show: false + } + }], + series: [...itemSeries, + { + name: '总计', + type: 'bar', + data: data.map((d) => d.sum), + xAxisIndex: 1, + yAxisIndex: 1, + barCategoryGap:'40%', + stack: 'all', + label: { + normal: { + show: true, + position: 'inside', + color: '#666' + } + }, + itemStyle: { + normal: { + color: '#fff' + } + } + }, + // ===================左边=================== + { + type: 'bar', + data: data.map((d) => d.sum), + barCategoryGap:'40%', + label: { + normal: { + show: true, + position: 'left', + color: '#29BD8B' + } + }, + itemStyle: { + normal: { + color: '#29BD8B' + } + } + }] + } + myChart.setOption(option); +} +class ThirdTab extends Component{ + constructor(props){ + super(props); + } + + componentDidMount(){ + var pathId = this.props.match.params.pathId; + + var myChart = echarts.init(document.getElementById('collegeStatistic')); + myChart.showLoading({ + text: "数据获取中", + effect: 'whirling' + }) + + const url = `/paths/${pathId}/school_report.json` + axios.get(url, { + }) + .then((response) => { + // TODO 没用,404返回的error + if (response.data.status == 404) { + this.props.showSnackbar('未找到对应数据,请查看地址是否正确。') + return + } + this.setState({ ...response.data }) + // name: "湖南科技大学潇湘学院", 已通关: 0, 未通关: 4, sum: 4 + /** + "name": "国防科技大学", + "student_count": 9269, + "pass_count": 6061, + "unpass_count": 3208 + */ + const _data = response.data.schools.map( (item, index) => { + return { + name: item.name, + sum: item.student_count, + 已通关: item.pass_count, + 未通关: item.unpass_count, + } + }) + InitCollegeStatistic(_data, myChart); + myChart.hideLoading() + }) + .catch(function (error) { + console.log(error); + }); + } + + render(){ + return( +
    +
    院校学习情况
    +
    +
    + ) + } +} export default ThirdTab; \ No newline at end of file From 40e20eba6efeb5226f6360883ad1c9a8bae8d25c Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 20 Sep 2019 08:52:47 +0800 Subject: [PATCH 46/55] fix tiding apply type status --- app/jobs/apply_teacher_role_join_course_notify_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/apply_teacher_role_join_course_notify_job.rb b/app/jobs/apply_teacher_role_join_course_notify_job.rb index 3ae5e32db..ab5a9e354 100644 --- a/app/jobs/apply_teacher_role_join_course_notify_job.rb +++ b/app/jobs/apply_teacher_role_join_course_notify_job.rb @@ -8,7 +8,7 @@ class ApplyTeacherRoleJoinCourseNotifyJob < ApplicationJob return if user.blank? || course.blank? attrs = %i[user_id trigger_user_id container_id container_type belong_container_id - belong_container_type tiding_type extra created_at updated_at] + belong_container_type tiding_type status extra created_at updated_at] same_attrs = { trigger_user_id: user.id, container_id: course.id, container_type: 'JoinCourse', status: 0, From 7bcd2e2c1c2f2d2ff69cca96b3d03ab4f713a147 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 20 Sep 2019 09:03:13 +0800 Subject: [PATCH 47/55] fix tiding --- app/models/course_message.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/course_message.rb b/app/models/course_message.rb index 7774dbf0c..a3578d500 100644 --- a/app/models/course_message.rb +++ b/app/models/course_message.rb @@ -32,6 +32,6 @@ class CourseMessage < ApplicationRecord belong_container: course, extra: content.to_i == 2 ? '9' : '7', tiding_type: 'System', status: deal_status ) # 将申请消息置为已处理 - Tiding.where(trigger_user_id: user_id, container_id: course_id, container_type: 'JoinCourse', status: 0).update_all(status: 1) + Tiding.where(trigger_user_id: course_message_id, container_id: course_id, container_type: 'JoinCourse', status: 0).update_all(status: 1) end end \ No newline at end of file From 7c239e16226606a03fc5dc70be26af6b7285ad73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 20 Sep 2019 09:10:15 +0800 Subject: [PATCH 48/55] =?UTF-8?q?=E8=B0=83=E6=95=B4ec=20=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../subroute/ecStudentList/EcStudentList.js | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js b/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js index 312bfeecf..ead6e4c29 100644 --- a/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js +++ b/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js @@ -39,20 +39,20 @@ class EcStudentList extends Component { let major_id=this.props.match.params.major_id; let year_id=this.props.match.params.year_id; - const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data'; - axios.get(url, { - withCredentials: true, - }).then((response) => { - if(response.status===200){ - this.setState({ - majorschoollist:response.data, - ismanager:response.data.ismanager, - }) - } - }) - .catch(function (error) { - console.log(error); - }); + // const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data'; + // axios.get(url, { + // withCredentials: true, + // }).then((response) => { + // if(response.status===200){ + // this.setState({ + // majorschoollist:response.data, + // ismanager:response.data.ismanager, + // }) + // } + // }) + // .catch(function (error) { + // console.log(error); + // }); // let majorschoollist={ // ec_students: [{index: 1, student_name: "同意", student_id: "s20111458"}, // {index: 1, student_name: "同意", student_id: "s20111458"}, From 178ad8ecdf00865711d87d4f0ca70760ffcbfe03 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 20 Sep 2019 09:10:15 +0800 Subject: [PATCH 49/55] fix tiding --- app/models/student_graduation_topic.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/student_graduation_topic.rb b/app/models/student_graduation_topic.rb index 50f150f92..b8f4dfbbb 100644 --- a/app/models/student_graduation_topic.rb +++ b/app/models/student_graduation_topic.rb @@ -21,7 +21,7 @@ class StudentGraduationTopic < ApplicationRecord def send_tiding self.tidings << Tiding.new(:user_id => self.graduation_topic.tea_id, :trigger_user_id => self.user_id, :parent_container_id => self.graduation_topic_id, :parent_container_type => "GraduationTopic", - :belong_container_id => self.graduation_topic.course_id, :belong_container_type => "Course", :viewed => 0, :status => 0, :tiding_type => "GraduationTopic") + :belong_container_id => self.graduation_topic.course_id, :belong_container_type => "Course", :viewed => 0, :status => 0, :tiding_type => "Apply") end # 学生名称 From 560f4c5e2c8231a3f6cf28f8035ebf1e3b799354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 20 Sep 2019 09:42:20 +0800 Subject: [PATCH 50/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Listofworksstudentone.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index ac2133aab..ec939baeb 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -1451,6 +1451,7 @@ class Listofworksstudentone extends Component { ], yslpros:false, datajs:[], + homework_status:[], } } @@ -1569,7 +1570,8 @@ class Listofworksstudentone extends Component { allow_late:result.data.allow_late, loadingstate: false, computeTimetype:true, - }) + homework_status:result.data.homework_status, + }); this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1); if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { @@ -1626,7 +1628,8 @@ class Listofworksstudentone extends Component { code_review: result.data.code_review, challenges_count:result.data.challenges_count, view_report:result.data.view_report, - }) + homework_status:result.data.homework_status, + }); if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { this.seacthdata(result.data); } else { @@ -2129,7 +2132,8 @@ class Listofworksstudentone extends Component { code_review: result.data.code_review, challenges_count:result.data.challenges_count, view_report:result.data.view_report, - }) + homework_status:result.data.homework_status, + }); this.seacthdata(result.data); this.props.Getdataback(result,result.data); } @@ -2242,7 +2246,8 @@ class Listofworksstudentone extends Component { end_immediately: result.data.end_immediately, code_review: result.data.code_review, challenges_count:result.data.challenges_count, - }) + homework_status:result.data.homework_status, + }); this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page); this.props.Getdataback(result,result.data); // } @@ -3068,6 +3073,7 @@ class Listofworksstudentone extends Component { } return ( + this.props.isAdmin() === true ? (
    From 3073d699936a3d5d96be7c950a9ca9d7ee3f1ffa Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 20 Sep 2019 09:48:03 +0800 Subject: [PATCH 51/55] =?UTF-8?q?tab=E4=B8=8D=E8=BD=AC=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/page/component/monaco/TPIMonaco.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/react/src/modules/page/component/monaco/TPIMonaco.js b/public/react/src/modules/page/component/monaco/TPIMonaco.js index a9820ad27..0d5eb2d34 100644 --- a/public/react/src/modules/page/component/monaco/TPIMonaco.js +++ b/public/react/src/modules/page/component/monaco/TPIMonaco.js @@ -290,6 +290,7 @@ class TPIMonaco extends Component { // theme: "vs-dark", theme: "myCoolTheme", + insertSpaces: false, fontSize: this.state.cmFontSize }); From cdd80e0c09dd34a8d0487a52bab1e495816e2bbe Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 20 Sep 2019 09:59:39 +0800 Subject: [PATCH 52/55] onAttachmentRemove --- .../react/src/modules/courses/busyWork/CommonWorkAppraise.js | 4 +++- .../courses/busyWork/CommonWorkAppraiseReviseAttachments.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js index dc82de540..f41528657 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js @@ -248,7 +248,9 @@ class CommonWorkAppraise extends Component{
    } - + {is_evaluation != true && project_info && project_info.name &&
    diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAppraiseReviseAttachments.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraiseReviseAttachments.js index d12099d38..b487af487 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkAppraiseReviseAttachments.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkAppraiseReviseAttachments.js @@ -33,7 +33,7 @@ function CommonWorkAppraiseReviseAttachments(props) { {item.title} {item.filesize} - {item.delete===true?:""} + {item.delete===true?:""}
    ) })} From 43f055a3cca2cea0bd99db0f5b6ce78be8ac87de Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 20 Sep 2019 10:06:08 +0800 Subject: [PATCH 53/55] =?UTF-8?q?=E8=A1=A5=E4=BA=A4=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=B8=8D=E8=A6=86=E7=9B=96=E4=B8=8A=E6=AC=A1?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_works_controller.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/controllers/student_works_controller.rb b/app/controllers/student_works_controller.rb index ab62cbd45..2612510c5 100644 --- a/app/controllers/student_works_controller.rb +++ b/app/controllers/student_works_controller.rb @@ -321,11 +321,12 @@ class StudentWorksController < ApplicationController ActiveRecord::Base.transaction do begin - revise_attachment = @work.attachments.where(attachtype: 7).reorder("created_on desc").last - if revise_attachment.present? && @work.student_works_scores.where("created_at > '#{revise_attachment.created_on}' - and score is not null").count == 0 - revise_attachment.destroy - end + # 补交作业附件不覆盖之前上传的附件 + # revise_attachment = @work.attachments.where(attachtype: 7).reorder("created_on desc").last + # if revise_attachment.present? && @work.student_works_scores.where("created_at > '#{revise_attachment.created_on}' + # and score is not null").count == 0 + # revise_attachment.destroy + # end Attachment.associate_container(params[:attachment_ids], @work.id, @work.class, 7) revise_attachment = Attachment.where(attachtype: 7, container_id: @work.id, container_type: "StudentWork").last revise_attachment.update_attributes(description: params[:description]) if revise_attachment.present? From 218a2fe51f32218a1fbed2f971c5f9a20564f8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 20 Sep 2019 10:11:15 +0800 Subject: [PATCH 54/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Listofworksstudentone.js | 830 +++++++++--------- 1 file changed, 432 insertions(+), 398 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index ec939baeb..8ae8b9eaf 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -33,6 +33,8 @@ import Startshixuntask from "../coursesPublic/Startshixuntask"; import ModulationModal from "../coursesPublic/ModulationModal"; import HomeworkModal from "../coursesPublic/HomeworkModal"; import ShixunWorkModal from "./Shixunworkdetails/ShixunWorkModal"; +import NoneData from '../../../modules/courses/coursesPublic/NoneData' + const Search = Input.Search; const RadioGroup = Radio.Group; const CheckboxGroup = Checkbox.Group; @@ -3042,7 +3044,7 @@ class Listofworksstudentone extends Component { }) } render() { - let {columns,course_groupysls,datajs,isAdmin, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible,visibles, game_list,columnsstu,columnsstu2, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state; + let {columns,course_groupysls,datajs,isAdmin,homework_status, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible,visibles, game_list,columnsstu,columnsstu2, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state; const antIcon = ; // console.log(this.state.student_works); @@ -3075,88 +3077,94 @@ class Listofworksstudentone extends Component { return ( this.props.isAdmin() === true ? - ( -
    - {visible === true ? this.saveModulationModal(value, num)} - /> : ""} - - {this.state.showmodel === true ? this.hideshowmodel()} - updatas={() => this.isupdatas()} - /> : ""} - - - {visibles === true ? -
    - - this.cancelModulationModels()} - /> - -
    - : "" - } - - {/*立即发布*/} - this.getcourse_groupslist(id)} - starttimes={this.state.starttimes} - typs={this.state.typs} - /> -
    - - -
    - - - + this.cancelModulationModels()} + /> + +
    + : "" + } + + {/*立即发布*/} + this.getcourse_groupslist(id)} + starttimes={this.state.starttimes} + typs={this.state.typs} + /> + { + homework_status.length===0? + + : + homework_status.length>0 && homework_status[0]==="未发布"? + + : +
    + + +
    + + + - {computeTimetype===false?
  • - - + + {computeTimetype===false?
  • + + 正在执行成绩计算,完成后将为您自动刷新结果。温馨提示:执行时间因作品数量而异 -
  • :""} + :""} - {/*作品状态GraduationTaskssettinglist*/} -
      -
    • - 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} + {/*作品状态GraduationTaskssettinglist*/} +
        +
      • + 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} -
        - {course_is_end===true?"": +
        + {course_is_end===true?"": {teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true? (this.props.isNotMember()===false?
        查看最新成绩 @@ -3229,7 +3237,7 @@ class Listofworksstudentone extends Component {
        :"") }
        } - + -
        -
      • - -
      • - - 作品状态: - this.notlimiteds()}>不限 - this.funtaskstatust(e, task_status && task_status)} - style={{paddingTop: '4px'}}> - - {task_status === undefined ? "" : task_status.map((item, key) => { - return ( - +
    + + +
  • + + 作品状态: + this.notlimiteds()}>不限 + this.funtaskstatust(e, task_status && task_status)} + style={{paddingTop: '4px'}}> + + {task_status === undefined ? "" : task_status.map((item, key) => { + return ( + {item.name} @@ -3263,96 +3271,96 @@ class Listofworksstudentone extends Component { - ) - })} - - {/*请输入姓名或学号搜索*/} - - -
  • - - - {/*分班情况*/} - -
  • - {JSON.stringify(course_group_info) === "[]" ? "" : course_group_info === undefined ? "" : course_group_info.length < 2 ? "" : -
    - 分班情况: - this.notlimitedst()}>不限 - this.funtaskstatustwot(e, course_group_info && course_group_info)} - style={{paddingTop: '4px',width:'1017px'}}> - {course_group_info === undefined ? "" : - course_group_info.map((item, key) => { - return ( - + ) + })} + + {/*请输入姓名或学号搜索*/} + + +
  • + + + {/*分班情况*/} + +
  • + {JSON.stringify(course_group_info) === "[]" ? "" : course_group_info === undefined ? "" : course_group_info.length < 2 ? "" : +
    + 分班情况: + this.notlimitedst()}>不限 + this.funtaskstatustwot(e, course_group_info && course_group_info)} + style={{paddingTop: '4px',width:'1017px'}}> + {course_group_info === undefined ? "" : + course_group_info.map((item, key) => { + return ( + {item.group_group_name} ({item.count}) - ) - }) - } - -
    } -
  • + ) + }) + } + +
    } + - + -
    + + { + JSON.stringify(datajs) === "[]" ? + +
    +
    +
    + +

    暂时还没有相关数据哦!

    +
    +
    + +
    + : + +
    + -
    - {datajs === undefined ? "" :
    } - - - } - - - - { - teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? -
    - -
    - : "" - } - - - - ) +
    + {datajs === undefined ? "" :
    } + + + } + + + + { + teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? +
    + +
    + : "" + } + + } + : - ( -
    - { - teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ? - // 学生不能查看别人的 -
    - - {visibles === true ? -
    - - + {visibles === true ? +
    + + - this.cancelModulationModels()} - /> -
    - : "" - } + } + + this.cancelModulationModels()} + /> +
    + : "" + } -
    -
    + { + homework_status.length===0? +
    + +
    + : + homework_status.length>0 && homework_status[0]==="未发布"? +
    + +
    + : - - {computeTimetype===false?
  • - - + + {computeTimetype===false?
  • + + 正在执行成绩计算,完成后将为您自动刷新结果。温馨提示:执行时间因作品数量而异 -
  • :""} + :""} - {JSON.stringify(data) !== "[]" ? -
    -
    + {JSON.stringify(data) !== "[]" ? +
    +
    -
    +
    -
    +
    - 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} - { course_is_end===true?"":teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"": + 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} + { course_is_end===true?"":teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"": {computeTimetype===true? (this.props.isNotMember()===false?
    @@ -3545,14 +3565,14 @@ class Listofworksstudentone extends Component { } } -
    +
    -
    +
    -
    -
    - -
    - {data === undefined ? "" :
    } - - - +
    + {data === undefined ? "" :
    } + + + - : -
    -
    -
    - -

    暂时还没有相关数据哦!

    -
    -
    + : +
    +
    +
    + +

    暂时还没有相关数据哦!

    +
    +
    -
    - } +
    + } - + - + + } + + : + // 学生能查看别人的 +
    + {/*双层*/} + + + {visibles === true ? + this.cancelModulationModels()} + /> : "" + } -
    - : - // 学生能查看别人的 -
    - {/*双层*/} - - - {visibles === true ? - this.cancelModulationModels()} - /> : "" - } -
    + { + homework_status.length===0? +
    + +
    + : + homework_status.length>0 && homework_status[0]==="未发布"? +
    + +
    + : +
    -
    - + - {computeTimetype===false?
  • - - + {computeTimetype===false?
  • + + 正在执行成绩计算,完成后将为您自动刷新结果。温馨提示:执行时间因作品数量而异 -
  • :""} + :""} - -
    - {data === undefined ? "" :
    } - - {JSON.stringify(datas) !== "[]" ? -
    -
    -
    + } + +
    + {data === undefined ? "" :
    } + + {JSON.stringify(datas) !== "[]" ? +
    +
    +
    {teacherdata === undefined ? "0" : teacherdata.commit_count === undefined ? "0" : teacherdata.commit_count} @@ -3698,8 +3730,8 @@ class Listofworksstudentone extends Component { style={{color: '#FF6800'}}>{teacherdata.left_time.time}} - -
    + +
    - 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} - { course_is_end===true?"":teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"": + 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} + { course_is_end===true?"":teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"": {computeTimetype===true? (this.props.isNotMember()===false?
    查看最新成绩 @@ -3756,12 +3788,12 @@ class Listofworksstudentone extends Component {
    :"") }
    } -
    -
    -
    -
    - -
    - {datas === undefined ? "" :
    } +
    + {datas === undefined ? "" :
    } + + + { + teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? +
    + +
    + : "" + } + + : +
    +
    +
    + +

    暂时还没有相关数据哦!

    +
    +
    +
    + } - { - teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? -
    - -
    - : "" } - : -
    -
    -
    - -

    暂时还没有相关数据哦!

    -
    -
    -
    - } - - - + } - ) + ) } From 3abe1610be090ac85a54147e580e5b1bf125c7aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 20 Sep 2019 10:28:19 +0800 Subject: [PATCH 55/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/Studentshavecompletedthelist.js | 623 +++++++++--------- .../exercise/Testpapersettinghomepage.js | 2 +- 2 files changed, 329 insertions(+), 296 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index 60065f43e..bcb8876df 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -22,7 +22,7 @@ import 'moment/locale/zh-cn'; import './yslexercisetable.css'; import {getImageUrl, toPath} from 'educoder'; import CheckBoxGroup from "../../page/component/CheckBoxGroup"; - +import NoneData from '../../../modules/courses/coursesPublic/NoneData' const Search = Input.Search; const RadioGroup = Radio.Group; const CheckboxGroup = Checkbox.Group; @@ -1217,6 +1217,7 @@ class Studentshavecompletedthelist extends Component { ) }, ], + exercise_status:0, } // console.log("Studentshavecompletedthelist"); // console.log(props.current_status); @@ -1277,6 +1278,20 @@ class Studentshavecompletedthelist extends Component { }catch (e) { } + try { + if(this.props.Commonheadofthetestpaper.exercise_status !== undefined){ + this.setState({ + exercise_status:this.props.Commonheadofthetestpaper.exercise_status, + }) + }else{ + this.setState({ + exercise_status:0, + }) + } + }catch (e) { + + } + } componentWillReceiveProps = (nextProps) => { @@ -2065,11 +2080,11 @@ class Studentshavecompletedthelist extends Component { this.setState({ loadingstate: false, }) - console.log(response); - console.log(1997); + // console.log(response); + // console.log(1997); this.Generatenewdatasy(response.data.exercise_users, response); }).catch((error) => { - console.log(error) + // console.log(error) this.setState({ loadingstate: false, }) @@ -2472,7 +2487,7 @@ class Studentshavecompletedthelist extends Component { render() { const isAdmin = this.props.isAdmin(); - let {data, datas, page, columns, course_groupyslsthree, columnstwo, styletable, course_groupyslstwodatas, limit, course_groupysls, course_groupyslstwodata, course_groupyslstwo, teacherlists, Teacherliststudentlist, order, columnss, course_groupsdatas, course_groups, Evaluationarray, unlimited, unlimiteds, unlimitedtwo, teacherlist, searchtext, loadingstate, review, nocomment, commented, unsubmitted, submitted, columnsys, exercise_users,mylistansum} = this.state; + let {data, datas, page, columns, course_groupyslsthree, columnstwo, styletable,exercise_status, course_groupyslstwodatas, limit, course_groupysls, course_groupyslstwodata, course_groupyslstwo, teacherlists, Teacherliststudentlist, order, columnss, course_groupsdatas, course_groups, Evaluationarray, unlimited, unlimiteds, unlimitedtwo, teacherlist, searchtext, loadingstate, review, nocomment, commented, unsubmitted, submitted, columnsys, exercise_users,mylistansum} = this.state; // console.log("Studentshavecompletedthelist"); // console.log(this.props.current_status); return ( @@ -2483,202 +2498,209 @@ class Studentshavecompletedthelist extends Component { " min-width": " 1200px", }}> {/*老师*/} -
    -
      + { + exercise_status===0 || exercise_status===1 ? + + : +
      +
      +
        - {/*你的评阅:*/} - { - Teacherliststudentlist === undefined || Teacherliststudentlist.exercise_types.subjective === 0 ? -
      • - 作品状态: - this.notlimiteds()}>不限 - this.checkeboxstwo(e, course_groupyslstwodata && course_groupyslstwodata)}> - { - course_groupyslstwodata.map((item, key) => { - return ( - {item.tu}({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unanswer_users : Teacherliststudentlist.exercise_types.answer_users}) - ) - }) - } - -
        - this.onSearchKeywordKeyUp(e)} - onInput={this.inputSearchValues} - onSearch={this.searchValues} - > -
        -
      • - : -
        -
      • - 你的评阅: - this.notlimited()}>不限 - - this.checkeboxs(e, course_groupyslstwodata && course_groupyslstwodata)}> - { - course_groupyslstwodatas.map((item, key) => { - return ( - {item.tu}({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unreview_counts : Teacherliststudentlist.exercise_types.review_counts}) - ) - }) - } - -
        - this.onSearchKeywordKeyUp(e)} - onInput={this.inputSearchValues} - onSearch={this.searchValues} - > -
        -
      • - {/*作品状态*/} -
      • - 作品状态: - this.notlimiteds()}>不限 - this.checkeboxstwo(e, course_groupyslstwodata && course_groupyslstwodata)}> - { - course_groupyslstwodata.map((item, key) => { - return ( - {item.tu}({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unanswer_users : Teacherliststudentlist.exercise_types.answer_users}) - ) - }) - } - -
      • -
        + {/*你的评阅:*/} + { + Teacherliststudentlist === undefined || Teacherliststudentlist.exercise_types.subjective === 0 ? +
      • + 作品状态: + this.notlimiteds()}>不限 + this.checkeboxstwo(e, course_groupyslstwodata && course_groupyslstwodata)}> + { + course_groupyslstwodata.map((item, key) => { + return ( + {item.tu}({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unanswer_users : Teacherliststudentlist.exercise_types.answer_users}) + ) + }) + } + +
        + this.onSearchKeywordKeyUp(e)} + onInput={this.inputSearchValues} + onSearch={this.searchValues} + > +
        +
      • + : +
        +
      • + 你的评阅: + this.notlimited()}>不限 + + this.checkeboxs(e, course_groupyslstwodata && course_groupyslstwodata)}> + { + course_groupyslstwodatas.map((item, key) => { + return ( + {item.tu}({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unreview_counts : Teacherliststudentlist.exercise_types.review_counts}) + ) + }) + } + +
        + this.onSearchKeywordKeyUp(e)} + onInput={this.inputSearchValues} + onSearch={this.searchValues} + > +
        +
      • + {/*作品状态*/} +
      • + 作品状态: + this.notlimiteds()}>不限 + this.checkeboxstwo(e, course_groupyslstwodata && course_groupyslstwodata)}> + { + course_groupyslstwodata.map((item, key) => { + return ( + {item.tu}({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unanswer_users : Teacherliststudentlist.exercise_types.answer_users}) + ) + }) + } + +
      • +
        - } - {/*分班情况*/} - {course_groups === undefined ? "" : course_groups === null ? "" : course_groups.length < 2 ? "" : JSON.stringify(course_groups) === "[]" ? "" : -
      • -
    - - - + + + - + + - - } + + } - + - - {JSON.stringify(data) !== "[]" ? -
    - -
    - {data === undefined ? "" :
    分班情况: this.funtaskstatustwos()}>不限 - - this.funtaskstatustwo(e, course_groups && course_groups)} - style={{paddingTop: '4px', display: "inline"}}> - { - course_groups.map((item, key) => { - return ( - {item.exercise_group_name}({item.exercise_group_students}) - ) - }) - } - + } + {/*分班情况*/} + {course_groups === undefined ? "" : course_groups === null ? "" : course_groups.length < 2 ? "" : JSON.stringify(course_groups) === "[]" ? "" : +
  • +
  • 分班情况: this.funtaskstatustwos()}>不限 + + this.funtaskstatustwo(e, course_groups && course_groups)} + style={{paddingTop: '4px', display: "inline"}}> + { + course_groups.map((item, key) => { + return ( + {item.exercise_group_name}({item.exercise_group_students}) + ) + }) + } + -
    } - - +
    + {data === undefined ? "" :
    } + + - : -
    -
    -
    - -

    暂时还没有相关数据哦!

    -
    -
    + : +
    +
    +
    + +

    暂时还没有相关数据哦!

    +
    +
    -
    - } +
    + } - - { - Teacherliststudentlist && Teacherliststudentlist.exercise_types.total_users && Teacherliststudentlist.exercise_types.total_users > limit ? -
    - +
    + { + Teacherliststudentlist && Teacherliststudentlist.exercise_types.total_users && Teacherliststudentlist.exercise_types.total_users > limit ? +
    + +
    + : "" + } - : "" } @@ -2691,16 +2713,20 @@ class Studentshavecompletedthelist extends Component {
    -
    + { + exercise_status === 0 || exercise_status === 1 ? + + : +
    -
    +
    -
    +
    {Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.answer_users}} -
    +
    -
    +
    - {JSON.stringify(datas) === "[]" ? -
    -
    -
    - -

    暂时还没有相关数据哦!

    -
    -
    + {JSON.stringify(datas) === "[]" ? +
    +
    +
    + +

    暂时还没有相关数据哦!

    +
    +
    -
    - : -
    - -
    - {datas === undefined ? "" :
    } - - - } - +
    + {datas === undefined ? "" :
    } + + + } - + + } @@ -2766,10 +2792,15 @@ class Studentshavecompletedthelist extends Component { "padding-bottom": "100px", " min-width": " 1200px" }}> -
    - -
    - {data === undefined ? "" :
    } - - {JSON.stringify(datas) === "[]" ? - -
    -
    -
    - -

    暂时还没有相关数据哦!

    + } + +
    + {data === undefined ? "" :
    } - + {JSON.stringify(datas) === "[]" ? - - : -
    - < div id="graduation_work_list" style={{ - padding: '0px 30px 10px 30px', - "margin-top": "20px", - "margin-bottom": "10px" - }}> - -
    +
    +
    +
    + +

    暂时还没有相关数据哦!

    +
    +
    + +
    + : +
    + < div id="graduation_work_list" style={{ + padding: '0px 30px 10px 30px', + "margin-top": "20px", + "margin-bottom": "10px" + }}> + + - -
    -
    - -
    - {datas === undefined ? "" :
    } - +
    + {datas === undefined ? "" :
    } + - + - } - + } + - { - mylistansum && mylistansum > limit ? -
    - + { + mylistansum && mylistansum > limit ? +
    + +
    + : "" + }
    - : "" } diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js index 5775bd240..ba3cee3d3 100644 --- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js +++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js @@ -436,7 +436,7 @@ class Testpapersettinghomepage extends Component{ /> { // 教师列表 - parseInt(tab[0])==0 && this.setcourse_groupysls(value)} current_status = {this.state.current_status}> + parseInt(tab[0])==0 && this.setcourse_groupysls(value)} current_status = {this.state.current_status} Commonheadofthetestpaper={this.state.Commonheadofthetestpaper}> } {/*统计结果*/}