+
}
diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js
index 1c627b78d..eaefd50e9 100644
--- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js
+++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js
@@ -142,6 +142,8 @@ class Coursesleftnav extends Component{
off('editshixunmainname',this.editshixunmainname)
off('videoAdd',this.addVideo)
off('editVideo',this.editVideo)
+ off('addcommon_homeworks',this.addcommon_homeworks)
+ off('editcommon_homeworks',this.editcommon_homeworks)
}
addshixunchild=(e, data)=>{
this.Navmodalnames(e,1,"shixun_homework",data);
@@ -149,6 +151,12 @@ class Coursesleftnav extends Component{
editshixunchild=(e, data)=>{
this.Navmodalnames(e,4,"editSecondname",data.id,data.name);
}
+ addcommon_homeworks=(e, data)=>{
+ this.Navmodalnames(e,1,"common_homework",data);
+ }
+ editcommon_homeworks=(e, data)=>{
+ this.Navmodalnames(e,4,"editSecondname",data.id,data.name);
+ }
editshixunmainname=(e, data)=>{
this.Navmodalnames(e,3,"editname",data.id,data.name);
}
@@ -196,7 +204,8 @@ class Coursesleftnav extends Component{
on('editshixunmainname',this.editshixunmainname);
on('videoAdd',this.addVideo);
on('editVideo',this.editVideo)
-
+ on('addcommon_homeworks',this.addcommon_homeworks)
+ on('editcommon_homeworks',this.editcommon_homeworks)
let courstype=this.props.match.url;
@@ -537,7 +546,7 @@ class Coursesleftnav extends Component{
}
saveNavmodapost=(url,value,positiontype,coursesId,type)=>{
-
+ console.log(positiontype)
axios.post(url,
{name:value}).then((result)=>{
if(result!=undefined){
@@ -548,6 +557,23 @@ class Coursesleftnav extends Component{
description:result.data.message
});
+ if(positiontype==="common_homeworks"||positiontype==="common_homework"||positiontype==="group_homeworks"||positiontype==="group_homework"){
+ if(type===true){
+ this.updasaveNavmoda()
+ trigger('updateNavSuccess')
+ }else{
+ this.updasaveNavmoda()
+ if(positiontype==="common_homeworks"){
+ this.props.history.push(`/classrooms/${coursesId}/common_homework/${result.data.category_id}`);
+ }
+ if(positiontype==="group_homeworks"){
+ this.props.history.push(`/classrooms/${coursesId}/group_homework/${result.data.category_id}`);
+ }
+
+ }
+ return
+ }
+
if(positiontype==="shixun_homeworks"||positiontype==="shixun_homework"){
if(type===true){
this.updasaveNavmoda()
@@ -557,6 +583,7 @@ class Coursesleftnav extends Component{
this.props.history.push(`/classrooms/${coursesId}/shixun_homework/${result.data.category_id}`);
}
+ return
}
if(positiontype==="files"||positiontype==="file"){
@@ -569,22 +596,25 @@ class Coursesleftnav extends Component{
this.updasaveNavmoda()
this.props.history.push(`/classrooms/${coursesId}/file/${result.data.category_id}`);
}
-
+ return
}
if(positiontype==="boards"){
this.updasaveNavmoda()
trigger('updateNavSuccess')
this.props.history.push(`/classrooms/${coursesId}/boards/${result.data.category_id}`);
+ return
}
if(positiontype!="course_groups"&&positiontype!="shixun_homeworks"&&positiontype!="shixun_homework"){
this.updasaveNavmoda()
+ return
}
if(positiontype==="course_groups"){
this.props.updataleftNavfun();
this.props.history.push(`/classrooms/${coursesId}/course_groups/${result.data.group_id}`);
+ return
}
}
@@ -864,6 +894,10 @@ class Coursesleftnav extends Component{
{/*公告栏*/}
{/*作业*/}
{item.type==="shixun_homework"?
this.Navmodalnames(e,1,"shixun_homework",item.id)}>新建目录
:""}
+ {/* 普通作业 */}
+ {item.type==="common_homework"?
this.Navmodalnames(e,1,"common_homeworks",item.id)}>新建目录
:""}
+ {/*/!* 分组作业 *!/*/}
+ {item.type==="group_homework"?
this.Navmodalnames(e,1,"group_homeworks",item.id)}>新建目录
:""}
{/*资源*/}
{item.type==="attachment"?
this.Navmodalnames(e,1,"attachment",item.id)}>新建目录
:""}
{/* 视频 */}
@@ -894,8 +928,8 @@ class Coursesleftnav extends Component{
let {twosandiantypes,twosandiantypenum}=this.state;
return (item.type==="graduation"?"":
{/*作业/资源*/}
- {item.type==="shixun_homework"||item.type==="attachment"||item.type==="graduation"?
this.Navmodalnames(e,4,"editSecondname",iem.category_id,iem.category_name)}>重命名
:""}
- {item.type==="shixun_homework"||item.type==="attachment"?
this.deleteSecondary(e,1,iem.category_id)}>删除
:""}
+ {item.type==="shixun_homework"||item.type==="attachment"||item.type==="graduation"||item.type==="common_homework"||item.type==="group_homework"?
this.Navmodalnames(e,4,"editSecondname",iem.category_id,iem.category_name)}>重命名
:""}
+ {item.type==="shixun_homework"||item.type==="attachment"||item.type==="common_homework"||item.type==="group_homework"?
this.deleteSecondary(e,1,iem.category_id)}>删除
:""}
{/*分班*/}
{item.type==="course_group"?
this.Navmodalnames(e,5,"editSecondname",iem.category_id,iem.category_name)}>重命名
:""}
{item.type==="course_group"?
this.deleteSecondary(e,2,iem.category_id)}>删除
:""}
diff --git a/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js b/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js
index 70994e42d..a8fcdeeae 100644
--- a/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js
+++ b/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js
@@ -110,7 +110,7 @@ class NewGtaskForms extends Component{
}
handleSubmit = () => {
-
+ console.log(this.props)
let {contentFileList,min_num,max_num,base_on_project}=this.state;
let {data}=this.props;
let task_type=data.task_type
From 65d8ccee54233e8cbe521864af2dc96740054768 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, 12 Mar 2020 13:25:59 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E7=9B=AE=E5=BD=95?=
=?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/busyWork/NewWork.js | 6 +-
.../src/modules/courses/busyWork/common.js | 8 +-
.../modules/courses/busyWork/commonWork.js | 147 +++++++++++++-----
3 files changed, 120 insertions(+), 41 deletions(-)
diff --git a/public/react/src/modules/courses/busyWork/NewWork.js b/public/react/src/modules/courses/busyWork/NewWork.js
index 1bd79d93e..4bee890d8 100644
--- a/public/react/src/modules/courses/busyWork/NewWork.js
+++ b/public/react/src/modules/courses/busyWork/NewWork.js
@@ -35,7 +35,7 @@ class NewWork extends Component{
}
fetchCourseData = (courseId) => {
let newcategory=undefined;
- if(this.props.match.path==="/classrooms/:coursesId/common_homework/:workId/:pageType"){
+ if(this.props.match.path==="/classrooms/:coursesId/common_homework/:workId/:pageType"||this.props.match.path==="/classrooms/:coursesId/group_homework/:workId/:pageType"){
newcategory=this.props.match.params.workId
}
const isGroup = this.props.isGroup()
@@ -64,7 +64,7 @@ class NewWork extends Component{
}
fetchWork = (workId) => {
let newcategory=undefined;
- if(this.props.match.path==="/classrooms/:coursesId/common_homework/:workId/:pageType"){
+ if(this.props.match.path==="/classrooms/:coursesId/common_homework/:workId/:pageType"||this.props.match.path==="/classrooms/:coursesId/group_homework/:workId/:pageType"){
newcategory=this.props.match.params.workId
}
let url=""
@@ -115,7 +115,7 @@ class NewWork extends Component{
doNew = (params) => {
const coursesId = this.props.match.params.coursesId
const newUrl = `/courses/${coursesId}/homework_commons.json`
- if(this.props.match.path==="/classrooms/:coursesId/common_homework/:workId/:pageType"){
+ if(this.props.match.path==="/classrooms/:coursesId/common_homework/:workId/:pageType"||this.props.match.path==="/classrooms/:coursesId/group_homework/:workId/:pageType"){
params.category=this.props.match.params.workId
}
diff --git a/public/react/src/modules/courses/busyWork/common.js b/public/react/src/modules/courses/busyWork/common.js
index b413f2c53..f738af2b4 100644
--- a/public/react/src/modules/courses/busyWork/common.js
+++ b/public/react/src/modules/courses/busyWork/common.js
@@ -31,7 +31,7 @@ export function RouteHOC(options = {}) {
// common_homework group_homework
// 是否是分组作业
isGroup = () => {
- return window.location.pathname.indexOf('group_homeworks') != -1
+ return window.location.pathname.indexOf('group_homeworks') != -1||window.location.pathname.indexOf('group_homework') != -1
}
getModuleName = (isChinese) => {
const isGroup = this.isGroup()
@@ -45,6 +45,12 @@ export function RouteHOC(options = {}) {
return secondName;
}
+
+ if(window.location.pathname.indexOf('group_homework') != -1){
+ const secondName ='group_homework';
+ return secondName;
+ }
+
if(window.location.pathname.indexOf('common_homeworks') != -1){
const secondName ='common_homeworks';
return secondName;
diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js
index d4b097cec..6a7e3c878 100644
--- a/public/react/src/modules/courses/busyWork/commonWork.js
+++ b/public/react/src/modules/courses/busyWork/commonWork.js
@@ -35,7 +35,8 @@ class commonWork extends Component{
checkAll:false,
checkBoxValues:[],
isSpin:false,
- category_id:undefined
+ category_id:undefined,
+ course_module:[]
}
}
//输入搜索条件
@@ -70,42 +71,34 @@ class commonWork extends Component{
}
componentDidUpdate(prevProps, prevState) {
- console.log(this.props)
- if (prevProps.coursesidtype != this.props.coursesidtype) {
- if (this.props.match.path === "/classrooms/:coursesId/common_homeworks/:category_id" || this.props.match.path === "/classrooms/:coursesId/common_homework/:category_id") {
- if (this.props.coursesidtype === "node" && this.props.match.path === "/classrooms/:coursesId/common_homeworks/:category_id") {
+ if (prevProps.coursesidtype != this.props.coursesidtype||prevProps.match.params.category_id!=this.props.match.params.category_id) {
+ if (this.props.match.path === "/classrooms/:coursesId/common_homeworks/:category_id" || this.props.match.path === "/classrooms/:coursesId/common_homework/:category_id"||
+ this.props.match.path === "/classrooms/:coursesId/group_homeworks/:category_id" || this.props.match.path === "/classrooms/:coursesId/group_homework/:category_id"
+ ) {
+
+ if (this.props.coursesidtype === "node" && this.props.match.path === "/classrooms/:coursesId/common_homeworks/:category_id"||
+ this.props.coursesidtype === "node" && this.props.match.path === "/classrooms/:coursesId/group_homeworks/:category_id"
+ ) {
+
this.clearSelection()
this.setState({selectedKeys: 'all', order: ''}, () => {
this._getList()
})
}
- if (this.props.coursesidtype === "child" && this.props.match.path === "/classrooms/:coursesId/common_homework/:category_id") {
+
+ if (this.props.coursesidtype === "child" && this.props.match.path === "/classrooms/:coursesId/common_homework/:category_id"||
+ this.props.coursesidtype === "child" && this.props.match.path === "/classrooms/:coursesId/group_homework/:category_id"
+ ) {
+
this.clearSelection()
this.setState({selectedKeys: 'all', order: ''}, () => {
this._getList(this.props.match.params.category_id)
})
}
}
+
}
- //
- // if(this.props.match.path==="/classrooms/:coursesId/common_homeworks/:category_id"||this.props.match.path==="/classrooms/:coursesId/common_homework/:category_id"){
- //
- //
- // if(this.props.coursesidtype==="node"&&this.props.match.path==="/classrooms/:coursesId/common_homeworks/:category_id"){
- // this.clearSelection()
- // this.setState({ selectedKeys: 'all', order: '' }, () => {
- // this._getList()
- // })
- // }
- // if(this.props.coursesidtype==="child"&&this.props.match.path==="/classrooms/:coursesId/common_homework/:category_id"){
- // this.clearSelection()
- // this.setState({ selectedKeys: 'all', order: '' }, () => {
- // this._getList(this.props.match.params.category_id)
- // })
- // }
- //
- // }
}
@@ -118,22 +111,24 @@ class commonWork extends Component{
this.getList(page,search,order,id);
}
componentDidMount(){
- if(this.props.coursesidtype==="node"){
+
+ if(this.props.match.path === "/classrooms/:coursesId/common_homeworks/:category_id"||this.props.match.path === "/classrooms/:coursesId/group_homeworks/:category_id"){
this._getList()
- }else{
+ }
+ if(this.props.match.path === "/classrooms/:coursesId/common_homework/:category_id"||this.props.match.path === "/classrooms/:coursesId/group_homework/:category_id") {
this._getList(this.props.match.params.category_id)
}
-
on('updateNavSuccess', this.updateNavSuccess)
}
componentWillUnmount() {
off('updateNavSuccess', this.updateNavSuccess)
}
updateNavSuccess = () => {
- if(this.props.coursesidtype==="node"){
+ if(this.props.match.path === "/classrooms/:coursesId/common_homeworks/:category_id"||this.props.match.path === "/classrooms/:coursesId/group_homeworks/:category_id"){
this._getList()
- }else{
+ }
+ if(this.props.match.path === "/classrooms/:coursesId/common_homework/:category_id"||this.props.match.path === "/classrooms/:coursesId/group_homework/:category_id") {
this._getList(this.props.match.params.category_id)
}
}
@@ -151,7 +146,6 @@ class commonWork extends Component{
}
getList=(page,search,order,category_id)=>{
- console.log(category_id)
this.setState({
isSpin:true
@@ -177,6 +171,32 @@ class commonWork extends Component{
page:page,
...result.data
})
+ this.getdatas(result.data.main_category_id)
+ }
+ }).catch((error)=>{
+ this.setState({
+ isSpin:false
+ })
+ })
+ }
+ getdatas=(main_category_id)=>{
+ let newcourse_module=[]
+
+ let urls=`/course_modules/${main_category_id}.json`
+ axios.get(encodeURI(urls)).then((result)=>{
+ if(result.status==200){
+
+ newcourse_module.push({name:result.data.course_module.module_name,id:result.data.course_module.id})
+ if(result.data.course_module.course_second_categories.length>0){
+
+ result.data.course_module.course_second_categories.map((item,key)=>{
+ newcourse_module.push(item)
+ })
+ }
+
+ this.setState({
+ course_module:newcourse_module
+ })
}
}).catch((error)=>{
this.setState({
@@ -279,7 +299,7 @@ class commonWork extends Component{
}
//
onSetPublic = () => {
- const { checkBoxValues } = this.state;
+ const { checkBoxValues,category_id } = this.state;
const len = checkBoxValues.length;
if (len == 0) {
this.props.showNotification('请先选择要公开的作业')
@@ -374,11 +394,41 @@ class commonWork extends Component{
if(!id){
trigger('addcommon_homeworks', parseInt(this.props.match.params.category_id))
}else{
- let data={id:parseInt(id),name:name}
+ let data={id:parseInt(id),name:this.state.category_name}
trigger('editcommon_homeworks', data)
}
}
+ moveTo = (item) => {
+ const len = this.state.checkBoxValues.length
+ if (len == 0) {
+ this.props.showNotification('请先在列表中选择要移动的作业')
+ return;
+ }
+ const checkBoxValues = this.state.checkBoxValues;
+ const coursesId= this.props.match.params.coursesId;
+ const category_id=this.state.category_id;
+ const url = `/courses/${coursesId}/homework_commons/move_to_category.json`
+ axios.post(url, {
+ homework_ids: checkBoxValues,
+ new_category_id: item.id,
+ category_id:!category_id?undefined:category_id
+ })
+ .then((response) => {
+ if (response.data.status == 0) {
+ console.log('--- 成功')
+ this.props.showNotification('作业移动成功')
+ this.props.updataleftNavfun()
+ this.setState({
+ checkBoxValues:[]
+ })
+ this.updateNavSuccess()
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
render(){
let {
@@ -391,7 +441,7 @@ class commonWork extends Component{
totalCount,
checkAll,
checkBoxValues,
-
+ course_module,
task_count,
published_count,
unpublished_count,
@@ -409,9 +459,8 @@ class commonWork extends Component{
const isGroup = this.props.isGroup()
const isAdmin = this.props.isAdmin()
+ const bid = this.props.match.params.category_id
- //
- //
return(
@@ -458,7 +507,7 @@ class commonWork extends Component{
{ isAdmin &&
}
- { isAdmin &&
+ { isAdmin &&
this.addDir(category_id)}>{!category_id?"新建目录":"目录重命名"}
}
@@ -512,9 +561,33 @@ class commonWork extends Component{
{ !!course_public &&
设为公开}
- {this.props.user&&this.props.user.main_site===true?
加入题库:""}
+
+ 移动到...
+
+ { course_module && course_module.length > 10 &&
+ {this.setState({dirSearchValue: e.target.value})}}/>
+
}
+ {
+ course_module && course_module.filter((item)=> {
+ return item.id != bid && (!this.state.dirSearchValue || item.name.indexOf(this.state.dirSearchValue) != -1)
+ }).map( (item, index) => {
+ return - this.moveTo(item)} title={item.name}>{item.name}
+ })
+ }
+ { isAdmin &&
+
+ this.addDir(category_id)}
+ >新建目录...
+
+ }
+ {/* 添加分班...
*/}
+
+
{/* 设为公开 */}
Date: Thu, 12 Mar 2020 16:14:43 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/common/components/comment/util.js | 6 +-
.../CompetitionContentsMd.js | 2 +-
.../courses/busyWork/PublishRightnow.js | 12 ++--
.../src/modules/courses/busyWork/UseBank.js | 2 +-
.../CompetitionContentsMd.js | 2 +-
.../courses/gradinforms/Bullsubdirectory.js | 2 +-
.../EditableCourseSupportSetting.js | 58 +++++++++----------
.../subroute/ecStudentList/EcStudentList.js | 8 +--
public/react/src/modules/forums/MemoDetail.js | 2 +-
public/react/src/modules/login/LoginDialog.js | 2 +-
public/react/src/modules/modals/SendTopics.js | 4 +-
.../PackageIndexNEIBanner.js | 2 +-
.../question/component/Newknledpots.js | 2 +-
.../comthetestpaper/Comthetestpaperst.js | 2 +-
.../component/Paperlibraryseeid_item.js | 2 +-
.../modules/tpm/Audit_situationComponent.js | 2 +-
.../src/modules/tpm/newshixuns/Newshixuns.js | 2 +-
.../src/modules/user/FindPasswordComponent.js | 2 +-
.../modules/user/LoginRegisterComponent.js | 2 +-
19 files changed, 58 insertions(+), 58 deletions(-)
diff --git a/public/react/src/common/components/comment/util.js b/public/react/src/common/components/comment/util.js
index 2b4f36a85..8694161a3 100644
--- a/public/react/src/common/components/comment/util.js
+++ b/public/react/src/common/components/comment/util.js
@@ -1,7 +1,7 @@
/*
* @Description: quill delta -> html
* @Author: tangjiang
- * @Github:
+ * @Github:
* @Date: 2019-12-24 08:51:25
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 09:30:11
@@ -55,7 +55,7 @@ export const formatDelta = (deltas) => {
*/
export const operate = (text, key, value) => {
let operatedText = null;
- debugger;
+
switch (key) {
case 'bold':
operatedText = `${text}`;
@@ -72,7 +72,7 @@ export const operate = (text, key, value) => {
case 'link':
operatedText = `${text}`;
break;
- default:
+ default:
operatedText = text;
}
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js
index 9ea972177..0cae1e2a6 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js
@@ -34,7 +34,7 @@ class CompetitionContentsMd extends Component{
}else{
chart_rules.rule_contents.map((items,keys)=>{
- debugger
+
if(parseInt(this.props.tabkey)===items.competition_stage_id){
console.log(items)
this.contentMdRef.current.setValue(items.content);
diff --git a/public/react/src/modules/courses/busyWork/PublishRightnow.js b/public/react/src/modules/courses/busyWork/PublishRightnow.js
index 1b9c8b0f1..9863a95d6 100644
--- a/public/react/src/modules/courses/busyWork/PublishRightnow.js
+++ b/public/react/src/modules/courses/busyWork/PublishRightnow.js
@@ -41,10 +41,10 @@ class PublishRightnow extends Component{
this.props.showNotification(`请先选择要立即${showdatatypes? "发布" : "截止"}的作业`)
return;
}
-
+
this.fetchCourseGroups();
-
-
+
+
}
showDialog = (course_groups) => {
const isPublish = this.props.isPublish;
@@ -96,7 +96,7 @@ class PublishRightnow extends Component{
}
homeworkstartend=(arg_group_ids,endtime)=>{
- debugger
+
if (this.usingCheckBeforePost && this.props.checkBeforePost) {
const goOn = this.props.checkBeforePost();
if (!goOn) {
@@ -104,7 +104,7 @@ class PublishRightnow extends Component{
return;
}
}
- debugger
+
const isPublish = this.props.isPublish;
let group_ids = arg_group_ids
if (this.usingCheckBeforePost) {
@@ -112,7 +112,7 @@ class PublishRightnow extends Component{
return item.id
})
}
- debugger
+
if(this.state.course_groups.length>0){
if (this.state.course_groups.length && (!group_ids || group_ids&&group_ids.length == 0)) {
this.props.showNotification('请至少选择一个分班');
diff --git a/public/react/src/modules/courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js
index b31412470..bfa9b3520 100644
--- a/public/react/src/modules/courses/busyWork/UseBank.js
+++ b/public/react/src/modules/courses/busyWork/UseBank.js
@@ -130,7 +130,7 @@ class UseBank extends Component{
})
}
onSave = () => {
- debugger
+
const { checkBoxValues } = this.state;
const { object_type,category_id } = this.props
if(checkBoxValues.length==0){
diff --git a/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js b/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js
index 9ea972177..0cae1e2a6 100644
--- a/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js
+++ b/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js
@@ -34,7 +34,7 @@ class CompetitionContentsMd extends Component{
}else{
chart_rules.rule_contents.map((items,keys)=>{
- debugger
+
if(parseInt(this.props.tabkey)===items.competition_stage_id){
console.log(items)
this.contentMdRef.current.setValue(items.content);
diff --git a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js
index 78f56a0f7..f166f3aaa 100644
--- a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js
+++ b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js
@@ -156,7 +156,7 @@ class Bullsubdirectory extends Component{
handleSubmit=(e) => {
e.preventDefault();
this.props.form.validateFields((err, values) => {
- debugger
+
if (!err) {
console.log(values.description);
if(values.eduintits === undefined|| values.eduintits === "" || values.eduintits ===null){
diff --git a/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/EditableCourseSupportSetting.js b/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/EditableCourseSupportSetting.js
index 70b39241c..3b5d88a3d 100644
--- a/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/EditableCourseSupportSetting.js
+++ b/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/EditableCourseSupportSetting.js
@@ -20,7 +20,7 @@ let id = 0;
/**
target_id
- position
+ position
target_weight
target_contents
@@ -29,7 +29,7 @@ let id = 0;
subitem_contents
*/
-const data =
+const data =
[{"position":0,"target_weight":0.02,"target_contents":"12","standard_grade":2,"subitem_id":"65"},{"position":3,"target_id":"0","target_weight":0.1,"target_contents":"理解数据管理技术和数据库技术的发展,区分不同数据模型的作用和特点,描述数据库系统的类型、结构、数据独立性。","standard_grade":60,"subitem_id":"66"},{"position":4,"target_weight":1,"target_contents":"22","standard_grade":33,"subitem_id":"66"},{"position":11,"target_id":"1","target_weight":0.1,"target_contents":"理解数据管理技术和数据库技术的发展,区分不同数据模型的作用和特点,描述数据库系统的类型、结构、数据独立性。","standard_grade":61,"subitem_id":"65"}]
;
let _data = [
@@ -70,10 +70,10 @@ class EditableCourseSupportSetting extends Component {
let fValues = this.props.form.getFieldsValue();
if (
// fValues.standard_grade[k] && fValues.standard_grade[k] != 75
- // || fValues.subitem_id[k]
- // ||
- fValues.target_contents[k]
- // || fValues.target_weight[k]
+ // || fValues.subitem_id[k]
+ // ||
+ fValues.target_contents[k]
+ // || fValues.target_weight[k]
) {
this.props.showModal('提示', '确定要删除吗?', () => {
this.remove(k)
@@ -129,7 +129,7 @@ class EditableCourseSupportSetting extends Component {
const subitem_id = form.getFieldValue('subitem_id');
keys.splice(index_arg, 0, newKey);
- // position2Target_idMap
+ // position2Target_idMap
// {1:2, 2:3, 3:4, 4:6 } --> {1:2, 2:3, 3:7, 4:4, 5:6 }
// 更新key/position 映射到target_id的map
// 两次revers,用这个结构,达到给position加1的效果
@@ -142,13 +142,13 @@ class EditableCourseSupportSetting extends Component {
reverseMap[target_id] = parseInt(reverseMap[target_id]) + 1;
keys[i] = keys[i] + 1;
}
- for (let i = 0 ; i < keys.length - 1; i++) {
+ for (let i = 0 ; i < keys.length - 1; i++) {
if (keys[i] == keys[i + 1]) {
- debugger;
+
}
}
this.position2Target_idMap = this._reverseMap(reverseMap);
-
+
target_weight.splice(newKey, 0, undefined);
target_contents.splice(newKey, 0, undefined);
@@ -179,7 +179,7 @@ class EditableCourseSupportSetting extends Component {
const keys = form.getFieldValue('keys');
let nextKeys ;
let newKey = k + 1;
-
+
const newKeyIndex = keys.indexOf(newKey)
if (newKeyIndex != -1) {
// 新key存在,将新key位置及以后的row后移,直到找到一个之后的空位置
@@ -213,7 +213,7 @@ class EditableCourseSupportSetting extends Component {
data.push({})
}
for (var valKey in values) {
-
+
let dataIndex = 0
values[valKey].forEach( (item,index) => {
let _val = values[valKey][index];
@@ -228,7 +228,7 @@ class EditableCourseSupportSetting extends Component {
}
console.log('Received values of form: ', values, data);
-
+
let totalWeight = 0;
values.target_weight.forEach(item => {
if (item) {
@@ -264,8 +264,8 @@ class EditableCourseSupportSetting extends Component {
}
}
}
-
-
+
+
});
}
@@ -292,7 +292,7 @@ class EditableCourseSupportSetting extends Component {
subitem_id[item.position] = item.subitem_id ? (item.subitem_id).toString() : item.subitem_id;
this.position2Target_idMap[item.position] = item.target_id
- })
+ })
form.setFieldsValue({
keys
});
@@ -308,9 +308,9 @@ class EditableCourseSupportSetting extends Component {
// this.forceUpdate()
}, 3000)
-
+
}
-
+
render() {
const { getFieldDecorator, getFieldValue } = this.props.form;
@@ -397,7 +397,7 @@ class EditableCourseSupportSetting extends Component {
message: "请先选择毕业要求指标点",
}],
})(
-
)}
- { !addOrDeleting && { this.onRemove(k) }}
className="color-grey-c mr15" data-tip-down="删除">
}
- { !addOrDeleting && { this.add(k, index + 1) }}
- className="color-green show-FillTable"
+ className="color-green show-FillTable"
data-tip-down="添加">
}
-
-
+
+
));
return (
-
+
-