Commit 6225c745 authored by baixian's avatar baixian

最新代码提交

parent ac084131
......@@ -102,7 +102,7 @@ class ClassStatusChangeModal extends React.Component {
width={887}
zIndex={200}
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>
<div className={pageStyle.endclassfooterbtn}>
<Button key="back" onClick={close}>
......@@ -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' }}>
<Select className={pageStyle.selectitem} placeholder="请选择课程" style={{ display: 'block' }} value={copyClassListQueryParamsB.course_id} onChange={e => searchParamsChangeB(e, 'Select', 'course_id')}>
<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>
</Col>
<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')}>
<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>
</Col>
<Col lg={{ span: 6 }} md={{ span: 12 }} xs={{ span: 24 }} className={pageStyle.endsearchcol}>
......
......@@ -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> :
<Select>
<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>)}
</Form.Item>
<Form.Item
......@@ -258,7 +258,7 @@ class EditClassModal extends React.Component {
placeholder="请选择老师"
>
{teacherList.map(ele => (
<Option value={ele.id}>{ele.nickname}</Option>
<Option key={ele.id} value={ele.id}>{ele.nickname}</Option>
))}
</Select>)}
</Col>
......@@ -282,7 +282,7 @@ class EditClassModal extends React.Component {
})(
<Select allowClear placeholder="请选择教室" onChange={this.getCurrentClassRoom}>
<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>)}
</Col>
<Col span={5} style={{ color: '#1890FF', cursor: 'pointer', fontSize: '14px' }} onClick={classroomMgt}>
......@@ -306,7 +306,7 @@ class EditClassModal extends React.Component {
})(
<TextArea
placeholder="请输入班级备注"
autosize={{ minRows: 2, maxRows: 6 }}
autoSize={{ minRows: 2, maxRows: 6 }}
/>)}
</Form.Item>
</Form>
......@@ -314,11 +314,8 @@ class EditClassModal extends React.Component {
);
}
}
EditClassModal.propTypes = {
isEdit: PropTypes.bool,
};
EditClassModal.defaultProps = {
isEdit: false,
isEdit: 2,
};
const ClassMgt = Form.create()(EditClassModal);
......
......@@ -67,7 +67,7 @@ class classRoomMgt extends React.Component {
<span style={{ color: '#000' }}>添加教室:</span>
</Col>
<Col lg={{ span: 12 }} md={{ span: 12 }} xs={{ span: 24 }}>
<Form className="modalform" hideRequiredMark={() => (true)}>
<Form className="modalform" hideRequiredMark>
<Form.Item>
{getFieldDecorator('title', {
rules: [
......@@ -103,7 +103,7 @@ class classRoomMgt extends React.Component {
</Col>
<Col lg={{ span: 20 }} md={{ span: 20 }} xs={{ span: 24 }}>
{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}>&nbsp;&nbsp;&nbsp;&nbsp;</span>
<a className={pageStyle.aLink} href="javascript:;" onClick={() => delClassroom(ele)}>删除</a>
......
......@@ -557,14 +557,14 @@ class ClassMgtForm extends React.Component {
<div className={pageStyle.formitemlabel}>所属课程</div>
<Select className={pageStyle.selectitem} value={copyClassListQueryParams.course_id} onChange={e => this.searchParamsChange(e, 'Select', 'course_id')} placeholder="请选择所属课程">
<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>
</Col>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<div className={pageStyle.formitemlabel} >上课教室</div>
<Select className={pageStyle.selectitem} value={copyClassListQueryParams.class_room_id} onChange={e => this.searchParamsChange(e, 'Select', 'class_room_id')}>
<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>
</Col>
</Row>
......@@ -578,7 +578,7 @@ class ClassMgtForm extends React.Component {
<div className={pageStyle.formitemlabel}>班级老师</div>
<Select className={pageStyle.selectitem} value={copyClassListQueryParams.teacher_id} onChange={e => this.searchParamsChange(e, 'Select', 'teacher_id')}>
<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>
</Col>
<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 {
</Col>
<Col className={pageStyle.formitem} xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 6 }}>
<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}>
<Radio value={2} onClick={e => this.searchParamsChange(e, 'Radio', 'assign_class_status')} checked={copyClassListQueryParams.assign_class_status == 2}>已排课</Radio>
</Col>
......@@ -610,6 +610,7 @@ class ClassMgtForm extends React.Component {
</div>
<div className={pageStyle.tablebox}>
<Table
rowKey={classList => classList.title}
dataSource={classList}
columns={columns}
scroll={{ x: 'max-content' }}
......
......@@ -258,6 +258,7 @@ class ClassMgtForm extends React.Component {
</div>
<div className={pageStyle.tablebox}>
<Table
rowKey={coursesinfo => coursesinfo.title}
dataSource={coursesinfo}
columns={columns}
scroll={{ x: 700 }}
......@@ -316,9 +317,9 @@ class ClassMgtForm extends React.Component {
})(
<div className={pageStyle.colorCircleLine}>
{
colorList.map(ele => (
<div className={`${pageStyle.colorCircleBox} ${editCourseInfo.color == ele.value ? pageStyle.colorCircleBoxSelect : ''}`} onClick={() => this.chooseColor(ele)}>
<div className={pageStyle.colorCircle} style={{ backgroundColor: ele.color }}></div>
colorList.map(item => (
<div key={item.color} className={`${pageStyle.colorCircleBox} ${editCourseInfo.color == item.value ? pageStyle.colorCircleBoxSelect : ''}`} onClick={() => this.chooseColor(item)}>
<div className={pageStyle.colorCircle} style={{ backgroundColor: item.color }}></div>
</div>
))}
</div>,
......
......@@ -171,34 +171,36 @@ class JoinSchoolAddForm extends React.Component {
<Row className={pageStyles.schoollist} gutter={32}>
{schoolList.map((ele) => {
return (
<Col className={pageStyles.schoolcardbox} xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 8 }}>
<div className={pageStyles.schoolbox} onClick={() => this.goSchoolSystem(ele)}>
<Row className={pageStyles.schoolnamebox} type="flex" justify="space-between" align="middle">
<Col span={18} className={pageStyles.schoolname}>{ele.title}</Col>
<Col span={6} className={pageStyles.rolenamebox}>
{ele.school_teacher && ele.school_teacher.type == 1 &&
<div key={ele}>
<Col className={pageStyles.schoolcardbox} xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 8 }}>
<div className={pageStyles.schoolbox} onClick={() => this.goSchoolSystem(ele)}>
<Row className={pageStyles.schoolnamebox} type="flex" justify="space-between" align="middle">
<Col span={18} className={pageStyles.schoolname}>{ele.title}</Col>
<Col span={6} className={pageStyles.rolenamebox}>
{ele.school_teacher && ele.school_teacher.type == 1 &&
<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>
}
</Col>
</Row>
<Row className={`${pageStyles.logintimebox} ${pageStyles.expiretimebox}`} type="flex" justify="space-between" align="middle">
<Col span={12} className={pageStyles.timetitle}>套餐到期时间:</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 == 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>}
</Row>
{ele.school_teacher && ele.school_teacher.last_login_time &&
}
</Col>
</Row>
<Row className={`${pageStyles.logintimebox} ${pageStyles.expiretimebox}`} type="flex" justify="space-between" align="middle">
<Col span={12} className={pageStyles.timetitle}>套餐到期时间:</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 == 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>}
</Row>
{ele.school_teacher && ele.school_teacher.last_login_time &&
<Row className={pageStyles.logintimebox} type="flex" justify="space-between" align="middle">
<Col span={12} className={pageStyles.timetitle}>上次登录时间:</Col>
<Col span={12} className={pageStyles.time}>{ele.school_teacher.last_login_time}</Col>
</Row>
}
</div>
</Col>
}
</div>
</Col>
</div>
);
})}
{stronghold &&
......@@ -219,33 +221,35 @@ class JoinSchoolAddForm extends React.Component {
</div>
</Col>
}
{inviateTeacherList.map((ele) => {
{inviateTeacherList.map((one) => {
return (
<Col className={pageStyles.schoolcardbox} xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 8 }}>
<div className={pageStyles.schoolbox}>
<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.inviteschooltext}><span className={pageStyles.invitefromname}>{ele.school.title}</span>邀请你成为校区老师,你是否愿意加入?</Col>
</Row>
<Row className={pageStyles.confirmbox} type="flex" justify="space-between" align="middle">
<Col span={12} className={pageStyles.cancel} onClick={() => this.joinTeacheroperate(ele, 3)}>取消</Col>
<Col span={12} className={pageStyles.confirm} onClick={() => this.joinTeacheroperate(ele, 2)}>加入</Col>
</Row>
</div>
</Col>
<div key={one}>
<Col className={pageStyles.schoolcardbox} xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 8 }}>
<div className={pageStyles.schoolbox}>
<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.inviteschooltext}><span className={pageStyles.invitefromname}>{one.school.title}</span>邀请你成为校区老师,你是否愿意加入?</Col>
</Row>
<Row className={pageStyles.confirmbox} type="flex" justify="space-between" align="middle">
<Col span={12} className={pageStyles.cancel} onClick={() => this.joinTeacheroperate(one, 3)}>取消</Col>
<Col span={12} className={pageStyles.confirm} onClick={() => this.joinTeacheroperate(one, 2)}>加入</Col>
</Row>
</div>
</Col>
</div>
);
})}
{inviateHoldList.map((ele) => {
{inviateHoldList.map((item) => {
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}>
<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.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 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.confirm} onClick={() => this.joinDepartment(ele, 2)}>确定</Col>
<Col span={12} className={pageStyles.cancel} onClick={() => this.joinDepartment(item, 3)}>取消</Col>
<Col span={12} className={pageStyles.confirm} onClick={() => this.joinDepartment(item, 2)}>确定</Col>
</Row>
</div>
</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