Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

courseware
jingquan huang 5 years ago
commit 85388d4a22

@ -78,6 +78,7 @@
"react-codemirror2": "^6.0.0", "react-codemirror2": "^6.0.0",
"react-content-loader": "^3.1.1", "react-content-loader": "^3.1.1",
"react-cookies": "^0.1.1", "react-cookies": "^0.1.1",
"react-datepicker": "^2.14.0",
"react-dev-utils": "^5.0.0", "react-dev-utils": "^5.0.0",
"react-dom": "^16.9.0", "react-dom": "^16.9.0",
"react-hot-loader": "^4.0.0", "react-hot-loader": "^4.0.0",

@ -1061,14 +1061,14 @@ class Listofworksstudentone extends Component {
}> }>
{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time === "--" ? "--" : {record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time === "--" ? "--" :
<a style={ <span style={
{ {
color: '#747A7F', color: '#747A7F',
textAlign: "center" textAlign: "center"
} }
} }
>{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time} >{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time}
</a> </span>
} }
</span> </span>
// <a style={ // <a style={
@ -1300,7 +1300,7 @@ class Listofworksstudentone extends Component {
// onClick={() => this.Viewstudenttraininginformationt(record)} // onClick={() => this.Viewstudenttraininginformationt(record)}
>{record.has_comment===true?"详情":"评阅 "}</a> : >{record.has_comment===true?"详情":"评阅 "}</a> :
<span> <span>
<a style={{textAlign: "center"}} className="color-blue maxnamewidth120" <a style={{textAlign: "center"}} className="color-blue"
onMouseDown={(e) => this.Viewstudenttraininginformationtysl2(e, record)} onMouseDown={(e) => this.Viewstudenttraininginformationtysl2(e, record)}
// onClick={() => this.Viewstudenttraininginformationt(record)} // onClick={() => this.Viewstudenttraininginformationt(record)}
>{record.has_comment===true?"详情":"评阅 "}</a> >{record.has_comment===true?"详情":"评阅 "}</a>
@ -1446,14 +1446,14 @@ class Listofworksstudentone extends Component {
} }
}> }>
{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time === "--" ? "--" : {record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time === "--" ? "--" :
<a style={ <span style={
{ {
color: '#747A7F', color: '#747A7F',
textAlign: "center" textAlign: "center"
} }
} }
>{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time} >{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time}
</a> </span>
} }
</span> </span>
) )

