Merge remote-tracking branch 'origin/master'

dev_forum
杨树明 5 years ago
commit 3b814d98a0

@ -442,12 +442,18 @@ class ApplicationController < ActionController::Base
shixun.shixun_service_configs.each do |config| shixun.shixun_service_configs.each do |config|
mirror = config.mirror_repository mirror = config.mirror_repository
if mirror.name.present? if mirror.name.present?
# 资源限制没有就传默认值。
cpu_limit = config.cpu_limit.presence || 1
cpu_request = config.lower_cpu_limit.presence || 0.1
memory_limit = config.memory_limit.presence || 1024
request_limit = config.resource_limit.presence || 10
resource_limit = config.resource_limit.presence || 10000
container << {:image => mirror.name, container << {:image => mirror.name,
:cpuLimit => config.cpu_limit, :cpuLimit => cpu_limit,
:cpuRequest => config.lower_cpu_limit, :cpuRequest => cpu_request,
:memoryLimit => "#{config.memory_limit}M", :memoryLimit => "#{memory_limit}M",
:memoryRequest => "#{config.request_limit}M", :memoryRequest => "#{request_limit}M",
:resourceLimit => "#{config.resource_limit}K", :resourceLimit => "#{resource_limit}K",
:type => mirror.try(:main_type) == "1" ? "main" : "sub"} :type => mirror.try(:main_type) == "1" ? "main" : "sub"}
end end
end end

@ -1,5 +1,5 @@
class EduSettingsController < ApplicationController class EduSettingsController < ApplicationController
# before_action :require_admin before_action :require_admin
before_action :set_edu_setting, only: [:show, :edit, :update, :destroy] before_action :set_edu_setting, only: [:show, :edit, :update, :destroy]
# GET /edu_settings # GET /edu_settings

@ -896,13 +896,31 @@ class PollsController < ApplicationController
def commit_poll def commit_poll
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
begin begin
poll_user_current = @poll.poll_users.find_by_group_ids(current_user.id).first @poll_multi_questions = @poll.poll_questions.where(question_type:2).select(:id,:max_choices,:min_choices,:question_number)
poll_user_params = { error_question = []
:commit_status => 1, @poll_multi_questions.each do |q|
:end_at => Time.now poll_user_votes = current_user.poll_votes.where(poll_question_id:q.id)&.size
} if q.max_choices.present? && (poll_user_votes > q.max_choices)
poll_user_current.update_attributes(poll_user_params) error_messages = "#{q.question_number}题:超过最大选项限制"
normal_status(0, "问卷提交成功!") elsif q.min_choices.present? && (poll_user_votes < q.min_choices)
error_messages = "#{q.question_number}题:不得少于最小选项限制"
else
error_messages = nil
end
error_question.push(error_messages)
end
error_question = error_question.reject(&:blank?)
if error_question.reject(&:blank?).length > 0
normal_status(-1, "#{error_question.join("")}")
else
poll_user_current = @poll.poll_users.find_by_group_ids(current_user.id).first
poll_user_params = {
:commit_status => 1,
:end_at => Time.now
}
poll_user_current.update_attributes(poll_user_params)
normal_status(0, "问卷提交成功!")
end
## 需添加发送消息的接口,稍后添加 ## 需添加发送消息的接口,稍后添加
rescue Exception => e rescue Exception => e
uid_logger_error(e.message) uid_logger_error(e.message)

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

