|
|
|
@ -13,7 +13,7 @@ import UpdateForm from './components/UpdateForm';
|
|
|
|
|
import { queryTagList, saveCourse, removeCourse, queryCourseList } from './service';
|
|
|
|
|
import type { TableListItem, TableListPagination } from './data';
|
|
|
|
|
import Tags from './components/Tags';
|
|
|
|
|
import { DataItem } from '@antv/data-set/lib/transform/tag-cloud';
|
|
|
|
|
import type { DataItem } from '@antv/data-set/lib/transform/tag-cloud';
|
|
|
|
|
import { VideoJS } from './components/VideoJS';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -101,7 +101,7 @@ const CourseList: React.FC = () => {
|
|
|
|
|
{
|
|
|
|
|
title: '序号',
|
|
|
|
|
key: 'index',
|
|
|
|
|
valueType: 'indexBorder',
|
|
|
|
|
valueType: 'indexBorder',
|
|
|
|
|
width: 48,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@ -116,7 +116,7 @@ const CourseList: React.FC = () => {
|
|
|
|
|
{
|
|
|
|
|
title: '主讲教师',
|
|
|
|
|
dataIndex: 'lecture_teacher',
|
|
|
|
|
valueType: 'text',
|
|
|
|
|
valueType: 'text',
|
|
|
|
|
sorter: false,
|
|
|
|
|
hideInTable: false,
|
|
|
|
|
hideInForm: false,
|
|
|
|
@ -126,7 +126,7 @@ const CourseList: React.FC = () => {
|
|
|
|
|
{
|
|
|
|
|
title: '课时',
|
|
|
|
|
dataIndex: 'course_minutes',
|
|
|
|
|
valueType: 'text',
|
|
|
|
|
valueType: 'text',
|
|
|
|
|
sorter: false,
|
|
|
|
|
hideInTable: false,
|
|
|
|
|
hideInForm: false,
|
|
|
|
@ -157,7 +157,7 @@ const CourseList: React.FC = () => {
|
|
|
|
|
sorter: false,
|
|
|
|
|
hideInForm: false,
|
|
|
|
|
hideInSearch: true,
|
|
|
|
|
renderFormItem:() => (
|
|
|
|
|
renderFormItem: () => (
|
|
|
|
|
<Upload >
|
|
|
|
|
<Button icon={<UploadOutlined />}>上传视频</Button>
|
|
|
|
|
</Upload>),
|
|
|
|
@ -199,14 +199,14 @@ const CourseList: React.FC = () => {
|
|
|
|
|
</a>,
|
|
|
|
|
<a
|
|
|
|
|
key="update"
|
|
|
|
|
onClick={() => {
|
|
|
|
|
onClick={() => {
|
|
|
|
|
setCurrentRow(record);
|
|
|
|
|
handleUpdateModalVisible(true);
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
编辑
|
|
|
|
|
</a>,
|
|
|
|
|
<a key="remove" onClick={()=>{}}>
|
|
|
|
|
<a key="remove" onClick={() => { }}>
|
|
|
|
|
删除
|
|
|
|
|
</a>,
|
|
|
|
|
],
|
|
|
|
@ -257,7 +257,7 @@ const CourseList: React.FC = () => {
|
|
|
|
|
</Button>,
|
|
|
|
|
]}
|
|
|
|
|
request={async (value) => {
|
|
|
|
|
const _data = await queryCourseList(value);
|
|
|
|
|
const _data = await queryCourseList(value);
|
|
|
|
|
return {
|
|
|
|
|
current: _data?.page_number,
|
|
|
|
|
data: _data?.data?.list,
|
|
|
|
@ -311,8 +311,8 @@ const CourseList: React.FC = () => {
|
|
|
|
|
footer={null}
|
|
|
|
|
centered
|
|
|
|
|
>
|
|
|
|
|
{ console.log('currentRow', currentRow)}
|
|
|
|
|
{ console.log('columns', columns.slice(0, columns.length - 1))}
|
|
|
|
|
{console.log('currentRow', currentRow)}
|
|
|
|
|
{console.log('columns', columns.slice(0, columns.length - 1))}
|
|
|
|
|
{currentRow?.course_id && (
|
|
|
|
|
<Row>
|
|
|
|
|
<Col span={14}>
|
|
|
|
@ -341,26 +341,26 @@ const CourseList: React.FC = () => {
|
|
|
|
|
durationDisplay: true,
|
|
|
|
|
remainingTimeDisplay: true,
|
|
|
|
|
fullscreenToggle: true // 全屏按钮
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
onReady={(play: any)=>{
|
|
|
|
|
onReady={(play: any) => {
|
|
|
|
|
console.log('play====', play);
|
|
|
|
|
playerRef.current = play
|
|
|
|
|
play.play();
|
|
|
|
|
play.on("timeupdate", function(event) {
|
|
|
|
|
play.on("timeupdate", function (event) {
|
|
|
|
|
//const _timeCurrent = Date.parse(new Date().toString()) / 1000; // 当前时间
|
|
|
|
|
//setTimeUpdateState(_timeCurrent); //timeUpdateState
|
|
|
|
|
console.log('play--',play.currentTime())
|
|
|
|
|
console.log('play-%-', parseInt(play.currentTime()) % 15 )
|
|
|
|
|
if( parseInt(play.currentTime()) % 15 === 0){ // 每15秒更新进度
|
|
|
|
|
console.log('play--', play.currentTime())
|
|
|
|
|
console.log('play-%-', parseInt(play.currentTime()) % 15)
|
|
|
|
|
if (parseInt(play.currentTime()) % 15 === 0) { // 每15秒更新进度
|
|
|
|
|
console.log()
|
|
|
|
|
}
|
|
|
|
|
//var currentTime = parseInt(this.currentTime()); //当前时间
|
|
|
|
|
//var duration = this.duration(); //视频时常
|
|
|
|
|
//var percent = (currentTime / duration * 100).toFixed(0) + "%";
|
|
|
|
|
//console.log('event',event);
|
|
|
|
|
//$("#current").text(this.currentTime());
|
|
|
|
|
//$("#duration").text(duration);
|
|
|
|
|
//console.log('event',event);
|
|
|
|
|
//$("#current").text(this.currentTime());
|
|
|
|
|
//$("#duration").text(duration);
|
|
|
|
|
})
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
@ -380,18 +380,18 @@ const CourseList: React.FC = () => {
|
|
|
|
|
columns={
|
|
|
|
|
columns.slice(0, columns.length - 1) as ProDescriptionsItemProps<TableListItem>[]
|
|
|
|
|
}
|
|
|
|
|
style={{padding:'0 24px'}}
|
|
|
|
|
style={{ padding: '0 24px' }}
|
|
|
|
|
/>
|
|
|
|
|
</Col>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
)}
|
|
|
|
|
</Modal>
|
|
|
|
|
<ModalForm
|
|
|
|
|
title="标签管理"
|
|
|
|
|
visible={tagsModalVisible}
|
|
|
|
|
// onVisibleChange={handleModalVisible}
|
|
|
|
|
onVisibleChange={handleTagsModalVisible}
|
|
|
|
|
>
|
|
|
|
|
<Tags/>
|
|
|
|
|
<Tags />
|
|
|
|
|
</ModalForm>
|
|
|
|
|
|
|
|
|
|
<Modal
|
|
|
|
|