From 406d026e0d02e0a2e0fcf9891a8083d3ede884a9 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 17 Aug 2019 09:56:13 +0800 Subject: [PATCH 01/77] =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E9=83=A8=E5=88=86=E5=AF=BC=E5=85=A5=E6=8C=89=E9=92=AE=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E8=BF=87=E9=95=BF=E5=8A=A0=E4=B8=8A=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/index.js | 2 +- .../ecCourseEvaluations.js | 560 +++++++++--------- 2 files changed, 286 insertions(+), 276 deletions(-) diff --git a/public/react/src/index.js b/public/react/src/index.js index 55cebf17..98130846 100644 --- a/public/react/src/index.js +++ b/public/react/src/index.js @@ -41,7 +41,7 @@ var proxy = "http://localhost:3000" // proxy = "http://testbdweb.trustie.net" // proxy = "http://testbdweb.educoder.net" // proxy ="http://192.168.2.63:3000" - proxy='http://120.27.231.56:48080' + proxy='http://47.96.87.25:48080' const requestMap={}; // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; // 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制 diff --git a/public/react/src/modules/ec/ecCourseEvaluations/ecCourseEvaluations.js b/public/react/src/modules/ec/ecCourseEvaluations/ecCourseEvaluations.js index c3e45ce9..8f091f7b 100644 --- a/public/react/src/modules/ec/ecCourseEvaluations/ecCourseEvaluations.js +++ b/public/react/src/modules/ec/ecCourseEvaluations/ecCourseEvaluations.js @@ -55,7 +55,8 @@ class ecCourseEvaluations extends Component { isreload:false, newModallist:false, isreloads:false, - isSpin:false + isSpin:false, + listSpin:false } } componentWillMount(){ @@ -91,7 +92,8 @@ class ecCourseEvaluations extends Component { let newec_course_id=this.props.match.params.ec_course_id; this.setState({ - ec_course_id:newec_course_id + ec_course_id:newec_course_id, + listSpin:true }) const url = `/ec_course_evaluations?ec_course_id=`+newec_course_id; axios.get(url, { @@ -111,7 +113,8 @@ class ecCourseEvaluations extends Component { course_url:response.data.course_url, ec_course_id:response.data.ec_course_id, ec_year_id:response.data.ec_year_id, - ecmanager: response.data.is_manager + ecmanager: response.data.is_manager, + listSpin:false }) } }).catch(function (error) { @@ -565,6 +568,7 @@ class ecCourseEvaluations extends Component { } sync_course_data=()=>{ + this.setState({listSpin:true}) let ec_course_id=this.props.match.params.ec_course_id; let Url ='/ec_course_achievement_methods/sync_course_data'; axios.post(Url, { @@ -578,14 +582,16 @@ class ecCourseEvaluations extends Component { this.setState({ // titlemessage: response.data.message+"(支撑关系变更)", Modallist: response.data.message, - Modallisttype:true + Modallisttype:true, + listSpin:false }) this.UpdateEvaluations(); }else if(response.data.status===-1){ this.setState({ // titlemessage: response.data.message+"(支撑关系变更)", Modallist: response.data.message, - Modallisttype:true + Modallisttype:true, + listSpin:false }) } @@ -596,6 +602,7 @@ class ecCourseEvaluations extends Component { } uploadfile=(file)=>{ + this.setState({listSpin:true}) let Url =`/ec_course_evaluations/`+file.data+`/import_score`; const form = new FormData(); form.append('file', file.file); @@ -608,7 +615,8 @@ class ecCourseEvaluations extends Component { Modallist: '已成功导入'+response.data.count+"条数据", Modallisttype:true, isreload:true, - isreloads:true + isreloads:true, + listSpin:false }) }else if(response.data.status===0){ // message.warning(response.data.message); @@ -617,7 +625,8 @@ class ecCourseEvaluations extends Component { Modallist:response.data.message, Modallisttype:true, isreload:false, - isreloads:false + isreloads:false, + listSpin:false }) } }).catch((error) => { @@ -657,6 +666,7 @@ class ecCourseEvaluations extends Component { saveassclasslist=()=>{ // 列表清空 //搜索框清空 + this.setState({isSpin:true}); let{checkevalue}=this.state; let ec_course_id=this.props.match.params.ec_course_id; @@ -673,7 +683,8 @@ class ecCourseEvaluations extends Component { this.setState({ Modallist: "关联失败", Modallisttype:true, - isreload:false + isreload:false, + isSpin:false }) }else if(response.data.status===0)[ this.setState({ @@ -683,7 +694,8 @@ class ecCourseEvaluations extends Component { assclassvalue:"", Modallist: "关联成功", Modallisttype:true, - isreload:true + isreload:true, + isSpin:false }) ] @@ -767,6 +779,7 @@ class ecCourseEvaluations extends Component { return (
+ } spinning={this.state.isSpin}> 关联课堂11s + >关联课堂
- -
- -

