Commit b8bb7783 by zhujian

'fix'

parent 5a878018
.operate-paper-page { .operate-paper-page {
position: relative !important; // position: relative !important;
.box { .box {
margin-bottom: 66px !important; margin-bottom: 66px !important;
.ant-tabs { .ant-tabs {
......
...@@ -22,6 +22,8 @@ import { ...@@ -22,6 +22,8 @@ import {
} from "antd"; } from "antd";
import { PageControl } from "@/components"; import { PageControl } from "@/components";
import "./PaperList.less"; import "./PaperList.less";
import { Route, withRouter } from 'react-router-dom';
import OperatePaper from "@/modules/teach-tool/paper-manage/OperatePaper";
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 _ from "underscore"; import _ from "underscore";
...@@ -99,10 +101,12 @@ class PaperList extends Component { ...@@ -99,10 +101,12 @@ class PaperList extends Component {
// 编辑试卷 // 编辑试卷
editPaper = (record) => { editPaper = (record) => {
const { match } = this.props;
if (record.relatedExam === 0) { if (record.relatedExam === 0) {
const { categoryId } = this.state.query; const { categoryId } = this.state.query;
window.RCHistory.push({ window.RCHistory.push({
pathname: `/paper-operate-page/operate?type=edit&paperId=${record.paperId}&categoryId=${categoryId}`, pathname: `${match}/paper-operate-page/operate?type=edit&paperId=${record.paperId}&categoryId=${categoryId}`,
}); });
} else { } else {
return Modal.info({ return Modal.info({
...@@ -235,7 +239,7 @@ class PaperList extends Component { ...@@ -235,7 +239,7 @@ class PaperList extends Component {
> >
预览 预览
</div> </div>
{isPermiss && <span className="record-operate__item split"> | </span> } {isPermiss && <span className="record-operate__item split"> | </span>}
{isPermiss && <div {isPermiss && <div
className="record-operate__item" className="record-operate__item"
onClick={() => this.copyPaper(record)} onClick={() => this.copyPaper(record)}
...@@ -300,7 +304,7 @@ class PaperList extends Component { ...@@ -300,7 +304,7 @@ class PaperList extends Component {
onChange: this.onSelectChange, onChange: this.onSelectChange,
}; };
const isPermiss = ["CloudManager", "StoreManager"].includes(User.getUserRole()) const isPermiss = ["CloudManager", "StoreManager"].includes(User.getUserRole())
const { match } = this.props;
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">
...@@ -332,17 +336,17 @@ class PaperList extends Component { ...@@ -332,17 +336,17 @@ class PaperList extends Component {
</div> </div>
{this.props.type !== "modal-select" && isPermiss && {this.props.type !== "modal-select" && isPermiss &&
categoryId && ( categoryId && (
<Button <Button
type="primary" type="primary"
onClick={() => { onClick={() => {
window.RCHistory.push({ window.RCHistory.push({
pathname: `/paper-operate-page?type=new&categoryId=${categoryId}`, pathname: `${match.url}/paper-operate-page?type=new&categoryId=${categoryId}`,
}); });
}} }}
> >
新建试卷 新建试卷
</Button> </Button>
)} )}
<div className="paper-list-content"> <div className="paper-list-content">
<ConfigProvider renderEmpty={this.customizeRenderEmpty}> <ConfigProvider renderEmpty={this.customizeRenderEmpty}>
...@@ -390,9 +394,10 @@ class PaperList extends Component { ...@@ -390,9 +394,10 @@ class PaperList extends Component {
)} )}
{paperPreviewModal} {paperPreviewModal}
</div> </div>
<Route path={`${match.url}/paper-operate-page`} component={OperatePaper} />
</div> </div>
); );
} }
} }
export default PaperList; export default withRouter(PaperList);
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