Commit 9ce18f7d by yuananting

fix:解决合并代码的冲突

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