课堂各模块列表的点击事件

dev_cs_new
caishi 6 years ago
parent 39018a248a
commit dee7e226be

@ -31,6 +31,7 @@ module.exports = {
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
// devtool: "cheap-module-eval-source-map", // devtool: "cheap-module-eval-source-map",
// 开启调试 // 开启调试
devtool: "source-map", // 开启调试
// These are the "entry points" to our application. // These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle. // This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS. // The first two entry points enable "hot" CSS and auto-refreshes for JS.

@ -52,17 +52,17 @@ class ExerciseListItem extends Component{
}) })
} }
render(){ render(){
let{item,checkBox}=this.props; let{item,checkBox,key}=this.props;
let {coursesId,Id}=this.props.match.params let {coursesId,Id}=this.props.match.params
const IsAdmin =this.props.isAdmin(); const IsAdmin =this.props.isAdmin();
const IsStudent =this.props.isStudent(); const IsStudent =this.props.isStudent();
// console.log(this.props.current_user.user_id) // console.log(this.props.current_user.user_id)
return( return(
<div className="workList_Item" style={{padding:"30px"}}> <div className="workList_Item" style={{cursor : IsAdmin ? "pointer" : "default",padding:"30px" }} onClick={() => window.$(`.exerciseitem${key} input`).click() }>
{ {
IsAdmin && IsAdmin &&
<span className="fl mr12"> <span className={`exerciseitem${key} fl mr12`}>
{checkBox} {checkBox}
</span> </span>
} }

@ -151,16 +151,12 @@ class GraduateTaskItem extends Component{
coursesId, coursesId,
categoryid, categoryid,
taskid, taskid,
index,
isAdmin
} = this.props; } = this.props;
// console.log(discussMessage)
return( return(
<div className="graduateTopicList boardsList"> <div className="graduateTopicList boardsList" style={{cursor : isAdmin ? "pointer" : "default" }} onClick={() => window.$(`.taskitem${index} input`).click() }>
<Modals <Modals
modalsType={Modalstype} modalsType={Modalstype}
modalsTopval={Modalstopval} modalsTopval={Modalstopval}
@ -193,8 +189,9 @@ class GraduateTaskItem extends Component{
margin-right: 15px; margin-right: 15px;
} }
`}</style> `}</style>
<span className={`taskitem${index} fl`} style={{"height":"59px"}}>
{ checkBox } { checkBox }
</span>
{/* {/*
style={{borderTop:data===undefined?"":data.course_identity<4?'1px solid #EBEBEB':'1px solid transparent'}} style={{borderTop:data===undefined?"":data.course_identity<4?'1px solid #EBEBEB':'1px solid transparent'}}
*/} */}

@ -731,7 +731,7 @@ class GraduationTasks extends Component{
{ tasks.map((item, index) => { { tasks.map((item, index) => {
// console.log(item) // console.log(item)
return ( return (
<div className="mt20 edu-back-white padding02010" key={index}> <div className="mt20 edu-back-white pt10 pl30 pr30" key={index}>
<div className="clearfix"> <div className="clearfix">
<GraduateTaskItem <GraduateTaskItem
discussMessage={item} discussMessage={item}
@ -748,6 +748,7 @@ class GraduationTasks extends Component{
coursesId={this.props.match.params.coursesId} coursesId={this.props.match.params.coursesId}
categoryid={this.props.match.params.Id} categoryid={this.props.match.params.Id}
workid={item.work_id} workid={item.work_id}
index={index}
></GraduateTaskItem> ></GraduateTaskItem>
</div> </div>
</div> </div>

@ -47,7 +47,7 @@ class GraduateTopicItem extends Component{
} }
</style> </style>
<div className="graduateTopicList boardsList mb20"> <div className="graduateTopicList boardsList mb20" style={{cursor : isAdmin ? "pointer" : "default" }} onClick={() => window.$(`.topicItem${index} input`).click() }>
<style>{` <style>{`
.graduateTopicList .ant-checkbox-input {s .graduateTopicList .ant-checkbox-input {s
@ -58,7 +58,7 @@ class GraduateTopicItem extends Component{
padding: 17px 30px 20px!important; padding: 17px 30px 20px!important;
} }
`}</style> `}</style>
{ isAdmin ? checkBox : ""} { isAdmin ? <span className={`topicItem${index} fl`} style={{"height":"64px"}}>{checkBox}</span> : ""}
<div className="clearfix ds pr flex1"> <div className="clearfix ds pr flex1">
<style>{` <style>{`
.maxwidth580{ .maxwidth580{

@ -112,12 +112,13 @@ class CreateGroupByImportModal extends Component{
render(){ render(){
const { candidates, checkBoxValues, loading, hasMore, name, school_name, school_names const { candidates, checkBoxValues, loading, hasMore, name, school_name, school_names
, graduationGroup, graduation_groups, courseGroup, course_groups } = this.state , graduationGroup, graduation_groups, courseGroup, course_groups , fileList } = this.state
const { moduleName } = this.props const { moduleName } = this.props
const props = { const props = {
name: 'file', name: 'file',
multiple: true, multiple: true,
fileList:fileList,
action: getUploadActionUrl(), action: getUploadActionUrl(),
onRemove: this.onAttachmentRemove, onRemove: this.onAttachmentRemove,
onChange: this.handleChange onChange: this.handleChange
@ -131,17 +132,6 @@ class CreateGroupByImportModal extends Component{
onOk={this.onOk} onOk={this.onOk}
className="createGroupByImport" className="createGroupByImport"
> >
<style>
{`
`}
</style>
<div className="df">
</div>
<Dragger {...props}> <Dragger {...props}>
<p className="ant-upload-drag-icon"> <p className="ant-upload-drag-icon">
<Icon type="inbox" /> <Icon type="inbox" />

@ -16,7 +16,7 @@ class PollListItem extends Component{
super(props); super(props);
} }
render(){ render(){
let{item,checkBox,courseType}=this.props; let{item,checkBox,courseType,key}=this.props;
let {coursesId}=this.props.match.params; let {coursesId}=this.props.match.params;
const IsAdmin =this.props.isAdmin(); const IsAdmin =this.props.isAdmin();
@ -28,10 +28,10 @@ class PollListItem extends Component{
let canNotLink = !isAdminOrStudent && item.lock_status == 0 let canNotLink = !isAdminOrStudent && item.lock_status == 0
return( return(
<div className="workList_Item polllisthover" style={{padding:"30px"}}> <div className="workList_Item polllisthover" style={{cursor : IsAdmin ? "pointer" : "default",padding:"30px" }} onClick={() => window.$(`.pollitem${key} input`).click() }>
{ {
IsAdmin && IsAdmin &&
<span className="fl mr12"> <span className={`pollitem${key} fl mr12`}>
{checkBox} {checkBox}
</span> </span>
} }

Loading…
Cancel
Save