From cc9f8eea5dcd523eae678ce50542da596a77e1ad 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, 13 Mar 2020 12:30:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E5=B8=88=E7=AB=AF=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Signinstatistics/Signinstatistics.js | 238 ++++++++++++++++++ .../courses/signin/css/Signinstatistics.css | 4 + .../courses/signin/model/Createsignmodel.js | 79 +++--- .../courses/signin/model/Qrcodesignin.js | 74 ++++++ .../courses/signin/model/Studentssignmodel.js | 76 ++++++ .../courses/signin/teacher/Teachers_signin.js | 46 +++- 6 files changed, 475 insertions(+), 42 deletions(-) create mode 100644 public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js create mode 100644 public/react/src/modules/courses/signin/css/Signinstatistics.css create mode 100644 public/react/src/modules/courses/signin/model/Qrcodesignin.js create mode 100644 public/react/src/modules/courses/signin/model/Studentssignmodel.js diff --git a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js new file mode 100644 index 000000000..d4aeb1d34 --- /dev/null +++ b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js @@ -0,0 +1,238 @@ +import React,{ Component } from "react"; +import { Row, Col,Card } from 'antd'; +import { + G2, + Chart, + Geom, + Axis, + Tooltip, + Coord, + Label, + Legend, + View, + Guide, + Shape, + Facet, + Util +} from "bizcharts"; +class Signinstatistics extends Component { + constructor(props) { + super(props) + } + + render() { + const data = [ + { + month: "Jan", + city: "Tokyo", + temperature: 7 + }, + { + month: "Jan", + city: "London", + temperature: 3.9 + }, + { + month: "Feb", + city: "Tokyo", + temperature: 6.9 + }, + { + month: "Feb", + city: "London", + temperature: 4.2 + }, + { + month: "Mar", + city: "Tokyo", + temperature: 9.5 + }, + { + month: "Mar", + city: "London", + temperature: 5.7 + }, + { + month: "Apr", + city: "Tokyo", + temperature: 14.5 + }, + { + month: "Apr", + city: "London", + temperature: 8.5 + }, + { + month: "May", + city: "Tokyo", + temperature: 18.4 + }, + { + month: "May", + city: "London", + temperature: 11.9 + }, + { + month: "Jun", + city: "Tokyo", + temperature: 21.5 + }, + { + month: "Jun", + city: "London", + temperature: 15.2 + }, + { + month: "Jul", + city: "Tokyo", + temperature: 25.2 + }, + { + month: "Jul", + city: "London", + temperature: 17 + }, + { + month: "Aug", + city: "Tokyo", + temperature: 26.5 + }, + { + month: "Aug", + city: "London", + temperature: 16.6 + }, + { + month: "Sep", + city: "Tokyo", + temperature: 23.3 + }, + { + month: "Sep", + city: "London", + temperature: 14.2 + }, + { + month: "Oct", + city: "Tokyo", + temperature: 18.3 + }, + { + month: "Oct", + city: "London", + temperature: 10.3 + }, + { + month: "Nov", + city: "Tokyo", + temperature: 13.9 + }, + { + month: "Nov", + city: "London", + temperature: 6.6 + }, + { + month: "Dec", + city: "Tokyo", + temperature: 9.6 + }, + { + month: "Dec", + city: "London", + temperature: 4.8 + } + ]; + const cols = { + month: { + range: [0, 1] + } + }; + return( + + + + +
+
+ +

Card content

+

Card content

+

Card content

+
+
+
+ + + +
+
+ +
+
+ + + +
+
+ +
+
+ + + +
+
+ +
+
+ +
+
+ + + + `${val}°C` + }} + /> + + + + +
+
+ + ) + } + +} + + + + + + +export default Signinstatistics; \ No newline at end of file diff --git a/public/react/src/modules/courses/signin/css/Signinstatistics.css b/public/react/src/modules/courses/signin/css/Signinstatistics.css new file mode 100644 index 000000000..25760394f --- /dev/null +++ b/public/react/src/modules/courses/signin/css/Signinstatistics.css @@ -0,0 +1,4 @@ +.gutterrowbox{ + width:209px; + height:150px; +} \ No newline at end of file diff --git a/public/react/src/modules/courses/signin/model/Createsignmodel.js b/public/react/src/modules/courses/signin/model/Createsignmodel.js index adc0d09b0..0e640ecaf 100644 --- a/public/react/src/modules/courses/signin/model/Createsignmodel.js +++ b/public/react/src/modules/courses/signin/model/Createsignmodel.js @@ -1,5 +1,5 @@ import React from 'react' -import { Modal , Form, Input, Radio,DatePicker, TimePicker,Select} from 'antd'; +import { Modal , Form, Input, Radio,DatePicker, TimePicker,Select,Button} from 'antd'; const CollectionCreateForm = Form.create({ name: 'form_in_modal' })( @@ -7,31 +7,6 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })( constructor(props){ super(props); this.state = { - index:1, - addGroup:true, - navid:undefined, - sandiantype:undefined, - twosandiantype:undefined, - addCheckboxGroup:[], - Navmodalname:"", - Navmodalnametype:false, - Navmodaltypename:"", - setnavid:"", - NavmodalValue:"", - ModalsType:false, - Modalstopval:"", - loadtype:false, - selectnavid:false, - newselectnavid:undefined, - positiontype:undefined, - toopvisible:false, - toopvisibleindex:undefined, - toopvisibleindexs:undefined, - sandiantypes:undefined, - antIcon:false, - chapterupdate:false, - - successFunc:undefined } } @@ -44,6 +19,21 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })( wrapperCol: { span: 19}, }; + const leftbuton={ + "width":"130px", + "height":"40px", + "border":"1px solid rgba(76,172,255,1)", + "border-radius":"4px", + } + + const rightbuton={ + "width":"130px", + "height":"40px", + "background":"#4CACFF", + "border-radius":"4px", + } + const format = 'HH:mm'; + return ( - {getFieldDecorator('title', { + {getFieldDecorator('name', { rules: [{ required: true, message: 'Please input the title of collection!' }], })()} - {getFieldDecorator('select-multiple')( + {getFieldDecorator('group_ids')( )} + + +
+ + + + + + + + +
+ + + +
:""} + + + ) + } + +} + + + + +const Studentssignmodels = Form.create({ name: 'Studentssignmodel' })(Studentssignmodel); + +export default Studentssignmodels \ No newline at end of file diff --git a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js index 527fda152..101816a9d 100644 --- a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js +++ b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js @@ -2,8 +2,10 @@ import React,{ Component } from "react"; import '../css/signincdi.css'; import { Tabs,Pagination} from 'antd'; import Teaccomponent from '../component/teachercomponent/Teaccomponent'; -import Histeacomponent from '../component/teachercomponent/Histeacomponent'; import Createsignmodel from '../model/Createsignmodel'; +import Studentssignmodels from "../model/Studentssignmodel"; +import Qrcodesignin from "../model/Qrcodesignin"; +import Signinstatistics from "../Signinstatistics/Signinstatistics"; const { TabPane } = Tabs; //在线学习 class Students_signin extends Component{ @@ -40,6 +42,21 @@ class Students_signin extends Component{ visible:true }) } + + + Studentsbottom=()=>{ + this.setState({ + Studentssigntype:true + }) + } + + Qrcodesignintypefun=()=>{ + this.setState({ + Qrcodesignintype:true + }) + } + + paginationonChange = (pageNumber) => { this.setState({ page: pageNumber, @@ -52,11 +69,23 @@ class Students_signin extends Component{ let {page,per_page,count,defaultActiveKey} =this.state return( - +
+ {/*创建实训*/} + + {/*签到*/} + + {/*二维码*/} +
- Content of Tab Pane 3 +
-

this.Createsign()}>创建签到

+

this.Qrcodesignintypefun()}>创建签到