dev_aliyun_beta
杨树林 6 years ago
parent c6627385da
commit 4691df45f8

@ -1063,6 +1063,12 @@ samp {
color: #989898;
margin-left: 40px;
}
.newcoursestitleysl{
font-size: 12px;
color: #989898;
margin-left: 51px;
}
.coursenavbox .ant-form-item-label{
margin-left:10px;

@ -59,7 +59,7 @@ class Bullsubdirectory extends Component{
}
};
changeTopicName = (e) => {
console.log("调用了changeTopicName");
// console.log("调用了changeTopicName");
let num = e.target.value.length;
if(num>60){

@ -107,7 +107,7 @@ class Eduinforms extends Component{
}
};
changeTopicName = (e) => {
console.log("调用了changeTopicName");
// console.log("调用了changeTopicName");
let num = e.target.value.length;
if(num>60){
return;

@ -47,9 +47,7 @@ class CoursesNew extends Component {
checkboxgroup:undefined,
addonAfteronelenone:0,
addonAfteronelentwo:0,
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:"分班"}],
bordebool:false,
}
}
componentDidMount() {
@ -382,8 +380,8 @@ class CoursesNew extends Component {
})
}
handleSearch=(value)=>{
console.log("handleSearchhandleSearch");
console.log(value);
if(value!=""){
this.props.form.setFieldsValue({
classroom:value,
@ -393,13 +391,40 @@ class CoursesNew extends Component {
}
};
handleSearchsysl=(value)=>{
if(value){
this.props.form.setFieldsValue({
classroom:value,
// course:value
});
}
}
handleChange=(value)=>{
handleChange=(e)=>{
this.props.form.setFieldsValue({
// course:value,
classroom:value
// course:value,
classroom:e.target.value,
})
if(e.target.value){
if(e.target.value.length>60){
this.setState({
bordebool:true,
})
}else if(e.target.value.length===0){
this.setState({
bordebool:true,
})
}else{
this.setState({
bordebool:false,
})
}
}else{
this.setState({
bordebool:true
})
}
};
handleSearchschool=(value)=>{
@ -469,7 +494,7 @@ class CoursesNew extends Component {
this.applyForAddOrgForm.setVisible(true)
}
render() {
let {datatime,school,searchlistscholl} = this.state;
let {datatime,school,searchlistscholl,bordebool} = this.state;
const {getFieldDecorator} = this.props.form;
const propsWithoutForm = Object.assign({}, this.props)
delete propsWithoutForm.form
@ -491,6 +516,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 (
<React.Fragment>
@ -545,27 +580,23 @@ class CoursesNew extends Component {
`}
</style>
<Form onSubmit={this.handleSubmit} className={"edu-back-white newcourses"}>
<Form onSubmit={this.handleSubmit} className="edu-back-white newcourses">
{/*内容*/}
<style>
{`
.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 {
@ -577,22 +608,55 @@ class CoursesNew extends Component {
<div className="stud-class-set bor-bottom-greyE padding10200 ">
<div className={"TabsWarpcourse"}>
<Form.Item label="课程名称">
{getFieldDecorator('course', {
rules: [{required: true, message: "不能为空"}],
})(
<AutoComplete style={{ width: 280 }}
onSearch={this.handleSearch}
onChange={this.handleChange}
className={"fl construction "}
placeholder="例如:数据结构"
dataSource={options}
>
</AutoComplete>
<style>{
`
.yslzxueshis .ant-input{
border-right: none !important;
height: 40px !important;
width: 655px !important;
}
.yslzxueshisy span .ant-input-group-addon{
width: 65px !important;
background-color: #fafafa!important;
}
.yslzxueshisy .ant-input-group-addon{
width: 65px !important;
background-color: #fafafa!important;
}
.yslzxueshis .ant-select-dropdown{
width: 655px !important;
height:160px !important;
}
.yslzxueshisy .ant-select-dropdown{
width: 655px !important;
height:160px !important;
}
.yslzxueshis .ant-select-dropdown-menu{
width: 655px !important;
}
.ant-select-dropdown{
width: 655px !important;
height:160px !important;
}
`
}</style>
<Form.Item label="课程名称">
{getFieldDecorator('course', {
rules: [{required: true, message: "不能为空"}],
})(
<AutoComplete
style={{ width: 720}}
onSearch={this.handleSearch}
onSelect={this.handleSearchsysl}
className="fl construction yslzxueshis "
dataSource={options}
>
<Input className="yslzxueshisy " placeholder="例如:数据结构" onChange={this.handleChange} addonAfter={String(addonAfteronelens3)+"/60"} maxLength={60} />
</AutoComplete>
)}
<span className={"newcoursestitle fl"}>
<span className="newcoursestitle fl">
{/*错误示例数据结构2017本部数据结构2017秋季数据结构2017电子商务1班*/}
<p className="ant-progress-text">
<Icon style={{ color: '#52c41a' }} type="check-circle" theme="filled"/>
@ -603,8 +667,8 @@ class CoursesNew extends Component {
<span className={"color-grey-9 font-12 ml5"}>错误示例数据结构2019春</span>
</p>
</span>
<div id='iscourse'></div>
</Form.Item>
<div id='iscourse'></div>
</Form.Item>
</div>
</div>
@ -619,14 +683,41 @@ class CoursesNew extends Component {
}
</style>
<div className="stud-class-set bor-bottom-greyE padding1020 ">
<style>{
`
.yslzxueshiskmc .ant-input{
border-right: none !important;
height: 40px !important;
width: 655px !important;
<Form.Item label="课堂名称">
}
.yslzxueshiskmc .ant-input-group{
width: 720px !important;
}
.yslzxueshisy span .ant-input-group-addon{
width: 65px !important;
background-color: #fafafa!important;
}
.yslzxueshiskmc .ant-input-group-addon{
width: 65px !important;
background-color: #fafafa!important;
}
.yslzxueshiskmc .ant-input-group-wrapper{
width: 720px !important;
}
.yslzxueshiskmcs .ant-input-group-wrapper{
width: 720px !important;
}
`
}</style>
<Form.Item label="课堂名称" className="yslzxueshiskmcs">
{getFieldDecorator('classroom', {
rules: [{required: true, message: "不能为空"}],
})(<Input className={"greyInput fl"} placeholder="例如数据结构2016秋季班级"/>)}
<span className={"newcoursestitle fl"}>
})(<Input className="yslzxueshiskmc fl" placeholder="例如数据结构2016秋季班级" addonAfter={String(addonAfteronelens4)+"/60"} maxLength={60} />)}
<span className="newcoursestitleysl fl">
{/*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*/}
<p className="ant-progress-text">
<p className="ant-progress-text">
<Icon style={{ color: '#52c41a' }} type="check-circle" theme="filled"/>
<span className={"color-grey-9 font-12 ml5"}>正确示例数据结构2019春季班级</span>
</p>
@ -675,11 +766,7 @@ class CoursesNew extends Component {
rules:[{
pattern: new RegExp(/^[0-9]+([.]{1}[0-9]+){0,1}$/, "g"),
message: '必须是数值'
},
{
max:5,
message: '不能超过5个字符',
}]}
}]}
)(
<Input id="period" className="yslzxueshi " placeholder="例如30" addonAfter={String(addonAfteronelen)+"/5"} maxLength={5}/>
)}
@ -694,11 +781,7 @@ class CoursesNew extends Component {
rules:[{
pattern: new RegExp(/^[0-9]+([.]{1}[0-9]+){0,1}$/, "g"),
message: '必须是数值'
},
{
max:5,
message: '不能超过5个字符',
}
}
]}
)(
<Input id="credit" className="yslzxueshi" placeholder="例如3" addonAfter={String(addonAfteronelens)+"/5"} maxLength={5}/>

@ -54,12 +54,7 @@ class Goldsubject extends Component {
addonAfteronelenone:"",
addonAfteronelentwo:"",
Whethertocreateanewclassroom:true,
checkbofrup:[
{module_type:"announcement",module_name:"公告栏"},{module_type:"online_learning",module_name:"在线学习"}
,{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"}
,{module_type:"exercise",module_name:"试卷"},{module_type:"poll",module_name:"问卷"}
,{module_type:"attachment",module_name:"资源"},{module_type:"board",module_name:"讨论"},{module_type:"course_group",module_name:"分班"},],
bordebool:false,
}
}
// disabledEndDate= endValue => {
@ -110,8 +105,8 @@ class Goldsubject extends Component {
};
componentDidMount() {
console.log("新建精品课堂的数据");
console.log(this.props);
// console.log("新建精品课堂的数据");
// console.log(this.props);
let coursesId = this.props.match.params.coursesId;
let user_school=this.props.current_user&&this.props.current_user.user_school;
@ -164,8 +159,8 @@ class Goldsubject extends Component {
if (response) {
// this.goback
if(response.data){
console.log("获取Goldsubject.js");
console.log(response.data);
// console.log("获取Goldsubject.js");
// console.log(response.data);
if(response.data.status===0){
this.props.form.setFieldsValue({
classroom: response.data.course_name,
@ -206,20 +201,20 @@ class Goldsubject extends Component {
}
}
onChangeTimepublishs = (date, dateString) => {
console.log("结束时间11111111111");
console.log(dateString);
// console.log("结束时间11111111111");
// console.log(dateString);
if(dateString===""){
this.setState({
datatime: undefined,
})
console.log("结束时间111111111116");
// console.log("结束时间111111111116");
this.props.form.setFieldsValue({
endtime:undefined,
});
}else{
console.log("结束时间111111111117");
// console.log("结束时间111111111117");
this.setState({
datatime: dateString,
@ -231,10 +226,10 @@ class Goldsubject extends Component {
};
onChangeTimepublishstwo = (date, dateString) => {
console.log("结束时间22222222222");
console.log(dateString);
// console.log("结束时间22222222222");
// console.log(dateString);
if(dateString===""){
console.log("结束时间222222222223");
// console.log("结束时间222222222223");
this.setState({
datatimetwo: undefined,
})
@ -242,7 +237,7 @@ class Goldsubject extends Component {
starttime: undefined,
});
}else{
console.log("结束时间222222222224");
// console.log("结束时间222222222224");
this.setState({
datatimetwo: dateString,
@ -320,13 +315,23 @@ class Goldsubject extends Component {
if (!err) {
var classroomysl=values.classroom+"";
try {
if(classroomysl){
if(classroomysl.length>60){
classroomysl=classroomysl.substring(0,60);
}
}
}catch (e) {
}
// console.log('Received values of form: ', values);
var datasysl={
// subject_id:128, //这是带过来的值 编辑就不要传值了
name: values.classroom,
name: classroomysl,
class_period: values.period,
credit: parseFloat(values.credit),
start_date:moment(values.starttime).format("YYYY-MM-DD"),
@ -336,12 +341,12 @@ class Goldsubject extends Component {
school:values.school
};
try {
console.log("327");
console.log(datasysl);
// console.log("327");
// console.log(datasysl);
// console.log(JSON.stringify(datasysl));
console.log("88887777");
console.log(moment(values.starttime).format("YYYY-MM-DD"));
console.log(moment(values.endtime).format("YYYY-MM-DD"));
// console.log("88887777");
// console.log(moment(values.starttime).format("YYYY-MM-DD"));
// console.log(moment(values.endtime).format("YYYY-MM-DD"));
}catch (e) {
}
@ -375,15 +380,15 @@ class Goldsubject extends Component {
})
}
console.log("错误信息信息信息1");
console.log(err);
console.log(values.starttime);
console.log(values.endtime);
// console.log("错误信息信息信息1");
// console.log(err);
// console.log(values.starttime);
// console.log(values.endtime);
});
} else {
this.props.form.validateFields((err, values) => {
console.log("错误信息信息信息2");
// console.log("错误信息信息信息2");
console.log(err);
if (err) {
return;
@ -419,11 +424,11 @@ class Goldsubject extends Component {
school:values.school
};
try {
console.log("提交的ysldatas数据");
console.log(ysldatas);
// console.log("提交的ysldatas数据");
// console.log(ysldatas);
// console.log(JSON.stringify(ysldatas));
console.log(moment(values.starttime).format("YYYY-MM-DD"));
console.log(moment(values.endtime).format("YYYY-MM-DD"));
// console.log(moment(values.starttime).format("YYYY-MM-DD"));
// console.log(moment(values.endtime).format("YYYY-MM-DD"));
}catch (e) {
}
@ -527,12 +532,33 @@ class Goldsubject extends Component {
};
handleChange=(value)=>{
handleChange=(e)=>{
console.log(e);
this.props.form.setFieldsValue({
// course:value,
classroom:value
classroom:e.target.value,
})
if(e.target.value){
if(e.target.value.length>60){
this.setState({
bordebool:true,
})
}else if(e.target.value.length===0){
this.setState({
bordebool:true,
})
}else{
this.setState({
bordebool:false,
})
}
}else{
this.setState({
bordebool:true
})
}
};
handleSearchschool=(value)=>{
@ -602,7 +628,7 @@ class Goldsubject extends Component {
this.applyForAddOrgForm.setVisible(true)
}
render() {
let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,addonAfteronelenone,addonAfteronelentwo} = this.state;
let {datatime,datatimetwo,school,bordebool,searchlistscholl,Whethertocreateanewclassroom,addonAfteronelenone,addonAfteronelentwo} = this.state;
const {getFieldDecorator} = this.props.form;
const propsWithoutForm = Object.assign({}, this.props)
delete propsWithoutForm.form
@ -624,8 +650,12 @@ class Goldsubject extends Component {
if(addonAftertwo){
addonAfteronelens=String(addonAftertwo).length;
}
console.log(addonAfteronelenone);
console.log(addonAfteronelentwo);
var addonAfterthree=this.props.form&&this.props.form.getFieldValue('classroom');
var addonAfteronelens3=0;
if(addonAfterthree){
addonAfteronelens3=String(addonAfterthree).length;
}
return (
<React.Fragment>
@ -687,20 +717,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 {
@ -753,19 +779,61 @@ class Goldsubject extends Component {
}
</style>
<div className="stud-class-set bor-bottom-greyE padding1020 ">
<style>{
`
.yslzxueshis .ant-input{
border-right: none !important;
height: 40px !important;
width: 655px !important;
}
.yslzxueshisy span .ant-input-group-addon{
width: 65px !important;
background-color: #fafafa!important;
}
.yslzxueshisy .ant-input-group-addon{
width: 65px !important;
background-color: #fafafa!important;
}
.yslzxueshis .ant-select-dropdown{
width: 655px !important;
height:160px !important;
}
.yslzxueshis .ant-select-dropdown-menu{
width: 655px !important;
}
.ant-select-dropdown{
width: 655px !important;
height:160px !important;
}
`
}</style>
<style>
{bordebool===false?
`
.ant-input:hover {
// border: 1px solid #d9d9d9;
}
`:
`
.ant-input:hover {
// border: 1px solid #f5222d;
}
`
}
</style>
<Form.Item label="课堂名称">
{getFieldDecorator('classroom', {
rules: [{required: true, message: "不能为空"}],
rules: [{required: true, message: "不能为空"}],
})(
<AutoComplete style={{ width: 280 }}
<AutoComplete
style={{width: 720}}
onSearch={this.handleSearch}
onChange={this.handleChange}
className={"fl construction "}
placeholder="例如:数据结构"
className={"fl construction yslzxueshis "}
dataSource={options}
>
{options}
<Input className="yslzxueshisy " placeholder="例如:数据结构" onInput={this.handleChange} addonAfter={String(addonAfteronelens3)+"/60"} maxLength={60} />
</AutoComplete>
)}
{/*<span className={"newcoursestitle fl"}>*/}
@ -863,7 +931,6 @@ class Goldsubject extends Component {
width={"210px"}
value={datatimetwo === undefined ? "" :datatimetwo === null ? "" : moment(datatimetwo, dateFormat)}
disabledTime={disabledDateTime}
disabledDate={this.isabledStartDate}
dropdownClassName="hideDisable"
onChange={this.onChangeTimepublishstwo}
/>
@ -887,7 +954,6 @@ class Goldsubject extends Component {
width={"210px"}
value={datatime === undefined ? "" :datatime === null ? "" : moment(datatime, dateFormat)}
disabledTime={disabledDateTime}
disabledDate={this.disabledEndDate}
dropdownClassName="hideDisable"
onChange={this.onChangeTimepublishs}
/>

@ -77,7 +77,7 @@ class PollNew extends Component {
}
changeTopicName = (e) => {
console.log("调用了changeTopicName");
// console.log("调用了changeTopicName");
let num = parseInt(e.target.value.length);
if(num>60){
return;

Loading…
Cancel
Save