Commit d7da5cd2 by zhangleyuan

feat:解决合并代码后的冲突

parents 9fd6948b f93b6906
...@@ -105,6 +105,10 @@ ...@@ -105,6 +105,10 @@
}, },
"scripts": { "scripts": {
"start": "node scripts/start.js", "start": "node scripts/start.js",
"start:dev": "cross-env DEPLOY_ENV=dev node scripts/start.js",
"start:dev1": "cross-env DEPLOY_ENV=dev node scripts/start.js",
"start:rc": "cross-env DEPLOY_ENV=rc node scripts/start.js",
"start:gray": "cross-env DEPLOY_ENV=gray node scripts/start.js",
"build:dev": "cross-env DEPLOY_ENV=dev node scripts/build.js", "build:dev": "cross-env DEPLOY_ENV=dev node scripts/build.js",
"build:dev1": "cross-env DEPLOY_ENV=dev node scripts/build.js", "build:dev1": "cross-env DEPLOY_ENV=dev node scripts/build.js",
"build:rc": "cross-env DEPLOY_ENV=rc node scripts/build.js", "build:rc": "cross-env DEPLOY_ENV=rc node scripts/build.js",
......
...@@ -80,7 +80,7 @@ class CopyFileModal extends React.Component { ...@@ -80,7 +80,7 @@ class CopyFileModal extends React.Component {
// const { folderPathList, folderList } = this.state; // const { folderPathList, folderList } = this.state;
const { folderPathList, disk } = this.state; const { folderPathList, disk } = this.state;
const { dataInfo } = this.props; const { dataInfo } = this.props;
const { id, createId, folderName } = dataInfo; const { id, createId, folderName,folderType} = dataInfo;
const newParentId = folderPathList[folderPathList.length-1].id; const newParentId = folderPathList[folderPathList.length-1].id;
const _params = { const _params = {
copyIds : [id], // 复制文件的ID copyIds : [id], // 复制文件的ID
...@@ -99,7 +99,10 @@ class CopyFileModal extends React.Component { ...@@ -99,7 +99,10 @@ class CopyFileModal extends React.Component {
} }
return allowCopy; return allowCopy;
}) })
if(folderPathList.length > 9 && folderType === 'FOLDER'){
allowCopy = 1;
message.warning('不能将文件夹复制到10级目录下');
}
if (allowCopy === 0) { if (allowCopy === 0) {
Service.Hades('public/hadesStore/copyFolder', _params).then((res) => { Service.Hades('public/hadesStore/copyFolder', _params).then((res) => {
if (res.success) { if (res.success) {
......
...@@ -11,32 +11,34 @@ import Storage from './storage'; ...@@ -11,32 +11,34 @@ import Storage from './storage';
import { PREFIX, USER_PREFIX } from '@/domains/basic-domain/constants'; import { PREFIX, USER_PREFIX } from '@/domains/basic-domain/constants';
class User { class User {
getStoreId() {
getStoreId(){ return Storage.get(`${PREFIX}_storeId`);
return Storage.get(`${PREFIX}_storeId`)
} }
getEnterpriseId() { getEnterpriseId() {
return Storage.get(`${PREFIX}_enterpriseId`) return Storage.get(`${PREFIX}_enterpriseId`);
} }
getStoreName(){ getStoreName() {
return Storage.get(`${PREFIX}_storeName`) return Storage.get(`${PREFIX}_storeName`);
} }
getStoreType(){ getStoreType() {
return Storage.get(`${PREFIX}_storeType`) return Storage.get(`${PREFIX}_storeType`);
} }
getStoreUserId(){ getStoreUserId() {
return Storage.get(`${PREFIX}_storeUserId`) return Storage.get(`${PREFIX}_storeUserId`);
} }
getUserId(){ getCustomerId() {
return Storage.get(`${PREFIX}_userId`) return Storage.get(`${PREFIX}_customerId`);
}
getUserId() {
return Storage.get(`${PREFIX}_userId`);
} }
getUserRole(){ getUserRole() {
return Storage.get(`${PREFIX}_userRole`) return Storage.get(`${PREFIX}_userRole`);
} }
getToken() { getToken() {
...@@ -47,67 +49,71 @@ class User { ...@@ -47,67 +49,71 @@ class User {
return Storage.get(`${PREFIX}_isAdmin`); return Storage.get(`${PREFIX}_isAdmin`);
} }
setStoreId(value:any){ setStoreId(value: any) {
return Storage.set(`${PREFIX}_storeId`,value) return Storage.set(`${PREFIX}_storeId`, value);
} }
setEnterpriseId(value: any) { setEnterpriseId(value: any) {
return Storage.set(`${PREFIX}_enterpriseId`,value) return Storage.set(`${PREFIX}_enterpriseId`, value);
}
setStoreName(value: any) {
return Storage.set(`${PREFIX}_storeName`, value);
} }
setStoreName(value:any){ setStoreType(value: any) {
return Storage.set(`${PREFIX}_storeName`,value) return Storage.set(`${PREFIX}_storeType`, value);
} }
setStoreType(value:any){ setStoreUserId(value: any) {
return Storage.set(`${PREFIX}_storeType`,value) return Storage.set(`${PREFIX}_storeUserId`, value);
} }
setStoreUserId(value:any){ setCustomerId(value: any) {
return Storage.set(`${PREFIX}_storeUserId`,value) return Storage.set(`${PREFIX}_customerId`, value);
} }
setUserId(value:any){ setUserId(value: any) {
return Storage.set(`${PREFIX}_userId`,value) return Storage.set(`${PREFIX}_userId`, value);
} }
setUserRole(value:any){ setUserRole(value: any) {
return Storage.set(`${PREFIX}_userRole`,value) return Storage.set(`${PREFIX}_userRole`, value);
} }
setToken(value:any) { setToken(value: any) {
return Storage.set(`${PREFIX}_token`,value); return Storage.set(`${PREFIX}_token`, value);
} }
setIsAdmin(value: any) { setIsAdmin(value: any) {
return Storage.set(`${PREFIX}_isAdmin`, value); return Storage.set(`${PREFIX}_isAdmin`, value);
} }
removeToken(){ removeToken() {
return Storage.remove(`${PREFIX}_token`); return Storage.remove(`${PREFIX}_token`);
} }
removeUserId(){ removeUserId() {
return Storage.remove(`${PREFIX}_userId`); return Storage.remove(`${PREFIX}_userId`);
} }
removeEnterpriseId() { removeEnterpriseId() {
return Storage.remove(`${PREFIX}_enterpriseId`) return Storage.remove(`${PREFIX}_enterpriseId`);
} }
getCustomerStoreId(){ getCustomerStoreId() {
return Storage.get(`${PREFIX}_customerStoreId`); return Storage.get(`${PREFIX}_customerStoreId`);
} }
setCustomerStoreId(value:any) { setCustomerStoreId(value: any) {
return Storage.set(`${PREFIX}_customerStoreId`,value); return Storage.set(`${PREFIX}_customerStoreId`, value);
} }
setIdentifier(value:any){ setIdentifier(value: any) {
return Storage.set(`${PREFIX}_identifier`,value); return Storage.set(`${PREFIX}_identifier`, value);
} }
getIdentifier(){ getIdentifier() {
return Storage.get(`${PREFIX}_identifier`); return Storage.get(`${PREFIX}_identifier`);
} }
clearUserInfo(){ clearUserInfo() {
Storage.remove(`${USER_PREFIX}_token`); Storage.remove(`${USER_PREFIX}_token`);
Storage.remove(`${USER_PREFIX}_userId`); Storage.remove(`${USER_PREFIX}_userId`);
Storage.remove(`${USER_PREFIX}_userPhone`); Storage.remove(`${USER_PREFIX}_userPhone`);
......
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Empty, ConfigProvider, Table } from 'antd'; import { Empty, ConfigProvider, Table } from 'antd';
import Lottie from 'react-lottie';
import * as nodata from '../modules/lottie/nodata/data.json';
function XMTable(props) { function XMTable(props) {
const [empty, setEmpty] = useState(props.renderEmpty || {}); const [empty, setEmpty] = useState(props.renderEmpty || {});
...@@ -12,9 +14,25 @@ function XMTable(props) { ...@@ -12,9 +14,25 @@ function XMTable(props) {
// 自定义表格空状态 // 自定义表格空状态
function customizeRenderEmpty() { function customizeRenderEmpty() {
const defaultOptions = {
loop: true,
autoplay: true,
animationData: empty.image || nodata,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
}
}
return ( return (
<Empty <Empty
image={empty.image || Empty.PRESENTED_IMAGE_SIMPLE} image={<div style={{ marginTop: 24 }}>
<Lottie
options={defaultOptions}
height={150}
width={150}
isStopped={false}
isPaused={false}
/>
</div>}
imageStyle={{ imageStyle={{
height: 150, height: 150,
}} }}
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
left: 0px; left: 0px;
right: 0; right: 0;
bottom: 0; bottom: 0;
z-index:3; z-index: 3;
background-color: #fff; background-color: #fff;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
...@@ -20,12 +20,12 @@ ...@@ -20,12 +20,12 @@
bottom: 0; bottom: 0;
z-index: 102; z-index: 102;
overflow: auto; overflow: auto;
margin:0 16px; margin: 0 16px;
.box{ .box {
&:first-child{ &:first-child {
margin-bottom: 8px; margin-bottom: 8px;
} }
&:last-child{ &:last-child {
margin-bottom: 16px; margin-bottom: 16px;
} }
} }
...@@ -48,10 +48,10 @@ ...@@ -48,10 +48,10 @@
.content-header { .content-header {
padding: 16px 16px 8px 16px; padding: 16px 16px 8px 16px;
line-height: 30px; line-height: 30px;
font-size:24px; font-size: 24px;
color:#333; color: #333;
font-weight:bold; font-weight: bold;
background: #FFF; background: #fff;
h1 { h1 {
font-weight: normal; font-weight: normal;
display: inline-block; display: inline-block;
......
...@@ -6,9 +6,11 @@ ...@@ -6,9 +6,11 @@
import React from 'react'; import React from 'react';
import { Modal, Input, Table, message, Tooltip, Empty } from 'antd'; import { Modal, Input, Table, message, Tooltip, Empty } from 'antd';
import { XMTable } from '@/components';
import Service from '@/common/js/service'; import Service from '@/common/js/service';
import User from '@/common/js/user' import User from '@/common/js/user'
import SetEmployeeModal from "./SetEmployeeModal"; import SetEmployeeModal from "./SetEmployeeModal";
import search from '../../lottie/search/data.json';
import './ChooseMembersModal.less'; import './ChooseMembersModal.less';
import _ from 'underscore'; import _ from 'underscore';
...@@ -311,19 +313,18 @@ class ChooseMembersModal extends React.Component { ...@@ -311,19 +313,18 @@ class ChooseMembersModal extends React.Component {
enterButton={<span className="icon iconfont">&#xe832;</span>} enterButton={<span className="icon iconfont">&#xe832;</span>}
/> />
<div className='container-left-body-table'> <div className='container-left-body-table'>
<Table <XMTable
rowKey={(record) => record.enterpriseVisibleUserId} rowKey={(record) => record.enterpriseVisibleUserId}
dataSource={allUserList} dataSource={allUserList}
columns={this.selectedColumnsLeft()} columns={this.selectedColumnsLeft()}
pagination={false} pagination={false}
scroll={{ y: 290}} scroll={{ y: 290}}
// bordered={true} renderEmpty={{
locale={{ image: searchKey ? search : '',
emptyText: <div> description: <div>
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={false} /> <div style={{ color: '#333' }}>暂无数据</div>
<div style={{ color: '#333', marginTop: -70 }}>暂无数据</div>
<div style={{ color: '#666', padding: '0 32px', fontSize: '12px' }}>需要先将员工添加到企微可见范围后,员工才会出现在这里</div> <div style={{ color: '#666', padding: '0 32px', fontSize: '12px' }}>需要先将员工添加到企微可见范围后,员工才会出现在这里</div>
</div>, </div>
}} }}
size={'small'} size={'small'}
rowSelection={{ rowSelection={{
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-05 10:12:45 * @Date: 2020-08-05 10:12:45
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-11 16:44:31 * @LastEditTime: 2021-06-15 20:01:05
* @Description: 视频课-列表模块 * @Description: 视频课-列表模块
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -364,7 +364,7 @@ class GraphicsCourseList extends React.Component { ...@@ -364,7 +364,7 @@ class GraphicsCourseList extends React.Component {
<ShareLiveModal <ShareLiveModal
needStr={needStr} needStr={needStr}
data={shareData} data={shareData}
type="videoClass" type="graphicsClass"
title="图文课" title="图文课"
close={() => { close={() => {
this.setState({ this.setState({
......
/* /*
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-06-22 14:26:37 * @Date: 2020-06-22 14:26:37
* @Last Modified by: 吴文洁 * @Last Modified by: chenshu
* @Last Modified time: 2020-07-23 09:33:02 * @Last Modified time: 2021-06-08 18:18:46
*/ */
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Modal, Button, Table, Progress, message, Tooltip, Spin, Popconfirm } from 'antd'; import { Modal, Button, Table, Progress, message, Tooltip, Spin, Popconfirm } from 'antd';
...@@ -40,7 +40,7 @@ class ManageCoursewareModal extends React.Component { ...@@ -40,7 +40,7 @@ class ManageCoursewareModal extends React.Component {
componentDidMount() { componentDidMount() {
this.getCoursewareList(); this.getCoursewareList();
var animation = Lottie.loadAnimation({ var animation = Lottie.loadAnimation({
path: "https://image.xiaomaiketang.com/xm/MQwp2aJaxf.json", path: "https://image.xiaomaiketang.com/xm/SDBkP7mbJX.json",
name: "test", name: "test",
renderer: "svg", renderer: "svg",
loop: true, loop: true,
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
.empty-image { .empty-image {
display: block; display: block;
margin: 24px auto 12px; margin: 24px auto 12px;
width:100px; width:150px;
height:100px; height:150px;
} }
.empty-button { .empty-button {
display: block; display: block;
......
...@@ -18,8 +18,6 @@ import CourseService from '@/domains/course-domain/CourseService' ...@@ -18,8 +18,6 @@ import CourseService from '@/domains/course-domain/CourseService'
import './ShareLiveModal.less' import './ShareLiveModal.less'
const DEFAULT_COVER = 'https://image.xiaomaiketang.com/xm/YNfi45JwFA.png'
class ShareLiveModal extends React.Component { class ShareLiveModal extends React.Component {
constructor(props) { constructor(props) {
super(props) super(props)
...@@ -104,27 +102,31 @@ class ShareLiveModal extends React.Component { ...@@ -104,27 +102,31 @@ class ShareLiveModal extends React.Component {
render() { render() {
const { courseDivision, data, type, title } = this.props const { courseDivision, data, type, title } = this.props
const { courseName, coverUrl = DEFAULT_COVER, scheduleVideoUrl } = data const { courseName, scheduleVideoUrl, courseMediaVOS, coverUrl } = data
const { shareUrl, showImg, time } = this.state const { shareUrl, showImg, time } = this.state
// 判断是否是默认图, 默认图不需要在URL后面增加字符串 // 判断是否是默认图, 默认图不需要在URL后面增加字符串
const isDefaultCover = coverUrl === DEFAULT_COVER let coverImgSrc = '';
switch (type) {
let coverImgSrc = coverUrl case 'liveClass': // 直播课
if (type === 'videoClass') { if (courseMediaVOS && courseMediaVOS.length > 0) {
if ((!coverUrl || isDefaultCover) && title !== '图文课' && title !== '线下课') {
if (courseDivision === 'external') {
coverImgSrc = 'https://image.xiaomaiketang.com/xm/mt3ZQRxGKB.png'
} else {
coverImgSrc = `${scheduleVideoUrl}?x-oss-process=video/snapshot,t_0,m_fast&anystring=anystring`
}
}
} else {
data.courseMediaVOS.map((item, index) => { data.courseMediaVOS.map((item, index) => {
if (item.contentType === 'COVER') { if (item.contentType === 'COVER') {
coverImgSrc = item.mediaUrl coverImgSrc = item.mediaUrl
} }
}) })
} else {
coverImgSrc = 'https://image.xiaomaiketang.com/xm/Yip2YtFDwH.png';
}
break;
case 'videoClass': // 视频课
coverImgSrc = coverUrl || (courseDivision === 'internal' ? `${scheduleVideoUrl}?x-oss-process=video/snapshot,t_0,m_fast&anystring=anystring` : 'https://image.xiaomaiketang.com/xm/mt3ZQRxGKB.png')
break;
case 'graphicsClass': // 图文课
coverImgSrc = coverUrl || 'https://image.xiaomaiketang.com/xm/wFnpZtp2yB.png';
break;
case 'offlineClass': // 线下课
coverImgSrc = coverUrl || 'https://image.xiaomaiketang.com/xm/pxbWKsYA87.png';
break;
} }
return ( return (
...@@ -143,7 +145,7 @@ class ShareLiveModal extends React.Component { ...@@ -143,7 +145,7 @@ class ShareLiveModal extends React.Component {
<span className='text'>{User.getStoreName()}</span> <span className='text'>{User.getStoreName()}</span>
</div> </div>
<div className='course-name-title'>{type === 'videoClass' ? `${courseName}开课啦` : `邀请你观看直播:`}</div> <div className='course-name-title'>{type === 'liveClass' ? `邀请你观看直播:` : `${courseName}开课啦`}</div>
{type === 'liveClass' && <div class='live-couse-name'>{courseName}</div>} {type === 'liveClass' && <div class='live-couse-name'>{courseName}</div>}
<Choose> <Choose>
<When condition={showImg}> <When condition={showImg}>
......
/* /*
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-05 10:07:47 * @Date: 2020-08-05 10:07:47
* @LastEditors: wufan * @LastEditors: yuananting
* @LastEditTime: 2021-05-27 19:25:48 * @LastEditTime: 2021-06-07 15:06:26
* @Description: 线下课新增/编辑页 * @Description: 线下课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -518,6 +518,11 @@ class AddOfflineCourse extends React.Component { ...@@ -518,6 +518,11 @@ class AddOfflineCourse extends React.Component {
if(coverId){ if(coverId){
scheduleMediaRequests = [coverObj] scheduleMediaRequests = [coverObj]
} }
// 编辑且使用默认图时不传
if (pageType === 'edit' && coverUrl === defaultCoverUrl) {
scheduleMediaRequests = []
}
const commonParams = { const commonParams = {
categoryId, categoryId,
courseName, courseName,
......
...@@ -25,7 +25,7 @@ import QRCodeModal from '../modal/QRCodeModal'; ...@@ -25,7 +25,7 @@ import QRCodeModal from '../modal/QRCodeModal';
import './OfflineCourseList.less'; import './OfflineCourseList.less';
const ENV = process.env.DEPLOY_ENV || 'dev'; const ENV = process.env.DEPLOY_ENV || 'dev';
const defaultCoverUrl = 'https://image.xiaomaiketang.com/xm/YNfi45JwFA.png'; const defaultCoverUrl = 'https://image.xiaomaiketang.com/xm/pxbWKsYA87.png';
class OfflineCourseList extends React.Component { class OfflineCourseList extends React.Component {
...@@ -358,7 +358,7 @@ class OfflineCourseList extends React.Component { ...@@ -358,7 +358,7 @@ class OfflineCourseList extends React.Component {
<ShareLiveModal <ShareLiveModal
needStr={needStr} needStr={needStr}
data={shareData} data={shareData}
type="videoClass" type="offlineClass"
title="线下课" title="线下课"
close={() => { close={() => {
this.setState({ this.setState({
......
...@@ -6,7 +6,7 @@ import Service from "@/common/js/service"; ...@@ -6,7 +6,7 @@ import Service from "@/common/js/service";
import './PreviewOfflineModal.less'; import './PreviewOfflineModal.less';
import ENUM from '@/modules/knowledge-base/ENUM'; import ENUM from '@/modules/knowledge-base/ENUM';
const defaultCoverUrl = 'https://image.xiaomaiketang.com/xm/YNfi45JwFA.png'; const defaultCoverUrl = 'https://image.xiaomaiketang.com/xm/pxbWKsYA87.png';
class PreviewOfflineModal extends React.Component { class PreviewOfflineModal extends React.Component {
......
import React from 'react' import React from 'react';
import { Tabs } from 'antd' import { Tabs } from 'antd';
import VideoCourseFilter from './components/VideoCourseFilter' import VideoCourseFilter from './components/VideoCourseFilter';
import VideoCourseOpt from './components/VieoCourseOpt' import VideoCourseOpt from './components/VieoCourseOpt';
import VideoCourseList from './components/VideoCourseList' import VideoCourseList from './components/VideoCourseList';
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';
const { TabPane } = Tabs const { TabPane } = Tabs;
class VideoCourse extends React.Component { class VideoCourse extends React.Component {
constructor(props) { constructor(props) {
super(props) super(props);
this.state = { this.state = {
query: { query: {
size: 10, size: 10,
...@@ -18,45 +18,43 @@ class VideoCourse extends React.Component { ...@@ -18,45 +18,43 @@ class VideoCourse extends React.Component {
dataSource: [], // 视频课列表 dataSource: [], // 视频课列表
totalCount: 0, // 视频课数据总条数 totalCount: 0, // 视频课数据总条数
currentTabKey: 'internal', currentTabKey: 'internal',
} };
} }
componentWillMount() { componentWillMount() {
// 获取视频课列表 // 获取视频课列表
this.handleFetchScheduleList() this.handleFetchScheduleList();
} }
// 获取视频课列表 // 获取视频课列表
handleFetchScheduleList = (_query = {}) => { handleFetchScheduleList = (_query = {}) => {
const { currentTabKey } = this.state const { currentTabKey } = this.state;
const query = { const query = {
...this.state.query, ...this.state.query,
..._query, ..._query,
courseDivision: currentTabKey === 'external' ? 1 : null, courseDivision: currentTabKey === 'external' ? 1 : null,
} };
// 更新请求参数
this.setState({ query })
CourseService.videoSchedulePage(query).then((res) => { CourseService.videoSchedulePage(query).then((res) => {
const { result = {} } = res || {} const { result = {} } = res || {};
const { records = [], total = 0 } = result const { records = [], total = 0 } = result;
if (Number(total) && query.size * (query.current - 1) >= Number(total)) { if (Number(total) && query.size * (query.current - 1) >= Number(total)) {
this.handleFetchScheduleList({ this.handleFetchScheduleList({
...query, ...query,
current: 1, current: 1,
}) });
return return;
} }
this.setState({ this.setState({
query,
dataSource: records, dataSource: records,
totalCount: Number(total), totalCount: Number(total),
}) });
}) });
} };
currenTabChange = (currentTabKey) => { currenTabChange = (currentTabKey) => {
const { query } = this.state const { query } = this.state;
this.setState( this.setState(
{ {
currentTabKey, currentTabKey,
...@@ -66,20 +64,21 @@ class VideoCourse extends React.Component { ...@@ -66,20 +64,21 @@ class VideoCourse extends React.Component {
}, },
}, },
() => { () => {
this.handleFetchScheduleList() console.log('this.state.query===>', this.state.query);
} // this.handleFetchScheduleList()
)
} }
);
};
changeShelfState = (index, shelfState) => { changeShelfState = (index, shelfState) => {
const { dataSource } = this.state const { dataSource } = this.state;
dataSource[index].shelfState = shelfState dataSource[index].shelfState = shelfState;
this.setState({ this.setState({
dataSource, dataSource,
}) });
} };
render() { render() {
const { dataSource, totalCount, query, currentTabKey } = this.state const { dataSource, totalCount, query, currentTabKey } = this.state;
return ( return (
<div className='page video-course-page'> <div className='page video-course-page'>
<div className='content-header'>视频课</div> <div className='content-header'>视频课</div>
...@@ -107,8 +106,8 @@ class VideoCourse extends React.Component { ...@@ -107,8 +106,8 @@ class VideoCourse extends React.Component {
/> />
</div> </div>
</div> </div>
) );
} }
} }
export default VideoCourse export default VideoCourse;
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
import React from "react"; import React from "react";
import { Modal, message, Tooltip, Switch, Dropdown, Button } from "antd"; import { Modal, message, Tooltip, Switch, Dropdown, Button } from "antd";
import { Route, withRouter } from "react-router-dom"; import { Route, withRouter } from "react-router-dom";
import Lottie from 'react-lottie';
import { PageControl, XMTable } from "@/components"; import { PageControl, XMTable } from "@/components";
import { LIVE_SHARE_MAP } from "@/common/constants/academic/cloudClass"; import { LIVE_SHARE_MAP } from "@/common/constants/academic/cloudClass";
import { appId, shareUrl, LIVE_SHARE } from "@/domains/course-domain/constants"; import { appId, shareUrl, LIVE_SHARE } from "@/domains/course-domain/constants";
...@@ -18,7 +17,6 @@ import ScanFileModal from "../../resource-disk/modal/ScanFileModal"; ...@@ -18,7 +17,6 @@ import ScanFileModal from "../../resource-disk/modal/ScanFileModal";
import WatchData from "./WatchData"; import WatchData from "./WatchData";
import KnowledgeAPI from "@/data-source/knowledge/request-api"; import KnowledgeAPI from "@/data-source/knowledge/request-api";
import ENUM from "../ENUM.js"; import ENUM from "../ENUM.js";
import * as nodata from '../../lottie/nodata/data.json';
import "./KnowledgeBaseList.less"; import "./KnowledgeBaseList.less";
const DEFAULT_SIZE_UNIT = 1000 * 1000 // 将B转换成M const DEFAULT_SIZE_UNIT = 1000 * 1000 // 将B转换成M
...@@ -494,14 +492,6 @@ class KnowledgeBaseList extends React.Component { ...@@ -494,14 +492,6 @@ class KnowledgeBaseList extends React.Component {
preserveSelectedRowKeys: true, preserveSelectedRowKeys: true,
onChange: onSelectChange, onChange: onSelectChange,
} }
const defaultOptions = {
loop: true,
autoplay: true,
animationData: nodata,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
}
}
return ( return (
<div className="knowledge-base-list"> <div className="knowledge-base-list">
<XMTable <XMTable
...@@ -515,15 +505,6 @@ class KnowledgeBaseList extends React.Component { ...@@ -515,15 +505,6 @@ class KnowledgeBaseList extends React.Component {
bordered bordered
className="knowledge-list-table" className="knowledge-list-table"
renderEmpty={{ renderEmpty={{
image: <div style={{ marginTop: 24 }}>
<Lottie
options={defaultOptions}
height={150}
width={150}
isStopped={false}
isPaused={false}
/>
</div>,
description: <span style={{ display: 'block', paddingBottom: 24 }}>暂无数据</span> description: <span style={{ display: 'block', paddingBottom: 24 }}>暂无数据</span>
}} }}
/> />
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @Description: * @Description:
* @Author: zangsuyun * @Author: zangsuyun
* @Date: 2021-03-13 09:54:26 * @Date: 2021-03-13 09:54:26
* @LastEditors: fusanqiasng * @LastEditors: yuananting
* @LastEditTime: 2021-06-01 10:26:46 * @LastEditTime: 2021-06-10 19:55:24
* @Copyright: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyright: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -324,7 +324,7 @@ class AddCourse extends React.Component { ...@@ -324,7 +324,7 @@ class AddCourse extends React.Component {
return <img className='course-cover' src={item.mediaUrl} alt='' />; return <img className='course-cover' src={item.mediaUrl} alt='' />;
} }
})} })}
{!hasCover && <img className='course-cover' src={'https://image.xiaomaiketang.com/xm/YNfi45JwFA.png'} alt='' />} {!hasCover && <img className='course-cover' src={'https://image.xiaomaiketang.com/xm/Yip2YtFDwH.png'} alt='' />}
<div> <div>
<Choose> <Choose>
<When condition={record.courseName.length > 17}> <When condition={record.courseName.length > 17}>
...@@ -501,8 +501,7 @@ class AddCourse extends React.Component { ...@@ -501,8 +501,7 @@ class AddCourse extends React.Component {
const { coverUrl } = record; const { coverUrl } = record;
return ( return (
<div className='record__item'> <div className='record__item'>
{/* 上传了封面的话就用上传的封面, 没有的话就取视频的第一帧 */} <img className='course-cover' src={coverUrl || 'https://image.xiaomaiketang.com/xm/wFnpZtp2yB.png'} alt='' />
<img className='course-cover' src={coverUrl || 'https://image.xiaomaiketang.com/xm/YNfi45JwFA.png'} alt='' />
<Choose> <Choose>
<When condition={record.courseName.length > 25}> <When condition={record.courseName.length > 25}>
<Tooltip title={record.courseName}> <Tooltip title={record.courseName}>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { Table, Modal, message, Tooltip, Switch, Dropdown } from 'antd'; import { Table, Modal, message, Tooltip, Switch, Dropdown } from 'antd';
import { withRouter } from 'react-router-dom'; import { withRouter } from 'react-router-dom';
import { PageControl } from '@/components'; import { PageControl, XMTable } from "@/components";
import PlanService from '@/domains/plan-domain/planService'; import PlanService from '@/domains/plan-domain/planService';
import SharePlanModal from '../modal/SharePlanModal'; import SharePlanModal from '../modal/SharePlanModal';
import { LIVE_SHARE } from '@/domains/course-domain/constants'; import { LIVE_SHARE } from '@/domains/course-domain/constants';
...@@ -305,7 +305,7 @@ function PlanList(props) { ...@@ -305,7 +305,7 @@ function PlanList(props) {
} }
return ( return (
<div className='plan-list'> <div className='plan-list'>
<Table <XMTable
rowKey={(record) => record.id} rowKey={(record) => record.id}
showSorterTooltip={false} showSorterTooltip={false}
dataSource={props.planListData} dataSource={props.planListData}
...@@ -316,6 +316,9 @@ function PlanList(props) { ...@@ -316,6 +316,9 @@ function PlanList(props) {
size='middle' size='middle'
scroll={{ x: 1400 }} scroll={{ x: 1400 }}
className='plan-list-table' className='plan-list-table'
renderEmpty={{
description: <span style={{ display: 'block', paddingBottom: 24 }}>暂无数据</span>
}}
/> />
<div className='box-footer'> <div className='box-footer'>
<PageControl <PageControl
......
...@@ -16,7 +16,7 @@ import CourseService from '@/domains/course-domain/CourseService' ...@@ -16,7 +16,7 @@ import CourseService from '@/domains/course-domain/CourseService'
import './SharePlanModal.less' import './SharePlanModal.less'
const DEFAULT_COVER = 'https://image.xiaomaiketang.com/xm/YNfi45JwFA.png' const DEFAULT_COVER = 'https://image.xiaomaiketang.com/xm/rEAetaTEh3.png'
class ShareLiveModal extends React.Component { class ShareLiveModal extends React.Component {
constructor(props) { constructor(props) {
......
...@@ -304,7 +304,7 @@ class SelectOperatorModal extends React.Component { ...@@ -304,7 +304,7 @@ class SelectOperatorModal extends React.Component {
return null return null
})} })}
<If condition={!hasCover}> <If condition={!hasCover}>
<img className='course-cover' src={"https://image.xiaomaiketang.com/xm/YNfi45JwFA.png"} alt='' /> <img className='course-cover' src={"https://image.xiaomaiketang.com/xm/Yip2YtFDwH.png"} alt='' />
</If> </If>
<div> <div>
...@@ -432,8 +432,7 @@ class SelectOperatorModal extends React.Component { ...@@ -432,8 +432,7 @@ class SelectOperatorModal extends React.Component {
const { coverUrl } = record const { coverUrl } = record
return ( return (
<div className='course-info'> <div className='course-info'>
{/* 上传了封面的话就用上传的封面, 没有的话就取视频的第一帧 */} <img className='course-cover' src={coverUrl || "https://image.xiaomaiketang.com/xm/wFnpZtp2yB.png"} alt='' />
<img className='course-cover' src={coverUrl || "https://image.xiaomaiketang.com/xm/YNfi45JwFA.png"} alt='' />
<div className='course-name'>{record.courseName}</div> <div className='course-name'>{record.courseName}</div>
</div> </div>
) )
......
/* /*
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-06-09 10:47:51 * @Date: 2020-06-09 10:47:51
* @Last Modified by: 吴文洁 * @Last Modified by: chenshu
* @Last Modified time: 2020-07-23 09:33:09 * @Last Modified time: 2021-06-08 18:10:25
* @Description: 文件夹列表 * @Description: 文件夹列表
*/ */
...@@ -11,12 +11,13 @@ import { Table, Menu, Dropdown, Modal, message,Tooltip } from 'antd'; ...@@ -11,12 +11,13 @@ import { Table, Menu, Dropdown, Modal, message,Tooltip } from 'antd';
import _ from 'underscore'; import _ from 'underscore';
// import * as lodash from 'lodash'; // import * as lodash from 'lodash';
import { PageControl, LottieIcon } from 'xiaomai-b-components'; import { PageControl, LottieIcon } from 'xiaomai-b-components';
import { XMTable } from '@/components';
import Service from '@/common/js/service'; import Service from '@/common/js/service';
import { formatDate } from '@/domains/basic-domain/utils'; import { formatDate } from '@/domains/basic-domain/utils';
import { FILE_TYPE_ICON_MAP, SUPPORT_FILE_TYPE_MAP, DEFAULT_SIZE_UNIT } from '@/domains/resource-disk/constants'; import { FILE_TYPE_ICON_MAP, SUPPORT_FILE_TYPE_MAP, DEFAULT_SIZE_UNIT } from '@/domains/resource-disk/constants';
import { getFileTypeByName } from '@/domains/resource-disk/utils'; import { getFileTypeByName } from '@/domains/resource-disk/utils';
import addData from '../../lottie/addData/data.json';
import search from '../../lottie/search/data.json';
import UploadProgressModal from '@/bu-components/UploadProgressModal'; import UploadProgressModal from '@/bu-components/UploadProgressModal';
import SelectPrepareFileModal from '@/bu-components/SelectPrepareFileModal'; import SelectPrepareFileModal from '@/bu-components/SelectPrepareFileModal';
import CopyFileModal from '@/bu-components/CopyFileModal'; import CopyFileModal from '@/bu-components/CopyFileModal';
...@@ -693,9 +694,11 @@ class FolderList extends React.Component { ...@@ -693,9 +694,11 @@ class FolderList extends React.Component {
</When> </When>
<Otherwise> <Otherwise>
<LottieIcon <XMTable
title={ className="add-empty"
<Choose> renderEmpty={{
image: !showResultPage ? addData : search,
description: <Choose>
<When condition={!showResultPage}> <When condition={!showResultPage}>
<input <input
multiple multiple
...@@ -709,7 +712,7 @@ class FolderList extends React.Component { ...@@ -709,7 +712,7 @@ class FolderList extends React.Component {
{ {
<Choose> <Choose>
<When condition={hasManagementAuthority}> <When condition={hasManagementAuthority}>
<div>你还没有上传文件,点击 <div className="lottie-icon-title">你还没有上传文件,点击
<Tooltip title="支持文件类型:ppt、word、excel、pdf、jpg、mp3、mp4"> <Tooltip title="支持文件类型:ppt、word、excel、pdf、jpg、mp3、mp4">
<span <span
className="upload-btn" className="upload-btn"
...@@ -729,7 +732,7 @@ class FolderList extends React.Component { ...@@ -729,7 +732,7 @@ class FolderList extends React.Component {
<div className="desc">搜索无结果</div> <div className="desc">搜索无结果</div>
</Otherwise> </Otherwise>
</Choose> </Choose>
} }}
/> />
</Otherwise> </Otherwise>
</Choose> </Choose>
...@@ -762,7 +765,7 @@ class FolderList extends React.Component { ...@@ -762,7 +765,7 @@ class FolderList extends React.Component {
}} }}
onMove={(query) => { onMove={(query) => {
this.setState({ showSelectFileModal: false }); this.setState({ showSelectFileModal: false });
this.props.onMove(query, [currentFile.id]); this.props.onMove(query, [currentFile.id],[currentFile.folderType]);
}} }}
/> />
{ {
......
...@@ -47,6 +47,7 @@ class FolderManage extends React.Component { ...@@ -47,6 +47,7 @@ class FolderManage extends React.Component {
folderPathList: [props.currentRootDisk], folderPathList: [props.currentRootDisk],
selectedFileIds: [], // 已被选择的文件 selectedFileIds: [], // 已被选择的文件
selectedFileRights: [], // 已被选择的文件对应权限 selectedFileRights: [], // 已被选择的文件对应权限
selectedFileType:[], // 已选择的文件的类型
folderList: [], // 当前目录下的文件 folderList: [], // 当前目录下的文件
searchKey: null, // 搜索关键字 searchKey: null, // 搜索关键字
totalCount: 0, // 该磁盘总共有的文件个数 totalCount: 0, // 该磁盘总共有的文件个数
...@@ -200,10 +201,12 @@ class FolderManage extends React.Component { ...@@ -200,10 +201,12 @@ class FolderManage extends React.Component {
handleChangeRow = (selectedRowKeys) => { handleChangeRow = (selectedRowKeys) => {
const { folderList } = this.state; const { folderList } = this.state;
let _selectedFileRights = []; let _selectedFileRights = [];
let _selectedFileType = [];
selectedRowKeys.map(folderId => { selectedRowKeys.map(folderId => {
folderList.map(item => { folderList.map(item => {
if (item.id === folderId) { if (item.id === folderId) {
_selectedFileRights.push(item.rights); _selectedFileRights.push(item.rights);
_selectedFileType.push(item.folderType);
} }
return _selectedFileRights; return _selectedFileRights;
}) })
...@@ -211,7 +214,8 @@ class FolderManage extends React.Component { ...@@ -211,7 +214,8 @@ class FolderManage extends React.Component {
}) })
this.setState({ this.setState({
selectedFileIds: selectedRowKeys, selectedFileIds: selectedRowKeys,
selectedFileRights: _selectedFileRights selectedFileRights: _selectedFileRights,
selectedFileType:_selectedFileType
}) })
} }
...@@ -255,12 +259,13 @@ class FolderManage extends React.Component { ...@@ -255,12 +259,13 @@ class FolderManage extends React.Component {
} }
// 移动文件 // 移动文件
handleMove = (query, sourceFileIds = this.state.selectedFileIds) => { handleMove = (query, sourceFileIds = this.state.selectedFileIds,selectedFileTypes=this.state.selectedFileType) => {
const { targetFolder, selectFolderPathList } = query; const { targetFolder, selectFolderPathList } = query;
const { currentRootDisk: { disk} } = this.props; const { currentRootDisk: { disk} } = this.props;
const { folderPathList } = this.state; const { folderPathList } = this.state;
const currentFolder = folderPathList[folderPathList.length - 1]; const currentFolder = folderPathList[folderPathList.length - 1];
const { id } = targetFolder; const { id } = targetFolder;
let canRemove = true;
// 将selectedFileIds移动到targetFolder // 将selectedFileIds移动到targetFolder
let params = { let params = {
disk, disk,
...@@ -271,8 +276,17 @@ class FolderManage extends React.Component { ...@@ -271,8 +276,17 @@ class FolderManage extends React.Component {
if (selectFolderPathList.length > 1) { if (selectFolderPathList.length > 1) {
params.newParentId = id params.newParentId = id
} }
if(selectFolderPathList.length > 9){
selectedFileTypes.map((item)=>{
//判定是否存在文件夹
if(item==="FOLDER"){
canRemove = false;
message.warning('不能将文件夹移动到10级目录下');
}
})
}
if(canRemove){
Service.Hades('public/hadesStore/moveFolder', params).then((res) => { Service.Hades('public/hadesStore/moveFolder', params).then((res) => {
// 判断是否将文件移动到了自身或者子目录 // 判断是否将文件移动到了自身或者子目录
const { result = {} } = res; const { result = {} } = res;
const { code, message: _message } = result; const { code, message: _message } = result;
...@@ -294,6 +308,7 @@ class FolderManage extends React.Component { ...@@ -294,6 +308,7 @@ class FolderManage extends React.Component {
this.handleFetchFolderList({ parentId: currentFolder.id, current: 1}); this.handleFetchFolderList({ parentId: currentFolder.id, current: 1});
}) })
} }
}
// 修改文件路径 // 修改文件路径
handleChangeFolderPath = (folderPathList, hasRootDisk = true) => { handleChangeFolderPath = (folderPathList, hasRootDisk = true) => {
......
...@@ -70,7 +70,7 @@ class OperateArea extends React.Component { ...@@ -70,7 +70,7 @@ class OperateArea extends React.Component {
// 判断当前目录是否在第10层,如果是的话提示最多只能创建10层文件夹 // 判断当前目录是否在第10层,如果是的话提示最多只能创建10层文件夹
const { folderPathList } = this.props; const { folderPathList } = this.props;
if (folderPathList.length > 10) { if (folderPathList.length > 9) {
message.warning('最多只能创建10层文件夹'); message.warning('最多只能创建10层文件夹');
return; return;
} }
......
...@@ -215,8 +215,7 @@ ...@@ -215,8 +215,7 @@
cursor: pointer; cursor: pointer;
} }
.lottie-icon { .lottie-icon-title {
&__title {
color: #999; color: #999;
.upload-btn { .upload-btn {
color: #5A8EFA; color: #5A8EFA;
...@@ -224,12 +223,16 @@ ...@@ -224,12 +223,16 @@
cursor: pointer; cursor: pointer;
} }
} }
}
// td.ant-table-column-sort{ // td.ant-table-column-sort{
// background:none !important; // background:none !important;
// } // }
} }
} }
.add-empty {
.ant-table-cell {
border: none;
}
}
} }
......
import User from '@/common/js/user'; import User from '@/common/js/user';
import React from 'react'; import React from 'react';
import Header from './Header' import Lottie from "lottie-web";
import { Modal } from "antd";
import Service from "@/common/js/service"; import Service from "@/common/js/service";
import { LIVE_SHARE } from "@/domains/course-domain/constants";
import BaseService from "@/domains/basic-domain/baseService";
import './ErrorCollege.less'; import './ErrorCollege.less';
export default class ErrorCollege extends React.Component { export default class ErrorCollege extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
menuType: true, nickName: '',
} }
} }
componentDidMount() { componentDidMount() {
this.getUserInfo();
this.getStorePermission(); this.getStorePermission();
var animation = Lottie.loadAnimation({
path: "https://image.xiaomaiketang.com/xm/AhcJZHdMZf.json",
name: "test",
renderer: "svg",
loop: true,
autoplay: true,
container: document.getElementById("lottie-box")
});
} }
getStorePermission() { getStorePermission() {
...@@ -29,17 +41,62 @@ export default class ErrorCollege extends React.Component { ...@@ -29,17 +41,62 @@ export default class ErrorCollege extends React.Component {
}); });
} }
handleMenuType() { getUserInfo() {
this.setState({ menuType: !menuType }); const param = {
storeUserId: User.getStoreUserId(),
};
BaseService.getStoreUser(param).then((res) => {
const { nickName } = res.result;
this.setState({ nickName });
});
}
handleLogoutConfirm() {
return Modal.confirm({
title: "你确定要退出登录吗?",
content: "退出后,需重新登录",
icon: (
<span className="icon iconfont default-confirm-icon">&#xe839; </span>
),
okText: "退出登录",
cancelText: "点错了",
onOk: () => {
this.handleLogout();
},
});
}
handleLogout() {
BaseService.logout({identifier:User.getIdentifier()}).then((res) => {
User.removeUserId();
User.removeToken();
User.removeEnterpriseId();
User.clearUserInfo();
const url = `${LIVE_SHARE}store/index?id=${User.getCustomerStoreId()||User.getStoreId()}&userId=${User.getUserId()}&from=work_weixin`;
window.location.href = url;
});
} }
render() { render() {
const { menuType } = this.state; const { nickName } = this.state;
return ( return (
<div className="error-college-page"> <div className="error-college-page">
<Header id="error" handleMenuType={this.handleMenuType} menuType={menuType} /> <div className="header">
<img src='https://image.xiaomaiketang.com/xm/FEdG7BMwKr.png' className="logo" alt="" />
<div className="name-box">
<img src='https://image.xiaomaiketang.com/xm/hcp6zs5HTn.png' className="avatar" alt="" />
<span className="name">{nickName}</span>
<span
className="control"
onClick={() => {
this.handleLogoutConfirm();
}}
>退出登录</span>
</div>
</div>
<div className="error-college-box"> <div className="error-college-box">
<img src="https://image.xiaomaiketang.com/xm/MQRaYkbr6J.png" className="error-college-image" /> <div id="lottie-box" className="error-college-image"></div>
<span className="error-college-tip">{User.getStoreName()}已停用</span> <span className="error-college-tip">{User.getStoreName()}已停用</span>
</div> </div>
</div> </div>
......
...@@ -2,6 +2,36 @@ ...@@ -2,6 +2,36 @@
position: relative; position: relative;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
.header {
display: flex;
align-items: center;
height: 60px;
padding: 0 344px;
justify-content: space-between;
.logo {
width: 117px;
height: 30px;
}
.name-box {
display: flex;
align-items: center;
.avatar {
width: 24px;
height: 24px;
border-radius: 50%;
margin-right: 6px;
}
.name {
color: #666;
font-size: 16px;
margin-right: 8px;
}
.control {
color: #2966FF;
cursor: pointer;
}
}
}
.error-college-box { .error-college-box {
position: absolute; position: absolute;
top: 50px; top: 50px;
...@@ -10,20 +40,20 @@ ...@@ -10,20 +40,20 @@
bottom: 0; bottom: 0;
.error-college-image { .error-college-image {
position: absolute; position: absolute;
top: 246px; top: 266px;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
width: 246px; width: 200px;
height: 132px; height: 200px;
display: block; display: block;
} }
.error-college-tip { .error-college-tip {
position: absolute; position: absolute;
top: 404px; top: 482px;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
color: #8C8E93; color: #000;
font-size: 13px; font-size: 18px;
} }
} }
} }
\ No newline at end of file
...@@ -48,8 +48,8 @@ ...@@ -48,8 +48,8 @@
margin-right: 20px margin-right: 20px
} }
.icon-img{ .icon-img{
width:16px; width:18px;
height:16px; height:18px;
margin-right:16px; margin-right:16px;
} }
.listType { .listType {
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
* @Last Modified time: 2020-04-18 10:54:32 * @Last Modified time: 2020-04-18 10:54:32
*/ */
import React, { useState, useEffect, useRef } from "react"; import React, { useState, useEffect, useRef } from 'react';
import "./XMAudio.less"; import './XMAudio.less';
import VideoUpload from "@/core/upload"; import VideoUpload from '@/core/upload';
let timerInterval; let timerInterval;
...@@ -22,7 +22,7 @@ const XMAudio = (props) => { ...@@ -22,7 +22,7 @@ const XMAudio = (props) => {
const [totalTime, setTotalTime] = useState(Math.round(Number(size))); const [totalTime, setTotalTime] = useState(Math.round(Number(size)));
const prevTimeRef = useRef(); const prevTimeRef = useRef();
useEffect(() => { useEffect(() => {
if(!props.forbidParse){ if (!props.forbidParse) {
VideoUpload.getVideoParseRoute(props.url).then((newUrl) => { VideoUpload.getVideoParseRoute(props.url).then((newUrl) => {
setUrl(newUrl); setUrl(newUrl);
}); });
...@@ -30,7 +30,7 @@ const XMAudio = (props) => { ...@@ -30,7 +30,7 @@ const XMAudio = (props) => {
setLeftTime(Math.round(Number(size))); setLeftTime(Math.round(Number(size)));
setTotalTime(Math.round(Number(size))); setTotalTime(Math.round(Number(size)));
ref.current.addEventListener("pause", () => { ref.current.addEventListener('pause', () => {
clearInterval(timer); clearInterval(timer);
setPlaying(false); setPlaying(false);
setTimer(null); setTimer(null);
...@@ -42,7 +42,6 @@ const XMAudio = (props) => { ...@@ -42,7 +42,6 @@ const XMAudio = (props) => {
}, [props.url]); }, [props.url]);
useEffect(() => { useEffect(() => {
if (playing) { if (playing) {
timerInterval = setInterval(() => { timerInterval = setInterval(() => {
setPlayedTime((preTime) => { setPlayedTime((preTime) => {
...@@ -53,18 +52,18 @@ const XMAudio = (props) => { ...@@ -53,18 +52,18 @@ const XMAudio = (props) => {
if ((prevTimeRef.current + 20) % 1000 === 0) { if ((prevTimeRef.current + 20) % 1000 === 0) {
setLeftTime(totalTime - (prevTimeRef.current + 20)); setLeftTime(totalTime - (prevTimeRef.current + 20));
} }
if ((prevTimeRef.current + 30) >= totalTime) { if (prevTimeRef.current + 30 >= totalTime) {
clearInterval(timerInterval); clearInterval(timerInterval);
setPlayedTime(0); setPlayedTime(0);
setLeftTime(totalTime); setLeftTime(totalTime);
setPlaying(false); setPlaying(false);
} }
}, 20); }, 20);
const audioDomList = document.querySelectorAll("audio"); const audioDomList = document.querySelectorAll('audio');
for (let i = 0; i < Array.from(audioDomList).length; i++) { for (let i = 0; i < Array.from(audioDomList).length; i++) {
if (audioDomList[i] === ref.current) { if (audioDomList[i] === ref.current) {
ref.current.play(); ref.current.play();
setTimer(timerInterval) setTimer(timerInterval);
} else { } else {
audioDomList[i].pause(); audioDomList[i].pause();
} }
...@@ -75,9 +74,7 @@ const XMAudio = (props) => { ...@@ -75,9 +74,7 @@ const XMAudio = (props) => {
} }
}, [playing]); }, [playing]);
const audioImg = `https://xiaomai-image.oss-cn-hangzhou.aliyuncs.com/${ const audioImg = `https://xiaomai-image.oss-cn-hangzhou.aliyuncs.com/${playing ? 1584514990496 : 1584514999661}.png`;
playing ? 1584514990496 : 1584514999661
}.png`;
function _togglePlay() { function _togglePlay() {
playing ? pausePlay() : startPlay(); playing ? pausePlay() : startPlay();
...@@ -112,78 +109,74 @@ const XMAudio = (props) => { ...@@ -112,78 +109,74 @@ const XMAudio = (props) => {
} }
} }
function _startTime() { function _startTime() {
let time = Math.floor(playedTime / 1000); let time = Math.floor(playedTime / 1000);
let second = 0 let second = 0;
let minute = 0; let minute = 0;
let result = 0 let result = 0;
if (time > 0) { if (time > 0) {
minute = Math.floor(time % 3600 / 60); minute = Math.floor((time % 3600) / 60);
second = Math.floor((time - 60 * minute) % 60); second = Math.floor((time - 60 * minute) % 60);
if (minute < 10) { if (minute < 10) {
minute = "0" + minute; minute = '0' + minute;
} }
if (second < 10) { if (second < 10) {
second = "0" + second; second = '0' + second;
} }
result = minute + ':' + second result = minute + ':' + second;
}else{ } else {
result = "00:00" result = '00:00';
} }
return result; return result;
} }
function _endTime() { function _endTime() {
let time = Math.floor(totalTime / 1000); let time = Math.floor(totalTime / 1000);
let second = 0 let second = 0;
let minute = 0; let minute = 0;
let result = 0 let result = 0;
if (time > 0) { if (time > 0) {
minute = Math.floor(time % 3600 / 60); minute = Math.floor((time % 3600) / 60);
second = Math.floor((time - 60 * minute) % 60); second = Math.floor((time - 60 * minute) % 60);
if (minute < 10) { if (minute < 10) {
minute = "0" + minute; minute = '0' + minute;
} }
if (second < 10) { if (second < 10) {
second = "0" + second; second = '0' + second;
} }
result = minute + ':' + second result = minute + ':' + second;
} }
if(time === 0){ if (time === 0) {
result = "00:00" result = '00:00';
} }
return result; return result;
} }
function putDownFlag(event) { function putDownFlag(event) {
let dragDiv = event.target; let dragDiv = event.target;
dragDiv.style.cursor = "pointer"; dragDiv.style.cursor = 'pointer';
let offsetX = parseInt(dragDiv.style.left); // 获取当前的x轴距离 let offsetX = parseInt(dragDiv.style.left); // 获取当前的x轴距离
let innerX = event.clientX - offsetX; // 获取鼠标在方块内的x轴距 let innerX = event.clientX - offsetX; // 获取鼠标在方块内的x轴距
// 按住鼠标时为div修改样式 // 按住鼠标时为div修改样式
dragDiv.style.width = "16px"; dragDiv.style.width = '16px';
dragDiv.style.height = "16px"; dragDiv.style.height = '16px';
dragDiv.style.top = "-7px"; dragDiv.style.top = '-7px';
dragDiv.style.backGround = "linear-gradient(180deg, #FFB467 0%, #FF9143 100%)" dragDiv.style.backGround = 'linear-gradient(180deg, #FFB467 0%, #FF9143 100%)';
// 鼠标移动的时候不停的修改div的left和top值 // 鼠标移动的时候不停的修改div的left和top值
document.onmousemove = function (event) { document.onmousemove = function (event) {
dragDiv.style.left = event.clientX - innerX + "px"; dragDiv.style.left = event.clientX - innerX + 'px';
// 边界判断 // 边界判断
if (parseInt(dragDiv.style.left) <= 0) { if (parseInt(dragDiv.style.left) <= 0) {
dragDiv.style.left = "0px"; dragDiv.style.left = '0px';
} }
if (parseInt(dragDiv.style.left) >= 154) { if (parseInt(dragDiv.style.left) >= 154) {
dragDiv.style.left = "149px"; dragDiv.style.left = '149px';
}
setPlayedTime(parseInt(dragDiv.style.left) / 150 * totalTime)
} }
setPlayedTime((parseInt(dragDiv.style.left) / 150) * totalTime);
};
// 鼠标抬起时,清除绑定在文档上的mousemove和mouseup事件 // 鼠标抬起时,清除绑定在文档上的mousemove和mouseup事件
// 否则鼠标抬起后还可以继续拖拽方块 // 否则鼠标抬起后还可以继续拖拽方块
document.onmouseup = function () { document.onmouseup = function () {
...@@ -191,50 +184,43 @@ const XMAudio = (props) => { ...@@ -191,50 +184,43 @@ const XMAudio = (props) => {
document.onmouseup = null; document.onmouseup = null;
// 清除border // 清除border
dragDiv.style.top = "-4px"; dragDiv.style.top = '-4px';
dragDiv.style.width = "10px"; dragDiv.style.width = '10px';
dragDiv.style.height = "10px"; dragDiv.style.height = '10px';
} };
} }
function mouseOver(event){ function mouseOver(event) {
let dragDiv = event.target; let dragDiv = event.target;
dragDiv.style.cursor = "pointer"; dragDiv.style.cursor = 'pointer';
dragDiv.style.width = "16px"; dragDiv.style.width = '16px';
dragDiv.style.height = "16px"; dragDiv.style.height = '16px';
dragDiv.style.top = "-7px"; dragDiv.style.top = '-7px';
dragDiv.style.backGround = "linear-gradient(180deg, #FFB467 0%, #FF9143 100%)" dragDiv.style.backGround = 'linear-gradient(180deg, #FFB467 0%, #FF9143 100%)';
} }
function mouseLeave (event){ function mouseLeave(event) {
let dragDiv = event.target; let dragDiv = event.target;
dragDiv.style.top = "-4px"; dragDiv.style.top = '-4px';
dragDiv.style.width = "10px"; dragDiv.style.width = '10px';
dragDiv.style.height = "10px"; dragDiv.style.height = '10px';
ref.current.currentTime = playedTime / 1000;
} }
return ( return (
<div className="xm-audio" style={style}> <div className='xm-audio' style={style}>
<img src={audioImg} onClick={_togglePlay} className="audio-image" /> <img src={audioImg} onClick={_togglePlay} className='audio-image' />
<div className="process-area"> <div className='process-area'>
<div className='complete-area' style={{ width: `${(playedTime / totalTime) * 150}px ` }} />
<div <div
className="complete-area" className='flag'
style={{ width: `${(playedTime / totalTime) * 150}px ` }}
/>
<div
className="flag"
style={{ left: `${(playedTime / totalTime) * 150}px ` }} style={{ left: `${(playedTime / totalTime) * 150}px ` }}
onMouseDown={(e) => putDownFlag(e)} onMouseDown={(e) => putDownFlag(e)}
onMouseOver={(e)=> mouseOver(e)} onMouseOver={(e) => mouseOver(e)}
onMouseLeave={(e)=>mouseLeave(e)} onMouseLeave={(e) => mouseLeave(e)}
/> />
</div> </div>
<span className="sec-time"> <span className='sec-time'>
{`${_startTime()}`}/{`${_endTime()}`} {`${_startTime()}`}/{`${_endTime()}`}
</span> </span>
<audio <audio src={url} ref={ref} autoPlay={false} onCanPlayThrough={_getDuration} />
src={url}
ref={ref}
autoPlay={false}
onCanPlayThrough={_getDuration}
/>
</div> </div>
); );
}; };
......
...@@ -5,10 +5,11 @@ ...@@ -5,10 +5,11 @@
* @Last Modified time: 2020-03-24 10:18:43 * @Last Modified time: 2020-03-24 10:18:43
*/ */
.xm-audio { .xm-audio {
display: flex; display: flex;
align-items: center; align-items: center;
width: 280px; width: 280px;
padding: 10px 20px;
border-radius: 5px; border-radius: 5px;
background-color: #ffffff; background-color: #ffffff;
.audio-image { .audio-image {
...@@ -24,11 +25,11 @@ ...@@ -24,11 +25,11 @@
cursor: pointer; cursor: pointer;
} }
.play-icon { .play-icon {
color: #FC8540; color: #fc8540;
} }
.sec-time{ .sec-time {
white-space: nowrap; white-space: nowrap;
color: #FF8534; color: #ff8534;
margin-left: 12px; margin-left: 12px;
font-size: 13px; font-size: 13px;
} }
...@@ -38,11 +39,11 @@ ...@@ -38,11 +39,11 @@
border-radius: 3px; border-radius: 3px;
margin-left: 12px; margin-left: 12px;
position: relative; position: relative;
background:rgba(255,133,52,0.2); background: rgba(255, 133, 52, 0.2);
.complete-area { .complete-area {
height: 100%; height: 100%;
background-color: #FF8534; background-color: #ff8534;
border-top-left-radius: 3px; border-top-left-radius: 3px;
border-bottom-left-radius: 3px; border-bottom-left-radius: 3px;
} }
...@@ -52,7 +53,7 @@ ...@@ -52,7 +53,7 @@
width: 10px; width: 10px;
height: 10px; height: 10px;
border-radius: 50%; border-radius: 50%;
background:linear-gradient(180deg,rgba(255,180,103,1) 0%,rgba(255,145,67,1) 100%); background: linear-gradient(180deg, rgba(255, 180, 103, 1) 0%, rgba(255, 145, 67, 1) 100%);
} }
} }
} }
/*
* @Author: yuananting
* @Date: 2021-04-07 16:10:21
* @LastEditors: wufan
* @LastEditTime: 2021-04-26 10:21:19
* @Description: 助学工具-考试-考试结果
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import React, { useState, useEffect } from 'react';
import { withRouter } from 'react-router-dom';
import User from '@/common/js/user';
import './TestDetailPage.less';
import Service from '@/common/js/service';
import { message } from 'antd';
import AnswerDescPage from '../components/AnswerDescPage';
import Breadcrumbs from '@/components/Breadcrumbs';
function TestDetailPage(props) {
const examId = props.match.params.testId.replace(/\?.+/, '');
const paperId = window.getParameterByName('paperId');
const userId = window.getParameterByName('userId');
const [examDetail, setExamDetail] = useState({
answerAnalysis: '',
resultShow: '',
examDesc: '',
examDuration: 0,
examEndTime: '',
examName: '',
examStartTime: '',
paperId: 0,
passRate: 0,
passScore: 0,
resultContent: '',
totalQuestionCount: 0,
totalScore: 0,
userCorrectQuestion: 0,
userExamDuration: 0,
userScore: 0,
}); // 考试详情
const [paperDetail, setPaperDetail] = useState({}); // 试卷详情
const [questionList, setQuestionList] = useState([]); // 试卷题目列表
const [userAnswerList, setUserAnswerList] = useState([]); // 用户答案列表
const [isScrollShow, setIsScrollShow] = useState(false); // 是否展示回到顶部按钮
const { answerAnalysis, resultContent, examName, totalScore, totalQuestionCount, passScore, examDuration, userExamDuration, userScore, userCorrectQuestion } =
examDetail;
useEffect(() => {
bindScroll();
getPaperDetail();
getExamDetail();
}, []);
function bindScroll() {
window.addEventListener('scroll', handleScroll, true);
}
function getExamDetail() {
const params = {
examId,
source: 0,
tenantId: User.getStoreId() || window.getParameterByName('id'),
userId,
};
Service.Hades('public/customerHades/queryUserExamResult', params, {
reject: true,
})
.then((res) => {
const data = { ...res.result };
setExamDetail(data);
})
.catch((res) => {
if (res.code === 'EXAM_IS_NOT_EXIST') {
handleChangeShowErrorPage();
} else {
message.error(res.message);
}
});
}
function getPaperDetail() {
Service.Hades('public/customerHades/queryUserExamAnswer', {
examId,
paperId,
source: 0,
readAnswer: true,
tenantId: User.getStoreId() || window.getParameterByName('id'),
userId,
}).then((res) => {
if (res.success) {
const { paperDetailVO, userExamAnswerVO } = res.result;
const userAnswerList = [...userExamAnswerVO];
const { questionList } = paperDetailVO;
setPaperDetail(paperDetail);
setUserAnswerList(userAnswerList);
setQuestionList(questionList || []);
}
});
}
function handleChangeShowErrorPage() {
setIsShowErrorPage(true);
}
// 用户时长转换
function formatTime(msTime) {
let time = msTime / 1000;
let hour = Math.floor(time / 60 / 60) % 24 > 9 ? Math.floor(time / 60 / 60) % 24 : '0' + (Math.floor(time / 60 / 60) % 24);
let minute = Math.floor(time / 60) % 60 > 9 ? Math.floor(time / 60) % 60 : '0' + (Math.floor(time / 60) % 60);
let second = time % 60 > 9 ? Math.round(time % 60) : '0' + Math.round(time % 60);
return `${hour}:${minute}:${second}`;
}
// 快速跳转题目
function handleQuickActiveQuestion(questionId) {
let selectDom = document.getElementById(`${questionId}`);
selectDom.scrollIntoView({
block: 'center',
});
}
// 回到顶部
function handleGoTop() {
window.scrollTo(0, 0);
}
// 监听滚动,200以后出现回到顶部按钮
function handleScroll() {
if (window.pageYOffset > 200) {
setIsScrollShow(true);
} else {
setIsScrollShow(false);
}
}
function renderResultInfo() {
return (
<div>
<div className='exam-info'>
<div className='info-score item'>
<div className='current-score'>
{userScore}
<img src='https://image.xiaomaiketang.com/xm/TsaApiPyxA.png' />
</div>
<div className='origin-data'>总分{totalScore}</div>
</div>
<div className='info-level item'>
<div className='current-level'>{userScore < passScore ? '不及格' : '及格'}</div>
<div className='origin-data'>及格分{passScore}</div>
</div>
<div className='info-correct item'>
<div className='current-correct'>
{userCorrectQuestion}
<div className='text'>答对题数</div>
</div>
<div className='origin-data'>{totalQuestionCount}</div>
</div>
<div className='info-time item'>
<div className='current-time'>
{formatTime(Number(userExamDuration > examDuration ? examDuration : userExamDuration || 0))}
<div className='text'>用时</div>
</div>
<div className='origin-data'>考试时长{(examDuration || 0) / 60 / 1000}分钟</div>
</div>
</div>
<div className='exam-result'>
<div className='result-title'>
<div className='left-title'>答题情况</div>
<div className='right-tip'>
<span className='correct-num'>{userCorrectQuestion}</span>
<span className='incorrect-num'>/{totalQuestionCount} </span>
道正确
</div>
</div>
<div className='result-content'>
{sortedAnswerList.map((item, index) => {
return (
<div
className='result-content__item'
onClick={() => {
console.log('item', item);
handleQuickActiveQuestion(item.questionId);
}}>
<img
className='icon'
src={item.isCorrect === 1 ? 'https://image.xiaomaiketang.com/xm/FwZa2Kaypc.png' : 'https://image.xiaomaiketang.com/xm/7tRHDf6ysA.png'}
/>
<div className='result-content-box'>{index + 1}</div>
</div>
);
})}
</div>
</div>
<AnswerDescPage userId={userId} />
</div>
);
}
let sortedAnswerList = [];
questionList.map((item) => {
userAnswerList &&
userAnswerList.map((answerItem) => {
if (item.questionId === answerItem.questionId) {
sortedAnswerList.push(answerItem);
}
});
});
return (
<div className='exam-result-page page'>
<Breadcrumbs navList={'答题详情'} goBack={props.history.goBack} />
<div className='center'>
<div className='box'>
<div className='box-content'>
<div
className='exam-head'
style={{
padding: examName.length > 20 ? '8px 0 14px' : '16px 0 29px',
}}>
<div className={`exam-name ${examName.length > 20 ? 'many' : 'few'}`}>{examName}</div>
</div>
{renderResultInfo()}
</div>
</div>
</div>
{isScrollShow && <div className='go-top' onClick={handleGoTop}></div>}
</div>
);
}
export default withRouter(TestDetailPage);
.exam-result-page {
margin: 0 auto;
.go-top {
cursor: pointer;
position: fixed;
width: 48px;
height: 48px;
background-image: url('https://image.xiaomaiketang.com/xm/jWix2xDm4t.png');
background-size: 100%;
box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.08);
border-radius: 4px;
bottom: 125px;
right: calc(~'(100vw - 1232px)/2');
display: flex;
justify-content: center;
align-items: center;
&:hover {
background-image: url('https://image.xiaomaiketang.com/xm/GHBBNDtTDd.png');
}
}
.box {
.box-content {
position: relative;
width: 840px;
margin: 0 auto;
.exam-head {
color: #333;
text-align: center;
.exam-name {
width: 600px;
font-weight: 500;
margin: 0 auto;
font-size: 24px;
line-height: 33px;
}
.many {
font-size: 21px;
line-height: 29px;
}
.few {
font-size: 25px;
line-height: 36px;
}
}
.empty-result {
box-sizing: border-box;
margin: 0 16px;
background: #ffffff;
box-shadow: 0 -15px 10px 0 rgba(0, 34, 121, 0.1);
border-radius: 4px 4px 0 0;
padding-top: 56px;
.lack-desc {
margin-top: 16px;
.title {
font-size: 17px;
font-weight: 500;
color: #333333;
line-height: 24px;
margin-bottom: 4px;
}
.content {
font-size: 15px;
color: #999999;
line-height: 21px;
}
}
.after-desc {
margin-top: 16px;
.title {
font-size: 17px;
font-weight: 500;
color: #333333;
line-height: 24px;
margin-bottom: 20px;
}
.after-show-box {
// margin: 0 37px;
padding: 11px 21px;
background: #f4f6fa;
border-radius: 4px;
font-size: 15px;
color: #999999;
line-height: 21px;
text-align: center;
}
}
}
.exam-info {
width: 840px;
box-sizing: border-box;
margin: 0 auto;
padding: 24px 0 12px;
height: 130px;
background: #ffffff;
box-shadow: 0px 5px 30px 0px rgba(12, 54, 158, 0.08);
border-radius: 4px;
display: flex;
justify-content: center;
.item {
flex: 1 25%;
display: flex;
flex-direction: column;
// height: 130px;
align-items: center;
justify-content: space-between;
position: relative;
.origin-data {
text-align: center;
font-size: 14px;
color: #999999;
line-height: 20px;
}
.line {
&::before {
width: 1px;
height: 40px;
content: '';
position: absolute;
right: 0;
top: 0;
background-color: rgba(232, 232, 232, 1);
}
}
&.info-score {
.current-score {
font-size: 40px;
font-weight: 500;
color: #ff4f4f;
text-align: center;
line-height: 42px;
img {
display: block;
margin: 0 auto;
width: 27px;
height: 12px;
padding-left: 4px;
}
}
}
&.info-level {
.current-level {
font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
line-height: 33px;
text-align: center;
}
}
&.info-correct {
.current-correct {
display: flex;
flex-direction: column;
padding-bottom: 20px;
justify-content: space-between;
align-items: center;
font-size: 20px;
font-weight: 500;
color: #333333;
line-height: 28px;
.text {
margin-top: 4px;
width: 48px;
height: 17px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9b9b9b;
line-height: 17px;
text-align: center;
}
}
}
&.info-time {
.current-time {
display: flex;
flex-direction: column;
padding-bottom: 20px;
justify-content: space-between;
align-items: center;
font-size: 20px;
font-weight: 500;
color: #333333;
line-height: 28px;
}
.text {
margin-top: 4px;
width: 48px;
height: 17px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9b9b9b;
line-height: 17px;
text-align: center;
}
}
}
}
.left-title {
font-size: 20px;
font-weight: 500;
color: #333333;
position: relative;
margin-left: 8px;
line-height: 28px;
&::before {
position: absolute;
content: '';
left: -8px;
top: 50%;
transform: translateY(-50%);
width: 4px;
height: 16px;
background-image: linear-gradient(#2966ff 83.5%, #0acca4 16.5%);
}
}
.exam-result {
padding: 44px 0 24px 0;
vertical-align: middle;
.result-title {
display: flex;
justify-content: space-between;
margin-bottom: 30px;
line-height: 24px;
.right-tip {
font-size: 15px;
font-weight: 500;
color: #999999;
.correct-num {
color: #16e0b7;
}
.incorrect-num {
font-size: 11px;
}
}
}
.result-content {
display: flex;
flex-wrap: wrap;
&__item {
position: relative;
margin: 0 16px 16px 0;
width: 36px;
height: 36px;
background: #f4f6fa;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
&:nth-child(5n) {
margin-right: 50px;
}
&:nth-child(15n) {
margin-right: 0px;
}
.icon {
width: 16px;
height: 16px;
position: absolute;
left: 50%;
top: 0;
transform: translate(-50%, -50%);
}
.result-content-box {
width: 36px;
height: 36px;
font-size: 15px;
line-height: 36px;
background: #f4f6fa;
border-radius: 4px;
text-align: center;
}
}
}
}
}
}
.footer-btn {
width: 100%;
position: fixed;
bottom: 0;
left: 0;
height: 64px;
background-color: #fff;
display: flex;
align-items: center;
justify-content: center;
border-top: 1px solid rgba(238, 238, 238, 1);
box-sizing: border-box;
.text {
cursor: pointer;
background: #ffb714;
border-radius: 5px;
width: 342px;
font-size: 15px;
color: #ffffff;
line-height: 44px;
text-align: center;
&.disabled {
background-color: #ccc;
}
}
}
}
.dataAnalysic{ .dataAnalysic {
.titleBox{ .titleBox {
position: relative; position: relative;
padding-left: 28px;
font-size: 19px; font-size: 19px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: 26px; line-height: 26px;
background: #FFFFFF; background: #ffffff;
&::before{ &::before {
width:4px; width: 4px;
height:12px; height: 12px;
content:''; content: '';
background-image: linear-gradient(#2966FF 83.5%, #0ACCA4 16.5%); background-image: linear-gradient(#2966ff 83.5%, #0acca4 16.5%);
display:inline-block; display: inline-block;
position: absolute; margin-right: 8px;
left:16px;
top:7px;
} }
} }
.ant-tabs-content-holder { .ant-tabs-content-holder {
......
.examination-manager{ .examination-manager {
.status{ .status {
display: inline-block; display: inline-block;
margin-left: 4px; margin-left: 4px;
border: 1px solid #999; border: 1px solid #999;
padding: 2px 4px; padding: 2px 4px;
line-height: 16px; line-height: 16px;
} }
.ant-table-column-sorters {
justify-content: flex-end;
}
.ant-table-column-sorter { .ant-table-column-sorter {
margin-top: 0px !important; margin-top: 0px !important;
......
.dataPanal{ .dataPanal {
border-radius: 4px; border-radius: 4px;
border: 1px solid #E8E8E8; border: 1px solid #e8e8e8;
display: flex; display: flex;
.item{ .item {
text-align: center; text-align: center;
// width: 29.9%; // width: 29.9%;
position: relative; position: relative;
flex: 1; flex: 1;
.num{ .num {
font-size: 26px; font-size: 26px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
...@@ -16,7 +15,7 @@ ...@@ -16,7 +15,7 @@
line-height: 26px; line-height: 26px;
margin-top: 12px; margin-top: 12px;
} }
.percent{ .percent {
margin-top: 6px; margin-top: 6px;
font-size: 12px; font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
...@@ -26,7 +25,7 @@ ...@@ -26,7 +25,7 @@
height: 20px; height: 20px;
margin-bottom: 18px; margin-bottom: 18px;
} }
.subTitle{ .subTitle {
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
...@@ -34,16 +33,16 @@ ...@@ -34,16 +33,16 @@
line-height: 20px; line-height: 20px;
margin-bottom: 12px; margin-bottom: 12px;
} }
.type{ .type {
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
span{ span {
color: rgba(153, 153, 153, 1); color: rgba(153, 153, 153, 1);
} }
.icon{ .icon {
color: rgba(204, 204, 204, 1); color: rgba(204, 204, 204, 1);
font-size: 16px; font-size: 16px;
margin-right: 4px; margin-right: 4px;
...@@ -52,7 +51,7 @@ ...@@ -52,7 +51,7 @@
} }
} }
&:after{ &:after {
content: ''; content: '';
width: 0px; width: 0px;
height: 40px; height: 40px;
...@@ -63,14 +62,13 @@ ...@@ -63,14 +62,13 @@
right: 0px; right: 0px;
} }
&:last-child{ &:last-child {
&:after{ &:after {
display: none; display: none;
} }
} }
} }
.exstatus{ .exstatus {
width: 4px; width: 4px;
height: 4px; height: 4px;
background: rgb(35, 143, 255); background: rgb(35, 143, 255);
...@@ -80,3 +78,13 @@ ...@@ -80,3 +78,13 @@
top: -4px; top: -4px;
} }
} }
.answer-detail {
color: rgb(35, 143, 255);
}
.analysic-content {
.ant-table-bordered .ant-table-tbody tr {
&.analysic-content-row {
height: 50px;
}
}
}
...@@ -89,3 +89,22 @@ ...@@ -89,3 +89,22 @@
.ant-dropdown-menu-item-selected > span { .ant-dropdown-menu-item-selected > span {
color: #333333; color: #333333;
} }
.type-order-modal {
.type-order-table {
tr {
background: #F7F8F9 !important;
display: flex;
margin-bottom: 8px;
width: 521px;
justify-content: space-between;
td {
border: none !important;
}
}
.ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td {
background: #F7F8F9 !important;
}
}
}
...@@ -19,7 +19,6 @@ import { ...@@ -19,7 +19,6 @@ import {
ConfigProvider, ConfigProvider,
Empty, Empty,
} from "antd"; } from "antd";
import Lottie from 'react-lottie';
import { PageControl, XMTable } from "@/components"; import { PageControl, XMTable } from "@/components";
import "./PaperList.less"; import "./PaperList.less";
import { Route, withRouter } from "react-router-dom"; import { Route, withRouter } from "react-router-dom";
...@@ -31,7 +30,6 @@ import Service from "@/common/js/service"; ...@@ -31,7 +30,6 @@ import Service from "@/common/js/service";
import _ from "underscore"; import _ from "underscore";
import PaperPreviewModal from "../modal/PreviewPaperModal"; import PaperPreviewModal from "../modal/PreviewPaperModal";
import MoveModal from '../../modal/MoveModal'; import MoveModal from '../../modal/MoveModal';
import * as nodata from '../../../lottie/nodata/data.json';
import Bus from "@/core/bus"; import Bus from "@/core/bus";
const { Search } = Input; const { Search } = Input;
...@@ -547,14 +545,6 @@ class PaperList extends Component { ...@@ -547,14 +545,6 @@ class PaperList extends Component {
User.getUserRole() User.getUserRole()
); );
const { match } = this.props; const { match } = this.props;
const defaultOptions = {
loop: true,
autoplay: true,
animationData: nodata,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
}
}
return ( return (
<div className={"paper-list " + this.props.type}> <div className={"paper-list " + this.props.type}>
<div className="paper-list-filter"> <div className="paper-list-filter">
...@@ -635,15 +625,6 @@ class PaperList extends Component { ...@@ -635,15 +625,6 @@ class PaperList extends Component {
bordered bordered
loading={loading} loading={loading}
renderEmpty={{ renderEmpty={{
image: <div style={{ marginTop: 24 }}>
<Lottie
options={defaultOptions}
height={150}
width={150}
isStopped={false}
isPaused={false}
/>
</div>,
description: <span style={{ display: 'block', paddingBottom: 24 }}>还没有试卷</span> description: <span style={{ display: 'block', paddingBottom: 24 }}>还没有试卷</span>
}} }}
/> />
...@@ -660,16 +641,7 @@ class PaperList extends Component { ...@@ -660,16 +641,7 @@ class PaperList extends Component {
pagination={false} pagination={false}
bordered bordered
renderEmpty={{ renderEmpty={{
image: <div style={{ marginTop: 24 }}> description: <span style={{ display: 'block', paddingBottom: 24 }}>还没有试卷</span>
<Lottie
options={defaultOptions}
height={150}
width={150}
isStopped={false}
isPaused={false}
/>
</div>,
description: <span style={{ display: 'block', paddingBottom: 24 }}>暂无数据</span>
}} }}
/> />
)} )}
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
*/ */
import React, { Component } from "react"; import React, { Component } from "react";
import { Modal, ConfigProvider, Empty } from "antd"; import { Modal, ConfigProvider, Empty } from "antd";
import Lottie from 'react-lottie';
import User from "@/common/js/user"; import User from "@/common/js/user";
import AidToolService from "@/domains/aid-tool-domain/AidToolService"; import AidToolService from "@/domains/aid-tool-domain/AidToolService";
import "./PreviewPaperModal.less"; import "./PreviewPaperModal.less";
...@@ -15,6 +16,7 @@ import ScanFileModal from "@/modules/resource-disk/modal/ScanFileModal"; ...@@ -15,6 +16,7 @@ import ScanFileModal from "@/modules/resource-disk/modal/ScanFileModal";
import _ from "underscore"; import _ from "underscore";
import XMAudio from "../../components/XMAudio"; import XMAudio from "../../components/XMAudio";
import { NUM_TO_WORD_MAP } from "@/common/constants/punchClock/punchClock"; import { NUM_TO_WORD_MAP } from "@/common/constants/punchClock/punchClock";
import previewEmpty from '../../../lottie/previewEmpty/data.json';
const questionTypeList = { const questionTypeList = {
SINGLE_CHOICE: "单选题", SINGLE_CHOICE: "单选题",
MULTI_CHOICE: "多选题", MULTI_CHOICE: "多选题",
...@@ -254,13 +256,28 @@ class PreviewPaperModal extends Component { ...@@ -254,13 +256,28 @@ class PreviewPaperModal extends Component {
// 自定义空状态 // 自定义空状态
customizeRenderEmpty = () => { customizeRenderEmpty = () => {
const defaultOptions = {
loop: true,
autoplay: true,
animationData: previewEmpty,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
}
}
return ( return (
<Empty <Empty
image="https://image.xiaomaiketang.com/xm/emptyTable.png" image={
imageStyle={{ <div style={{ marginTop: 24 }}>
height: 100, <Lottie
}} options={defaultOptions}
description={"暂无内容"} height={150}
width={150}
isStopped={false}
isPaused={false}
/>
</div>
}
description={<span style={{ display: 'block', paddingBottom: 24, marginTop: 50 }}>暂无内容</span>}
></Empty> ></Empty>
); );
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yuananting * @Author: yuananting
* @Date: 2021-03-29 10:52:26 * @Date: 2021-03-29 10:52:26
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-05-08 16:11:27 * @LastEditTime: 2021-06-07 14:45:02
* @Description: 助学工具-试卷-新建选择题目弹窗 * @Description: 助学工具-试卷-新建选择题目弹窗
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -42,7 +42,8 @@ class SelectQuestionModal extends Component { ...@@ -42,7 +42,8 @@ class SelectQuestionModal extends Component {
width={1080} width={1080}
onOk={() => { onOk={() => {
this.props.setSelectedQuestion( this.props.setSelectedQuestion(
this.listRef.current.state.selectQuestionKeys.map((item) => { this.listRef.current.state.selectQuestionKeys.map((item, index) => {
item.sorterIndex = index;
item.questionId = item.id || item.questionId; item.questionId = item.id || item.questionId;
item.questionType = item.questionTypeEnum || item.questionType; item.questionType = item.questionTypeEnum || item.questionType;
item.score = item.score || 2; item.score = item.score || 2;
......
/* /*
* @Author: yuananting * @Author: yuananting
* @Date: 2021-02-25 14:34:29 * @Date: 2021-02-25 14:34:29
* @LastEditors: wufan * @LastEditors: yuananting
* @LastEditTime: 2021-05-14 18:17:08 * @LastEditTime: 2021-06-09 12:00:12
* @Description: 助学工具-题库-操作题目Tab * @Description: 助学工具-题库-操作题目Tab
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -66,23 +66,25 @@ class OperateQuestionTab extends Component { ...@@ -66,23 +66,25 @@ class OperateQuestionTab extends Component {
} }
componentDidMount() { componentDidMount() {
const { chooseOptions } = this.state; const { questionTypeKey } = this.props;
const isEditCurrent =
getParameterByName("id") &&
getParameterByName("type") === questionTypeKey;
const optionSize = isEditCurrent ? 20 : 4;
if ( if (
["INDEFINITE_CHOICE", "MULTI_CHOICE", "SINGLE_CHOICE"].includes( ["INDEFINITE_CHOICE", "MULTI_CHOICE", "SINGLE_CHOICE"].includes(
this.props.questionTypeKey questionTypeKey
) )
) { ) {
if (chooseOptions.length === 0) {
// 选择题(单选 多选 不定项)-插入4条默认选项 // 选择题(单选 多选 不定项)-插入4条默认选项
for (var i = 0; i < 4; i++) { for (var i = 0; i < optionSize; i++) {
this.handleAddOption(); this.handleAddOption();
this.setState({ this.setState({
[`optionsValidate_${i}`]: "success", [`optionsValidate_${i}`]: "success",
[`optionsText_${i}`]: "", [`optionsText_${i}`]: "",
}); });
} }
} } else if (questionTypeKey === "JUDGE") {
} else if (this.props.questionTypeKey === "JUDGE") {
this.initJudgeOption("正确"); this.initJudgeOption("正确");
this.initJudgeOption("错误"); this.initJudgeOption("错误");
} }
...@@ -634,7 +636,7 @@ class OperateQuestionTab extends Component { ...@@ -634,7 +636,7 @@ class OperateQuestionTab extends Component {
this.state.stemContent, this.state.stemContent,
(contentItem) => contentItem.type === "RICH_TEXT" (contentItem) => contentItem.type === "RICH_TEXT"
); );
if(stemContent.textLength > 1000) { if (stemContent.textLength > 1000) {
validateError++; validateError++;
} }
let stem = stemContent.content.replace(/<[^>]+>/g, ""); let stem = stemContent.content.replace(/<[^>]+>/g, "");
...@@ -694,7 +696,7 @@ class OperateQuestionTab extends Component { ...@@ -694,7 +696,7 @@ class OperateQuestionTab extends Component {
optionUnChecked = item.isCorrectAnswer optionUnChecked = item.isCorrectAnswer
? optionUnChecked ? optionUnChecked
: optionUnChecked + 1; : optionUnChecked + 1;
if(optionContent[0].textLength > 1000) { if (optionContent[0].textLength > 1000) {
validateError++; validateError++;
} }
let optionInput = optionContent[0].content.replace(/<[^>]+>/g, ""); let optionInput = optionContent[0].content.replace(/<[^>]+>/g, "");
...@@ -1040,11 +1042,11 @@ class OperateQuestionTab extends Component { ...@@ -1040,11 +1042,11 @@ class OperateQuestionTab extends Component {
return dom ? ( return dom ? (
<div <div
className="question-item_question-content" className="question-item_question-content"
style={{ style={
display: ["PICTURE", "VIDEO"].includes(type) !["PICTURE", "VIDEO"].includes(type)
? "inline-grid" ? { display: "flex" }
: "flex", : { float: "left" }
}} }
key={index} key={index}
> >
{dom} {dom}
...@@ -1194,10 +1196,8 @@ class OperateQuestionTab extends Component { ...@@ -1194,10 +1196,8 @@ class OperateQuestionTab extends Component {
data-label="正确答案" data-label="正确答案"
> >
{_.map(chooseOptions, (optionItem, optionIndex) => { {_.map(chooseOptions, (optionItem, optionIndex) => {
const { const { questionOptionContentList, isCorrectAnswer } =
questionOptionContentList, optionItem;
isCorrectAnswer,
} = optionItem;
optionItem.optionSort = optionIndex; optionItem.optionSort = optionIndex;
const mediaBtn = ["VOICE", "AUDIO", "PICTURE"]; const mediaBtn = ["VOICE", "AUDIO", "PICTURE"];
const placeHold = const placeHold =
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
border-radius: 2px; border-radius: 2px;
padding: 16px; padding: 16px;
position: relative; position: relative;
margin-bottom: 35px; margin-bottom: 70px;
.editor-fill-box_single { .editor-fill-box_single {
border-radius: 4px; border-radius: 4px;
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
color: #999999; color: #999999;
margin-top: 8px; margin-top: 8px;
.fill-info_icon { .fill-info_icon {
color: #2966FF; color: #2966ff;
font-size: 14px; font-size: 14px;
padding-left: 9px; padding-left: 9px;
cursor: pointer; cursor: pointer;
...@@ -72,7 +72,6 @@ ...@@ -72,7 +72,6 @@
} }
.audio-box { .audio-box {
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.1); box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.1);
padding: 10px 20px;
} }
.img-box { .img-box {
max-width: 88px; max-width: 88px;
...@@ -229,7 +228,7 @@ ...@@ -229,7 +228,7 @@
line-height: 33px; line-height: 33px;
align-self: stretch; align-self: stretch;
.option-operate_item__icon:hover { .option-operate_item__icon:hover {
color: #2966FF; color: #2966ff;
} }
.icon { .icon {
color: #bfbfbf; color: #bfbfbf;
...@@ -252,7 +251,7 @@ ...@@ -252,7 +251,7 @@
border-radius: 4px; border-radius: 4px;
border: 1px dashed #e8e8e8; border: 1px dashed #e8e8e8;
font-size: 14px; font-size: 14px;
color: #2966FF; color: #2966ff;
line-height: 44px; line-height: 44px;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
color: #666666; color: #666666;
.input-box { .input-box {
margin-bottom: 8px; margin-bottom: 8px;
display: inline-block; // display: inline-block;
*:not(p) { *:not(p) {
font-weight: normal !important; font-weight: normal !important;
font-size: 14px !important; font-size: 14px !important;
......
...@@ -14,13 +14,13 @@ import UserManage from '@/modules/college-manage/UserManagePage'; ...@@ -14,13 +14,13 @@ import UserManage from '@/modules/college-manage/UserManagePage';
import StoreDecorationPage from '@/modules/store-manage/StoreDecorationPage'; import StoreDecorationPage from '@/modules/store-manage/StoreDecorationPage';
import CourseCatalogPage from '@/modules/store-manage/CourseCatalogPage'; import CourseCatalogPage from '@/modules/store-manage/CourseCatalogPage';
import LiveCoursePage from '@/modules/course-manage/LiveCoursePage'; import LiveCoursePage from '@/modules/course-manage/LiveCoursePage';
import AddLivePage from '@/modules/course-manage/AddLive' import AddLivePage from '@/modules/course-manage/AddLive';
import VideoCoursePage from '@/modules/course-manage/video-course' import VideoCoursePage from '@/modules/course-manage/video-course';
import GraphicsCoursePage from '@/modules/course-manage/graphics-course' import GraphicsCoursePage from '@/modules/course-manage/graphics-course';
import OfflineCoursePage from '@/modules/course-manage/offline-course' import OfflineCoursePage from '@/modules/course-manage/offline-course';
import AddVideoCoursePage from '@/modules/course-manage/video-course/AddVideoCourse' import AddVideoCoursePage from '@/modules/course-manage/video-course/AddVideoCourse';
import AddGraphicsCoursePage from '@/modules/course-manage/graphics-course/AddGraphicsCourse' import AddGraphicsCoursePage from '@/modules/course-manage/graphics-course/AddGraphicsCourse';
import AddOfflineCoursePage from '@/modules/course-manage/offline-course/AddOfflineCourse' import AddOfflineCoursePage from '@/modules/course-manage/offline-course/AddOfflineCourse';
// import DataList from '@/modules/course-manage/DataList/DataList'; // import DataList from '@/modules/course-manage/DataList/DataList';
// import ClassBook from '@/modules/resource-disk'; // import ClassBook from '@/modules/resource-disk';
import ResourceDisk from '@/modules/resource-disk'; import ResourceDisk from '@/modules/resource-disk';
...@@ -33,145 +33,152 @@ import CourseCategoryManage from '@/modules/teach-tool/components/CourseCategory ...@@ -33,145 +33,152 @@ import CourseCategoryManage from '@/modules/teach-tool/components/CourseCategory
import QuestionManageIndex from '@/modules/teach-tool/question-manage/Index'; import QuestionManageIndex from '@/modules/teach-tool/question-manage/Index';
import PaperManageIndex from '@/modules/teach-tool/paper-manage/Index'; import PaperManageIndex from '@/modules/teach-tool/paper-manage/Index';
import ExaminationManagerIndex from '@/modules/teach-tool/examination-manager/Index'; import ExaminationManagerIndex from '@/modules/teach-tool/examination-manager/Index';
import KnowledgeBase from "@/modules/knowledge-base/index"; import ExaminationManagerTestDetail from '@/modules/teach-tool/examination-manager/TestDetailPage';
import KnowledgeBase from '@/modules/knowledge-base/index';
import CollegeInfoPage from '@/modules/college-manage/CollegeInfoPage'; import CollegeInfoPage from '@/modules/college-manage/CollegeInfoPage';
const mainRoutes = [ const mainRoutes = [
{ {
path: "/home", path: '/home',
component: Home, component: Home,
name: "中心首页", name: '中心首页',
}, },
{ {
path: "/employees-manage", path: '/employees-manage',
component: EmployeesManagePage, component: EmployeesManagePage,
name: "员工管理", name: '员工管理',
}, },
{ {
path: '/college-employee', path: '/college-employee',
component: EmployeeManage, component: EmployeeManage,
name: '员工管理' name: '员工管理',
}, },
{ {
path: '/personal-info', path: '/personal-info',
component: personalInfoPage, component: personalInfoPage,
name: '个人信息' name: '个人信息',
}, },
{ {
path: "/user-manage", path: '/user-manage',
component: UserManagePage, component: UserManagePage,
name: "学员管理", name: '学员管理',
}, },
{ {
path: '/college-user', path: '/college-user',
component: UserManage, component: UserManage,
name: '学员管理' name: '学员管理',
}, },
{ {
path: '/store-decoration', path: '/store-decoration',
component: StoreDecorationPage, component: StoreDecorationPage,
name: '学院装修' name: '学院装修',
}, },
{ {
path: "/live-course", path: '/live-course',
component: LiveCoursePage, component: LiveCoursePage,
name: "直播课", name: '直播课',
}, },
{ {
path: "/video-course", path: '/video-course',
component: VideoCoursePage, component: VideoCoursePage,
name: "视频课", name: '视频课',
}, },
{ {
path: "/graphics-course", path: '/graphics-course',
component: GraphicsCoursePage, component: GraphicsCoursePage,
name: "图文课", name: '图文课',
}, },
{ {
path: "/offline-course", path: '/offline-course',
component: OfflineCoursePage, component: OfflineCoursePage,
name: "线下课", name: '线下课',
}, },
{ {
path: "/create-live-course", path: '/create-live-course',
component: AddLivePage, component: AddLivePage,
name: "创建直播课", name: '创建直播课',
}, },
{ {
path: "/create-video-course", path: '/create-video-course',
component: AddVideoCoursePage, component: AddVideoCoursePage,
name: "创建视频课", name: '创建视频课',
}, },
{ {
path: "/knowledge-base", path: '/knowledge-base',
// component:ResourceDisk, // component:ResourceDisk,
component: KnowledgeBase, component: KnowledgeBase,
name: "知识库", name: '知识库',
}, },
{ {
path: "/create-graphics-course", path: '/create-graphics-course',
component: AddGraphicsCoursePage, component: AddGraphicsCoursePage,
name: "创建图文课", name: '创建图文课',
}, },
{ {
path: "/create-offline-course", path: '/create-offline-course',
component: AddOfflineCoursePage, component: AddOfflineCoursePage,
name: "创建线下课", name: '创建线下课',
}, },
{ {
path: "/resource-disk", path: '/resource-disk',
component: ResourceDisk, component: ResourceDisk,
name: "资料云盘", name: '资料云盘',
}, },
{ {
path: '/question-manage-index', path: '/question-manage-index',
component:QuestionManageIndex, component: QuestionManageIndex,
name: '题库' name: '题库',
}, },
{ {
path: '/paper-manage-index', path: '/paper-manage-index',
component:PaperManageIndex, component: PaperManageIndex,
name: '试卷' name: '试卷',
}, },
{ {
path: '/examination-manage-index', path: '/examination-manage-index',
component:ExaminationManagerIndex, component: ExaminationManagerIndex,
name: '考试' name: '考试',
},
{
path: '/test-detail/:testId',
component: ExaminationManagerTestDetail,
// () => import('@/modules/teach-tool/examination-manager/TestDetailPage'),
name: '答题详情',
}, },
{ {
path: '/course-category-manage', path: '/course-category-manage',
component:CourseCategoryManage, component: CourseCategoryManage,
name: '分类管理' name: '分类管理',
}, },
{ {
path: "/switch-route", path: '/switch-route',
component: SwitchRoute, component: SwitchRoute,
name: "登录后跳转承载页", name: '登录后跳转承载页',
}, },
{ {
path: "/plan", path: '/plan',
component: PlanPage, component: PlanPage,
name: "培训计划", name: '培训计划',
}, },
{ {
path: "/create-plan", path: '/create-plan',
component: AddPlanPage, component: AddPlanPage,
name: "创建视频课", name: '创建视频课',
}, },
{ {
path: '/store-info', path: '/store-info',
component:StoreInfoPage, component: StoreInfoPage,
name: '学院信息' name: '学院信息',
}, },
{ {
path: '/college-info', path: '/college-info',
component: CollegeInfoPage, component: CollegeInfoPage,
name: '学院信息' name: '学院信息',
}, },
{ {
path: "/learning-data", path: '/learning-data',
component: LearningDataPage, component: LearningDataPage,
name: "学习数据", name: '学习数据',
}, },
]; ];
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yuananting * @Author: yuananting
* @Date: 2021-02-21 15:53:31 * @Date: 2021-02-21 15:53:31
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-05-30 11:00:09 * @LastEditTime: 2021-06-08 16:46:15
* @Description: 描述一下咯 * @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -44,22 +44,6 @@ export const menuList: any = [ ...@@ -44,22 +44,6 @@ export const menuList: any = [
] ]
}, },
{ {
groupName: "知识库",
groupCode: "CloudKnowledge",
icon: '&#xe8a8;',
link: '/knowledge-base',
img:'https://image.xiaomaiketang.com/xm/8sbP5rGQWh.png',
selectImg:'https://image.xiaomaiketang.com/xm/hJKCfibC22.png'
},
{
groupName: "资料云盘",
groupCode: "CloudDisk",
icon: '&#xe8aa;',
link: '/resource-disk',
img:'https://image.xiaomaiketang.com/xm/zGKbXJPzXx.png',
selectImg:'https://image.xiaomaiketang.com/xm/5sN4MzjxYc.png',
},
{
groupName: "培训管理", groupName: "培训管理",
groupCode: "TrainManage", groupCode: "TrainManage",
icon: '&#xe8a6;', icon: '&#xe8a6;',
...@@ -96,17 +80,28 @@ export const menuList: any = [ ...@@ -96,17 +80,28 @@ export const menuList: any = [
] ]
}, },
{ {
groupName: "学院管理", groupName: "知识库",
groupCode: "CloudShop", groupCode: "CloudKnowledge",
icon: '&#xe8a4;', icon: '&#xe8a8;',
img:'https://image.xiaomaiketang.com/xm/Q8i5RSMKNc.png', link: '/knowledge-base',
children: [ img:'https://image.xiaomaiketang.com/xm/8sbP5rGQWh.png',
selectImg:'https://image.xiaomaiketang.com/xm/hJKCfibC22.png'
},
{ {
groupName: "学院信息", groupName: "资料云盘",
groupCode: "ShopInfo", groupCode: "CloudDisk",
link: '/college-info' icon: '&#xe8aa;',
link: '/resource-disk',
img:'https://image.xiaomaiketang.com/xm/zGKbXJPzXx.png',
selectImg:'https://image.xiaomaiketang.com/xm/5sN4MzjxYc.png',
}, },
{ {
groupName: "人员管理",
groupCode: "PersonManage",
icon: '&#xe8a4;',
img:'https://image.xiaomaiketang.com/xm/PRCnrt35y8.png',
children: [
{
groupName: "员工管理", groupName: "员工管理",
groupCode: "ShopStaff", groupCode: "ShopStaff",
link: '/college-employee' link: '/college-employee'
...@@ -115,11 +110,19 @@ export const menuList: any = [ ...@@ -115,11 +110,19 @@ export const menuList: any = [
groupName: "学员管理", groupName: "学员管理",
groupCode: "ShopUser", groupCode: "ShopUser",
link: '/college-user' link: '/college-user'
}
]
}, },
{ {
groupName: "课程分类", groupName: "学院管理",
groupCode: "CourseCategory", groupCode: "CloudShop",
link: '/course-category-manage' icon: '&#xe8a4;',
img:'https://image.xiaomaiketang.com/xm/Q8i5RSMKNc.png',
children: [
{
groupName: "学院信息",
groupCode: "ShopInfo",
link: '/college-info'
}, },
{ {
groupName: "学院装修", groupName: "学院装修",
...@@ -127,6 +130,11 @@ export const menuList: any = [ ...@@ -127,6 +130,11 @@ export const menuList: any = [
link: '/store-decoration' link: '/store-decoration'
}, },
{ {
groupName: "分类管理",
groupCode: "CourseCategory",
link: '/course-category-manage'
},
{
groupName: "H5学院", groupName: "H5学院",
groupCode: "ShopDecorationH5", groupCode: "ShopDecorationH5",
link: '/store-decoration/h5' link: '/store-decoration/h5'
...@@ -138,5 +146,4 @@ export const menuList: any = [ ...@@ -138,5 +146,4 @@ export const menuList: any = [
} }
] ]
}, },
] ]
\ No newline at end of file
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