From 81705ebfabda5e71aae6236aeebb321d4ff1fcaf 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, 26 Jul 2019 10:44:43 +0800 Subject: [PATCH] =?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/coursesDetail/CoursesLeftNav.js | 2 +- .../react/src/modules/courses/css/Courses.css | 9 +- .../src/modules/courses/new/CoursesNew.js | 95 +++++++++---------- public/react/src/modules/home/shixunsHome.js | 2 +- .../modules/tpm/TPMsettings/TPMsettings.js | 1 + .../src/modules/tpm/newshixuns/Newshixuns.js | 1 + 6 files changed, 59 insertions(+), 51 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index ad7172be5..849621259 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -502,7 +502,7 @@ class Coursesleftnav extends Component{ NavmodalValues:"名称不能为空" }) return - }else if(NavmodalValue.length>20){ + }else if(NavmodalValue.length>60){ this.setState({ NavmodalValuetype:true, NavmodalValues:"名称不能超过60个字" diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index c69b147fa..e214bd81d 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -990,8 +990,15 @@ samp { .newcourses .ant-input{ width:280px; margin-left: 11px; - height: 40px; + height: 40px !important; } + +.newcourses .ant-input{ + width:280px; + margin-left: 11px; + height: 40px !important; +} + .newcourses .ant-select-selection--single{ width: 280px; /*margin-left: 11px;*/ diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index 73c1dded9..b620ba0c3 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -1,5 +1,5 @@ import React, {Component} from "React"; -import {Form, Select, Input, Button, Checkbox, DatePicker,Spin,Icon} from "antd"; +import {Form, Select, Input, Button, Checkbox, DatePicker,Spin,Icon,AutoComplete} from "antd"; import ApplyForAddOrgModal from '../../user/modal/ApplyForAddOrgModal'; import axios from 'axios'; import "../css/Courses.css"; @@ -47,8 +47,8 @@ class CoursesNew extends Component { let coursesId = this.props.match.params.coursesId; let user_school=this.props.current_user&&this.props.current_user.user_school; - this.getschool("") - this.Searchvalue("") + // this.getschool("") + // this.Searchvalue("") if (coursesId != undefined) { let url = "/courses/" + coursesId + "/settings.json" axios.get(url).then((result) => { @@ -285,8 +285,8 @@ class CoursesNew extends Component { this.setState({ searchlist: result.data.course_lists, - // course:value, - fetching: false + // course:value, + }) } // this.props.form.setFieldsValue({ @@ -298,10 +298,11 @@ class CoursesNew extends Component { } handleSearch=(value)=>{ + if(value!=""){ this.props.form.setFieldsValue({ classroom:value, - // course:value + course:value }); this.Searchvalue(value) } @@ -311,7 +312,7 @@ class CoursesNew extends Component { handleChange=(value)=>{ this.props.form.setFieldsValue({ - // course:value, + course:value, classroom:value }) }; @@ -319,21 +320,26 @@ class CoursesNew extends Component { handleSearchschool=(value)=>{ if(value!="") { - this.props.form.setFieldsValue({ - // school: value, - fetching: true, - }); - + // this.props.form.setFieldsValue({ + // // school: value, + // fetching: true, + // }); + this.setState({ + fetching: true + }) this.getschool(value) } }; handleChangeschools=(value)=>{ - this.props.form.setFieldsValue({ - // school: value, - fetching: true, - }); + // this.props.form.setFieldsValue({ + // // school: value, + // fetching: true, + // }); + // this.setState({ + // fetching: true + // }) } handleChangeschool=(value)=>{ @@ -359,7 +365,7 @@ class CoursesNew extends Component { if (result.data.status===0) { this.setState({ searchlistscholl: result.data.school_names, - // school: value + fetching: false }) } @@ -420,8 +426,7 @@ class CoursesNew extends Component { `} -