From f7b6a48d17d7f739a796e21b1b01fac7d8db6cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 4 Jul 2019 17:06:46 +0800 Subject: [PATCH 01/41] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/config/webpack.config.dev.js | 40 ----------------------- 1 file changed, 40 deletions(-) diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js index a203e798d..2a5d1fbf4 100644 --- a/public/react/config/webpack.config.dev.js +++ b/public/react/config/webpack.config.dev.js @@ -250,46 +250,6 @@ module.exports = { // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack // You can remove this if you don't use Moment.js: new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), - new ParallelUglifyPlugin({ - // 传递给 UglifyJS的参数如下: - uglifyJS: { - output: { - /* - 是否输出可读性较强的代码,即会保留空格和制表符,默认为输出,为了达到更好的压缩效果, - 可以设置为false - */ - beautify: false, - /* - 是否保留代码中的注释,默认为保留,为了达到更好的压缩效果,可以设置为false - */ - comments: false - }, - compress: { - /* - 是否在UglifyJS删除没有用到的代码时输出警告信息,默认为输出,可以设置为false关闭这些作用 - 不大的警告 - */ - warnings: false, - - /* - 是否删除代码中所有的console语句,默认为不删除,开启后,会删除所有的console语句 - */ - drop_console: false, - - /* - 是否内嵌虽然已经定义了,但是只用到一次的变量,比如将 var x = 1; y = x, 转换成 y = 5, 默认为不 - 转换,为了达到更好的压缩效果,可以设置为false - */ - collapse_vars: false, - - /* - 是否提取出现了多次但是没有定义成变量去引用的静态值,比如将 x = 'xxx'; y = 'xxx' 转换成 - var a = 'xxxx'; x = a; y = a; 默认为不转换,为了达到更好的压缩效果,可以设置为false - */ - reduce_vars: false - } - } - }), ], // Some libraries import Node modules but don't use them in the browser. // Tell Webpack to provide empty mocks for them so importing them works. From af5587b55151b1ccea3ee9d2e4783463aa1cb091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 4 Jul 2019 17:07:49 +0800 Subject: [PATCH 02/41] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/config/webpack.config.dev.js | 1 - 1 file changed, 1 deletion(-) diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js index 2a5d1fbf4..2fc1bbe64 100644 --- a/public/react/config/webpack.config.dev.js +++ b/public/react/config/webpack.config.dev.js @@ -9,7 +9,6 @@ const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); const eslintFormatter = require('react-dev-utils/eslintFormatter'); const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); -const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin'); // const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin'); const getClientEnvironment = require('./env'); const paths = require('./paths'); From d6a7df567da44ce01357a77cefacc5b085c93fcd Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 4 Jul 2019 17:22:36 +0800 Subject: [PATCH 03/41] =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/busyWork/CommonWorkSetting.js | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js index 3f7e5f3ad..72987d2ca 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js @@ -231,7 +231,7 @@ class CommonWorkSetting extends Component{ end_time: endTime.format(dateFormat) }) } - if (!this.state.late_time && endTime) { + if (this.state.allow_late && !this.state.late_time && endTime) { this.setState({ late_time: endTime.add(1, 'months').format(dateFormat) }) @@ -265,9 +265,12 @@ class CommonWorkSetting extends Component{ const currentEndTime = this._getCurrentEndTime() let evaluation_start, evaluation_end, evaluation_num = 0, absence_penalty = 0; if (checked) { - if (currentEndTime) { - evaluation_start = moment(currentEndTime).add(7, 'days').format(dateFormat) - evaluation_end = moment(currentEndTime).add(21, 'days').format(dateFormat) + if (this.state.allow_late && this.state.late_time) { + evaluation_start = moment(this.state.late_time).add(14, 'days').format(dateFormat) + evaluation_end = moment(this.state.late_time).add(28, 'days').format(dateFormat) + } else if (currentEndTime) { + evaluation_start = moment(currentEndTime).add(14, 'days').format(dateFormat) + evaluation_end = moment(currentEndTime).add(28, 'days').format(dateFormat) } if (!this.state.evaluation_num) { evaluation_num = 3 @@ -320,11 +323,15 @@ class CommonWorkSetting extends Component{ const { evaluation_end } = this.state; const anonymous_appeal = e.target.checked let appeal_time, appeal_penalty = this.state.appeal_penalty + const currentEndTime = this._getCurrentEndTime() + if (anonymous_appeal) { appeal_penalty = 2 - if (evaluation_end) { - appeal_time = moment(evaluation_end).add(7, 'days').format(dateFormat) - } + if (this.state.allow_late && this.state.late_time) { + appeal_time = moment(this.state.late_time).add(5 * 7, 'days').format(dateFormat) + } else if (currentEndTime) { + appeal_time = moment(currentEndTime).add(5 * 7, 'days').format(dateFormat) + } } else { appeal_time = null; } @@ -386,7 +393,7 @@ class CommonWorkSetting extends Component{ answer_public: e.target.checked }) } - + // 补交设置 允许补交 allow_late_change=(e)=>{ this.setState({ allow_late: e.target.value @@ -401,6 +408,10 @@ class CommonWorkSetting extends Component{ late_time: moment(handleDateString(currentEndTime)).add(1, 'months').format(dateFormat) }) } + } else { + this.setState({ + late_time: null + }) } } From bd56fb15fd8029243e8c2dca286320095f7a585e Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 4 Jul 2019 17:32:04 +0800 Subject: [PATCH 04/41] =?UTF-8?q?=E8=AF=B7=E8=BE=93=E5=85=A5=E4=BD=9C?= =?UTF-8?q?=E5=93=81=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/busyWork/CommonWorkPost.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkPost.js b/public/react/src/modules/courses/busyWork/CommonWorkPost.js index 3f65faafa..2e882e819 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkPost.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkPost.js @@ -664,7 +664,7 @@ render(){ > {getFieldDecorator('description', { rules: [{ - required: true, message: '请输入帖子内容', + required: true, message: '请输入作品内容', }, { max: 5000, message: '最大限制为5000个字符', }], From 6eac291a0c381867c048a7b54b09cfb85d492100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 4 Jul 2019 17:42:15 +0800 Subject: [PATCH 05/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/shixunHomework/Listofworks.js | 39 +++++-------------- .../shixunHomework/Trainingjobsetting.js | 32 ++++----------- .../shixunHomework/Workquestionandanswer.js | 32 ++++----------- 3 files changed, 25 insertions(+), 78 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 9606740dc..a720cffd4 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1350,21 +1350,10 @@ class Listofworks extends Component { },{responseType: 'blob'}).then((response) => { console.log("1342"); console.log(response); - if (response.status == 200) { - - var blob = new Blob([response.data]) - var downloadElement = document.createElement('a'); - var href = window.URL.createObjectURL(blob); //创建下载的链接 - let filename = response.headers.get('Content-Disposition'); - if (filename) { - filename = filename.match(/\"(.*)\"/)[1]; //提取文件名 - downloadElement.href = href; - downloadElement.download = filename; //下载后文件名 - document.body.appendChild(downloadElement); - downloadElement.click(); //点击下载 - document.body.removeChild(downloadElement); //下载完成移除元素 - } - window.URL.revokeObjectURL(href); //释放掉blob对象 + if(response.status === 200){ + window.open(url, '_blank'); + }else{ + } }).catch((error) => { console.log(error) @@ -1384,21 +1373,11 @@ class Listofworks extends Component { },{responseType: 'blob'}).then((response) => { console.log("1306"); console.log(response); - if (response.status == 200) { - var blob = new Blob([response.data]) - var downloadElement = document.createElement('a'); - var href = window.URL.createObjectURL(blob); //创建下载的链接 - let filename = response.headers.get('Content-Disposition'); - if (filename) { - filename = filename.match(/\"(.*)\"/)[1]; //提取文件名 - downloadElement.href = href; - downloadElement.download = filename; //下载后文件名 - document.body.appendChild(downloadElement); - downloadElement.click(); //点击下载 - document.body.removeChild(downloadElement); //下载完成移除元素 - } - window.URL.revokeObjectURL(href); //释放掉blob对象 - } + if(response.status === 200){ + window.open(url, '_blank'); + }else{ + + } }).catch((error) => { console.log(error) }); diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 19343ad79..f67eca6ab 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1619,19 +1619,11 @@ class Trainingjobsetting extends Component { },{responseType: 'blob'}).then((response) => { console.log("326"); console.log(response); - var blob = new Blob([response.data]) - var downloadElement = document.createElement('a'); - var href = window.URL.createObjectURL(blob); //创建下载的链接 - let filename = response.headers.get('Content-Disposition'); - if (filename) { - filename = filename.match(/\"(.*)\"/)[1]; //提取文件名 - downloadElement.href = href; - downloadElement.download = filename; //下载后文件名 - document.body.appendChild(downloadElement); - downloadElement.click(); //点击下载 - document.body.removeChild(downloadElement); //下载完成移除元素 + if(response.status === 200){ + window.open(url, '_blank'); + }else{ + } - window.URL.revokeObjectURL(href); //释放掉blob对象 }).catch((error) => { console.log(error) @@ -1646,19 +1638,11 @@ class Trainingjobsetting extends Component { axios.get((url),{responseType: 'blob'}).then((response) => { console.log("339"); console.log(response); - var blob = new Blob([response.data]) - var downloadElement = document.createElement('a'); - var href = window.URL.createObjectURL(blob); //创建下载的链接 - let filename = response.headers.get('Content-Disposition'); - if (filename) { - filename = filename.match(/\"(.*)\"/)[1]; //提取文件名 - downloadElement.href = href; - downloadElement.download = filename; //下载后文件名 - document.body.appendChild(downloadElement); - downloadElement.click(); //点击下载 - document.body.removeChild(downloadElement); //下载完成移除元素 + if(response.status === 200){ + window.open(url, '_blank'); + }else{ + } - window.URL.revokeObjectURL(href); //释放掉blob对象 }).catch((error) => { console.log(error) diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index d341aab6b..ab650aae2 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -330,19 +330,11 @@ class Workquestionandanswer extends Component { },{responseType: 'blob'}).then((response) => { console.log("326"); console.log(response); - var blob = new Blob([response.data]) - var downloadElement = document.createElement('a'); - var href = window.URL.createObjectURL(blob); //创建下载的链接 - let filename = response.headers.get('Content-Disposition'); - if (filename) { - filename = filename.match(/\"(.*)\"/)[1]; //提取文件名 - downloadElement.href = href; - downloadElement.download = filename; //下载后文件名 - document.body.appendChild(downloadElement); - downloadElement.click(); //点击下载 - document.body.removeChild(downloadElement); //下载完成移除元素 + if(response.status === 200){ + window.open(url, '_blank'); + }else{ + } - window.URL.revokeObjectURL(href); //释放掉blob对象 }).catch((error) => { console.log(error) @@ -357,19 +349,11 @@ class Workquestionandanswer extends Component { axios.get((url),{responseType: 'blob'}).then((response) => { console.log("339"); console.log(response); - var blob = new Blob([response.data]) - var downloadElement = document.createElement('a'); - var href = window.URL.createObjectURL(blob); //创建下载的链接 - let filename = response.headers.get('Content-Disposition'); - if (filename) { - filename = filename.match(/\"(.*)\"/)[1]; //提取文件名 - downloadElement.href = href; - downloadElement.download = filename; //下载后文件名 - document.body.appendChild(downloadElement); - downloadElement.click(); //点击下载 - document.body.removeChild(downloadElement); //下载完成移除元素 + if(response.status === 200){ + window.open(url, '_blank'); + }else{ + } - window.URL.revokeObjectURL(href); //释放掉blob对象 }).catch((error) => { console.log(error) From 84c51989a1261debdd9db3696c9421c1ea8c4763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 4 Jul 2019 17:43:22 +0800 Subject: [PATCH 06/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/tpm/challengesnew/css/TPMchallengesnew.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/tpm/challengesnew/css/TPMchallengesnew.css b/public/react/src/modules/tpm/challengesnew/css/TPMchallengesnew.css index fb23ba4b8..5087e2f0d 100644 --- a/public/react/src/modules/tpm/challengesnew/css/TPMchallengesnew.css +++ b/public/react/src/modules/tpm/challengesnew/css/TPMchallengesnew.css @@ -60,7 +60,7 @@ a{ #exercisememoMD .CodeMirror { margin-top: 31px !important; - height: 374px !important; + height: 658px !important; /*width: 579px !important;*/ } From cb96cd2b420366558e864a77dcb48e081897054a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 4 Jul 2019 17:54:18 +0800 Subject: [PATCH 07/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/FindPasswordComponent.js | 2 +- public/react/src/modules/user/LoginRegisterComponent.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index 2fe5df943..2fed8f3a8 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -402,7 +402,7 @@ class LoginRegisterComponent extends Component { :
} diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 12afd7831..c909eb8c1 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -713,7 +713,7 @@ class LoginRegisterComponent extends Component { } From 01ee77ab6f947e53b6fb16bf90d10151064e4dd4 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 4 Jul 2019 18:07:49 +0800 Subject: [PATCH 08/41] fetchMoment --- .../courses/busyWork/CommonWorkSetting.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js index 72987d2ca..56eabb375 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js @@ -49,6 +49,8 @@ class CommonWorkSetting extends Component{ super(props) this.publishModal = React.createRef(); this.endModal = React.createRef(); + this.fetchMoment = moment() + this.state={ unified_setting: true, rules: [], @@ -123,6 +125,7 @@ class CommonWorkSetting extends Component{ } else if (result.data.publish_time && moment(result.data.publish_time) < moment()) { disable_unified_setting = true } + this.fetchMoment = moment() this.setState({ // starttimetype:starttype, // endtimetype:endtype, @@ -1042,7 +1045,7 @@ class CommonWorkSetting extends Component{ {/* */} - + 截止时间: {/* */} - + - 允许补交 + 允许补交
迟交扣分: @@ -1146,7 +1149,7 @@ class CommonWorkSetting extends Component{
结束时间: - + - 禁止补交 + 禁止补交 @@ -1194,7 +1197,7 @@ class CommonWorkSetting extends Component{
开启时间: - + */} - + 结束时间: {/* */} - + Date: Thu, 4 Jul 2019 18:09:49 +0800 Subject: [PATCH 09/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/shixunHomework/Listofworks.js | 58 +++++++++---------- 1 file changed, 26 insertions(+), 32 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index a720cffd4..b86bcfce5 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1336,48 +1336,42 @@ class Listofworks extends Component { } // 导出实习报告批量 - internshipreport = ()=>{ + internshipreport = (url)=>{ console.log("internshipreport"); - let url = "/zip/shixun_report"; - let homeworkid = this.props.match.params.homeworkid; - axios.get((url),{ - params: { - homework_common_id: homeworkid, - work_status: this.state.course_groupyslstwo, - course_group: this.state.checkedValuesineinfo, - search: this.state.searchtext, - } - },{responseType: 'blob'}).then((response) => { - console.log("1342"); - console.log(response); + // params: { + // homework_common_id: homeworkid, + // work_status: this.state.course_groupyslstwo, + // course_group: this.state.checkedValuesineinfo, + // search: this.state.searchtext, + // } + // let url = "/zip/shixun_report"; + // let homeworkid = this.props.match.params.homeworkid; + axios.get(url).then((response) => { if(response.status === 200){ window.open(url, '_blank'); - }else{ } - }).catch((error) => { + }).catch((error) => { console.log(error) }); } // 课堂学生成绩的导出下载 - Classstudentachievement=()=>{ + Classstudentachievement=(url)=>{ console.log("Classstudentachievement"); - const course_id = this.props.match.params.coursesId; - let url = "/courses/"+course_id+"/export_member_scores_excel.xlsx"; - axios.get((url),{ - params: { - group_id: this.state.checkedValuesineinfo, - search: this.state.searchtext, - } - },{responseType: 'blob'}).then((response) => { - console.log("1306"); - console.log(response); - if(response.status === 200){ - window.open(url, '_blank'); - }else{ + // const course_id = this.props.match.params.coursesId; + // let url = "/courses/"+course_id+"/export_member_scores_excel.xlsx"; + // ,{ + // params: { + // group_id: this.state.checkedValuesineinfo, + // search: this.state.searchtext, + // } + // },{responseType: 'blob'}) + axios.get(url).then((response) => { + if(response.status === 200){ + window.open(url, '_blank'); - } + } }).catch((error) => { console.log(error) }); @@ -1531,8 +1525,8 @@ class Listofworks extends Component { {this.props.isAdmin()?
  • 导出
  • :""} {this.props.isAdmin() ? From 2eebc8ebe12edaf39272f3dede2992e435b4b071 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 4 Jul 2019 18:11:41 +0800 Subject: [PATCH 10/41] length --- .../graduation/tasks/GraduationTasksappraiseReplyChild.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReplyChild.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReplyChild.js index 56f633d2a..27739b611 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReplyChild.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReplyChild.js @@ -81,7 +81,7 @@ class GraduationTasksappraiseReplyChild extends Component{ > }
    -
    + {!!comment_scores.length &&
    -
    +
    } ) } From 45b6fa412cd67e264c0a8d59c0d2465fd1f07673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 4 Jul 2019 18:14:55 +0800 Subject: [PATCH 11/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/ShixunWorkDetails.js | 8 +- .../Shixunworkdetails/ShixunCustomsPass.js | 520 +++++++++--------- 2 files changed, 268 insertions(+), 260 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkDetails.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkDetails.js index c1233ed3f..205fbd9e7 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkDetails.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkDetails.js @@ -86,12 +86,16 @@ class ShixunWorkDetails extends Component {

    -
    +
    {data&&data.homework_common_name} 返回
    -
    +
    非编程类型任务,不参与查重 被查作品: diff --git a/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunCustomsPass.js b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunCustomsPass.js index 89c6e4bd4..81e5ec178 100644 --- a/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunCustomsPass.js +++ b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunCustomsPass.js @@ -1,259 +1,263 @@ -import React, {Component} from "react"; -import {WordsBtn} from 'educoder'; -import {Table} from "antd"; -import {Link,Switch,Route,Redirect} from 'react-router-dom'; -import moment from 'moment'; -import { MonacoDiffEditor } from 'react-monaco-editor'; - -class ShixunCustomsPass extends Component { - - constructor(props) { - super(props); - this.state = { - loadingstate:true, - datas:undefined - } - } - - componentDidMount() { - - } - - render() { - let {data}=this.props; - console.log(data) - let datas=[]; - - data&&data.challenge_list.forEach((item,key)=>{ - datas.push({ - customs:{position:item.position,subject:item.subject}, - taskname:{name:item.username}, - openingtime:moment(item.end_time).format('YYYY-MM-DD HH:mm:ss'), - evaluating: {final_score:item.final_score,all_score:item.all_score}, - finishtime:item.copy_username, - elapsedtime:moment(item.copy_end_time).format('YYYY-MM-DD HH:mm:ss'), - empvalue:item.code_rate, - // adjustmentminute:asdasd - }) - }) - - - let columns=[{ - title: '关卡', - dataIndex: 'customs', - key: 'customs', - render: (text, record) => ( - - - - - - - 第{record.customs.position}关 - {record.customs.subject} - - - ), - }, { - title: '被查作品', - dataIndex: 'taskname', - key: 'taskname', - render: (text, record) => ( - - {record.taskname.name} - - ), - }, { - title: '被查作品完成时间', - dataIndex: 'openingtime', - key: 'openingtime', - render: (text, record) => ( - - {record.openingtime} - - ), - }, { - title: '得分/满分', - key: 'evaluating', - dataIndex: 'evaluating', - - render: (text, record) => ( - - {record.evaluating.final_score}/{record.evaluating.all_score} - - ), - }, { - title: '疑被抄袭作品', - key: 'finishtime', - dataIndex: 'finishtime', - render: (text, record) => ( - - {record.finishtime} - - ), - }, { - title: '疑被抄袭作品完成时间', - key: 'elapsedtime', - dataIndex: 'elapsedtime', - - render: (text, record) => ( - - {record.elapsedtime} - - ), - }, { - title: '相似度', - key: 'empvalue', - dataIndex: 'empvalue', - - render: (text, record) => ( - - {record.empvalue}% - - ), - }]; - // { - // title: '调分', - // key: 'adjustmentminute', - // dataIndex: 'adjustmentminute', - // - // render: (text, record) => ( - // - // 6小时 50分钟 6秒 - // - // ), - // }, - - - - return ( -
    - - - {datas===undefined?"":} - -
    -
    -
    实训详情
    - - { - data&&data.challenge_list.map((item,key)=>{ - return( -
    -
    -

    - - - - - 第{item.position}关 - - {item.subject} - - - 代码文件:{item.code_list[0].path} -

    - -
    - - - {item.code_list.map((ite,k)=>{ - return( -
    -
    -

    - - {item.username} - 的代码文件 - - - {item.copy_username} - 的代码文件 - -

    - -
    -
  • - -
  • -
    -
    -
    - ) - })} -
    - ) - }) - } -
    -
    - - - ) - } -} - +import React, {Component} from "react"; +import {WordsBtn} from 'educoder'; +import {Table} from "antd"; +import {Link,Switch,Route,Redirect} from 'react-router-dom'; +import moment from 'moment'; +import { MonacoDiffEditor } from 'react-monaco-editor'; + +class ShixunCustomsPass extends Component { + + constructor(props) { + super(props); + this.state = { + loadingstate:true, + datas:undefined + } + } + + componentDidMount() { + + } + + render() { + let {data}=this.props; + console.log(data) + let datas=[]; + + data&&data.challenge_list.forEach((item,key)=>{ + datas.push({ + customs:{position:item.position,subject:item.subject}, + taskname:{name:item.username}, + openingtime:moment(item.end_time).format('YYYY-MM-DD HH:mm:ss'), + evaluating: {final_score:item.final_score,all_score:item.all_score}, + finishtime:item.copy_username, + elapsedtime:moment(item.copy_end_time).format('YYYY-MM-DD HH:mm:ss'), + empvalue:item.code_rate, + // adjustmentminute:asdasd + }) + }) + + + let columns=[{ + title: '关卡', + dataIndex: 'customs', + key: 'customs', + className:"customsPass", + render: (text, record) => ( + + + + + + + 第{record.customs.position}关 + {record.customs.subject} + + + ), + }, { + title: '被查作品', + dataIndex: 'taskname', + key: 'taskname', + render: (text, record) => ( + + {record.taskname.name} + + ), + }, { + title: '被查作品完成时间', + dataIndex: 'openingtime', + key: 'openingtime', + render: (text, record) => ( + + {record.openingtime} + + ), + }, { + title: '得分/满分', + key: 'evaluating', + dataIndex: 'evaluating', + + render: (text, record) => ( + + {record.evaluating.final_score}/{record.evaluating.all_score} + + ), + }, { + title: '疑被抄袭作品', + key: 'finishtime', + dataIndex: 'finishtime', + render: (text, record) => ( + + {record.finishtime} + + ), + }, { + title: '疑被抄袭作品完成时间', + key: 'elapsedtime', + dataIndex: 'elapsedtime', + + render: (text, record) => ( + + {record.elapsedtime} + + ), + }, { + title: '相似度', + key: 'empvalue', + dataIndex: 'empvalue', + + render: (text, record) => ( + + {record.empvalue}% + + ), + }]; + // { + // title: '调分', + // key: 'adjustmentminute', + // dataIndex: 'adjustmentminute', + // + // render: (text, record) => ( + // + // 6小时 50分钟 6秒 + // + // ), + // }, + + + + return ( +
    + + + {datas===undefined?"":
    } + +
    +
    +
    实训详情
    + + { + data&&data.challenge_list.map((item,key)=>{ + return( +
    +
    +

    + + + + + 第{item.position}关 + + {item.subject} + + + 代码文件:{item.code_list[0].path} +

    + +
    + + + {item.code_list.map((ite,k)=>{ + return( +
    +
    +

    + + {item.username} + 的代码文件 + + + {item.copy_username} + 的代码文件 + +

    + +
    +
  • + +
  • +
    +
    +
    + ) + })} +
    + ) + }) + } +
    +
    + + + ) + } +} + export default ShixunCustomsPass; \ No newline at end of file From df263116cc3aa79c43851f05e2ddbb50a9d5498f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 4 Jul 2019 21:55:47 +0800 Subject: [PATCH 12/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/coursesPublic/Associationmodel.js | 2 +- .../src/modules/courses/graduation/tasks/GraduateTaskItem.js | 2 +- .../courses/graduation/tasks/GraduationTaskssettinglist.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/Associationmodel.js b/public/react/src/modules/courses/coursesPublic/Associationmodel.js index 584bab401..f792fc63b 100644 --- a/public/react/src/modules/courses/coursesPublic/Associationmodel.js +++ b/public/react/src/modules/courses/coursesPublic/Associationmodel.js @@ -236,7 +236,7 @@ class Associationmodel extends Component{ }}>
    你当前尚未管理任何项目,请先 创建项目 再关联
    diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index 2cbf0fe33..f66874330 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -338,7 +338,7 @@ class GraduateTaskItem extends Component{ {item==="创建项目"? - 创建项目 + 创建项目 :""} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index c1a10dabf..5d0515535 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -1293,7 +1293,7 @@ class GraduationTaskssettinglist extends Component{ {item==="补交作品"?补交作品:""} {item==="修改作品"?修改作品:""} {item==="查看作品"?查看作品 :""} - {item==="创建项目"?创建项目:""} + {item==="创建项目"?创建项目:""} {item==="关联项目"?关联项目:""} {item==="取消关联"?取消关联:""} {item==="补交附件"?补交附件:""} From 583fcca9441eb1c8df2f46035402d52f669b4f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 4 Jul 2019 22:06:00 +0800 Subject: [PATCH 13/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/Listofworks.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index b86bcfce5..98df760d7 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1347,9 +1347,13 @@ class Listofworks extends Component { // let url = "/zip/shixun_report"; // let homeworkid = this.props.match.params.homeworkid; axios.get(url).then((response) => { - if(response.status === 200){ + console.log("1350"); + console.log(response); + if(response.data.status === 200){ window.open(url, '_blank'); + }else{ + } }).catch((error) => { console.log(error) @@ -1368,7 +1372,9 @@ class Listofworks extends Component { // } // },{responseType: 'blob'}) axios.get(url).then((response) => { - if(response.status === 200){ + console.log("1374"); + console.log(response); + if(response.data.status=== 200){ window.open(url, '_blank'); } From 5eb4042edc55c36a3ef8214840b634cbc0b17bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 4 Jul 2019 22:28:51 +0800 Subject: [PATCH 14/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/Listofworks.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 98df760d7..7fea77b35 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1350,7 +1350,7 @@ class Listofworks extends Component { console.log("1350"); console.log(response); if(response.data.status === 200){ - window.open(url, '_blank'); + window.open("/api"+url, '_blank'); }else{ @@ -1375,7 +1375,7 @@ class Listofworks extends Component { console.log("1374"); console.log(response); if(response.data.status=== 200){ - window.open(url, '_blank'); + window.open("/api"+url, '_blank'); } }).catch((error) => { @@ -1531,8 +1531,8 @@ class Listofworks extends Component { {this.props.isAdmin()?
  • 导出
  • :""} {this.props.isAdmin() ? From 7378d933ee7f3e3c5b86bb671deaaa7f66d5903d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 4 Jul 2019 22:33:59 +0800 Subject: [PATCH 15/41] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMsettings/TPMsettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js index 949b0a949..e570264f7 100644 --- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js +++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js @@ -1474,7 +1474,7 @@ export default class TPMsettings extends Component { this.testscripttip(0)}>
    + style={{top: '33px', right: '-6px',width: '322px',zIndex: '10',display: testscripttiptype===true?'block':"none"}}>

    From 9b56db808c52fc9ae04bfbd9346275aa6b43bbca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 4 Jul 2019 22:52:33 +0800 Subject: [PATCH 16/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/shixunHomework/Listofworks.js | 15 +++++-- .../shixunHomework/Trainingjobsetting.js | 44 ++++++++++--------- .../shixunHomework/Workquestionandanswer.js | 44 ++++++++++--------- 3 files changed, 57 insertions(+), 46 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 7fea77b35..9ea5bc78a 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1349,11 +1349,13 @@ class Listofworks extends Component { axios.get(url).then((response) => { console.log("1350"); console.log(response); - if(response.data.status === 200){ - window.open("/api"+url, '_blank'); + if(response.data.status&&response.data.status===-1){ - }else{ + }else if(response.data.status&&response.data.status===-2){ + + }else{ + window.open("/api"+url, '_blank'); } }).catch((error) => { console.log(error) @@ -1374,7 +1376,12 @@ class Listofworks extends Component { axios.get(url).then((response) => { console.log("1374"); console.log(response); - if(response.data.status=== 200){ + if(response.data.status&&response.data.status===-1){ + + + }else if(response.data.status&&response.data.status===-2){ + + }else{ window.open("/api"+url, '_blank'); } diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index f67eca6ab..0afd9ff4d 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1608,21 +1608,20 @@ class Trainingjobsetting extends Component { }) } // 导出实习报告批量 - internshipreport = () => { + internshipreport = (url) => { console.log("internshipreport"); - var homeworkid = this.props.match.params.homeworkid; - let url = "/zip/shixun_report"; - axios.get((url),{ - params: { - homework_common_id: homeworkid, - } - },{responseType: 'blob'}).then((response) => { + // var homeworkid = this.props.match.params.homeworkid; + // let url = "/zip/shixun_report"; + axios.get(url).then((response) => { console.log("326"); console.log(response); - if(response.status === 200){ - window.open(url, '_blank'); - }else{ + if(response.data.status&&response.data.status===-1){ + + + }else if(response.data.status&&response.data.status===-2){ + }else{ + window.open("/api"+url, '_blank'); } }).catch((error) => { @@ -1631,19 +1630,22 @@ class Trainingjobsetting extends Component { } // 课堂学生成绩的导出下载 - Classstudentachievement = () => { + Classstudentachievement = (url) => { console.log("Classstudentachievement"); - const course_id = this.props.match.params.coursesId; - let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx"; - axios.get((url),{responseType: 'blob'}).then((response) => { - console.log("339"); + // const course_id = this.props.match.params.coursesId; + // let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx"; + axios.get(url).then((response) => { + console.log("1374"); console.log(response); - if(response.status === 200){ - window.open(url, '_blank'); + if(response.data.status&&response.data.status===-1){ + + + }else if(response.data.status&&response.data.status===-2){ + }else{ + window.open("/api"+url, '_blank'); } - }).catch((error) => { console.log(error) }); @@ -1789,9 +1791,9 @@ class Trainingjobsetting extends Component { {this.props.isAdmin() ?

  • 导出
  • : ""} diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index ab650aae2..c582dfb32 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -319,21 +319,20 @@ class Workquestionandanswer extends Component { // 导出实习报告批量 - internshipreport = () => { + internshipreport = (url) => { console.log("internshipreport"); - var homeworkid = this.props.match.params.homeworkid; - let url = "/zip/shixun_report"; - axios.get((url),{ - params: { - homework_common_id: homeworkid, - } - },{responseType: 'blob'}).then((response) => { + // var homeworkid = this.props.match.params.homeworkid; + // let url = "/zip/shixun_report"; + axios.get(url).then((response) => { console.log("326"); console.log(response); - if(response.status === 200){ - window.open(url, '_blank'); - }else{ + if(response.data.status&&response.data.status===-1){ + + + }else if(response.data.status&&response.data.status===-2){ + }else{ + window.open("/api"+url, '_blank'); } }).catch((error) => { @@ -342,19 +341,22 @@ class Workquestionandanswer extends Component { } // 课堂学生成绩的导出下载 - Classstudentachievement = () => { + Classstudentachievement = (url) => { console.log("Classstudentachievement"); - const course_id = this.props.match.params.coursesId; - let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx"; - axios.get((url),{responseType: 'blob'}).then((response) => { - console.log("339"); + // const course_id = this.props.match.params.coursesId; + // let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx"; + axios.get(url).then((response) => { + console.log("1374"); console.log(response); - if(response.status === 200){ - window.open(url, '_blank'); + if(response.data.status&&response.data.status===-1){ + + + }else if(response.data.status&&response.data.status===-2){ + }else{ + window.open("/api"+url, '_blank'); } - }).catch((error) => { console.log(error) }); @@ -485,9 +487,9 @@ class Workquestionandanswer extends Component {
  • 导出
  • : ""} From 63e3ae8385f8dc3e542b05c23389e25165415bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 4 Jul 2019 22:56:39 +0800 Subject: [PATCH 17/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/tpm/TPMsettings/TPMsettings.js | 39 ++++++++++++------- .../tpm/challengesnew/TPMchallengesnew.js | 8 ++-- .../modules/tpm/challengesnew/TPMquestion.js | 16 +++++--- .../src/modules/tpm/newshixuns/Newshixuns.js | 24 +++++++----- 4 files changed, 54 insertions(+), 33 deletions(-) diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js index 949b0a949..3b3081fef 100644 --- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js +++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js @@ -1297,23 +1297,26 @@ export default class TPMsettings extends Component {

    -
    +

    技术平台

    * -
    +
    { settingsData === undefined ? "" : settingsData.shixun.small_type.map((item, key) => { @@ -1409,18 +1414,20 @@ export default class TPMsettings extends Component {
    -
    -
    -
    + {/*
    */} + {/*
    */} +

    评测脚本

    triggerNode.parentNode} > diff --git a/public/react/src/modules/tpm/challengesnew/TPMquestion.js b/public/react/src/modules/tpm/challengesnew/TPMquestion.js index c1d310ce2..aba4743d9 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMquestion.js +++ b/public/react/src/modules/tpm/challengesnew/TPMquestion.js @@ -1473,7 +1473,9 @@ editanswersMD=(initValue, id)=> {

    奖励经验值

    -
    +
    * - {this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{ - return( -

    - - - - - {item.name} - - - {item.response===undefined?"":bytesToSize(item.size)} - - -

    - ) - })} + + + (单个文件150M以内) + + {/**/} + {/*{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{*/} + {/*return(*/} + {/*

    */} + {/**/} + {/**/} + {/**/} + {/**/} + {/*{item.name}*/} + {/**/} + {/**/} + {/*{item.response===undefined?"":bytesToSize(item.size)}*/} + {/**/} + {/*this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}>*/} + {/*

    */} + {/*)*/} + {/*})}*/} {/*{attachments&&attachments.map((item,key)=>{*/} {/*return(*/} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js index 585986fb2..10f6a1f2b 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js @@ -2,7 +2,7 @@ import React, {Component} from "React"; import {Form, Select, Input, Button, Checkbox, Upload, Icon, message, Modal} from "antd"; import {Link} from 'react-router-dom'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; -import {WordsBtn, getUrl,bytesToSize} from 'educoder'; +import {WordsBtn, getUrl,bytesToSize,appendFileSizeToUploadFileAll} from 'educoder'; import axios from 'axios'; import Modals from '../../../modals/Modals'; import '../../css/Courses.css'; @@ -130,7 +130,9 @@ class GraduationTasksnew extends Component { // for(var list of fileList ){ // console.log(list) // } - this.setState({fileList}); + this.setState({ + fileList: appendFileSizeToUploadFileAll(fileList), + }); } // onAttachmentRemove = (file) => { @@ -167,8 +169,8 @@ class GraduationTasksnew extends Component { } onAttachmentRemove = (file) => { - // const url = `/attachments/${file.response ? file.response.id : file.uid}.json` - const url = `/attachments/${file}.json` + const url = `/attachments/${file.response ? file.response.id : file.uid}.json` + // const url = `/attachments/${file}.json` axios.delete(url, {}) .then((response) => { if (response.data) { @@ -257,7 +259,7 @@ class GraduationTasksnew extends Component { multiple: true, // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 - showUploadList: false, + // showUploadList: false, action: `${getUrl()}/api/attachments.json`, onChange: this.handleChange, onRemove: this.onAttachmentRemove, @@ -423,6 +425,15 @@ class GraduationTasksnew extends Component { )} +
    diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index 4f1ddb027..ea554c208 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -645,8 +645,12 @@ class ShixunStudentWork extends Component { 正在执行查重,请稍后刷新页面查看结果 温馨提示:执行时间因查重作品数以及作品的代码量而异 - + +
    + +
    +
    - { isAdmin && hasGraduationModule && 已选 {checkBoxValues.length} 个 } + { isAdminOrTeacher && hasGraduationModule && 已选 {checkBoxValues.length} 个 } {
    { hasGraduationModule && isAdminOrTeacher &&
  • 加入答辩组 From 30c71007f951d02e3f5c63b2d10a17850359f8cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 5 Jul 2019 10:08:53 +0800 Subject: [PATCH 23/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/Resource/index.js | 50 +++++++++++++------ 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index f26d97ad3..06531d142 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -37,7 +37,8 @@ class Fileslists extends Component{ course_modules:undefined, has_course_groups:false, course_is_public:undefined, - isSpin:false + isSpin:false, + course_second_categories:[] } } componentDidMount=()=>{ @@ -115,12 +116,22 @@ class Fileslists extends Component{ axios.get(url, { }).then((response) => { if(response!=undefined){ + if(response.data&&response.data){ + let list=response.data.course_modules; + let course_second_categoriess; + list.map((item,key)=>{ + course_second_categoriess=item.course_second_categories + }) + debugger this.setState({ course_modules:response.data, - has_course_groups:response.data.has_course_groups + has_course_groups:response.data.has_course_groups, + course_second_categories:course_second_categoriess }) } + + } }) @@ -647,7 +658,8 @@ class Fileslists extends Component{ discussMessageid, course_modules, shixunmodal, - course_is_public + course_is_public, + filesId } = this.state; let category_id= this.props.match.params.category_id; @@ -797,31 +809,37 @@ class Fileslists extends Component{ overflow-y: auto; } .drop_down_menu li { - overflow: visible; - } + overflow: visible; + } + .courseSecond{ + margin-left: 10px; + padding: 10px; + } `} -
      -

      +

        + {this.state.course_second_categories.length>10?

        {this.setState({dirSearchValue: e.target.value})}}/> -

        +

        :""} - {/*{course_modules&&course_modules.course_modules.map((item,key)=>{*/} - {/*return(*/} - {/*
      • this.moveTos(0)}>{item.module_name}
      • */} - {/*)*/} - {/*})}*/} + {course_modules&&course_modules.course_modules.map((item,key)=>{ + return( + filesId&&filesId===item.id?"":
      • this.moveTos(0)}>{item.module_name}
      • + ) + })} { course_modules&&course_modules.course_modules.map( (item,key) => { + return item.course_second_categories.filter((item)=> { return (!this.state.dirSearchValue || item.name.indexOf(this.state.dirSearchValue) != -1) }).map((itm,k)=>{ return( -
      • this.moveTos(itm.id )}>{itm.name}
      • + filesId&&filesId===itm.id?"":
      • this.moveTos(itm.id )}>{itm.name}
      • ) }) })} - + {this.state.course_second_categories.length===0? +
        暂无数据
        :""} {/*{course_modules&&course_modules.course_modules.map((item,key)=>{*/} {/*return(*/} @@ -834,7 +852,7 @@ class Fileslists extends Component{ {/*})}*/} {this.props.isAdmin()?parseInt(this.props.match.params.main_id)===parseInt(this.props.coursesids)?

        - this.addDir()}>添加目录... + this.addDir()}>添加目录

        :"":""}
      From eeb799b9f2aedfdd12fc7c6aa116de6af7145efc Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 5 Jul 2019 10:23:56 +0800 Subject: [PATCH 24/41] =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/members/studentsList.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index 26fa8984e..07c828d5b 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -462,9 +462,9 @@ class studentsList extends Component{ checkBoxValues, checkAllValue }=this.state; - let currentOrderName = '学生学号' + let currentOrderName = '学生学号排序' if (order == ORDER_BY_GROUP) { - currentOrderName = '分班名称' + currentOrderName = '分班名称排序' } const { coursesids } = this.props const course_group_id = this.props.match.params.course_group_id @@ -625,12 +625,18 @@ class studentsList extends Component{ }
  • } +
  • - {currentOrderName} -
      -
    • this.onSortTypeChange(ORDER_BY_NUM)} >学生学号
    • -
    • this.onSortTypeChange(ORDER_BY_GROUP)} >分班名称
    • + {currentOrderName} + { course_groups && !!course_groups.length && + + +
        +
      • this.onSortTypeChange(ORDER_BY_NUM)} >学生学号排序
      • +
      • this.onSortTypeChange(ORDER_BY_GROUP)} >分班名称排序
      +
      + }
  • From 2a613bd6386f09527fcff34e7349383c3e8e1e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 5 Jul 2019 10:24:28 +0800 Subject: [PATCH 25/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/shixunHomework/shixunHomework.js | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index ec2f5e4c0..9bf782d48 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -878,6 +878,7 @@ class ShixunHomework extends Component{ if(response.data&&response.data){ this.setState({ course_modules:response.data, + homework_categorys:response.data.homework_category }) } } @@ -1128,19 +1129,31 @@ class ShixunHomework extends Component{ {this.setState({dirSearchValue: e.target.value})}}/>

    } - {/*{course_modules&&course_modules.main_category.map((item,key)=>{*/} - {/*return(*/} - {/*
  • this.moveTos(item.main_category_id)}>{item.main_category_name}
  • */} - {/*)*/} - {/*})}*/} + {course_modules&&course_modules.main_category.map((item,key)=>{ + return( + datas&&datas.category_id===null?datas.main_category_id===item.main_category_id?"":
  • this.moveTos(item.main_category_id)}>{item.main_category_name}
  • :"" + ) + })} - { course_modules&&course_modules.homework_category.filter((item)=> { + { course_modules&&course_modules.homework_category.filter((item,key)=> { return (!this.state.dirSearchValue || item.category_name.indexOf(this.state.dirSearchValue) != -1) }).map( (item,key) => { - return
  • this.moveTos(item.category_id )}>{item.category_name}
  • - })} - + return + datas&&datas.category_id!=null?datas.category_id===item.category_id?"":
  • this.moveTos(item.category_id )}>{item.category_name}
  • :"" + })} + + + + {course_modules&&course_modules.homework_category.length===0? +
    暂无数据
    :""} {/*{course_modules&&course_modules.homework_category.map((item,key)=>{*/} {/*return(*/} From e8ab478f3702809426c2dd308d4d1990f5668d7c Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 5 Jul 2019 10:32:05 +0800 Subject: [PATCH 26/41] =?UTF-8?q?=E7=AB=8B=E5=8D=B3=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/busyWork/commonWork.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js index 85fd2ff66..d1f6a8e0b 100644 --- a/public/react/src/modules/courses/busyWork/commonWork.js +++ b/public/react/src/modules/courses/busyWork/commonWork.js @@ -410,7 +410,9 @@ class commonWork extends Component{ searchPlaceholder={"请输入名称进行搜索"} showSearchInput={true} > - + { mainList && mainList.course_identity < 5 && mainList.homeworks.length>0 &&
    @@ -422,8 +424,7 @@ class commonWork extends Component{ onClick={this.onWorkDelete}>删除
  • - + this.refs['publishModalRef'].homeworkstart()}>{ "立即发布" }
  • Date: Fri, 5 Jul 2019 10:33:29 +0800 Subject: [PATCH 27/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/shixunHomework/Listofworks.js | 47 +++++++++++++++++-- .../shixunHomework/Trainingjobsetting.js | 2 +- .../shixunHomework/Workquestionandanswer.js | 2 +- .../modules/user/LoginRegisterComponent.js | 5 +- 4 files changed, 46 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 9ea5bc78a..447155ce9 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1346,7 +1346,7 @@ class Listofworks extends Component { // } // let url = "/zip/shixun_report"; // let homeworkid = this.props.match.params.homeworkid; - axios.get(url).then((response) => { + axios.get((url),{headers:{'filename':'utf-8'}}).then((response) => { console.log("1350"); console.log(response); if(response.data.status&&response.data.status===-1){ @@ -1355,13 +1355,50 @@ class Listofworks extends Component { }else if(response.data.status&&response.data.status===-2){ }else{ - window.open("/api"+url, '_blank'); + window.location.href("/api"+url); + // response.blob().then(blob => { + // //关闭loading 按钮恢复正常 + // let blobUrl = window.URL.createObjectURL(blob); + // const filename = times.formatNowDate() + '.zip'; + // const aElement = document.createElement('a'); + // document.body.appendChild(aElement); + // aElement.style.display = 'none'; + // aElement.href = blobUrl; + // aElement.download = filename; + // aElement.click(); + // document.body.removeChild(aElement); + // }); + } }).catch((error) => { console.log(error) }); } - + //字节装为字符串 + utf8ByteArrayToString(bytes) { + var out = [], pos =0, c =0; + while (pos < bytes.length) { + var c1 = bytes[pos++]; + if (c1 <128) { + out[c++] = String.fromCharCode(c1); + }else if (c1 >191 && c1 <224) { + var c2 = bytes[pos++]; + out[c++] = String.fromCharCode((c1 &31) <<6 | c2 &63); + }else if (c1 >239 && c1 <365) { + var c2 = bytes[pos++]; + var c3 = bytes[pos++]; + var c4 = bytes[pos++]; + var u = ((c1 &7) <<18 | (c2 &63) <<12 | (c3 &63) <<6 | c4 &63) -0x10000; + out[c++] = String.fromCharCode(0xD800 + (u >>10)); + out[c++] = String.fromCharCode(0xDC00 + (u &1023)); + }else { + var c2 = bytes[pos++]; + var c3 = bytes[pos++]; + out[c++] =String.fromCharCode((c1 &15) <<12 | (c2 &63) <<6 | c3 &63); + } + } + return out.join(''); + } // 课堂学生成绩的导出下载 Classstudentachievement=(url)=>{ console.log("Classstudentachievement"); @@ -1373,7 +1410,7 @@ class Listofworks extends Component { // search: this.state.searchtext, // } // },{responseType: 'blob'}) - axios.get(url).then((response) => { + axios.get((url),{headers:{'filename':'utf-8'}}).then((response) => { console.log("1374"); console.log(response); if(response.data.status&&response.data.status===-1){ @@ -1539,7 +1576,7 @@ class Listofworks extends Component { 导出
  • :""} {this.props.isAdmin() ? diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 0afd9ff4d..8e857199b 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1793,7 +1793,7 @@ class Trainingjobsetting extends Component { : ""} diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index c582dfb32..8d88e9fb5 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -489,7 +489,7 @@ class Workquestionandanswer extends Component { : ""} diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index c909eb8c1..54185c9ed 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -344,9 +344,8 @@ class LoginRegisterComponent extends Component { passwords: "", Agreetotheterms: "", }) - // this.props.history.push(result.data.redirect_uri) - this.props.Setshowbool(2); - + this.props.history.push(result.data.redirect_uri); + //this.props.Setshowbool(2); } catch (e) { } From cbf9b33600c26aa5ef181b8bfde34b85e1955a4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 5 Jul 2019 10:34:46 +0800 Subject: [PATCH 28/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/shixunHomework/Listofworks.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 447155ce9..d6950d43a 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1419,7 +1419,9 @@ class Listofworks extends Component { }else if(response.data.status&&response.data.status===-2){ }else{ - window.open("/api"+url, '_blank'); + window.location.href("/api"+url); + + // window.open("/api"+url, '_blank'); } }).catch((error) => { From 29b6f6d2cda3f854484923c1e34a7ab65cbb9035 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 5 Jul 2019 10:51:20 +0800 Subject: [PATCH 29/41] toCreateProject --- public/react/src/modules/courses/busyWork/common.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/common.js b/public/react/src/modules/courses/busyWork/common.js index 9eb901d9d..8c37e78d2 100644 --- a/public/react/src/modules/courses/busyWork/common.js +++ b/public/react/src/modules/courses/busyWork/common.js @@ -18,11 +18,15 @@ export function RouteHOC(options = {}) { } } toCreateProject = () => { + let url = '/projects/new' if (window.location.port == 3007) { - window.location.href = '/testbdweb.educoder.net/projects/new' - } else { - window.location.href = '/projects/new' + // window.location.href + url = '/testbdweb.educoder.net/projects/new' } + window.open( + url, + '_blank' // <- This is what makes it open in a new window. + ); } // common_homework group_homework // 是否是分组作业 From 877cb5a2ea3576c02dfeb03813f411ea1fbfa751 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 5 Jul 2019 11:00:41 +0800 Subject: [PATCH 30/41] =?UTF-8?q?=E7=94=B3=E8=AF=89=E5=89=A9=E4=BD=99?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/busyWork/CommonWorkItem.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index f30e43d21..6c3e7997a 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -178,6 +178,7 @@ class CommonWorkItem extends Component{ item.status_time!="" && {item.status_time} From 19a85a054ae70f0a8869d11c641109cddd779ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 5 Jul 2019 11:00:45 +0800 Subject: [PATCH 31/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/shixunHomework/Listofworks.js | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index d6950d43a..e58d2bb0e 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1346,7 +1346,7 @@ class Listofworks extends Component { // } // let url = "/zip/shixun_report"; // let homeworkid = this.props.match.params.homeworkid; - axios.get((url),{headers:{'filename':'utf-8'}}).then((response) => { + axios.get((url),{headers:{'filename':'utf-8'},responseType: 'blob',}).then((response) => { console.log("1350"); console.log(response); if(response.data.status&&response.data.status===-1){ @@ -1355,20 +1355,20 @@ class Listofworks extends Component { }else if(response.data.status&&response.data.status===-2){ }else{ - window.location.href("/api"+url); - // response.blob().then(blob => { - // //关闭loading 按钮恢复正常 - // let blobUrl = window.URL.createObjectURL(blob); - // const filename = times.formatNowDate() + '.zip'; - // const aElement = document.createElement('a'); - // document.body.appendChild(aElement); - // aElement.style.display = 'none'; - // aElement.href = blobUrl; - // aElement.download = filename; - // aElement.click(); - // document.body.removeChild(aElement); - // }); - + // window.location.href("/api"+url); + console.log("开始下载zip文件") + const type='application/zip'//ZIP文件 + const blob = new Blob([response.data], { type: type }) + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) + //后台再header中传文件名 + const name = decodeURI(response.headers['content-disposition'].split('=')[1]) + downloadElement.href = href + downloadElement.download = name + document.body.appendChild(downloadElement) + downloadElement.click() + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放掉blob对象 } }).catch((error) => { console.log(error) From 696be1edbf338905e98c5971a030324515ee7a81 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 5 Jul 2019 11:08:54 +0800 Subject: [PATCH 32/41] id --- .../modules/courses/members/teacherList.js | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index c0c450ac0..9e20bd64d 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -39,15 +39,17 @@ function buildColumns(that) { render: (content, item, index) => { return {(that.state.page - 1) * 20 + index + 1}  } - },{ - title: '用户ID', - width: 120, - dataIndex: 'login', - key: 'login', - render: (login, record) => { - return 8 ? login : ''}`}>{login} - } - }, { + } + // ,{ + // title: '用户ID', + // width: 120, + // dataIndex: 'login', + // key: 'login', + // render: (login, record) => { + // return 8 ? login : ''}`}>{login} + // } + // } + , { title: '姓名', dataIndex: 'name', width: 120, From b057098eb936ed3f9d24118821bae2b4f93edf0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 5 Jul 2019 11:25:34 +0800 Subject: [PATCH 33/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/package.json | 2 +- .../react/src/modules/courses/Resource/index.js | 4 ++-- .../courses/shixunHomework/shixunHomework.js | 15 ++++++++++----- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/public/react/package.json b/public/react/package.json index ebfda1b41..54519f009 100644 --- a/public/react/package.json +++ b/public/react/package.json @@ -93,7 +93,7 @@ "wrap-md-editor": "^0.2.20" }, "scripts": { - "start": "node --max_old_space_size=8072 scripts/start.js", + "start": "node --max_old_space_size=15360 scripts/start.js", "build": "node --max_old_space_size=15360 scripts/build.js", "concat": "node scripts/concat.js", "gen_stats": "NODE_ENV=production webpack --profile --config=./config/webpack.config.prod.js --json > stats.json", diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index 06531d142..1ad136934 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -123,7 +123,7 @@ class Fileslists extends Component{ list.map((item,key)=>{ course_second_categoriess=item.course_second_categories }) - debugger + this.setState({ course_modules:response.data, has_course_groups:response.data.has_course_groups, @@ -850,7 +850,7 @@ class Fileslists extends Component{ {/*})*/} {/*)*/} {/*})}*/} - {this.props.isAdmin()?parseInt(this.props.match.params.main_id)===parseInt(this.props.coursesids)? + {this.props.isAdmin()?parseInt(this.props.match.params.main_id)===filesId&&filesId?

    this.addDir()}>添加目录

    diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 9bf782d48..9bf0d12a4 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -976,7 +976,8 @@ class ShixunHomework extends Component{ order, }=this.state; - + let main_id=this.props.match.params.main_id; + let category_id=this.props.match.params.category_id; return(
    @@ -1131,7 +1132,7 @@ class ShixunHomework extends Component{ {course_modules&&course_modules.main_category.map((item,key)=>{ return( - datas&&datas.category_id===null?datas.main_category_id===item.main_category_id?"":
  • this.moveTos(item.main_category_id)}>{item.main_category_name}
  • :"" + datas&&datas.category_id===null?"":
  • this.moveTos(item.main_category_id)}>{item.main_category_name}
  • :"" ) })} @@ -1139,8 +1140,12 @@ class ShixunHomework extends Component{ { course_modules&&course_modules.homework_category.filter((item,key)=> { return (!this.state.dirSearchValue || item.category_name.indexOf(this.state.dirSearchValue) != -1) }).map( (item,key) => { - return - datas&&datas.category_id!=null?datas.category_id===item.category_id?"":
  • this.moveTos(item.category_id )}>{item.category_name}
  • :"" + if(datas&&datas.category_id!=null&&datas&&datas.category_id===item.category_id===false){ + return
  • this.moveTos(item.category_id )}>{item.category_name}
  • + } + if(datas&&datas.category_id===null){ + return
  • this.moveTos(item.category_id )}>{item.category_name}
  • + } })} @@ -1152,7 +1157,7 @@ class ShixunHomework extends Component{ } `} - {course_modules&&course_modules.homework_category.length===0? + {course_modules&&course_modules.homework_category.length===0&&datas&&datas.category_id===null?
    暂无数据
    :""} {/*{course_modules&&course_modules.homework_category.map((item,key)=>{*/} From 8bb7d0d50a5add25ab0b4a81a16491306a2cd917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 5 Jul 2019 11:58:16 +0800 Subject: [PATCH 34/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/Listofworks.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index e58d2bb0e..4f3c3b9d4 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1419,9 +1419,18 @@ class Listofworks extends Component { }else if(response.data.status&&response.data.status===-2){ }else{ - window.location.href("/api"+url); - - // window.open("/api"+url, '_blank'); + const type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8' //excel文件 + const blob = new Blob([response.data], { type: type }) + const downloadElement = document.createElement('a') + const href = window.URL.createObjectURL(blob) + //后台再header中传文件名 + const name = decodeURI(response.headers['content-disposition'].split('=')[1]) + downloadElement.href = href + downloadElement.download = name + document.body.appendChild(downloadElement) + downloadElement.click() + document.body.removeChild(downloadElement) // 下载完成移除元素 + window.URL.revokeObjectURL(href) // 释放掉blob对象 } }).catch((error) => { From 80ca6bc9fec29e580b6c8b370f8a231f8094c676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 5 Jul 2019 12:12:33 +0800 Subject: [PATCH 35/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/shixunHomework/Listofworks.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 4f3c3b9d4..3620f0792 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1419,12 +1419,14 @@ class Listofworks extends Component { }else if(response.data.status&&response.data.status===-2){ }else{ - const type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8' //excel文件 + const type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' //excel文件 const blob = new Blob([response.data], { type: type }) const downloadElement = document.createElement('a') const href = window.URL.createObjectURL(blob) //后台再header中传文件名 const name = decodeURI(response.headers['content-disposition'].split('=')[1]) + console.log(response.headers['content-disposition'].split('=')[1]); + console.log(name); downloadElement.href = href downloadElement.download = name document.body.appendChild(downloadElement) From f2b301408b83bf39a1d0f44a1c42747a5b2268f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 5 Jul 2019 12:23:48 +0800 Subject: [PATCH 36/41] b --- .../react/src/modules/courses/shixunHomework/Listofworks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 3620f0792..ada6254bc 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1346,7 +1346,7 @@ class Listofworks extends Component { // } // let url = "/zip/shixun_report"; // let homeworkid = this.props.match.params.homeworkid; - axios.get((url),{headers:{'filename':'utf-8'},responseType: 'blob',}).then((response) => { + axios.get((url),{headers:{'filename':'utf-8'},responseType: 'blob'}).then((response) => { console.log("1350"); console.log(response); if(response.data.status&&response.data.status===-1){ @@ -1410,7 +1410,7 @@ class Listofworks extends Component { // search: this.state.searchtext, // } // },{responseType: 'blob'}) - axios.get((url),{headers:{'filename':'utf-8'}}).then((response) => { + axios.get((url),{headers:{'filename':'utf-8'},responseType: 'blob'}).then((response) => { console.log("1374"); console.log(response); if(response.data.status&&response.data.status===-1){ From 881bd3dcf2b9d538c19b1d9624107f218d59217d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 5 Jul 2019 12:34:21 +0800 Subject: [PATCH 37/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/exercise/Exercisestatisticalresult.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js index ca7b8e403..51b8ae98b 100644 --- a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js +++ b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js @@ -102,7 +102,7 @@ class Exercisestatisticalresult extends Component { } `} -
    +
    {data&&data.course_groups.length===0?"":
    From 34130459741f9e04e7f4699809ebd974efd0ac16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 5 Jul 2019 12:54:57 +0800 Subject: [PATCH 38/41] b --- .../courses/shixunHomework/Listofworks.js | 31 ++----------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index ada6254bc..7dd49a203 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1346,7 +1346,7 @@ class Listofworks extends Component { // } // let url = "/zip/shixun_report"; // let homeworkid = this.props.match.params.homeworkid; - axios.get((url),{headers:{'filename':'utf-8'},responseType: 'blob'}).then((response) => { + axios.get((url),{responseType: 'blob'}).then((response) => { console.log("1350"); console.log(response); if(response.data.status&&response.data.status===-1){ @@ -1374,31 +1374,6 @@ class Listofworks extends Component { console.log(error) }); } - //字节装为字符串 - utf8ByteArrayToString(bytes) { - var out = [], pos =0, c =0; - while (pos < bytes.length) { - var c1 = bytes[pos++]; - if (c1 <128) { - out[c++] = String.fromCharCode(c1); - }else if (c1 >191 && c1 <224) { - var c2 = bytes[pos++]; - out[c++] = String.fromCharCode((c1 &31) <<6 | c2 &63); - }else if (c1 >239 && c1 <365) { - var c2 = bytes[pos++]; - var c3 = bytes[pos++]; - var c4 = bytes[pos++]; - var u = ((c1 &7) <<18 | (c2 &63) <<12 | (c3 &63) <<6 | c4 &63) -0x10000; - out[c++] = String.fromCharCode(0xD800 + (u >>10)); - out[c++] = String.fromCharCode(0xDC00 + (u &1023)); - }else { - var c2 = bytes[pos++]; - var c3 = bytes[pos++]; - out[c++] =String.fromCharCode((c1 &15) <<12 | (c2 &63) <<6 | c3 &63); - } - } - return out.join(''); - } // 课堂学生成绩的导出下载 Classstudentachievement=(url)=>{ console.log("Classstudentachievement"); @@ -1410,7 +1385,7 @@ class Listofworks extends Component { // search: this.state.searchtext, // } // },{responseType: 'blob'}) - axios.get((url),{headers:{'filename':'utf-8'},responseType: 'blob'}).then((response) => { + axios.get((url),{responseType: 'blob'}).then((response) => { console.log("1374"); console.log(response); if(response.data.status&&response.data.status===-1){ @@ -1428,7 +1403,7 @@ class Listofworks extends Component { console.log(response.headers['content-disposition'].split('=')[1]); console.log(name); downloadElement.href = href - downloadElement.download = name + downloadElement.download = '201975.xlsx' document.body.appendChild(downloadElement) downloadElement.click() document.body.removeChild(downloadElement) // 下载完成移除元素 From b2f0d818c8d2b09236865b9c5cc4fe6c9e8577c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 5 Jul 2019 13:39:05 +0800 Subject: [PATCH 39/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/shixunHomework/Listofworks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 7dd49a203..d697694cb 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1403,7 +1403,7 @@ class Listofworks extends Component { console.log(response.headers['content-disposition'].split('=')[1]); console.log(name); downloadElement.href = href - downloadElement.download = '201975.xlsx' + downloadElement.download = name document.body.appendChild(downloadElement) downloadElement.click() document.body.removeChild(downloadElement) // 下载完成移除元素 From bca7a89c8c51cc0b22a942b415d9c16cc2c1c6a7 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 5 Jul 2019 14:11:31 +0800 Subject: [PATCH 40/41] && isAdmin --- .../modules/courses/busyWork/reply/CommonWorkAppraiseReply.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js b/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js index 146511712..e933bc411 100644 --- a/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js +++ b/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js @@ -277,7 +277,7 @@ class CommonWorkAppraiseReply extends Component{ showModulationtype={this.showModulationtype} addSuccess={this.addSuccess} ref={this.editorRef} totalCount={comment_scores.length} onReply={this.onReply} placeholder={"请在此输入对本作品的评语,最大限制2000个字符"} - showSameScore={isGroup} + showSameScore={isGroup && isAdmin} > }
    {/* ${!!comment_scores.length ? 'bor-bottom-greyE' : ''} */} From 4a023f553d068b5a854e9d47447e57348d729568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 5 Jul 2019 14:13:22 +0800 Subject: [PATCH 41/41] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/exercise/Studentshavecompletedthelist.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index a3ee9ef1a..f35e17ab7 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -760,7 +760,9 @@ class Studentshavecompletedthelist extends Component { {record.operating==="--"? {record.operating} - : + :record.submitstate === "未提交"? + -- + : {record.operating} } @@ -954,6 +956,9 @@ class Studentshavecompletedthelist extends Component { {record.finalscore==="--"? -- + :record.submitstate === "未提交"? + -- : {record.finalscore} @@ -1141,6 +1146,9 @@ class Studentshavecompletedthelist extends Component { {record.finalscore==="--"? -- + :record.submitstate === "未提交"? + -- : {record.finalscore}