Commit 9ce18f7d by yuananting

fix:解决合并代码的冲突

parents 9e46dec4 5aef17a1
/* /*
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-07-23 14:54:16 * @Date: 2020-07-23 14:54:16
* @LastEditors: Please set LastEditors * @LastEditors: yuananting
* @LastEditTime: 2021-07-14 18:19:22 * @LastEditTime: 2021-07-18 16:53:35
* @Description: 大班直播课预览弹窗 * @Description: 大班直播课预览弹窗
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-05 10:07:47 * @Date: 2020-08-05 10:07:47
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-07-15 12:08:28 * @LastEditTime: 2021-07-18 16:54:11
* @Description: 线下课新增/编辑页 * @Description: 线下课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
import React from 'react'; import React from 'react';
import { Button, Input, Radio, message, Modal, TreeSelect, 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 $ from 'jquery';
import Bus from '@/core/bus';
import RangePicker from '@/modules/common/DateRangePicker'; import RangePicker from '@/modules/common/DateRangePicker';
import ShowTips from '@/components/ShowTips'; import ShowTips from '@/components/ShowTips';
import Breadcrumbs from '@/components/Breadcrumbs'; import Breadcrumbs from '@/components/Breadcrumbs';
...@@ -27,6 +26,7 @@ import GraphicsEditor from '../components/GraphicsEditor'; ...@@ -27,6 +26,7 @@ import GraphicsEditor from '../components/GraphicsEditor';
import MultipleDatePicker from '@/components/MultipleDatePicker'; import MultipleDatePicker from '@/components/MultipleDatePicker';
import ImgClipModal from '@/components/ImgClipModal'; import ImgClipModal from '@/components/ImgClipModal';
import './AddOfflineCourse.less'; import './AddOfflineCourse.less';
import Bus from '@/core/bus';
const { Option } = Select; const { Option } = Select;
const defaultCoverUrl = 'https://image.xiaomaiketang.com/xm/pxbWKsYA87.png'; const defaultCoverUrl = 'https://image.xiaomaiketang.com/xm/pxbWKsYA87.png';
...@@ -342,8 +342,7 @@ class AddOfflineCourse extends React.Component { ...@@ -342,8 +342,7 @@ class AddOfflineCourse extends React.Component {
visible: true, visible: true,
imageFile: file imageFile: file
}); });
} };
//获取resourceId //获取resourceId
getSignature = (blob, fileName) => { getSignature = (blob, fileName) => {
...@@ -626,11 +625,7 @@ class AddOfflineCourse extends React.Component { ...@@ -626,11 +625,7 @@ class AddOfflineCourse extends React.Component {
}); });
} }
changeIntro = (value, textLength) => { changeIntro = (value) => {
// const isMore = textLength > 1000;
// if (isMore) {
// message.warning('内容过长,不能超过1000字');
// }
this.setState({ introduce: value }); this.setState({ introduce: value });
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-05 10:07:47 * @Date: 2020-08-05 10:07:47
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-07-15 12:04:40 * @LastEditTime: 2021-07-18 16:54:33
* @Description: 线上课新增/编辑页 * @Description: 线上课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -45,7 +45,14 @@ const defaultScheduleMedia = [ ...@@ -45,7 +45,14 @@ const defaultScheduleMedia = [
] ]
const whetherVisitorsJoin = 'NO' const whetherVisitorsJoin = 'NO'
let cutFlag = false let cutFlag = false;
const SUPPORT_WORD_PDF = [
"application/msword",
"application/wps-writer",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/pdf",
"application/wps-office.pdf"
];
class AddVideoCourse extends React.Component { class AddVideoCourse extends React.Component {
constructor(props) { constructor(props) {
super(props) super(props)
...@@ -87,7 +94,6 @@ class AddVideoCourse extends React.Component { ...@@ -87,7 +94,6 @@ class AddVideoCourse extends React.Component {
], // 课节列表 ], // 课节列表
// videoType: "MP4", // videoType: "MP4",
mediaNameAlias: '', // 任一视频重命名的名称(气泡框) mediaNameAlias: '', // 任一视频重命名的名称(气泡框)
popConfirmVisible: false,
selectTypeList:['MP4'], selectTypeList:['MP4'],
accept:'video/mp4' accept:'video/mp4'
} }
...@@ -318,10 +324,11 @@ class AddVideoCourse extends React.Component { ...@@ -318,10 +324,11 @@ class AddVideoCourse extends React.Component {
return; return;
} }
selectedFileList.map((file,index) => { selectedFileList.map((file,index) => {
console.log('')
const { ossUrl, resourceId, folderName, folderFormat, folderSize } = file; const { ossUrl, resourceId, folderName, folderFormat, folderSize } = file;
const _mediaName =folderName.replace(`.${_.last(folderName.split('.')).toLowerCase()}`,'')
console.log('folderFormat',folderFormat); console.log('folderFormat',folderFormat);
if(folderFormat === 'MP4'){ if(folderFormat === 'MP4' || folderFormat === 'video/mp4'){
const videoDom = document.createElement('video') const videoDom = document.createElement('video')
videoDom.src = ossUrl videoDom.src = ossUrl
videoDom.onloadedmetadata = () => { videoDom.onloadedmetadata = () => {
...@@ -329,26 +336,17 @@ class AddVideoCourse extends React.Component { ...@@ -329,26 +336,17 @@ class AddVideoCourse extends React.Component {
mediaContent: resourceId, mediaContent: resourceId,
contentType: 'SCHEDULE', contentType: 'SCHEDULE',
mediaType: "VIDEO", mediaType: "VIDEO",
mediaName: folderName.replace('.mp4',''), mediaName: _mediaName,
videoDuration: videoDom.duration, videoDuration: videoDom.duration,
resourceId, resourceId,
mediaUrl: ossUrl, mediaUrl: ossUrl,
sort: _courseChapterList.length sort: _courseChapterList.length
}) })
this.setState({ this.setState({
// size: folderSize,
// videoName: folderName,
// videoType: folderFormat,
courseChapterList: _courseChapterList courseChapterList: _courseChapterList
}) })
} }
}else{ }else if( folderFormat==="WORD" || folderFormat==="PDF" || SUPPORT_WORD_PDF.indexOf(folderFormat)>-1){
let _mediaName = folderName;
if(folderFormat === 'PDF'){
_mediaName = folderName.replace('.pdf','')
}else{
_mediaName = folderName.replace('.doc','') && folderName.replace('.docx','')
}
const suffix = _.last(folderName.split('.')).toUpperCase(); const suffix = _.last(folderName.split('.')).toUpperCase();
_courseChapterList.push({ _courseChapterList.push({
mediaContent: resourceId, mediaContent: resourceId,
...@@ -556,7 +554,6 @@ class AddVideoCourse extends React.Component { ...@@ -556,7 +554,6 @@ class AddVideoCourse extends React.Component {
chapterNameValidateStatus: '', chapterNameValidateStatus: '',
        chapterNameHelpMsg: '',         chapterNameHelpMsg: '',
mediaNameAlias: '', mediaNameAlias: '',
popConfirmVisible: false
}) })
}); });
...@@ -684,6 +681,14 @@ class AddVideoCourse extends React.Component { ...@@ -684,6 +681,14 @@ class AddVideoCourse extends React.Component {
}) })
} }
} }
renderToolTipTitle = ()=> {
return (<div>
<p>视频支持mp4格式,大小不超过2G;</p>
<p>文件支持PDF、docx、doc格式,大小不超过100M</p>
</div>)
}
render() { render() {
const { const {
pageType, pageType,
...@@ -706,7 +711,6 @@ class AddVideoCourse extends React.Component { ...@@ -706,7 +711,6 @@ class AddVideoCourse extends React.Component {
id, id,
courseChapterList, courseChapterList,
imageFile, imageFile,
popConfirmVisible,
selectTypeList, selectTypeList,
accept accept
} = this.state } = this.state
...@@ -738,7 +742,7 @@ class AddVideoCourse extends React.Component { ...@@ -738,7 +742,7 @@ class AddVideoCourse extends React.Component {
<div className='upload-video mt16'> <div className='upload-video mt16'>
<div className='content flex'> <div className='content flex'>
<span className='label required'>上传课节:</span> <span className='label required upload-chapter'>上传课节:</span>
</div> </div>
<div className='sub-content'> <div className='sub-content'>
<div className="btn-wrap"> <div className="btn-wrap">
...@@ -761,7 +765,7 @@ class AddVideoCourse extends React.Component { ...@@ -761,7 +765,7 @@ class AddVideoCourse extends React.Component {
</div> </div>
<div className='tips'> <div className='tips'>
课节数量限制20个,文件规格说明 课节数量限制20个,文件规格说明
<Tooltip title="视频支持mp4格式,大小不超过2G;文件支持PDF、docx、doc格式,大小不超过100M"> <Tooltip title={this.renderToolTipTitle()} overlayClassName="my-chapter-tooltip">
<i className='icon iconfont' style={{ cursor: 'pointer', color: '#bfbfbf', fontSize: '14px'}}> &#xe61d;</i> <i className='icon iconfont' style={{ cursor: 'pointer', color: '#bfbfbf', fontSize: '14px'}}> &#xe61d;</i>
</Tooltip> </Tooltip>
</div> </div>
...@@ -821,7 +825,7 @@ class AddVideoCourse extends React.Component { ...@@ -821,7 +825,7 @@ class AddVideoCourse extends React.Component {
</If> </If>
<div className='cover-url flex mt16'> <div className='cover-url flex mt16'>
<div className='label'>封面图:</div> <div className='label cover'>封面图:</div>
<div className='cover-url__wrap'> <div className='cover-url__wrap'>
<div className='opt-btns'> <div className='opt-btns'>
<div> <div>
......
...@@ -32,6 +32,12 @@ ...@@ -32,6 +32,12 @@
display:inline-block; display:inline-block;
text-align:right; text-align:right;
width:85px; width:85px;
&.upload-chapter {
margin-top: 6px;
}
&.cover {
margin-top: 2px;
}
} }
.required { .required {
position: relative; position: relative;
...@@ -172,10 +178,9 @@ ...@@ -172,10 +178,9 @@
} }
.course-chapter-list { .course-chapter-list {
max-height: 245px; max-height: 245px;
min-height: 130px;
overflow-y: auto ; overflow-y: auto ;
border-radius: 4px; border-radius: 4px;
padding: 16px; padding: 12px 16px 16px 16px;
.course-ware { .course-ware {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -257,4 +262,27 @@ ...@@ -257,4 +262,27 @@
.ant-form-item-explain { .ant-form-item-explain {
min-height: 0; min-height: 0;
} }
}
.course-chapter-title-popover {
.tag-title {
color: #333333;
margin-bottom: 8px;
width: 318px;
}
.chapter-btns {
margin-top: 16px;
display: flex;
justify-content: flex-end;
.confirm {
margin-left: 8px;
}
}
.ant-form-item {
margin-bottom: 0 !important;
}
}
.my-chapter-tooltip {
max-width: 600px!important;
} }
\ No newline at end of file
/* /*
* @Author: wufan * @Author: wufan
* @Date: 2020-04-28 18:05:30 * @Date: 2020-04-28 18:05:30
* @LastEditors: Please set LastEditors * @LastEditors: yuananting
* @LastEditTime: 2021-07-13 15:26:11 * @LastEditTime: 2021-07-15 14:04:21
* @Description: 线上课课程课节详情 * @Description: 线上课课程课节详情
*/ */
......
...@@ -111,53 +111,53 @@ class AddVideoIntro extends React.Component { ...@@ -111,53 +111,53 @@ class AddVideoIntro extends React.Component {
<span className='label'>观看设置:</span> <span className='label'>观看设置:</span>
<div className='content'> <div className='content'>
<div> <div>
<Switch checked={whetherVisitorsJoin === 'NO' ? true : false} onChange={this.whetherVisitorsJoinChange} /> <Switch checked={whetherVisitorsJoin==="NO"? true:false} onChange={this.whetherVisitorsJoinChange}/>
</div> </div>
<div> <div>
<div className='desc'> <div className="desc">
<Choose> <Choose>
<When condition={whetherVisitorsJoin === 'NO'}> <When condition={whetherVisitorsJoin==="NO"}>
<div>已开启,学员需绑定手机号才可观看</div> <div>已开启,学员需绑定手机号才可观看</div>
</When> </When>
<Otherwise> <Otherwise>
<div>已关闭,学员无需绑定手机号即可观看</div> <div>已关闭,学员无需绑定手机号即可观看</div>
</Otherwise> </Otherwise>
</Choose> </Choose>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div className='store-show'> <div className="store-show">
<span className='label'>学院展示:</span> <span className="label">学院展示:</span>
<div className='content'> <div className="content">
<Row> <Row>
<Col span={3}> <Col span={3}>
<Switch checked={shelfState === 'YES' ? true : false} onChange={this.shelfStateChange} /> <Switch checked={shelfState==="YES"? true:false} onChange={this.shelfStateChange}/>
</Col> </Col>
<Col span={21}> <Col span={21}>
<div className='desc'> <div className="desc">
<Choose> <Choose>
<When condition={shelfState === 'YES'}> <When condition={shelfState==="YES"}>
<div>已开启,课程将在该学院的学员课程列表中显示</div> <div>已开启,课程将在该学院的学员课程列表中显示</div>
</When> </When>
<Otherwise> <Otherwise>
<div>已关闭,课程将在该学院的学员课程列表中隐藏</div> <div>已关闭,课程将在该学院的学员课程列表中隐藏</div>
</Otherwise> </Otherwise>
</Choose> </Choose>
</div> </div>
</Col> </Col>
</Row> </Row>
</div> </div>
</div> </div>
<div className='introduce'> <div className="introduce">
<span className='label'>课程简介:</span> <span className="label">课程简介:</span>
<div className='content'> <div className="content">
<div className='intro-list'> <div className="intro-list">
<div className='intro-list__item introduce-editor'> <div className="intro-list__item introduce-editor">
{(!id || loadintroduce) && ( {(!id || loadintroduce) && (
<GraphicsEditor <GraphicsEditor
maxLimit={1000} maxLimit={1000}
id='intro' id="intro"
isIntro={true} isIntro={true}
detail={{ detail={{
content: introduce, content: introduce,
......
import React from 'react'; import React from 'react';
import './ChapterList.less'; import './ChapterList.less';
import { FileTypeIcon } from '@/common/constants/academic/lessonEnum'
const FileTypeIconMap = FileTypeIcon;
function ChapterList(props){ function ChapterList(props){
const { courseChapterList } = props; const { courseChapterList } = props;
...@@ -9,7 +12,8 @@ function ChapterList(props){ ...@@ -9,7 +12,8 @@ function ChapterList(props){
{ {
_.map(courseChapterList,(item,index) => { _.map(courseChapterList,(item,index) => {
return <div className='course-ware'> return <div className='course-ware'>
<div className='course-ware__index'>{index < 9 ? `0${index + 1 } ` : `${index + 1 } `}</div> <img className='course-ware__img' src={FileTypeIconMap[item.mediaType]} alt='' />
<div className='course-ware__index'>{index < 9 ? `0${index + 1 }` : `${index + 1 }`}</div>
<div className="course-ware__detail"> <div className="course-ware__detail">
<div className='course-ware__detail__name'>{item.mediaName}</div> <div className='course-ware__detail__name'>{item.mediaName}</div>
{ item.mediaType === 'VIDEO' && { item.mediaType === 'VIDEO' &&
......
...@@ -14,18 +14,24 @@ ...@@ -14,18 +14,24 @@
font-weight: 500; font-weight: 500;
color: #999999; color: #999999;
line-height: 18px; line-height: 18px;
white-space: nowrap;
margin-left: 8px;
margin-right: 6px;
line-height: 20px;
}
&__img {
width: 20px;
height: 20px;
} }
&__detail { &__detail {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: calc(~'100% - 18px');
&__name { &__name {
width: 267px;
font-size: 13px; font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
line-height: 21px; line-height: 20px;
margin-bottom: 4px; margin-bottom: 4px;
} }
&__duration { &__duration {
......
import React from 'react'; import React from "react"
import { Modal, message, Tooltip, Switch, Dropdown } from 'antd'; import { Modal, message, Tooltip, Switch, Dropdown } from "antd"
import _ from 'underscore'; import _ from "underscore"
import { PageControl } from '@/components'; import { PageControl } from "@/components"
import { LIVE_SHARE } from '@/domains/course-domain/constants'; import { LIVE_SHARE } from "@/domains/course-domain/constants"
import { Route, withRouter } from 'react-router-dom'; import { Route, withRouter } from 'react-router-dom';
import ShareLiveModal from '@/modules/course-manage/modal/ShareLiveModal'; import ShareLiveModal from "@/modules/course-manage/modal/ShareLiveModal"
import CourseService from '@/domains/course-domain/CourseService'; import CourseService from "@/domains/course-domain/CourseService"
import RelatedPlanModal from '../../modal/RelatedPlanModal'; import RelatedPlanModal from "../../modal/RelatedPlanModal"
import User from '@/common/js/user'; import User from "@/common/js/user"
import VideoCourseDetail from '../VideoCourseDetail'; import VideoCourseDetail from '../VideoCourseDetail';
import WatchData from './WatchData'; import WatchData from "./WatchData";
import { XMTable } from '@/components'; import { XMTable } from '@/components';
import college from '@/common/lottie/college'; import college from '@/common/lottie/college';
import './VideoCourseList.less'; import './VideoCourseList.less';
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @Description: * @Description:
* @Author: zangsuyun * @Author: zangsuyun
* @Date: 2021-03-12 14:49:40 * @Date: 2021-03-12 14:49:40
* @LastEditors: Please set LastEditors * @LastEditors: yuananting
* @LastEditTime: 2021-07-13 15:28:04 * @LastEditTime: 2021-07-18 16:58:23
* @Copyright: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyright: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: zhangleyuan * @Author: zhangleyuan
* @Date: 2021-02-20 16:13:39 * @Date: 2021-02-20 16:13:39
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-07-08 10:52:05 * @LastEditTime: 2021-07-18 16:06:17
* @Description: 描述一下 * @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -65,6 +65,7 @@ function AddPlan() { ...@@ -65,6 +65,7 @@ function AddPlan() {
planId: id, planId: id,
}).then((res) => { }).then((res) => {
const { const {
planId,
planName, planName,
enableState, enableState,
operateType, operateType,
...@@ -78,6 +79,7 @@ function AddPlan() { ...@@ -78,6 +79,7 @@ function AddPlan() {
let coverId; let coverId;
let coverUrl; let coverUrl;
let instro; let instro;
let hasIntro = false;
courseMediaVOS.map((item) => { courseMediaVOS.map((item) => {
switch (item.contentType) { switch (item.contentType) {
case 'COVER': case 'COVER':
...@@ -85,6 +87,7 @@ function AddPlan() { ...@@ -85,6 +87,7 @@ function AddPlan() {
coverUrl = item.mediaUrl; coverUrl = item.mediaUrl;
break; break;
case 'INTRO': case 'INTRO':
hasIntro = true;
instro = item.mediaContent; instro = item.mediaContent;
break; break;
default: default:
...@@ -102,6 +105,7 @@ function AddPlan() { ...@@ -102,6 +105,7 @@ function AddPlan() {
} }
setTaskList(trainingTaskList); setTaskList(trainingTaskList);
setBasicData({ setBasicData({
planId,
planName, planName,
coverUrl: coverUrl || defaultCover, coverUrl: coverUrl || defaultCover,
coverId, coverId,
...@@ -282,7 +286,7 @@ function AddPlan() { ...@@ -282,7 +286,7 @@ function AddPlan() {
<div className='add-plan-page__form'> <div className='add-plan-page__form'>
<div className='basic-info__wrap'> <div className='basic-info__wrap'>
<div className='title'>基本信息</div> <div className='title'>基本信息</div>
<BasicInfo data={basicData} onChange={handleChangeBasicInfo} /> <BasicInfo data={{ ...basicData, id}} onChange={handleChangeBasicInfo} />
</div> </div>
<div className='basic-info__wrap'> <div className='basic-info__wrap'>
<div className='title'>培训任务</div> <div className='title'>培训任务</div>
......
/* /*
* @Author: yuananting * @Author: yuananting
* @Date: 2021-07-05 10:48:08 * @Date: 2021-07-05 10:48:08
* @LastEditors: Please set LastEditors * @LastEditors: yuananting
* @LastEditTime: 2021-07-09 11:51:46 * @LastEditTime: 2021-07-18 16:58:40
* @Description: 描述一下咯 * @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...@@ -22,7 +22,7 @@ import SelectOperatorModal from '../modal/SelectOperatorModal'; ...@@ -22,7 +22,7 @@ import SelectOperatorModal from '../modal/SelectOperatorModal';
import SelectPrepareFileModal from '@/modules/prepare-lesson/modal/SelectPrepareFileModal'; import SelectPrepareFileModal from '@/modules/prepare-lesson/modal/SelectPrepareFileModal';
import Upload from '@/core/upload'; import Upload from '@/core/upload';
import GraphicsEditor from '@/modules/course-manage/components/GraphicsEditor'; import GraphicsEditor from '@/modules/course-manage/components/GraphicsEditor';
import ImgClipModal from '@/components/ImgClipModal'; import ImgClipModal from '@/components/ImgClipModal'
import './BasicInfo.less'; import './BasicInfo.less';
const defaultCover = 'https://image.xiaomaiketang.com/xm/rEAetaTEh3.png'; const defaultCover = 'https://image.xiaomaiketang.com/xm/rEAetaTEh3.png';
...@@ -133,13 +133,13 @@ class BasicInfo extends React.Component { ...@@ -133,13 +133,13 @@ class BasicInfo extends React.Component {
}; };
changeIntro = (value) => { changeIntro = (value) => {
this.props.onChange('introduce', value); this.props.onChange('instro', value);
}; };
render() { render() {
const { operatorModalVisible, showSelectFileModal, visible, imageFile } = this.state; const { operatorModalVisible, showSelectFileModal, visible, imageFile } = this.state;
const { data } = this.props; const { data } = this.props;
const { planName, coverUrl, introduce, enableState, operateType, selectOperatorList, percentCompleteLive, percentCompleteVideo, percentCompletePicture } = const { planName, coverUrl, instro, enableState, operateType, selectOperatorList, percentCompleteLive, percentCompleteVideo, percentCompletePicture, planId, id } =
data; data;
// 当前是否使用的是默认图片 // 当前是否使用的是默认图片
const isDefaultCover = coverUrl === defaultCover; const isDefaultCover = coverUrl === defaultCover;
...@@ -182,17 +182,17 @@ class BasicInfo extends React.Component { ...@@ -182,17 +182,17 @@ class BasicInfo extends React.Component {
</div> </div>
<div className='introduction'> <div className='introduction'>
<span className='label'>简介:</span> <span className='label'>简介:</span>
<GraphicsEditor {(!id || planId ) && (<GraphicsEditor
id='intro' id='intro'
isIntro={true} isIntro={true}
maxLimit={1000} maxLimit={1000}
detail={{ detail={{
content: introduce, content: instro,
}} }}
onChange={(val) => { onChange={(val) => {
this.changeIntro(val); this.changeIntro(val);
}} }}
/> />)}
</div> </div>
<div className='wether-use'> <div className='wether-use'>
<span className='label'>是否启用:</span> <span className='label'>是否启用:</span>
......
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
} }
.choose-business { .choose-business {
margin-top: 12px; margin-top: 12px;
margin-left: 24px;
.ant-btn { .ant-btn {
margin-right: 12px; margin-right: 12px;
} }
......
/* /*
* @Author: zhangleyuan * @Author: zhangleyuan
* @Date: 2021-02-20 16:46:46 * @Date: 2021-02-20 16:46:46
* @LastEditors: fusanqiasng * @LastEditors: yuananting
* @LastEditTime: 2021-06-15 14:37:20 * @LastEditTime: 2021-07-18 16:58:52
* @Description: 描述一下 * @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -52,7 +52,6 @@ function PlanList(props) { ...@@ -52,7 +52,6 @@ function PlanList(props) {
title: '课程总数量', title: '课程总数量',
key: 'courseNum', key: 'courseNum',
dataIndex: 'courseNum', dataIndex: 'courseNum',
width: 110,
render: (val, record) => { render: (val, record) => {
return <div className='course-number'>{val}</div>; return <div className='course-number'>{val}</div>;
}, },
......
.plan-list { .plan-list {
margin-top: 12px; margin-top: 12px;
.course-number { .course-number {
text-align: right;
margin-right: 45px; margin-right: 45px;
} }
......
/* /*
* @Author: yuananting * @Author: yuananting
* @Date: 2021-07-05 10:50:10 * @Date: 2021-07-05 10:50:10
* @LastEditors: yuananting * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-13 19:55:29 * @LastEditTime: 2021-07-18 10:47:02
* @Description: 描述一下咯 * @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
import React from 'react'; import React from 'react';
import _ from 'underscore'; import _ from 'underscore';
import { Table, Radio, Tabs, Modal, Input, message, Button, Tooltip } from 'antd'; import { Radio, Tabs, Modal, Input, message, Button, Tooltip } from 'antd';
import { PageControl } from '@/components'; import { PageControl, XMTable } from '@/components';
import college from '@/common/lottie/college';
import CourseService from '@/domains/course-domain/CourseService'; import CourseService from '@/domains/course-domain/CourseService';
import User from '@/common/js/user'; import User from '@/common/js/user';
...@@ -732,7 +733,11 @@ class SelectOperatorModal extends React.Component { ...@@ -732,7 +733,11 @@ class SelectOperatorModal extends React.Component {
</div> </div>
</div> </div>
<div> <div>
<Table <XMTable
renderEmpty={{
image: college,
description: '暂无数据',
}}
rowKey={(record) => record.liveCourseId} rowKey={(record) => record.liveCourseId}
dataSource={liveDataSource} dataSource={liveDataSource}
columns={this.parseLiveColumns()} columns={this.parseLiveColumns()}
...@@ -824,7 +829,11 @@ class SelectOperatorModal extends React.Component { ...@@ -824,7 +829,11 @@ class SelectOperatorModal extends React.Component {
</div> </div>
</div> </div>
<div> <div>
<Table <XMTable
renderEmpty={{
image: college,
description: '暂无数据',
}}
rowKey={(record) => record.id} rowKey={(record) => record.id}
dataSource={videoDataSource[videoCourseDivision]} dataSource={videoDataSource[videoCourseDivision]}
columns={this.parseVideoColumns()} columns={this.parseVideoColumns()}
...@@ -929,7 +938,11 @@ class SelectOperatorModal extends React.Component { ...@@ -929,7 +938,11 @@ class SelectOperatorModal extends React.Component {
</div> </div>
</div> </div>
<div> <div>
<Table <XMTable
renderEmpty={{
image: college,
description: '暂无数据',
}}
rowKey={(record) => record.id} rowKey={(record) => record.id}
dataSource={pictureDataSource} dataSource={pictureDataSource}
columns={this.parsePictureColumns()} columns={this.parsePictureColumns()}
......
...@@ -290,7 +290,8 @@ class SelectPrepareFileModal extends React.Component { ...@@ -290,7 +290,8 @@ class SelectPrepareFileModal extends React.Component {
const { fileListRef } = this.refs; const { fileListRef } = this.refs;
// const hasReachBottom = fileListRef.scrollTop + fileListRef.clientHeight === fileListRef.scrollHeight; // const hasReachBottom = fileListRef.scrollTop + fileListRef.clientHeight === fileListRef.scrollHeight;
const hasReachBottom = fileListRef.scrollTop + fileListRef.clientHeight > fileListRef.scrollHeight - 1; const hasReachBottom = fileListRef.scrollTop + fileListRef.clientHeight > fileListRef.scrollHeight - 10;
console.log("fileListRef.scrollTop + fileListRef.clientHeight",hasReachBottom,fileListRef.scrollTop , fileListRef.clientHeight,fileListRef.scrollHeight)
if (!hasReachBottom || !hasMore) return; if (!hasReachBottom || !hasMore) return;
const currentFolder = folderPathList[folderPathList.length - 1]; const currentFolder = folderPathList[folderPathList.length - 1];
...@@ -325,14 +326,16 @@ class SelectPrepareFileModal extends React.Component { ...@@ -325,14 +326,16 @@ class SelectPrepareFileModal extends React.Component {
// 上传文件 // 上传文件
handleUpload = (event) => { handleUpload = (event) => {
const { selectType,accept} = this.props;
const { selectType } = this.props;
const fileList = event.target.files; const fileList = event.target.files;
// 判断文件的大小是否超出了限制 // 判断文件的大小是否超出了限制
const nonCompliantFileList = []; const nonCompliantFileList = [];
const _fileList = [...fileList]; const _fileList = [...fileList];
const _accept = accept.split(',');
console.log("_fileList",_fileList);
console.log('accept',_accept);
_fileList.map((file, index) => { _fileList.map((file, index) => {
console.log('file',file);
let { size, type, name } = file; let { size, type, name } = file;
if (!type) { if (!type) {
type = getFileTypeByName(name); type = getFileTypeByName(name);
...@@ -341,6 +344,11 @@ class SelectPrepareFileModal extends React.Component { ...@@ -341,6 +344,11 @@ class SelectPrepareFileModal extends React.Component {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
console.log('type',type);
//mac的企业微信环境下加accept不起作用,所以需要我们在选择完成后做一层限制
// if(accept && _accept.indexOf("."+_.last(name.split('.')).toLowerCase()) === -1){
// _fileList.splice(index, 1);
// }
file.key = count++; file.key = count++;
}); });
console.log("nonCompliantFileList",nonCompliantFileList); console.log("nonCompliantFileList",nonCompliantFileList);
...@@ -573,8 +581,9 @@ class SelectPrepareFileModal extends React.Component { ...@@ -573,8 +581,9 @@ class SelectPrepareFileModal extends React.Component {
} }
</div> </div>
{ {
!_.isEmpty(folderList) ? <Choose>
<div> <When condition={!_.isEmpty(folderList)}>
<div>
<div className="file-list" <div className="file-list"
onScrollCapture={() => this.handleScrollEvent()} onScrollCapture={() => this.handleScrollEvent()}
style={{ height: '320px', overflowY: 'auto' }} style={{ height: '320px', overflowY: 'auto' }}
...@@ -611,8 +620,7 @@ class SelectPrepareFileModal extends React.Component { ...@@ -611,8 +620,7 @@ class SelectPrepareFileModal extends React.Component {
// 文件禁止点击的情况(移动、直播场景下文件为Excel、文件已经被关联了、文件不合法) // 文件禁止点击的情况(移动、直播场景下文件为Excel、文件已经被关联了、文件不合法)
const disabled = hiddenVideo || (!isFolder && operateType === 'move') || (scene === 'liveCourse' && folder.folderFormat === 'EXCEL') || !!hasRelation || (!isFolder && !FILE_SUFFIX_LIST.includes(suffix)); const disabled = hiddenVideo || (!isFolder && operateType === 'move') || (scene === 'liveCourse' && folder.folderFormat === 'EXCEL') || !!hasRelation || (!isFolder && !FILE_SUFFIX_LIST.includes(suffix));
// console.log('currentFile',currentFile);
// console.log('folder',folder);
let currentFileCheck = false; let currentFileCheck = false;
if(currentFile){ if(currentFile){
currentFileCheck = (currentFile.id===folder.id) currentFileCheck = (currentFile.id===folder.id)
...@@ -660,12 +668,16 @@ class SelectPrepareFileModal extends React.Component { ...@@ -660,12 +668,16 @@ class SelectPrepareFileModal extends React.Component {
}) })
} }
</div> </div>
</div> : </div>
<LottieIcon </When>
<Otherwise>
<LottieIcon
title={<span className="desc">这个文件夹是空的</span>} title={<span className="desc">这个文件夹是空的</span>}
type="college" type="college"
size={150} size={150}
/> />
</Otherwise>
</Choose>
} }
<UploadProgressModal <UploadProgressModal
......
/* /*
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2019-09-10 18:26:03 * @Date: 2019-09-10 18:26:03
* @LastEditors: yuananting * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-06 14:37:49 * @LastEditTime: 2021-07-14 14:14:16
* @Description: * @Description:
*/ */
import React, { useRef, useContext, useEffect, useState } from 'react'; import React, { useRef, useContext, useEffect, useState } from 'react';
...@@ -344,7 +344,7 @@ function Header(props) { ...@@ -344,7 +344,7 @@ function Header(props) {
<div className='h5-url'> <div className='h5-url'>
<div className='name'>手机端学院</div> <div className='name'>手机端学院</div>
<div id='h5-qrcode'></div> <div id='h5-qrcode'></div>
<div className='tip'>微信扫码,打开学院</div> <div className='tip'>企业员工扫码登录学院</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -378,7 +378,7 @@ ...@@ -378,7 +378,7 @@
.name, .name,
.tip { .tip {
width: 70px; width: 70px;
font-size: 14px; font-size: 13px;
color: #333333; color: #333333;
line-height: 52px; line-height: 52px;
margin: 0 auto; margin: 0 auto;
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
.ant-menu-item { .ant-menu-item {
padding-left: 46px !important; padding-left: 46px !important;
&:hover { &:hover {
color: @active-color!important; color: #333!important;
} }
} }
} }
...@@ -131,17 +131,20 @@ ...@@ -131,17 +131,20 @@
.ant-menu-item-selected { .ant-menu-item-selected {
color: @active-color; color: @active-color;
font-weight: 500; font-weight: 500;
&:hover {
color: @active-color!important;
}
.listType { .listType {
background: @active-color; background: @active-color;
} }
} }
.ant-menu-submenu-arrow { .ant-menu-submenu-arrow {
right: 22px; right: 10px!important;
color: @active-color; color: @active-color;
} }
} }
.ant-menu-submenu-arrow { .ant-menu-submenu-arrow {
right: 22px; right: 10px!important;
color: #5e606a; color: #5e606a;
} }
} }
...@@ -277,6 +280,10 @@ ...@@ -277,6 +280,10 @@
left: 74px; left: 74px;
} }
} }
.ant-menu-inline .ant-menu-item, .ant-menu-inline .ant-menu-submenu-title {
width: calc(100% - 15px)!important;
}
.ant-menu-submenu:hover { .ant-menu-submenu:hover {
// background: rgba(41, 102, 255, .05) !important; // background: rgba(41, 102, 255, .05) !important;
&.ant-menu-submenu-title:hover { &.ant-menu-submenu-title:hover {
......
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