Commit 6225c745 authored by baixian's avatar baixian

最新代码提交

parent ac084131
...@@ -102,7 +102,7 @@ class ClassStatusChangeModal extends React.Component { ...@@ -102,7 +102,7 @@ class ClassStatusChangeModal extends React.Component {
width={887} width={887}
zIndex={200} zIndex={200}
footer={[ footer={[
<Row type="flex" align="center" justify="space-between" className={pageStyle.endclassfooter}> <Row type="flex" justify="space-between" className={pageStyle.endclassfooter}>
<span className={pageStyle.selectclasscount}>已选择:{selectedClasskey.length}/{classListTotalB}班级</span> <span className={pageStyle.selectclasscount}>已选择:{selectedClasskey.length}/{classListTotalB}班级</span>
<div className={pageStyle.endclassfooterbtn}> <div className={pageStyle.endclassfooterbtn}>
<Button key="back" onClick={close}> <Button key="back" onClick={close}>
...@@ -122,13 +122,13 @@ class ClassStatusChangeModal extends React.Component { ...@@ -122,13 +122,13 @@ class ClassStatusChangeModal extends React.Component {
<Col lg={{ span: 6 }} md={{ span: 12 }} xs={{ span: 24 }} className={pageStyle.endsearchcol} style={{ marginBottom: '24px' }}> <Col lg={{ span: 6 }} md={{ span: 12 }} xs={{ span: 24 }} className={pageStyle.endsearchcol} style={{ marginBottom: '24px' }}>
<Select className={pageStyle.selectitem} placeholder="请选择课程" style={{ display: 'block' }} value={copyClassListQueryParamsB.course_id} onChange={e => searchParamsChangeB(e, 'Select', 'course_id')}> <Select className={pageStyle.selectitem} placeholder="请选择课程" style={{ display: 'block' }} value={copyClassListQueryParamsB.course_id} onChange={e => searchParamsChangeB(e, 'Select', 'course_id')}>
<Option value="">全部课程</Option> <Option value="">全部课程</Option>
{courseList.map(ele => <Option value={ele.id}>{ele.title}</Option>)} {courseList.map(ele => <Option key={ele.id} value={ele.id}>{ele.title}</Option>)}
</Select> </Select>
</Col> </Col>
<Col lg={{ span: 6 }} md={{ span: 12 }} xs={{ span: 24 }} className={pageStyle.endsearchcol} style={{ marginBottom: '24px' }}> <Col lg={{ span: 6 }} md={{ span: 12 }} xs={{ span: 24 }} className={pageStyle.endsearchcol} style={{ marginBottom: '24px' }}>
<Select style={{ display: 'block' }} placeholder="请选择老师" className={pageStyle.selectitem} value={copyClassListQueryParamsB.teacher_id} onChange={e => searchParamsChangeB(e, 'Select', 'teacher_id')}> <Select style={{ display: 'block' }} placeholder="请选择老师" className={pageStyle.selectitem} value={copyClassListQueryParamsB.teacher_id} onChange={e => searchParamsChangeB(e, 'Select', 'teacher_id')}>
<Option value="">全部老师</Option> <Option value="">全部老师</Option>
{teacherList.map(ele => <Option value={ele.id}>{ele.nickname}</Option>)} {teacherList.map(ele => <Option key={ele.id} value={ele.id}>{ele.nickname}</Option>)}
</Select> </Select>
</Col> </Col>
<Col lg={{ span: 6 }} md={{ span: 12 }} xs={{ span: 24 }} className={pageStyle.endsearchcol}> <Col lg={{ span: 6 }} md={{ span: 12 }} xs={{ span: 24 }} className={pageStyle.endsearchcol}>
......
...@@ -121,7 +121,7 @@ class EditClassModal extends React.Component { ...@@ -121,7 +121,7 @@ class EditClassModal extends React.Component {
<span>{ courseList.find(ele => ele.id == editClassInfo.course_id) && courseList.find(ele => ele.id == editClassInfo.course_id).title }</span> : <span>{ courseList.find(ele => ele.id == editClassInfo.course_id) && courseList.find(ele => ele.id == editClassInfo.course_id).title }</span> :
<Select> <Select>
<Option value="">请选择课程名称</Option> <Option value="">请选择课程名称</Option>
{courseList.map(ele => <Option value={ele.id}>{ele.title}</Option>)} {courseList.map(ele => <Option key={ele.id} value={ele.id}>{ele.title}</Option>)}
</Select>)} </Select>)}
</Form.Item> </Form.Item>
<Form.Item <Form.Item
...@@ -258,7 +258,7 @@ class EditClassModal extends React.Component { ...@@ -258,7 +258,7 @@ class EditClassModal extends React.Component {
placeholder="请选择老师" placeholder="请选择老师"
> >
{teacherList.map(ele => ( {teacherList.map(ele => (
<Option value={ele.id}>{ele.nickname}</Option> <Option key={ele.id} value={ele.id}>{ele.nickname}</Option>
))} ))}
</Select>)} </Select>)}
</Col> </Col>
...@@ -282,7 +282,7 @@ class EditClassModal extends React.Component { ...@@ -282,7 +282,7 @@ class EditClassModal extends React.Component {
})( })(
<Select allowClear placeholder="请选择教室" onChange={this.getCurrentClassRoom}> <Select allowClear placeholder="请选择教室" onChange={this.getCurrentClassRoom}>
<Option value=""></Option> <Option value=""></Option>
{classroomList.map(ele => <Option value={ele.id}>{ele.title}</Option>)} {classroomList.map(ele => <Option key={ele.id} value={ele.id}>{ele.title}</Option>)}
</Select>)} </Select>)}
</Col> </Col>
<Col span={5} style={{ color: '#1890FF', cursor: 'pointer', fontSize: '14px' }} onClick={classroomMgt}> <Col span={5} style={{ color: '#1890FF', cursor: 'pointer', fontSize: '14px' }} onClick={classroomMgt}>
...@@ -306,7 +306,7 @@ class EditClassModal extends React.Component { ...@@ -306,7 +306,7 @@ class EditClassModal extends React.Component {
})( })(
<TextArea <TextArea
placeholder="请输入班级备注" placeholder="请输入班级备注"
autosize={{ minRows: 2, maxRows: 6 }} autoSize={{ minRows: 2, maxRows: 6 }}
/>)} />)}
</Form.Item> </Form.Item>
</Form> </Form>
...@@ -314,11 +314,8 @@ class EditClassModal extends React.Component { ...@@ -314,11 +314,8 @@ class EditClassModal extends React.Component {
); );
} }
} }
EditClassModal.propTypes = {
isEdit: PropTypes.bool,
};
EditClassModal.defaultProps = { EditClassModal.defaultProps = {
isEdit: false, isEdit: 2,
}; };
const ClassMgt = Form.create()(EditClassModal); const ClassMgt = Form.create()(EditClassModal);
......
...@@ -67,7 +67,7 @@ class classRoomMgt extends React.Component { ...@@ -67,7 +67,7 @@ class classRoomMgt extends React.Component {
<span style={{ color: '#000' }}>添加教室:</span> <span style={{ color: '#000' }}>添加教室:</span>
</Col> </Col>
<Col lg={{ span: 12 }} md={{ span: 12 }} xs={{ span: 24 }}> <Col lg={{ span: 12 }} md={{ span: 12 }} xs={{ span: 24 }}>
<Form className="modalform" hideRequiredMark={() => (true)}> <Form className="modalform" hideRequiredMark>
<Form.Item> <Form.Item>
{getFieldDecorator('title', { {getFieldDecorator('title', {
rules: [ rules: [
...@@ -103,7 +103,7 @@ class classRoomMgt extends React.Component { ...@@ -103,7 +103,7 @@ class classRoomMgt extends React.Component {
</Col> </Col>
<Col lg={{ span: 20 }} md={{ span: 20 }} xs={{ span: 24 }}> <Col lg={{ span: 20 }} md={{ span: 20 }} xs={{ span: 24 }}>
{classroomList.map(ele => ( {classroomList.map(ele => (
<div className={pageStyle.classroomitem} style={{ lineHeight: '32px' }}> <div key={ele.title} className={pageStyle.classroomitem} style={{ lineHeight: '32px' }}>
<span className={pageStyle.classroom}>{ele.title}</span> <span className={pageStyle.classroom}>{ele.title}</span>
<span className={pageStyle.classroom}>&nbsp;&nbsp;&nbsp;&nbsp;</span> <span className={pageStyle.classroom}>&nbsp;&nbsp;&nbsp;&nbsp;</span>
<a className={pageStyle.aLink} href="javascript:;" onClick={() => delClassroom(ele)}>删除</a> <a className={pageStyle.aLink} href="javascript:;" onClick={() => delClassroom(ele)}>删除</a>
......
...@@ -557,14 +557,14 @@ class ClassMgtForm extends React.Component { ...@@ -557,14 +557,14 @@ class ClassMgtForm extends React.Component {
<div className={pageStyle.formitemlabel}>所属课程</div> <div className={pageStyle.formitemlabel}>所属课程</div>
<Select className={pageStyle.selectitem} value={copyClassListQueryParams.course_id} onChange={e => this.searchParamsChange(e, 'Select', 'course_id')} placeholder="请选择所属课程"> <Select className={pageStyle.selectitem} value={copyClassListQueryParams.course_id} onChange={e => this.searchParamsChange(e, 'Select', 'course_id')} placeholder="请选择所属课程">
<Option value="">全部课程</Option> <Option value="">全部课程</Option>
{courseList.map(ele => <Option value={ele.id}>{ele.title}</Option>)} {courseList.map(ele => <Option key={ele.id} value={ele.id}>{ele.title}</Option>)}
</Select> </Select>
</Col> </Col>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}> <Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<div className={pageStyle.formitemlabel} >上课教室</div> <div className={pageStyle.formitemlabel} >上课教室</div>
<Select className={pageStyle.selectitem} value={copyClassListQueryParams.class_room_id} onChange={e => this.searchParamsChange(e, 'Select', 'class_room_id')}> <Select className={pageStyle.selectitem} value={copyClassListQueryParams.class_room_id} onChange={e => this.searchParamsChange(e, 'Select', 'class_room_id')}>
<Option value="">全部教室</Option> <Option value="">全部教室</Option>
{classroomList.map(ele => <Option value={ele.id}>{ele.title}</Option>)} {classroomList.map(ele => <Option key={ele.id} value={ele.id}>{ele.title}</Option>)}
</Select> </Select>
</Col> </Col>
</Row> </Row>
...@@ -578,7 +578,7 @@ class ClassMgtForm extends React.Component { ...@@ -578,7 +578,7 @@ class ClassMgtForm extends React.Component {
<div className={pageStyle.formitemlabel}>班级老师</div> <div className={pageStyle.formitemlabel}>班级老师</div>
<Select className={pageStyle.selectitem} value={copyClassListQueryParams.teacher_id} onChange={e => this.searchParamsChange(e, 'Select', 'teacher_id')}> <Select className={pageStyle.selectitem} value={copyClassListQueryParams.teacher_id} onChange={e => this.searchParamsChange(e, 'Select', 'teacher_id')}>
<Option value="">全部老师</Option> <Option value="">全部老师</Option>
{teacherList.map(ele => <Option value={ele.id}>{ele.nickname}</Option>)} {teacherList.map(ele => <Option key={ele.id} value={ele.id}>{ele.nickname}</Option>)}
</Select> </Select>
</Col> </Col>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}> <Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
...@@ -591,7 +591,7 @@ class ClassMgtForm extends React.Component { ...@@ -591,7 +591,7 @@ class ClassMgtForm extends React.Component {
</Col> </Col>
<Col className={pageStyle.formitem} xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 6 }}> <Col className={pageStyle.formitem} xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 6 }}>
<div className={pageStyle.formitemlabel}>是否排课</div> <div className={pageStyle.formitemlabel}>是否排课</div>
<Row type="flex" align="middle" justify="center" style={{ height: '30px' }}> <Row type="flex" justify="center" style={{ height: '30px' }}>
<Col span={12}> <Col span={12}>
<Radio value={2} onClick={e => this.searchParamsChange(e, 'Radio', 'assign_class_status')} checked={copyClassListQueryParams.assign_class_status == 2}>已排课</Radio> <Radio value={2} onClick={e => this.searchParamsChange(e, 'Radio', 'assign_class_status')} checked={copyClassListQueryParams.assign_class_status == 2}>已排课</Radio>
</Col> </Col>
...@@ -610,6 +610,7 @@ class ClassMgtForm extends React.Component { ...@@ -610,6 +610,7 @@ class ClassMgtForm extends React.Component {
</div> </div>
<div className={pageStyle.tablebox}> <div className={pageStyle.tablebox}>
<Table <Table
rowKey={classList => classList.title}
dataSource={classList} dataSource={classList}
columns={columns} columns={columns}
scroll={{ x: 'max-content' }} scroll={{ x: 'max-content' }}
......
...@@ -258,6 +258,7 @@ class ClassMgtForm extends React.Component { ...@@ -258,6 +258,7 @@ class ClassMgtForm extends React.Component {
</div> </div>
<div className={pageStyle.tablebox}> <div className={pageStyle.tablebox}>
<Table <Table
rowKey={coursesinfo => coursesinfo.title}
dataSource={coursesinfo} dataSource={coursesinfo}
columns={columns} columns={columns}
scroll={{ x: 700 }} scroll={{ x: 700 }}
...@@ -316,9 +317,9 @@ class ClassMgtForm extends React.Component { ...@@ -316,9 +317,9 @@ class ClassMgtForm extends React.Component {
})( })(
<div className={pageStyle.colorCircleLine}> <div className={pageStyle.colorCircleLine}>
{ {
colorList.map(ele => ( colorList.map(item => (
<div className={`${pageStyle.colorCircleBox} ${editCourseInfo.color == ele.value ? pageStyle.colorCircleBoxSelect : ''}`} onClick={() => this.chooseColor(ele)}> <div key={item.color} className={`${pageStyle.colorCircleBox} ${editCourseInfo.color == item.value ? pageStyle.colorCircleBoxSelect : ''}`} onClick={() => this.chooseColor(item)}>
<div className={pageStyle.colorCircle} style={{ backgroundColor: ele.color }}></div> <div className={pageStyle.colorCircle} style={{ backgroundColor: item.color }}></div>
</div> </div>
))} ))}
</div>, </div>,
......
...@@ -171,34 +171,36 @@ class JoinSchoolAddForm extends React.Component { ...@@ -171,34 +171,36 @@ class JoinSchoolAddForm extends React.Component {
<Row className={pageStyles.schoollist} gutter={32}> <Row className={pageStyles.schoollist} gutter={32}>
{schoolList.map((ele) => { {schoolList.map((ele) => {
return ( return (
<Col className={pageStyles.schoolcardbox} xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 8 }}> <div key={ele}>
<div className={pageStyles.schoolbox} onClick={() => this.goSchoolSystem(ele)}> <Col className={pageStyles.schoolcardbox} xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 8 }}>
<Row className={pageStyles.schoolnamebox} type="flex" justify="space-between" align="middle"> <div className={pageStyles.schoolbox} onClick={() => this.goSchoolSystem(ele)}>
<Col span={18} className={pageStyles.schoolname}>{ele.title}</Col> <Row className={pageStyles.schoolnamebox} type="flex" justify="space-between" align="middle">
<Col span={6} className={pageStyles.rolenamebox}> <Col span={18} className={pageStyles.schoolname}>{ele.title}</Col>
{ele.school_teacher && ele.school_teacher.type == 1 && <Col span={6} className={pageStyles.rolenamebox}>
{ele.school_teacher && ele.school_teacher.type == 1 &&
<div className={pageStyles.rolename}>老师</div> <div className={pageStyles.rolename}>老师</div>
} }
{ele.school_teacher && ele.school_teacher.type == 2 && {ele.school_teacher && ele.school_teacher.type == 2 &&
<div className={pageStyles.rolename}>超级管理员</div> <div className={pageStyles.rolename}>超级管理员</div>
} }
</Col> </Col>
</Row> </Row>
<Row className={`${pageStyles.logintimebox} ${pageStyles.expiretimebox}`} type="flex" justify="space-between" align="middle"> <Row className={`${pageStyles.logintimebox} ${pageStyles.expiretimebox}`} type="flex" justify="space-between" align="middle">
<Col span={12} className={pageStyles.timetitle}>套餐到期时间:</Col> <Col span={12} className={pageStyles.timetitle}>套餐到期时间:</Col>
{!ele.expire_time && <Col span={12} className={pageStyles.time}>终身包</Col>} {!ele.expire_time && <Col span={12} className={pageStyles.time}>终身包</Col>}
{ele.expire_time && ele.trial_status == 1 && (new Date(datetime.replace(/\-/, '/')).getTime() >= new Date(ele.expire_time.replace(/\-/, '/')).getTime()) && <Col span={12} className={pageStyles.time}>试用期已过</Col>} {ele.expire_time && ele.trial_status == 1 && (new Date(datetime.replace(/\-/, '/')).getTime() >= new Date(ele.expire_time.replace(/\-/, '/')).getTime()) && <Col span={12} className={pageStyles.time}>试用期已过</Col>}
{ele.expire_time && ele.trial_status == 2 && (new Date(datetime.replace(/\-/, '/')).getTime() >= new Date(ele.expire_time.replace(/\-/, '/')).getTime()) && <Col span={12} className={pageStyles.time}>账号已到期</Col>} {ele.expire_time && ele.trial_status == 2 && (new Date(datetime.replace(/\-/, '/')).getTime() >= new Date(ele.expire_time.replace(/\-/, '/')).getTime()) && <Col span={12} className={pageStyles.time}>账号已到期</Col>}
{ele.expire_time && (new Date(datetime.replace(/\-/, '/')).getTime() < new Date(ele.expire_time.replace(/\-/, '/')).getTime()) && <Col span={12} className={pageStyles.time}>{ele.expire_time}</Col>} {ele.expire_time && (new Date(datetime.replace(/\-/, '/')).getTime() < new Date(ele.expire_time.replace(/\-/, '/')).getTime()) && <Col span={12} className={pageStyles.time}>{ele.expire_time}</Col>}
</Row> </Row>
{ele.school_teacher && ele.school_teacher.last_login_time && {ele.school_teacher && ele.school_teacher.last_login_time &&
<Row className={pageStyles.logintimebox} type="flex" justify="space-between" align="middle"> <Row className={pageStyles.logintimebox} type="flex" justify="space-between" align="middle">
<Col span={12} className={pageStyles.timetitle}>上次登录时间:</Col> <Col span={12} className={pageStyles.timetitle}>上次登录时间:</Col>
<Col span={12} className={pageStyles.time}>{ele.school_teacher.last_login_time}</Col> <Col span={12} className={pageStyles.time}>{ele.school_teacher.last_login_time}</Col>
</Row> </Row>
} }
</div> </div>
</Col> </Col>
</div>
); );
})} })}
{stronghold && {stronghold &&
...@@ -219,33 +221,35 @@ class JoinSchoolAddForm extends React.Component { ...@@ -219,33 +221,35 @@ class JoinSchoolAddForm extends React.Component {
</div> </div>
</Col> </Col>
} }
{inviateTeacherList.map((ele) => { {inviateTeacherList.map((one) => {
return ( return (
<Col className={pageStyles.schoolcardbox} xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 8 }}> <div key={one}>
<div className={pageStyles.schoolbox}> <Col className={pageStyles.schoolcardbox} xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 8 }}>
<Row className={pageStyles.inviteschoolnamebox} type="flex" justify="space-between" align="middle"> <div className={pageStyles.schoolbox}>
{/* <Col span={24} className={pageStyles.inviteschoolname}>sadasdsadasdsa萨撒多撒sa萨达撒多撒多撒多撒</Col> */} <Row className={pageStyles.inviteschoolnamebox} type="flex" justify="space-between" align="middle">
<Col span={24} className={pageStyles.inviteschooltext}><span className={pageStyles.invitefromname}>{ele.school.title}</span>邀请你成为校区老师,你是否愿意加入?</Col> {/* <Col span={24} className={pageStyles.inviteschoolname}>sadasdsadasdsa萨撒多撒sa萨达撒多撒多撒多撒</Col> */}
</Row> <Col span={24} className={pageStyles.inviteschooltext}><span className={pageStyles.invitefromname}>{one.school.title}</span>邀请你成为校区老师,你是否愿意加入?</Col>
<Row className={pageStyles.confirmbox} type="flex" justify="space-between" align="middle"> </Row>
<Col span={12} className={pageStyles.cancel} onClick={() => this.joinTeacheroperate(ele, 3)}>取消</Col> <Row className={pageStyles.confirmbox} type="flex" justify="space-between" align="middle">
<Col span={12} className={pageStyles.confirm} onClick={() => this.joinTeacheroperate(ele, 2)}>加入</Col> <Col span={12} className={pageStyles.cancel} onClick={() => this.joinTeacheroperate(one, 3)}>取消</Col>
</Row> <Col span={12} className={pageStyles.confirm} onClick={() => this.joinTeacheroperate(one, 2)}>加入</Col>
</div> </Row>
</Col> </div>
</Col>
</div>
); );
})} })}
{inviateHoldList.map((ele) => { {inviateHoldList.map((item) => {
return ( return (
<Col className={pageStyles.schoolcardbox} xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 8 }}> <Col key={item} className={pageStyles.schoolcardbox} xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 8 }}>
<div className={pageStyles.schoolbox}> <div className={pageStyles.schoolbox}>
<Row className={pageStyles.inviteschoolnamebox} type="flex" justify="space-between" align="middle"> <Row className={pageStyles.inviteschoolnamebox} type="flex" justify="space-between" align="middle">
{/* <Col span={24} className={pageStyles.inviteschoolname}>sadasdsadasdsa萨撒多撒sa萨达撒多撒多撒多撒</Col> */} {/* <Col span={24} className={pageStyles.inviteschoolname}>sadasdsadasdsa萨撒多撒sa萨达撒多撒多撒多撒</Col> */}
<Col span={24} className={pageStyles.inviteschooltext}><span className={pageStyles.invitefromname}>{ele.stronghold && ele.stronghold.title}</span>添加你到他的校区总部,你是否同意?</Col> <Col span={24} className={pageStyles.inviteschooltext}><span className={pageStyles.invitefromname}>{item.stronghold && item.stronghold.title}</span>添加你到他的校区总部,你是否同意?</Col>
</Row> </Row>
<Row className={pageStyles.confirmbox} type="flex" justify="space-between" align="middle"> <Row className={pageStyles.confirmbox} type="flex" justify="space-between" align="middle">
<Col span={12} className={pageStyles.cancel} onClick={() => this.joinDepartment(ele, 3)}>取消</Col> <Col span={12} className={pageStyles.cancel} onClick={() => this.joinDepartment(item, 3)}>取消</Col>
<Col span={12} className={pageStyles.confirm} onClick={() => this.joinDepartment(ele, 2)}>确定</Col> <Col span={12} className={pageStyles.confirm} onClick={() => this.joinDepartment(item, 2)}>确定</Col>
</Row> </Row>
</div> </div>
</Col> </Col>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment