Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_jupyter

dev_jupyter
杨树林 5 years ago
commit 524cee885c

@ -723,8 +723,8 @@ class User < ApplicationRecord
end end
def validate_sensitive_string def validate_sensitive_string
raise("真实姓名包含敏感词汇,请重新输入") unless HarmoniousDictionary.clean?(lastname) raise("真实姓名包含敏感词汇,请重新输入") if lastname && !HarmoniousDictionary.clean?(lastname)
raise("昵称包含敏感词汇,请重新输入") unless HarmoniousDictionary.clean?(nickname) raise("昵称包含敏感词汇,请重新输入") if nickname && !HarmoniousDictionary.clean?(nickname)
end end
def set_laboratory def set_laboratory

@ -10,26 +10,21 @@
李源潮 李源潮
李干成 李干成
戴秉国 戴秉国
黄镇
刘延东 刘延东
刘瑞龙 刘瑞龙
俞正声 俞正声
黄敬
薄熙来 薄熙来
薄一波 薄一波
周小川 周小川
周建南 周建南
温云松 温云松
徐明
江绵康 江绵康
李小鹏 李小鹏
李小琳 李小琳
朱云来 朱云来
让国人愤怒的第二代身份证 让国人愤怒的第二代身份证
第二代身份证
文化大革命 文化大革命
胡海峰 胡海峰
六四
陈良宇 陈良宇
老丁 老丁
莱仕德事件 莱仕德事件
@ -68,11 +63,9 @@ PK黑社会
反华 反华
官商勾结 官商勾结
升达毕业证 升达毕业证
手机复制
戴海静 戴海静
自杀指南 自杀指南
自杀手册 自杀手册
张小平
佳静安定片 佳静安定片
蒙汗药粉 蒙汗药粉
古方迷香 古方迷香
@ -105,7 +98,6 @@ PK黑社会
反政府 反政府
禁书 禁书
特码 特码
成人
国民党 国民党
贪污 贪污
骚妇 骚妇
@ -154,7 +146,6 @@ PK黑社会
AV AV
十八禁 十八禁
性虐待 性虐待
激情
耽美 耽美
金瓶梅 金瓶梅
藏春阁 藏春阁
@ -181,15 +172,13 @@ AV
政府无能 政府无能
九评 九评
十七大代表 十七大代表
办证
暴力拆迁 暴力拆迁
轮暴致死 轮暴致死
人民报
暴力镇压 暴力镇压
高干子弟名单 高干子弟名单
性免费电影 性免费电影
全裸 全裸
偷拍
中共十七大 中共十七大
徐和柴学友 徐和柴学友
修炼之歌 修炼之歌
@ -250,7 +239,6 @@ A集中营
中共特务 中共特务
乙醚 乙醚
党内分裂 党内分裂
新生网
圆明网 圆明网
和平修炼 和平修炼
放下生死 放下生死
@ -303,10 +291,6 @@ A集中营
明慧周刊 明慧周刊
九评共产党 九评共产党
江泽民其人 江泽民其人
秘密文件
机密文件
红头文件
政府文件
破网软件 破网软件
无界浏览 无界浏览
亲共来源 亲共来源
@ -341,7 +325,6 @@ H漫画
香港GHB水 香港GHB水
色空寺 色空寺
周容重 周容重
朱蒙
汕頭頻傳擄童割器官 汕頭頻傳擄童割器官
法輪功 法輪功
六决不 六决不
@ -371,15 +354,12 @@ H漫画
敢坐飞机吗 敢坐飞机吗
韩国身份证 韩国身份证
台湾身份证 台湾身份证
广电总局
学生暴动 学生暴动
镇压学生 镇压学生
广安第二人民医院 广安第二人民医院
山不过来
胡新宇 胡新宇
趙紫陽 趙紫陽
自由亚州 自由亚州
明慧
践踏中国女性 践踏中国女性
拉凳 拉凳
南京大学法学院 南京大学法学院
@ -389,7 +369,6 @@ H漫画
崔英杰 崔英杰
松花江污染 松花江污染
火药制作 火药制作
江氏
第十六次代表 第十六次代表
仁寿警方 仁寿警方
愈快乐愈堕落 愈快乐愈堕落
@ -433,7 +412,6 @@ H漫画
二奶 二奶
2奶 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禁 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 江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轮 fa轮
亲日 亲日
汉奸 汉奸
政权
政治反对派 政治反对派
政治犯 政治犯
支那 支那
@ -1392,9 +1265,7 @@ fa轮
周锋锁 周锋锁
周天法 周天法
陈水扁 陈水扁
周旋
朱嘉明 朱嘉明
阿扁
二逼 二逼
小鸡鸡 小鸡鸡
卖逼 卖逼
@ -1436,7 +1307,6 @@ fa轮
喷你 喷你
操逼 操逼
淫水 淫水
他妈
操比 操比
杂种 杂种
他母亲 他母亲
@ -1499,13 +1369,11 @@ B样
北美自由论坛 北美自由论坛
博讯 博讯
蔡崇国 蔡崇国
程凯
大纪元新闻网 大纪元新闻网
大众真人真事 大众真人真事
东南西北论谈 东南西北论谈
封杀 封杀
何勇
江猪媳 江猪媳
酱猪媳 酱猪媳
枪支 枪支
毒品 毒品

