From 97af74222e42d310a8030a61939990ad0eae436d Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 16 Mar 2020 17:50:54 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/jobs/student_join_attendance_record_job.rb | 2 +- app/models/course_member.rb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/jobs/student_join_attendance_record_job.rb b/app/jobs/student_join_attendance_record_job.rb index ecc0b46a9..8840ae142 100644 --- a/app/jobs/student_join_attendance_record_job.rb +++ b/app/jobs/student_join_attendance_record_job.rb @@ -4,7 +4,7 @@ class StudentJoinAttendanceRecordJob < ApplicationJob def perform(member_id) member = CourseMember.find_by(id: member_id) course = member&.course - return if member.blank? || course.blank? + return if member.blank? || member.role != "STUDENT" || course.blank? current_date = Date.current current_end_time = Time.current.strftime("%H:%M:%S") diff --git a/app/models/course_member.rb b/app/models/course_member.rb index 21221e7e9..0a0433f6f 100644 --- a/app/models/course_member.rb +++ b/app/models/course_member.rb @@ -165,7 +165,9 @@ class CourseMember < ApplicationRecord private def create_attendance_record - StudentJoinAttendanceRecordJob.perform_later(id) + if role == "STUDENT" + StudentJoinAttendanceRecordJob.perform_later(id) + end end end From 7c357ff22041681cde5f138cf60197cf1cdc47c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 16 Mar 2020 18:12:07 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/signin/css/signincdi.css | 6 + .../videostatistics/Videostatistics.js | 54 ++++---- .../component/Videostatisticscomtwo.js | 118 ++++++++++++++++++ .../component/Videostatisticslist.js | 2 +- 4 files changed, 157 insertions(+), 23 deletions(-) create mode 100644 public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js diff --git a/public/react/src/modules/courses/signin/css/signincdi.css b/public/react/src/modules/courses/signin/css/signincdi.css index 5fe6a87cb..867dff40d 100644 --- a/public/react/src/modules/courses/signin/css/signincdi.css +++ b/public/react/src/modules/courses/signin/css/signincdi.css @@ -403,3 +403,9 @@ cursor: default; } +.font-14{ + font-size: 14px !important; +} +.mr32{ + margin-right: 32px; +} diff --git a/public/react/src/modules/courses/videostatistics/Videostatistics.js b/public/react/src/modules/courses/videostatistics/Videostatistics.js index 93c9f57e6..0ea61c528 100644 --- a/public/react/src/modules/courses/videostatistics/Videostatistics.js +++ b/public/react/src/modules/courses/videostatistics/Videostatistics.js @@ -3,6 +3,7 @@ import axios from 'axios'; import '../signin/css/signincdi.css'; import Videostatisticscom from './component/Videostatisticscom'; import Videostatisticslist from './component/Videostatisticslist'; +import Videostatisticscomtwo from './component/Videostatisticscomtwo'; //在线学习 @@ -11,6 +12,8 @@ class Videostatistics extends Component{ super(props); this.state={ watch_staticsdata:[], + tisticsbool:true, + tisid:0, } @@ -40,41 +43,48 @@ class Videostatistics extends Component{ }); } - + tisticsbools=(bool,id)=>{ + this.setState({ + tisticsbool:bool, + tisid:id, + }) + } render(){ - let {watch_staticsdata}= this.state; + let {watch_staticsdata,tisticsbool}= this.state; return(
-
-
-

this.props.statisticsy(false)}> - -

返回

-

- -
- - - + { + tisticsbool===false? +
+
+

this.props.statisticsy(false)}> + +

返回

+

