Commit b8bb7783 by zhujian

'fix'

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