From 1a84ca61fe27bf202db6ade85980c3de919450c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 14 Mar 2020 15:03:09 +0800 Subject: [PATCH 01/22] =?UTF-8?q?=E7=AD=BE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/signin/student/Signindetails.js | 1 + .../src/modules/courses/signin/teacher/Teachers_signin.js | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/signin/student/Signindetails.js b/public/react/src/modules/courses/signin/student/Signindetails.js index b1d497b65..3eec58cad 100644 --- a/public/react/src/modules/courses/signin/student/Signindetails.js +++ b/public/react/src/modules/courses/signin/student/Signindetails.js @@ -72,6 +72,7 @@ class Signindetails extends Component{ {/* 列表+筛选 */}
this.mygetdatas()} defaultActiveKey={this.props.defaultActiveKey} switattendance_id={this.props.switattendance_id} headdata={headdata} 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 10a1a1a43..ae2507887 100644 --- a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js +++ b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js @@ -210,11 +210,9 @@ class Students_signin extends Component{ switchs:bool, switattendance_id:id, }) - // if(bool){ - // var currenturl = window.location.href; - // var newUrl = (currenturl.split("?"))[0]; - // window.history.pushState('','',newUrl+'?type='+2); - // } + if(bool===false){ + this.getsetdatas(); + } } From 0475a12370876822f308d2af20480bf239df1784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 14 Mar 2020 15:36:26 +0800 Subject: [PATCH 02/22] =?UTF-8?q?=E7=AD=BE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/signin/component/Detailss.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/signin/component/Detailss.js b/public/react/src/modules/courses/signin/component/Detailss.js index b5fd1949a..73aefaa00 100644 --- a/public/react/src/modules/courses/signin/component/Detailss.js +++ b/public/react/src/modules/courses/signin/component/Detailss.js @@ -177,7 +177,13 @@ class Detailss extends Component { { defaultActiveKey === "1" ? item && item.mode === "NUMBER" ? - +
+ +
:"" : "" From 7406f2326bded389e37356adb5566c213501a65e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 14 Mar 2020 16:16:55 +0800 Subject: [PATCH 03/22] =?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/exercise/new/NullChildEditor.js | 18 +++-- .../courses/exercise/new/NullEditor.js | 66 ++++++++++++------- .../courses/signin/css/Signinstatistics.css | 14 ++++ .../courses/signin/student/Signedinlist.js | 12 ++-- 4 files changed, 72 insertions(+), 38 deletions(-) diff --git a/public/react/src/modules/courses/exercise/new/NullChildEditor.js b/public/react/src/modules/courses/exercise/new/NullChildEditor.js index 5146f05ec..d2f710e55 100644 --- a/public/react/src/modules/courses/exercise/new/NullChildEditor.js +++ b/public/react/src/modules/courses/exercise/new/NullChildEditor.js @@ -19,11 +19,11 @@ const { Option } = Select; class NullChildEditor extends Component{ constructor(props){ super(props); - + this.state = { } } - + // toMDMode = (that) => { // if (this.mdReactObject) { // let mdReactObject = this.mdReactObject; @@ -41,7 +41,7 @@ class NullChildEditor extends Component{ render() { let { question_title, question_score, question_type, question_choices, standard_answers } = this.state; - let { question_id, index, onAnswerChange, addChildAnswer, toMDMode, exerciseIsPublish, + let { question_id, index, onAnswerChange, addChildAnswer, toMDMode, exerciseIsPublish, answers } = this.props; // marginTop: '18px' return( @@ -57,18 +57,24 @@ class NullChildEditor extends Component{ className={'nullChildEditor'} placeholder={`请输入参考答案${itemIndex == 0 ?'':'(可选)'}`} toMDMode={toMDMode} noStorage={true} - mdID={`answer_${index}${itemIndex}`} height={155} + mdID={`answer_${index}${itemIndex}`} height={155} initValue={item} onChange={(val) => onAnswerChange(index, itemIndex, val)} >
- {!exerciseIsPublish && + {!exerciseIsPublish && {itemIndex != 0 && - this.props.deleteChildAnswer(index, itemIndex)} style={{float: 'right'}} > } + {itemIndex === 0 && + this.props.deleteChildAnswermain(index, itemIndex)} + style={{float: 'right'}} + > + } { addChildAnswer(index)} diff --git a/public/react/src/modules/courses/exercise/new/NullEditor.js b/public/react/src/modules/courses/exercise/new/NullEditor.js index dcb310396..9b5dcf9ef 100644 --- a/public/react/src/modules/courses/exercise/new/NullEditor.js +++ b/public/react/src/modules/courses/exercise/new/NullEditor.js @@ -38,7 +38,7 @@ class NullEditor extends Component{ answers.answer_text.forEach((item, itemIndex) => { _standard_answers[index].push(item) }) - + }) } this.state = { @@ -53,7 +53,7 @@ class NullEditor extends Component{ this.setState({ is_ordered: e.target.checked}) } - + onSave = () => { const {question_title, question_score, question_type, question_choices, standard_answers, is_ordered } = this.state; const { question_id_to_insert_after, question_id } = this.props @@ -78,8 +78,8 @@ class NullEditor extends Component{ this.props.showNotification('分值:必须大于0'); return; } else if(!question_score || intScore == NaN) { this.props.showNotification('分值:不能为空'); return; - } - + } + let isEmpty = false; standard_answers.forEach((answers, index) => { @@ -91,8 +91,8 @@ class NullEditor extends Component{ answerArray[index].answer_text.push(item) if(!item) { this.refs[`nullChildEditor${index}`].showError(itemIndex) - // this.props.showNotification(`请先输入第${index+1}个填空的第${itemIndex+1}参考答案。`); - this.props.showNotification(`答案:不能为空`); + // this.props.showNotification(`请先输入第${index+1}个填空的第${itemIndex+1}参考答案。`); + this.props.showNotification(`答案:不能为空`); isEmpty = true; } }) @@ -122,7 +122,7 @@ class NullEditor extends Component{ "is_ordered":true } }*/ - const Id = this.props.match.params.Id + const Id = this.props.match.params.Id if (question_id) { const editUrl = this.props.getEditQuestionUrl(question_id); axios.put(editUrl, { @@ -146,7 +146,7 @@ class NullEditor extends Component{ }); } else { const url = this.props.getAddQuestionUrl(); - + axios.post(url, { exercise_bank_id: Id, question_title, @@ -165,13 +165,13 @@ class NullEditor extends Component{ .catch(function (error) { console.log(error); }); - } + } } onCancel = () => { this.props.onEditorCancel() } componentDidMount = () => { - + } on_question_score_change = (e) => { this.setState({ question_score: e }) @@ -195,13 +195,13 @@ class NullEditor extends Component{ this.mdReactObject.toShowMode() } }) - + } - + onAnswerChange = (index, itemIndex, val) => { if (this.state.standard_answers[index]) { this.setState( - (prevState) => ({ + (prevState) => ({ standard_answers : update(prevState.standard_answers , {[index]: {$splice: [[itemIndex, 1, val]]}}), }) @@ -217,6 +217,21 @@ class NullEditor extends Component{ ) } + deleteChildAnswermain=(index, childIndex)=>{ + let newstandard_answers=this.state.standard_answers + + this.props.confirm({ + content: `确认要删除这个参考答案吗?`, + onOk: () => { + newstandard_answers.splice(index,1) + this.setState({ + standard_answers:newstandard_answers + }) + + } + }) + } + deleteChildAnswer = (index, childIndex) => { if(!this.state.standard_answers[index][childIndex]) { this.setState( @@ -258,16 +273,16 @@ class NullEditor extends Component{ } this.mdReactObject = that; } - + render() { let { question_title, question_score, question_type, question_choices, standard_answers , is_ordered } = this.state; let { question_id, index, exerciseIsPublish, - // question_title, - // question_type, + // question_title, + // question_type, // question_score, isNew } = this.props; - + // const { getFieldDecorator } = this.props.form; const isAdmin = this.props.isAdmin() @@ -302,17 +317,17 @@ class NullEditor extends Component{ (客观题,由系统自动评分,允许手动调分,请设置标准答案 ;支持最多5个空,每空得分按照本题的总分平均计算)

- this.setState({ question_title: val})} onPlaceholderChange={this.onPlaceholderChange} showNullButton={exerciseIsPublish ? false : true} ref="titleEditor" > - +
{ standard_answers.map((answers, index) => { - return // answer.map((item, itemIndex) => { // return
@@ -346,16 +362,16 @@ class NullEditor extends Component{ 分 - - + + 取消 保存 - +
- +
) } diff --git a/public/react/src/modules/courses/signin/css/Signinstatistics.css b/public/react/src/modules/courses/signin/css/Signinstatistics.css index 627458052..060793bc6 100644 --- a/public/react/src/modules/courses/signin/css/Signinstatistics.css +++ b/public/react/src/modules/courses/signin/css/Signinstatistics.css @@ -150,6 +150,10 @@ color:#FF835C; } +.color909399{ + color:#909399; +} + .color1890FF{ color:#1890FF; } @@ -185,4 +189,14 @@ .sginboxcolorFF835C .ant-select-arrow{ color: #FF835C !important; +} + + + +.sginboxcolor909399 .ant-select-selection--single{ + border:1px solid #909399 !important; +} + +.sginboxcolor909399 .ant-select-arrow{ + color: #909399 !important; } \ 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 f9c3459a6..16e4c3865 100644 --- a/public/react/src/modules/courses/signin/student/Signedinlist.js +++ b/public/react/src/modules/courses/signin/student/Signedinlist.js @@ -23,12 +23,12 @@ class Signedinlist extends Component { {id:undefined,name:"全部状态"}, {id:"NORMAL",name:"正常签到"}, {id:"LEAVE",name:"请 假"}, - {id:"ABSENCE",name:"旷 课"}, + {id:"ABSENCE",name:this.props.defaultActiveKey ==="2"?"旷 课":"未签到"}, ], newstate:[ {id:"NORMAL",name:"正常签到"}, {id:"LEAVE",name:"请 假"}, - {id:"ABSENCE",name:"旷 课"}, + {id:"ABSENCE",name:this.props.defaultActiveKey ==="2"?"旷 课":"未签到"}, ], course_members_count:'--', attendance_count:'--', @@ -36,8 +36,6 @@ class Signedinlist extends Component { } componentDidMount() { - - this.getdatas(this.props&&this.props.switattendance_id,1,[],undefined) // this.getpath() } @@ -161,7 +159,6 @@ class Signedinlist extends Component { } handleChangestate=(value)=>{ let neval - if(!value){ neval=undefined this.setState({ @@ -214,6 +211,7 @@ class Signedinlist extends Component { this.setState({ member_attendances:newmember_attendances }) + this.props.mygetdatas() } }) .catch(function (error) { @@ -264,14 +262,14 @@ class Signedinlist extends Component { + : item && item.mode === "QRCODE" ? @@ -174,20 +181,6 @@ class Detailss extends Component { - { - defaultActiveKey === "1" ? - item && item.mode === "NUMBER" ? -
- -
- :"" - : - "" - }
From 1c3b0473a9064b78329a03e76102d3844ba903e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 14 Mar 2020 22:09:51 +0800 Subject: [PATCH 11/22] =?UTF-8?q?=E7=AD=BE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/signin/component/Detailss.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/public/react/src/modules/courses/signin/component/Detailss.js b/public/react/src/modules/courses/signin/component/Detailss.js index 0ef4fbea5..c53bba4ff 100644 --- a/public/react/src/modules/courses/signin/component/Detailss.js +++ b/public/react/src/modules/courses/signin/component/Detailss.js @@ -181,6 +181,20 @@ class Detailss extends Component { + { + defaultActiveKey === "1" ? + item && item.mode === "NUMBER" ? +
+ +
+ :"" + : + "" + } From b8e9816b2f700448877c15967e026bbc8abf921e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 14 Mar 2020 22:13:37 +0800 Subject: [PATCH 12/22] =?UTF-8?q?=E7=AD=BE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/signin/component/Detailss.js | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/public/react/src/modules/courses/signin/component/Detailss.js b/public/react/src/modules/courses/signin/component/Detailss.js index c53bba4ff..f109db317 100644 --- a/public/react/src/modules/courses/signin/component/Detailss.js +++ b/public/react/src/modules/courses/signin/component/Detailss.js @@ -120,6 +120,7 @@ class Detailss extends Component { defaultActiveKey === "1" ?
{ item && item.mode === "NUMBER" ? @@ -143,7 +144,9 @@ class Detailss extends Component {
@@ -181,20 +184,7 @@ class Detailss extends Component {
- { - defaultActiveKey === "1" ? - item && item.mode === "NUMBER" ? -
- -
- :"" - : - "" - } + From 741d6307537e6510e3b23a665f0dd02c427fb24d Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sat, 14 Mar 2020 22:18:15 +0800 Subject: [PATCH 13/22] =?UTF-8?q?=E6=8C=89name=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/weapps/shixun_search_service.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/services/weapps/shixun_search_service.rb b/app/services/weapps/shixun_search_service.rb index 7e0310542..c45585093 100644 --- a/app/services/weapps/shixun_search_service.rb +++ b/app/services/weapps/shixun_search_service.rb @@ -34,7 +34,8 @@ class Weapps::ShixunSearchService < ApplicationService unless params[:keyword].blank? keyword = params[:keyword].strip shixuns = shixuns.joins(:user). - where("shixuns.name like :keyword", keyword: "%#{keyword}%").distinct + where("concat(lastname, firstname) like :keyword or shixuns.name like :keyword", + keyword: "%#{keyword}%", name: "%#{keyword.split(" ").join("%")}%").distinct end shixuns.order("#{sort_str} #{order_str}") From 327c856463018797ce1beb48e87558dd5109d282 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 14 Mar 2020 22:33:14 +0800 Subject: [PATCH 14/22] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/weapps/shixun_search_service.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/services/weapps/shixun_search_service.rb b/app/services/weapps/shixun_search_service.rb index 448bb1992..e44943b1e 100644 --- a/app/services/weapps/shixun_search_service.rb +++ b/app/services/weapps/shixun_search_service.rb @@ -38,7 +38,14 @@ class Weapps::ShixunSearchService < ApplicationService keyword: "%#{keyword}%", name: "%#{keyword.split(" ").join("%")}%").distinct end - shixuns.order("#{sort_str} #{order_str}") + order = + if sort_str == "wechat_myshixuns_count" + "is_wechat_support desc, myshixuns_count #{order_str}" + else + "#{sort_str} #{order_str}" + end + + shixuns.order(order) end private From f8cf7228a72f04bf8afaac41b65697a15157dd07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 14 Mar 2020 22:33:24 +0800 Subject: [PATCH 15/22] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/signin/css/Signinstatistics.css | 1 + .../src/modules/courses/signin/teacher/Teachers_signin.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/signin/css/Signinstatistics.css b/public/react/src/modules/courses/signin/css/Signinstatistics.css index 060793bc6..388f0ad28 100644 --- a/public/react/src/modules/courses/signin/css/Signinstatistics.css +++ b/public/react/src/modules/courses/signin/css/Signinstatistics.css @@ -103,6 +103,7 @@ text-align: right; margin-right: 20px; line-height: 32px; + height: 32px; } #form_in_modal_group_ids .ant-select-selection{ 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 ae2507887..bce0a4237 100644 --- a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js +++ b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js @@ -353,10 +353,10 @@ class Students_signin extends Component{ { isAdmin===true? - + />:""} : "" From c83bf14b872e82bb1b2b6eb68ca896850fe9dd70 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 14 Mar 2020 22:37:18 +0800 Subject: [PATCH 16/22] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/weapps/shixun_lists/index.json.jbuilder | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/weapps/shixun_lists/index.json.jbuilder b/app/views/weapps/shixun_lists/index.json.jbuilder index fac238f45..10b66fdfa 100644 --- a/app/views/weapps/shixun_lists/index.json.jbuilder +++ b/app/views/weapps/shixun_lists/index.json.jbuilder @@ -5,5 +5,6 @@ json.shixun_list @results do |obj| json.study_count obj.myshixuns_count json.author_name obj.user.real_name json.author_img url_to_avatar(obj.user) + json.pic url_to_avatar(obj) end json.shixuns_count @total_count \ No newline at end of file From 1c714de914757eeaa51d1f4a22388d06ba0c5c9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 14 Mar 2020 23:42:48 +0800 Subject: [PATCH 17/22] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Signinstatistics/Signinstatistics.js | 21 ++++++++++++------- .../courses/signin/css/Signinstatistics.css | 8 +++++-- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js index ca7ecace4..ca3e0286a 100644 --- a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js +++ b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js @@ -38,19 +38,23 @@ class Signinstatistics extends Component { if(response.data.history_attendances.length>0){ response.data.history_attendances.map((item,key)=>{ newlists.push({ - month: item.index, + // month: item.index, + // month: item.name+" "+item.attendance_date+" "+item.start_time+"-"+item.end_time, + month:item.name, city:"到课率", - temperature: (item.normal_rate).toFixed(0) + temperature: (item.normal_rate*100).toFixed(0) }) newlists.push({ - month: item.index, + //month: item.index, + month:item.name, city: "旷课率", - temperature: (item.absence_rate).toFixed(0) + temperature: (item.absence_rate*100).toFixed(0) }) newlists.push({ - month: item.index, + //month: item.index, + month:item.name, city: "请假率", - temperature: (item.leave_rate).toFixed(0) + temperature: (item.leave_rate*100).toFixed(0) }) }) } @@ -101,8 +105,9 @@ class Signinstatistics extends Component { let {datas,newlist,course_groups,spal}=this.state; const cols = { - month: { - range: [0, 1] + temperature: { + type: 'log', + base: 10 } }; diff --git a/public/react/src/modules/courses/signin/css/Signinstatistics.css b/public/react/src/modules/courses/signin/css/Signinstatistics.css index 388f0ad28..f179e80af 100644 --- a/public/react/src/modules/courses/signin/css/Signinstatistics.css +++ b/public/react/src/modules/courses/signin/css/Signinstatistics.css @@ -102,8 +102,12 @@ color: rgba(153,153,153,1); text-align: right; margin-right: 20px; - line-height: 32px; - height: 32px; + line-height: 32px !important; + height: 32px !important; +} +.ant-select-selection--single .ant-select-selection__rendered{ + line-height: 32px !important; + height: 32px !important; } #form_in_modal_group_ids .ant-select-selection{ From e64cdf148d7f4c209e8bbbc4bfb8bd27b2196ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 14 Mar 2020 23:59:28 +0800 Subject: [PATCH 18/22] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/signin/Signinstatistics/Signinstatistics.js | 2 +- .../react/src/modules/courses/signin/css/Signinstatistics.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js index ca3e0286a..9eedb8e3e 100644 --- a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js +++ b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js @@ -195,7 +195,7 @@ class Signinstatistics extends Component { 显示最近十次签到 - this.handleChange(e)} style={{width:"130px"}} className={"Signinstatisticsfontselect"}> {course_groups&&course_groups.map((item,key)=>{ return( diff --git a/public/react/src/modules/courses/signin/css/Signinstatistics.css b/public/react/src/modules/courses/signin/css/Signinstatistics.css index f179e80af..298ef9403 100644 --- a/public/react/src/modules/courses/signin/css/Signinstatistics.css +++ b/public/react/src/modules/courses/signin/css/Signinstatistics.css @@ -105,7 +105,7 @@ line-height: 32px !important; height: 32px !important; } -.ant-select-selection--single .ant-select-selection__rendered{ +.Signinstatisticsfontselect .ant-select-selection--single .ant-select-selection__rendered{ line-height: 32px !important; height: 32px !important; } From 70807c84191a47ac814f9c10d1aff6fac1f106b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sun, 15 Mar 2020 00:24:22 +0800 Subject: [PATCH 19/22] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Signinstatistics/Signinstatistics.js | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js index 9eedb8e3e..a19eb05c8 100644 --- a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js +++ b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js @@ -38,21 +38,23 @@ class Signinstatistics extends Component { if(response.data.history_attendances.length>0){ response.data.history_attendances.map((item,key)=>{ newlists.push({ - // month: item.index, - // month: item.name+" "+item.attendance_date+" "+item.start_time+"-"+item.end_time, - month:item.name, + month: item.index, + name: item.name+" "+item.attendance_date+" "+item.start_time+"-"+item.end_time, + // month:item.name, city:"到课率", temperature: (item.normal_rate*100).toFixed(0) }) newlists.push({ - //month: item.index, - month:item.name, + month: item.index, + name: item.name+" "+item.attendance_date+" "+item.start_time+"-"+item.end_time, + // month:item.name, city: "旷课率", temperature: (item.absence_rate*100).toFixed(0) }) newlists.push({ - //month: item.index, - month:item.name, + month: item.index, + name: item.name+" "+item.attendance_date+" "+item.start_time+"-"+item.end_time, + // month:item.name, city: "请假率", temperature: (item.leave_rate*100).toFixed(0) }) @@ -105,6 +107,9 @@ class Signinstatistics extends Component { let {datas,newlist,course_groups,spal}=this.state; const cols = { + month:{ + range: [0, 1] + }, temperature: { type: 'log', base: 10 @@ -229,6 +234,14 @@ class Signinstatistics extends Component { // color={"city"} shape={"smooth"} color={["city", ["#26C7C9", "#FF835C","#EDBA6F"]]} + tooltip={['name*temperature*city', (name, temperature,city) => { + return { + //自定义 tooltip 上显示的 title 显示内容等。 + name: city, + title: name, + value: temperature+"%" + }; + }]} /> { + // return { + // //自定义 tooltip 上显示的 title 显示内容等。 + // name: 'sold1', + // title: 'dddd' + month, + // value: temperature + // }; + // }]} /> From 9451a751f722f34c90c63ae7d7e8d757753c5ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sun, 15 Mar 2020 00:31:14 +0800 Subject: [PATCH 20/22] =?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/signin/Signinstatistics/Signinstatistics.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js index a19eb05c8..d01bccbf1 100644 --- a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js +++ b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js @@ -107,9 +107,6 @@ class Signinstatistics extends Component { let {datas,newlist,course_groups,spal}=this.state; const cols = { - month:{ - range: [0, 1] - }, temperature: { type: 'log', base: 10 From d030cbe859b341c8a701df9a9dc183c987b712bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sun, 15 Mar 2020 00:48:39 +0800 Subject: [PATCH 21/22] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../signin/Signinstatistics/Signinstatistics.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js index d01bccbf1..b761cf249 100644 --- a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js +++ b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js @@ -107,9 +107,17 @@ class Signinstatistics extends Component { let {datas,newlist,course_groups,spal}=this.state; const cols = { - temperature: { - type: 'log', - base: 10 + month: { + type: 'linear', + nice:[1,10], + min:1, + minLimit:1, + minTickInterval:2 + }, + temperature:{ + type: 'linear', + nice:[0,100], + minTickInterval:2 } }; From 39e07457277e130f15fd70af088d223e33e22acb Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sun, 15 Mar 2020 01:27:22 +0800 Subject: [PATCH 22/22] =?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 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/student_join_attendance_record_job.rb b/app/jobs/student_join_attendance_record_job.rb index 32807bbec..ecc0b46a9 100644 --- a/app/jobs/student_join_attendance_record_job.rb +++ b/app/jobs/student_join_attendance_record_job.rb @@ -11,7 +11,7 @@ class StudentJoinAttendanceRecordJob < ApplicationJob group_ids = member.course_group_id == 0 ? [0] : [member.course_group_id, 0] current_attendance_ids = course.course_attendances.joins(:course_attendance_groups).where(course_attendance_groups: {course_group_id: group_ids}). - where("(attendance_date = '#{current_date}' and start_time <= '#{current_end_time}' and end_time > '#{current_end_time}') or (attendance_date > '#{current_date}')").pluck(:id) + where("(attendance_date = '#{current_date}' and end_time > '#{current_end_time}') or (attendance_date > '#{current_date}')").pluck(:id) all_group_attendance_ids = course.course_attendances.joins(:course_attendance_groups).where(course_attendance_groups: {course_group_id: 0}).pluck(:id) member.course_member_attendances.where.not(course_attendance_id: all_group_attendance_ids+current_attendance_ids).delete_all