@ -4,7 +4,7 @@ import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import {Input,Pagination,Tooltip} from 'antd'; import {Input,Pagination,Tooltip} from 'antd';
import Loadable from 'react-loadable'; import Loadable from 'react-loadable';
import Loading from '../../Loading'; import Loading from '../../Loading';
import Guide from "../../modules/courses/shixunHomework/Guide";
//业务组件 //业务组件
import CoursesBanner from "./coursesDetail/CoursesBanner"; import CoursesBanner from "./coursesDetail/CoursesBanner";
import Coursesleftnav from "./coursesDetail/CoursesLeftNav"; import Coursesleftnav from "./coursesDetail/CoursesLeftNav";
@ -66,11 +66,19 @@ const GraduationTasks= Loadable({
}) })
class ListPageIndex extends Component{ class ListPageIndex extends Component{
constructor(props) { constructor(props) {
super(props) super(props);
this.state={
yslGuideone:true,
}
} }
componentDidMount(){ componentDidMount(){
var yslGuideone = window.localStorage.getItem('yslGuideone');
console.log("77");
console.log(yslGuideone);
this.setState({
yslGuideone:yslGuideone,
})
} }
// //
// getleftNavid=(navid,newselectnavid)=>{ // getleftNavid=(navid,newselectnavid)=>{
@ -80,13 +88,28 @@ class ListPageIndex extends Component{
// navttype:newselectnavid // navttype:newselectnavid
// }) // })
// } // }
setwindowlocal=(bool)=>{
window.localStorage.setItem('yslGuideone', bool);
this.setState({
yslGuideone:bool,
})
}
render() { render() {
let {yslGuideone} =this.state;
console.log("98");
console.log(yslGuideone);
return ( return (
<div> <div>
<div className="newMain clearfix"> <div className="newMain clearfix">
{/*头部banner*/} {/*头部banner*/}
<CoursesBanner {...this.props}></CoursesBanner> <CoursesBanner {...this.props}></CoursesBanner>
{yslGuideone===null||yslGuideone===undefined||yslGuideone===false?
<Guide
setwindowlocal={(b)=>this.setwindowlocal(b)}
>
</Guide>
:""
}
<div className="educontent clearfix" style={{flex: "1 0 auto"}}> <div className="educontent clearfix" style={{flex: "1 0 auto"}}>

@ -297,6 +297,7 @@ class BoardsNew extends Component{
.courseForm .noBorder { .courseForm .noBorder {
border-bottom: none; border-bottom: none;
} }
`}</style> `}</style>
<div className="edu-class-container edu-position courseForm"> <div className="edu-class-container edu-position courseForm">
<CBreadcrumb items={[ <CBreadcrumb items={[

@ -370,7 +370,7 @@ class NewWork extends Component{
<span>{pageType==="new"?"新建":"编辑"}</span> <span>{pageType==="new"?"新建":"编辑"}</span>
</p> */} </p> */}
<CBreadcrumb items={[ <CBreadcrumb items={[
{ to: current_user.first_category_url, name: this.state.course_name}, { to: current_user && current_user.first_category_url, name: this.state.course_name},
{ to: `/courses/${courseId}/${moduleEngName}/${category && category.category_id ? category.category_id : ''}` { to: `/courses/${courseId}/${moduleEngName}/${category && category.category_id ? category.category_id : ''}`
, name: category && category.category_name }, , name: category && category.category_name },
{ name: `${ this.isEdit ? '编辑' : '新建'}` } { name: `${ this.isEdit ? '编辑' : '新建'}` }
@ -388,7 +388,7 @@ class NewWork extends Component{
</p> </p>
<div> <div>
{/* onSubmit={this.handleSubmit} */} {/* onSubmit={this.handleSubmit} */}
<Form > <Form className="courseForm">
<Form.Item <Form.Item
label="标题" label="标题"
className="AboutInputForm" className="AboutInputForm"

@ -36,6 +36,17 @@ class ModalWrapper extends Component{
className={className || ''} className={className || ''}
keyboard={false} keyboard={false}
> >
{
visible == true ? <style>
{
`
body {
overflow: hidden !important;
}
`
}
</style>:""
}
<div className="newupload_conbox clearfix"> <div className="newupload_conbox clearfix">
{this.props.children} {this.props.children}
{this.props.checkBoxValuestype===true?<div className={"mt10 color-red"}> {this.props.checkBoxValuestype===true?<div className={"mt10 color-red"}>

@ -984,6 +984,26 @@ samp {
line-height: 40px; line-height: 40px;
} }
.courseForm .ant-input-group > .ant-input:first-child, .ant-input-group-addon:first-child {
height: 40px;
}
.courseForm .ant-select-selection, .courseForm .ant-select-selection-selected-value {
height: 40px;
line-height: 40px;
}
.courseForm .ant-input-affix-wrapper .ant-input {
height: 40px;
}
.courseForm .ant-select-auto-complete.ant-select .ant-input {
height: 40px;
}
.courseForm .ant-select-auto-complete.ant-select .ant-select-selection__rendered {
line-height: 40px;
}
.courseForm .ant-select-auto-complete.ant-select .ant-input {
height: 40px;
}
/*新建课堂*/ /*新建课堂*/

@ -93,13 +93,14 @@ class AddStudentModal extends Component{
} }
onSendOk = () => { onSendOk = () => {
this.setState({
isSpin:true
})
if(!this.state.checkBoxValues || this.state.checkBoxValues.length == 0) { if(!this.state.checkBoxValues || this.state.checkBoxValues.length == 0) {
this.props.showNotification('请从列表中先选择用户。') this.props.showNotification('请从列表中先选择用户。')
return; return;
} }
this.setState({
isSpin:true
})
const courseId = this.props.match.params.coursesId const courseId = this.props.match.params.coursesId
const url = `/courses/${courseId}/add_students_by_search.json` const url = `/courses/${courseId}/add_students_by_search.json`
const params = { const params = {
@ -159,7 +160,7 @@ class AddStudentModal extends Component{
title={`添加${moduleName}`} title={`添加${moduleName}`}
{...this.props } {...this.props }
onOk={this.onOk} onOk={this.onOk}
className="addStudentModal" className="addStudentModal courseForm"
> >
<style> <style>
{` {`

@ -196,7 +196,7 @@ class AddTeacherModal extends Component{
title={`添加${moduleName}`} title={`添加${moduleName}`}
{...this.props } {...this.props }
onOk={this.onOk} onOk={this.onOk}
className="addTeacherModal" className="addTeacherModal courseForm"
> >
<AddGraduationGroupModal ref="addGraduationGroupModal" <AddGraduationGroupModal ref="addGraduationGroupModal"
{...this.props} onOk={this.onAddGraduationGroupOk} {...this.props} onOk={this.onAddGraduationGroupOk}

@ -123,7 +123,7 @@ class PollDetailIndex extends Component{
/> />
<div className="educontent mt10 mb50"> <div className="educontent mt10 mb50">
<p className="clearfix mb20"> <p className="clearfix mb20">
<WordsBtn style="grey" className="fl" to={current_user.first_category_url}>{this.props.coursedata.name}</WordsBtn> <WordsBtn style="grey" className="fl" to={current_user && current_user.first_category_url}>{this.props.coursedata.name}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/polls/${user_permission && user_permission.left_banner_id}`}>问卷</WordsBtn> <WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/polls/${user_permission && user_permission.left_banner_id}`}>问卷</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>

@ -66,7 +66,7 @@ class PollDetailTabSecond extends Component{
<span className="font-16 clearfix"> <span className="font-16 clearfix">
<span className="color-blue fl">{parseInt(page-1)*parseInt(limit)+(key+1)}{map[item.question.question_type]}</span> <span className="color-blue fl">{parseInt(page-1)*parseInt(limit)+(key+1)}{map[item.question.question_type]}</span>
{ item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10 mt6">必答</span>:"" } { item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10 mt6">必答</span>:"" }
{ item.question.question_type == 2 ? { item.question.question_type == 2 && item.question.min_choices && item.question.max_choices ?
<span className="color-grey-9"> <span className="color-grey-9">
{ {
item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" : item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" :
@ -127,9 +127,9 @@ class PollDetailTabSecond extends Component{
<span className="color-green">{options.answer_users_count}</span> <span className="color-green">{options.answer_users_count}</span>
<span> <span>
<p className="percentForm fl mr15"> <p className="percentForm fl mr15">
<span className="percentValue" style={{"width":`${parseFloat(options.answer_percent ? options.answer_percent : 0 ).toFixed(2)*100}%`}}></span> <span className="percentValue" style={{"width":`${(options.answer_percent * 100).toFixed(1)}%`}}></span>
</p> </p>
<font className="color-grey-9">{parseFloat(options.answer_percent ? options.answer_percent : 0 ).toFixed(2)*100} %</font> <font className="color-grey-9">{(options.answer_percent * 100).toFixed(1)}%</font>
</span> </span>
</ul> </ul>
{ {

@ -71,7 +71,7 @@ class PollDetailTabThird extends Component{
<p className="pl30 pr30 pt30 pb15 font-16 clearfix"> <p className="pl30 pr30 pt30 pb15 font-16 clearfix">
<span className="color-blue mr8 fl">{item.question.question_number}{map[item.question.question_type]}</span> <span className="color-blue mr8 fl">{item.question.question_number}{map[item.question.question_type]}</span>
{ item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10">必答</span>:<span className="mustAnswer fl ml10 mr10"></span> } { item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10">必答</span>:<span className="mustAnswer fl ml10 mr10"></span> }
{ item.question.question_type == 2 && item.question.min_choices && item.question.max_choice ? { item.question.question_type == 2 && item.question.min_choices && item.question.max_choices ?
<span className="color-grey-9 font-14 fl mt2"> <span className="color-grey-9 font-14 fl mt2">
{ {
item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" : item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" :
@ -89,8 +89,8 @@ class PollDetailTabThird extends Component{
item.question.answers.map((index,k)=>{ item.question.answers.map((index,k)=>{
return( return(
<li className="df"> <li className="df">
<Radio value={index.answer_id}></Radio> <Radio className="fl" value={index.answer_id}></Radio>
<span className={index.answer_text=="其他"?"break_word":"break_word flex1"}>{index.answer_text}</span> <span className={index.answer_text=="其他"?"break-word":"break-word flex1"}>{index.answer_text}</span>
{ {
index.answer_text=="其他" ? <p className="textLine"></p>:"" index.answer_text=="其他" ? <p className="textLine"></p>:""
} }
@ -109,8 +109,8 @@ class PollDetailTabThird extends Component{
item.question.answers.map((index,k)=>{ item.question.answers.map((index,k)=>{
return( return(
<li className="df"> <li className="df">
<Checkbox value={index.answer_id}></Checkbox> <Checkbox className="fl mr8" value={index.answer_id}></Checkbox>
<span className={index.answer_text=="其他"?"break_word":"break_word flex1"}>{index.answer_text}</span> <span className={index.answer_text=="其他"?"break-word":"break-word flex1"}>{index.answer_text}</span>
{ {
index.answer_text=="其他" ? <p className="textLine"></p>:"" index.answer_text=="其他" ? <p className="textLine"></p>:""
} }

@ -135,7 +135,7 @@ class PollInfo extends Component{
postAnswer=(q_id,a_id,text,key)=>{ postAnswer=(q_id,a_id,text,key)=>{
let url=`/poll_questions/${q_id}/poll_votes.json`; let url=`/poll_questions/${q_id}/poll_votes.json`;
console.log(text);
axios.post(url,{ axios.post(url,{
poll_answer_id:a_id, poll_answer_id:a_id,
vote_text:text vote_text:text
@ -207,8 +207,9 @@ class PollInfo extends Component{
}) })
if(text!=undefined){ if(text!=undefined){
url+="vote_text="+text; axios.post((url),{
axios.post(url).then((result)=>{ vote_text:text
}).then((result)=>{
if(result.status==200){ if(result.status==200){
const answer=Object.assign({}, this.state.question_answered[key]); const answer=Object.assign({}, this.state.question_answered[key]);
answer.ques_status=result.data.poll_vote.question_status; answer.ques_status=result.data.poll_vote.question_status;
@ -315,7 +316,7 @@ class PollInfo extends Component{
></Modals> ></Modals>
<div className="educontent mt10 mb50"> <div className="educontent mt10 mb50">
<p className="clearfix mb20"> <p className="clearfix mb20">
<WordsBtn style="grey" className="fl" to={current_user.first_category_url}>{courseName}</WordsBtn> <WordsBtn style="grey" className="fl" to={current_user && current_user.first_category_url}>{courseName}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/polls/${poll && poll.left_banner_id}`}>问卷</WordsBtn> <WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/polls/${poll && poll.left_banner_id}`}>问卷</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
@ -383,7 +384,7 @@ class PollInfo extends Component{
<div className="pl30 pr30 mt30 mb10 clearfix"> <div className="pl30 pr30 mt30 mb10 clearfix">
<span className="color-blue fl font-16">{item.question.question_number}{map[item.question.question_type]}</span> <span className="color-blue fl font-16">{item.question.question_number}{map[item.question.question_type]}</span>
{ item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10 mt5">必答</span>:<span className="mustAnswer fl ml10 mr10 mt5"></span> } { item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10 mt5">必答</span>:<span className="mustAnswer fl ml10 mr10 mt5"></span> }
{ item.question.question_type == 2 && item.question.min_choices && item.question.max_choice ? { item.question.question_type == 2 && item.question.min_choices && item.question.max_choices ?
<span className="color-grey-9 font-14 fl mt2"> <span className="color-grey-9 font-14 fl mt2">
{ {
item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" : item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" :
@ -400,8 +401,9 @@ class PollInfo extends Component{
{ {
item.question.answers && item.question.answers.map((i,k)=>{ item.question.answers && item.question.answers.map((i,k)=>{
return( return(
<li className={i.answer_text=="其他"?"df":""}> <li className={i.answer_text=="其他"?"df clearfix":"clearfix"}>
<Radio name={[item.question.id,key]} className="break-word" value={i.answer_id} >{i.answer_text}</Radio> <Radio name={[item.question.id,key]} className="fl" value={i.answer_id} ></Radio>
<span className="break-word fl" style={{maxWidth:"1116px"}}>{i.answer_text}</span>
{ {
i.answer_text=="其他" ? i.answer_text=="其他" ?
<React.Fragment> <React.Fragment>
@ -442,8 +444,9 @@ class PollInfo extends Component{
{ {
item.question.answers && item.question.answers.map((i,k)=>{ item.question.answers && item.question.answers.map((i,k)=>{
return( return(
<li className={i.answer_text=="其他"?"df":""}> <li className={i.answer_text=="其他"?"df clearfix":"clearfix"}>
<Checkbox className="break-word" value={i.answer_id}>{i.answer_text}</Checkbox> <Checkbox className="fl mr8" value={i.answer_id}></Checkbox>
<span className="break-word fl" style={{maxWidth:"1116px"}}>{i.answer_text}</span>
{ {
i.answer_text=="其他"? i.answer_text=="其他"?
<React.Fragment> <React.Fragment>

@ -844,12 +844,12 @@ class PollNew extends Component {
if (object.question.question_type === 2) { if (object.question.question_type === 2) {
if (object.question.max_choices > 0) { if (object.question.max_choices > 0) {
if (object.question.min_choices < 2) { // if (object.question.min_choices < 2) {
this.props.showNotification(`可选最小不能少于2个`); // this.props.showNotification(`可选最小不能少于2个`);
//
return; // return;
//
} // }
} }
} }
@ -1332,10 +1332,10 @@ class PollNew extends Component {
if (object.question.question_type === 2) { if (object.question.question_type === 2) {
if (object.question.max_choices > 0) { if (object.question.max_choices > 0) {
if (object.question.min_choices < 2) { // if (object.question.min_choices < 2) {
this.props.showNotification(`可选最小不能少于2个`); // this.props.showNotification(`可选最小不能少于2个`);
return; // return;
} // }
} }
} }
if (object.question.new === "new") { if (object.question.new === "new") {
@ -2108,14 +2108,24 @@ class PollNew extends Component {
} }
//最大值 //最大值
HandleGradationGroupChangeee = (value, index) => { HandleGradationGroupChangeee = (value, index,minchoices) => {
// console.log("2112");
// console.log(value);
// console.log(minchoices);
let arr = this.state.adddom; let arr = this.state.adddom;
for (var i = 0; i < arr.length; i++) { for (var i = 0; i < arr.length; i++) {
if (index === i) { if (index === i) {
arr[i].question.max_choices = parseInt(value); if(parseInt(value)===0&&parseInt(minchoices)===0){
arr[i].question.min_choices= parseInt(minchoices);
arr[i].question.max_choices = parseInt(value);
}else {
arr[i].question.min_choices= minchoices===null?2:minchoices===undefined?2:minchoices===0?2:parseInt(minchoices);
arr[i].question.max_choices = parseInt(value);
}
} }
} }
// console.log(2119);
// console.log(arr);
this.setState({ this.setState({
adddom: arr adddom: arr
}) })
@ -2285,7 +2295,7 @@ class PollNew extends Component {
readOnlys: "readOnly", readOnlys: "readOnly",
cancellation: false, cancellation: false,
}) })
window.location.href = `/courses/${coursesId}/polls/${result.data.data.id}/edit`;
}) })
} else { } else {
@ -2322,7 +2332,7 @@ class PollNew extends Component {
gotohome=()=>{ gotohome=()=>{
const { current_user} = this.props const { current_user} = this.props
this.props.history.push(current_user.first_category_url); this.props.history.push(current_user && current_user.first_category_url);
// let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
@ -2388,7 +2398,7 @@ class PollNew extends Component {
<a className=" btn colorgrey fl hovercolorblue" onClick={()=>this.gotohome()}>{this.props.coursedata.name}</a> <a className=" btn colorgrey fl hovercolorblue" onClick={()=>this.gotohome()}>{this.props.coursedata.name}</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<a className=" btn colorgrey fl hovercolorblue" <a className=" btn colorgrey fl hovercolorblue"
to={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollid}`}>问卷</a> href={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollid}`}>问卷</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<span>{this.props.match.params.news === undefined ? "新建" : this.props.match.params.news === "new" ? "新建" : "编辑"}</span> <span>{this.props.match.params.news === undefined ? "新建" : this.props.match.params.news === "new" ? "新建" : "编辑"}</span>
</p> </p>
@ -2772,7 +2782,7 @@ class PollNew extends Component {
className="ml10 mr10 color-grey-6 lineh-40 fl">~</span> className="ml10 mr10 color-grey-6 lineh-40 fl">~</span>
{/*可选最大*/} {/*可选最大*/}
<Select className="fl w100" <Select className="fl w100"
onChange={(value) => this.HandleGradationGroupChangeee(value, indexo)} onChange={(value) => this.HandleGradationGroupChangeee(value, indexo,itemo.question.min_choices)}
value={itemo.question.max_choices === 0 || itemo.question.max_choices === "0" ? "--" : itemo.question.min_choices === null ? "--" : itemo.question.min_choices === undefined ? "--" : itemo.question.max_choices} value={itemo.question.max_choices === 0 || itemo.question.max_choices === "0" ? "--" : itemo.question.min_choices === null ? "--" : itemo.question.min_choices === undefined ? "--" : itemo.question.max_choices}
> >
<Option value={String("0")}>--</Option> <Option value={String("0")}>--</Option>
@ -3015,7 +3025,7 @@ class PollNew extends Component {
className="ml10 mr10 color-grey-6 lineh-40 fl">~</span> className="ml10 mr10 color-grey-6 lineh-40 fl">~</span>
{/*可选最大*/} {/*可选最大*/}
<Select className="fl w100" <Select className="fl w100"
onChange={(value) => this.HandleGradationGroupChangeee(value, indexo)} onChange={(value) => this.HandleGradationGroupChangeee(value, indexo,itemo.question.min_choices)}
value={itemo.question.max_choices === 0 || itemo.question.max_choices === "0" ? "--" : itemo.question.min_choices === null ? "--" : itemo.question.min_choices === undefined ? "--" : itemo.question.max_choices} value={itemo.question.max_choices === 0 || itemo.question.max_choices === "0" ? "--" : itemo.question.min_choices === null ? "--" : itemo.question.min_choices === undefined ? "--" : itemo.question.max_choices}
> >
<Option value={String("0")}>--</Option> <Option value={String("0")}>--</Option>
@ -3267,7 +3277,7 @@ class PollNew extends Component {
className="ml10 mr10 color-grey-6 lineh-40 fl">~</span> className="ml10 mr10 color-grey-6 lineh-40 fl">~</span>
{/*可选最大*/} {/*可选最大*/}
<Select className="fl w100" <Select className="fl w100"
onChange={(value) => this.HandleGradationGroupChangeee(value, indexo)} onChange={(value) => this.HandleGradationGroupChangeee(value, indexo,itemo.question.min_choices)}
value={itemo.question.max_choices === 0 || itemo.question.max_choices === "0" ? "--" : itemo.question.min_choices === null ? "--" : itemo.question.min_choices === undefined ? "--" : itemo.question.max_choices} value={itemo.question.max_choices === 0 || itemo.question.max_choices === "0" ? "--" : itemo.question.min_choices === null ? "--" : itemo.question.min_choices === undefined ? "--" : itemo.question.max_choices}
> >
<Option value={String("0")}>--</Option> <Option value={String("0")}>--</Option>

@ -113,7 +113,7 @@
text-align: left; text-align: left;
} }
.percentForm{ .percentForm{
width: 340px; width: 330px;
height: 11px; height: 11px;
background: #F5F5F5; background: #F5F5F5;
border-radius: 6px; border-radius: 6px;

@ -0,0 +1,123 @@
import React, {Component} from "react";
import './guide.css'
import guihome1 from "../../../images/guideimg/guihome1.png";
import guihome2 from "../../../images/guideimg/guihome2.jpg";
import guihome3 from "../../../images/guideimg/guihome3.jpg";
import guihome4 from "../../../images/guideimg/guihome4.jpg";
import guihome5 from "../../../images/guideimg/guihome5.jpg";
import guihome6 from "../../../images/guideimg/guihome6.jpg";
class Guide extends Component {
constructor(props) {
super(props);
this.state={
pingmuz:"",
page:1,
mywidth:1,
}
}
componentDidMount() {
var mywidthone=0;
if(window.screen.width===1024){
mywidthone=1;
}
if(window.screen.width===1280){
mywidthone=2;
}
if(window.screen.width===1440){
mywidthone=3;
}
if(window.screen.width===1680){
mywidthone=4;
}
if(window.screen.width===1920){
mywidthone=5;
}
this.setState({
mywidth:mywidthone,
});
}
thissetPage=(i)=>{
this.setState({
page:i,
})
if(i===7){
this.props.setwindowlocal(true);
}
}
render() {
let {page,mywidth}=this.state;
// console.log("屏幕宽度");
// console.log(window.screen.width);
// console.log(mywidth);
return (
<div className="guide-shadow">
<style>
{
`
body {
overflow: hidden !important;
}
`
}
</style>
{
page===1?
<div className="guide-content">
<img className={mywidth===1?"ysldiv11024":mywidth===2?"ysldiv11280":mywidth===3?"ysldiv11440":mywidth===4?"ysldiv11680":"ysldiv11900"} src={guihome1} onClick={(i)=>this.thissetPage(2)} />
</div>
:""
}
{
page===2?
<div className="guide-content">
<img className={mywidth===1?"ysldiv21024":mywidth===2?"ysldiv21280":mywidth===3?"ysldiv21440":mywidth===4?"ysldiv21680":"ysldiv21900"} src={guihome2} onClick={(i)=>this.thissetPage(3)}/>
</div>
:
""
}
{
page===3?
<div className="guide-content">
<img className={mywidth===1?"ysldiv31024":mywidth===2?"ysldiv31280":mywidth===3?"ysldiv31440":mywidth===4?"ysldiv31680":"ysldiv31900"} src={guihome3} onClick={(i)=>this.thissetPage(4)}/>
</div>
:
""
}
{
page===4?
<div className="guide-content">
<img className={mywidth===1?"ysldiv41024":mywidth===2?"ysldiv41280":mywidth===3?"ysldiv41440":mywidth===4?"ysldiv41680":"ysldiv41900"} src={guihome4} onClick={(i)=>this.thissetPage(5)}/>
</div>
:
""
}
{
page===5?
<div className="guide-content">
<img className={mywidth===1?"ysldiv51024":mywidth===2?"ysldiv51280":mywidth===3?"ysldiv51440":mywidth===4?"ysldiv51680":"ysldiv51900"} src={guihome5} onClick={(i)=>this.thissetPage(6)}/>
</div>
:
""
}
{
page===6?
<div className="guide-content">
<img className={mywidth===1?"ysldiv61024":mywidth===2?"ysldiv61280":mywidth===3?"ysldiv61440":mywidth===4?"ysldiv61680":"ysldiv61900"} src={guihome6} onClick={(i)=>this.thissetPage(7)}/>
</div>
:
""
}
</div>
)
}
}
export default Guide;

@ -17,6 +17,7 @@ import Workquestionandanswer from './Workquestionandanswer';
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import ShixunStudentWork from "./ShixunStudentWork"; import ShixunStudentWork from "./ShixunStudentWork";
import Startshixuntask from "../coursesPublic/Startshixuntask"; import Startshixuntask from "../coursesPublic/Startshixuntask";
import TPMMDEditor from "../../tpm/challengesnew/TPMMDEditor"; import TPMMDEditor from "../../tpm/challengesnew/TPMMDEditor";
import DownloadMessageysl from "../../modals/DownloadMessageysl"; import DownloadMessageysl from "../../modals/DownloadMessageysl";
class ShixunHomeworkPage extends Component { class ShixunHomeworkPage extends Component {
@ -128,6 +129,8 @@ class ShixunHomeworkPage extends Component {
// console.log(teacherdatapage); // console.log(teacherdatapage);
return ( return (
<div className="newMain clearfix "> <div className="newMain clearfix ">
<div className={"educontent mb20"} style={{width: "1200px"}}> <div className={"educontent mb20"} style={{width: "1200px"}}>
<div className="educontent mb20"> <div className="educontent mb20">

@ -135,7 +135,7 @@ class ShixunWorkReport extends Component {
<span className={"color-grey-9"}>{data===undefined?"":data.category===null?"":data.category.category_name}</span> <span className={"color-grey-9"}>{data===undefined?"":data.category===null?"":data.category.category_name}</span>
</a> </a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<a to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+homework_common_id+"/list?tab=0"} className="fl color-grey-9">作业详情</a> <a href={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+homework_common_id+"/list?tab=0"} className="fl color-grey-9">作业详情</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">{data&&data.username}</WordsBtn> <WordsBtn className="fl">{data&&data.username}</WordsBtn>
</p> </p>

@ -0,0 +1,415 @@
/*[class^="icon-"], [class*=" icon-"] {*/
/* font-family:"iconfont";*/
/* font-size:12px;*/
/* font-style:normal;*/
/* -webkit-font-smoothing: antialiased;*/
/* -moz-osx-font-smoothing: grayscale;*/
/*}*/
.guide-container{
position: relative;
}
.guide-shadow{
position: fixed;
top:0;
z-index: 99999;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.8);
transition: all .3s ease-out;
display: flex;
justify-content: center;
}
.guide-content{
position: absolute;
display: block;
z-index: 999991;
width: 100%;
height: 100%;
border-radius: 4px;
transition: all .3s ease-out;
display: flex;
flex-direction:column;
border: 1px solid rgba(0, 0, 0, .5);
box-shadow: 0 2px 15px rgba(0, 0, 0, .4);
}
.guiimgconte{
width: 100%;
height: 13%;
margin-top: 12%;
margin-left: 73%;
}
.guiimgcontee{
width: 100%;
display: flex;
justify-content:flex-end;
margin-top: 2%;
}
.gimgtwo{
height: 30%;
margin-left: 8%;
margin-top: 2%;
}
.guide-icon-no{
position: absolute;
border: 2px solid #fff;
border-radius: 50%;
z-index: 999998;
color: #fff;
background: linear-gradient(to bottom,#409EFF 0%,#007fff 100%);
font-weight: 6000;
padding: 1px;
font-size: 13px;
line-height: 20px;
font-family: Arial,verdana,tahoma;
text-shadow: 1px 1px 1px rgba(0,0,0,.3);
text-align: center;
box-shadow: 0 2px 5px rgba(0,0,0,.4);
transition: all .3s ease-out;
}
.guide-tooltip{
position: absolute;
border-radius: 5px;
z-index: 999995;
display: block;
opacity: 1;
padding: 15px 25px 15px 15px;
box-shadow: 0 1px 10px rgba(0, 0, 0, .4);
transition: opacity .1s ease-out;
min-width: 200px;
max-width: 250px;
background-color: #fff;
}
.guide-tooltip div:nth-child(1) {
font: 14px/normal sans-serif;
color: #2d2d2d;
font-weight: 400;
zoom: 1;
margin-bottom: 0;
}
.guide-tooltip .audio-play{
position: absolute;
top: 17px;
z-index: 999999;
right: 5px;
width: 26px;
height: 18px;
background-size: 20px 19px;
background-repeat: no-repeat;
background-position: 7px -2px;
background-image: url('http://fanyi.bdstatic.com/static/translation/img/translate/output/sound2x_d6f553d.gif')
}
.guide-tooltip .audio-noplay{
position: absolute;
top: 17px;
z-index: 999999;
right: 5px;
background-repeat: no-repeat;
background-position: 0 -1046px;
height: 16px;
width: 19px;
background-image: url('http://fanyi.bdstatic.com/static/translation/sprite/images/normal/index-sc413d90635_65ba9b0.png')
}
.guide-tooltip .guide-arrow{
position: absolute;
content: '';
border: 5px solid #fff;
}
.guide-tooltip .top{
top: -10px;
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: #fff;
border-left-color: transparent;
}
.guide-tooltip .left{
left: -10px;
top: 10px;
border-top-color: transparent;
border-right-color: #fff;
border-bottom-color: transparent;
border-left-color: transparent;
}
.guide-tooltip .bottom{
bottom: -10px;
left: 10px;
border-top-color: #fff;
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: transparent;
}
.guide-tooltip .right{
right: -10px;
top: 10px;
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: #fff;
}
.guide-bullets ul{
display: flex;
justify-content: center;
padding: 0;
}
.guide-bullets ul li{
list-style: none;
}
.guide-bullets ul li div{
width: 8px;
height: 8px;
border-radius: 50%;
margin: 2px;
background-color: #ccc;
cursor: pointer;
}
.guide-bullets .active-dot{
background-color: #409EFF
}
.guide-button-group{
display: flex;
justify-content: space-between;
margin-top: 5px;
}
.guide-button{
background-color: #409EFF;
border-color: #409EFF;
box-sizing: border-box;
cursor: pointer;
color: #fff;
line-height: 1;
font-size: 13px;
outline: none;
margin: 0;
padding: 4px 7px;
}
.guide-button-total {
border-radius: 3px;
}
.guide-button-left {
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
border-right-color: hsla(0,0%,100%,.5)
}
.guide-button-right {
border-bottom-right-radius: 3px;
border-top-right-radius: 3px;
}
.guide-button-disabled {
background-color: #a0cfff;
border-color: #a0cfff;
cursor: not-allowed;
}
/*验证码*/
.ysldiv11900{
margin-top: 10%;
margin-left: 17%;
margin-right: 14%;
}
.ysldiv11680{
margin-top: 11%;
margin-left: 13%;
margin-right: 10%;
}
.ysldiv11440{
margin-top: 14%;
margin-left: 7%;
margin-right: 3%;
height: 60%;
}
.ysldiv11280{
margin-top: 16%;
margin-left: 2%;
margin-right: 0%;
height: 60%;
}
.ysldiv11024{
margin-top: 20%;
margin-left: 0%;
margin-right: -1%;
height: 59%;
}
/*添加成员*/
.ysldiv21900{
margin-top: 10%;
margin-left: 48%;
margin-right: 25%;
height: 18%;
}
.ysldiv21680{
margin-top: 11%;
margin-left: 45%;
margin-right: 20%;
height: 24%;
}
.ysldiv21440{
margin-top: 14%;
margin-left: 47%;
margin-right: 17%;
height: 25%;
}
.ysldiv21280{
margin-top: 16%;
margin-left: 51%;
margin-right: 14%;
height: 25%;
}
.ysldiv21024{
margin-top: 20%;
margin-left: 61%;
margin-right: 0%;
height: 33%;
}
/*成员列表*/
.ysldiv31900{
margin-top: 10%;
margin-left: 19%;
margin-right: 45%;
}
.ysldiv31680{
margin-top: 11%;
margin-left: 14%;
margin-right: 45%;
}
.ysldiv31440{
margin-top: 13%;
margin-left: 8%;
margin-right: 44%;
}
.ysldiv31280{
margin-top: 15%;
margin-left: 3%;
margin-right: 44%;
}
.ysldiv31024{
margin-top: 18%;
margin-left: 1%;
margin-right: 38%;
}
/*目录管理*/
.ysldiv41900{
margin-top: 18%;
margin-left: 19%;
margin-right: 28%;
}
.ysldiv41680{
margin-top: 21%;
margin-left: 14%;
margin-right: 23%;
}
.ysldiv41440{
margin-top: 24%;
margin-left: 8%;
margin-right: 19%;
}
.ysldiv41280{
margin-top: 27%;
margin-left: 3%;
margin-right: 17%;
}
.ysldiv41024{
margin-top: 29%;
margin-left: 0%;
margin-right: 2%;
}
/*导航排序*/
.ysldiv51900{
margin-top: 18%;
margin-left: 18%;
margin-right: 42%;
}
.ysldiv51680{
margin-top: 20%;
margin-left: 13%;
margin-right: 41%;
}
.ysldiv51440{
margin-top: 24%;
margin-left: 7%;
margin-right: 38%;
}
.ysldiv51280{
margin-top: 27%;
margin-left: 2%;
margin-right: 38%;
}
.ysldiv51024{
margin-top: 34%;
margin-left: -1%;
margin-right: 27%;
}
/*任务操作*/
.ysldiv61900{
margin-top: 16%;
margin-left: 34%;
margin-right: 19%
}
.ysldiv61680{
margin-top: 18%;
margin-left: 31%;
margin-right: 14%;
}
.ysldiv61440{
margin-top: 21%;
margin-left: 28%;
margin-right: 8%;
}
.ysldiv61280{
margin-top: 24%;
margin-left: 25%;
margin-right: 3%;
height: 53%;
}
.ysldiv61024{
margin-top: 26%;
margin-left: 27%;
margin-right: 0%;
height: 40%;
}

@ -65,6 +65,7 @@ class LoginRegisterComponent extends Component {
Whethertoverify:false, Whethertoverify:false,
pciphone:true, pciphone:true,
MyEduCoderModals:false, MyEduCoderModals:false,
registered:undefined,
} }
} }
@ -101,6 +102,7 @@ class LoginRegisterComponent extends Component {
Whethertoverify:false, Whethertoverify:false,
pciphone:true, pciphone:true,
MyEduCoderModals:false, MyEduCoderModals:false,
registered:undefined,
} }
} }
@ -358,7 +360,6 @@ class LoginRegisterComponent extends Component {
weekArray="/"; weekArray="/";
} }
window.location.href = weekArray; window.location.href = weekArray;
} }
} }
@ -881,12 +882,15 @@ class LoginRegisterComponent extends Component {
setNotcompleteds=()=>{ setNotcompleteds=()=>{
this.setState({ this.setState({
Notcompleteds:true, Notcompleteds:true,
MyEduCoderModals:false MyEduCoderModals:false,
registered:undefined,
}) })
}; };
setMyEduCoderModals=()=>{ setMyEduCoderModals=()=>{
this.setState({ this.setState({
MyEduCoderModals:true MyEduCoderModals:true,
registered:"注册成功"
}) })
}; };
render() { render() {
@ -1040,6 +1044,7 @@ class LoginRegisterComponent extends Component {
} }
{this.state.MyEduCoderModals===true? <Notcompletedysl {this.state.MyEduCoderModals===true? <Notcompletedysl
modalsType={this.state.MyEduCoderModals} modalsType={this.state.MyEduCoderModals}
registered={this.state.registered}
setNotcompleteds={()=>{this.setNotcompleteds()}} setNotcompleteds={()=>{this.setNotcompleteds()}}
/>:""} />:""}

@ -53,13 +53,13 @@ class Notcompletedysl extends Component {
closable={false} closable={false}
footer={null} footer={null}
destroyOnClose={true} destroyOnClose={true}
title="提示" title={this.props.registered===undefined?"提示":"注册成功"}
centered={true} centered={true}
visible={this.props.modalsType} visible={this.props.modalsType}
width="530px" width="530px"
> >
<div className="educouddiv"> <div className="educouddiv">
<div className={"tabeltext-alignleft mt20"}><p>完善您的资料将获得更多的使用权限</p></div> <div className={"tabeltext-alignleft"}><p style={{fontSize: "16px"}}>完善您的资料将获得更多的使用权限</p></div>
<div className="clearfix mt30 edu-txt-center"> <div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={()=>this.modalCancel()}>取消</a> <a className="task-btn mr30" onClick={()=>this.modalCancel()}>取消</a>
<a className="task-btn task-btn-orange" onClick={()=>this.setDownload()}>立即完善</a> <a className="task-btn task-btn-orange" onClick={()=>this.setDownload()}>立即完善</a>

Loading…
Cancel
Save