dev_forum
杨树明 5 years ago
parent 8e43e29cbe
commit 858a5f2249

@ -1,10 +1,11 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import CoursesHomeCard from "./coursesHomeCard.js"
import axios from 'axios';
import {Input,Pagination,Tooltip} from 'antd';
import {Input,Tooltip} from 'antd';
import './css/CoursesHome.css';
import Pagination from '@icedesign/base/lib/pagination';
import '@icedesign/base/lib/pagination/style.js';
const Search = Input.Search;
class coursesHome extends Component{
@ -90,7 +91,7 @@ class coursesHome extends Component{
render() {
let { order,search,page,coursesHomelist }=this.state;
console.log(coursesHomelist)
return (
<div>
@ -127,10 +128,16 @@ class coursesHome extends Component{
<CoursesHomeCard {...this.props} {...this.state}
coursesHomelist={coursesHomelist}></CoursesHomeCard>
{coursesHomelist===undefined?"":coursesHomelist.courses.length===0?<div className="edu-tab-con-box clearfix edu-txt-center mb50">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">暂无数据哦~</p>
</div>:""}
{
coursesHomelist===undefined?"":coursesHomelist.courses_count > 16?
<div className="educontent mb80 edu-txt-center mt10">
<Pagination showQuickJumper current={page} pageSize={16} total={coursesHomelist.courses_count} onChange={this.onChange} />
<Pagination current={page} total={ coursesHomelist.courses_count || 1299 } type="mini" pageSize={16} onChange={this.onChange} />
</div>:""
}
</div>
@ -139,4 +146,7 @@ class coursesHome extends Component{
)
}
}
export default coursesHome;
export default coursesHome;
// {/*<Pagination showQuickJumper current={page} pageSize={16} total={coursesHomelist.courses_count} onChange={this.onChange} />*/}

@ -388,11 +388,12 @@ class GraduationTasksSubmitedit extends Component{
}
this.props.form.validateFields((err, values) => {
if (!err) {
console.log(values.description);
// console.log(fileList);
if(values.description===undefined||values.description===""){
this.scrollToAnchor("valuestypes");
debugger
return
}
if(workslist.task_type===2){
@ -418,12 +419,12 @@ class GraduationTasksSubmitedit extends Component{
})
let workId=this.props.match.params.work_Id;
if(fileList.length===0){
this.setState({
shixunsreplace:true,
})
return
}
// if(fileList.length===0){
// this.setState({
// shixunsreplace:true,
// })
// return
// }
let url="/graduation_works/"+workId+".json";
axios.put(url, {
@ -456,7 +457,7 @@ class GraduationTasksSubmitedit extends Component{
console.log(error)
})
}
});
}
@ -472,10 +473,18 @@ class GraduationTasksSubmitedit extends Component{
hidestartshixunsreplacetwo= ()=>{
this.setState({
shixunsreplace:false,
spinnings:false
})
}
scrollToAnchor = (anchorName) => {
if (anchorName) {
// 找到锚点
let anchorElement = document.getElementById(anchorName);
// 如果对应id的锚点存在就跳转到锚点
if(anchorElement) { anchorElement.scrollIntoView({block: 'start', behavior: 'smooth'}); }
}
}
render(){
const { getFieldDecorator } = this.props.form;
let {search,fileList, workslist,setvalue,minvalue,minmaxtype,Loadtype,description,attachments,
@ -573,7 +582,7 @@ class GraduationTasksSubmitedit extends Component{
{description&&description?
<div>
{/*<Form onSubmit={this.handleSubmit} >*/}
<div className="stud-class-set pd20 coursenavbox edu-back-white">
<div className="stud-class-set pd20 coursenavbox edu-back-white" id={"valuestypes"}>
<style>{`
.uploadBtn.ant-btn {
border: none;

@ -358,6 +358,7 @@ class GraduationTasksSubmitnew extends Component{
//公用数据
Commoninterface = (fileList,selectmemberslist,workslist)=>{
debugger
let userids=[];
for(var list of selectmemberslist){
@ -379,11 +380,11 @@ class GraduationTasksSubmitnew extends Component{
}
// if( GraduationTasksnewtype===true){
this.props.form.validateFields((err, values) => {
if (!err) {
console.log(values.description);
// console.log(fileList);
if(values.description===undefined||values.description===""){
this.scrollToAnchor("valuestypes");
debugger
return
}
if(workslist&&workslist.task_type===2){
@ -414,13 +415,12 @@ class GraduationTasksSubmitnew extends Component{
let id=this.props.match.params.task_Id;
if(fileList.length === 0){
this.setState({
shixunsreplace:true,
})
return
}
debugger
// if(fileList.length === 0){
// this.setState({
// shixunsreplace:true,
// })
// return
// }
let url="/graduation_tasks/"+id+"/graduation_works.json";
axios.post(url, {
description:values.description,
@ -452,7 +452,7 @@ debugger
console.log(error)
})
}
});
// }
@ -460,6 +460,7 @@ debugger
//确认
hidestartshixunsreplace=()=>{
debugger
let {fileList,selectmemberslist,workslist}=this.state;
this.Commoninterface(fileList,selectmemberslist,workslist);
@ -468,9 +469,17 @@ debugger
hidestartshixunsreplacetwo=()=>{
this.setState({
shixunsreplace:false,
spinnings:false
})
}
scrollToAnchor = (anchorName) => {
if (anchorName) {
// 找到锚点
let anchorElement = document.getElementById(anchorName);
// 如果对应id的锚点存在就跳转到锚点
if(anchorElement) { anchorElement.scrollIntoView({block: 'start', behavior: 'smooth'}); }
}
}
render(){
const { getFieldDecorator } = this.props.form;
let {search,fileList, workslist,setvalue,minvalue,minmaxtype,Loadtype,
@ -570,7 +579,7 @@ render(){
{/*<Form onSubmit={GraduationTasksnewtype===true?this.handleSubmit:"return false"}*/}
{/*>*/}
<div className="stud-class-set pd20 coursenavbox edu-back-white">
<div className="stud-class-set pd20 coursenavbox edu-back-white" id={"valuestypes"}>
<style>{`
.uploadBtn.ant-btn {
border: none;

@ -459,15 +459,15 @@ class GraduationTaskssettingapp extends Component{
})
}
//跳转道描点的地方
scrollToAnchor = (anchorName) => {
if (anchorName) {
// 找到锚点
let anchorElement = document.getElementById(anchorName);
// 如果对应id的锚点存在就跳转到锚点
if(anchorElement) { anchorElement.scrollIntoView(); }
}
}
// //跳转道描点的地方
// scrollToAnchor = (anchorName) => {
// if (anchorName) {
// // 找到锚点
// let anchorElement = document.getElementById(anchorName);
// // 如果对应id的锚点存在就跳转到锚点
// if(anchorElement) { anchorElement.scrollIntoView(); }
// }
// }
saveTaskssetting=()=>{

@ -143,13 +143,22 @@ class GraduationTaskssettinglist extends Component{
// console.log(e.target.value)
let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search} = this.state;
this.setState({
teacher_comment:list.length===key?undefined:list[0],
loadingstate:true
})
let listype =list instanceof Array;
if(listype===false||list.length===key){
this.setState({
teacher_comment:null,
loadingstate:true
})
}else{
this.setState({
teacher_comment:list,
loadingstate:true
})
}
if(list.length===key){
if(list.length===key){
this.seacthdata(undefined, task_status, course_group, cross_comment, order, b_order, search,this.state.page);
}else{
this.seacthdata(list[0], task_status, course_group, cross_comment, order, b_order, search,this.state.page);
@ -1104,7 +1113,7 @@ class GraduationTaskssettinglist extends Component{
{taskslistdata.search_assistants && taskslistdata.search_assistants.teacher_comment && taskslistdata.search_assistants.teacher_comment.map((item,key)=>{
return(
<span key={key}>
<Checkbox value={item.id} key={item.id} onClick={this.funteachercomment} className="fl ">{item.name}
<Checkbox value={item.id} key={item.id} className="fl ">{item.name}
<span>({item.count})</span>
</Checkbox>
</span>
@ -1371,7 +1380,7 @@ class GraduationTaskssettinglist extends Component{
{taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.map((item,key)=>{
return(
<span key={key}>
<Checkbox value={item.id} onClick={this.funteachercomment} className="fl ">{item.name}
<Checkbox value={item.id} className="fl ">{item.name}
<span>({item.count})</span>
</Checkbox>
</span>

@ -66,7 +66,7 @@ class ShixunPathCard extends Component{
}
</div>
):(
<div className="edu-tab-con-box clearfix edu-txt-center">
<div className="edu-tab-con-box clearfix edu-txt-center mb50">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">暂无数据哦~</p>
</div>

@ -1,7 +1,9 @@
import React, { Component } from 'react';
import PathCard from "./ShixunPathCard.js"
import axios from 'axios';
import {Input,Pagination} from 'antd';
import {Input} from 'antd';
import Pagination from '@icedesign/base/lib/pagination';
import '@icedesign/base/lib/pagination/style.js';
import './ShixunPaths.css'
@ -129,7 +131,7 @@ class ShixunPathSearch extends Component{
{
total_count > 16 &&
<div className="educontent mb80 edu-txt-center mt10">
<Pagination showQuickJumper defaultCurrent={page} current={page} pageSize={16} total={total_count} onChange={this.onChange} />
<Pagination current={page} total={ total_count || 1299 } type="mini" pageSize={16} onChange={this.onChange} />
</div>
}
@ -137,4 +139,7 @@ class ShixunPathSearch extends Component{
)
}
}
export default ShixunPathSearch;
export default ShixunPathSearch;
// <Pagination showQuickJumper defaultCurrent={page} current={page} pageSize={16} total={total_count} onChange={this.onChange} />
Loading…
Cancel
Save