Commit 962dbfa6 authored by wangxuelai's avatar wangxuelai

Merge remote-tracking branch 'origin/bww-v2' into webpack-change

parents 199b66f4 d0a243c0
......@@ -54,7 +54,7 @@ class ThemeEditor extends React.Component {
switch (item.type) {
case 'text':
return (
<div key={item.type} className={pageStyle.textWrap}>
<div key={index} className={pageStyle.textWrap}>
<TextArea autoSize={{ minRows: 4, maxRows: 10 }} value={item.value} onChange={e => editorChange(e, index)} placeholder="请输入内容" style={{ width: 560 }} maxLength={500} />
<div className={pageStyle.sizeNumber}>{item.value.length}/500</div>
<div className={pageStyle.toolList}>
......@@ -68,7 +68,7 @@ class ThemeEditor extends React.Component {
);
case 'img':
return (
<div key={item.type} className={pageStyle.uploadimgbox}>
<div key={index} className={pageStyle.uploadimgbox}>
<div className={pageStyle.imgwrap}>
<div className={pageStyle.uploadimgwrap}> <img alt={item.type} className={pageStyle.teacheruploadimg} src={imagify(item.value)} /></div>
<div className={pageStyle.imghide}>
......@@ -86,7 +86,7 @@ class ThemeEditor extends React.Component {
);
case 'video':
return (
<div key={item.type} className={pageStyle.videowrap}>
<div key={index} className={pageStyle.videowrap}>
<video controls="controls" className={pageStyle.videoPoster} src={ossVideofy(item.value)} />
<div className={pageStyle.toolList}>
{ index === 0 && <div aria-disabled="true" className={pageStyle.noup}><img src={upImg} alt="" /> </div> }
......
......@@ -322,7 +322,7 @@ class CalendarClockForm extends React.Component {
],
})(
<Select disabled={(calendarParams.class_id && calendarParams.class_id != undefined) && (isCopy === 0)} placeholder="请选择班级" style={{ width: 174 }} showSearch onChange={this.handleStudentChange}>
{classList.map(ele => <Option value={ele.id}>{ele.title}</Option>)}
{classList.map(ele => <Option key={ele.id} value={ele.id}>{ele.title}</Option>)}
</Select>,
)}
</FormItem>
......@@ -410,8 +410,8 @@ class CalendarClockForm extends React.Component {
<div className={pageStyle.rowFlex}>
<div className={pageStyle.calendarlist}>
{
dateArray.map((item, index) =>
<div onClick={() => this.selectWeekDay(item.day)} className={item.isChecked ? pageStyle.calendaritemActive : pageStyle.calendaritem}>{item.title}</div>,
dateArray.map((item, l) =>
<div key={l} onClick={() => this.selectWeekDay(item.day)} className={item.isChecked ? pageStyle.calendaritemActive : pageStyle.calendaritem}>{item.title}</div>,
)
}
</div>
......@@ -419,8 +419,8 @@ class CalendarClockForm extends React.Component {
<span className={pageStyle.freeBtn} onClick={this.handleClickDateShow}>自定义</span>
<div className={pageStyle.checkedNumber}>
{
new_rest_dates && new_rest_dates.length > 0 ? new_rest_dates.map((item, index) =>
<div className={pageStyle.checkedNumItem}><Tooltip title={item}>{index < 2 ? `${item},` : '...'}</Tooltip></div>,
new_rest_dates && new_rest_dates.length > 0 ? new_rest_dates.map((item, p) =>
<div key={p} className={pageStyle.checkedNumItem}><Tooltip title={item}>{p < 2 ? `${item},` : '...'}</Tooltip></div>,
) : '增加额外休息日'
}
</div>
......@@ -445,10 +445,10 @@ class CalendarClockForm extends React.Component {
<div className={pageStyle.weekday}></div>
<div className={pageStyle.weekday}></div>
</div>
{calendarData.targetTimeArr && calendarData.targetTimeArr.map((bigdat) => {
{calendarData.targetTimeArr && calendarData.targetTimeArr.map((bigdat, q) => {
return (
<div className={pageStyle.dayrow}>{bigdat.map((day) => {
return (<div onClick={() => this.selectPlanDay(day)} className={`${pageStyle.dayitem} ${day.open ? '' : pageStyle.notopen} ${day.type == 'current' ? pageStyle.current : ''} ${selectPlanDays.indexOf(day.date) != -1 ? pageStyle.dayselected : ''} ${day.istoday ? pageStyle.istoday : ''}`}>{day.day}</div>);
<div key={q} className={pageStyle.dayrow}>{bigdat.map((day, i) => {
return (<div key={i} onClick={() => this.selectPlanDay(day)} className={`${pageStyle.dayitem} ${day.open ? '' : pageStyle.notopen} ${day.type == 'current' ? pageStyle.current : ''} ${selectPlanDays.indexOf(day.date) != -1 ? pageStyle.dayselected : ''} ${day.istoday ? pageStyle.istoday : ''}`}>{day.day}</div>);
})}
</div>
);
......
......@@ -793,7 +793,7 @@ class StudentMgt extends React.Component {
</Col>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 3 }}>
<div className={pageStyle.formitemlabel} >学员年龄</div>
<InputNumber style={{ width: 50 }} value={searchstudentListQueryParams.age_start} min="0" onChange={e => this.searchParamsChange(e, 'Select', 'age_start')} /> ~ <InputNumber style={{ width: 50 }} min="0" value={searchstudentListQueryParams.age_end} onChange={e => this.searchParamsChange(e, 'Select', 'age_end')} />
<InputNumber style={{ width: 50 }} value={searchstudentListQueryParams.age_start} min={0} onChange={e => this.searchParamsChange(e, 'Select', 'age_start')} /> ~ <InputNumber style={{ width: 50 }} min={0} value={searchstudentListQueryParams.age_end} onChange={e => this.searchParamsChange(e, 'Select', 'age_end')} />
</Col>
<Col className={pageStyle.searchbtnbox} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<Button className={pageStyle.resetbtn} onClick={this.reset}>重置</Button>
......@@ -807,6 +807,7 @@ class StudentMgt extends React.Component {
<div className={pageStyle.title}>学员管理</div>
<div className={pageStyle.tablebox}>
<Table
rowKey={studentsinfo => studentsinfo.id}
dataSource={studentsinfo}
columns={columns}
pagination={false}
......
......@@ -231,6 +231,7 @@ class classChange extends React.Component {
{
title: '学员',
dataIndex: 'name',
key: 'name',
render: (text, row, index) => {
const rowInfo = {
children: <span>{row.name}</span>,
......@@ -249,6 +250,7 @@ class classChange extends React.Component {
{
title: '课程名称(剩余课时)',
dataIndex: 'age',
key: 'c',
render: (text, record, index) => ({
children: <div className={`${pageStyle.coursetd} ${selectedCourse.course_id == record.course_id ? pageStyle.courseselectedtd : ''}`} onClick={() => this.courseSelect(record)}>{record.course[0].course.title}</div>,
props: {
......@@ -260,6 +262,7 @@ class classChange extends React.Component {
{
title: '班级名称',
dataIndex: 'address',
key: 'd',
render: (text, record, index) => {
return (
<div >
......@@ -271,6 +274,7 @@ class classChange extends React.Component {
{
title: '任课老师',
dataIndex: 'teacher',
key: 'f',
render: (text, record, index) => {
return (
<div >
......@@ -284,7 +288,7 @@ class classChange extends React.Component {
<div className={`${pageStyle.container} studentclasscontainer`}>
<div className={pageStyle.headerbox}>
<Select className={pageStyle.selectitem} placeholder="请选择学员" value={studentDetail.id} onChange={e => this.studentChange(e)}>
{allStudentList.map(ele => <Option value={ele.id}>{ele.name}</Option>)}
{allStudentList.map(ele => <Option key={ele.id} value={ele.id}>{ele.name}</Option>)}
</Select>
<Button className={pageStyle.headerbtn} onClick={this.resetStudent}>重置</Button>
</div>
......@@ -313,6 +317,7 @@ class classChange extends React.Component {
<div className={pageStyle.tablebox}>
<Table
columns={columnsr}
rowKey={classList => classList.id}
dataSource={classList}
pagination={false}
showHeader={false}
......
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