Commit 831c59da by guomingpang

style:修改学院装修裁剪banner尺寸

parent 3934ecf3
......@@ -8,9 +8,10 @@
*/
import React from 'react'
import { Button, Input, Radio, message, Modal, Select, Switch, TimePicker, InputNumber, Tooltip } from 'antd'
import { Button, Input, Radio, message, Modal, TreeSelect, Select, Switch, TimePicker, InputNumber, Tooltip } from 'antd'
import $ from 'jquery'
import { CourseCatalogSelect, RangePicker } from '@/modules/common/'
import RangePicker from '@/modules/common/DateRangePicker'
import ShowTips from '@/components/ShowTips'
import Breadcrumbs from '@/components/Breadcrumbs'
import SelectPrepareFileModal from '../../prepare-lesson/modal/SelectPrepareFileModal'
......@@ -758,12 +759,7 @@ class AddOfflineCourse extends React.Component {
<span className='label special'>
<span className='require'>*</span>课程分类:
</span>
<CourseCatalogSelect
courseCatalogList={courseCatalogList}
value={categoryId}
onChange={(value, label) => this.handleChangeCatalogList(value, label)}
/>
{/* <TreeSelect
<TreeSelect
showSearch
treeNodeFilterProp='title'
style={{ width: 240 }}
......@@ -774,9 +770,9 @@ class AddOfflineCourse extends React.Component {
value={categoryId}
treeDefaultExpandAll
onChange={(value, label) => {
this.handleChangeCatalogList(value, label);
this.handleChangeCatalogList(value, label)
}}
/> */}
/>
</div>
<div className='course-catalog'>
<span className='label special'>
......
......@@ -8,9 +8,8 @@
*/
import React from 'react'
import { Button, Input, message, Modal, Tooltip, Form, Popconfirm, Menu, Dropdown } from 'antd'
import { FileTypeIcon } from '@/common/constants/academic/lessonEnum'
import { CourseCatalogSelect } from '@/modules/common/'
import { Button, Input, message, Modal, Cascader, Tooltip, Form, Popconfirm, Menu, Dropdown } from 'antd'
import { FileTypeIcon, FileVerifyMap } from '@/common/constants/academic/lessonEnum'
import ShowTips from '@/components/ShowTips'
import Breadcrumbs from '@/components/Breadcrumbs'
import moment from 'moment'
......@@ -122,8 +121,19 @@ class AddVideoCourse extends React.Component {
}
catalogChange = (value, _categoryName) => {
console.log(value, _categoryName)
this.setState({ categoryId: value, categoryName: _categoryName[0] })
const categoryName = _.pluck(_categoryName, 'categoryName').join('-')
const changeValueLength = value.length
switch (changeValueLength) {
case 1:
this.setState({ categoryId: value[0], categoryName })
break
case 2:
this.setState({ categoryId: value[1], categoryName })
break
default:
this.setState({ categoryId: null })
break
}
}
// 获取线上课详情
handleFetchScheudleDetail = (courseId) => {
......@@ -712,7 +722,6 @@ class AddVideoCourse extends React.Component {
imageFile,
selectTypeList,
accept,
categoryId,
} = this.state
const defaultCover = 'https://image.xiaomaiketang.com/xm/TwtGPQGE4K.png'
const isDefaultCover = coverUrl === defaultCover || coverUrl == null
......@@ -875,7 +884,7 @@ class AddVideoCourse extends React.Component {
</div>
<div className='course-catalog required'>
<span className='label'>课程分类:</span>
{/* {pageType === 'add' && (
{pageType === 'add' && (
<Cascader
defaultValue={[]}
options={courseCatalogList}
......@@ -906,8 +915,7 @@ class AddVideoCourse extends React.Component {
</span>
}
/>
)} */}
<CourseCatalogSelect courseCatalogList={courseCatalogList} value={categoryId} onChange={this.catalogChange} />
)}
</div>
<div className='intro-info mt16'>
<AddVideoIntro
......
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