Commit a60476cb by zhangleyuan

feat:增加培训计划

parents 84ed76f5 1a26589e
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
"private": true, "private": true,
"homepage": "./", "homepage": "./",
"dependencies": { "dependencies": {
"@antv/data-set": "^0.11.8",
"@antv/g2": "^3.5.13",
"@babel/core": "7.9.0", "@babel/core": "7.9.0",
"@babel/plugin-transform-typescript": "^7.11.0", "@babel/plugin-transform-typescript": "^7.11.0",
"@babel/preset-typescript": "^7.10.4", "@babel/preset-typescript": "^7.10.4",
...@@ -29,6 +31,7 @@ ...@@ -29,6 +31,7 @@
"babel-plugin-jsx-control-statements": "^4.1.0", "babel-plugin-jsx-control-statements": "^4.1.0",
"babel-plugin-named-asset-import": "^0.3.6", "babel-plugin-named-asset-import": "^0.3.6",
"babel-preset-react-app": "^9.1.2", "babel-preset-react-app": "^9.1.2",
"bizcharts": "^4.1.7",
"camelcase": "^5.3.1", "camelcase": "^5.3.1",
"case-sensitive-paths-webpack-plugin": "2.3.0", "case-sensitive-paths-webpack-plugin": "2.3.0",
"classnames": "^2.2.6", "classnames": "^2.2.6",
......
...@@ -57,7 +57,7 @@ class NonCompliantFileModal extends React.Component { ...@@ -57,7 +57,7 @@ class NonCompliantFileModal extends React.Component {
<div className="tips"> <div className="tips">
<span className="icon iconfont">&#xe6f2;</span> <span className="icon iconfont">&#xe6f2;</span>
<span className="tips__text"> <span className="tips__text">
支持上传:Word(100M以内)、Excel(10M以内)、PPT(100M以内)、PDF(100M以内)、图片(5M以内)、音频(20M以内)、视频(500M以内) 支持上传:Word(100M以内)、Excel(10M以内)、PPT(100M以内)、PDF(100M以内)、图片(5M以内)、音频(20M以内)、视频(2G以内)
</span> </span>
</div> </div>
</Modal> </Modal>
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* @Last Modified by: 吴文洁 * @Last Modified by: 吴文洁
* @Last Modified time: 2020-07-16 11:32:50 * @Last Modified time: 2020-07-16 11:32:50
*/ */
const DEFAULT_SIZE_UNIT = 1024 * 1024; // 将B转换成M const DEFAULT_SIZE_UNIT = 1000 * 1000; // 将B转换成M
const GIGABYTE_SIZE_UNIT = 1024 * 1024 * 1024; // 转换为G const GIGABYTE_SIZE_UNIT = 1000 * 1000 * 1000; // 转换为G
const SupportFileType = [ const SupportFileType = [
"application/msword", "application/msword",
...@@ -106,11 +106,11 @@ const FileVerifyMap = { ...@@ -106,11 +106,11 @@ const FileVerifyMap = {
}, },
"audio/mp4": { "audio/mp4": {
type: "MP4", type: "MP4",
maxSize: 500 maxSize: 2000
}, },
"video/mp4": { "video/mp4": {
type: "MP4", type: "MP4",
maxSize: 500 maxSize: 2000
} }
}; };
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-07-23 17:11:49 * @Date: 2020-07-23 17:11:49
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-18 17:54:36 * @LastEditTime: 2021-03-04 17:16:01
* @Description: * @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
const DEFAULT_SIZE_UNIT = 1024 * 1024; // 将B转换成M const DEFAULT_SIZE_UNIT = 1000 * 1000; // 将B转换成M
const SupportFileType = [ const SupportFileType = [
"application/msword", "application/msword",
......
...@@ -1346,16 +1346,6 @@ input:focus { ...@@ -1346,16 +1346,6 @@ input:focus {
} }
} }
.g2-tooltip {
background: rgba(0, 0, 0, 0.7) !important;
.g2-tooltip-list {
li {
color: #fff !important;
}
}
}
.BMap_cpyCtrl { .BMap_cpyCtrl {
display: none; display: none;
} }
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-20 09:21:40 * @Date: 2020-08-20 09:21:40
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-31 10:39:16 * @LastEditTime: 2021-03-04 17:16:30
* @Description: * @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
const DEFAULT_SIZE_UNIT: number = 1024 * 1024; // 将B转换成M const DEFAULT_SIZE_UNIT: number = 1000 * 1000; // 将B转换成M
const SUFFIX_MAP: { const SUFFIX_MAP: {
[key: string]: string [key: string]: string
...@@ -139,11 +139,11 @@ const FILR_VERIFY_MAP = { ...@@ -139,11 +139,11 @@ const FILR_VERIFY_MAP = {
}, },
"audio/mp4": { "audio/mp4": {
type: "MP4", type: "MP4",
maxSize: 500 maxSize: 2000
}, },
"video/mp4": { "video/mp4": {
type: "MP4", type: "MP4",
maxSize: 500 maxSize: 2000
} }
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-24 12:20:57 * @Date: 2020-08-24 12:20:57
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-02 15:16:04 * @LastEditTime: 2021-03-17 19:42:47
* @Description: * @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
--> -->
......
...@@ -244,7 +244,7 @@ class AddLiveIntro extends React.Component { ...@@ -244,7 +244,7 @@ class AddLiveIntro extends React.Component {
}}>上传图片/视频</Button> }}>上传图片/视频</Button>
<div className="tips"> <div className="tips">
<div>建议尺寸1280*720px或16:9。图片最大5M,支持jpg、jpeg和png;视频最大500M</div> <div>建议尺寸1280*720px或16:9。图片最大5M,支持jpg、jpeg和png;视频最大2G</div>
<div>支持mp4。</div> <div>支持mp4。</div>
</div> </div>
......
...@@ -572,7 +572,7 @@ class AddVideoCourse extends React.Component { ...@@ -572,7 +572,7 @@ class AddVideoCourse extends React.Component {
}} }}
>{`${(pageType === 'add' && !scheduleVideoId) ? '选择' : '更换'}视频`}</Button> >{`${(pageType === 'add' && !scheduleVideoId) ? '选择' : '更换'}视频`}</Button>
<span className="tips">视频数量限制1个,大小不超过500M</span> <span className="tips">视频数量限制1个,大小不超过2G</span>
</div> </div>
</div> </div>
...@@ -630,9 +630,9 @@ class AddVideoCourse extends React.Component { ...@@ -630,9 +630,9 @@ class AddVideoCourse extends React.Component {
accept="video/mp4" accept="video/mp4"
confirm={{ confirm={{
title: '文件过大,无法上传', title: '文件过大,无法上传',
content: '为保障学员的观看体验,上传的视频大小不能超过500M', content: '为保障学员的观看体验,上传的视频大小不能超过2G',
}} }}
tooltip={'格式支持mp4,大小不超过500M'} tooltip={'格式支持mp4,大小不超过2G'}
isOpen={showSelectFileModal} isOpen={showSelectFileModal}
diskList={diskList} diskList={diskList}
addVideo={true} addVideo={true}
......
.home-page {
padding: 0 16px 16px;
min-width: 1100px;
.home-title {
height: 44px;
line-height: 44px;
color: #999;
}
@font-face {
font-family: 'number';
src: url('https://image.xiaomaiketang.com/xm/n2sADd2jY6.TTF');
}
.data-box {
display: flex;
justify-content: space-between;
.data-item {
position: relative;
height: 156px;
background: #fff;
width: ~'calc(16.67% - 8px)';
padding: 16px;
&.course-data {
width: ~'calc(50% - 24px)';
}
.header {
display: flex;
.header-icon {
width: 18px;
height: 18px;
margin-right: 4px;
}
.header-word {
display: inline-block;
font-size: 12px;
line-height: 18px;
color: #999;
}
}
.data-number {
font-family: 'number';
font-size: 28px;
color: #333;
margin-top: 24px;
}
.data-footer {
margin-top: 12px;
.footer-word {
font-size: 12px;
color: #999;
margin-right: 8px;
}
.iconfont {
font-size: 12px;
margin-right: 4px;
color: #EC4B35;
}
.footer-number {
font-size: 12px;
color: #999;
}
}
.course-box {
border-radius: 4px;
background: #FAFAFA;
height: 124px;
width: 66%;
position: absolute;
right: 16px;
top: 16px;
padding: 8px 24px 0;
.course-item {
display: inline-block;
width: 50%;
padding: 4px 0 12px;
.course-title {
font-size: 12px;
color: #999;
}
.data {
display: flex;
align-items: flex-end;
.course-number {
font-size: 16px;
font-family: 'number';
margin-right: 16px;
}
.course-word {
font-size: 12px;
color: #999;
margin-right: 8px;
}
.iconfont {
font-size: 12px;
margin-right: 4px;
color: #EC4B35;
}
.add-number {
font-size: 12px;
color: #999;
}
}
}
}
}
}
.study-box {
display: flex;
justify-content: space-between;
.study-item {
position: relative;
height: 414px;
background: #fff;
width: ~'calc(50% - 8px)';
padding: 16px;
.study-title {
font-size: 16px;
color: #333;
font-weight: 500;
line-height: 22px;
margin-bottom: 12px;
.iconfont {
font-size: 14px;
color: #BFBFBF;
margin-left: 4px;
}
.tip {
font-size: 14px;
color: #999999;
margin-left: 8px;
font-weight: 400;
}
}
.study-header {
display: flex;
justify-content: space-between;
margin-bottom: 16px;
.study-tab {
.tab {
position: relative;
padding-right: 24px;
color: #666;
cursor: pointer;
&.selected {
color: #FDB513;
&::after {
position: absolute;
width: 24px;
height: 2px;
content: '';
background: #FDB513;
border-radius: 1px;
left: 9px;
bottom: -4px;
}
}
}
}
.study-select {
.select-word {
color: #999;
margin-right: 8px;
}
}
}
.table-item {
width: 100%;
height: 60px;
display: flex;
align-items: center;
&.odd {
background: #FAFAFA;
}
.table-image {
width: 24px;
height: 24px;
}
.table-number {
width: 15%;
color: #999;
padding: 0 16px;
text-align: center;
}
.table-data {
width: 55%;
padding: 0 16px;
.table-name {
color: #333;
line-height: 20px;
margin-bottom: 2px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.table-tag {
line-height: 17px;
color: #999;
font-size: 12px;
}
}
.table-study {
width: 30%;
color: #999;
padding: 0 16px;
}
}
.study-empty {
margin-top: 102px;
img {
display: block;
width: 100px;
height: 100px;
margin: 0 auto 8px;
}
div {
text-align: center;
color: #333;
}
}
.circle-box {
width: 70%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
.big-circle {
display: flex;
align-items: center;
justify-content: center;
width: 204px;
height: 204px;
border-radius: 102px;
background: #F1F3F6;
margin-top: -20px;
.small-circle {
display: flex;
align-items: center;
justify-content: center;
width: 124px;
height: 124px;
border-radius: 62px;
background: #fff;
.tip-box {
text-align: center;
}
}
}
}
.circle-tip {
position: absolute;
left: 70%;
padding-left: 16px;
&.unfinished {
top: 152px;
.spot {
background: #5289FA;
}
}
&.finished {
top: 232px;
.spot {
background: #FFBB54;
}
}
.spot {
position: absolute;
width: 8px;
height: 8px;
border-radius: 4px;
top: 20px;
left: 0;
}
.number {
color: #333;
font-size: 16px;
margin-bottom: 2px;
}
.word {
color: #999;
}
}
}
}
.study-chart {
width: 100%;
height: 396px;
background: #fff;
padding: 16px;
margin-top: 16px;
.study-title {
font-size: 16px;
color: #333;
font-weight: 500;
line-height: 22px;
margin-bottom: 12px;
display: flex;
justify-content: space-between;
.study-select {
font-weight: 400;
font-size: 14px;
.select-word {
color: #999;
margin-right: 8px;
}
}
}
.chart-tip {
display: flex;
justify-content: space-between;
div {
color: #999;
.iconfont {
color: #bfbfbf;
font-size: 14px;
margin-left: 4px;
}
}
}
}
}
.g2-tooltip {
background-color: #fff !important;
}
.data-plan-tooltip {
max-width: none !important;
.ant-tooltip-inner {
white-space: nowrap;
max-width: none !important;
}
}
\ No newline at end of file
...@@ -448,7 +448,7 @@ class FolderList extends React.Component { ...@@ -448,7 +448,7 @@ class FolderList extends React.Component {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) { if (type.indexOf('video') > -1 && size > 2000 * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
......
...@@ -135,7 +135,7 @@ class OperateArea extends React.Component { ...@@ -135,7 +135,7 @@ class OperateArea extends React.Component {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) { if (type.indexOf('video') > -1 && size > 2000 * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
......
...@@ -57,7 +57,7 @@ class NonCompliantFileModal extends React.Component { ...@@ -57,7 +57,7 @@ class NonCompliantFileModal extends React.Component {
<div className="tips"> <div className="tips">
<span className="icon iconfont">&#xe6f2;</span> <span className="icon iconfont">&#xe6f2;</span>
<span className="tips__text"> <span className="tips__text">
支持上传:Word(100M以内)、Excel(10M以内)、PPT(100M以内)、PDF(100M以内)、图片(5M以内)、音频(20M以内)、视频(500M以内) 支持上传:Word(100M以内)、Excel(10M以内)、PPT(100M以内)、PDF(100M以内)、图片(5M以内)、音频(20M以内)、视频(2G以内)
</span> </span>
</div> </div>
</Modal> </Modal>
......
...@@ -336,18 +336,6 @@ class SelectPrepareFileModal extends React.Component { ...@@ -336,18 +336,6 @@ class SelectPrepareFileModal extends React.Component {
if (!type) { if (!type) {
type = getFileTypeByName(name); type = getFileTypeByName(name);
} }
// if (type.indexOf('image') > -1 && size > 5 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
// if (type.indexOf('audio') > -1 && size > 20 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
// if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
if (supportFileType.indexOf(type) > -1 && size > FileVerifyMap[type].maxSize * DEFAULT_SIZE_UNIT) { if (supportFileType.indexOf(type) > -1 && size > FileVerifyMap[type].maxSize * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
......
...@@ -484,7 +484,7 @@ class FolderList extends React.Component { ...@@ -484,7 +484,7 @@ class FolderList extends React.Component {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) { if (type.indexOf('video') > -1 && size > 2000 * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
......
...@@ -125,18 +125,6 @@ class OperateArea extends React.Component { ...@@ -125,18 +125,6 @@ class OperateArea extends React.Component {
if (!type) { if (!type) {
type = getFileTypeByName(name); type = getFileTypeByName(name);
} }
// if (type.indexOf('image') > -1 && size > 50 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
// if (type.indexOf('audio') > -1 && size > 50 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
// if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
if (localFileTypeMap.indexOf(type) > -1 && size > FileVerifyMap[type].maxSize * DEFAULT_SIZE_UNIT) { if (localFileTypeMap.indexOf(type) > -1 && size > FileVerifyMap[type].maxSize * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
......
...@@ -26,17 +26,17 @@ function SwitchRoute(props: SwitchProps) { ...@@ -26,17 +26,17 @@ function SwitchRoute(props: SwitchProps) {
switch (userRole) { switch (userRole) {
case "CloudManager": case "CloudManager":
window.RCHistory.replace({ window.RCHistory.replace({
pathname: `/redirect-to-live-course`, pathname: `/home`,
}); });
break; break;
case "StoreManager": case "StoreManager":
window.RCHistory.replace({ window.RCHistory.replace({
pathname: `/redirect-to-live-course`, pathname: `/home`,
}); });
break; break;
case "CloudLecturer": case "CloudLecturer":
window.RCHistory.replace({ window.RCHistory.replace({
pathname: `/redirect-to-resource-disk`, pathname: `/home`,
}); });
break; break;
case "CloudOperator": case "CloudOperator":
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* @LastEditTime: 2021-03-02 15:56:22 * @LastEditTime: 2021-03-02 15:56:22
* @Description: 内容线路由配置 * @Description: 内容线路由配置
*/ */
import Home from '@/modules/home/Home';
import EmployeesManagePage from '@/modules/store-manage/EmployeesManagePage'; import EmployeesManagePage from '@/modules/store-manage/EmployeesManagePage';
import personalInfoPage from '@/modules/personalInfo'; import personalInfoPage from '@/modules/personalInfo';
import UserManagePage from '@/modules/store-manage/UserManagePage'; import UserManagePage from '@/modules/store-manage/UserManagePage';
...@@ -26,6 +27,11 @@ import StoreInfoPage from '@/modules/store-manage/StoreInfo'; ...@@ -26,6 +27,11 @@ import StoreInfoPage from '@/modules/store-manage/StoreInfo';
const mainRoutes = [ const mainRoutes = [
{ {
path: '/home',
component: Home,
name: '中心首页'
},
{
path: '/employees-manage', path: '/employees-manage',
component: EmployeesManagePage, component: EmployeesManagePage,
name: '员工管理' name: '员工管理'
......
...@@ -8,6 +8,12 @@ ...@@ -8,6 +8,12 @@
*/ */
export const menuList: any = [ export const menuList: any = [
{ {
groupName: "中心首页",
groupCode: "CloudPage",
icon: '&#xe6b7;',
link: '/home'
},
{
groupName: "课程管理", groupName: "课程管理",
groupCode: "CloudCourse", groupCode: "CloudCourse",
icon: '&#xe831;', icon: '&#xe831;',
......
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