@ -3,6 +3,7 @@ import React,{ Component } from "react";
import { Row, Col,Card,Select} from 'antd'; import { Row, Col,Card,Select} from 'antd';
import {getImageUrl} from 'educoder'; import {getImageUrl} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import NoneDatas from "../component/NoneDatas";
import { import {
Chart, Chart,
Geom, Geom,
@ -17,7 +18,7 @@ class Signinstatistics extends Component {
super(props) super(props)
this.state={ this.state={
datas:null, datas:null,
newlist:[], newlist:undefined,
course_groups:[{id:"全部",name:"全部"}], course_groups:[{id:"全部",name:"全部"}],
spal:false, spal:false,
} }
@ -177,7 +178,7 @@ class Signinstatistics extends Component {
</Col> </Col>
</Row> </Row>
<div className={"SigninstatisticsChart mt20"}> {newlist&&newlist.length>0?<div className={"SigninstatisticsChart mt20"}>
<div className={"pd30"}> <div className={"pd30"}>
<Row> <Row>
<Col span={14}> <Col span={14}>
@ -270,7 +271,11 @@ class Signinstatistics extends Component {
</Chart> </Chart>
</div> </div>
</div> </div>:<div style={{
minHeight:"400px",
}}>
<NoneDatas></NoneDatas>
</div>}
</div> </div>
} }
</div> </div>

@ -118,9 +118,11 @@ class Detailss extends Component {
</div> </div>
{ {
defaultActiveKey === "1" ? defaultActiveKey === "1" ?
<div className="ws25s" style={{ <div className="ws25s" style={item && item.mode === "NUMBER"?{
position: "relative", position: "relative",
overflow: 'hidden', overflow: 'hidden',
}:{
position: "relative",
}}> }}>
{ {
item && item.mode === "NUMBER" ? item && item.mode === "NUMBER" ?

@ -205,3 +205,9 @@
.sginboxcolor909399 .ant-select-arrow{ .sginboxcolor909399 .ant-select-arrow{
color: #909399 !important; color: #909399 !important;
} }
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item {
height: auto !important;
padding: 0px !important;
white-space: nowrap !important;
}

@ -1,8 +1,10 @@
import "../css/Signinstatistics.css" import "../css/Signinstatistics.css"
import React from 'react' import React from 'react'
import { Modal , Form, Input, Radio,DatePicker, TimePicker,Select,Button} from 'antd'; import { Modal , Form, Input, Radio,DatePicker,Select,Button} from 'antd';
import moment from 'moment'; import moment from 'moment';
import axios from 'axios'; import axios from 'axios';
import TimePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
function range(start, end) { function range(start, end) {
const result = []; const result = [];
for (let i = start; i < end; i++) { for (let i = start; i < end; i++) {
@ -30,9 +32,26 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
this.state = { this.state = {
course_groups:[], course_groups:[],
type:false, type:false,
dateString:null dateString:null,
start_time: "",
end_time:""
} }
} }
handleChangestart_time = (date) => {
this.setState({
start_time: date
});
};
handleChangeend_time=(date)=>{
this.setState({
end_time: date
});
}
componentDidMount() { componentDidMount() {
const coursesId=this.props.match.params.coursesId; const coursesId=this.props.match.params.coursesId;
let newurl=`/courses/${coursesId}/all_course_groups.json`; let newurl=`/courses/${coursesId}/all_course_groups.json`;
@ -101,32 +120,32 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
}); });
} }
getDisabledHours=()=> { // getDisabledHours=()=> {
let hours = [] // let hours = []
if(this.state.dateString===moment().format('YYYY-MM-DD')){ // if(this.state.dateString===moment().format('YYYY-MM-DD')){
let time = moment().format('HH:mm') // let time = moment().format('HH:mm')
let timeArr = time.split(':') // let timeArr = time.split(':')
for (var i = 0; i < parseInt(timeArr[0]); i++) { // for (var i = 0; i < parseInt(timeArr[0]); i++) {
hours.push(i) // hours.push(i)
} // }
} // }
//
return hours // return hours
} // }
//
getDisabledMinutes=(selectedHour)=>{ // getDisabledMinutes=(selectedHour)=>{
let minutes = [] // let minutes = []
if(this.state.dateString===moment().format('YYYY-MM-DD')){ // if(this.state.dateString===moment().format('YYYY-MM-DD')){
let time = moment().format('HH:mm') // let time = moment().format('HH:mm')
let timeArr = time.split(':') // let timeArr = time.split(':')
if (selectedHour == parseInt(timeArr[0])) { // if (selectedHour == parseInt(timeArr[0])) {
for(var i = 0; i < parseInt(timeArr[1]); i++) { // for(var i = 0; i < parseInt(timeArr[1]); i++) {
minutes.push(i) // minutes.push(i)
} // }
} // }
} // }
return minutes // return minutes
} // }
onChange=(date, dateString)=>{ onChange=(date, dateString)=>{
this.setState({ this.setState({
@ -147,14 +166,14 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
"width":"130px", "width":"130px",
"height":"40px", "height":"40px",
"border":"1px solid rgba(76,172,255,1)", "border":"1px solid rgba(76,172,255,1)",
"border-radius":"4px", "borderRadius":"4px",
} }
const rightbuton={ const rightbuton={
"width":"130px", "width":"130px",
"height":"40px", "height":"40px",
"background":"#4CACFF", "background":"#4CACFF",
"border-radius":"4px", "borderRadius":"4px",
} }
const format = 'HH:mm'; const format = 'HH:mm';
@ -181,7 +200,7 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
{course_groups.map((item,key)=>{ {course_groups.map((item,key)=>{
return( return(
<Option value={item.id}>{item.name}</Option> <Option value={item.id} key={key}>{item.name}</Option>
) )
})} })}
@ -226,21 +245,65 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
onChange={this.onChange} onChange={this.onChange}
/>)} />)}
</Form.Item> </Form.Item>
<style>
{
`
#form_in_modal_start_time{
width:413px;
padding-left: 10px;
}
#form_in_modal_end_time{
width:413px;
padding-left: 10px;
}
`
}
</style>
<Form.Item label="开始时间:"> <Form.Item label="开始时间:">
{getFieldDecorator('start_time', { {getFieldDecorator('start_time', {
rules: [{ type: 'object', required: true, message: '请选择开始时间' }], rules: [{ type: 'object', required: true, message: '请选择开始时间' }],
})(<TimePicker style={{width:"413px"}} format={format} getPopupContainer={trigger => trigger.parentNode}/>)} })(
// <TimePicker style={{width:"413px"}} format={format} getPopupContainer={trigger => trigger.parentNode}/>
<TimePicker
style={{width:"413px"}}
selected={this.state.start_time}
onChange={date => this.handleChangestart_time(date)}
showTimeSelect
showTimeSelectOnly
timeIntervals={1}
timeCaption="Time"
timeFormat="HH:mm"
dateFormat="HH:mm"
getPopupContainer={trigger => trigger.parentNode}
/>
)}
</Form.Item> </Form.Item>
<Form.Item label="结束时间:"> <Form.Item label="结束时间:">
{getFieldDecorator('end_time', { {getFieldDecorator('end_time', {
rules: [{ type: 'object', required: true, message: '请选择结束时间' }], rules: [{ type: 'object', required: true, message: '请选择结束时间' }],
})(<TimePicker style={{width:"413px"}} format={format} getPopupContainer={trigger => trigger.parentNode} })(
disabledHours={this.getDisabledHours} // <TimePicker style={{width:"413px"}} format={format} getPopupContainer={trigger => trigger.parentNode}
disabledMinutes={this.getDisabledMinutes} // disabledHours={this.getDisabledHours}
// disabledMinutes={this.getDisabledMinutes}
/>)} //
// />
<TimePicker
style={{width:"413px"}}
selected={this.state.end_time}
onChange={date => this.handleChangeend_time(date)}
showTimeSelect
showTimeSelectOnly
timeIntervals={1}
minTime={this.state.dateString===moment().format('YYYY-MM-DD')||this.state.dateString===null?new Date():false}
maxTime={this.state.dateString===moment().format('YYYY-MM-DD')||this.state.dateString===null?moment().endOf('day').toDate():false}
timeCaption="Time"
timeFormat="HH:mm"
dateFormat="HH:mm"
getPopupContainer={trigger => trigger.parentNode}
/>
)}
</Form.Item> </Form.Item>

@ -12,14 +12,14 @@ class Qrcodesignin extends Component {
"width":"130px", "width":"130px",
"height":"40px", "height":"40px",
"border":"1px solid rgba(76,172,255,1)", "border":"1px solid rgba(76,172,255,1)",
"border-radius":"4px", "borderRadius":"4px",
} }
const rightbuton={ const rightbuton={
"width":"130px", "width":"130px",
"height":"40px", "height":"40px",
"background":"#4CACFF", "background":"#4CACFF",
"border-radius":"4px", "borderRadius":"4px",
} }
return( return(
<React.Fragment> <React.Fragment>

@ -46,14 +46,14 @@ class Signinname extends Component {
"width":"130px", "width":"130px",
"height":"40px", "height":"40px",
"border":"1px solid rgba(76,172,255,1)", "border":"1px solid rgba(76,172,255,1)",
"border-radius":"4px", "borderRadius":"4px",
} }
const rightbuton={ const rightbuton={
"width":"130px", "width":"130px",
"height":"40px", "height":"40px",
"background":"#4CACFF", "background":"#4CACFF",
"border-radius":"4px", "borderRadius":"4px",
} }
return( return(
<React.Fragment> <React.Fragment>

@ -48,14 +48,14 @@ class Studentssignmodel extends Component {
"width":"130px", "width":"130px",
"height":"40px", "height":"40px",
"border":"1px solid rgba(76,172,255,1)", "border":"1px solid rgba(76,172,255,1)",
"border-radius":"4px", "borderRadius":"4px",
} }
const rightbuton={ const rightbuton={
"width":"130px", "width":"130px",
"height":"40px", "height":"40px",
"background":"#4CACFF", "background":"#4CACFF",
"border-radius":"4px", "borderRadius":"4px",
} }
return( return(
<React.Fragment> <React.Fragment>

@ -257,12 +257,12 @@ class Students_signin extends Component{
getsetdatas={()=>this.getsetdatas()} getsetdatas={()=>this.getsetdatas()}
/> />
{/*创建实训*/} {/*创建实训*/}
<Createsignmodel {this.state.visible===true?<Createsignmodel
{...this.state} {...this.state}
{...this.props} {...this.props}
hideCreatesign={()=>this.hideCreatesign()} hideCreatesign={()=>this.hideCreatesign()}
settabsdata={()=>this.settabsdata()} settabsdata={()=>this.settabsdata()}
/> />:""}
{/*签到*/} {/*签到*/}
<Studentssignmodels <Studentssignmodels
{...this.state} {...this.state}
@ -307,9 +307,9 @@ class Students_signin extends Component{
<div className="mb30 clearfix educontent mt40 intermediatecenter"> <div className="mb30 clearfix educontent mt40 intermediatecenter">
<Pagination showQuickJumper current={page} onChange={this.paginationonChange} {attendances_count>0?<Pagination showQuickJumper current={page} onChange={this.paginationonChange}
pageSize={limit} pageSize={limit}
total={attendances_count}></Pagination> total={attendances_count}></Pagination>:''}
</div> </div>
</TabPane> </TabPane>
<TabPane tab="历史签到" key="2"> <TabPane tab="历史签到" key="2">
@ -345,10 +345,10 @@ class Students_signin extends Component{
<div className="mb30 clearfix educontent mt40 intermediatecenter"> <div className="mb30 clearfix educontent mt40 intermediatecenter">
<Pagination showQuickJumper current={page} onChange={this.paginationonChange} {attendances_count>0?<Pagination showQuickJumper current={page} onChange={this.paginationonChange}
pageSize={limit} pageSize={limit}
total={attendances_count}></Pagination> total={attendances_count}></Pagination>:''
</div> }</div>
</TabPane> </TabPane>
{ {
isAdmin===true? isAdmin===true?

@ -386,7 +386,7 @@ class Trialapplication extends Component {
{ {
isRenders === false ? "" : isRenders === false ? "" :
<div style={{"border-radius": "10px"}}> <div style={{"borderRadius": "10px"}}>
<style> <style>
{ {
` `
@ -545,14 +545,14 @@ class Trialapplication extends Component {
<Dialog open={true} id="DialogIDysl" <Dialog open={true} id="DialogIDysl"
disableEscapeKeyDown={true} disableEscapeKeyDown={true}
style={{display: isRenders == false ? 'none' : '', "border-radius": "10px"}} style={{display: isRenders == false ? 'none' : '', "borderRadius": "10px"}}
> >
<div id="closeIcon" onClick={() => { <div id="closeIcon" onClick={() => {
this.handleDialogClose() this.handleDialogClose()
}}> }}>
<i className="iconfont icon-shanchudiao"></i> <i className="iconfont icon-shanchudiao"></i>
</div> </div>
<div className={"login_register_content"} style={{"border-radius": "10px", "width": "560px"}}> <div className={"login_register_content"} style={{"borderRadius": "10px", "width": "560px"}}>
<div className={"login_register_content"} style={ <div className={"login_register_content"} style={
user_phone_binded === true ? user_phone_binded === true ?

@ -404,7 +404,7 @@ class Trialapplicationysl extends Component {
{ {
isRenders === false ? "" : isRenders === false ? "" :
<div style={{"border-radius": "10px"}}> <div style={{"borderRadius": "10px"}}>
<style> <style>
{ {
` `
@ -563,14 +563,14 @@ class Trialapplicationysl extends Component {
<Dialog open={true} id="DialogIDysl" <Dialog open={true} id="DialogIDysl"
disableEscapeKeyDown={true} disableEscapeKeyDown={true}
style={{display: isRenders == false ? 'none' : '', "border-radius": "10px"}} style={{display: isRenders == false ? 'none' : '', "borderRadius": "10px"}}
> >
<div id="closeIcon" onClick={() => { <div id="closeIcon" onClick={() => {
this.handleDialogClose() this.handleDialogClose()
}}> }}>
<i className="iconfont icon-shanchudiao"></i> <i className="iconfont icon-shanchudiao"></i>
</div> </div>
<div className={"login_register_content"} style={{"border-radius": "10px", "width": "560px"}}> <div className={"login_register_content"} style={{"borderRadius": "10px", "width": "560px"}}>
<div className={"login_register_content"} style={ <div className={"login_register_content"} style={
user_phone_binded === true ? user_phone_binded === true ?

@ -242,7 +242,7 @@ class ShixunPathSearch extends Component {
sortList && sortList.map((item, key) => { sortList && sortList.map((item, key) => {
return ( return (
<li className={discipline_id == `${item.id}` ? "active" : ""} onClick={(e) => this.changeSelect(e, `${item.id}`, item.sub_disciplines.length)} key={key}> <li className={discipline_id == `${item.id}` ? "active" : ""} onClick={(e) => this.changeSelect(e, `${item.id}`, item.sub_disciplines.length)} key={key}>
<Dropdown disabled={item.sub_disciplines.length === 0} overlay={() => this.getmenu(item.sub_disciplines, item)} placement="bottomCenter"> <Dropdown overlayStyle={{width:600}} disabled={item.sub_disciplines.length === 0} overlay={() => this.getmenu(item.sub_disciplines, item)} placement="bottomLeft">
<a value={item.id}>{item.name}</a> <a value={item.id}>{item.name}</a>
</Dropdown> </Dropdown>
</li> </li>

@ -260,7 +260,7 @@ class Headplugselections extends Component {
disciplinesdata&&disciplinesdata.map((item,key)=>{ disciplinesdata&&disciplinesdata.map((item,key)=>{
return( return(
item.sub_disciplines.length>0? item.sub_disciplines.length>0?
<Dropdown getPopupContainer={trigger => trigger.parentNode} overlay={ overlaymenu(item.sub_disciplines,item.id)} key={key} placement="bottomLeft"> <Dropdown overlayStyle={{width:600}} getPopupContainer={trigger => trigger.parentNode} overlay={ overlaymenu(item.sub_disciplines,item.id)} key={key} placement="bottomLeft">
<li key={key} className={parseInt(shixunsearchAllvalue)===item.id?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} value={item.id} onClick={()=>this.shixunserdchAlls(item.sub_disciplines,item.id)}> <li key={key} className={parseInt(shixunsearchAllvalue)===item.id?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} value={item.id} onClick={()=>this.shixunserdchAlls(item.sub_disciplines,item.id)}>
{item.name} {item.name}
</li> </li>

@ -84,6 +84,7 @@ export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => {
} }
init() init()
}, []) }, [])
// item.id < 4 ? "bottomRight" : item.id >= 8 ? "bottomLeft" : "bottomCenter"
return ( return (
<div className="edu-back-white shixun-search-bar" > <div className="edu-back-white shixun-search-bar" >
<div className="educontent"> <div className="educontent">
@ -95,7 +96,7 @@ export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => {
{ {
navs.map((item, key) => { navs.map((item, key) => {
return ( return (
<Dropdown overlay={overlayMenu(item.sub_repertoires, item.id)} key={key} placement={item.id < 4 ? "bottomRight" : item.id >= 8 ? "bottomLeft" : "bottomCenter"}> <Dropdown overlayStyle={{width:400}} overlay={overlayMenu(item.sub_repertoires, item.id)} key={key} placement={"bottomLeft"}>
<li key={item.id} className={searchValue == item.id ? "shaiItem shixun_repertoire active" : "shaiItem shixun_repertoire"} value={item.id} onClick={onSearchBranch}> <li key={item.id} className={searchValue == item.id ? "shaiItem shixun_repertoire active" : "shaiItem shixun_repertoire"} value={item.id} onClick={onSearchBranch}>
{item.name} {item.name}
</li> </li>

Loading…
Cancel
Save