- - 名称 - 考核次数 - 支撑关系 - 考核分项名称 - - {/* 操作 */} - {ecmanager===false?"": - - - } - - - - 成绩导入状态 - - - 成绩来源 - - - 平均成绩导入模板 - - - 明细成绩导入模板 - -

-
- { - ec_course_evaluation_lists===undefined? }/>:ec_course_evaluation_lists.map((list,m)=>{ + +
+

+ + 名称 + 考核次数 + 支撑关系 + 考核分项名称 + + {/* 操作 */} + {ecmanager===false?"": + + + } + + + + 成绩导入状态 + + + 成绩来源 + + + 平均成绩导入模板 + + + 明细成绩导入模板 + +

+ } spinning={this.state.listSpin}> +
+ { + ec_course_evaluation_lists && ec_course_evaluation_lists.map((list,m)=>{ + + return( +
  • + {m+1} + +
    {list.name}
    +
    + +
    {list.evluation_count}
    +
    + +
    {list.status===1?"总成绩支撑":list.status===2?"分项成绩支撑":list.status}
    +
    + + + { + list.subitems.map((listchild,mk)=>{ + return ( + +
    {listchild.name} +
    +
    + ) + }) - return( -
  • - {m+1} - -
    {list.name}
    -
    - -
    {list.evluation_count}
    -
    - -
    {list.status===1?"总成绩支撑":list.status===2?"分项成绩支撑":list.status}
    -
    - - - { - list.subitems.map((listchild,mk)=>{ - return ( - -
    {listchild.name} -
    -
    - ) - }) - - } -
    - - - {/*style={{display:list.is_course_type===false?'inline-block':'none'}}*/} - {/* editSubentry 编辑的 */} - -
    -
    - - - - -
    -
    您确定要删除吗?
    -
    -
    - 取消 - 确定 -
    -
    - - - -
    -
    -
    - - - -
    - 模板下载 -
    - - -
    -
    - - - -
    模板下载
    -
    -
    - - -
    -
    - - + + + {/*style={{display:list.is_course_type===false?'inline-block':'none'}}*/} + {/* editSubentry 编辑的 */} + +
    +
    + + + + - {ecmanager===false?成绩导入:成绩导入} - - +
    +
    您确定要删除吗?
    +
    +
    + 取消 + 确定 +
    +
    + + +
    -
    + + + +
    + 模板下载 +
    + - {ecmanager===false?"" - : -
    {list.import_status===true||list.is_course_type?"已导入":"未导入"}
    -
    } +
    +
    + + +
    模板下载
    +
    +
    -
    + +
    +
    + + + {ecmanager===false?成绩导入:成绩导入} + + +
    +
    +
    - { - params===" " ? " " : params.map((item,key)=>{ + {ecmanager===false?"" + : +
    {list.import_status===true||list.is_course_type?"已导入":"未导入"}
    +
    } - return ( -
    -
    - -
    - 名称 - - - 考核次数 - - - - - 由单次考核总成绩支撑课程目标 -
    - 由单次考核的某分项成绩支撑课程目标 -
    -
    -
    -
    - { - item.subitems.map((i,k)=>{ - return( -
    - 考核分项名称 - - - -
    - - - - - - - -
    -
    -
    - ) - }) - } +
    -
    + { -
    -
    保存
    -
    取消
    + params===" " ? " " : params.map((item,key)=>{ + + return ( +
    +
    + +
    + 名称 + + + 考核次数 + + + + + 由单次考核总成绩支撑课程目标 +
    + 由单次考核的某分项成绩支撑课程目标 +
    +
    +
    + +
    + { + item.subitems.map((i,k)=>{ + return( +
    + 考核分项名称 + + + +
    + + + + + + + +
    +
    +
    + ) + }) + } + +
    + +
    +
    保存
    +
    取消
    +
    + {Modallist}
    - {Modallist} -
    - ) - }) - } + ) + }) + } -
    +
    -
  • - ) - }) - } + + ) + }) + } - {ecmanager===false?"":
    + {ecmanager===false?"":
    - { + { - params===" " ? " " : params.map((item,key)=>{ + params===" " ? " " : params.map((item,key)=>{ - return ( -
    -
    + return ( +
    +
    -
    - 名称 - +
    + 名称 + - 考核次数 - + 考核次数 + + + + + 由单次考核总成绩支撑课程目标 +
    + 由单次考核的某分项成绩支撑课程目标 +
    +
    +
    - - - 由单次考核总成绩支撑课程目标
    - 由单次考核的某分项成绩支撑课程目标 -
    -
    + { + item.subitems.map((i,k)=>{ + return( +
    + 考核分项名称 + + + +
    + + + + + + +
    - -
    - { - item.subitems.map((i,k)=>{ - return( -
    - 考核分项名称 - - - -
    - - - - - - - -
    -
    -
    - ) - }) - } -
    - {/* 新建 */} -
    保存
    -
    取消
    + +
    + ) + }) + } +
    + {/* 新建 */} +
    保存
    +
    取消
    +
    + {Modallist}
    - {Modallist} -
    -
    - ) - }) - } -
    - } -
    +
    + ) + }) + } +
    + } +
    +
    -
    - -
    - +
    {/**/} - - +
    ); } From a37f92531e26ff9cf78a4325424d27393b1ab854 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 17 Aug 2019 10:31:49 +0800 Subject: [PATCH 02/77] =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E8=AE=A4=E8=AF=81-?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E4=BD=93=E7=B3=BB-=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=99=84=E4=BB=B6=E6=97=B6=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/attachments.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index 0275558c..ba201074 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -502,8 +502,11 @@ function imageAddInputFiles(inputEl){ addInputFiles(inputEl) } -function addInputFiles(inputEl,btnId) { +function addInputFiles(inputEl,btnId) { // var clearedFileInput = $(inputEl).clone().val(''); + if($("#ajax-indicator").length>0){ + $("#ajax-indicator").show(); + } if (inputEl.files) { // if(inputEl.files.length >= 5){ // alert('一次选择的文件不能超过5个') @@ -527,6 +530,9 @@ function addInputFiles(inputEl,btnId) { if (count <= 0) count = 1; $('#upload_file_count').html("" + count + "" + $(inputEl).data('fileCount')); } + if($("#ajax-indicator").length>0){ + $("#ajax-indicator").hide(); + } } //clearedFileInput.insertAfter('#attachments_fields'); @@ -605,6 +611,9 @@ function uploadAndAttachFiles(files, inputEl,btnId) { addFile(inputEl, this, true,btnId); }); } + if($("#ajax-indicator").length>0){ + $("#ajax-indicator").hide(); + } } function uploadAndAttachFiles_board(files, inputEl, id,btnId) { From 9ca131d16088b1ef1d536e8813d54f4606ea87d0 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 17 Aug 2019 11:04:28 +0800 Subject: [PATCH 03/77] =?UTF-8?q?=E7=AB=9E=E8=B5=9B-=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=A0=87=E6=B3=A8=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../competitions/_gq_second_code_competition.html.erb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/views/competitions/_gq_second_code_competition.html.erb b/app/views/competitions/_gq_second_code_competition.html.erb index 4e6ecdd5..7cba08a8 100644 --- a/app/views/competitions/_gq_second_code_competition.html.erb +++ b/app/views/competitions/_gq_second_code_competition.html.erb @@ -76,13 +76,13 @@ extra_data = [ { name: 'C++项目', - description: "本项目的paddle/fluid/operators/optimizers目录中包含了常见的优化器(如,Momentum,Adam等等)的c++实现。", + description: "飞桨(PaddlePaddle)由百度公司开发,是目前国内唯一功能完备的端到端开源深度学习平台,集深度学习训练和预测框架、模型库、工具组件、服务平台为一体,其兼具灵活和效率的开发机制、工业级应用效果的模型、超大规模并行深度学习能力、推理引擎一体化设计以及系统化的服务支持,致力于让深度学习技术的创新与应用更简单。
    本项目的paddle/fluid/operators/optimizers目录中包含了常见的优化器(如,Momentum,Adam等等)的c++实现。", task: '标注../fluid/operators/optimizers/目录下的所有代码文件', link_name: '官方,优化器', link_url: 'https://www.paddlepaddle.org.cn/documentation/docs/zh/1.5/api_guides/low_level/optimizer.html' },{ name: 'Python项目', - description: "本项目的python/paddle/fluid/layers/nn.py中包含了神经网络中大量常见层和操作符的python实现,如fc、conv、gru等等。", + description: "飞桨(PaddlePaddle)由百度公司开发,是目前国内唯一功能完备的端到端开源深度学习平台,集深度学习训练和预测框架、模型库、工具组件、服务平台为一体,其兼具灵活和效率的开发机制、工业级应用效果的模型、超大规模并行深度学习能力、推理引擎一体化设计以及系统化的服务支持,致力于让深度学习技术的创新与应用更简单。
    本项目的python/paddle/fluid/layers/nn.py中包含了神经网络中大量常见层和操作符的python实现,如fc、conv、gru等等。", task: '标注../paddle/fluid/layers/nn.py代码文件', link_name: '官方,nn', link_url: 'https://www.paddlepaddle.org.cn/documentation/docs/zh/1.5/api_cn/layers_cn/nn_cn.html' @@ -152,10 +152,6 @@ <% if index == 4 %> -

    - 飞桨(PaddlePaddle)由百度公司开发,是目前国内唯一功能完备的端到端开源深度学习平台,集深度学习训练和预测框架、模型库、工具组件、服务平台为一体,其兼具灵活和效率的开发机制、工业级应用效果的模型、超大规模并行深度学习能力、推理引擎一体化设计以及系统化的服务支持,致力于让深度学习技术的创新与应用更简单。 -

    -