-
- this.details()}> +
+ +
+ this.tisticsbools(b,id)}> +
+
+ : + this.tisticsbools(b,id)}> + } -
-
) diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js new file mode 100644 index 000000000..45180e1f7 --- /dev/null +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js @@ -0,0 +1,118 @@ +import React, {Component} from "react"; +import '../../signin/css/signincdi.css'; +import {Pagination,Table} from 'antd'; +import {getImageUrl} from 'educoder'; +import axios from 'axios'; +import LoadingSpin from "../../../../common/LoadingSpin"; +import NoneDatas from "../../signin/component/NoneDatas"; + + + +//条目 +class Videostatisticscom extends Component { + //条目组件 + constructor(props) { + super(props); + + this.state = { + data:[], + page:1, + limit:10, + members_count:0, + columnsstu:[], + loading:false, + } + } + + componentDidMount() { + + } + + componentDidUpdate = (prevProps) => { + + + } + + + paginationonChange = (pageNumber) => { + this.setState({ + page: pageNumber, + }) + } + + render() { + let {loading,data,page,limit,members_count,columnsstu}=this.state + return ( + +
+
+
+
视频名称视频名称…
+
+
this.props.tisticsbools(false,null)}> + 视频统计总览 +
+
+ 分班 +
+
+
+ + + + { + loading===true? +
+ +
+ : +
+ { + data.length===0? +
+ +
+ : + + } + + + + } + + + + +
+ { + data&&data.length>0? + + :"" + } + +
+ + + + ) + } +} + +export default Videostatisticscom; diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js index 692958517..6448c5996 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js @@ -78,7 +78,7 @@ class Videostatisticslist extends Component { className: 'font-14', width: '90px', render: (text, record) => ( - this.props.details()}>详情 + this.props.tisticsbools(true,record.id)}>详情 ), } ], From b6cf167b1d96ebe2f35be056169734d42f467551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 16 Mar 2020 18:51:48 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../videostatistics/Videostatistics.js | 5 +- .../component/Videostatisticscomtwo.js | 185 +++++++++++++++++- .../component/Videostatisticslist.js | 2 +- 3 files changed, 187 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/videostatistics/Videostatistics.js b/public/react/src/modules/courses/videostatistics/Videostatistics.js index 0ea61c528..8d88492b1 100644 --- a/public/react/src/modules/courses/videostatistics/Videostatistics.js +++ b/public/react/src/modules/courses/videostatistics/Videostatistics.js @@ -52,7 +52,8 @@ class Videostatistics extends Component{ render(){ - let {watch_staticsdata,tisticsbool}= this.state; + let {watch_staticsdata,tisticsbool,tisid}= this.state; + return(
@@ -82,7 +83,7 @@ class Videostatistics extends Component{
: - this.tisticsbools(b,id)}> + this.tisticsbools(b,id)}> } diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js index 45180e1f7..d6b9a4fcb 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js @@ -19,13 +19,110 @@ class Videostatisticscom extends Component { page:1, limit:10, members_count:0, - columnsstu:[], + columnsstu: [ + { + title: '序号', + dataIndex: 'number', + key: 'number', + align: "center", + className: 'font-14', + width: '50px', + render: (text, record) => ( + {record.number} + ), + }, + { + title: '用户', + dataIndex: 'user_name', + key: 'user_name', + align: "center", + className: 'font-14 maxnamewidth100s', + width: '100px', + render: (text, record) => ( + {record.user_name} + ), + }, + { + title: '视频是否看完', + dataIndex: 'is_finished', + key: 'is_finished', + align: "center", + className: 'font-14', + width: '98px', + render: (text, record) => ( + {record.is_finished} + ), + }, + { + title: '视频累计观看时长', + dataIndex: 'total_duration', + key: 'total_duration', + align: "center", + className: 'font-14 maxnamewidth150s', + width: '150px', + render: (text, record) => ( + {record.total_duration} + ), + }, + { + title: '累计观看次数(次)', + dataIndex: 'feq', + key: 'feq', + align: "center", + className: 'font-14 maxnamewidth100s', + width: '100px', + render: (text, record) => ( + {record.feq} + ), + }, + { + title: '最早观看时间', + dataIndex: 'start_at', + key: 'start_at', + align: "center", + className: 'font-14 maxnamewidth100s', + width: '100px', + render: (text, record) => ( + {record.start_at} + ), + }, + { + title: '最后观看时间', + dataIndex: 'end_at', + key: 'end_at', + align: "center", + className: 'font-14 maxnamewidth100s', + width: '100px', + render: (text, record) => ( + {record.end_at} + ), + } + ], loading:false, + order:undefined, + course_groups:[], } } componentDidMount() { + if(this.props.isAdmin()){ + //老师 + const CourseId=this.props.match.params.coursesId; + var data={ + id:CourseId, + page:this.state.page, + } + this.getdatas(data); + + }else{ + //学生 + var data={ + page:this.state.page, + } + this.getdatas(data); + } + this.fenbans(); } componentDidUpdate = (prevProps) => { @@ -33,6 +130,88 @@ class Videostatisticscom extends Component { } + //分班 + fenbans=()=>{ + const CourseId=this.props.match.params.coursesId; + let url=`/courses/${CourseId}/course_groups.json`; + axios.get(url).then((response) => { + if(response){ + console.log("分班"); + console.log("response"); + console.log(response); + this.setState({ + course_groups:response.data.course_groups, + current_group_id:response.data.current_group_id, + none_group_member_count:response.data.none_group_member_count, + group_count:response.data.group_count, + }) + } + + }).catch((error) => { + + }); + } + + //学生 + getdatas=(data)=>{ + this.setState({ + loading:true + }) + const CourseId=this.props.match.params.coursesId; + let url=""; + if(this.props.isAdmin()){ + url=`/course_videos/${this.props.tisid}/watch_histories.json`; + }else { + url=`/courses/${CourseId}/own_watch_histories.json`; + } + axios.get(url,{params:data}).then((response) => { + if(response){ + if(response.data){ + if(response.data.data.length>0){ + let datalists=[]; + for (var i = 0; i < response.data.data.length; i++) { + datalists.push({ + number: (parseInt(page) - 1) * parseInt(limit) + (i + 1), + user_name:response.data.data[i].user_name, + is_finished:response.data.data[i].is_finished, + total_duration:response.data.data[i].total_duration, + feq:response.data.data[i].feq, + start_at:response.data.data[i].start_at, + end_at:response.data.data[i].end_at, + }) + } + + this.setState({ + data:datalists, + members_count:response.data.count, + }) + }else{ + this.setState({ + data:[], + members_count:response.data.count, + }) + } + }else{ + this.setState({ + data:[], + members_count:response.data.count, + }) + } + + + + } + this.setState({ + loading:false + }) + }).catch((error) => { + this.setState({ + loading:false + }) + }); + } + + paginationonChange = (pageNumber) => { this.setState({ @@ -41,7 +220,9 @@ class Videostatisticscom extends Component { } render() { - let {loading,data,page,limit,members_count,columnsstu}=this.state + let {loading,data,page,limit,members_count,columnsstu}=this.state; + const isAdmin =this.props.isAdmin(); + return (
diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js index 6448c5996..3ec3af0fa 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js @@ -120,7 +120,7 @@ class Videostatisticslist extends Component { if(response){ this.setState({ data:response.data&&response.data.videos?response.data.videos:[], - members_count:count, + members_count:response.data.count, }) } From 2c793948a381a66e4a0b2b8e5630fdf8ff28cc0f Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 16 Mar 2020 19:17:17 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E8=AF=BE=E5=A0=82=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 6 +++--- app/views/courses/index.json.jbuilder | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d1d2499f0..88ed373d9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -140,11 +140,11 @@ module ApplicationHelper # 用户图像url,如果不存在的话,source为匿名用户,即默认使用匿名用户图像 def url_to_avatar(source) if File.exist?(disk_filename(source&.class, source&.id)) - ctime = File.ctime(disk_filename(source.class, source.id)).to_i + ctime = File.ctime(disk_filename(source&.class, source&.id)).to_i if source.class.to_s == 'User' - File.join(relative_path, ["#{source.class}", "#{source.id}"]) + "?t=#{ctime}" + File.join(relative_path, ["#{source&.class}", "#{source&.id}"]) + "?t=#{ctime}" else - File.join("images/avatars", ["#{source.class}", "#{source.id}"]) + "?t=#{ctime}" + File.join("images/avatars", ["#{source&.class}", "#{source&.id}"]) + "?t=#{ctime}" end elsif source.class.to_s == 'User' str = source.user_extension.try(:gender).to_i == 0 ? "b" : "g" diff --git a/app/views/courses/index.json.jbuilder b/app/views/courses/index.json.jbuilder index 8a0d06475..f9bceebb8 100644 --- a/app/views/courses/index.json.jbuilder +++ b/app/views/courses/index.json.jbuilder @@ -2,7 +2,7 @@ json.courses @courses do |course| json.id course.id json.name course.name json.avatar_url url_to_avatar(course.teacher) - json.creator course.teacher.real_name + json.creator course.teacher&.real_name json.school course.school&.name json.technical_title "" # course.teacher.identity json.course_members_count course.course_members_count From e0726db96a4c163082cbd32da714f33f2fdedcec Mon Sep 17 00:00:00 2001 From: harry Date: Mon, 16 Mar 2020 19:26:18 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/Video/video-play/index.jsx | 3 +++ .../tpm/shixuns/shixun-search-bar/A.jsx | 2 +- .../tpm/shixuns/shixun-search-bar/index.jsx | 24 ++++++++++++------- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/courses/Video/video-play/index.jsx b/public/react/src/modules/courses/Video/video-play/index.jsx index 8c3a2eb20..e33439dcf 100644 --- a/public/react/src/modules/courses/Video/video-play/index.jsx +++ b/public/react/src/modules/courses/Video/video-play/index.jsx @@ -177,6 +177,9 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => { el.current.removeEventListener('seeking', onSeeking) el.current.removeEventListener('seeked', onSeeked) el.current.removeEventListener('timeupdate', onTimeupdate) + if(el.current.playing) { + log() + } } }, [el, src]) diff --git a/public/react/src/modules/tpm/shixuns/shixun-search-bar/A.jsx b/public/react/src/modules/tpm/shixuns/shixun-search-bar/A.jsx index 7e933462e..4757cfecf 100644 --- a/public/react/src/modules/tpm/shixuns/shixun-search-bar/A.jsx +++ b/public/react/src/modules/tpm/shixuns/shixun-search-bar/A.jsx @@ -6,6 +6,6 @@ export default ({ callback(id) } return ( - {text} + {text} ) } \ No newline at end of file diff --git a/public/react/src/modules/tpm/shixuns/shixun-search-bar/index.jsx b/public/react/src/modules/tpm/shixuns/shixun-search-bar/index.jsx index c58ae81aa..0430149a7 100644 --- a/public/react/src/modules/tpm/shixuns/shixun-search-bar/index.jsx +++ b/public/react/src/modules/tpm/shixuns/shixun-search-bar/index.jsx @@ -12,13 +12,13 @@ const DiffObject = [ { id: 3, text: '中高级' }, { id: 4, text: '高级' } ] -export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => { +export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist,parsedid,newpalce }) => { const [data, setData] = useState({ diff: 0, - searchValue: 'a', + searchValue: newpalce || 'a', navs: [], searchKey: '', - childValue: '' + childValue:parsedid }) const { diff, searchValue, navs, childValue, searchKey } = data function diffSearch(diff) { @@ -28,6 +28,15 @@ export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => { }) StatusEnquiry([{ 'type': 2 }, { 'value': diff }]) } + useEffect(() => { + setData({ + ...data, + searchValue: newpalce || 'a', + childValue: parsedid + }) + },[ + newpalce,navs,parsedid + ]) function onSearchAll() { if (searchValue !== 'a') { setData({ ...data, searchValue: 'a', childValue: '' }) @@ -61,12 +70,12 @@ export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => { function overlayMenu(item, id) { return { - item.map((list, k) => -
+ item.map((list, k) => +
{list.name}
{ - list.tags.map((tag, e) => {tag.name} + list.tags.map((tag, e) => {tag.name} ) }
@@ -84,7 +93,6 @@ export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => { } init() }, []) - // item.id < 4 ? "bottomRight" : item.id >= 8 ? "bottomLeft" : "bottomCenter" return (
@@ -111,7 +119,7 @@ export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => {
筛选:
- {DiffObject.map(item => )} + {DiffObject.map(item => )}
From 499c26050a69691eb94a0c913784a0ff579cd6e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 16 Mar 2020 19:39:06 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/signin/css/signincdi.css | 9 + .../component/Videostatisticscomtwo.js | 195 +++++++++++++++++- 2 files changed, 198 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/courses/signin/css/signincdi.css b/public/react/src/modules/courses/signin/css/signincdi.css index 867dff40d..b712aa94d 100644 --- a/public/react/src/modules/courses/signin/css/signincdi.css +++ b/public/react/src/modules/courses/signin/css/signincdi.css @@ -394,6 +394,15 @@ white-space:nowrap; cursor: default; } +.maxnamewidth200s{ + text-align: center; + width: 200px; + max-width:200px; + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap; + cursor: default; +} .maxnamewidth100s{ width: 100px; max-width: 100px; diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js index d6b9a4fcb..4432f36c5 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js @@ -1,7 +1,7 @@ import React, {Component} from "react"; import '../../signin/css/signincdi.css'; -import {Pagination,Table} from 'antd'; -import {getImageUrl} from 'educoder'; +import {Pagination,Table, Menu, Dropdown} from 'antd'; +import {getImageUrl,sortDirections} from 'educoder'; import axios from 'axios'; import LoadingSpin from "../../../../common/LoadingSpin"; import NoneDatas from "../../signin/component/NoneDatas"; @@ -60,6 +60,8 @@ class Videostatisticscom extends Component { align: "center", className: 'font-14 maxnamewidth150s', width: '150px', + sorter: true, + sortDirections: sortDirections, render: (text, record) => ( {record.total_duration} ), @@ -71,6 +73,8 @@ class Videostatisticscom extends Component { align: "center", className: 'font-14 maxnamewidth100s', width: '100px', + sorter: true, + sortDirections: sortDirections, render: (text, record) => ( {record.feq} ), @@ -101,10 +105,15 @@ class Videostatisticscom extends Component { loading:false, order:undefined, course_groups:[], + fbbool:false, + groupsid:null, } } componentDidMount() { + this.setState({ + order:undefined + }) if(this.props.isAdmin()){ //老师 const CourseId=this.props.match.params.coursesId; @@ -218,11 +227,170 @@ class Videostatisticscom extends Component { page: pageNumber, }) } + fenbanone=()=>{ + if(this.state.fbbool===false){ + this.setState({ + fbbool:true + }) + }else{ + this.setState({ + fbbool:false + }) + } + } + setcourse_groups=(id)=>{ + this.setState({ + groupsid:id + }) +//老师 + const CourseId=this.props.match.params.coursesId; + + var data={}; + if(id){ + data={ + id:CourseId, + page:this.state.page, + group_id:id + } + + }else { + data={ + id:CourseId, + page:this.state.page + } + } + this.getdatas(data); + } + + //实训作业tbale 列表塞选数据 + table1handleChange = (pagination, filters, sorter) => { + if (JSON.stringify(sorter) === "{}") { + //没有选择 + } else { + try { + //学生学号排序 + if (sorter.columnKey === "total_duration"||sorter.columnKey === "feq") { + let mysorder=""; + if (sorter.order === "ascend") { + if(sorter.columnKey === "total_duration"){ + mysorder="total_duration-asc"; + }else{ + mysorder="freq-asc"; + + } + //升序 + let data={} + if(this.props.isAdmin()){ + //老师 + const CourseId=this.props.match.params.coursesId; + if(groupsid){ + data={ + id:CourseId, + page:this.state.page, + order:mysorder, + } + }else{ + data={ + id:CourseId, + page:this.state.page, + group_id:this.state.groupsid, + order:mysorder, + } + } + }else{ + //学生 + data={ + page:this.state.page, + order:mysorder, + } + } + + this.getdatas(data); + this.setState({ + order: mysorder, + }) + } else if (sorter.order === "descend") { + if(sorter.columnKey === "total_duration"){ + mysorder="total_duration-desc"; + + }else{ + mysorder="freq-desc"; + + } + //降序 + let data={} + if(this.props.isAdmin()){ + //老师 + const CourseId=this.props.match.params.coursesId; + if(groupsid){ + data={ + id:CourseId, + page:this.state.page, + order:mysorder, + } + }else{ + data={ + id:CourseId, + page:this.state.page, + group_id:this.state.groupsid, + order:mysorder, + } + } + }else{ + //学生 + data={ + page:this.state.page, + order:mysorder, + } + } + + this.getdatas(data); + this.setState({ + order:mysorder, + }) + + + } + } + } catch (e) { + + } + + } + + } + + render() { - let {loading,data,page,limit,members_count,columnsstu}=this.state; + let {loading,data,page,limit,members_count,columnsstu,fbbool,course_groups}=this.state; const isAdmin =this.props.isAdmin(); + const menu = ( + + + this.setcourse_groups(null)}> +

全部

+
+ + { + course_groups&&course_groups.length>0? + ( + course_groups.map((item,key) => { + return ( + + this.setcourse_groups(item.id)} key={key}> +

{item.name}

+
+
+ ) + }) + ) + : + "" + } +
+ ); return (
@@ -236,8 +404,18 @@ class Videostatisticscom extends Component {
this.props.tisticsbools(false,null)}> 视频统计总览
-
- 分班 +
this.fenbanone()}> + trigger.parentNode} overlay={menu} placement="bottomCenter" > + + 分班 + { + fbbool===true? + + : + + } + +
@@ -269,7 +447,12 @@ class Videostatisticscom extends Component {
: -
+
} From 1be3767471e635b090f0513e35c1bed095a1d4aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 16 Mar 2020 19:40:47 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/signin/component/Detailss.js | 2 +- .../courses/signin/component/Teacherentry.js | 2 +- .../courses/signin/css/Signinstatistics.css | 22 ++++++++++++++++++- .../modules/courses/signin/css/signincdi.css | 6 +++++ .../courses/signin/student/Signedinlist.js | 12 +++++++++- .../courses/signin/student/Signindetails.js | 9 +++----- 6 files changed, 43 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/signin/component/Detailss.js b/public/react/src/modules/courses/signin/component/Detailss.js index d205ffdcb..c1f43e0cf 100644 --- a/public/react/src/modules/courses/signin/component/Detailss.js +++ b/public/react/src/modules/courses/signin/component/Detailss.js @@ -77,7 +77,7 @@ class Detailss extends Component {
- 已签到{item && item.normal_count ? item.normal_count : 0} / + 已签到 {item && item.normal_count ? item.normal_count : 0} / 应签到 {item && item.all_count ? item.all_count : 0}
diff --git a/public/react/src/modules/courses/signin/component/Teacherentry.js b/public/react/src/modules/courses/signin/component/Teacherentry.js index 593bd4a50..ff08fe126 100644 --- a/public/react/src/modules/courses/signin/component/Teacherentry.js +++ b/public/react/src/modules/courses/signin/component/Teacherentry.js @@ -51,7 +51,7 @@ class Teacherentry extends Component {
- 已签到{item.normal_count ? item.normal_count : 0} / 应签到 {item.all_count ? item.all_count : 0} + 已签到 {item.normal_count ? item.normal_count : 0} / 应签到 {item.all_count ? item.all_count : 0}
diff --git a/public/react/src/modules/courses/signin/css/Signinstatistics.css b/public/react/src/modules/courses/signin/css/Signinstatistics.css index ddcda4cd1..c7ff88c9f 100644 --- a/public/react/src/modules/courses/signin/css/Signinstatistics.css +++ b/public/react/src/modules/courses/signin/css/Signinstatistics.css @@ -210,4 +210,24 @@ height: auto !important; padding: 0px !important; white-space: nowrap !important; -} \ No newline at end of file +} + +.color26C7C9 .ant-select-selection-selected-value{ + margin: 0 30% !important; +} + +.colorEAAE4E .ant-select-selection-selected-value{ + margin: 0 40% !important; +} + +.color909399 .ant-select-selection-selected-value{ + margin: 0 37% !important; +} + +.colorFF835C .ant-select-selection-selected-value{ + margin: 0 37% !important; +} + +/*.allSignedinlistbox .ant-select-selection-selected-value{*/ +/* margin: 0 30% !important;*/ +/*}*/ \ No newline at end of file diff --git a/public/react/src/modules/courses/signin/css/signincdi.css b/public/react/src/modules/courses/signin/css/signincdi.css index 09379ff4c..f6f1db061 100644 --- a/public/react/src/modules/courses/signin/css/signincdi.css +++ b/public/react/src/modules/courses/signin/css/signincdi.css @@ -352,3 +352,9 @@ color:rgba(153,153,153,1); } + +.colorbluesigin{ + font-size:16px; + font-weight:bold; + color:rgba(51,51,51,1); +} \ No newline at end of file diff --git a/public/react/src/modules/courses/signin/student/Signedinlist.js b/public/react/src/modules/courses/signin/student/Signedinlist.js index 5885e8a67..ea5ffb998 100644 --- a/public/react/src/modules/courses/signin/student/Signedinlist.js +++ b/public/react/src/modules/courses/signin/student/Signedinlist.js @@ -260,9 +260,10 @@ class Signedinlist extends Component { className: "textcenter", render: (text, record) => ( +