@ -30,7 +30,7 @@ const env = getClientEnvironment(publicUrl);
module.exports = { module.exports = {
// You may want 'eval' instead if you prefer to see the compiled output in DevTools. // 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 // 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", // 开启调试 //devtool: "source-map", // 开启调试
// These are the "entry points" to our application. // These are the "entry points" to our application.

@ -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{margin-top: 30px;padding-bottom: 30px;border-bottom: 1px solid #eee}
.task-item:last-child{border-bottom: none;} .task-item:last-child{border-bottom: none;}
.challengeNav a.active{color: #4CACFF;} .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:first-child{margin-top: 0px;}
.recomments:last-child{margin-bottom: 0px;border:none;padding-bottom: 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} .url-input{border: none;padding: 0px;font-size: 12px;color:#999;outline: none}
@ -3474,10 +3474,7 @@ a.singlepublishtwo{
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
/*.ant-notification{*/
/*width: auto !important;*/
/*max-width: 600px !important;*/
/*}*/
.markdown-body { .markdown-body {
@ -3496,4 +3493,13 @@ a.singlepublishtwo{
.RightPaneDrawer .jupyter_data_list{ .RightPaneDrawer .jupyter_data_list{
max-height: 340px; max-height: 340px;
}
.ant-btn-primary{
text-shadow: none !important;
box-shadow: none !important;
}
.ant-notification{
z-index: 10001 !important;
} }

@ -42,7 +42,7 @@ if (isDev) {
// 老师 // 老师
//debugType="teacher"; //debugType="teacher";
// 学生 // 学生
//debugType="student"; debugType="student";
function railsgettimes(proxy) { function railsgettimes(proxy) {
@ -149,15 +149,15 @@ export function initAxiosInterceptors(props) {
} }
// //
// console.log(config); // console.log(config);
// if (config.method === "post") { if (config.method === "post") {
// if (requestMap[config.url] === true) { // 避免重复的请求 导致页面f5刷新 也会被阻止 显示这个方法会影响到定制信息 if (requestMap[config.url] === true) { // 避免重复的请求 导致页面f5刷新 也会被阻止 显示这个方法会影响到定制信息
// // console.log(config); // console.log(config);
// // console.log(JSON.parse(config)); // console.log(JSON.parse(config));
// // console.log(config.url); // console.log(config.url);
// // console.log("被阻止了是重复请求================================="); // console.log("被阻止了是重复请求=================================");
// return false; return false;
// } }
// } }
// 非file_update请求 // 非file_update请求
if (config.url.indexOf('update_file') === -1) { if (config.url.indexOf('update_file') === -1) {
requestMap[config.url] = true; requestMap[config.url] = true;

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2020-01-06 16:20:03 * @Date: 2020-01-06 16:20:03
* @LastEditors : tangjiang * @LastEditors : tangjiang
* @LastEditTime : 2020-01-06 17:13:19 * @LastEditTime : 2020-01-09 09:45:29
--> -->
## QuillForEditor 使用 [https://quilljs.com/] ## QuillForEditor 使用 [https://quilljs.com/]
@ -21,7 +21,7 @@
| autoFocus | 自动获得焦点 | | autoFocus | 自动获得焦点 |
| options | 配置参数, 指定工具栏内容 | | options | 配置参数, 指定工具栏内容 |
| value | 文本编辑器内容 | | value | 文本编辑器内容 |
| imgAttrs | 指定上传图片的尺寸 | | imgAttrs | 指定上传图片的尺寸 { width: 'xxpx}, height: 'xxpx'|
| style | 指定quill容器样式 | | style | 指定quill容器样式 |
| wrapStyle | 指定包裹quill容器的样式| | wrapStyle | 指定包裹quill容器的样式|
| onContentChange | 当编辑器内容变化时调用此回调函数(注: 此时返回的内容为对象,提交到后台时需要格式成 JSON 字符串: JSON.stringify(xx)) | | onContentChange | 当编辑器内容变化时调用此回调函数(注: 此时返回的内容为对象,提交到后台时需要格式成 JSON 字符串: JSON.stringify(xx)) |

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-12-18 08:49:30 * @Date: 2019-12-18 08:49:30
* @LastEditors : tangjiang * @LastEditors : tangjiang
* @LastEditTime : 2020-01-06 16:45:50 * @LastEditTime : 2020-01-09 11:01:51
*/ */
import './index.scss'; import './index.scss';
import 'quill/dist/quill.core.css'; // 核心样式 import 'quill/dist/quill.core.css'; // 核心样式
@ -18,11 +18,12 @@ import deepEqual from './deepEqual.js'
import { fetchUploadImage } from '../../services/ojService.js'; import { fetchUploadImage } from '../../services/ojService.js';
import { getImageUrl } from 'educoder' import { getImageUrl } from 'educoder'
import ImageBlot from './ImageBlot'; import ImageBlot from './ImageBlot';
import { Modal } from 'antd';
// import Toolbar from 'quill/modules/toolbar'; // import Toolbar from 'quill/modules/toolbar';
import FillBlot from './FillBlot'; import FillBlot from './FillBlot';
const Size = Quill.import('attributors/style/size'); const Size = Quill.import('attributors/style/size');
const Font = Quill.import('formats/font'); const Font = Quill.import('formats/font');
const { confirm } = Modal;
// const Color = Quill.import('attributes/style/color'); // const Color = Quill.import('attributes/style/color');
Size.whitelist = ['12px', '14px', '16px', '18px', '20px', false]; Size.whitelist = ['12px', '14px', '16px', '18px', '20px', false];
Font.whitelist = ['SimSun', 'SimHei','Microsoft-YaHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']; 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(FillBlot);
// Quill.register(Color); // Quill.register(Color);
function QuillForEditor ({ function QuillForEditor ({
placeholder, placeholder,
readOnly, readOnly,
@ -79,10 +81,44 @@ function QuillForEditor ({
const renderOptions = options || defaultConfig; 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 配置信息 // quill 配置信息
const quillOption = { const quillOption = {
modules: { modules: {
toolbar: renderOptions toolbar: renderOptions,
keyboard: {
bindings: bindings
}
// toolbar: { // toolbar: {
// container: renderOptions // container: renderOptions
// } // }
@ -98,8 +134,14 @@ function QuillForEditor ({
const quillNode = document.createElement('div'); const quillNode = document.createElement('div');
editorRef.current.appendChild(quillNode); editorRef.current.appendChild(quillNode);
const _quill = new Quill(editorRef.current, quillOption); 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) => { _quill.getModule('toolbar').addHandler('image', (e) => {
const input = document.createElement('input'); const input = document.createElement('input');
@ -142,6 +184,12 @@ function QuillForEditor ({
// 点击填空图标时,插入一个下划线 // 点击填空图标时,插入一个下划线
// 1. 获取编辑器内容 // 1. 获取编辑器内容
}); });
// TODO
/**
* 1.获取键盘删除事件
* 2.点击时获取删除的叶子节点 getLeaf(range.index)
*/
}, []); }, []);
// 设置值 // 设置值
@ -232,6 +280,7 @@ function QuillForEditor ({
}, [quill, handleOnChange]); }, [quill, handleOnChange]);
useEffect(() => { useEffect(() => {
if (!quill) return;
if (autoFocus) { if (autoFocus) {
quill.focus(); quill.focus();
} }

@ -75,16 +75,21 @@ class BoardsListItem extends Component{
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl mt4"></i> <i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl mt4"></i>
</Tooltip>) : "" </Tooltip>) : ""
} }
</h6> </h6>
<div className="fr"> <div className="fr">
{(isAdmin || discussMessage.author.login == current_user.login) &&
<WordsBtn style="blue" className="fl font-16 ml28"
onClick={(e) => { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑</WordsBtn> }
{ isAdmin && <WordsBtn style="blue" className="fl font-16 ml28" {(isAdmin || discussMessage.author.login == current_user.login) &&
onClick={(e) => { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}> <WordsBtn style="blue" className="fr font-16 ml28"
{ discussMessage.sticky ? '取消置顶' : '置顶' }</WordsBtn> } onClick={(e) => { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑</WordsBtn> }
{ isAdmin && <WordsBtn style="blue" className="fr font-16 ml28"
onClick={(e) => { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}>
{ discussMessage.sticky ? '取消置顶' : '置顶' }</WordsBtn> }
{canNotLink?"":<WordsBtn style="blue" className="font-16 fr " onClick={canNotLink ? () => {} : () => this.onTitleClick(discussMessage)}>查看详情</WordsBtn>}
</div> </div>
<div className="cl"></div> <div className="cl"></div>
@ -112,14 +117,14 @@ class BoardsListItem extends Component{
</ConditionToolTip> </ConditionToolTip>
</div> </div>
} }
{/* { (isAdmin || discussMessage.author.login == current_user.login) && {/* { (isAdmin || discussMessage.author.login == current_user.login) &&
<div className="homepagePostSetting" style={{"right":"4px","top":"5px","display":"block"}}> <div className="homepagePostSetting" style={{"right":"4px","top":"5px","display":"block"}}>
<ul> <ul>
<li className="edu-position edu-position-hidebox"> <li className="edu-position edu-position-hidebox">
<i className="fa fa-bars color-grey-b"></i> <i className="fa fa-bars color-grey-b"></i>
<ul className="edu-position-hide undis"> <ul className="edu-position-hide undis">
{(isAdmin || discussMessage.author.login == current_user.login) && <li><a href="javascript:void(0)" onClick={(e) => { {(isAdmin || discussMessage.author.login == current_user.login) && <li><a href="javascript:void(0)" onClick={(e) => {
this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} } >编辑</a></li> this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} } >编辑</a></li>
} }
{isAdmin && <li><a href="javascript:void(0)" onClick={(e) => { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();} }> {isAdmin && <li><a href="javascript:void(0)" onClick={(e) => { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();} }>

@ -216,6 +216,9 @@ class CommonWorkItem extends Component{
{/* item.status.indexOf('匿评申诉中') != -1 ? '匿评申诉剩余时间' : ''}>*/} {/* item.status.indexOf('匿评申诉中') != -1 ? '匿评申诉剩余时间' : ''}>*/}
{/*</Tooltip>*/} {/*</Tooltip>*/}
{isAdmin && <div className="fr"> {isAdmin && <div className="fr">
<WordsBtn style="blue" className={"fl font-16 ml28"}
onClick={ canNotLink ? () => {} : () => this.onItemClick(item)}
>查看详情</WordsBtn>
<WordsBtn style="blue" className="fl font-16 ml28" onClick={ () => { this.props.toEditPage(this.props.match.params, item.homework_id) }}>编辑</WordsBtn> <WordsBtn style="blue" className="fl font-16 ml28" onClick={ () => { this.props.toEditPage(this.props.match.params, item.homework_id) }}>编辑</WordsBtn>
<WordsBtn style="blue" className="fl font-16 ml28" onClick={ () => { this.props.toWorkSettingPage(this.props.match.params, item.homework_id) }}>设置</WordsBtn> <WordsBtn style="blue" className="fl font-16 ml28" onClick={ () => { this.props.toWorkSettingPage(this.props.match.params, item.homework_id) }}>设置</WordsBtn>
</div>} </div>}
@ -224,17 +227,21 @@ class CommonWorkItem extends Component{
// //
isStudent && isStudent &&
<li className="fr"> <li className="fr">
<WordsBtn style="blue" className={"fl font-16"}
onClick={ canNotLink ? () => {} : () => this.onItemClick(item)}
>查看详情</WordsBtn>
{ // { //
item.work_status && item.work_status.indexOf('关联项目') != -1 && item.work_status && item.work_status.indexOf('关联项目') != -1 &&
<React.Fragment> <React.Fragment>
<WordsBtn style="blue" className={` font-16 fl`} onClick={() => this.props.toCreateProject(item)}>创建项目</WordsBtn> <WordsBtn style="blue" className={` font-16 fl ml28`} onClick={() => this.props.toCreateProject(item)}>创建项目</WordsBtn>
<WordsBtn style="blue" className={` font-16 fl ml28`} onClick={() => this.props.openConnectionProject(item)}>关联项目</WordsBtn> <WordsBtn style="blue" className={` font-16 fl ml28`} onClick={() => this.props.openConnectionProject(item)}>关联项目</WordsBtn>
</React.Fragment> </React.Fragment>
} }
{ // { //
item.work_status && item.work_status.indexOf('取消关联') != -1 && item.work_status && item.work_status.indexOf('取消关联') != -1 &&
<WordsBtn style="blue" className={` font-16 fl`} onClick={() => this.props.cancelConnectionProject(item)}>取消关联</WordsBtn> <WordsBtn style="blue" className={` font-16 fl ml28`} onClick={() => this.props.cancelConnectionProject(item)}>取消关联</WordsBtn>
} }
{ // { //
item.work_status && item.work_status.indexOf('提交作品') != -1 && item.work_status && item.work_status.indexOf('提交作品') != -1 &&
@ -273,6 +280,8 @@ class CommonWorkItem extends Component{
// //
item.work_status && item.work_status.indexOf('查看作品') != -1 && item.work_status && item.work_status.indexOf('查看作品') != -1 &&
<WordsBtn style="blue" className="fl font-16 ml28" onClick={() => this.props.toWorkDetailPage(this.props.match.params, item.homework_id, item.work_id)}>查看作品</WordsBtn> } <WordsBtn style="blue" className="fl font-16 ml28" onClick={() => this.props.toWorkDetailPage(this.props.match.params, item.homework_id, item.work_id)}>查看作品</WordsBtn> }
</li> </li>
} }
</p> </p>

@ -68,6 +68,7 @@ class CommonWorkPost extends Component{
uid: item.id, uid: item.id,
name: appendFileSizeToUploadFile(item), name: appendFileSizeToUploadFile(item),
url: item.url, url: item.url,
delete: item.delete,
status: 'done' status: 'done'
} }
}) })
@ -160,7 +161,7 @@ class CommonWorkPost extends Component{
} }
e.preventDefault(); e.preventDefault();
if( true ){ if( true ){
this.props.form.validateFields((err, values) => { this.props.form.validateFieldsAndScroll((err, values) => {
if (!err) { if (!err) {
console.log(values.description); console.log(values.description);
// console.log(fileList); // console.log(fileList);
@ -320,19 +321,23 @@ class CommonWorkPost extends Component{
// ModalSave: ()=>this.deleteAttachment(file), // ModalSave: ()=>this.deleteAttachment(file),
// ModalCancel:this.cancelAttachment // ModalCancel:this.cancelAttachment
// }) // })
if (file.delete === false) {
if(!file.percent || file.percent == 100){ this.props.showNotification(`该作品已被评阅,不能删除该附件`);
this.props.confirm({ return false
content: '是否确认删除?', } else {
onOk: () => { if (!file.percent || file.percent == 100) {
this.deleteAttachment(file) this.props.confirm({
}, content: '是否确认删除?',
onCancel() { onOk: () => {
console.log('Cancel'); this.deleteAttachment(file)
}, },
}); onCancel() {
return false; console.log('Cancel');
} },
});
return false;
}
}
} }
cancelAttachment=()=>{ cancelAttachment=()=>{

@ -35,8 +35,8 @@ class UseBank extends Component{
} }
} }
componentDidMount() { componentDidMount() {
console.log("UseBank"); // console.log("UseBank");
console.log(this.props); // console.log(this.props);
} }
onCheckBoxChange = (checkBoxValues) => { 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 { flag, nav_my, loading, hasMore, object_list, search, checkBoxValues,isChecked,page,is_teacher }=this.state
let { object_type }=this.props; let { object_type }=this.props;
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />; const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
console.log("题库选用2222"); // console.log("题库选用2222");
console.log("UseBank"); // console.log("UseBank");
console.log(this.props); // console.log(this.props);
return( return(
<a> <a>
<style>{` <style>{`

@ -218,7 +218,7 @@ class commonWork extends Component{
this.getList(1,search,order); this.getList(1,search,order);
this.props.updataleftNavfun() this.props.updataleftNavfun()
} }
console.log(response)
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}) })
@ -254,7 +254,7 @@ class commonWork extends Component{
let {search,order, page}=this.state; let {search,order, page}=this.state;
this.getList(page,search,order); this.getList(page,search,order);
} }
console.log(response)
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}) })
@ -296,7 +296,7 @@ class commonWork extends Component{
let {search,order}=this.state; let {search,order}=this.state;
this.getList(1,search,order); this.getList(1,search,order);
} }
console.log(response)
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}) })

@ -227,11 +227,11 @@ class CCommentItem extends Component{
</Tooltip> } </Tooltip> }
{/* </React.Fragment> {/* </React.Fragment>
} */} } */}
{item.is_appeal_info && isAdmin && item.appeal_status == 1 && <React.Fragment> {item.is_appeal_info && isAdmin && item.appeal_status == 1 && this.props.isAdmin()===true&&<React.Fragment>
<WordsBtn style="grey" onClick={() => this.on_deal_appeal_score(REFUSE, item)} className="fr ml6">拒绝申诉</WordsBtn> <WordsBtn style="grey" onClick={() => this.on_deal_appeal_score(REFUSE, item)} className="fr ml6">拒绝申诉</WordsBtn>
<WordsBtn style="orange" onClick={() => this.on_deal_appeal_score(ACCEPT, item)} className="fr">接受申诉</WordsBtn> <WordsBtn style="orange" onClick={() => this.on_deal_appeal_score(ACCEPT, item)} className="fr">接受申诉</WordsBtn>
</React.Fragment>} </React.Fragment>}
{item.appeal_status == 1 && this.props.is_author == true && {item.appeal_status == 1 && this.props.is_author == true && this.props.isStudent()===true &&
<WordsBtn style="blue" className="fr mr5" onClick={() => this.cancelMyAppeal()}>撤销申诉</WordsBtn>} <WordsBtn style="blue" className="fr mr5" onClick={() => this.cancelMyAppeal()}>撤销申诉</WordsBtn>}
</div> </div>

@ -14,7 +14,7 @@
/* 改宽度 */ /* 改宽度 */
.course-message .panel-comment_item .comment_orig_content { .course-message .panel-comment_item .comment_orig_content {
/* width: 1024px; */ /* width: 1024px; */
width: 1046px; width: 1040px;
} }
/* 子回复按钮 */ /* 子回复按钮 */
.course-message .reply_to_message a.commentsbtn.task-btn-blue { .course-message .reply_to_message a.commentsbtn.task-btn-blue {

@ -530,20 +530,22 @@ class Coursesleftnav extends Component{
{name:value}).then((result)=>{ {name:value}).then((result)=>{
if(result!=undefined){ if(result!=undefined){
if(result.data.status===0){ if(result.data.status===0){
// window.location.reload()
this.updasaveNavmoda()
//
notification.open({ notification.open({
message:"提示", message:"提示",
description:result.data.message description:result.data.message
}); });
trigger('updateNavSuccess')
if(positiontype==="files"){ if(positiontype==="files"){
this.updasaveNavmoda()
trigger('updateNavSuccess')
window.location.href=`/courses/${coursesId}/file/${result.data.category_id}`; window.location.href=`/courses/${coursesId}/file/${result.data.category_id}`;
} }
if(positiontype==="boards"){ if(positiontype==="boards"){
this.updasaveNavmoda()
trigger('updateNavSuccess')
window.location.href=`/courses/${coursesId}/boards/${result.data.category_id}`; window.location.href=`/courses/${coursesId}/boards/${result.data.category_id}`;
} }

@ -18,7 +18,7 @@ class NewShixunModel extends Component{
keyword:undefined, keyword:undefined,
order:'desc', order:'desc',
diff:0, diff:0,
limit:15, limit:20,
sort:"myshixuns_count", sort:"myshixuns_count",
belongtoindex:0, belongtoindex:0,
} }
@ -229,21 +229,12 @@ class NewShixunModel extends Component{
status:'all', status:'all',
order:'desc', order:'desc',
diff:0, diff:0,
limit:15, limit:20,
}) })
this.getdatalist(1,undefined,'all',value,'desc',0,15) 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=()=>{ savecouseShixunModal=()=>{
this.setState({ this.setState({
@ -252,19 +243,24 @@ class NewShixunModel extends Component{
let {coursesId}=this.props; let {coursesId}=this.props;
let{Grouplist}=this.state; let{Grouplist}=this.state;
if(Grouplist.length===0){ if(Grouplist.length===0){
this.setState({ this.setState({
hometypepvisible:false hometypepvisible:false
}) })
this.showNotification(this.props.type==='shixuns'?"请先选择实训":"请先选择课程")
this.props.showNotification(this.props.type==='shixuns'?"请先选择实训":"请先选择课程")
return return
} }
if (this.props.chooseShixun) { if (this.props.chooseShixun) {
if(Grouplist.length>1){ if(Grouplist.length>1){
this.setState({ this.setState({
hometypepvisible:false hometypepvisible:false
}) })
this.showNotification("试卷选择的实训数不能大于1") this.props.showNotification("试卷选择的实训数不能大于1")
return return
} }
this.props.chooseShixun(Grouplist) this.props.chooseShixun(Grouplist)
@ -293,7 +289,7 @@ class NewShixunModel extends Component{
}else{ }else{
// this.props.courseshomeworkstart(response.data.category_id,response.data.homework_ids) // 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.homeworkupdatalists(this.props.Coursename,this.props.page,this.props.order);
this.props.hideNewShixunModelType() this.props.hideNewShixunModelType()
this.props.updataleftNavfun() this.props.updataleftNavfun()
@ -321,7 +317,7 @@ class NewShixunModel extends Component{
}else{ }else{
// this.props.courseshomeworkstart(response.data.category_id,response.data.homework_ids) // 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.homeworkupdatalists(this.props.Coursename,this.props.page,this.props.order);
this.props.hideNewShixunModelType() this.props.hideNewShixunModelType()
this.props.updataleftNavfun() this.props.updataleftNavfun()
@ -692,11 +688,11 @@ class NewShixunModel extends Component{
} }
</Checkbox.Group> </Checkbox.Group>
{shixun_list===undefined||shixuns_count===undefined?"":shixun_list.length===0||shixuns_count===0?"":shixuns_count>15?<div className={" edu-txt-center pd303010 newshixunmodels"}> {shixun_list===undefined||shixuns_count===undefined?"":shixun_list.length===0||shixuns_count===0?"":shixuns_count>20?<div className={" edu-txt-center pd303010 newshixunmodels"}>
<Pagination <Pagination
showQuickJumper showQuickJumper
defaultCurrent={1} defaultCurrent={1}
pageSize={15} pageSize={20}
total={shixuns_count===undefined?"":shixuns_count} total={shixuns_count===undefined?"":shixuns_count}
current={page} current={page}
onChange={this.PaginationCourse} onChange={this.PaginationCourse}

@ -51,8 +51,7 @@ class Startshixuntask extends Component{
}, 1000) }, 1000)
if(response.data.status!=401&&response.data.status!=403){ if(response.data.status!=401&&response.data.status!=403){
const w=window.open('about:blank'); window.open( `/tasks/${response.data.game_identifier}`)
w.location.href= "/tasks/"+response.data.game_identifier
} }
} }

@ -185,8 +185,12 @@ class ExerciseListItem extends Component{
{/*}*/} {/*}*/}
{ IsAdmin &&<div className="homepagePostSetting" style={{"right":"-17px","top":"51px","display":"block","width":"100px"}}>
<Link className="btn colorblue font-16" to={`/courses/${coursesId}/exercises/${item.id}/edit`}>编辑</Link>
{ IsAdmin &&<div className="homepagePostSetting" style={{"right":"-17px","top":"46px","display":"block","width":"200px"}}>
<a className="btn colorblue font-16 ml20" onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情</a>
<Link className="btn colorblue font-16 ml20" to={`/courses/${coursesId}/exercises/${item.id}/edit`}>编辑</Link>
<Link className="btn colorblue ml20 font-16" to={`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=3`}>设置</Link> <Link className="btn colorblue ml20 font-16" to={`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=3`}>设置</Link>
</div> } </div> }
@ -211,12 +215,22 @@ class ExerciseListItem extends Component{
{ {
IsStudent && IsStudent &&
<div className="homepagePostSetting" style={{"right":"0px","top":"62px","position":"absolute","display":"block"}}> <div className="homepagePostSetting" style={{"right":"0px","top":"46px","position":"absolute","display":"block"}}>
{item.current_status ===0&&item.exercise_status>1? <li> <Link className="btn colorblue font-16" to={`/courses/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`}>继续答题</Link></li>: <li className={"fl"}> <a className="btn colorblue font-16" onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情</a></li>
item.current_status ===1&&item.exercise_status>1? <li> <a className="btn colorblue font-16" target="_blank" href={`/courses/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`}>查看答题</a></li>: {item.current_status ===0&&item.exercise_status>1? <li className={"fl ml20"}> <Link className="btn colorblue font-16" to={`/courses/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`}>继续答题</Link></li>:
item.current_status ===2&&item.exercise_status>1? <li> <a className="btn colorblue ml20 font-16" onClick={()=>this.setgameexercise(`/courses/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`)}>开始答题</a></li>:""} item.current_status ===1&&item.exercise_status>1? <li className={"fl ml20"}> <a className="btn colorblue font-16" target="_blank" href={`/courses/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`}>查看答题</a></li>:
item.current_status ===2&&item.exercise_status>1? <li className={"fl ml20"}s> <a className="btn colorblue font-16" onClick={()=>this.setgameexercise(`/courses/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`)}>开始答题</a></li>:""}
</div> </div>
} }
{
this.props.isNotMember()? item.lock_status === 0 ?
""
: <div className="homepagePostSetting" style={{"right":"0px","top":"42px","position":"absolute","display":"block"}}>
<li> <a className="btn colorblue font-16" onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情</a></li>
</div>:""
}
</div> </div>
</div> </div>
) )

@ -131,8 +131,11 @@ class Exercisesetting extends Component{
// } // }
// 已有设置数据的查询 // 已有设置数据的查询
getSettingInfo=()=>{ getSettingInfo=(type)=>{
this.props.Commonheadofthetestpapers() if(type!=1){
this.props.Commonheadofthetestpapers()
}
let Id=this.props.match.params.Id; let Id=this.props.match.params.Id;
let url=`/exercises/${Id}/exercise_setting.json`; let url=`/exercises/${Id}/exercise_setting.json`;
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
@ -241,10 +244,10 @@ class Exercisesetting extends Component{
let{unified_setting}=this.state let{unified_setting}=this.state
if(unified_setting==true){ if(unified_setting==true){
console.log("统一设置"); console.log("统一设置");
this.UnifiedSetting(); this.UnifiedSetting( );
}else{ }else{
console.log("非统一设置"); console.log("非统一设置");
this.NotUnifiedSetting(); this.NotUnifiedSetting( );
} }
} }
}) })
@ -347,7 +350,7 @@ class Exercisesetting extends Component{
console.log(result) console.log(result)
if(result.status==200){ if(result.status==200){
this.props.showNotification(`${result.data.message}`); this.props.showNotification(`${result.data.message}`);
this.getSettingInfo(); this.getSettingInfo(1);
this.cancelEdit(); this.cancelEdit();
} }
}) })
@ -367,7 +370,7 @@ class Exercisesetting extends Component{
if(result.status==200){ if(result.status==200){
this.props.showNotification(`${result.data.message}`); this.props.showNotification(`${result.data.message}`);
this.cancelEdit(); this.cancelEdit();
this.getSettingInfo(); this.getSettingInfo(1);
} }
}); });
@ -559,7 +562,7 @@ class Exercisesetting extends Component{
} }
//取消编辑 //取消编辑
cancelEdit=()=>{ cancelEdit=()=>{
this.getSettingInfo(); this.getSettingInfo(1);
this.setState({ this.setState({
flagPageEdit:false flagPageEdit:false
}) })

@ -300,12 +300,19 @@ class GraduateTaskItem extends Component{
{this.props.isAdmin? {this.props.isAdmin?
<div className="mt13"> <div className="mt13">
<WordsBtn style="blue" to={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/setting"} className="colorblue font-16 mrf4 fr"> <WordsBtn style="blue" to={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/setting"} className="colorblue font-16 mrf4 fr">
<a className="btn colorblue">设置</a> <a className="btn colorblue">设置</a>
</WordsBtn> </WordsBtn>
<WordsBtn style="blue" to={"/courses/"+coursesId+"/graduation_tasks/"+taskid+"/edit"} className="colorblue font-16 mr20 fr"> <WordsBtn style="blue" to={"/courses/"+coursesId+"/graduation_tasks/"+taskid+"/edit"} className="colorblue font-16 mr20 fr">
<a className="btn colorblue" >编辑</a> <a className="btn colorblue" >编辑</a>
</WordsBtn> </WordsBtn>
<WordsBtn style="blue" onClick={()=>this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
className="btn colorblue colorblue font-16 mr20 fr">
查看详情
</WordsBtn>
</div> </div>
:""} :""}
@ -319,6 +326,8 @@ class GraduateTaskItem extends Component{
return( return(
<span key={key}> <span key={key}>
{item==="提交作品"? {item==="提交作品"?
<WordsBtn style="blue" className="colorblue font-16 ml20 fr mt12"> <WordsBtn style="blue" className="colorblue font-16 ml20 fr mt12">
@ -384,6 +393,11 @@ class GraduateTaskItem extends Component{
) )
}):""} }):""}
{this.props.isStudent?
<WordsBtn style="blue" onClick={()=>this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
className="colorblue font-16 ml20 fr mt12">
查看详情
</WordsBtn>:""}
</div> </div>
</div> </div>

@ -544,7 +544,7 @@ class GraduationTaskDetail extends Component{
{ this.props.isAdmin() ? questionslist.status===0 ? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.publish()} }>立即发布</a> : "" : "" } { this.props.isAdmin() ? questionslist.status===0 ? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.publish()} }>立即发布</a> : "" : "" }
{ this.props.isAdmin() && questionslist.cross_comment ? <a className={"fr color-blue font-16"} onClick={this.openAcross}>交叉评阅设置</a> : "" } { this.props.isAdmin() && questionslist.cross_comment ? <a className={"fr color-blue font-16"} onClick={this.openAcross}>交叉评阅设置</a> : "" }
{ this.props.isAdmin() ? <a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a> : "" } { this.props.isAdmin() ? <a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a> : "" }
{/*{ this.props.user&&this.props.user.admin===true || this.props.user&&this.props.user.business===true ? <a className={"fr color-blue font-16"} onClick={()=>this.CodeReview()}>代码评测</a> : "" }*/} { this.props.user&&this.props.user.admin===true || this.props.user&&this.props.user.business===true ? <a className={"fr color-blue font-16"} onClick={()=>this.CodeReview()}>代码评测</a> : "" }
</div> </div>
</div> </div>

@ -56,6 +56,7 @@ class GraduationTasksSubmitedit extends Component{
name: appendFileSizeToUploadFile(item), name: appendFileSizeToUploadFile(item),
url: item.url, url: item.url,
filesize: item.filesize, filesize: item.filesize,
delete:item.delete,
status: 'done' status: 'done'
} }
}) })
@ -133,15 +134,21 @@ class GraduationTasksSubmitedit extends Component{
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
if(!file.percent || file.percent == 100){ if(file.delete===false){
this.setState({ this.props.showNotification(`该作品已被评阅,不能删除该附件`);
Modalstype:true, return false
Modalstopval:'确定要删除这个附件吗?', }else{
ModalSave: ()=>this.deleteAttachment(file), if(!file.percent || file.percent == 100){
ModalCancel:this.cancelAttachment this.setState({
}) Modalstype:true,
return false; Modalstopval:'确定要删除这个附件吗?',
} ModalSave: ()=>this.deleteAttachment(file),
ModalCancel:this.cancelAttachment
})
return false;
}
}
} }

@ -12,6 +12,7 @@ import ModulationModal from "../../coursesPublic/ModulationModal";
import AllocationModal from "../../coursesPublic/AllocationModal"; import AllocationModal from "../../coursesPublic/AllocationModal";
import Associationmodel from '../../coursesPublic/Associationmodel'; import Associationmodel from '../../coursesPublic/Associationmodel';
import AccessoryModal from "../../coursesPublic/AccessoryModal"; import AccessoryModal from "../../coursesPublic/AccessoryModal";
import './Graduationclass.css';
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;
@ -51,6 +52,7 @@ class GraduationTaskssettinglist extends Component{
visibles:false, visibles:false,
DownloadType:false, DownloadType:false,
DownloadMessageval:undefined, DownloadMessageval:undefined,
commentstate:null
} }
} }
@ -88,13 +90,13 @@ class GraduationTaskssettinglist extends Component{
course_groupslist:[], course_groupslist:[],
checkAllValue:false checkAllValue:false
}) })
let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search} = this.state; let {commentstate, 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); 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; let{page,limit}=this.state;
// console.log(teacher_comment,task_status,course_group,cross_comment,order,b_order,search) // console.log(teacher_comment,task_status,course_group,cross_comment,order,b_order,search)
@ -104,7 +106,7 @@ class GraduationTaskssettinglist extends Component{
//get 数组 //get 数组
axios.get(url,{ axios.get(url,{
params: { 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, task_status:task_status===null?undefined:task_status,
course_group:course_group===null?undefined:course_group, course_group:course_group===null?undefined:course_group,
cross_comment:cross_comment===null?undefined:cross_comment, cross_comment:cross_comment===null?undefined:cross_comment,
@ -229,31 +231,56 @@ class GraduationTaskssettinglist extends Component{
} }
funteachercomment=(list,key)=> { 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; 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){ if(listype===false){
this.setState({ this.setState({
teacher_comment:null, teacher_comment:null,
loadingstate:true loadingstate:true,
commentstate:null
}) })
}else{ }else{
if(list.length>0){
list.map((item,key)=>{
if(key===0){
asum=item;
}
})
}else{
asum=undefined
}
this.setState({ this.setState({
teacher_comment:list, teacher_comment:list,
loadingstate:true loadingstate:true,
commentstate:asum,
}) })
} }
this.seacthdata(asum, task_status, course_group, cross_comment, order, b_order, search,this.state.page);
if(list.length===key){ this.props.getsonar(asum, task_status, course_group, cross_comment, search)
this.seacthdata(undefined, task_status, course_group, cross_comment, order, b_order, search,this.state.page); // if(list.length===key){
this.props.getsonar(undefined, task_status, course_group, cross_comment, search) // this.seacthdata(undefined, task_status, course_group, cross_comment, order, b_order, search,this.state.page);
}else{ // this.props.getsonar(undefined, task_status, course_group, cross_comment, search)
this.seacthdata(list[0], task_status, course_group, cross_comment, order, b_order, search,this.state.page); // }else{
this.props.getsonar(list[0], task_status, course_group, cross_comment, search) // 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)
} //
// }
} }
@ -261,14 +288,14 @@ class GraduationTaskssettinglist extends Component{
funcross_comment=(e)=>{ 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({ this.setState({
cross_comment:e.target.value===undefined||e.target.value===false?null:e.target.value, cross_comment:e.target.value===undefined||e.target.value===false?null:e.target.value,
loadingstate:true 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(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)=>{ inputSearchValue=(e)=>{
@ -288,24 +315,24 @@ class GraduationTaskssettinglist extends Component{
searchValue=()=>{ 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({ this.setState({
loadingstate:true 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(teacher_comment, task_status, course_group, cross_comment, search) this.props.getsonar(commentstate, task_status, course_group, cross_comment, search)
} }
funorder = (value, newb_order) => { 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({ this.setState({
order: value, order: value,
b_order: newb_order, b_order: newb_order,
loadingstate: true 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(teacher_comment, task_status, course_group, cross_comment, search) this.props.getsonar(commentstate, task_status, course_group, cross_comment, search)
} }
@ -313,7 +340,7 @@ class GraduationTaskssettinglist extends Component{
funtaskstatus=(checkedValues,key)=>{ funtaskstatus=(checkedValues,key)=>{
// console.log(checkedValues) // 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;
@ -325,8 +352,8 @@ class GraduationTaskssettinglist extends Component{
task_status:undefined, task_status:undefined,
loadingstate:true 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(teacher_comment, null, course_group, cross_comment, search) this.props.getsonar(commentstate, null, course_group, cross_comment, search)
} }
// else if(checkedValues.length ===key){ // else if(checkedValues.length ===key){
// // 全部抖选中 自然就是查找全部 就是空 // // 全部抖选中 自然就是查找全部 就是空
@ -342,8 +369,8 @@ class GraduationTaskssettinglist extends Component{
task_status:checkedValues===key?null:checkedValues, task_status:checkedValues===key?null:checkedValues,
loadingstate:true 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(teacher_comment, checkedValues===key?undefined:checkedValues, course_group, cross_comment, search) this.props.getsonar(commentstate, checkedValues===key?undefined:checkedValues, course_group, cross_comment, search)
} }
@ -352,7 +379,7 @@ class GraduationTaskssettinglist extends Component{
// console.log(checkedValues); // console.log(checkedValues);
// console.log(key); // 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) === "[]"){ if(JSON.stringify(checkedValues) === "[]"){
// console.log(checkedValues); // console.log(checkedValues);
@ -361,8 +388,8 @@ class GraduationTaskssettinglist extends Component{
course_group:undefined, course_group:undefined,
loadingstate:true 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(teacher_comment,task_status, null, cross_comment, search) this.props.getsonar(commentstate,task_status, null, cross_comment, search)
} }
// else if(checkedValues.length ===key){ // else if(checkedValues.length ===key){
// // 全部抖选中 自然就是查找全部 就是空 // // 全部抖选中 自然就是查找全部 就是空
@ -379,8 +406,8 @@ class GraduationTaskssettinglist extends Component{
course_group:checkedValues===key?null:checkedValues, course_group:checkedValues===key?null:checkedValues,
loadingstate:true 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(teacher_comment,task_status, checkedValues===key?undefined:checkedValues, cross_comment, search) this.props.getsonar(commentstate,task_status, checkedValues===key?undefined:checkedValues, cross_comment, search)
} }
@ -561,7 +588,7 @@ class GraduationTaskssettinglist extends Component{
saveModulationModal=(value,num)=>{ 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; let {operationId}=this.state;
// console.log(value,num) // console.log(value,num)
@ -572,8 +599,8 @@ class GraduationTaskssettinglist extends Component{
}).then((result)=>{ }).then((result)=>{
// console.log(result) // console.log(result)
if(result.data.status===0){ 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(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.props.showNotification(result.data.message);
this.cancelmodel(); this.cancelmodel();
this.setState({ this.setState({
@ -689,18 +716,18 @@ class GraduationTaskssettinglist extends Component{
this.setState({ this.setState({
page: pageNumber, 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.seacthdata(commentstate,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){ 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 ={ let params ={
teacher_comment:teacher_comment, teacher_comment:commentstate,
task_status:task_status, task_status:task_status,
course_group:course_group, course_group:course_group,
cross_comment:cross_comment, cross_comment:cross_comment,
@ -750,8 +777,8 @@ class GraduationTaskssettinglist extends Component{
} }
render(){ render(){
let {coursename,coursesearch,taskname,taskid,taskslistdata,data,page,limit,teacher_comment,task_status,cross_comment,search,loadingstate, let { taskslistdata,data,page,limit,teacher_comment,task_status,cross_comment,search,loadingstate,
order, course_group,Modalstype,Modalstopval,ModalCancel,ModalSave,modalname,Modulationtype,operationId,Allocationtype,visibles, course_group,Modalstype,Modalstopval,ModalCancel,ModalSave,modalname,Modulationtype,Allocationtype,visibles,
visible, visible,
Topval, Topval,
Topvalright, Topvalright,
@ -800,7 +827,7 @@ class GraduationTaskssettinglist extends Component{
className:'edu-txt-center', className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{color:'#9A9A9A'}}>{record.classroom==="未分班"?"--":record.classroom}</a> <a style={{color:'#9A9A9A'}} className={"classroomclass"} title={record.classroom==="未分班"?"":record.classroom}>{record.classroom==="未分班"?"--":record.classroom}</a>
</span> </span>
), ),
}, { }, {
@ -1348,7 +1375,7 @@ class GraduationTaskssettinglist extends Component{
<a id="graduation_comment_no_limit" alue={null} className={teacher_comment===null?"pl10 pr10 check_on":"pl10 pr10 "} onClick={this.funteachercomment}>全部</a> <a id="graduation_comment_no_limit" alue={null} className={teacher_comment===null?"pl10 pr10 check_on":"pl10 pr10 "} onClick={this.funteachercomment}>全部</a>
</span> </span>
<CheckboxGroup value={teacher_comment} onChange={(e)=>this.funteachercomment(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.length)} style={{ paddingTop: '4px'}}> <CheckboxGroup value={teacher_comment} onChange={(e)=>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)=>{ {taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.map((item,key)=>{
return( return(
<span key={key}> <span key={key}>

@ -0,0 +1,7 @@
.classroomclass{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 110px;
display: inline-block;
}

@ -120,22 +120,32 @@ class GraduateTopicItem extends Component{
</span> </span>
<span className="fl mr20 color-grey-9 mt1">{discussMessage.selected_count} 已选</span> <span className="fl mr20 color-grey-9 mt1">{discussMessage.selected_count} 已选</span>
<span className="fl color-grey-9 mt1">{discussMessage.confirmation_count} 已确认</span> <span className="fl color-grey-9 mt1">{discussMessage.confirmation_count} 已确认</span>
<span className="fr"> <span className="fr">
{ {
isAdmin && <WordsBtn onClick={()=>this.editTopic(`${discussMessage.id}`)} style="blue" className="font-16">编辑</WordsBtn> isStudent?<WordsBtn style="blue" onClick={() => this.toDetailPage(`${discussMessage.id}`)}
className="font-16 mr20" >查看详情</WordsBtn>:""
}
{
isAdmin?<WordsBtn style="blue" onClick={() => this.toDetailPage(`${discussMessage.id}`)} className="font-16 mr20" >查看详情</WordsBtn>:""
}
{
isAdmin && <WordsBtn onClick={()=>this.editTopic(`${discussMessage.id}`)} style="blue" className="font-16 ">编辑</WordsBtn>
} }
{ {
isStudent && data.user_selected == true && discussMessage.user_topic_status==0 && isStudent && data.user_selected == true && discussMessage.user_topic_status==0 &&
<WordsBtn onClick={()=>chooseTopic(`${discussMessage.id}`,index,true)} style="blue" className="font-16"> <WordsBtn onClick={()=>chooseTopic(`${discussMessage.id}`,index,true)} style="blue" className="font-16 mr20">
取消选题 取消选题
</WordsBtn> </WordsBtn>
} }
{ {
isStudent && data.user_selected==false && (discussMessage.user_topic_status == null || discussMessage.user_topic_status == 2) && isStudent && data.user_selected==false && (discussMessage.user_topic_status == null || discussMessage.user_topic_status == 2) &&
<WordsBtn onClick={()=>chooseTopic(`${discussMessage.id}`,index,false)} style="blue" className="font-16"> <WordsBtn onClick={()=>chooseTopic(`${discussMessage.id}`,index,false)} style="blue" className="font-16 mr20">
选题 选题
</WordsBtn> </WordsBtn>
} }
</span> </span>
</p> </p>
</div> </div>

@ -53,7 +53,7 @@ function ChangeRolePop({ member_roles = [], record, courseId, onChangeRoleSucces
} }
} }
console.log(response)
} }
const isAdmin = checkBoxRoles.indexOf('CREATOR') != -1 const isAdmin = checkBoxRoles.indexOf('CREATOR') != -1
const isTeacher = checkBoxRoles.indexOf('PROFESSOR') != -1 const isTeacher = checkBoxRoles.indexOf('PROFESSOR') != -1

@ -55,7 +55,7 @@ function CourseGroupList(props) {
const response = await axios.get(url, { params: { const response = await axios.get(url, { params: {
search: searchValue search: searchValue
}}); }});
console.log(response)
setIsSpin(false) setIsSpin(false)
if (response) { if (response) {
setListRes(response.data) setListRes(response.data)

@ -97,8 +97,12 @@ class PollListItem extends Component{
<span className="mr20 fl mt3">{"提交剩余时间:"+formatDuring(t)}</span> <span className="mr20 fl mt3">{"提交剩余时间:"+formatDuring(t)}</span>
</Tooltip> </Tooltip>
} }
{ {
isStudent ? <WordsBtn style="blue" targets={item.current_status == 2||item.current_status == 0?undefined:'_blank'} className="fr font-16" to={`/courses/${coursesId}/polls/${item.id}/users/${this.props.current_user.login}`}> isStudent ? <WordsBtn style="blue" targets={item.current_status == 2||item.current_status == 0?undefined:'_blank'} className="fr font-16 ml20" to={`/courses/${coursesId}/polls/${item.id}/users/${this.props.current_user.login}`}>
{ {
item.current_status == 0 && "继续答题" item.current_status == 0 && "继续答题"
} }
@ -110,10 +114,13 @@ class PollListItem extends Component{
} }
</WordsBtn>:"" </WordsBtn>:""
} }
{ isStudent ?canNotLink ?"": <WordsBtn style="blue" className="font-16 fr " onClick={()=>this.toDetailPage(`/courses/${coursesId}/polls/${item.id}/detail`)} >查看详情</WordsBtn>:""}
{ {
IsAdmin && IsAdmin &&
<ul className="fr"> <ul className="fr">
<WordsBtn style="blue" className="font-16" to={`/courses/${coursesId}/polls/${item.id}/${"edit"}`}>编辑</WordsBtn> { canNotLink ?"": <WordsBtn style="blue" className="font-16" onClick={()=>this.toDetailPage(`/courses/${coursesId}/polls/${item.id}/detail`)} >查看详情</WordsBtn>}
<WordsBtn style="blue" className="font-16 ml20" to={`/courses/${coursesId}/polls/${item.id}/${"edit"}`}>编辑</WordsBtn>
<WordsBtn style="blue" className="ml20 font-16" to={`/courses/${coursesId}/polls/${item.id}/detail?tab=3`}>设置</WordsBtn> <WordsBtn style="blue" className="ml20 font-16" to={`/courses/${coursesId}/polls/${item.id}/detail?tab=3`}>设置</WordsBtn>
</ul> </ul>
} }

@ -388,6 +388,7 @@ class ShixunHomeworkPage extends Component {
teacherdatapage === undefined ? "" teacherdatapage === undefined ? ""
: teacherdatapage.commit_des === null || teacherdatapage.commit_des === undefined ? "" : : teacherdatapage.commit_des === null || teacherdatapage.commit_des === undefined ? "" :
<a className="fr color-blue font-16" <a className="fr color-blue font-16"
target={"_blank"}
href={`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${teacherdatapage === undefined ? "" : teacherdatapage.id}/commitsummary/${this.props.match.params.homeworkid}`}>{teacherdatapage.commit_des}</a> href={`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${teacherdatapage === undefined ? "" : teacherdatapage.id}/commitsummary/${this.props.match.params.homeworkid}`}>{teacherdatapage.commit_des}</a>
} }
{teacherdatapage === undefined ? "" :teacherdatapage&&teacherdatapage.shixun_status>1&&teacherdatapage&&teacherdatapage.time_status<5?<Startshixuntask {teacherdatapage === undefined ? "" :teacherdatapage&&teacherdatapage.shixun_status>1&&teacherdatapage&&teacherdatapage.time_status<5?<Startshixuntask

@ -68,7 +68,7 @@ class ShixunhomeWorkItem extends Component{
}) })
// w.close() // w.close()
}else if(response.data.status===-1){ }else if(response.data.status===-1){
console.log(response)
}else if(response.data.status===-3){ }else if(response.data.status===-3){
this.setState({ this.setState({
shixunsmessage:response.data.message, shixunsmessage:response.data.message,
@ -304,11 +304,11 @@ class ShixunhomeWorkItem extends Component{
<div className="clearfix ds pr pt5 contentSection" > <div className="clearfix ds pr pt5 contentSection" >
<style>{` <style>{`
.maxwidth422{ .maxwidth333{
max-width: 422px; max-width: 333px;
overflow:hidden; overflow: hidden;
text-overflow:ellipsis; text-overflow: ellipsis;
white-space:nowrap white-space: nowrap;
} }
`}</style> `}</style>
<h6> <h6>
@ -317,21 +317,21 @@ class ShixunhomeWorkItem extends Component{
{ {
this.props.isAdmin?<a onClick={()=>this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} this.props.isAdmin?<a onClick={()=>this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth422">{discussMessage.name}</a>:"" className="fl mt3 font-16 font-bd color-dark maxwidth333">{discussMessage.name}</a>:""
} }
{ {
this.props.isStudent? <a onClick={()=>this.hrefjumpskip(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)} this.props.isStudent? <a onClick={()=>this.hrefjumpskip(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth422">{discussMessage.name}</a>:"" className="fl mt3 font-16 font-bd color-dark maxwidth333">{discussMessage.name}</a>:""
} }
{ {
this.props.isNotMember===true? this.props.discussMessage.private_icon===true? this.props.isNotMember===true? this.props.discussMessage.private_icon===true?
<span className="fl mt3 font-16 font-bd color-dark maxwidth422 pointer" title={"私有属性,非课堂成员不能访问"}>{discussMessage.name}</span> <span className="fl mt3 font-16 font-bd color-dark maxwidth333 pointer" title={"私有属性,非课堂成员不能访问"}>{discussMessage.name}</span>
: <a onClick={()=>this.hrefjumpskip(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)} : <a onClick={()=>this.hrefjumpskip(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth422">{discussMessage.name}</a>:"" className="fl mt3 font-16 font-bd color-dark maxwidth333">{discussMessage.name}</a>:""
} }
@ -349,30 +349,44 @@ class ShixunhomeWorkItem extends Component{
<style> <style>
{ {
` `
.homepagePostSettingname{
width:192px !important;
}
.homepagePostSettingbox{ .homepagePostSettingbox{
width:139px !important; width:207px !important;
} }
.colorfff{ .colorfff{
color:#fff !important; color:#fff !important;
} }
.newhomepagePostSettingname{
width: 205px !important;
}
.newwidthSettin{
width:255px !important;
}
` `
} }
</style> </style>
{this.props.isAdmin?<span onClick={(event)=>this.stopPro(event)} className={this.props.isAdminOrCreator()?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"6px","display":"block"}}>
{discussMessage&&discussMessage.shixun_status>1?<Link className="btn colorblue font-16 fontweight400" to={"/shixuns/"+discussMessage.shixun_identifier+"/challenges"} target={"_blank"}>实训详情</Link>:
<a className={"btn colorfff font-16 fontweight400"}>实训详情</a>} {/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/}
{this.props.isAdminOrCreator()?<a onClick={(event)=>this.editname(discussMessage.name,discussMessage.homework_id,event)} className={"btn colorblue ml20 font-16 fontweight400"}>重命名</a>:""}
{this.props.isAdmin?<span onClick={(event)=>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?<Link className="btn colorblue font-16 fontweight400 mr20" to={"/shixuns/"+discussMessage.shixun_identifier+"/challenges"} target={"_blank"}>实训详情</Link>:
<a className={"btn colorfff font-16 fontweight400 "}>实训详情</a>
}
{this.props.isAdminOrCreator()?<a onClick={(event)=>this.editname(discussMessage.name,discussMessage.homework_id,event)} className={"btn colorblue font-16 fontweight400 "}>重命名</a>:""}
{/*<WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>*/} {/*<WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>*/}
<WordsBtn className="btn colorblue font-16 ml15 fontweight400" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn> <WordsBtn className="btn colorblue font-16 ml15 fontweight400 " to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>
</span>:""} </span>:""}
{this.props.isStudent===true?this.props.course_identity===5?discussMessage&&discussMessage.shixun_status>1? {this.props.isStudent===true?this.props.course_identity===5?discussMessage&&discussMessage.shixun_status>1?
discussMessage.time_status<5? discussMessage.time_status<5?
<WordsBtn style="blue" className="colorblue font-16 mr20 fr mt10"> <WordsBtn style="blue" className="colorblue font-16 mr20 fr mt2 ">
{startbtn===false? {startbtn===false?
(discussMessage.task_operation[0] == '继续挑战' || discussMessage.task_operation[0] == '查看实战' ? (discussMessage.task_operation[0] == '继续挑战' || discussMessage.task_operation[0] == '查看实战' ?
<a className="btn colorblue" href={getTaskUrlById(discussMessage.task_operation[1])}> <a className="btn colorblue" href={getTaskUrlById(discussMessage.task_operation[1])}>
@ -385,6 +399,18 @@ class ShixunhomeWorkItem extends Component{
</WordsBtn>:"":"":"":"" </WordsBtn>:"":"":"":""
} }
{ this.props.isAdmin?<a onClick={()=>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">查看详情</a>:""}
{
this.props.isStudent? <a onClick={()=>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">查看详情</a>:""
}
{
this.props.isNotMember===true? this.props.discussMessage.private_icon===true?""
:<a onClick={()=>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">查看详情</a>:""
}
</h6> </h6>
<div className="cl"></div> <div className="cl"></div>

@ -422,6 +422,7 @@ class Trainingjobsetting extends Component {
if (this.state.jobsettingsdata.data.unified_setting === true) { if (this.state.jobsettingsdata.data.unified_setting === true) {
if (this.state.unifiedsetting === true) { if (this.state.unifiedsetting === true) {
//统一设置
if (this.state.releasetime === undefined || this.state.releasetime === null || this.state.releasetime === "") { if (this.state.releasetime === undefined || this.state.releasetime === null || this.state.releasetime === "") {
// this.props.showNotification(`请选择发布时间`); // this.props.showNotification(`请选择发布时间`);
@ -544,13 +545,24 @@ class Trainingjobsetting extends Component {
} }
} else { } 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");
return false;
}
let rulesdata = this.state.rulesdata; let rulesdata = this.state.rulesdata;
if ( if (rulesdata.length === 0) {
rulesdata.length === 0) {
this.props.showNotification(`分班发布设置不能为空`); this.props.showNotification(`分班发布设置不能为空`);
return; return;
} }
//
} }
} }
@ -1656,7 +1668,7 @@ class Trainingjobsetting extends Component {
if (unifiedsetting === true) { if (unifiedsetting === true) {
if (moment(value, "YYYY-MM-DD HH:mm") <= moment(publish_time)) { if (moment(value, "YYYY-MM-DD HH:mm") <= moment(publish_time)) {
this.setState({ this.setState({
hand__e_tip: "补交时间不能早于发布时间", hand__e_tip: "补交结束时间不能早于发布时间",
hand_flags: true, hand_flags: true,
handclass: "bor-reds", handclass: "bor-reds",
late_times: value.format('YYYY-MM-DD HH:mm'), late_times: value.format('YYYY-MM-DD HH:mm'),
@ -1664,7 +1676,7 @@ class Trainingjobsetting extends Component {
}) })
} else if (moment(value, "YYYY-MM-DD HH:mm") <= moment(end_time)) { } else if (moment(value, "YYYY-MM-DD HH:mm") <= moment(end_time)) {
this.setState({ this.setState({
hand__e_tip: "补交时间不能早于截止时间", hand__e_tip: "补交结束时间不能早于截止时间",
hand_flags: true, hand_flags: true,
handclass: "bor-reds", handclass: "bor-reds",
late_times: value.format('YYYY-MM-DD HH:mm'), late_times: value.format('YYYY-MM-DD HH:mm'),
@ -2396,7 +2408,7 @@ class Trainingjobsetting extends Component {
modalSave={modalSave} modalSave={modalSave}
></Modals> ></Modals>
<div className={"educontent"}> <div className={"educontent"} id={"publishtimeid"}>
{ {
!flagPageEdit && this.props.isAdmin() === true ? !flagPageEdit && this.props.isAdmin() === true ?
"" ""
@ -2454,7 +2466,7 @@ class Trainingjobsetting extends Component {
</style> </style>
{ {
unifiedsetting === undefined ? "" : unifiedsetting === true ? unifiedsetting === undefined ? "" : unifiedsetting === true ?
<div> <div >
<div className="clearfix mb5 ml15"> <div className="clearfix mb5 ml15">
<span className="font-16 fl mt3" style={{color: "#999999"}}>发布时间</span> <span className="font-16 fl mt3" style={{color: "#999999"}}>发布时间</span>
<Tooltip placement="bottom" <Tooltip placement="bottom"
@ -2536,6 +2548,9 @@ class Trainingjobsetting extends Component {
<PollDetailTabForthRules <PollDetailTabForthRules
{...this.props} {...this.props}
{...this.state} {...this.state}
ref={dom => {
this.$pollDetailTabForthRules = dom;
}}
teacherdatapage={this.props.teacherdatapage} teacherdatapage={this.props.teacherdatapage}
rules={rules} rules={rules}
moduleName={"作业"} moduleName={"作业"}

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-20 10:35:40 * @Date: 2019-11-20 10:35:40
* @LastEditors : tangjiang * @LastEditors : tangjiang
* @LastEditTime : 2020-01-07 15:29:18 * @LastEditTime : 2020-01-09 11:04:44
*/ */
import './index.scss'; import './index.scss';
// import 'katex/dist/katex.css'; // import 'katex/dist/katex.css';
@ -291,6 +291,7 @@ class EditTab extends React.Component {
// {font: []}, // {font: []},
'image', 'formula', // 数学公式、图片、视频 'image', 'formula', // 数学公式、图片、视频
'clean', // 清除格式 'clean', // 清除格式
// 'fill',
]; ];
const renderCourseQuestion = (arrs) => { const renderCourseQuestion = (arrs) => {
@ -452,6 +453,7 @@ class EditTab extends React.Component {
colon={ false } colon={ false }
> >
<QuillForEditor <QuillForEditor
autoFocus={true}
style={{ height: '200px' }} style={{ height: '200px' }}
placeholder="请输入描述信息" placeholder="请输入描述信息"
onContentChange={handleContentChange} onContentChange={handleContentChange}

@ -175,7 +175,7 @@ class MemoDetail extends Component {
// withCredentials: true // withCredentials: true
} }
).then((response) => { ).then((response) => {
console.log(response);
const newMemo = Object.assign({}, this.props.memo) const newMemo = Object.assign({}, this.props.memo)
newMemo.praise_count = response.data.praise_count newMemo.praise_count = response.data.praise_count
newMemo.user_praise = !newMemo.user_praise newMemo.user_praise = !newMemo.user_praise
@ -309,7 +309,7 @@ class MemoDetail extends Component {
memo: newMemo2 memo: newMemo2
}) })
} }
console.log(response)
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}) })
@ -352,7 +352,7 @@ class MemoDetail extends Component {
memo: newMemo memo: newMemo
}) })
} }
console.log(response)
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}) })
@ -382,7 +382,7 @@ class MemoDetail extends Component {
comments comments
}) })
} }
console.log(response)
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}) })
@ -471,7 +471,7 @@ class MemoDetail extends Component {
} }
// {"message":"Couldn't find Discuss with id=911","status":-1} // {"message":"Couldn't find Discuss with id=911","status":-1}
console.log(response)
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}) })
@ -546,7 +546,7 @@ class MemoDetail extends Component {
this.props.initForumState({ this.props.initForumState({
memo: newMemo2 memo: newMemo2
}) })
console.log(response)
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)

@ -57,7 +57,7 @@ class MemoDetailMDEditor extends Component {
errorMsg: '' errorMsg: ''
}) })
}) })
commentMDEditor.cm.focus() // commentMDEditor.cm.focus()
}, { }, {
watch: false, watch: false,
dialogLockScreen: false, dialogLockScreen: false,

@ -6,6 +6,8 @@ import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png';
import educodernet from '../../../src/images/login/educodernet.png'; import educodernet from '../../../src/images/login/educodernet.png';
import InterestpageComponent from '../user/Interestpage' import InterestpageComponent from '../user/Interestpage'
import InterestpageComponentMax from '../user/InterestpageMax' import InterestpageComponentMax from '../user/InterestpageMax'
import moment from 'moment';
//educoder登入页面 //educoder登入页面
var newContainer={ var newContainer={
@ -78,7 +80,7 @@ class EducoderInteresse extends Component {
justifyContent: "center", justifyContent: "center",
width: "100%", width: "100%",
}}> }}>
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div> <div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span>&nbsp;{moment().year()}&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div> </div>
</div> </div>
</div> </div>

@ -1,26 +1,6 @@
import React, {Component} from "react"; import React, {Component} from "react";
import { import moment from 'moment';
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 { SnackbarHOC,getImageUrl } from 'educoder'; import { SnackbarHOC,getImageUrl } from 'educoder';
import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
import '../courses/css/members.css'; import '../courses/css/members.css';
import "../courses/common/formCommon.css" import "../courses/common/formCommon.css"
import '../courses/css/Courses.css'; import '../courses/css/Courses.css';
@ -201,21 +181,21 @@ class EducoderLogin extends Component {
justifyContent: "center", justifyContent: "center",
width: "100%", width: "100%",
}}> }}>
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div> <div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span>&nbsp;{moment().year()}&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div>: </div>:
this.props.mygetHelmetapi===undefined||this.props.mygetHelmetapi.main_site===null|| this.props.mygetHelmetapi.main_site===undefined? <div style={{ this.props.mygetHelmetapi===undefined||this.props.mygetHelmetapi.main_site===null|| this.props.mygetHelmetapi.main_site===undefined? <div style={{
display: "flex", display: "flex",
justifyContent: "center", justifyContent: "center",
width: "100%", width: "100%",
}}> }}>
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div> <div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span>&nbsp;{moment().year()}&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div>:this.props.mygetHelmetapi.main_site===true? </div>:this.props.mygetHelmetapi.main_site===true?
<div style={{ <div style={{
display: "flex", display: "flex",
justifyContent: "center", justifyContent: "center",
width: "100%", width: "100%",
}}> }}>
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div> <div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span>&nbsp;{moment().year()}&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div> </div>
:"" :""
} }

@ -1,33 +1,18 @@
import React, {Component} from "react"; import React, {Component} from "react";
import { import {
Form,
Select,
Input, Input,
Button, Button,
Checkbox,
Upload,
Icon,
message,
Modal,
Table,
Divider, Divider,
InputNumber,
Tag,
DatePicker,
Radio,
Tooltip,
notification,
Layout, Layout,
Spin Spin
} from "antd"; } from "antd";
import axios from 'axios'; import axios from 'axios';
import moment from 'moment';
import { getImageUrl } from 'educoder' import { getImageUrl } from 'educoder'
import {Link, Switch, Route, Redirect} from 'react-router-dom';
import '../courses/css/members.css'; import '../courses/css/members.css';
import "../courses/common/formCommon.css" import "../courses/common/formCommon.css"
import '../courses/css/Courses.css'; import '../courses/css/Courses.css';
import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png'; import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png';
import educodernet from '../../../src/images/login/educodernet.png';
const { Header, Footer, Sider, Content } = Layout; const { Header, Footer, Sider, Content } = Layout;
//educoder登入页面 //educoder登入页面
var sectionStyle = { var sectionStyle = {
@ -294,7 +279,7 @@ class Otherlogin extends Component {
justifyContent: "center", justifyContent: "center",
width: "100%", width: "100%",
}}> }}>
<div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div> <div className="font-14 color-grey-9 " style={{marginTop:"20px"}}><span className="font-18">©</span>&nbsp;{moment().year()}&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div> </div>
</div> </div>
</Spin> </Spin>

@ -104,7 +104,6 @@ class Index extends Component {
// withCredentials: true, // withCredentials: true,
}) })
.then((response) => { .then((response) => {
console.log(response);
if (response.data.status == -1) { if (response.data.status == -1) {
console.error('获取任务列表失败!') console.error('获取任务列表失败!')
@ -146,7 +145,7 @@ class Index extends Component {
// } // }
) )
.then((response) => { .then((response) => {
console.log(response);
// {"reward_code":86} TODO 金币数量变化 // {"reward_code":86} TODO 金币数量变化
if (response.data.reward_code === -1) { if (response.data.reward_code === -1) {
this.props.showSnackbar('该任务已评过星了!') this.props.showSnackbar('该任务已评过星了!')

@ -80,7 +80,7 @@ class PackageIndexNEIBannerConcent extends Component {
let url=`/project_packages/${this.props.match.params.id}.json` let url=`/project_packages/${this.props.match.params.id}.json`
axios.get((url)).then((response) => { axios.get((url)).then((response) => {
console.log(response)
let data=response.data let data=response.data
this.setState({ this.setState({
category:data.category_id, category:data.category_id,

@ -1,8 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Redirect } from 'react-router'; import moment from 'moment';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { getImageUrl, toPath } from 'educoder'
import PropTypes from 'prop-types';
class NewFooter extends Component { class NewFooter extends Component {
constructor(props) { constructor(props) {
@ -58,7 +57,7 @@ class NewFooter extends Component {
{this.props.mygetHelmetapi === null ? "" : {this.props.mygetHelmetapi === null ? "" :
this.props.mygetHelmetapi===undefined|| this.props.mygetHelmetapi.footer===null||this.props.mygetHelmetapi.footer===undefined? this.props.mygetHelmetapi===undefined|| this.props.mygetHelmetapi.footer===null||this.props.mygetHelmetapi.footer===undefined?
<p className="footer_con-p inline lineh-30 font-14"> <p className="footer_con-p inline lineh-30 font-14">
<span className="font-18 fl">©</span>&nbsp;2019&nbsp;EduCoder <span className="font-18 fl">©</span>&nbsp;{moment().year()}&nbsp;EduCoder
<a style={{"color":"#888"}} target="_blank" href="http://beian.miit.gov.cn/" className="ml15 mr15">湘ICP备17009477号</a> <a style={{"color":"#888"}} target="_blank" href="http://beian.miit.gov.cn/" className="ml15 mr15">湘ICP备17009477号</a>
<a style={{"color":"#888"}} target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=43019002000962" className="mr15"> <a style={{"color":"#888"}} target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=43019002000962" className="mr15">
<img className="vertical4" src={require('./beian.png')}/>湘公网安备43019002000962号 <img className="vertical4" src={require('./beian.png')}/>湘公网安备43019002000962号

@ -719,7 +719,7 @@ export default class TPMchallengesnew extends Component {
shixunsskillvaluelist===undefined?"":shixunsskillvaluelist.length === 0 ? "" : shixunsskillvaluelist.map((itme, key) => { shixunsskillvaluelist===undefined?"":shixunsskillvaluelist.length === 0 ? "" : shixunsskillvaluelist.map((itme, key) => {
return ( return (
<li key={key} className={"fl ml10 mr10"}> <li key={key} className={"fl ml10 mr10"}>
<Badge className={"tpmpointer"} count={"x"} onClick={(key) => this.delshixunsskilllist(key)}> <Badge className={"tpmpointer"} count={"x"} onClick={() => this.delshixunsskilllist(key)}>
<Button type="primary" ghost className={"Permanentban "}> <Button type="primary" ghost className={"Permanentban "}>
{itme} {itme}
</Button> </Button>

@ -67,6 +67,18 @@ class TPMRightSection extends Component {
return ( return (
<div> <div>
<style>
{
`
.altimgs{
border-radius: 4px;
width: 100px;
height: 60px;
}
`
}
</style>
{ {
TPMRightSectionData === undefined ? "" : TPMRightSectionData === undefined ? "" :
<div> <div>
@ -86,7 +98,7 @@ class TPMRightSection extends Component {
{TPMRightSectionData === undefined ? "" : TPMRightSectionData.creator === undefined ? "" : TPMRightSectionData.creator.name} {TPMRightSectionData === undefined ? "" : TPMRightSectionData.creator === undefined ? "" : TPMRightSectionData.creator.name}
</div> </div>
<div className={"creatornamelist width80center"}> <div className={"creatornamelist width80center"}>
<span className={"color888hezuo"}>共发布实训</span> <span className={"color-grey-3"}>{TPMRightSectionData.user_shixuns_count}</span> <span className={"color888hezuo"}></span> <span className={"color888hezuo font-14"}>共发布实训</span> <span className={"color-grey-3"}>{TPMRightSectionData.user_shixuns_count}</span> <span className={"color888hezuo"}></span>
</div> </div>
</div> </div>
{/*<div className="clearfix">*/} {/*<div className="clearfix">*/}
@ -103,7 +115,7 @@ class TPMRightSection extends Component {
<div className="font-16 mb5"> <div className="font-16 mb5">
<span><i className={"iconfont icon-jilu1 audit_situationactive font-14"}></i> </span> <span><i className={"iconfont icon-jilu1 audit_situationactive font-14"}></i> </span>
<span className={"sortinxdirection space-between fr"}> <span className={"sortinxdirection space-between fr"}>
<span className="color888hezuo font-12">已完成 {TPMRightSectionData&&TPMRightSectionData.complete_count===null?0:TPMRightSectionData&&TPMRightSectionData.complete_count} / {TPMRightSectionData&&TPMRightSectionData.challenge_count} </span> <span className="color888hezuo font-14">已完成 {TPMRightSectionData&&TPMRightSectionData.complete_count===null?0:TPMRightSectionData&&TPMRightSectionData.complete_count} / {TPMRightSectionData&&TPMRightSectionData.challenge_count} </span>
</span> </span>
</div> </div>
@ -119,7 +131,7 @@ class TPMRightSection extends Component {
<p className="font-16 mb20"> <p className="font-16 mb20">
<span><i className={"iconfont icon-biaoqian2 audit_situationactive font-14"}></i> </span> <span><i className={"iconfont icon-biaoqian2 audit_situationactive font-14"}></i> </span>
<span className={"sortinxdirection space-between fr"}> <span className={"sortinxdirection space-between fr"}>
<span className="color888hezuo font-12">已获得 {TPMRightSectionData&&TPMRightSectionData.user_tag_count} / {TPMRightSectionData&&TPMRightSectionData.tag_count} </span> <span className="color888hezuo font-14">已获得 {TPMRightSectionData&&TPMRightSectionData.user_tag_count} / {TPMRightSectionData&&TPMRightSectionData.tag_count} </span>
</span> </span>
</p> </p>
@ -180,7 +192,8 @@ class TPMRightSection extends Component {
<div className="recomments clearfix df" key={k}> <div className="recomments clearfix df" key={k}>
<a href={"/paths/" + i.id} height="96" width="128" target="_blank"> <a href={"/paths/" + i.id} height="96" width="128" target="_blank">
<img alt="实训" height="96" src={"/" + i.image_url} width="128"/>
<img alt="实训" height="96" src={"/" + i.image_url} width="128" className={"altimgs"}/>
</a> </a>
<div className="ml10 flex1"> <div className="ml10 flex1">
@ -232,7 +245,7 @@ class TPMRightSection extends Component {
return ( return (
<div className="recomments clearfix df" key={key}> <div className="recomments clearfix df" key={key}>
<a href={"/shixuns/" + item.identifier + "/challenges"} target="_blank"> <a href={"/shixuns/" + item.identifier + "/challenges"} target="_blank">
<img alt="69?1526971094" height="96" src={"/" + item.pic} width="128"/> <img alt="69?1526971094" height="96" src={"/" + item.pic} width="128" className={"altimgs"}/>
</a> </a>
<div className="ml10 flex1"> <div className="ml10 flex1">
<Tooltip placement="bottom" title={item.name}> <Tooltip placement="bottom" title={item.name}>
@ -240,9 +253,10 @@ class TPMRightSection extends Component {
className="color-grey-6 task-hide mb12 recomment-name">{item.name}</a> className="color-grey-6 task-hide mb12 recomment-name">{item.name}</a>
</Tooltip> </Tooltip>
<p className="clearfix mt8 font-12 color-grey-B4"> <p className="clearfix mt8 font-12 color-grey-B4">
{item.stu_num} 人学习 <span className="fl">{item.stu_num} 人学习</span>
<span className="fr color-orange pr10">{item.level}</span>
</p> </p>
<p className="edu-txt-right color-orange pr10">{item.level}</p>
</div> </div>
</div> </div>
) )

@ -498,7 +498,18 @@ class Challenges extends Component {
</p>} </p>}
</div> </div>
</div> </div>
<style>
{
`
.ant-divider-horizontal.ant-divider-with-text-center.ant-divider-dashed::before{
border: none !important
}
.ant-divider-horizontal.ant-divider-with-text-center.ant-divider-dashed::after{
border: none !important
}
`
}
</style>
{this.state.isopentitletype==="Less"?"":this.state.opentitletype===true?<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}> {this.state.isopentitletype==="Less"?"":this.state.opentitletype===true?<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>
<a className={"font-14 color-grey-9"}>阅读全文 <i className={"iconfont icon-jiantou9 font-14"}></i></a> <a className={"font-14 color-grey-9"}>阅读全文 <i className={"iconfont icon-jiantou9 font-14"}></i></a>
</Divider>:<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}> </Divider>:<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>
@ -508,9 +519,9 @@ class Challenges extends Component {
</div> </div>
</p> </p>
<div className={"shixunjianjiecballenges edu-back-white"}> <div className={"shixunjianjiecballenges edu-back-white boreee"}>
<span className="font-16 fl">全部任务</span> <span className="font-16 fl">全部任务</span>
<span className="fr mt5"> <span className="fr mt2">
{/* <img src={getImageUrl("images/educoder/icon/addsmallgreen.svg")} {/* <img src={getImageUrl("images/educoder/icon/addsmallgreen.svg")}
className="fl mr5 mt6" />*/} className="fl mr5 mt6" />*/}
{/*<Tooltip placement="bottom" title={"新增代码编辑类型任务"}>*/} {/*<Tooltip placement="bottom" title={"新增代码编辑类型任务"}>*/}
@ -718,7 +729,7 @@ class Challenges extends Component {
{ {
` `
.task-colspan { .task-colspan {
min-width: 20% !important; min-width: 18% !important;
} }
` `
} }

@ -623,7 +623,18 @@ class Challengesjupyter extends Component {
</p> </p>
</div> </div>
<style>
{
`
.ant-divider-horizontal.ant-divider-with-text-center.ant-divider-dashed::before{
border: none !important
}
.ant-divider-horizontal.ant-divider-with-text-center.ant-divider-dashed::after{
border: none !important
}
`
}
</style>
{this.state.isopentitletype==="Less"?"":this.state.opentitletype===true?<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}> {this.state.isopentitletype==="Less"?"":this.state.opentitletype===true?<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>
<a className={"font-14 color-grey-9"}>阅读全文 <i className={"iconfont icon-jiantou9 font-14"}></i></a> <a className={"font-14 color-grey-9"}>阅读全文 <i className={"iconfont icon-jiantou9 font-14"}></i></a>
</Divider>:<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}> </Divider>:<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>

@ -258,4 +258,8 @@
.Countdownfonttpm .ant-statistic-content-value{ .Countdownfonttpm .ant-statistic-content-value{
font-size: 14px; font-size: 14px;
}
.boreee{
border-bottom: 1px solid #F4F4F4;
} }

@ -92,7 +92,7 @@ class BanksMenu extends Component{
object_type:type object_type:type
}}) }})
.then((response) => { .then((response) => {
console.log(response);
if(response){ if(response){
if(response.data){ if(response.data){
if(response.data.status===0){ if(response.data.status===0){

@ -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{margin-top: 30px;padding-bottom: 30px;border-bottom: 1px solid #eee}
.task-item:last-child{border-bottom: none;} .task-item:last-child{border-bottom: none;}
.challengeNav a.active{color: #4CACFF;} .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:first-child{margin-top: 0px;}
.recomments:last-child{margin-bottom: 0px;border:none;padding-bottom: 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} .url-input{border: none;padding: 0px;font-size: 12px;color:#999;outline: none}
@ -3784,10 +3784,7 @@ a.singlepublishtwo{
.has-error .ant-input:focus{ .has-error .ant-input:focus{
border-color: #ff4d4f !important; border-color: #ff4d4f !important;
} }
/*.ant-notification{*/
/*width: auto !important;*/
/*max-width: 600px !important;*/
/*}*/
.fontweight400{ .fontweight400{
font-weight: 400 !important; font-weight: 400 !important;
} }
@ -3800,6 +3797,10 @@ a.singlepublishtwo{
z-index: 10000 !important; z-index: 10000 !important;
} }
.ant-notification{
z-index: 10001 !important;
}
.markdown-body { .markdown-body {
text-align: justify; text-align: justify;
word-break: break-all; word-break: break-all;
@ -3816,4 +3817,9 @@ a.singlepublishtwo{
.RightPaneDrawer .jupyter_data_list{ .RightPaneDrawer .jupyter_data_list{
max-height: 340px; max-height: 340px;
} }
.ant-btn-primary{
text-shadow: none !important;
box-shadow: none !important;
}

Loading…
Cancel
Save