From 9daaec83c02222281d7af280407a22019bb3ce11 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, 8 Jan 2020 09:52:52 +0800 Subject: [PATCH 01/23] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=BA=95=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/login/EducoderInteresse.js | 4 ++- .../react/src/modules/login/EducoderLogin.js | 28 +++---------------- public/react/src/modules/login/Otherlogin.js | 19 ++----------- public/react/src/modules/tpm/NewFooter.js | 7 ++--- 4 files changed, 12 insertions(+), 46 deletions(-) diff --git a/public/react/src/modules/login/EducoderInteresse.js b/public/react/src/modules/login/EducoderInteresse.js index 75f2c7059..5f62153c3 100644 --- a/public/react/src/modules/login/EducoderInteresse.js +++ b/public/react/src/modules/login/EducoderInteresse.js @@ -6,6 +6,8 @@ import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png'; import educodernet from '../../../src/images/login/educodernet.png'; import InterestpageComponent from '../user/Interestpage' import InterestpageComponentMax from '../user/InterestpageMax' +import moment from 'moment'; + //educoder登入页面 var newContainer={ @@ -78,7 +80,7 @@ class EducoderInteresse extends Component { justifyContent: "center", width: "100%", }}> -
© 2019 EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
+
© {moment().year()} EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
diff --git a/public/react/src/modules/login/EducoderLogin.js b/public/react/src/modules/login/EducoderLogin.js index 123b2f2a0..5663c69c8 100644 --- a/public/react/src/modules/login/EducoderLogin.js +++ b/public/react/src/modules/login/EducoderLogin.js @@ -1,26 +1,6 @@ import React, {Component} from "react"; -import { - Form, - Select, - Input, - Button, - Checkbox, - Upload, - Icon, - message, - Modal, - Table, - Divider, - InputNumber, - Tag, - DatePicker, - Radio, - Tooltip, - notification -} from "antd"; -import {Link, Switch, Route, Redirect} from 'react-router-dom'; +import moment from 'moment'; import { SnackbarHOC,getImageUrl } from 'educoder'; -import { TPMIndexHOC } from '../tpm/TPMIndexHOC'; import '../courses/css/members.css'; import "../courses/common/formCommon.css" import '../courses/css/Courses.css'; @@ -201,21 +181,21 @@ class EducoderLogin extends Component { justifyContent: "center", width: "100%", }}> -
© 2019 EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
+
© {moment().year()} EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
: this.props.mygetHelmetapi===undefined||this.props.mygetHelmetapi.main_site===null|| this.props.mygetHelmetapi.main_site===undefined?
-
© 2019 EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
+
© {moment().year()} EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
:this.props.mygetHelmetapi.main_site===true?
-
© 2019 EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
+
© {moment().year()} EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
:"" } diff --git a/public/react/src/modules/login/Otherlogin.js b/public/react/src/modules/login/Otherlogin.js index 59710ab2f..75874ee18 100644 --- a/public/react/src/modules/login/Otherlogin.js +++ b/public/react/src/modules/login/Otherlogin.js @@ -1,33 +1,18 @@ import React, {Component} from "react"; import { - Form, - Select, Input, Button, - Checkbox, - Upload, - Icon, - message, - Modal, - Table, Divider, - InputNumber, - Tag, - DatePicker, - Radio, - Tooltip, - notification, Layout, Spin } from "antd"; import axios from 'axios'; +import moment from 'moment'; import { getImageUrl } from 'educoder' -import {Link, Switch, Route, Redirect} from 'react-router-dom'; import '../courses/css/members.css'; import "../courses/common/formCommon.css" import '../courses/css/Courses.css'; import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png'; -import educodernet from '../../../src/images/login/educodernet.png'; const { Header, Footer, Sider, Content } = Layout; //educoder登入页面 var sectionStyle = { @@ -294,7 +279,7 @@ class Otherlogin extends Component { justifyContent: "center", width: "100%", }}> -
© 2019 EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
+
© {moment().year()} EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
diff --git a/public/react/src/modules/tpm/NewFooter.js b/public/react/src/modules/tpm/NewFooter.js index 1b4ed2c00..9a69d522b 100644 --- a/public/react/src/modules/tpm/NewFooter.js +++ b/public/react/src/modules/tpm/NewFooter.js @@ -1,8 +1,7 @@ import React, { Component } from 'react'; -import { Redirect } from 'react-router'; +import moment from 'moment'; import { Link } from 'react-router-dom'; -import { getImageUrl, toPath } from 'educoder' -import PropTypes from 'prop-types'; + class NewFooter extends Component { constructor(props) { @@ -58,7 +57,7 @@ class NewFooter extends Component { {this.props.mygetHelmetapi === null ? "" : this.props.mygetHelmetapi===undefined|| this.props.mygetHelmetapi.footer===null||this.props.mygetHelmetapi.footer===undefined?

- © 2019 EduCoder + © {moment().year()} EduCoder 湘ICP备17009477号 湘公网安备43019002000962号 From 8c08d52a5f4a1feee68a479cf56cbb28f61040da Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 8 Jan 2020 10:11:06 +0800 Subject: [PATCH 02/23] =?UTF-8?q?=E6=95=8F=E6=84=9F=E8=AF=8D=E6=B1=87?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 54aa8d85e..f1b8c3d23 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -723,8 +723,8 @@ class User < ApplicationRecord end def validate_sensitive_string - raise("真实姓名包含敏感词汇,请重新输入") unless HarmoniousDictionary.clean?(lastname) - raise("昵称包含敏感词汇,请重新输入") unless HarmoniousDictionary.clean?(nickname) + raise("真实姓名包含敏感词汇,请重新输入") if lastname && !HarmoniousDictionary.clean?(lastname) + raise("昵称包含敏感词汇,请重新输入") if nickname && !HarmoniousDictionary.clean?(nickname) end def set_laboratory From 778025223073c58f5b6705572a895ca2b5213252 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, 8 Jan 2020 10:31:51 +0800 Subject: [PATCH 03/23] =?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/config/webpack.config.dev.js | 2 +- .../tasks/GraduationTaskssettinglist.js | 32 +++++++++++++------ 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js index d1092894a..b3c1cea5b 100644 --- a/public/react/config/webpack.config.dev.js +++ b/public/react/config/webpack.config.dev.js @@ -30,7 +30,7 @@ const env = getClientEnvironment(publicUrl); module.exports = { // You may want 'eval' instead if you prefer to see the compiled output in DevTools. // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s - //devtool: "cheap-module-eval-source-map", + //devtool: "cheap-module-eval-source-map", // 开启调试 //devtool: "source-map", // 开启调试 // These are the "entry points" to our application. diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 24c69ab85..62d0bbef2 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -231,8 +231,19 @@ class GraduationTaskssettinglist extends Component{ funteachercomment=(list,key)=> { // console.log(e.target.value) let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search} = this.state; + if(this.state.teacher_comment!=null&&list.length>0){ + if(this.state.teacher_comment.length>0){ + list.map((item,key)=>{ + this.state.teacher_comment.map((k,y)=>{ + if(item===k){ + list.splice(key, 1) + } + }) + }) + } + } - let listype =list instanceof Array; + let listype =list instanceof Array; if(listype===false){ this.setState({ teacher_comment:null, @@ -246,14 +257,17 @@ class GraduationTaskssettinglist extends Component{ } - if(list.length===key){ - this.seacthdata(undefined, task_status, course_group, cross_comment, order, b_order, search,this.state.page); - this.props.getsonar(undefined, task_status, course_group, cross_comment, search) - }else{ - this.seacthdata(list[0], task_status, course_group, cross_comment, order, b_order, search,this.state.page); - this.props.getsonar(list[0], task_status, course_group, cross_comment, search) - } + this.seacthdata(list.length===0?undefined:list[0], task_status, course_group, cross_comment, order, b_order, search,this.state.page); + this.props.getsonar(list.length===0?undefined:list[0], task_status, course_group, cross_comment, search) + // if(list.length===key){ + // this.seacthdata(undefined, task_status, course_group, cross_comment, order, b_order, search,this.state.page); + // this.props.getsonar(undefined, task_status, course_group, cross_comment, search) + // }else{ + // this.seacthdata(list[0], task_status, course_group, cross_comment, order, b_order, search,this.state.page); + // this.props.getsonar(list[0], task_status, course_group, cross_comment, search) + // + // } } @@ -1348,7 +1362,7 @@ class GraduationTaskssettinglist extends Component{ 全部 - this.funteachercomment(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.length)} style={{ paddingTop: '4px'}}> + this.funteachercomment(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.length)} style={{ paddingTop: '4px'}}> {taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.map((item,key)=>{ return( From d4143d9cde5fea49a90730a3382331038bee8fda Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 8 Jan 2020 11:40:41 +0800 Subject: [PATCH 04/23] =?UTF-8?q?=E6=95=8F=E6=84=9F=E8=AF=8D=E6=B1=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chinese_dictionary.txt | 136 +----------------- config/harmonious_dictionary/harmonious.hash | Bin 48913 -> 46347 bytes 2 files changed, 2 insertions(+), 134 deletions(-) diff --git a/config/harmonious_dictionary/chinese_dictionary.txt b/config/harmonious_dictionary/chinese_dictionary.txt index 3040d9d0e..ce247eb45 100644 --- a/config/harmonious_dictionary/chinese_dictionary.txt +++ b/config/harmonious_dictionary/chinese_dictionary.txt @@ -10,26 +10,21 @@ 李源潮 李干成 戴秉国 -黄镇 刘延东 刘瑞龙 俞正声 -黄敬 薄熙来 薄一波 周小川 周建南 温云松 -徐明 江绵康 李小鹏 李小琳 朱云来 让国人愤怒的第二代身份证 -第二代身份证 文化大革命 胡海峰 -六四 陈良宇 老丁 莱仕德事件 @@ -68,11 +63,9 @@ PK黑社会 反华 官商勾结 升达毕业证 -手机复制 戴海静 自杀指南 自杀手册 -张小平 佳静安定片 蒙汗药粉 古方迷香 @@ -105,7 +98,6 @@ PK黑社会 反政府 禁书 特码 -成人 国民党 贪污 骚妇 @@ -154,7 +146,6 @@ PK黑社会 AV 十八禁 性虐待 -激情 耽美 金瓶梅 藏春阁 @@ -181,15 +172,13 @@ AV 政府无能 九评 十七大代表 -办证 暴力拆迁 轮暴致死 -人民报 暴力镇压 高干子弟名单 性免费电影 全裸 -偷 拍 +偷拍 中共十七大 徐和柴学友 修炼之歌 @@ -250,7 +239,6 @@ A集中营 中共特务 乙醚 党内分裂 -新生网 圆明网 和平修炼 放下生死 @@ -303,10 +291,6 @@ A集中营 明慧周刊 九评共产党 江泽民其人 -秘密文件 -机密文件 -红头文件 -政府文件 破网软件 无界浏览 亲共来源 @@ -341,7 +325,6 @@ H漫画 香港GHB水 色空寺 周容重 -朱蒙 汕頭頻傳擄童割器官 法輪功 六决不 @@ -371,15 +354,12 @@ H漫画 敢坐飞机吗 韩国身份证 台湾身份证 -广电总局 学生暴动 镇压学生 广安第二人民医院 -山不过来 胡新宇 趙紫陽 自由亚州 -明慧 践踏中国女性 拉凳 南京大学法学院 @@ -389,7 +369,6 @@ H漫画 崔英杰 松花江污染 火药制作 -江氏 第十六次代表 仁寿警方 愈快乐愈堕落 @@ -433,7 +412,6 @@ H漫画 二奶 2奶 纪股票市场五卅惨案 -这年头就这样 代开普通发票 代开商品发票 代开国税发票 @@ -487,7 +465,6 @@ H漫画 死刑过程 学生与警察 鬼村 -周容 重题工 先烈的电电 身份证生成 @@ -509,17 +486,14 @@ H漫画 生成身份证 华国锋 叶剑英 -陈云 李先念 汪东兴 韦国清 乌兰夫 -方毅 刘伯承 许世友 纪登奎 苏振华 -吴德 余秋里 张廷发 陈永贵 @@ -528,15 +502,12 @@ H漫画 聂荣臻 倪志福 徐向前 -彭冲 -王震 邓颖超 杨尚昆 杨得志 宋任穷 胡乔木 胡耀邦 -彭真 廖承志 秦基伟 陈慕华 @@ -549,21 +520,16 @@ H漫画 芮杏文 杨白冰 邹家华 -谢非 谭绍文 王汉斌 任建新 于永波 傅全有 -吴仪 -王克 王乐泉 王兆国 -刘淇 刘云山 张立昌 张德江 -王刚 隐形耳机 隐形摄像头 裸聊 @@ -629,11 +595,7 @@ a级情片 藏独 曹长青 曹刚川 -柴玲 -常劲 陈炳基 -陈军 -陈蒙 陈破空 陈希同 陈小同 @@ -641,17 +603,13 @@ a级情片 陈一谘 陈总统 程铁军 -程真 迟浩田 持不同政见 赤匪 赤化 达赖 大参考 -大法 大纪园 -大家论坛 -大史记 大史纪 戴相龙 弹劾 @@ -663,7 +621,6 @@ a级情片 电视流氓 钓鱼岛 丁关根 -丁元 丁子霖 东北独立 东社 @@ -702,7 +659,6 @@ a级情片 炼功 李总统 李登辉 -李鹏 李瑞环 吐血 18禁 @@ -828,7 +784,6 @@ A片 薄格 調教 乱伦 -偷拍 更衣 無修正 虐待 @@ -854,16 +809,12 @@ A片 伊東 武藤蘭 叶子楣 -舒淇 -麻衣 櫻井 風花 星野桃 -宝来 桜田 藤井彩 小森美王 -平井 桃井望 榊彩弥 桜井 @@ -876,7 +827,6 @@ A片 長瀬愛 中野千夏 春菜 -望月 岡崎美女 宮下杏奈 加藤 @@ -884,24 +834,12 @@ A片 北島優 一本道 夜勤病栋 -三个代表 -一党 -多党 -民主 -专政 避孕套 你妈逼 大鸡巴 政治 -洪志 -红志 -洪智 -红智 -民运 -王丹 卖春 买春 -天安门 朱容基 朱镕基 温家宝 @@ -915,14 +853,12 @@ A片 黑社会 夜总会 妈个 -公款 坐台 腐败 城管 暴动 李远哲 司法警官 -高干 尉健行 李岚清 黄丽满 @@ -938,19 +874,10 @@ A片 吴邦国 曾庆红 黄菊 -罗干 吴官正 贾庆林 专制 -三個代表 -一黨 -多黨 -專政 大紀元 -紅志 -紅智 -李鵬 -天安門 江澤民 朱鎔基 李長春 @@ -963,9 +890,7 @@ A片 溫家寶 吳邦國 曾慶紅 -黃菊 賈慶林 -專制 反人类 反社会 方励之 @@ -984,12 +909,10 @@ A片 付申奇 傅申奇 傅志寰 -高官 高文谦 高薪养廉 高瞻 高自联 -戈扬 鸽派 个人崇拜 工自联 @@ -1000,10 +923,8 @@ A片 共军 关卓中 贯通两极法 -广闻 郭伯雄 郭罗基 -郭平 郭岩华 国家安全 国家机密 @@ -1017,13 +938,11 @@ A片 红色恐怖 宏法 洪传 -洪吟 洪哲胜 胡紧掏 胡锦滔 胡锦淘 胡景涛 -胡平 胡总书记 护法 花花公子 @@ -1046,9 +965,7 @@ A片 江core 江八点 江流氓 -江罗 江绵恒 -江青 江戏子 江则民 江泽慧 @@ -1064,9 +981,7 @@ A片 教养院 揭批书 金尧如 -锦涛 禁看 -经文 开放杂志 抗议 邝锦文 @@ -1079,8 +994,6 @@ A片 李洪宽 李继耐 李兰菊 -李录 -李禄 李少民 李淑娴 李旺阳 @@ -1099,16 +1012,13 @@ A片 林长盛 林樵清 林慎立 -凌锋 刘宾深 刘宾雁 -刘刚 刘国凯 刘华清 刘俊国 刘凯中 刘千石 -刘青 刘山青 刘士贤 刘文胜 @@ -1153,17 +1063,12 @@ A片 潘国平 泡沫经济 迫害 -祁建 -齐墨 -钱达 钱国梁 钱其琛 抢粮记 -乔石 亲美 钦本立 情妇 -庆红 热比娅 热站政论网 人民内情真相 @@ -1174,11 +1079,8 @@ A片 上海帮 邵家健 神通加持法 -沈彤 升天 盛华仁 -盛雪 -石戈 时代论坛 时事论坛 世界经济导报 @@ -1191,7 +1093,6 @@ A片 司徒华 斯诺 四川独立 -宋平 宋书元 苏绍智 苏晓康 @@ -1204,11 +1105,9 @@ A片 太子党 汤光中 唐柏桥 -唐捷 滕文生 天怒 天葬 -童屹 统独 统独论坛 统战 @@ -1216,10 +1115,8 @@ A片 外交与方略 万润南 万晓东 -汪岷 王宝森 王炳章 -王策 王超华 王辅臣 王涵万 @@ -1246,11 +1143,9 @@ A片 吴学璨 吾尔开希 五不 -伍凡 洗脑 项怀诚 项小吉 -肖强 邪恶 谢长廷 谢选骏 @@ -1269,10 +1164,7 @@ A片 徐匡迪 徐水良 许家屯 -薛伟 学潮 -学联 -学运 学自联 雪山狮子 严家其 @@ -1282,13 +1174,9 @@ A片 央视内部晚会 杨怀安 杨建利 -杨巍 杨月清 -杨周 姚月谦 一中一台 -义解 -亦凡 异见人士 异议人士 易丹轩 @@ -1296,38 +1184,27 @@ A片 尹庆民 由喜贵 游行 -幼齿 于大海 于浩成 余英时 舆论反制 宇明网 远志明 -岳武 -则民 -择民 -泽民 贼民 曾培炎 张伯笠 -张钢 张宏堡 -张健 -张林 张万年 张伟国 张昭富 张志清 赵海青 -赵南 赵品潞 赵晓微 赵紫阳 -哲民 镇压 争鸣论坛 正见网 -郑义 正义党论坛 换妻 真木加美 @@ -1350,12 +1227,9 @@ A片 东京热 菅野亚梨沙 吉岡美穗 -红音 原千寻 熟女 轮奸 -朱琳 -朱毛 朱溶剂 猪聋畸 猪毛 @@ -1373,7 +1247,6 @@ A片 fa轮 亲日 汉奸 -政权 政治反对派 政治犯 支那 @@ -1392,9 +1265,7 @@ fa轮 周锋锁 周天法 陈水扁 -周旋 朱嘉明 -阿扁 二逼 小鸡鸡 卖逼 @@ -1436,7 +1307,6 @@ fa轮 喷你 操逼 淫水 -他妈 操比 杂种 他母亲 @@ -1499,13 +1369,11 @@ B样 北美自由论坛 博讯 蔡崇国 -程凯 大纪元新闻网 大众真人真事 东南西北论谈 封杀 -何勇 江猪媳 酱猪媳 枪支 -毒品 +毒品 \ No newline at end of file diff --git a/config/harmonious_dictionary/harmonious.hash b/config/harmonious_dictionary/harmonious.hash index 9ce3b2f93690dda331a3df2e4e06990a362ffef1..456a8254b258a810b2e661f5130946a71a39a915 100644 GIT binary patch delta 1259 zcmXX_X-rgC810>f_a3t%LmUPjEZVZqAf>c`LL>zOA~IBLLW-!Q2(pukB%o0S5b8E~ zrc|sf!XT7Ew#!n6rD&U&YJW88V%q8tBil5Tk|s7yTbjOk@aN{sx18^sbMI~bPjvZL zkyOG~i{5UQT8XUr*87ZGvLEZbbQN(eUZ^x{5J+^&wrg%NuNekORLDo z1Utkv=oOpLA1Q}yLWwZRr$mcyBnkLuN{$ez3MtaJ(9|x6T^dMVNFzk5#m1Wgmd1rO zJ%MMV-qyPx1`8cQwVzl-=S7v8iWB$lHAk*nLhmYOaLhz!4X>9%7thBCkcO>#Nk z+>l(zpMNAr(ae-2f_GC>h&%dH)2Q^2S;8&OS%e809>`{CqiJ1+m!%%CpHgBqfTP{n zUlGD0KPO1MFw;pNzEDmz2> zRMd;O<$(bq<%R>deq>+z=1@rHAa`<}I+WHAZ2zv5s4`j0wvX=x*4D zwT4-gHKo&#k5;AJa^GgN8{V_%DJ*^xhUFJ`d$p-oHs_c5LyS1Lo?)$qeEHPc%4-U?`ybO zsIr(pXvN6T2}BmE#S7CH>EU5JpSp3+Oi6^uW*<)YQqvJ6|yfQWe zGNI*G#>WLD4zEu7;_zfT9FuQQ_Vd3aNSO8E7N%RaX!y_Su|BJ#IkS5SGQu^ygwx@A ISmrMN56iLGQUCw| delta 2573 zcmZuzeNa@_74Lg*VRvD_kOkkmfDvg{Rt$c`IFw{YF`(Abpe8XS5hd|EXv8*(wbccM zT}0*M$4B^b6=5O3igJm3tbn$*owVaPolerm)K;ha-m;E0nNB*>KWfwa-rFwgv@^`| z?mg$8^EkOdNPYk47#=L;@m!Rh3wWFG(97eD z$w+oZSy)@pcUsofNnjhDk>|w5f$$P{p6@WYK9<+BCB(k#_%4aZ<0u^-IgGfewsPW# z6L-~{SywAoWt*`;a}qDQOn5mqR{BqVp($i|VX`*tPW)J5Kw=BiKb+8t*W9wu3VVz< zNhY+dQh^}3Z0l6MCG~G&)^p<38j=}1i!#|T64GvfjvpO;hA+&e?WpKZsvV3PxGn;pkGPnUufZ1@GpS6^ zV(9iwdmcMjhN9QZM8EJQ23v>CDz${RcsKkq3xpuekM&BA?+4wjuJob?#UPhVZb;P2h$L@lLJJo8Km2$dC>wMf~8q&RYtn(CEphvkf(NabSXKGn&a>BIJg8B@zBvO{VH88G}xL#84 z8dki7J-^e&+>_(ZafYGh1?&GD7QFW*N8@347tazZo@p0BUoZ0W%vhPKB0t%k%Fx@=vF9sJ7&(XHy|mBN^}@OL z)|{~^8JwgP9b>=Lh%A@{cOkqymvR>TH2yWddHwFd*;4 zW4QNW8R;)cQ!SgGY6&9}#%73&BvrV2Ev!TJQA~Jp_oD;`JCozk>(;@s(*QkfV5XyA zP#yzEOF401l58m*RV|S!U*+q1CwWDYOXD#(qJx5<$ih4iwQIlr$Di`MhVQXAnY>qNuJ zUmGTr{v@NT9KsS$f-ywY6=n8l@xCKV?rF7-TBMfe>y?6&vKZ{RfD4^Gw)N$alJdVr zaiV(|PtAOqFgh9zPB=3ZhC$B+dKJ4G>~W>w6^~XM^5+~R$6PO{Xf-}O8xP-E0~ef_ zA`@o|nM4WQ^kj&8MV(Gbl6pR*)p@?B#N9xv5#w3B0b(>58op@}E;O>-Dd zY;VI8nzVuDO&lMXP%fn$``8Rf3|>yb)7EWkg{w+$meUoHB8gkq^=E<_R&pVm`ro_0 zv2BD4`c7ex;}O-KP7by2V2q+mu`b`{ssY^Y_?pH(eBlT9DA|Z77gA~7gw)lM?s z{SPKN*q~el`M`B$mPi#Nk?Ox=u|p! z$V{+a;aDoK>B&iXCMR{j!THA;P@~~d(rv^2!&Xde(cohDX0&?VqadGpQc{9#eUUx_ zZW4A+<0QtOe#X!r>Z_99Yh%RQo6Q*gH$u-JY14TLfBIxUTi#Sx$fL8b*f`x3ijqqG zH{4+R@7n!i${>-uQ_tl{um15Ff~Ya_%lPY1(L)Fw|AK_cxvW-K)sV+c~wz1zpqJlEoa;ls*_MMT9x;a Y{788+l!D(3S&5A-W^m_-78ox54+d+N761SM From d76bd3434049915c3ddb12f62b325325c88f76f8 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, 8 Jan 2020 14:56:12 +0800 Subject: [PATCH 05/23] =?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/busyWork/CommonWorkItem.js | 7 +++ .../src/modules/courses/busyWork/UseBank.js | 10 ++-- .../modules/courses/busyWork/commonWork.js | 6 +-- .../modules/courses/common/courseMessage.css | 2 +- .../courses/coursesPublic/NewShixunModel.js | 10 ++-- .../modules/courses/members/ChangeRolePop.js | 2 +- .../courses/members/CourseGroupList.js | 2 +- .../shixunHomework/ShixunhomeWorkItem.js | 51 ++++++++++++------- public/react/src/modules/forums/MemoDetail.js | 12 ++--- .../src/modules/forums/MemoDetailMDEditor.js | 2 +- public/react/src/modules/page/Index.js | 3 +- .../PackageIndexNEIBannerConcent.js | 2 +- .../tpm/challengesnew/TPMchallengesnew.js | 2 +- .../modules/user/usersInfo/banks/banksMenu.js | 2 +- 14 files changed, 66 insertions(+), 47 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 82e2d2d96..10321142b 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -216,6 +216,9 @@ class CommonWorkItem extends Component{ {/* item.status.indexOf('匿评申诉中') != -1 ? '匿评申诉剩余时间' : ''}>*/} {/**/} {isAdmin &&

+ {} : () => this.onItemClick(item)} + >查看详情 { this.props.toEditPage(this.props.match.params, item.homework_id) }}>编辑 { this.props.toWorkSettingPage(this.props.match.params, item.homework_id) }}>设置
} @@ -273,6 +276,10 @@ class CommonWorkItem extends Component{ // item.work_status && item.work_status.indexOf('查看作品') != -1 && this.props.toWorkDetailPage(this.props.match.params, item.homework_id, item.work_id)}>查看作品 } + + {} : () => this.onItemClick(item)} + >查看详情 }

diff --git a/public/react/src/modules/courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js index f72b71990..6c98695ba 100644 --- a/public/react/src/modules/courses/busyWork/UseBank.js +++ b/public/react/src/modules/courses/busyWork/UseBank.js @@ -35,8 +35,8 @@ class UseBank extends Component{ } } componentDidMount() { - console.log("UseBank"); - console.log(this.props); + // console.log("UseBank"); + // console.log(this.props); } onCheckBoxChange = (checkBoxValues) => { @@ -190,9 +190,9 @@ class UseBank extends Component{ let { flag, nav_my, loading, hasMore, object_list, search, checkBoxValues,isChecked,page,is_teacher }=this.state let { object_type }=this.props; const antIcon = ; - console.log("题库选用2222"); - console.log("UseBank"); - console.log(this.props); + // console.log("题库选用2222"); + // console.log("UseBank"); + // console.log(this.props); return(
@@ -317,21 +317,21 @@ class ShixunhomeWorkItem extends Component{ { this.props.isAdmin?this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} title={discussMessage.name} - className="fl mt3 font-16 font-bd color-dark maxwidth422">{discussMessage.name}:"" + className="fl mt3 font-16 font-bd color-dark maxwidth333">{discussMessage.name}:"" } { this.props.isStudent? this.hrefjumpskip(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)} title={discussMessage.name} - className="fl mt3 font-16 font-bd color-dark maxwidth422">{discussMessage.name}:"" + className="fl mt3 font-16 font-bd color-dark maxwidth333">{discussMessage.name}:"" } { this.props.isNotMember===true? this.props.discussMessage.private_icon===true? - {discussMessage.name} + {discussMessage.name} : this.hrefjumpskip(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)} title={discussMessage.name} - className="fl mt3 font-16 font-bd color-dark maxwidth422">{discussMessage.name}:"" + className="fl mt3 font-16 font-bd color-dark maxwidth333">{discussMessage.name}:"" } @@ -349,30 +349,43 @@ class ShixunhomeWorkItem extends Component{ - {this.props.isAdmin?this.stopPro(event)} className={this.props.isAdminOrCreator()?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"6px","display":"block"}}> - {discussMessage&&discussMessage.shixun_status>1?实训详情: - 实训详情} - {this.props.isAdminOrCreator()?this.editname(discussMessage.name,discussMessage.homework_id,event)} className={"btn colorblue ml20 font-16 fontweight400"}>重命名:""} + {this.props.isAdmin?this.stopPro(event)} className={discussMessage&&discussMessage.shixun_status>1?this.props.isAdminOrCreator()?"homepagePostSetting newhomepagePostSettingname":"homepagePostSetting homepagePostSettingbox":"homepagePostSetting newwidthSettin"} style={{"right":"-2px","top":"6px","display":"block"}}> + {discussMessage&&discussMessage.shixun_status>1?this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} className="btn colorblue font-16 fontweight400 mr20">查看详情:""} + {discussMessage&&discussMessage.shixun_status>1?实训详情: + 实训详情 + } + {discussMessage&&discussMessage.shixun_status>1?"":this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} className="btn colorblue font-16 fontweight400 mr20">查看详情} + + {this.props.isAdminOrCreator()?this.editname(discussMessage.name,discussMessage.homework_id,event)} className={"btn colorblue font-16 fontweight400"}>重命名:""} {/* 设置*/} 设置 :""} + {this.props.isStudent===true?this.props.course_identity===5? + this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} + className="btn colorblue colorblue font-16 mr20 fr mt2">查看详情 + :"":"" + } {this.props.isStudent===true?this.props.course_identity===5?discussMessage&&discussMessage.shixun_status>1? discussMessage.time_status<5? - + {startbtn===false? (discussMessage.task_operation[0] == '继续挑战' || discussMessage.task_operation[0] == '查看实战' ? diff --git a/public/react/src/modules/forums/MemoDetail.js b/public/react/src/modules/forums/MemoDetail.js index db00bdf6f..b3e0e121e 100644 --- a/public/react/src/modules/forums/MemoDetail.js +++ b/public/react/src/modules/forums/MemoDetail.js @@ -175,7 +175,7 @@ class MemoDetail extends Component { // withCredentials: true } ).then((response) => { - console.log(response); + const newMemo = Object.assign({}, this.props.memo) newMemo.praise_count = response.data.praise_count newMemo.user_praise = !newMemo.user_praise @@ -309,7 +309,7 @@ class MemoDetail extends Component { memo: newMemo2 }) } - console.log(response) + }).catch((error) => { console.log(error) }) @@ -352,7 +352,7 @@ class MemoDetail extends Component { memo: newMemo }) } - console.log(response) + }).catch((error) => { console.log(error) }) @@ -382,7 +382,7 @@ class MemoDetail extends Component { comments }) } - console.log(response) + }).catch((error) => { console.log(error) }) @@ -471,7 +471,7 @@ class MemoDetail extends Component { } // {"message":"Couldn't find Discuss with id=911","status":-1} - console.log(response) + }).catch((error) => { console.log(error) }) @@ -546,7 +546,7 @@ class MemoDetail extends Component { this.props.initForumState({ memo: newMemo2 }) - console.log(response) + } }).catch((error) => { console.log(error) diff --git a/public/react/src/modules/forums/MemoDetailMDEditor.js b/public/react/src/modules/forums/MemoDetailMDEditor.js index fb89f5bca..f00b4aeae 100644 --- a/public/react/src/modules/forums/MemoDetailMDEditor.js +++ b/public/react/src/modules/forums/MemoDetailMDEditor.js @@ -57,7 +57,7 @@ class MemoDetailMDEditor extends Component { errorMsg: '' }) }) - commentMDEditor.cm.focus() + // commentMDEditor.cm.focus() }, { watch: false, dialogLockScreen: false, diff --git a/public/react/src/modules/page/Index.js b/public/react/src/modules/page/Index.js index aa395e5cf..1e31449c6 100644 --- a/public/react/src/modules/page/Index.js +++ b/public/react/src/modules/page/Index.js @@ -104,7 +104,6 @@ class Index extends Component { // withCredentials: true, }) .then((response) => { - console.log(response); if (response.data.status == -1) { console.error('获取任务列表失败!') @@ -146,7 +145,7 @@ class Index extends Component { // } ) .then((response) => { - console.log(response); + // {"reward_code":86} TODO 金币数量变化 if (response.data.reward_code === -1) { this.props.showSnackbar('该任务已评过星了!') diff --git a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js index ae4983b33..ac82e9ca0 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js +++ b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js @@ -80,7 +80,7 @@ class PackageIndexNEIBannerConcent extends Component { let url=`/project_packages/${this.props.match.params.id}.json` axios.get((url)).then((response) => { - console.log(response) + let data=response.data this.setState({ category:data.category_id, diff --git a/public/react/src/modules/tpm/challengesnew/TPMchallengesnew.js b/public/react/src/modules/tpm/challengesnew/TPMchallengesnew.js index 70fb5d306..b0deafd95 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMchallengesnew.js +++ b/public/react/src/modules/tpm/challengesnew/TPMchallengesnew.js @@ -719,7 +719,7 @@ export default class TPMchallengesnew extends Component { shixunsskillvaluelist===undefined?"":shixunsskillvaluelist.length === 0 ? "" : shixunsskillvaluelist.map((itme, key) => { return (
  • - this.delshixunsskilllist(key)}> + this.delshixunsskilllist(key)}> diff --git a/public/react/src/modules/user/usersInfo/banks/banksMenu.js b/public/react/src/modules/user/usersInfo/banks/banksMenu.js index aa2491ae8..571af8b64 100644 --- a/public/react/src/modules/user/usersInfo/banks/banksMenu.js +++ b/public/react/src/modules/user/usersInfo/banks/banksMenu.js @@ -92,7 +92,7 @@ class BanksMenu extends Component{ object_type:type }}) .then((response) => { - console.log(response); + if(response){ if(response.data){ if(response.data.status===0){ From 27be7606345f2a87f0d3071c7841169f8302c0e5 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, 8 Jan 2020 15:49:12 +0800 Subject: [PATCH 06/23] =?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 | 2 +- .../modules/courses/boards/BoardsListItem.js | 7 +++--- .../courses/exercise/ExerciseListItem.js | 24 +++++++++++++++---- .../graduation/tasks/GraduateTaskItem.js | 14 +++++++++++ .../graduation/topics/GraduateTopicItem.js | 14 +++++++++-- .../src/modules/courses/poll/PollListItem.js | 11 +++++++-- .../shixunHomework/ShixunhomeWorkItem.js | 12 ++++++---- 7 files changed, 66 insertions(+), 18 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 2926d6c0f..5acc8bf04 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -42,7 +42,7 @@ if (isDev) { // 老师 //debugType="teacher"; // 学生 -//debugType="student"; + debugType="student"; function railsgettimes(proxy) { diff --git a/public/react/src/modules/courses/boards/BoardsListItem.js b/public/react/src/modules/courses/boards/BoardsListItem.js index 0df7675a3..db58fb998 100644 --- a/public/react/src/modules/courses/boards/BoardsListItem.js +++ b/public/react/src/modules/courses/boards/BoardsListItem.js @@ -75,6 +75,7 @@ class BoardsListItem extends Component{ ) : "" } + {canNotLink?"": {} : () => this.onTitleClick(discussMessage)}>查看详情}
  • @@ -112,14 +113,14 @@ class BoardsListItem extends Component{
    } - - {/* { (isAdmin || discussMessage.author.login == current_user.login) && + + {/* { (isAdmin || discussMessage.author.login == current_user.login) &&
    } + + { + this.props.isNotMember()? item.lock_status === 0 ? + "" + :
    +
  • this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情
  • +
    :"" + } + ) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index 39a2f0876..6a3e4aea5 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -300,12 +300,19 @@ class GraduateTaskItem extends Component{ {this.props.isAdmin?
    + 设置 + 编辑 + + this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")} + className="btn colorblue colorblue font-16 mr20 fr"> + 查看详情 +
    :""} @@ -319,6 +326,8 @@ class GraduateTaskItem extends Component{ return( + + {item==="提交作品"? @@ -384,6 +393,11 @@ class GraduateTaskItem extends Component{ ) }):""} + {this.props.isStudent? + this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")} + className="colorblue font-16 ml20 fr mt12"> + 查看详情 + :""} diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js index a2c19ecbd..b75598636 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js @@ -120,9 +120,17 @@ class GraduateTopicItem extends Component{ {discussMessage.selected_count} 已选 {discussMessage.confirmation_count} 已确认 - + { - isAdmin && this.editTopic(`${discussMessage.id}`)} style="blue" className="font-16">编辑 + isStudent? this.toDetailPage(`${discussMessage.id}`)} + className="font-16 mr20" >查看详情:"" + } + { + isAdmin? this.toDetailPage(`${discussMessage.id}`)} className="font-16 mr20" >查看详情:"" + } + + { + isAdmin && this.editTopic(`${discussMessage.id}`)} style="blue" className="font-16 ">编辑 } { isStudent && data.user_selected == true && discussMessage.user_topic_status==0 && @@ -136,6 +144,8 @@ class GraduateTopicItem extends Component{ 选题 } + +

    diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js index ec1eb2fa3..be5e7f88d 100644 --- a/public/react/src/modules/courses/poll/PollListItem.js +++ b/public/react/src/modules/courses/poll/PollListItem.js @@ -97,8 +97,12 @@ class PollListItem extends Component{ {"提交剩余时间:"+formatDuring(t)} } + + { - isStudent ? + isStudent ? + + { item.current_status == 0 && "继续答题" } @@ -110,10 +114,13 @@ class PollListItem extends Component{ } :"" } + { isStudent ?canNotLink ?"": this.toDetailPage(`/courses/${coursesId}/polls/${item.id}/detail`)} >查看详情:""} + { IsAdmin &&
      - 编辑 + { canNotLink ?"": this.toDetailPage(`/courses/${coursesId}/polls/${item.id}/detail`)} >查看详情} + 编辑 设置
    } diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index 7f56e47ba..88e60a98f 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -377,11 +377,6 @@ class ShixunhomeWorkItem extends Component{ 设置
    :""} - {this.props.isStudent===true?this.props.course_identity===5? - this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} - className="btn colorblue colorblue font-16 mr20 fr mt2">查看详情 - :"":"" - } {this.props.isStudent===true?this.props.course_identity===5?discussMessage&&discussMessage.shixun_status>1? discussMessage.time_status<5? @@ -398,6 +393,13 @@ class ShixunhomeWorkItem extends Component{ :"":"":"":"" } + + {this.props.isStudent===true?this.props.course_identity===5? + this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} + className="btn colorblue colorblue font-16 mr20 fr mt2">查看详情 + :"":"" + } +
    From bf20a76bf7a87f892884bf2a24ae08739bfebae5 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, 8 Jan 2020 16:21:41 +0800 Subject: [PATCH 07/23] =?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/public/css/edu-all.css | 9 ++++++-- .../modules/tpm/component/TPMRightSection.js | 22 +++++++++++++++---- .../tpm/shixunchild/Challenges/Challenges.js | 17 +++++++++++--- .../Challenges/Challengesjupyter.js | 13 ++++++++++- .../shixunchild/shixunchildCss/Challenges.css | 4 ++++ public/stylesheets/educoder/edu-all.css | 9 ++++++-- 6 files changed, 62 insertions(+), 12 deletions(-) diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css index 061cee521..306913b1f 100644 --- a/public/react/public/css/edu-all.css +++ b/public/react/public/css/edu-all.css @@ -386,7 +386,7 @@ label.infolabel{display: block;float: left;width: 56px;text-align: right;margin- .task-item{margin-top: 30px;padding-bottom: 30px;border-bottom: 1px solid #eee} .task-item:last-child{border-bottom: none;} .challengeNav a.active{color: #4CACFF;} -.recomments{margin-bottom: 30px;padding-bottom:30px;margin-top: 30px;border-bottom: 1px solid #eee} +.recomments{ margin-bottom: 20px;} .recomments:first-child{margin-top: 0px;} .recomments:last-child{margin-bottom: 0px;border:none;padding-bottom: 0px;} .url-input{border: none;padding: 0px;font-size: 12px;color:#999;outline: none} @@ -3496,4 +3496,9 @@ a.singlepublishtwo{ .RightPaneDrawer .jupyter_data_list{ max-height: 340px; -} \ No newline at end of file +} + +.ant-btn-primary{ + text-shadow: none !important; + box-shadow: none !important; +} diff --git a/public/react/src/modules/tpm/component/TPMRightSection.js b/public/react/src/modules/tpm/component/TPMRightSection.js index 70bec797a..c9cf23282 100644 --- a/public/react/src/modules/tpm/component/TPMRightSection.js +++ b/public/react/src/modules/tpm/component/TPMRightSection.js @@ -67,6 +67,18 @@ class TPMRightSection extends Component { return (
    + { TPMRightSectionData === undefined ? "" :
    @@ -180,7 +192,8 @@ class TPMRightSection extends Component {
    - 实训 + + 实训
    @@ -232,7 +245,7 @@ class TPMRightSection extends Component { return (
    - 69?1526971094 + 69?1526971094
    @@ -240,9 +253,10 @@ class TPMRightSection extends Component { className="color-grey-6 task-hide mb12 recomment-name">{item.name}

    - {item.stu_num} 人学习 + {item.stu_num} 人学习 + {item.level}

    -

    {item.level}

    +
    ) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js index d84817fe8..5f559e317 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js @@ -498,7 +498,18 @@ class Challenges extends Component {

    }
    - + {this.state.isopentitletype==="Less"?"":this.state.opentitletype===true?this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}> 阅读全文 :this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}> @@ -508,7 +519,7 @@ class Challenges extends Component {

    -
    +
    全部任务 {/*
    - + {this.state.isopentitletype==="Less"?"":this.state.opentitletype===true?this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}> 阅读全文 :this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}> diff --git a/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css b/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css index 652f77201..abfafc46a 100644 --- a/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css +++ b/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css @@ -258,4 +258,8 @@ .Countdownfonttpm .ant-statistic-content-value{ font-size: 14px; +} + +.boreee{ + border-bottom: 1px solid #F4F4F4; } \ No newline at end of file diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index b596b6c15..d620d16d8 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -390,7 +390,7 @@ label.infolabel{display: block;float: left;width: 56px;text-align: right;margin- .task-item{margin-top: 30px;padding-bottom: 30px;border-bottom: 1px solid #eee} .task-item:last-child{border-bottom: none;} .challengeNav a.active{color: #4CACFF;} -.recomments{margin-bottom: 30px;padding-bottom:30px;margin-top: 30px;border-bottom: 1px solid #eee} +.recomments{ margin-bottom: 20px;} .recomments:first-child{margin-top: 0px;} .recomments:last-child{margin-bottom: 0px;border:none;padding-bottom: 0px;} .url-input{border: none;padding: 0px;font-size: 12px;color:#999;outline: none} @@ -3816,4 +3816,9 @@ a.singlepublishtwo{ .RightPaneDrawer .jupyter_data_list{ max-height: 340px; - } \ No newline at end of file + } + +.ant-btn-primary{ + text-shadow: none !important; + box-shadow: none !important; +} From b9e7356178fa48cf08c469af0d0c0480d7518e59 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, 8 Jan 2020 16:55:40 +0800 Subject: [PATCH 08/23] =?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 | 20 +++++++++---------- .../courses/coursesPublic/Startshixuntask.js | 3 +-- .../shixunHomework/ShixunHomeworkPage.js | 1 + .../shixunHomework/Trainingjobsetting.js | 4 ++-- .../modules/tpm/component/TPMRightSection.js | 6 +++--- .../tpm/shixunchild/Challenges/Challenges.js | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 5acc8bf04..535b19a94 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -42,7 +42,7 @@ if (isDev) { // 老师 //debugType="teacher"; // 学生 - debugType="student"; +//debugType="student"; function railsgettimes(proxy) { @@ -149,15 +149,15 @@ export function initAxiosInterceptors(props) { } // // console.log(config); - // if (config.method === "post") { - // if (requestMap[config.url] === true) { // 避免重复的请求 导致页面f5刷新 也会被阻止 显示这个方法会影响到定制信息 - // // console.log(config); - // // console.log(JSON.parse(config)); - // // console.log(config.url); - // // console.log("被阻止了是重复请求================================="); - // return false; - // } - // } + if (config.method === "post") { + if (requestMap[config.url] === true) { // 避免重复的请求 导致页面f5刷新 也会被阻止 显示这个方法会影响到定制信息 + // console.log(config); + // console.log(JSON.parse(config)); + // console.log(config.url); + // console.log("被阻止了是重复请求================================="); + return false; + } + } // 非file_update请求 if (config.url.indexOf('update_file') === -1) { requestMap[config.url] = true; diff --git a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js index 9b374a443..e983f332e 100644 --- a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js +++ b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js @@ -51,8 +51,7 @@ class Startshixuntask extends Component{ }, 1000) if(response.data.status!=401&&response.data.status!=403){ - const w=window.open('about:blank'); - w.location.href= "/tasks/"+response.data.game_identifier + window.open( `/tasks/${response.data.game_identifier}`) } } diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index 92247c676..06f0e805d 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -388,6 +388,7 @@ class ShixunHomeworkPage extends Component { teacherdatapage === undefined ? "" : teacherdatapage.commit_des === null || teacherdatapage.commit_des === undefined ? "" : {teacherdatapage.commit_des} } {teacherdatapage === undefined ? "" :teacherdatapage&&teacherdatapage.shixun_status>1&&teacherdatapage&&teacherdatapage.time_status<5?
    - 共发布实训 {TPMRightSectionData.user_shixuns_count} + 共发布实训 {TPMRightSectionData.user_shixuns_count}
    {/*
    */} @@ -115,7 +115,7 @@ class TPMRightSection extends Component {
    学习统计 - 已完成 {TPMRightSectionData&&TPMRightSectionData.complete_count===null?0:TPMRightSectionData&&TPMRightSectionData.complete_count} 个 / 共 {TPMRightSectionData&&TPMRightSectionData.challenge_count} 关 + 已完成 {TPMRightSectionData&&TPMRightSectionData.complete_count===null?0:TPMRightSectionData&&TPMRightSectionData.complete_count} 个 / 共 {TPMRightSectionData&&TPMRightSectionData.challenge_count} 关
    @@ -131,7 +131,7 @@ class TPMRightSection extends Component {

    技能标签 - 已获得 {TPMRightSectionData&&TPMRightSectionData.user_tag_count} 个 / 共 {TPMRightSectionData&&TPMRightSectionData.tag_count} 个 + 已获得 {TPMRightSectionData&&TPMRightSectionData.user_tag_count} 个 / 共 {TPMRightSectionData&&TPMRightSectionData.tag_count} 个

    diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js index 5f559e317..0e701c00c 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js @@ -521,7 +521,7 @@ class Challenges extends Component {
    全部任务 - + {/* */} {/**/} From 0ab2ef4de436d88b6035c0a4074ccb567838aa87 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, 8 Jan 2020 17:02:18 +0800 Subject: [PATCH 09/23] =?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/graduation/tasks/GraduationTaskDetail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskDetail.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskDetail.js index 43f651527..3a4890ece 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskDetail.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskDetail.js @@ -544,7 +544,7 @@ class GraduationTaskDetail extends Component{ { this.props.isAdmin() ? questionslist.status===0 ? { this.publish()} }>立即发布 : "" : "" } { this.props.isAdmin() && questionslist.cross_comment ? 交叉评阅设置 : "" } { this.props.isAdmin() ? 编辑任务 : "" } - {/*{ this.props.user&&this.props.user.admin===true || this.props.user&&this.props.user.business===true ? this.CodeReview()}>代码评测 : "" }*/} + { this.props.user&&this.props.user.admin===true || this.props.user&&this.props.user.business===true ? this.CodeReview()}>代码评测 : "" }
    From 6672ee50f538e333bb2a67b36a26ad76bf663908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 8 Jan 2020 18:00:44 +0800 Subject: [PATCH 10/23] =?UTF-8?q?=E9=A2=98=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Trainingjobsetting.js | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 15c46987d..b0c20198d 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -422,6 +422,7 @@ class Trainingjobsetting extends Component { if (this.state.jobsettingsdata.data.unified_setting === true) { if (this.state.unifiedsetting === true) { + //统一设置 if (this.state.releasetime === undefined || this.state.releasetime === null || this.state.releasetime === "") { // this.props.showNotification(`请选择发布时间`); @@ -544,13 +545,28 @@ class Trainingjobsetting extends Component { } } else { + //分班设置 + // console.log("分班设置"); + // console.log(this.$pollDetailTabForthRules); + + const result=this.$pollDetailTabForthRules.notUnifiedSettingCheck(this.state.rules); + this.setState({ + rules: result.rules + }) + + if(result.validate==false){ + + + this.scrollToAnchor("publishtimeid"); + + this.props.showNotification(`分班发布设置不能为空`); + return false; + } let rulesdata = this.state.rulesdata; - if ( - rulesdata.length === 0) { + if (rulesdata.length === 0) { this.props.showNotification(`分班发布设置不能为空`); return; } - // } } @@ -2396,7 +2412,7 @@ class Trainingjobsetting extends Component { modalSave={modalSave} > -
    +
    { !flagPageEdit && this.props.isAdmin() === true ? "" @@ -2454,7 +2470,7 @@ class Trainingjobsetting extends Component { { unifiedsetting === undefined ? "" : unifiedsetting === true ? -
    +
    发布时间: { + this.$pollDetailTabForthRules = dom; + }} teacherdatapage={this.props.teacherdatapage} rules={rules} moduleName={"作业"} From 216b95a3f8de348d2dfeebe954fbe5031d4ebbe3 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, 8 Jan 2020 18:08:52 +0800 Subject: [PATCH 11/23] =?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/boards/BoardsListItem.js | 18 ++++++---- .../courses/busyWork/CommonWorkItem.js | 8 +++-- .../courses/coursesDetail/CoursesLeftNav.js | 2 +- .../tasks/GraduationTaskssettinglist.js | 8 ++--- .../graduation/topics/GraduateTopicItem.js | 4 +-- .../shixunHomework/ShixunhomeWorkItem.js | 33 ++++++++++++------- 6 files changed, 45 insertions(+), 28 deletions(-) diff --git a/public/react/src/modules/courses/boards/BoardsListItem.js b/public/react/src/modules/courses/boards/BoardsListItem.js index db58fb998..78f3aec38 100644 --- a/public/react/src/modules/courses/boards/BoardsListItem.js +++ b/public/react/src/modules/courses/boards/BoardsListItem.js @@ -75,17 +75,21 @@ class BoardsListItem extends Component{ ) : "" } - {canNotLink?"": {} : () => this.onTitleClick(discussMessage)}>查看详情} +
    - {(isAdmin || discussMessage.author.login == current_user.login) && - { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑 } - { isAdmin && { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}> - { discussMessage.sticky ? '取消置顶' : '置顶' } } + {(isAdmin || discussMessage.author.login == current_user.login) && + { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑 } + + { isAdmin && { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}> + { discussMessage.sticky ? '取消置顶' : '置顶' } } + + {canNotLink?"": {} : () => this.onTitleClick(discussMessage)}>查看详情} +
    diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 10321142b..21c396fe6 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -227,6 +227,10 @@ class CommonWorkItem extends Component{ // isStudent &&
  • + {} : () => this.onItemClick(item)} + >查看详情 + { // item.work_status && item.work_status.indexOf('关联项目') != -1 && @@ -277,9 +281,7 @@ class CommonWorkItem extends Component{ item.work_status && item.work_status.indexOf('查看作品') != -1 && this.props.toWorkDetailPage(this.props.match.params, item.homework_id, item.work_id)}>查看作品 } - {} : () => this.onItemClick(item)} - >查看详情 +
  • }

    diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index adb6518ff..16e8a1576 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -531,7 +531,7 @@ class Coursesleftnav extends Component{ if(result!=undefined){ if(result.data.status===0){ // window.location.reload() - this.updasaveNavmoda() + // this.updasaveNavmoda() // notification.open({ message:"提示", diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 62d0bbef2..9fa993ea6 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -257,10 +257,10 @@ class GraduationTaskssettinglist extends Component{ } - - this.seacthdata(list.length===0?undefined:list[0], task_status, course_group, cross_comment, order, b_order, search,this.state.page); - this.props.getsonar(list.length===0?undefined:list[0], task_status, course_group, cross_comment, search) - // if(list.length===key){ + let newvalue=list.length===0?undefined:parseInt(list[0]) + this.seacthdata(newvalue, task_status, course_group, cross_comment, order, b_order, search,this.state.page); + this.props.getsonar(newvalue, task_status, course_group, cross_comment, search) + // if(list.length===key){ // this.seacthdata(undefined, task_status, course_group, cross_comment, order, b_order, search,this.state.page); // this.props.getsonar(undefined, task_status, course_group, cross_comment, search) // }else{ diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js index b75598636..524e7d208 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js @@ -134,13 +134,13 @@ class GraduateTopicItem extends Component{ } { isStudent && data.user_selected == true && discussMessage.user_topic_status==0 && - chooseTopic(`${discussMessage.id}`,index,true)} style="blue" className="font-16"> + chooseTopic(`${discussMessage.id}`,index,true)} style="blue" className="font-16 mr20"> 取消选题 } { isStudent && data.user_selected==false && (discussMessage.user_topic_status == null || discussMessage.user_topic_status == 2) && - chooseTopic(`${discussMessage.id}`,index,false)} style="blue" className="font-16"> + chooseTopic(`${discussMessage.id}`,index,false)} style="blue" className="font-16 mr20"> 选题 } diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index 88e60a98f..19ad9d5cf 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -357,7 +357,7 @@ class ShixunhomeWorkItem extends Component{ color:#fff !important; } .newhomepagePostSettingname{ - width: 274px !important; + width: 205px !important; } .newwidthSettin{ width:255px !important; @@ -365,16 +365,22 @@ class ShixunhomeWorkItem extends Component{ ` } - {this.props.isAdmin?this.stopPro(event)} className={discussMessage&&discussMessage.shixun_status>1?this.props.isAdminOrCreator()?"homepagePostSetting newhomepagePostSettingname":"homepagePostSetting homepagePostSettingbox":"homepagePostSetting newwidthSettin"} style={{"right":"-2px","top":"6px","display":"block"}}> - {discussMessage&&discussMessage.shixun_status>1?this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} className="btn colorblue font-16 fontweight400 mr20">查看详情:""} + + + {/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/} + + + + + {this.props.isAdmin?this.stopPro(event)} className={discussMessage&&discussMessage.shixun_status>1?this.props.isAdminOrCreator()?" newhomepagePostSettingname fr":" homepagePostSettingbox fr":" newwidthSettin fr"} style={{"right":"-2px","top":"6px","display":"block"}}> {discussMessage&&discussMessage.shixun_status>1?实训详情: - 实训详情 + 实训详情 } - {discussMessage&&discussMessage.shixun_status>1?"":this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} className="btn colorblue font-16 fontweight400 mr20">查看详情} - {this.props.isAdminOrCreator()?this.editname(discussMessage.name,discussMessage.homework_id,event)} className={"btn colorblue font-16 fontweight400"}>重命名:""} + + {this.props.isAdminOrCreator()?this.editname(discussMessage.name,discussMessage.homework_id,event)} className={"btn colorblue font-16 fontweight400 "}>重命名:""} {/* 设置*/} - 设置 + 设置 :""} @@ -393,13 +399,18 @@ class ShixunhomeWorkItem extends Component{ :"":"":"":"" } + { this.props.isAdmin?this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} className="btn colorblue font-16 fontweight400 mr20 fr">查看详情:""} + + { + this.props.isStudent? this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} className="btn colorblue font-16 fontweight400 mr20 fr mt2">查看详情:"" + } - {this.props.isStudent===true?this.props.course_identity===5? - this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} - className="btn colorblue colorblue font-16 mr20 fr mt2">查看详情 - :"":"" + { + this.props.isNotMember===true? this.props.discussMessage.private_icon===true?"" + :this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} className="btn colorblue font-16 fontweight400 mr20 fr">查看详情:"" } +
    From d79067b3e68dc8af8cbb4ef32eeeaae93f71e643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 8 Jan 2020 19:26:47 +0800 Subject: [PATCH 12/23] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/Trainingjobsetting.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index b0c20198d..97ac1a3ea 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -555,11 +555,7 @@ class Trainingjobsetting extends Component { }) if(result.validate==false){ - - this.scrollToAnchor("publishtimeid"); - - this.props.showNotification(`分班发布设置不能为空`); return false; } let rulesdata = this.state.rulesdata; From f521ba53909c683b9044f164f39a90f822c7d5d2 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, 8 Jan 2020 19:32:00 +0800 Subject: [PATCH 13/23] =?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/GraduationTaskssettinglist.js | 49 ++++++++++--------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 9fa993ea6..12c64adeb 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -51,6 +51,7 @@ class GraduationTaskssettinglist extends Component{ visibles:false, DownloadType:false, DownloadMessageval:undefined, + commentstate:null } } @@ -247,17 +248,21 @@ class GraduationTaskssettinglist extends Component{ if(listype===false){ this.setState({ teacher_comment:null, - loadingstate:true + loadingstate:true, + commentstate:null }) }else{ this.setState({ teacher_comment:list, - loadingstate:true + loadingstate:true, + commentstate:list.length===0?undefined:parseInt(list[0]), }) } - let newvalue=list.length===0?undefined:parseInt(list[0]) + let newvalue=list.length===0?undefined:parseInt(list[0]); + + this.seacthdata(newvalue, task_status, course_group, cross_comment, order, b_order, search,this.state.page); this.props.getsonar(newvalue, task_status, course_group, cross_comment, search) // if(list.length===key){ @@ -275,14 +280,14 @@ class GraduationTaskssettinglist extends Component{ funcross_comment=(e)=>{ - let {teacher_comment, task_status, course_group, order, b_order, search} = this.state; + let {teacher_comment, task_status, course_group, order, b_order, search,commentstate} = this.state; this.setState({ cross_comment:e.target.value===undefined||e.target.value===false?null:e.target.value, loadingstate:true }) this.seacthdata(teacher_comment, task_status, course_group, e.target.value===undefined||e.target.value===false?"":e.target.value, order, b_order, search,this.state.page); - this.props.getsonar(teacher_comment, task_status, course_group, e.target.value===undefined||e.target.value===false?"":e.target.value, search) + this.props.getsonar(commentstate, task_status, course_group, e.target.value===undefined||e.target.value===false?"":e.target.value, search) } inputSearchValue=(e)=>{ @@ -302,24 +307,24 @@ class GraduationTaskssettinglist extends Component{ searchValue=()=>{ - let {teacher_comment, task_status, course_group, cross_comment, order, b_order,search} = this.state; + let {teacher_comment, task_status, course_group, cross_comment, order, b_order,search,commentstate} = this.state; this.setState({ loadingstate:true }) this.seacthdata(teacher_comment, task_status, course_group, cross_comment, order, b_order, search,this.state.page); - this.props.getsonar(teacher_comment, task_status, course_group, cross_comment, search) + this.props.getsonar(commentstate, task_status, course_group, cross_comment, search) } funorder = (value, newb_order) => { - let {teacher_comment, task_status, course_group, cross_comment, b_order, search,order} = this.state; + let {teacher_comment, task_status, course_group, cross_comment, b_order, search,commentstate} = this.state; this.setState({ order: value, b_order: newb_order, loadingstate: true }) this.seacthdata(teacher_comment, task_status, course_group, cross_comment, value, newb_order, search,this.state.page); - this.props.getsonar(teacher_comment, task_status, course_group, cross_comment, search) + this.props.getsonar(commentstate, task_status, course_group, cross_comment, search) } @@ -327,7 +332,7 @@ class GraduationTaskssettinglist extends Component{ funtaskstatus=(checkedValues,key)=>{ // console.log(checkedValues) - let {teacher_comment, course_group, cross_comment, order, b_order, search} = this.state; + let {teacher_comment, course_group, cross_comment, order, b_order, search,commentstate} = this.state; @@ -340,7 +345,7 @@ class GraduationTaskssettinglist extends Component{ loadingstate:true }) this.seacthdata(teacher_comment, null, course_group, cross_comment, order, b_order, search,this.state.page); - this.props.getsonar(teacher_comment, null, course_group, cross_comment, search) + this.props.getsonar(commentstate, null, course_group, cross_comment, search) } // else if(checkedValues.length ===key){ // // 全部抖选中 自然就是查找全部 就是空 @@ -357,7 +362,7 @@ class GraduationTaskssettinglist extends Component{ loadingstate:true }) this.seacthdata(teacher_comment, checkedValues===key?undefined:checkedValues, course_group, cross_comment, order, b_order, search,this.state.page); - this.props.getsonar(teacher_comment, checkedValues===key?undefined:checkedValues, course_group, cross_comment, search) + this.props.getsonar(commentstate, checkedValues===key?undefined:checkedValues, course_group, cross_comment, search) } @@ -366,7 +371,7 @@ class GraduationTaskssettinglist extends Component{ // console.log(checkedValues); // console.log(key); - let {teacher_comment, task_status, cross_comment, order,b_order, search} = this.state; + let {teacher_comment, task_status, cross_comment, order,b_order, search,commentstate} = this.state; if(JSON.stringify(checkedValues) === "[]"){ // console.log(checkedValues); @@ -376,7 +381,7 @@ class GraduationTaskssettinglist extends Component{ loadingstate:true }) this.seacthdata(teacher_comment, task_status, null, cross_comment, order, b_order, search,this.state.page); - this.props.getsonar(teacher_comment,task_status, null, cross_comment, search) + this.props.getsonar(commentstate,task_status, null, cross_comment, search) } // else if(checkedValues.length ===key){ // // 全部抖选中 自然就是查找全部 就是空 @@ -394,7 +399,7 @@ class GraduationTaskssettinglist extends Component{ loadingstate:true }) this.seacthdata(teacher_comment, task_status, checkedValues===key?undefined:checkedValues, cross_comment, order, b_order, search,this.state.page); - this.props.getsonar(teacher_comment,task_status, checkedValues===key?undefined:checkedValues, cross_comment, search) + this.props.getsonar(commentstate,task_status, checkedValues===key?undefined:checkedValues, cross_comment, search) } @@ -575,7 +580,7 @@ class GraduationTaskssettinglist extends Component{ saveModulationModal=(value,num)=>{ - let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search}=this.state; + let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search,commentstate}=this.state; let {operationId}=this.state; // console.log(value,num) @@ -587,7 +592,7 @@ class GraduationTaskssettinglist extends Component{ // console.log(result) if(result.data.status===0){ this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,this.state.page); - this.props.getsonar(teacher_comment,task_status, course_group, cross_comment, search) + this.props.getsonar(commentstate,task_status, course_group, cross_comment, search) this.props.showNotification(result.data.message); this.cancelmodel(); this.setState({ @@ -703,15 +708,15 @@ class GraduationTaskssettinglist extends Component{ this.setState({ page: pageNumber, }) - let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search}=this.state; + let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search,commentstate}=this.state; this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pageNumber); - this.props.getsonar(teacher_comment,task_status, course_group, cross_comment, search) + this.props.getsonar(commentstate,task_status, course_group, cross_comment, search) } /// 确认是否下载 confirmysl(url){ - let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,page} =this.state; + let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,commentstate} =this.state; let params ={ teacher_comment:teacher_comment, @@ -764,8 +769,8 @@ class GraduationTaskssettinglist extends Component{ } render(){ - let {coursename,coursesearch,taskname,taskid,taskslistdata,data,page,limit,teacher_comment,task_status,cross_comment,search,loadingstate, - order, course_group,Modalstype,Modalstopval,ModalCancel,ModalSave,modalname,Modulationtype,operationId,Allocationtype,visibles, + let { taskslistdata,data,page,limit,teacher_comment,task_status,cross_comment,search,loadingstate, + course_group,Modalstype,Modalstopval,ModalCancel,ModalSave,modalname,Modulationtype,Allocationtype,visibles, visible, Topval, Topvalright, From 9bc4c9bc8a68dd1763ace8726118d5ebbfe4c8b0 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, 8 Jan 2020 19:58:41 +0800 Subject: [PATCH 14/23] =?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/GraduationTaskssettinglist.js | 52 ++++++++++++------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 12c64adeb..75d2a4481 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -89,13 +89,13 @@ class GraduationTaskssettinglist extends Component{ course_groupslist:[], checkAllValue:false }) - let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search} = this.state; - this.seacthdata(teacher_comment, task_status, course_group, cross_comment, order, b_order, search,this.state.page); + let {commentstate, task_status, course_group, cross_comment, order, b_order, search} = this.state; + this.seacthdata(commentstate, task_status, course_group, cross_comment, order, b_order, search,this.state.page); - this.props.getsonar(teacher_comment, task_status, course_group, cross_comment, search) + this.props.getsonar(commentstate, task_status, course_group, cross_comment, search) } - seacthdata=(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pages)=>{ + seacthdata=(commentstate,task_status,course_group,cross_comment,order,b_order,search,pages)=>{ let{page,limit}=this.state; // console.log(teacher_comment,task_status,course_group,cross_comment,order,b_order,search) @@ -105,7 +105,7 @@ class GraduationTaskssettinglist extends Component{ //get 数组 axios.get(url,{ params: { - teacher_comment:teacher_comment===null?undefined:teacher_comment, + teacher_comment:commentstate===null||commentstate===undefined?undefined:commentstate, task_status:task_status===null?undefined:task_status, course_group:course_group===null?undefined:course_group, cross_comment:cross_comment===null?undefined:cross_comment, @@ -230,7 +230,8 @@ class GraduationTaskssettinglist extends Component{ } funteachercomment=(list,key)=> { - // console.log(e.target.value) + + let asum=undefined let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search} = this.state; if(this.state.teacher_comment!=null&&list.length>0){ if(this.state.teacher_comment.length>0){ @@ -252,19 +253,30 @@ class GraduationTaskssettinglist extends Component{ commentstate:null }) }else{ + + if(list.length>0){ + list.map((item,key)=>{ + if(key===0){ + asum=item; + } + }) + }else{ + asum=undefined + } this.setState({ teacher_comment:list, loadingstate:true, - commentstate:list.length===0?undefined:parseInt(list[0]), + commentstate:asum, }) } - let newvalue=list.length===0?undefined:parseInt(list[0]); + console.log(list) + console.log(asum) - this.seacthdata(newvalue, task_status, course_group, cross_comment, order, b_order, search,this.state.page); - this.props.getsonar(newvalue, task_status, course_group, cross_comment, search) + this.seacthdata(asum, task_status, course_group, cross_comment, order, b_order, search,this.state.page); + this.props.getsonar(asum, task_status, course_group, cross_comment, search) // if(list.length===key){ // this.seacthdata(undefined, task_status, course_group, cross_comment, order, b_order, search,this.state.page); // this.props.getsonar(undefined, task_status, course_group, cross_comment, search) @@ -286,7 +298,7 @@ class GraduationTaskssettinglist extends Component{ cross_comment:e.target.value===undefined||e.target.value===false?null:e.target.value, loadingstate:true }) - this.seacthdata(teacher_comment, task_status, course_group, e.target.value===undefined||e.target.value===false?"":e.target.value, order, b_order, search,this.state.page); + this.seacthdata(commentstate, task_status, course_group, e.target.value===undefined||e.target.value===false?"":e.target.value, order, b_order, search,this.state.page); this.props.getsonar(commentstate, task_status, course_group, e.target.value===undefined||e.target.value===false?"":e.target.value, search) } @@ -311,7 +323,7 @@ class GraduationTaskssettinglist extends Component{ this.setState({ loadingstate:true }) - this.seacthdata(teacher_comment, task_status, course_group, cross_comment, order, b_order, search,this.state.page); + this.seacthdata(commentstate, task_status, course_group, cross_comment, order, b_order, search,this.state.page); this.props.getsonar(commentstate, task_status, course_group, cross_comment, search) } @@ -323,7 +335,7 @@ class GraduationTaskssettinglist extends Component{ b_order: newb_order, loadingstate: true }) - this.seacthdata(teacher_comment, task_status, course_group, cross_comment, value, newb_order, search,this.state.page); + this.seacthdata(commentstate, task_status, course_group, cross_comment, value, newb_order, search,this.state.page); this.props.getsonar(commentstate, task_status, course_group, cross_comment, search) } @@ -344,7 +356,7 @@ class GraduationTaskssettinglist extends Component{ task_status:undefined, loadingstate:true }) - this.seacthdata(teacher_comment, null, course_group, cross_comment, order, b_order, search,this.state.page); + this.seacthdata(commentstate, null, course_group, cross_comment, order, b_order, search,this.state.page); this.props.getsonar(commentstate, null, course_group, cross_comment, search) } // else if(checkedValues.length ===key){ @@ -361,7 +373,7 @@ class GraduationTaskssettinglist extends Component{ task_status:checkedValues===key?null:checkedValues, loadingstate:true }) - this.seacthdata(teacher_comment, checkedValues===key?undefined:checkedValues, course_group, cross_comment, order, b_order, search,this.state.page); + this.seacthdata(commentstate, checkedValues===key?undefined:checkedValues, course_group, cross_comment, order, b_order, search,this.state.page); this.props.getsonar(commentstate, checkedValues===key?undefined:checkedValues, course_group, cross_comment, search) } @@ -380,7 +392,7 @@ class GraduationTaskssettinglist extends Component{ course_group:undefined, loadingstate:true }) - this.seacthdata(teacher_comment, task_status, null, cross_comment, order, b_order, search,this.state.page); + this.seacthdata(commentstate, task_status, null, cross_comment, order, b_order, search,this.state.page); this.props.getsonar(commentstate,task_status, null, cross_comment, search) } // else if(checkedValues.length ===key){ @@ -398,7 +410,7 @@ class GraduationTaskssettinglist extends Component{ course_group:checkedValues===key?null:checkedValues, loadingstate:true }) - this.seacthdata(teacher_comment, task_status, checkedValues===key?undefined:checkedValues, cross_comment, order, b_order, search,this.state.page); + this.seacthdata(commentstate, task_status, checkedValues===key?undefined:checkedValues, cross_comment, order, b_order, search,this.state.page); this.props.getsonar(commentstate,task_status, checkedValues===key?undefined:checkedValues, cross_comment, search) } @@ -591,7 +603,7 @@ class GraduationTaskssettinglist extends Component{ }).then((result)=>{ // console.log(result) if(result.data.status===0){ - this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,this.state.page); + this.seacthdata(commentstate,task_status,course_group,cross_comment,order,b_order,search,this.state.page); this.props.getsonar(commentstate,task_status, course_group, cross_comment, search) this.props.showNotification(result.data.message); this.cancelmodel(); @@ -709,7 +721,7 @@ class GraduationTaskssettinglist extends Component{ page: pageNumber, }) let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search,commentstate}=this.state; - this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pageNumber); + this.seacthdata(commentstate,task_status,course_group,cross_comment,order,b_order,search,pageNumber); this.props.getsonar(commentstate,task_status, course_group, cross_comment, search) } @@ -719,7 +731,7 @@ class GraduationTaskssettinglist extends Component{ let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,commentstate} =this.state; let params ={ - teacher_comment:teacher_comment, + teacher_comment:commentstate, task_status:task_status, course_group:course_group, cross_comment:cross_comment, From 78f68f89553d8f58b9f37f08b10f4b33faf18f71 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, 8 Jan 2020 20:05:54 +0800 Subject: [PATCH 15/23] =?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/GraduationTaskssettinglist.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 75d2a4481..c00542233 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -270,11 +270,6 @@ class GraduationTaskssettinglist extends Component{ }) } - - - console.log(list) - console.log(asum) - this.seacthdata(asum, task_status, course_group, cross_comment, order, b_order, search,this.state.page); this.props.getsonar(asum, task_status, course_group, cross_comment, search) // if(list.length===key){ From b3d970cfaf1a2ac9416d0c5cedee126505e62bc9 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, 8 Jan 2020 20:29:00 +0800 Subject: [PATCH 16/23] =?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/coursesDetail/CoursesLeftNav.js | 10 ++++++---- .../modules/courses/exercise/Exercisesetting.js | 17 ++++++++++------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index 16e8a1576..c37b45c84 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -530,20 +530,22 @@ class Coursesleftnav extends Component{ {name:value}).then((result)=>{ if(result!=undefined){ if(result.data.status===0){ - // window.location.reload() - // this.updasaveNavmoda() - // + notification.open({ message:"提示", description:result.data.message }); - trigger('updateNavSuccess') + if(positiontype==="files"){ + this.updasaveNavmoda() + trigger('updateNavSuccess') window.location.href=`/courses/${coursesId}/file/${result.data.category_id}`; } if(positiontype==="boards"){ + this.updasaveNavmoda() + trigger('updateNavSuccess') window.location.href=`/courses/${coursesId}/boards/${result.data.category_id}`; } diff --git a/public/react/src/modules/courses/exercise/Exercisesetting.js b/public/react/src/modules/courses/exercise/Exercisesetting.js index b58f1c4e5..0230c9bc7 100644 --- a/public/react/src/modules/courses/exercise/Exercisesetting.js +++ b/public/react/src/modules/courses/exercise/Exercisesetting.js @@ -131,8 +131,11 @@ class Exercisesetting extends Component{ // } // 已有设置数据的查询 - getSettingInfo=()=>{ - this.props.Commonheadofthetestpapers() + getSettingInfo=(type)=>{ + if(type!=1){ + this.props.Commonheadofthetestpapers() + } + let Id=this.props.match.params.Id; let url=`/exercises/${Id}/exercise_setting.json`; axios.get(url).then((result)=>{ @@ -241,10 +244,10 @@ class Exercisesetting extends Component{ let{unified_setting}=this.state if(unified_setting==true){ console.log("统一设置"); - this.UnifiedSetting(); + this.UnifiedSetting( ); }else{ console.log("非统一设置"); - this.NotUnifiedSetting(); + this.NotUnifiedSetting( ); } } }) @@ -347,7 +350,7 @@ class Exercisesetting extends Component{ console.log(result) if(result.status==200){ this.props.showNotification(`${result.data.message}`); - this.getSettingInfo(); + this.getSettingInfo(1); this.cancelEdit(); } }) @@ -367,7 +370,7 @@ class Exercisesetting extends Component{ if(result.status==200){ this.props.showNotification(`${result.data.message}`); this.cancelEdit(); - this.getSettingInfo(); + this.getSettingInfo(1); } }); @@ -559,7 +562,7 @@ class Exercisesetting extends Component{ } //取消编辑 cancelEdit=()=>{ - this.getSettingInfo(); + this.getSettingInfo(1); this.setState({ flagPageEdit:false }) From 4ab06d8083beb5c215866b191949d1d6ed746ec1 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, 8 Jan 2020 20:38:21 +0800 Subject: [PATCH 17/23] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/exercise/ExerciseListItem.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js index 72b5e579f..8bb42b042 100644 --- a/public/react/src/modules/courses/exercise/ExerciseListItem.js +++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js @@ -188,7 +188,7 @@ class ExerciseListItem extends Component{ - { IsAdmin &&
    + { IsAdmin &&
    this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情 编辑 设置 @@ -215,18 +215,18 @@ class ExerciseListItem extends Component{ { IsStudent && -
    + } { this.props.isNotMember()? item.lock_status === 0 ? "" - :
    + : :"" } From 9d7b1aaf6c18aa61b56b435bbe3bb9564429bd4e Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Thu, 9 Jan 2020 11:05:06 +0800 Subject: [PATCH 18/23] update quill --- .../react/src/common/quillForEditor/README.md | 4 +- .../react/src/common/quillForEditor/index.js | 57 +++++++++++++++++-- .../newOrEditTask/leftpane/editorTab/index.js | 4 +- 3 files changed, 58 insertions(+), 7 deletions(-) diff --git a/public/react/src/common/quillForEditor/README.md b/public/react/src/common/quillForEditor/README.md index 0369164c7..75b403590 100644 --- a/public/react/src/common/quillForEditor/README.md +++ b/public/react/src/common/quillForEditor/README.md @@ -4,7 +4,7 @@ * @Github: * @Date: 2020-01-06 16:20:03 * @LastEditors : tangjiang - * @LastEditTime : 2020-01-06 17:13:19 + * @LastEditTime : 2020-01-09 09:45:29 --> ## QuillForEditor 使用 [https://quilljs.com/] @@ -21,7 +21,7 @@ | autoFocus | 自动获得焦点 | | options | 配置参数, 指定工具栏内容 | | value | 文本编辑器内容 | - | imgAttrs | 指定上传图片的尺寸 | + | imgAttrs | 指定上传图片的尺寸 { width: 'xxpx}, height: 'xxpx'| | style | 指定quill容器样式 | | wrapStyle | 指定包裹quill容器的样式| | onContentChange | 当编辑器内容变化时调用此回调函数(注: 此时返回的内容为对象,提交到后台时需要格式成 JSON 字符串: JSON.stringify(xx)) | diff --git a/public/react/src/common/quillForEditor/index.js b/public/react/src/common/quillForEditor/index.js index 326ca21ae..2cded3fc3 100644 --- a/public/react/src/common/quillForEditor/index.js +++ b/public/react/src/common/quillForEditor/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-12-18 08:49:30 * @LastEditors : tangjiang - * @LastEditTime : 2020-01-06 16:45:50 + * @LastEditTime : 2020-01-09 11:01:51 */ import './index.scss'; import 'quill/dist/quill.core.css'; // 核心样式 @@ -18,11 +18,12 @@ import deepEqual from './deepEqual.js' import { fetchUploadImage } from '../../services/ojService.js'; import { getImageUrl } from 'educoder' import ImageBlot from './ImageBlot'; +import { Modal } from 'antd'; // import Toolbar from 'quill/modules/toolbar'; import FillBlot from './FillBlot'; const Size = Quill.import('attributors/style/size'); const Font = Quill.import('formats/font'); - +const { confirm } = Modal; // const Color = Quill.import('attributes/style/color'); Size.whitelist = ['12px', '14px', '16px', '18px', '20px', false]; Font.whitelist = ['SimSun', 'SimHei','Microsoft-YaHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']; @@ -36,6 +37,7 @@ Quill.register(Font, true); Quill.register(FillBlot); // Quill.register(Color); + function QuillForEditor ({ placeholder, readOnly, @@ -79,10 +81,44 @@ function QuillForEditor ({ const renderOptions = options || defaultConfig; + const bindings = { + tab: { + key: 9, + handler: function () { + console.log('调用了tab=====>>>>'); + } + }, + enter: { + key: 'Enter', + handler: function () { + console.log('enter====>>>>>>'); + } + }, + backspace: { + key: 'Backspace', + handler: function (range, context) { + console.log('调用了删除按钮', range, context); + // 1. 获取删除的文件 + // 2. 判断删除的文件中包含空格的个数 + // 3. 循环调用删除方法 + const r = window.confirm('确定要删除吗?') + console.log('+++++', quill); + if (r) { + // 调用传入的删除事件 + return true + } else { + return false; + } + } + } + }; // quill 配置信息 const quillOption = { modules: { - toolbar: renderOptions + toolbar: renderOptions, + keyboard: { + bindings: bindings + } // toolbar: { // container: renderOptions // } @@ -98,8 +134,14 @@ function QuillForEditor ({ const quillNode = document.createElement('div'); editorRef.current.appendChild(quillNode); const _quill = new Quill(editorRef.current, quillOption); - setQuill(_quill); + // _quill.keyboard.addBinding({ + // key: 'tab' + // }, function (range, context) { + // console.log('点击了键盘的删除按钮: ', range, context); + // }); + + setQuill(_quill); // 处理图片上传功能 _quill.getModule('toolbar').addHandler('image', (e) => { const input = document.createElement('input'); @@ -142,6 +184,12 @@ function QuillForEditor ({ // 点击填空图标时,插入一个下划线 // 1. 获取编辑器内容 }); + + // TODO + /** + * 1.获取键盘删除事件 + * 2.点击时获取删除的叶子节点 getLeaf(range.index) + */ }, []); // 设置值 @@ -232,6 +280,7 @@ function QuillForEditor ({ }, [quill, handleOnChange]); useEffect(() => { + if (!quill) return; if (autoFocus) { quill.focus(); } diff --git a/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js b/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js index 395809901..4784b553a 100644 --- a/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js +++ b/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-20 10:35:40 * @LastEditors : tangjiang - * @LastEditTime : 2020-01-07 15:29:18 + * @LastEditTime : 2020-01-09 11:04:44 */ import './index.scss'; // import 'katex/dist/katex.css'; @@ -291,6 +291,7 @@ class EditTab extends React.Component { // {font: []}, 'image', 'formula', // 数学公式、图片、视频 'clean', // 清除格式 + // 'fill', ]; const renderCourseQuestion = (arrs) => { @@ -452,6 +453,7 @@ class EditTab extends React.Component { colon={ false } > Date: Thu, 9 Jan 2020 11:15:35 +0800 Subject: [PATCH 19/23] =?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 | 2 +- .../courses/busyWork/CommonWorkPost.js | 31 +++++++++++-------- .../tasks/GraduationTasksSubmitedit.js | 25 +++++++++------ .../tasks/GraduationTaskssettinglist.js | 3 +- .../graduation/tasks/Graduationclass.css | 7 +++++ 5 files changed, 44 insertions(+), 24 deletions(-) create mode 100644 public/react/src/modules/courses/graduation/tasks/Graduationclass.css diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 535b19a94..1c626a12c 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -42,7 +42,7 @@ if (isDev) { // 老师 //debugType="teacher"; // 学生 -//debugType="student"; +debugType="student"; function railsgettimes(proxy) { diff --git a/public/react/src/modules/courses/busyWork/CommonWorkPost.js b/public/react/src/modules/courses/busyWork/CommonWorkPost.js index 5e01b21a1..46bdbca5c 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkPost.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkPost.js @@ -68,6 +68,7 @@ class CommonWorkPost extends Component{ uid: item.id, name: appendFileSizeToUploadFile(item), url: item.url, + delete: item.delete, status: 'done' } }) @@ -320,19 +321,23 @@ class CommonWorkPost extends Component{ // ModalSave: ()=>this.deleteAttachment(file), // ModalCancel:this.cancelAttachment // }) - - if(!file.percent || file.percent == 100){ - this.props.confirm({ - content: '是否确认删除?', - onOk: () => { - this.deleteAttachment(file) - }, - onCancel() { - console.log('Cancel'); - }, - }); - return false; - } + if (file.delete === false) { + this.props.showNotification(`该作品已被评阅,不能删除该附件`); + return false + } else { + if (!file.percent || file.percent == 100) { + this.props.confirm({ + content: '是否确认删除?', + onOk: () => { + this.deleteAttachment(file) + }, + onCancel() { + console.log('Cancel'); + }, + }); + return false; + } + } } cancelAttachment=()=>{ diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index 65fcf4d19..f9e93a0de 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -56,6 +56,7 @@ class GraduationTasksSubmitedit extends Component{ name: appendFileSizeToUploadFile(item), url: item.url, filesize: item.filesize, + delete:item.delete, status: 'done' } }) @@ -133,15 +134,21 @@ class GraduationTasksSubmitedit extends Component{ } onAttachmentRemove = (file) => { - if(!file.percent || file.percent == 100){ - this.setState({ - Modalstype:true, - Modalstopval:'确定要删除这个附件吗?', - ModalSave: ()=>this.deleteAttachment(file), - ModalCancel:this.cancelAttachment - }) - return false; - } + if(file.delete===false){ + this.props.showNotification(`该作品已被评阅,不能删除该附件`); + return false + }else{ + if(!file.percent || file.percent == 100){ + this.setState({ + Modalstype:true, + Modalstopval:'确定要删除这个附件吗?', + ModalSave: ()=>this.deleteAttachment(file), + ModalCancel:this.cancelAttachment + }) + return false; + } + } + } diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index c00542233..c9ef0ec0d 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -12,6 +12,7 @@ import ModulationModal from "../../coursesPublic/ModulationModal"; import AllocationModal from "../../coursesPublic/AllocationModal"; import Associationmodel from '../../coursesPublic/Associationmodel'; import AccessoryModal from "../../coursesPublic/AccessoryModal"; +import './Graduationclass.css'; const CheckboxGroup = Checkbox.Group; @@ -826,7 +827,7 @@ class GraduationTaskssettinglist extends Component{ className:'edu-txt-center', render: (text, record) => ( - {record.classroom==="未分班"?"--":record.classroom} + {record.classroom==="未分班"?"--":record.classroom} ), }, { diff --git a/public/react/src/modules/courses/graduation/tasks/Graduationclass.css b/public/react/src/modules/courses/graduation/tasks/Graduationclass.css new file mode 100644 index 000000000..9788284bb --- /dev/null +++ b/public/react/src/modules/courses/graduation/tasks/Graduationclass.css @@ -0,0 +1,7 @@ +.classroomclass{ + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 110px; + display: inline-block; +} \ No newline at end of file From 40eb7f0c0301cf044745fd2d8ddcd12c57a6e0a8 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, 9 Jan 2020 11:17:38 +0800 Subject: [PATCH 20/23] =?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/modules/courses/busyWork/CommonWorkItem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 21c396fe6..244a03e17 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -234,14 +234,14 @@ class CommonWorkItem extends Component{ { // item.work_status && item.work_status.indexOf('关联项目') != -1 && - this.props.toCreateProject(item)}>创建项目 + this.props.toCreateProject(item)}>创建项目 this.props.openConnectionProject(item)}>关联项目 } { // item.work_status && item.work_status.indexOf('取消关联') != -1 && - this.props.cancelConnectionProject(item)}>取消关联 + this.props.cancelConnectionProject(item)}>取消关联 } { // item.work_status && item.work_status.indexOf('提交作品') != -1 && From 4eee0b4b07d87ef23964074d4b400f147b2c729b 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, 9 Jan 2020 11:31:16 +0800 Subject: [PATCH 21/23] =?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/modules/courses/busyWork/CommonWorkPost.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkPost.js b/public/react/src/modules/courses/busyWork/CommonWorkPost.js index 46bdbca5c..f92aa9a91 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkPost.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkPost.js @@ -161,7 +161,7 @@ class CommonWorkPost extends Component{ } e.preventDefault(); if( true ){ - this.props.form.validateFields((err, values) => { + this.props.form.validateFieldsAndScroll((err, values) => { if (!err) { console.log(values.description); // console.log(fileList); From 75560a90c601c7502022f0245ff17ae895e24c2b 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, 9 Jan 2020 11:44:26 +0800 Subject: [PATCH 22/23] =?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/public/css/edu-all.css | 9 +++---- .../courses/coursesPublic/NewShixunModel.js | 24 ++++++++----------- public/stylesheets/educoder/edu-all.css | 9 +++---- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css index 306913b1f..1c3e635db 100644 --- a/public/react/public/css/edu-all.css +++ b/public/react/public/css/edu-all.css @@ -3474,10 +3474,7 @@ a.singlepublishtwo{ margin-bottom: 0 !important; } -/*.ant-notification{*/ - /*width: auto !important;*/ - /*max-width: 600px !important;*/ -/*}*/ + .markdown-body { @@ -3502,3 +3499,7 @@ a.singlepublishtwo{ text-shadow: none !important; box-shadow: none !important; } + +.ant-notification{ + z-index: 10001 !important; +} \ No newline at end of file diff --git a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js index 6ca6cc438..226c6c7c7 100644 --- a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js +++ b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js @@ -234,16 +234,7 @@ class NewShixunModel extends Component{ this.getdatalist(1,undefined,'all',value,'desc',0,20) } - showNotification = (description, message = "提示", icon) => { - const data = { - message, - description - } - if (icon) { - data.icon = icon; - } - notification.open(data); - } + savecouseShixunModal=()=>{ this.setState({ @@ -252,19 +243,24 @@ class NewShixunModel extends Component{ let {coursesId}=this.props; let{Grouplist}=this.state; if(Grouplist.length===0){ + this.setState({ hometypepvisible:false }) - this.showNotification(this.props.type==='shixuns'?"请先选择实训":"请先选择课程") + + this.props.showNotification(this.props.type==='shixuns'?"请先选择实训":"请先选择课程") + return } if (this.props.chooseShixun) { + if(Grouplist.length>1){ + this.setState({ hometypepvisible:false }) - this.showNotification("试卷选择的实训数不能大于1") + this.props.showNotification("试卷选择的实训数不能大于1") return } this.props.chooseShixun(Grouplist) @@ -293,7 +289,7 @@ class NewShixunModel extends Component{ }else{ // this.props.courseshomeworkstart(response.data.category_id,response.data.homework_ids) - this.showNotification("操作成功") + this.props.showNotification("操作成功") this.props.homeworkupdatalists(this.props.Coursename,this.props.page,this.props.order); this.props.hideNewShixunModelType() this.props.updataleftNavfun() @@ -321,7 +317,7 @@ class NewShixunModel extends Component{ }else{ // this.props.courseshomeworkstart(response.data.category_id,response.data.homework_ids) - this.showNotification("操作成功") + this.props.showNotification("操作成功") this.props.homeworkupdatalists(this.props.Coursename,this.props.page,this.props.order); this.props.hideNewShixunModelType() this.props.updataleftNavfun() diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index d620d16d8..529ab871e 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -3784,10 +3784,7 @@ a.singlepublishtwo{ .has-error .ant-input:focus{ border-color: #ff4d4f !important; } -/*.ant-notification{*/ - /*width: auto !important;*/ - /*max-width: 600px !important;*/ -/*}*/ + .fontweight400{ font-weight: 400 !important; } @@ -3800,6 +3797,10 @@ a.singlepublishtwo{ z-index: 10000 !important; } +.ant-notification{ + z-index: 10001 !important; +} + .markdown-body { text-align: justify; word-break: break-all; From aa719044e0d0734f671d94437ee03eb38c090613 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, 9 Jan 2020 11:50:03 +0800 Subject: [PATCH 23/23] =?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/common/comments/CCommentItem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/common/comments/CCommentItem.js b/public/react/src/modules/courses/common/comments/CCommentItem.js index ea98747cc..c440e0424 100644 --- a/public/react/src/modules/courses/common/comments/CCommentItem.js +++ b/public/react/src/modules/courses/common/comments/CCommentItem.js @@ -227,11 +227,11 @@ class CCommentItem extends Component{ } {/* } */} - {item.is_appeal_info && isAdmin && item.appeal_status == 1 && + {item.is_appeal_info && isAdmin && item.appeal_status == 1 && this.props.isAdmin()===true&& this.on_deal_appeal_score(REFUSE, item)} className="fr ml6">拒绝申诉 this.on_deal_appeal_score(ACCEPT, item)} className="fr">接受申诉 } - {item.appeal_status == 1 && this.props.is_author == true && + {item.appeal_status == 1 && this.props.is_author == true && this.props.isStudent()===true && this.cancelMyAppeal()}>撤销申诉}