Commit 8ed646dd by wufan

feat:上课数据路由方式变更为子路由

parent 5254c186
......@@ -21,7 +21,6 @@ const Breadcrumbs = (props: BreadcrumbsProps) => {
const { goBack, navList, text } = props;
function _onClick(): any {
console.log("返回来")
goBack ? goBack() : window.RCHistory.goBack();
}
const isString = _.isString(navList);
......
......@@ -56,7 +56,7 @@
//old
//color
@xm-color-primary: #FF7519;
@xm-color-primary:#FFB714;
@xm-color-primary_active: #020201;
@xm-color-primary-darker: #ff8534;
@xm-color-selected: #F58E2C;
......
......@@ -26,7 +26,6 @@ class DataList extends React.Component {
<Breadcrumbs
navList="上课数据"
goBack={() => {
console.log("准备返回");
RCHistory.goBack();
}}
/>
......
.live-course-filter {
position: relative;
.search-condition {
width: calc(100% - 80px);
display: flex;
align-items: center;
flex-wrap: wrap;
&__item {
width: 30%;
margin-right: 3%;
......@@ -17,18 +17,20 @@
position: absolute;
right: 12px;
}
.resetBtn{
color:#999999;
font-size:18px;
margin-right:8px;
.resetBtn {
color: #999999;
font-size: 18px;
margin-right: 8px;
}
.fold-btn{
.fold-btn {
font-size: 14px;
color: #666666;
line-height: 20px;
.fold-icon{
.fold-icon {
font-size: 12px;
}
}
}
\ No newline at end of file
}
.data-icon {
cursor: pointer;
}
......@@ -7,8 +7,8 @@
*/
import React from 'react';
import { Table, Modal, Tooltip, Badge, message, Dropdown, Button,Switch} from 'antd';
import { Table, Modal, message, Dropdown, Button,Switch} from 'antd';
import { Route, withRouter } from 'react-router-dom';
// import Bus from '@/core/bus';
// import User from "@/core/user";
// import User_t from "@/teacher/core/user";
......@@ -30,6 +30,8 @@ import './LiveCourseList.less';
import { QuestionCircleOutlined } from '@ant-design/icons';
import { appId, shareUrl, LIVE_SHARE } from '@/domains/course-domain/constants';
import CourseService from "@/domains/course-domain/CourseService";
import DataList from '../DataList/DataList';
const { confirm } = Modal;
const courseStateShow = {
UN_START: {
......@@ -135,8 +137,11 @@ class LiveCourseList extends React.Component {
// 前往上课数据页面
handleLinkToClassData = (item) => {
// TODOLIST 确定后端是否是根据liveCourseId 返回数据
window.RCHistory.push(`/live-course-data?type=large&id=${item.liveCourseId}`)
const { match } = this.props;
window.RCHistory.push({
pathname: `${match.url}/live-course-data?type=large&id=${item.liveCourseId}`
});
}
parseColumns = () => {
const menu = (item) => (
......@@ -208,7 +213,7 @@ class LiveCourseList extends React.Component {
dataIndex: "quota",
render: (val, item) => {
return (
<span className="iconfont icon" onClick={() => {
<span className="iconfont icon data-icon" onClick={() => {
this.handleLinkToClassData(item)
}}>&#xe7d6;</span>
);
......@@ -390,6 +395,8 @@ class LiveCourseList extends React.Component {
const { openDownloadModal,
downloadUrl, url, columns,
} = this.state;
const { match } = this.props;
return (
<div className="live-course-list">
<Table
......@@ -426,9 +433,10 @@ class LiveCourseList extends React.Component {
/>
)}
<iframe src={url} style={{ display: "none" }} />
<Route path={`${match.url}/live-course-data`} component={DataList} />
</div>
)
}
}
export default LiveCourseList;
\ No newline at end of file
export default withRouter(LiveCourseList);
\ No newline at end of file
......@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-04-29 10:26:32
* @LastEditors: wufan
* @LastEditTime: 2020-12-14 11:13:16
* @LastEditTime: 2020-12-16 16:39:03
* @Description: 内容线路由配置
*/
import EmployeesManagePage from '@/modules/store-manage/EmployeesManagePage';
......@@ -53,11 +53,6 @@ const mainRoutes = [
name: '创建直播课'
},
{
path: '/live-course-data',
component: DataList,
name: '上课数据'
},
{
path: '/resource-disk',
component:ClassBook,
name: '资料云盘'
......
......@@ -14,11 +14,6 @@ export const menuList: any = [
// groupCode: "CourseVideoClass",
// link: '/CourseVideoClass'
// }
{
groupName: "直播课-上课数据",
groupCode: "CourseData",
link: '/live-course-data'
},
]
},
{
......
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