Commit b6e69746 by guomingpang
parents e8c34a03 1a27722f
/*
* @Author: 吴文洁
* @Date: 2020-08-05 10:12:45
* @LastEditors: wufan
* @LastEditTime: 2021-05-30 20:53:07
* @Description: 视频课-列表模块
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
import React from 'react';
import { Table, Modal, message , Tooltip,Switch,Dropdown} from 'antd';
import { PageControl } from "@/components";
import React from "react"
import { Table, Modal, message, Tooltip, Switch, Dropdown } from "antd"
import _ from "underscore"
import { PageControl } from "@/components"
import { LIVE_SHARE } from "@/domains/course-domain/constants"
import ShareLiveModal from "@/modules/course-manage/modal/ShareLiveModal"
import WatchDataModal from "../modal/WatchDataModal"
import CourseService from "@/domains/course-domain/CourseService"
......@@ -142,10 +137,23 @@ class VideoCourseList extends React.Component {
}
},
{
title: <span>
title: (
<span>
<span>学院展示</span>
<Tooltip title={<div>开启后,学员可在学院内查看到此课程。<br/>关闭后,学院内不再展示此课程,但学员仍可通过分享的海报/链接查看此课程。</div>}><i className="icon iconfont" style={{ marginLeft: '5px',cursor:'pointer',color:'#bfbfbf',fontSize:'14px',fontWeight:'normal'}}>&#xe61d;</i></Tooltip>
</span>,
<Tooltip
title={
<div>
开启后,学员可在学院内查看到此课程。
<br />
关闭后,学院内不再展示此课程,但学员仍可通过分享的海报/链接查看此课程。
</div>
}>
<i className='icon iconfont' style={{ marginLeft: "5px", cursor: "pointer", color: "#bfbfbf", fontSize: "14px" }}>
&#xe61d;
</i>
</Tooltip>
</span>
),
width: 120,
key: "shelfState",
dataIndex: "shelfState",
......@@ -240,12 +248,9 @@ class VideoCourseList extends React.Component {
</If>
<span className='operate__item split'> | </span>
<Dropdown overlay={this.renderMoreOperate(record)}>
<span className="more-operate">
<span className="operate-text">更多</span>
<span
className="iconfont icon"
style={{ color: "#2966FF" }}
>
<span className='more-operate'>
<span className='operate-text'>更多</span>
<span className='iconfont icon' style={{ color: "#2966FF" }}>
&#xe824;
</span>
</span>
......
......@@ -2,8 +2,8 @@
* @Description:
* @Author: zangsuyun
* @Date: 2021-03-13 09:54:26
* @LastEditors: wufan
* @LastEditTime: 2021-05-30 20:38:03
* @LastEditors: fusanqiasng
* @LastEditTime: 2021-05-30 23:59:36
* @Copyright: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -24,24 +24,24 @@ const { TabPane } = Tabs
const courseStateShow = {
UN_START: {
code: 1,
title: "待开课",
color: "#FFB129",
title: '待开课',
color: '#FFB129'
},
STARTING: {
code: 2,
title: '上课中',
color: '#238FFF',
color: '#238FFF'
},
FINISH: {
code: 3,
title: '已完成',
color: '#3BBDAA',
color: '#3BBDAA'
},
EXPIRED: {
code: 4,
title: '未成功开课',
color: '#999',
},
color: '#999'
}
}
class AddCourse extends React.Component {
......@@ -55,7 +55,7 @@ class AddCourse extends React.Component {
excludeUsed: true,
courseType: 'LIVE',
storeId: User.getStoreId(),
toRefKnowledgeCategoryId: this.props.categoryId,
toRefKnowledgeCategoryId: this.props.categoryId
},
liveTotalCount: 0,
selectLive: [], //弹窗内已选择的直播课程
......@@ -63,21 +63,21 @@ class AddCourse extends React.Component {
videoCourseDivision: 'internal',
videoDataSource: {
external: [],
internal: [],
internal: []
},
videoSize: {
external: 10,
internal: 10,
internal: 10
},
videoSearchDefalt: {
external: {
categoryId: '',
courseName: '',
courseName: ''
},
internal: {
categoryId: '',
courseName: '',
},
courseName: ''
}
},
videoQuery: {
......@@ -88,7 +88,7 @@ class AddCourse extends React.Component {
courseType: 'VOICE',
excludeUsed: true,
storeId: User.getStoreId(),
toRefKnowledgeCategoryId: this.props.categoryId,
toRefKnowledgeCategoryId: this.props.categoryId
},
internal: {
categoryId: '',
......@@ -97,20 +97,20 @@ class AddCourse extends React.Component {
courseType: 'VOICE',
excludeUsed: true,
storeId: User.getStoreId(),
toRefKnowledgeCategoryId: this.props.categoryId,
},
toRefKnowledgeCategoryId: this.props.categoryId
}
},
videoTotalCount: {
external: 0,
internal: 0,
internal: 0
},
selectVideo: {
external: [],
internal: [],
internal: []
}, //弹窗内已选择的视频课程
currentVideoCourseListData: {
external: [],
internal: [],
internal: []
}, //页面中已关联的视频课程
pictureDataSource: [],
......@@ -120,12 +120,12 @@ class AddCourse extends React.Component {
excludeUsed: true,
courseType: 'PICTURE',
storeId: User.getStoreId(),
toRefKnowledgeCategoryId: this.props.categoryId,
toRefKnowledgeCategoryId: this.props.categoryId
},
pictureTotalCount: 0,
selectPicture: [], //弹窗内已选择的图文课程
categoryList: [], //内部分类列表
categoryListExternal: [], //外部分类列表
categoryListExternal: [] //外部分类列表
}
}
componentDidMount() {
......@@ -139,25 +139,25 @@ class AddCourse extends React.Component {
queryCategoryTree = (categoryName) => {
let query = {
storeId: User.getStoreId(),
withCount: false,
withCount: false
}
let queryInternal = {
bizType: 'QUESTION',
source: 2,
tenantId: User.getStoreId(),
userId: User.getStoreUserId(),
count: false,
count: false
}
AidToolService.queryExternalCategoryTree(queryInternal).then((res) => {
const { categoryList = [] } = res.result
this.setState({
categoryListExternal: this.renderTreeNodes(categoryList),
categoryListExternal: this.renderTreeNodes(categoryList)
})
})
KnowledgeAPI.getCategoryTree(query).then((res) => {
const { categoryList = [] } = res.result
this.setState({
categoryList: this.renderTreeNodes(categoryList),
categoryList: this.renderTreeNodes(categoryList)
})
})
}
......@@ -187,7 +187,7 @@ class AddCourse extends React.Component {
const params = {
...liveQuery,
size: liveSize,
size: liveSize
}
// CourseService.getLiveCloudCoursePage(params).then((res) => {
......@@ -196,7 +196,7 @@ class AddCourse extends React.Component {
const { records = [], total = 0 } = result
this.setState({
liveDataSource: records,
liveTotalCount: Number(total),
liveTotalCount: Number(total)
})
})
}
......@@ -208,7 +208,7 @@ class AddCourse extends React.Component {
const params = {
...videoQuery[videoCourseDivision],
size: videoSize[videoCourseDivision],
courseDivision: videoCourseDivision === 'internal' ? 'INTERNAL' : 'EXTERNAL',
courseDivision: videoCourseDivision === 'internal' ? 'INTERNAL' : 'EXTERNAL'
}
// CourseService.videoSchedulePage(query).then((res) => {
......@@ -218,12 +218,12 @@ class AddCourse extends React.Component {
this.setState({
videoDataSource: {
...videoDataSource,
[videoCourseDivision]: records,
[videoCourseDivision]: records
},
videoTotalCount: {
...videoTotalCount,
[videoCourseDivision]: Number(total),
},
[videoCourseDivision]: Number(total)
}
})
})
}
......@@ -234,7 +234,7 @@ class AddCourse extends React.Component {
const params = {
...pictureQuery,
size: pictureSize,
size: pictureSize
}
// CourseService.pictureSchedulePage(query).then((res) => {
......@@ -243,7 +243,7 @@ class AddCourse extends React.Component {
const { records = [], total = 0 } = result
this.setState({
pictureDataSource: records,
pictureTotalCount: Number(total),
pictureTotalCount: Number(total)
})
})
}
......@@ -254,7 +254,7 @@ class AddCourse extends React.Component {
}
this.setState(
{
liveSize: size,
liveSize: size
},
() => {
this.handleFetchLiveList()
......@@ -268,7 +268,7 @@ class AddCourse extends React.Component {
}
this.setState(
{
videoSize: size,
videoSize: size
},
() => {
this.handleFetchVideoList()
......@@ -282,7 +282,7 @@ class AddCourse extends React.Component {
}
this.setState(
{
pictureSize: size,
pictureSize: size
},
() => {
this.handleFetchPictureList()
......@@ -300,13 +300,12 @@ class AddCourse extends React.Component {
<i
className='icon iconfont'
style={{
marginLeft: "5px",
cursor: "pointer",
color: "#bfbfbf",
fontSize: "14px",
fontWeight:"400"
}}
>
marginLeft: '5px',
cursor: 'pointer',
color: '#bfbfbf',
fontSize: '14px',
fontWeight: '400'
}}>
&#xe61d;
</i>
</Tooltip>
......@@ -342,7 +341,7 @@ class AddCourse extends React.Component {
className='course-status'
style={{
color: courseStateShow[record.courseState].color,
border: `1px solid ${courseStateShow[record.courseState].color}`,
border: `1px solid ${courseStateShow[record.courseState].color}`
}}>
{courseStateShow[record.courseState].title}
</span>
......@@ -350,7 +349,7 @@ class AddCourse extends React.Component {
</div>
</div>
)
},
}
},
{
title: '上课时间',
......@@ -364,7 +363,7 @@ class AddCourse extends React.Component {
{formatDate('H:i', parseInt(item.startTime))}~{formatDate('H:i', parseInt(item.endTime))}
</span>
)
},
}
},
{
......@@ -379,8 +378,8 @@ class AddCourse extends React.Component {
{record.categoryTwoName ? `-${record.categoryTwoName}` : ''}
</div>
)
},
},
}
}
]
return columns
......@@ -397,13 +396,12 @@ class AddCourse extends React.Component {
<i
className='icon iconfont'
style={{
marginLeft: "5px",
cursor: "pointer",
color: "#bfbfbf",
fontSize: "14px",
fontWeight:"400"
}}
>
marginLeft: '5px',
cursor: 'pointer',
color: '#bfbfbf',
fontSize: '14px',
fontWeight: '400'
}}>
&#xe61d;
</i>
</Tooltip>
......@@ -439,7 +437,7 @@ class AddCourse extends React.Component {
</Choose>
</div>
)
},
}
},
{
title: '课程时长',
......@@ -448,7 +446,7 @@ class AddCourse extends React.Component {
dataIndex: 'videoDuration',
render: (text, item) => {
return <span>{text ? dealTimeDuration(text) : '-'}</span>
},
}
},
{
......@@ -469,8 +467,8 @@ class AddCourse extends React.Component {
</Otherwise>
</Choose>
)
},
},
}
}
]
return columns
}
......@@ -485,13 +483,12 @@ class AddCourse extends React.Component {
<i
className='icon iconfont'
style={{
marginLeft: "5px",
cursor: "pointer",
color: "#bfbfbf",
fontSize: "14px",
fontWeight:"400"
}}
>
marginLeft: '5px',
cursor: 'pointer',
color: '#bfbfbf',
fontSize: '14px',
fontWeight: '400'
}}>
&#xe61d;
</i>
</Tooltip>
......@@ -518,7 +515,7 @@ class AddCourse extends React.Component {
</Choose>
</div>
)
},
}
},
{
title: '课程分类',
......@@ -531,8 +528,8 @@ class AddCourse extends React.Component {
{record.categoryTwoName ? `-${record.categoryTwoName}` : ''}
</div>
)
},
},
}
}
]
return columns
}
......@@ -563,8 +560,8 @@ class AddCourse extends React.Component {
this.setState({
selectVideo: {
...selectVideo,
[videoCourseDivision]: _list,
},
[videoCourseDivision]: _list
}
})
}
......@@ -592,7 +589,7 @@ class AddCourse extends React.Component {
this.setState(
{
videoQuery,
videoSearchDefalt,
videoSearchDefalt
},
() => {
this.handleFetchVideoList()
......@@ -604,7 +601,7 @@ class AddCourse extends React.Component {
const { videoSearchDefalt, videoCourseDivision } = this.state
videoSearchDefalt[videoCourseDivision].courseName = e.target.value
this.setState({
videoSearchDefalt,
videoSearchDefalt
})
}
......@@ -614,7 +611,7 @@ class AddCourse extends React.Component {
liveQuery.current = 1
this.setState(
{
liveQuery,
liveQuery
},
() => {
this.handleFetchLiveList()
......@@ -628,7 +625,7 @@ class AddCourse extends React.Component {
pictureQuery.current = 1
this.setState(
{
pictureQuery,
pictureQuery
},
() => {
this.handleFetchPictureList()
......@@ -644,7 +641,7 @@ class AddCourse extends React.Component {
refIds: _.pluck(selectVideo.external, 'id'),
storeId: User.getStoreId(),
type: 'VOICE',
createId: User.getStoreUserId(),
createId: User.getStoreUserId()
})
}
if (selectVideo.internal.length) {
......@@ -653,7 +650,7 @@ class AddCourse extends React.Component {
refIds: _.pluck(selectVideo.internal, 'id'),
storeId: User.getStoreId(),
type: 'VOICE',
createId: User.getStoreUserId(),
createId: User.getStoreUserId()
})
}
if (selectLive.length) {
......@@ -662,7 +659,7 @@ class AddCourse extends React.Component {
refIds: _.pluck(selectLive, 'liveCourseId'),
storeId: User.getStoreId(),
type: 'LIVE',
createId: User.getStoreUserId(),
createId: User.getStoreUserId()
})
}
if (selectPicture.length) {
......@@ -671,7 +668,7 @@ class AddCourse extends React.Component {
refIds: _.pluck(selectPicture, 'id'),
storeId: User.getStoreId(),
type: 'PICTURE',
createId: User.getStoreUserId(),
createId: User.getStoreUserId()
})
}
......@@ -693,9 +690,9 @@ class AddCourse extends React.Component {
...videoSearchDefalt,
[e.target.value]: {
courseName: videoQuery[e.target.value].courseName,
categoryId: videoQuery[e.target.value].categoryId,
},
},
categoryId: videoQuery[e.target.value].categoryId
}
}
},
() => {
this.handleFetchVideoList()
......@@ -738,7 +735,7 @@ class AddCourse extends React.Component {
selectPicture,
videoSearchDefalt,
categoryList,
categoryListExternal,
categoryListExternal
} = this.state
const LiveSelection = {
......@@ -752,7 +749,7 @@ class AddCourse extends React.Component {
_list = _.reject(selectLive, (item) => _.find(changeRows, (data) => data.liveCourseId === item.liveCourseId))
}
this.setState({ selectLive: _list })
},
}
}
const VideoSelection = {
......@@ -768,10 +765,10 @@ class AddCourse extends React.Component {
this.setState({
selectVideo: {
...selectVideo,
[videoCourseDivision]: _list,
},
[videoCourseDivision]: _list
}
})
},
}
}
const PictureSelection = {
......@@ -785,7 +782,7 @@ class AddCourse extends React.Component {
_list = _.reject(selectPicture, (item) => _.find(changeRows, (data) => data.id === item.id))
}
this.setState({ selectPicture: _list })
},
}
}
return (
......@@ -829,10 +826,10 @@ class AddCourse extends React.Component {
this.setState({
selectVideo: {
internal: [],
external: [],
external: []
},
selectLive: [],
selectPicture: [],
selectPicture: []
})
}}
/>
......@@ -857,7 +854,7 @@ class AddCourse extends React.Component {
const _query = { ...liveQuery, current: page + 1 }
this.setState(
{
liveQuery: _query,
liveQuery: _query
},
() => {
this.handleFetchLiveList()
......@@ -896,6 +893,7 @@ class AddCourse extends React.Component {
<TreeSelect
treeNodeFilterProp='categoryName'
showSearch
value={videoQuery[videoCourseDivision].categoryId}
style={{ minWidth: 'calc(100% - 75px)' }}
dropdownMatchSelectWidth={false}
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
......@@ -915,10 +913,10 @@ class AddCourse extends React.Component {
this.setState({
selectVideo: {
internal: [],
external: [],
external: []
},
selectLive: [],
selectPicture: [],
selectPicture: []
})
}}
/>
......@@ -947,8 +945,8 @@ class AddCourse extends React.Component {
{
videoQuery: {
...videoQuery,
[videoCourseDivision]: _query,
},
[videoCourseDivision]: _query
}
},
() => {
this.handleFetchVideoList()
......@@ -1000,10 +998,10 @@ class AddCourse extends React.Component {
this.setState({
selectVideo: {
internal: [],
external: [],
external: []
},
selectLive: [],
selectPicture: [],
selectPicture: []
})
}}
/>
......@@ -1028,7 +1026,7 @@ class AddCourse extends React.Component {
const _query = { ...pictureQuery, current: page + 1 }
this.setState(
{
pictureQuery: _query,
pictureQuery: _query
},
() => {
this.handleFetchPictureList()
......
......@@ -9,34 +9,38 @@
color: #999999;
line-height: 20px;
}
.rwm {
.rwm{
position: relative;
width: 160px;
height: 160px;
width: 210px;
height: 210px;
text-align: center;
display: inline-block;
margin-top: 24px;
.error {
border: 1px solid #e8e8e8;
border-radius: 2px;
padding:15px;
.error{
position: absolute;
width: 100%;
height: 100%;
width: 200px;
height: 200px;
background: rgba(255, 255, 255, 0.95);
display: flex;
align-items: center;
justify-content: center;
left: 0px;
top: 0px;
div {
align-items:center;
justify-content:center;
left:5px;
top:5px;
div{
margin: 0 10px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 20px;
}
.ope {
.ope{
cursor: pointer;
color: rgba(82, 137, 250, 1);
color:rgba(82, 137, 250, 1);
}
}
}
......
......@@ -129,6 +129,7 @@ function ExaminationManager(props: any) {
{
title: "创建时间",
dataIndex: "examCreateTime",
align:fixStr.right,
sorter: true,
sortOrder: field === "examCreateTime" ? order : sortStatus.type,
render: (text: any, record: any) => <span>{moment(text).format("YYYY-MM-DD HH:mm")}</span>,
......
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