Commit 696c2a58 by yuananting

fix:解决合并代码的冲突

parents 01e01386 e5392e94
...@@ -98,7 +98,6 @@ class UploadProgressModal extends React.Component { ...@@ -98,7 +98,6 @@ class UploadProgressModal extends React.Component {
// 开始上传之前初始化OssClient // 开始上传之前初始化OssClient
this.initOssClient(id, resourceName).then((result) => { this.initOssClient(id, resourceName).then((result) => {
const { ossClient, resourceId, callBack, callbackBody, ossUri } = result; const { ossClient, resourceId, callBack, callbackBody, ossUri } = result;
console.log('type',type);
ossClient.multipartUpload(ossUri, fileContent, { ossClient.multipartUpload(ossUri, fileContent, {
callback: { callback: {
url: callBack, url: callBack,
......
...@@ -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 14:24:02 * @LastEditTime: 2021-07-21 14:02:15
* @Description: 线下课新增/编辑页 * @Description: 线下课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -841,7 +841,7 @@ class AddOfflineCourse extends React.Component { ...@@ -841,7 +841,7 @@ class AddOfflineCourse extends React.Component {
); );
}} }}
getPopupContainer={() => document.getElementById('teacher')}> getPopupContainer={() => document.getElementById('teacher')}>
{_.map(teacherList, (item, index) => { {_.map(teacherList, (item) => {
return ( return (
<Option value={item.id} key={item.id}> <Option value={item.id} key={item.id}>
{item.nickName} {item.nickName}
......
...@@ -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: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-16 15:52:42 * @LastEditTime: 2021-07-18 11:54:53
* @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)
...@@ -317,9 +324,10 @@ class AddVideoCourse extends React.Component { ...@@ -317,9 +324,10 @@ 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()}`,'') const _mediaName =folderName.replace(`.${_.last(folderName.split('.')).toLowerCase()}`,'')
console.log('folderFormat',folderFormat);
if(folderFormat === 'MP4' || folderFormat === 'video/mp4'){ if(folderFormat === 'MP4' || folderFormat === 'video/mp4'){
const videoDom = document.createElement('video') const videoDom = document.createElement('video')
videoDom.src = ossUrl videoDom.src = ossUrl
...@@ -338,7 +346,7 @@ class AddVideoCourse extends React.Component { ...@@ -338,7 +346,7 @@ class AddVideoCourse extends React.Component {
courseChapterList: _courseChapterList courseChapterList: _courseChapterList
}) })
} }
}else if( folderFormat==="WORD" || folderFormat==="PDF"){ }else if( folderFormat==="WORD" || folderFormat==="PDF" || SUPPORT_WORD_PDF.indexOf(folderFormat)>-1){
const suffix = _.last(folderName.split('.')).toUpperCase(); const suffix = _.last(folderName.split('.')).toUpperCase();
_courseChapterList.push({ _courseChapterList.push({
mediaContent: resourceId, mediaContent: resourceId,
......
...@@ -154,7 +154,7 @@ class AddVideoIntro extends React.Component { ...@@ -154,7 +154,7 @@ class AddVideoIntro extends React.Component {
<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"
......
...@@ -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-20 17:17:12
* @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,
......
...@@ -2,19 +2,11 @@ ...@@ -2,19 +2,11 @@
* @Author: yuananting * @Author: yuananting
* @Date: 2021-07-05 10:48:08 * @Date: 2021-07-05 10:48:08
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-07-15 14:20:15 * @LastEditTime: 2021-07-21 14:00:44
* @Description: 描述一下咯 * @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
/*
* @Author: zhangleyuan
* @Date: 2021-02-20 16:45:51
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-06 14:48:54
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import React from 'react'; import React from 'react';
import { Button, Input, Switch, Radio, Row, Col, message, Tooltip } from 'antd'; import { Button, Input, Switch, Radio, Row, Col, message, Tooltip } from 'antd';
import { withRouter } from 'react-router-dom'; import { withRouter } from 'react-router-dom';
...@@ -133,14 +125,10 @@ class BasicInfo extends React.Component { ...@@ -133,14 +125,10 @@ class BasicInfo extends React.Component {
this.props.onChange(field, _percentCompleteLive); this.props.onChange(field, _percentCompleteLive);
}; };
changeIntro = (value) => {
this.props.onChange('introduce', 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 } =
data; data;
// 当前是否使用的是默认图片 // 当前是否使用的是默认图片
const isDefaultCover = coverUrl === defaultCover; const isDefaultCover = coverUrl === defaultCover;
...@@ -183,24 +171,13 @@ class BasicInfo extends React.Component { ...@@ -183,24 +171,13 @@ class BasicInfo extends React.Component {
</div> </div>
<div className='introduction'> <div className='introduction'>
<span className='label'>简介:</span> <span className='label'>简介:</span>
{/* <TextArea <TextArea
placeholder='请输入培训计划简介' placeholder='请输入培训计划简介'
maxLength={200} maxLength={200}
style={{ width: '552px', height: '110px' }} style={{ width: '552px', height: '110px' }}
className='instro-textarea' className='instro-textarea'
value={instro} value={instro}
onChange={(e) => this.props.onChange('instro', e.target.value)} onChange={(e) => this.props.onChange('instro', e.target.value)}
/> */}
<GraphicsEditor
id='intro'
isIntro={true}
maxLimit={1000}
detail={{
content: introduce,
}}
onChange={(val) => {
this.changeIntro(val);
}}
/> />
</div> </div>
<div className='wether-use'> <div className='wether-use'>
......
/* /*
* @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()}
......
...@@ -326,14 +326,10 @@ class SelectPrepareFileModal extends React.Component { ...@@ -326,14 +326,10 @@ class SelectPrepareFileModal extends React.Component {
// 上传文件 // 上传文件
handleUpload = (event) => { handleUpload = (event) => {
const { selectType,accept} = 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) => {
let { size, type, name } = file; let { size, type, name } = file;
...@@ -344,11 +340,6 @@ class SelectPrepareFileModal extends React.Component { ...@@ -344,11 +340,6 @@ 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);
......
...@@ -85,9 +85,8 @@ function AddExam(props: any) { ...@@ -85,9 +85,8 @@ function AddExam(props: any) {
source: 0, source: 0,
} }
Service.Hades('public/hades/queryExamPageList', param).then(res=> { Service.Hades('public/hades/queryExamPageList', param).then(res=> {
console.log(res)
const { result = {} } = res; const { result = {} } = res;
setExamList(result.records) setExamList(result.records || [])
}) })
} }
...@@ -277,7 +276,7 @@ function AddExam(props: any) { ...@@ -277,7 +276,7 @@ function AddExam(props: any) {
// 校验考试名称是否存在 // 校验考试名称是否存在
function checkExist(examName: any) { function checkExist(examName: any) {
var result:any = null; var result:any = null;
examList.forEach((item:any) => { examList.length > 0 && examList.forEach((item:any) => {
if (result != null) { if (result != null) {
return result; return result;
} }
...@@ -454,24 +453,25 @@ function AddExam(props: any) { ...@@ -454,24 +453,25 @@ function AddExam(props: any) {
<div className="title" style={{ marginTop: 40 }}>考试设置</div> <div className="title" style={{ marginTop: 40 }}>考试设置</div>
<Form.Item label="身份验证" required> <Form.Item label="身份验证" required>
<div style={{ display: 'flex', marginLeft: 4, }}> <div style={{ display: 'flex', marginLeft: 4, }}>
<Switch style={{ position: 'relative', top: 6 }} <Switch
checked={needPhone == 'NEED_PHONE_VERIFY'} checked={needPhone == 'NEED_PHONE_VERIFY'}
onChange={(val) => { setNeedPhone(val ? 'NEED_PHONE_VERIFY' : 'DO_NOT_NEED_PHONE_VERIFY') }} onChange={(val) => { setNeedPhone(val ? 'NEED_PHONE_VERIFY' : 'DO_NOT_NEED_PHONE_VERIFY') }}
></Switch> ></Switch>
<div style={{ position: 'relative', top: 3, left: 8, color: "#999" }}><p>开启:需要绑定手机号的学员才能参加考试</p> <div style={{ position: 'relative', left: 8, color: "#999" }}>
<p>关闭:微信/企业微信登陆直接参加考试</p></div> {needPhone == 'NEED_PHONE_VERIFY' ? '已开启,学员需绑定手机号才可参与考试' : '已关闭,学员无需绑定手机号即可参与考试'}
</div>
</div> </div>
</Form.Item> </Form.Item>
<Form.Item label="选项乱序" required> <Form.Item label="选项乱序" required>
<div style={{ display: 'flex', marginLeft: 4, }}> <div style={{ display: 'flex', marginLeft: 4, }}>
<Switch style={{ position: 'relative', top: 6 }} <Switch
checked={needOptionDisorder == 'OPTION_RANDOM'} checked={needOptionDisorder == 'OPTION_RANDOM'}
onChange={(val) => { setNeedOptionDisorder(val ? 'OPTION_RANDOM' : 'OPTION_SORT') }} onChange={(val) => { setNeedOptionDisorder(val ? 'OPTION_RANDOM' : 'OPTION_SORT') }}
></Switch> ></Switch>
<div style={{ position: 'relative', top: 3, left: 8, color: "#999" }}><p>开启:选择题的选项随机排序</p> <div style={{ position: 'relative', left: 8, color: "#999" }}>
<p>关闭:选择题按题目原有顺序展示</p></div> {needOptionDisorder == 'OPTION_RANDOM' ? '已开启,选项随机排序' : '已关闭,选项按设置顺序排序'}
</div>
</div> </div>
</Form.Item> </Form.Item>
......
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