diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js
index 942c06800..9a9f9bd29 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js
@@ -333,7 +333,7 @@ class ShixunhomeWorkItem extends Component{
{/* {discussMessage.author.name} */}
-
+ { discussMessage.author && {discussMessage.author} }
{discussMessage.commit_count===undefined?"":{discussMessage.commit_count} 已交}
{discussMessage.uncommit_count===undefined?"":{discussMessage.uncommit_count} 未交}
{/*{discussMessage.replies_count} 3 未评*/}
From 17e1f44146ce7521f467d7eecba35cb435f34aa8 Mon Sep 17 00:00:00 2001
From: caicai8 <1149225589@qq.com>
Date: Tue, 27 Aug 2019 14:13:30 +0800
Subject: [PATCH 4/9] =?UTF-8?q?=E9=97=AE=E5=8D=B7-=E9=A2=98=E5=BA=93?=
=?UTF-8?q?=E9=80=89=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/courses/poll/Poll.js | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/public/react/src/modules/courses/poll/Poll.js b/public/react/src/modules/courses/poll/Poll.js
index 16a488fce..aae09b41c 100644
--- a/public/react/src/modules/courses/poll/Poll.js
+++ b/public/react/src/modules/courses/poll/Poll.js
@@ -103,11 +103,11 @@ class Poll extends Component{
this.InitList(e.key,StudentList_value,page);
}
// 获取列表数据
- InitList=(type,search,page)=>{
+ InitList=(type,search,page,bank_checkValue)=>{
this.setState({
isSpin:true
})
- let {pageSize}=this.state
+ let { pageSize,checkBoxValues }=this.state
let coursesId=this.props.match.params.coursesId;
let url='/courses/'+coursesId+'/polls.json?limit='+pageSize+'&page='+page
if(type!="0"){
@@ -123,7 +123,7 @@ class Poll extends Component{
course_types:result.data.course_types,
polls_counts:result.data.polls_counts,
isSpin:false,
- checkBoxValues:[]
+ checkBoxValues: bank_checkValue ? bank_checkValue : []
})
}
}).catch((error)=>{
@@ -209,12 +209,6 @@ class Poll extends Component{
//判断是否有选中数据
if(this.state.checkBoxValues.length==0){
this.props.showNotification("请先在列表中选择数据");
- // this.setState({
- // modalsType:true,
- // modalsTopval:"请先在列表中选择数据",
- // modalsBottomval:'',
- // loadtype:true
- // })
}else{
if(value != "bank"){
this.setState({
@@ -325,13 +319,13 @@ class Poll extends Component{
}
// 题库选用成功后,立即发布,刷新页面
useBankSuccess=(checkValue,value)=>{
+ debugger;
this.setState({
isSpin:true
})
let{type,StudentList_value,page}=this.state
- this.InitList(type,StudentList_value,page);
- console.log(checkValue);
- console.log(value);
+ this.InitList(type,StudentList_value,page,value);
+
let coursesId=this.props.match.params.coursesId;
let url=`/courses/${coursesId}/polls/publish_modal.json`;
axios.get(url,{
From 447ee0b8dc91f04b10e4fc4019dae447c26ad465 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Tue, 27 Aug 2019 14:27:25 +0800
Subject: [PATCH 5/9] b
---
public/react/src/modules/courses/new/Goldsubject.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js
index 5149d3e5a..c9b8b324b 100644
--- a/public/react/src/modules/courses/new/Goldsubject.js
+++ b/public/react/src/modules/courses/new/Goldsubject.js
@@ -626,6 +626,7 @@ class Goldsubject extends Component {
}
console.log(addonAfteronelenone);
console.log(addonAfteronelentwo);
+ console.log(options);
return (
@@ -764,8 +765,8 @@ class Goldsubject extends Component {
onChange={this.handleChange}
className={"fl construction "}
placeholder="例如:数据结构"
+ dataSource={options}
>
- {options}
)}
{/**/}
From 16307a59382ac1e1a1ed5b7ca5a45acf38a824b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Tue, 27 Aug 2019 16:41:44 +0800
Subject: [PATCH 6/9] Merge branch 'dev_aliyun' of
https://bdgit.educoder.net/Hjqreturn/educoder into dev_Ysl
# Conflicts:
# public/react/src/modules/courses/new/CoursesNew.js
# public/react/src/modules/courses/new/Goldsubject.js
---
.../react/src/modules/courses/css/Courses.css | 2 +-
.../src/modules/courses/new/CoursesNew.js | 121 +++++++++++---
.../src/modules/courses/new/Goldsubject.js | 153 ++++++++++--------
3 files changed, 187 insertions(+), 89 deletions(-)
diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css
index dbdd42398..78b6783a0 100644
--- a/public/react/src/modules/courses/css/Courses.css
+++ b/public/react/src/modules/courses/css/Courses.css
@@ -1061,7 +1061,7 @@ samp {
.newcoursestitle{
font-size: 12px;
color: #989898;
- margin-left: 10px;
+ margin-left: 40px;
}
.coursenavbox .ant-form-item-label{
diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js
index cbcb33fc2..71092ebdb 100644
--- a/public/react/src/modules/courses/new/CoursesNew.js
+++ b/public/react/src/modules/courses/new/CoursesNew.js
@@ -47,6 +47,7 @@ class CoursesNew extends Component {
checkboxgroup:undefined,
addonAfteronelenone:0,
addonAfteronelentwo:0,
+ classroomyslstiring:"",
checkbofrup:[{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"},{module_type:"group_homework",module_name:"分组作业"}
,{module_type:"exercise",module_name:"试卷"},{module_type:"poll",module_name:"问卷"},{module_type:"graduation",module_name:"毕业设计"}
,{module_type:"board",module_name:"讨论"},{module_type:"attachment",module_name:"资源"},{module_type:"course_group",module_name:"分班"}],
@@ -364,14 +365,16 @@ class CoursesNew extends Component {
search:value
}).then((result)=>{
// console.log(result.data)
- if (result.data.message===undefined) {
+ if(result){
+ if (result.data.message===undefined) {
- this.setState({
- searchlist: result.data.course_lists,
- // course:value,
+ this.setState({
+ searchlist: result.data.course_lists,
+ // course:value,
- })
- }
+ })
+ }
+ }
// this.props.form.setFieldsValue({
// course:value
// })
@@ -393,11 +396,16 @@ class CoursesNew extends Component {
};
handleChange=(value)=>{
+ if(value){
+ this.props.form.setFieldsValue({
+ course:value+"",
+ classroom:value+"",
+ });
+ this.setState({
+ classroomyslstiring:value
+ })
+ }
- this.props.form.setFieldsValue({
- // course:value,
- classroom:value
- })
};
handleSearchschool=(value)=>{
@@ -489,6 +497,16 @@ class CoursesNew extends Component {
if(addonAftertwo){
addonAfteronelens=String(addonAftertwo).length;
}
+ var addonAfterthree=this.props.form&&this.props.form.getFieldValue('course');
+ var addonAfteronelens3=0;
+ if(addonAfterthree){
+ addonAfteronelens3=String(addonAfterthree).length;
+ }
+ var addonAfterfour=this.props.form&&this.props.form.getFieldValue('classroom');
+ var addonAfteronelens4=0;
+ if(addonAfterfour){
+ addonAfteronelens4=String(addonAfterfour).length;
+ }
return (
@@ -550,20 +568,16 @@ class CoursesNew extends Component {
.ant-select-dropdown{
// top: 221px !important;
// left: 115px !important;
- width: 280px !important;
height: 160px;
}
.ant-select-dropdown-menu{
- width: 280px !important;
height: 160px;
}
.construction .ant-input{
- width: 280px !important;
margin-left: 0px !important;
}
.construction {
- width: 280px;
- margin-left: 10px;
+ margin-left: 11px;
}
.construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder {
@@ -575,21 +589,51 @@ class CoursesNew extends Component {
+
{getFieldDecorator('course', {
- rules: [{required: true, message: "不能为空"}],
+ rules: [{required: true, message: "不能为空"},
+ {
+ max:60,
+ message: '不能超过60个字符',
+ }],
})(
-
- {options}
-
+
+
+
)}
-
+
{/*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*/}
@@ -616,11 +660,38 @@ class CoursesNew extends Component {
}
+
+
{getFieldDecorator('classroom', {
- rules: [{required: true, message: "不能为空"}],
- })()}
+ rules: [{required: true, message: "不能为空"},
+ {
+ max:60,
+ message: '不能超过60个字符',
+ }],
+ })()}
{/*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*/}
@@ -698,7 +769,7 @@ class CoursesNew extends Component {
}
]}
)(
-
+
)}
{
- this.props.form.setFieldsValue({
- // course:value,
- classroom:value
- })
+ if(value){
+ setTimeout(()=>{
+ this.props.form.setFieldsValue({
+ course:value+"",
+ classroom:value+"",
+ });
+ },100)
+
+ }
};
handleSearchschool=(value)=>{
@@ -624,6 +629,12 @@ class Goldsubject extends Component {
if(addonAftertwo){
addonAfteronelens=String(addonAftertwo).length;
}
+
+ var addonAfterfour=this.props.form&&this.props.form.getFieldValue('classroom');
+ var addonAfteronelens4=0;
+ if(addonAfterfour){
+ addonAfteronelens4=String(addonAfterfour).length;
+ }
console.log(addonAfteronelenone);
console.log(addonAfteronelentwo);
console.log(options);
@@ -688,20 +699,16 @@ class Goldsubject extends Component {
.ant-select-dropdown{
// top: 221px !important;
// left: 115px !important;
- width: 280px !important;
height: 160px;
}
.ant-select-dropdown-menu{
- width: 280px !important;
height: 160px;
}
.construction .ant-input{
- width: 280px !important;
margin-left: 0px !important;
}
.construction {
- width: 280px;
- margin-left: 10px;
+ margin-left: 11px;
}
.construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder {
@@ -711,38 +718,7 @@ class Goldsubject extends Component {
`}
- {/**/}
- {/*
*/}
- {/*
*/}
- {/* {getFieldDecorator('course', {*/}
- {/* rules: [{required: true, message: "不能为空"}],*/}
- {/* })(*/}
-
- {/* */}
- {/* {options}*/}
- {/* */}
- {/* )}*/}
- {/* */}
- {/* /!*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*!/*/}
- {/* */}
- {/* */}
- {/* 正确示例:数据结构*/}
- {/*
*/}
- {/* */}
- {/* */}
- {/* 错误示例:数据结构2019春*/}
- {/*
*/}
- {/* */}
- {/* */}
- {/* */}
- {/*
*/}
- {/*
*/}
+
-
- {getFieldDecorator('classroom', {
- rules: [{required: true, message: "不能为空"}],
- })(
-
-
-
- )}
- {/**/}
- {/* /!*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*!/*/}
+ {/* */}
+
+ {/* {getFieldDecorator('classroom', {*/}
+ {/* rules: [{required: true, message: "不能为空"},*/}
+ {/* {*/}
+ {/* max:60,*/}
+ {/* message: '不能超过60个字符',*/}
+ {/* }],*/}
+ {/* })(*/}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* )}*/}
+
+ {/**/}
+
+
+ {getFieldDecorator('classroom', {
+ rules: [{required: true, message: "不能为空"},
+ {
+ max:60,
+ message: '不能超过60个字符',
+ }],
+ })(
+
+
+
+
+
+ )}
+ {/**/}
+ {/* /!*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*!/*/}
{/* */}
- {/* */}
- {/* 正确示例:数据结构2019春季班级*/}
+ {/* */}
+ {/* 正确示例:数据结构*/}
{/*
*/}
{/* */}
- {/* */}
- {/* 错误示例:2019春季班级数据结构*/}
+ {/* */}
+ {/* 错误示例:数据结构2019春*/}
{/*
*/}
{/* */}
-
+
-
-
From 72e0b60796b2cf4c1cf7a687b270a0b2f063a98d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Tue, 27 Aug 2019 22:20:16 +0800
Subject: [PATCH 7/9] Merge branch 'dev_aliyun' of
https://bdgit.educoder.net/Hjqreturn/educoder into dev_Ysl
# Conflicts:
# public/react/src/modules/courses/new/CoursesNew.js
# public/react/src/modules/courses/new/Goldsubject.js
---
public/react/src/modules/courses/Index.js | 14 +-
.../src/modules/courses/new/Goldsubject.js | 91 +++--------
.../questionbank/Generaljobbankdetails.js | 143 ++++++++++++++++++
3 files changed, 176 insertions(+), 72 deletions(-)
create mode 100644 public/react/src/modules/courses/questionbank/Generaljobbankdetails.js
diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js
index 01117b4f8..3c6c0b717 100644
--- a/public/react/src/modules/courses/Index.js
+++ b/public/react/src/modules/courses/Index.js
@@ -7,7 +7,6 @@ import axios from 'axios';
import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
import { CNotificationHOC } from './common/CNotificationHOC'
import {ImageLayerOfCommentHOC} from '../page/layers/ImageLayerOfCommentHOC'
-
import "./css/Courses.css"
//引入对应跳转的组件
@@ -265,7 +264,10 @@ const GraduationTasksSubmiteditApp=Loadable({
loading: Loading,
})
-
+const Generaljobbankdetails =Loadable({
+ loader: () => import('../../modules/courses/questionbank/Generaljobbankdetails'),
+ loading: Loading,
+})
class CoursesIndex extends Component{
constructor(props) {
@@ -445,7 +447,13 @@ class CoursesIndex extends Component{
// console.log(commons)
return (
-
+ {/*Generaljobbankdetails*/}
+ {/* 普通作业题库详情*/}
+ ()
+ }
+ >
{/* 资源列表页 */}
@@ -729,88 +727,43 @@ class Goldsubject extends Component {
`
}
-
-
-
- {/*
*/}
-
- {/* {getFieldDecorator('classroom', {*/}
- {/* rules: [{required: true, message: "不能为空"},*/}
- {/* {*/}
- {/* max:60,*/}
- {/* message: '不能超过60个字符',*/}
- {/* }],*/}
- {/* })(*/}
- {/* */}
- {/* */}
- {/* */}
- {/* )}*/}
-
- {/**/}
-
-
+ }
+
{getFieldDecorator('classroom', {
rules: [{required: true, message: "不能为空"},
{
max:60,
message: '不能超过60个字符',
}],
- })(
-
-
-
-
-
- )}
- {/**/}
- {/* /!*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*!/*/}
- {/* */}
- {/* */}
- {/* 正确示例:数据结构*/}
- {/*
*/}
- {/* */}
- {/* */}
- {/* 错误示例:数据结构2019春*/}
- {/*
*/}
- {/* */}
-
+ })()}
+
+
diff --git a/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js
new file mode 100644
index 000000000..9eda477f8
--- /dev/null
+++ b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js
@@ -0,0 +1,143 @@
+import React, {Component} from "react";
+import {Link, NavLink} from 'react-router-dom';
+import {WordsBtn, ActionBtn} from 'educoder';
+import axios from 'axios';
+import {
+ notification
+} from "antd";
+import CoursesListType from '../coursesPublic/CoursesListType';
+
+import '../css/members.css';
+import "../common/formCommon.css";
+import '../css/Courses.css';
+import '../css/busyWork.css';
+import '../poll/pollStyle.css';
+
+class Generaljobbankdetails extends Component {
+ constructor(props) {
+ super(props);
+ // this.answerMdRef = React.createRef();
+ this.state = {
+ tab: ["0"],
+ }
+
+ }
+
+ //切换tab
+ ChangeTab = (e) => {
+ // console.log(e);
+ this.setState({
+ tab: e
+ })
+ try {
+ var currenturl = window.location.href;
+ var newUrl = (currenturl.split("?"))[0];
+ window.history.pushState('','',newUrl+'?tab='+e);
+ }catch (e) {
+ console.log(e);
+ console.log("44");
+ }
+
+ }
+
+
+ componentDidMount() {
+ // console.log("父组件加载框");
+ const query = this.props.location.search;
+ const type = query.split('?tab=');
+ // let sum = []
+ // sum.push(type[1])
+ // console.log("componentDidMountcomponentDidMount");
+ // console.log(type);
+ this.setState({
+ tab: type[1],
+ })
+ let querys = this.props.location.pathname;
+ const types = querys.split('/');
+ // console.log(types);
+ this.setState({
+ shixuntypes: types[3]
+ })
+ }
+
+
+ confirmysl(child,i) {
+ if(i===1){
+ child.daochushixunbaogao();
+ }
+ if(i===2){
+ child.daochuzuoye();
+ }
+ }
+
+ homeworkendss(child){
+ // child.homeworkends();
+ }
+
+ homeworkstarts(child){
+ // child.homeworkstart();
+
+ }
+ workshowmodels(child){
+ // child.workshowmodel();
+ }
+ /// 确认是否下载
+
+
+ bindRef = ref => { this.child = ref }
+///////////////教师截止
+
+ render() {
+ let {tab, teacherdatapage, jobsettingsdatapage} = this.state;
+
+ const isAdmin = this.props.isAdmin();
+ // console.log(119)
+ console.log(jobsettingsdatapage);
+
+
+ return (
+
+
+
+
+
+
+
+ 题库
+ >
+ 详情
+ >
+ 作业详情
+
+
+
+
+ MySQL数据库编程开发实训(基础篇)
+
+
+
+
+
+
+
+
+ )
+ }
+}
+
+export default Generaljobbankdetails;
+
From 7d615a20b3da1f299037775825696a8f7c1e8fa7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Tue, 27 Aug 2019 22:57:55 +0800
Subject: [PATCH 8/9] =?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/new/Goldsubject.js | 46 ++++++++++++++-----
1 file changed, 35 insertions(+), 11 deletions(-)
diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js
index 998050409..9695f60ff 100644
--- a/public/react/src/modules/courses/new/Goldsubject.js
+++ b/public/react/src/modules/courses/new/Goldsubject.js
@@ -54,6 +54,7 @@ class Goldsubject extends Component {
addonAfteronelenone:"",
addonAfteronelentwo:"",
Whethertocreateanewclassroom:true,
+ bordebool:false,
checkbofrup:[
{module_type:"announcement",module_name:"公告栏"},{module_type:"online_learning",module_name:"在线学习"}
,{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"}
@@ -528,17 +529,26 @@ class Goldsubject extends Component {
};
handleChange=(value)=>{
-
if(value){
- setTimeout(()=>{
- this.props.form.setFieldsValue({
- course:value+"",
- classroom:value+"",
- });
- },100)
+ if(value.length>60){
+ this.setState({
+ bordebool:true,
+ })
+ }else if(value.length===0){
+ this.setState({
+ bordebool:true,
+ })
+ }else{
+ this.setState({
+ bordebool:false,
+ })
+ }
+ }else{
+ this.setState({
+ bordebool:true
+ })
- }
- };
+ } };
handleSearchschool=(value)=>{
@@ -607,7 +617,7 @@ class Goldsubject extends Component {
this.applyForAddOrgForm.setVisible(true)
}
render() {
- let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,addonAfteronelenone,addonAfteronelentwo} = this.state;
+ let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,bordebool,addonAfteronelenone,addonAfteronelentwo} = this.state;
const {getFieldDecorator} = this.props.form;
const propsWithoutForm = Object.assign({}, this.props)
delete propsWithoutForm.form
@@ -753,6 +763,20 @@ class Goldsubject extends Component {
}
`
}
+
{getFieldDecorator('classroom', {
rules: [{required: true, message: "不能为空"},
@@ -760,7 +784,7 @@ class Goldsubject extends Component {
max:60,
message: '不能超过60个字符',
}],
- })()}
+ })()}
From 5a0d629642257dfae25984677e276f94c4a8538a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Wed, 28 Aug 2019 09:54:19 +0800
Subject: [PATCH 9/9] =?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/new/CoursesNew.js | 107 +++----------
.../src/modules/courses/new/Goldsubject.js | 146 +++++++++---------
2 files changed, 91 insertions(+), 162 deletions(-)
diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js
index 71092ebdb..6073eee97 100644
--- a/public/react/src/modules/courses/new/CoursesNew.js
+++ b/public/react/src/modules/courses/new/CoursesNew.js
@@ -47,7 +47,6 @@ class CoursesNew extends Component {
checkboxgroup:undefined,
addonAfteronelenone:0,
addonAfteronelentwo:0,
- classroomyslstiring:"",
checkbofrup:[{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"},{module_type:"group_homework",module_name:"分组作业"}
,{module_type:"exercise",module_name:"试卷"},{module_type:"poll",module_name:"问卷"},{module_type:"graduation",module_name:"毕业设计"}
,{module_type:"board",module_name:"讨论"},{module_type:"attachment",module_name:"资源"},{module_type:"course_group",module_name:"分班"}],
@@ -396,16 +395,11 @@ class CoursesNew extends Component {
};
handleChange=(value)=>{
- if(value){
- this.props.form.setFieldsValue({
- course:value+"",
- classroom:value+"",
- });
- this.setState({
- classroomyslstiring:value
- })
- }
+ this.props.form.setFieldsValue({
+ // course:value,
+ classroom:value
+ })
};
handleSearchschool=(value)=>{
@@ -497,16 +491,7 @@ class CoursesNew extends Component {
if(addonAftertwo){
addonAfteronelens=String(addonAftertwo).length;
}
- var addonAfterthree=this.props.form&&this.props.form.getFieldValue('course');
- var addonAfteronelens3=0;
- if(addonAfterthree){
- addonAfteronelens3=String(addonAfterthree).length;
- }
- var addonAfterfour=this.props.form&&this.props.form.getFieldValue('classroom');
- var addonAfteronelens4=0;
- if(addonAfterfour){
- addonAfteronelens4=String(addonAfterfour).length;
- }
+ console.log(options);
return (
@@ -568,16 +553,20 @@ class CoursesNew extends Component {
.ant-select-dropdown{
// top: 221px !important;
// left: 115px !important;
+ width: 280px !important;
height: 160px;
}
.ant-select-dropdown-menu{
+ width: 280px !important;
height: 160px;
}
.construction .ant-input{
+ width: 280px !important;
margin-left: 0px !important;
}
.construction {
- margin-left: 11px;
+ width: 280px;
+ margin-left: 10px;
}
.construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder {
@@ -589,51 +578,22 @@ class CoursesNew extends Component {
-
{getFieldDecorator('course', {
- rules: [{required: true, message: "不能为空"},
- {
- max:60,
- message: '不能超过60个字符',
- }],
+ rules: [{required: true, message: "不能为空"}],
})(
-
-
-
-
+
+
)}
-
+
{/*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*/}
@@ -660,38 +620,11 @@ class CoursesNew extends Component {
}
-
-
+
{getFieldDecorator('classroom', {
- rules: [{required: true, message: "不能为空"},
- {
- max:60,
- message: '不能超过60个字符',
- }],
- })()}
+ rules: [{required: true, message: "不能为空"}],
+ })()}
{/*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*/}
diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js
index 9695f60ff..696a81969 100644
--- a/public/react/src/modules/courses/new/Goldsubject.js
+++ b/public/react/src/modules/courses/new/Goldsubject.js
@@ -54,7 +54,6 @@ class Goldsubject extends Component {
addonAfteronelenone:"",
addonAfteronelentwo:"",
Whethertocreateanewclassroom:true,
- bordebool:false,
checkbofrup:[
{module_type:"announcement",module_name:"公告栏"},{module_type:"online_learning",module_name:"在线学习"}
,{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"}
@@ -529,26 +528,12 @@ class Goldsubject extends Component {
};
handleChange=(value)=>{
- if(value){
- if(value.length>60){
- this.setState({
- bordebool:true,
- })
- }else if(value.length===0){
- this.setState({
- bordebool:true,
- })
- }else{
- this.setState({
- bordebool:false,
- })
- }
- }else{
- this.setState({
- bordebool:true
- })
- } };
+ this.props.form.setFieldsValue({
+ // course:value,
+ classroom:value
+ })
+ };
handleSearchschool=(value)=>{
@@ -617,7 +602,7 @@ class Goldsubject extends Component {
this.applyForAddOrgForm.setVisible(true)
}
render() {
- let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,bordebool,addonAfteronelenone,addonAfteronelentwo} = this.state;
+ let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,addonAfteronelenone,addonAfteronelentwo} = this.state;
const {getFieldDecorator} = this.props.form;
const propsWithoutForm = Object.assign({}, this.props)
delete propsWithoutForm.form
@@ -639,13 +624,9 @@ class Goldsubject extends Component {
if(addonAftertwo){
addonAfteronelens=String(addonAftertwo).length;
}
-
- var addonAfterfour=this.props.form&&this.props.form.getFieldValue('classroom');
- var addonAfteronelens4=0;
- if(addonAfterfour){
- addonAfteronelens4=String(addonAfterfour).length;
- }
-
+ console.log(addonAfteronelenone);
+ console.log(addonAfteronelentwo);
+ console.log(options);
return (
@@ -707,16 +688,20 @@ class Goldsubject extends Component {
.ant-select-dropdown{
// top: 221px !important;
// left: 115px !important;
+ width: 280px !important;
height: 160px;
}
.ant-select-dropdown-menu{
+ width: 280px !important;
height: 160px;
}
.construction .ant-input{
+ width: 280px !important;
margin-left: 0px !important;
}
.construction {
- margin-left: 11px;
+ width: 280px;
+ margin-left: 10px;
}
.construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder {
@@ -726,7 +711,38 @@ class Goldsubject extends Component {
`}
+ {/**/}
+ {/*
*/}
+ {/*
*/}
+ {/* {getFieldDecorator('course', {*/}
+ {/* rules: [{required: true, message: "不能为空"}],*/}
+ {/* })(*/}
+
+ {/* */}
+ {/* {options}*/}
+ {/* */}
+ {/* )}*/}
+ {/* */}
+ {/* /!*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*!/*/}
+ {/* */}
+ {/* */}
+ {/* 正确示例:数据结构*/}
+ {/*
*/}
+ {/* */}
+ {/* */}
+ {/* 错误示例:数据结构2019春*/}
+ {/*
*/}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/*
*/}
+ {/*
*/}
-
-
-
-
- {getFieldDecorator('classroom', {
- rules: [{required: true, message: "不能为空"},
- {
- max:60,
- message: '不能超过60个字符',
- }],
- })()}
+
+ {getFieldDecorator('classroom', {
+ rules: [{required: true, message: "不能为空"}],
+ })(
+
+
+ {options}
+
+ )}
+ {/**/}
+ {/* /!*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*!/*/}
+ {/* */}
+ {/* */}
+ {/* 正确示例:数据结构2019春季班级*/}
+ {/*
*/}
+ {/* */}
+ {/* */}
+ {/* 错误示例:2019春季班级数据结构*/}
+ {/*
*/}
+ {/* */}
+