Commit a02276bc by wufan

fix:周优化

parents 3da23be0 716aae90
...@@ -88,8 +88,6 @@ class ImgClipModal extends React.Component { ...@@ -88,8 +88,6 @@ class ImgClipModal extends React.Component {
checkOrientation={false} checkOrientation={false}
cropBoxResizable={false} cropBoxResizable={false}
center={true} center={true}
// minCropBoxWidth={cropBoxWidth}
// minCropBoxHeight={cropBoxHeight}
cropBoxMovable={false} cropBoxMovable={false}
dragMode='move' dragMode='move'
onInitialized={(instance) => { onInitialized={(instance) => {
...@@ -108,13 +106,6 @@ class ImgClipModal extends React.Component { ...@@ -108,13 +106,6 @@ class ImgClipModal extends React.Component {
console.log("ratio++++",ratio); console.log("ratio++++",ratio);
this.state.cropperInstace.setCanvasData({width:500}); this.state.cropperInstace.setCanvasData({width:500});
const that = this; const that = this;
// const containerData = this.state.cropperInstace.getContainerData();
// // Zoom to 50% from the center of the container.
// this.state.cropperInstace.zoomTo(.5, {
// x: containerData.width / 2,
// y: containerData.height / 2,
// });
document.querySelector('.cropper__box').addEventListener('dblclick', function (e) { document.querySelector('.cropper__box').addEventListener('dblclick', function (e) {
that.state.cropperInstace.rotate(90) that.state.cropperInstace.rotate(90)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-24 12:20:57 * @Date: 2020-08-24 12:20:57
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-04 16:58:55 * @LastEditTime: 2021-07-08 19:38:52
* @Description: * @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
--> -->
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
<body> <body>
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div> <div id="root"></div>
<!-- <!--
This HTML file is a template. This HTML file is a template.
If you open it directly in the browser, you will see an empty page. If you open it directly in the browser, you will see an empty page.
...@@ -61,166 +62,6 @@ ...@@ -61,166 +62,6 @@
To begin the development, run `npm start` or `yarn start`. To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`. To create a production bundle, use `npm run build` or `yarn build`.
--> -->
<script>
// (function (root, factory) {
// if (typeof define === 'function' && define.amd) {
// // AMD. Register as an anonymous module.
// define([], factory);
// } else if (typeof exports === 'object') {
// // Node. Does not work with strict CommonJS, but
// // only CommonJS-like environments that support module.exports,
// // like Node.
// module.exports = factory();
// } else {
// // Browser globals (root is window)
// root.download = factory();
// }
// })(this, function () {
// return function download(data, strFileName, strMimeType) {
// var self = window, // this script is only for browsers anyway...
// defaultMime = 'application/octet-stream', // this default mime also triggers iframe downloads
// mimeType = strMimeType || defaultMime,
// payload = data,
// url = !strFileName && !strMimeType && payload,
// anchor = document.createElement('a'),
// toString = function (a) {
// return String(a);
// },
// myBlob = self.Blob || self.MozBlob || self.WebKitBlob || toString,
// fileName = strFileName || 'download',
// blob,
// reader;
// myBlob = myBlob.call ? myBlob.bind(self) : Blob;
// if (String(this) === 'true') {
// //reverse arguments, allowing download.bind(true, "text/xml", "export.xml") to act as a callback
// payload = [payload, mimeType];
// mimeType = payload[0];
// payload = payload[1];
// }
// if (url && url.length < 2048) {
// // if no filename and no mime, assume a url was passed as the only argument
// fileName = url.split('/').pop().split('?')[0];
// anchor.href = url; // assign href prop to temp anchor
// if (anchor.href.indexOf(url) !== -1) {
// // if the browser determines that it's a potentially valid url path:
// var ajax = new XMLHttpRequest();
// ajax.open('GET', url, true);
// ajax.responseType = 'blob';
// ajax.onload = function (e) {
// download(e.target.response, fileName, defaultMime);
// };
// setTimeout(function () {
// ajax.send();
// }, 0); // allows setting custom ajax headers using the return:
// return ajax;
// } // end if valid url?
// } // end if url?
// //go ahead and download dataURLs right away
// if (/^data\:[\w+\-]+\/[\w+\-]+[,;]/.test(payload)) {
// if (payload.length > 1024 * 1024 * 1.999 && myBlob !== toString) {
// payload = dataUrlToBlob(payload);
// mimeType = payload.type || defaultMime;
// } else {
// return navigator.msSaveBlob // IE10 can't do a[download], only Blobs:
// ? navigator.msSaveBlob(dataUrlToBlob(payload), fileName)
// : saver(payload); // everyone else can save dataURLs un-processed
// }
// } //end if dataURL passed?
// blob = payload instanceof myBlob ? payload : new myBlob([payload], { type: mimeType });
// function dataUrlToBlob(strUrl) {
// var parts = strUrl.split(/[:;,]/),
// type = parts[1],
// decoder = parts[2] == 'base64' ? atob : decodeURIComponent,
// binData = decoder(parts.pop()),
// mx = binData.length,
// i = 0,
// uiArr = new Uint8Array(mx);
// for (i; i < mx; ++i) uiArr[i] = binData.charCodeAt(i);
// return new myBlob([uiArr], { type: type });
// }
// function saver(url, winMode) {
// if ('download' in anchor) {
// //html5 A[download]
// anchor.href = url;
// anchor.setAttribute('download', fileName);
// anchor.className = 'download-js-link';
// anchor.innerHTML = 'downloading...';
// anchor.style.display = 'none';
// document.body.appendChild(anchor);
// setTimeout(function () {
// anchor.click();
// document.body.removeChild(anchor);
// if (winMode === true) {
// setTimeout(function () {
// self.URL.revokeObjectURL(anchor.href);
// }, 250);
// }
// }, 66);
// return true;
// }
// // handle non-a[download] safari as best we can:
// if (/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent)) {
// url = url.replace(/^data:([\w\/\-\+]+)/, defaultMime);
// if (!window.open(url)) {
// // popup blocked, offer direct download:
// if (confirm('Displaying New Document\n\nUse Save As... to download, then click back to return to this page.')) {
// location.href = url;
// }
// }
// return true;
// }
// //do iframe dataURL download (old ch+FF):
// var f = document.createElement('iframe');
// document.body.appendChild(f);
// if (!winMode) {
// // force a mime that will download:
// url = 'data:' + url.replace(/^data:([\w\/\-\+]+)/, defaultMime);
// }
// f.src = url;
// setTimeout(function () {
// document.body.removeChild(f);
// }, 333);
// } //end saver
// if (navigator.msSaveBlob) {
// // IE10+ : (has Blob, but not a[download] or URL)
// return navigator.msSaveBlob(blob, fileName);
// }
// if (self.URL) {
// // simple fast and modern way using Blob and URL:
// saver(self.URL.createObjectURL(blob), true);
// } else {
// // handle non-Blob()+non-URL browsers:
// if (typeof blob === 'string' || blob.constructor === toString) {
// try {
// return saver('data:' + mimeType + ';base64,' + self.btoa(blob));
// } catch (y) {
// return saver('data:' + mimeType + ',' + encodeURIComponent(blob));
// }
// }
// // Blob but not URL support:
// reader = new FileReader();
// reader.onload = function (e) {
// saver(this.result);
// };
// reader.readAsDataURL(blob);
// }
// return true;
// }; /* end download() */
// });
</script>
</body> </body>
</html> </html>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-04-27 20:35:34 * @Date: 2020-04-27 20:35:34
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-06 14:59:32 * @LastEditTime: 2021-07-08 19:22:18
* @Description: * @Description:
*/ */
......
...@@ -53,7 +53,6 @@ class CollegeInfoPage extends React.Component { ...@@ -53,7 +53,6 @@ class CollegeInfoPage extends React.Component {
}) })
} }
handleSelectCover = (file)=> { handleSelectCover = (file)=> {
// this.uploadImage(file);
this.setState({ this.setState({
visible: true, visible: true,
imageFile:file imageFile:file
...@@ -112,9 +111,8 @@ class CollegeInfoPage extends React.Component { ...@@ -112,9 +111,8 @@ class CollegeInfoPage extends React.Component {
} = this.state; } = this.state;
return ( return (
<div className="page college-info-page"> <div className="page college-info-page">
<div className="content-header">学院基本信息</div> <div className="content-header">学院信息</div>
<div className="box"> <div className="box">
<div className="college-info-header">学院基本信息</div>
<div className="college-info-page-form"> <div className="college-info-page-form">
<Form ref={this.formRef}> <Form ref={this.formRef}>
......
...@@ -83,7 +83,6 @@ class AddLiveBasic extends React.Component { ...@@ -83,7 +83,6 @@ class AddLiveBasic extends React.Component {
visible: true, visible: true,
imageFile:file imageFile:file
}); });
// this.uploadImage(file);
} }
......
...@@ -84,9 +84,4 @@ ...@@ -84,9 +84,4 @@
} }
.preview-url-box{ .preview-url-box{
overflow: hidden; overflow: hidden;
// img{
// width:500px !important;
// height:282px !important;
// transform:none !important;
// }
} }
\ No newline at end of file
...@@ -175,7 +175,10 @@ class AddLiveClass extends React.Component { ...@@ -175,7 +175,10 @@ class AddLiveClass extends React.Component {
<Tooltip <Tooltip
overlayStyle={{maxWidth: 300, zIndex: '9999'}} overlayStyle={{maxWidth: 300, zIndex: '9999'}}
title={<div style={{width: '266px'}}>支持按上课日期批量创建直播课,创建后按“课程名称_日期”命名,例如:<br/>张三的语文课_9月18日<br/>张三的语文课_9月19日......</div>}> title={<div style={{width: '266px'}}>支持按上课日期批量创建直播课,创建后按“课程名称_日期”命名,例如:<br/>张三的语文课_9月18日<br/>张三的语文课_9月19日......</div>}>
<span className="iconfont">&#xe61d;</span> <span
style={{ color: "rgba(191, 191, 191, 1)",fontWeight: 400 }}
className="iconfont"
>&#xe61d;</span>
</Tooltip> </Tooltip>
</span> </span>
<div> <div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-05 10:07:47 * @Date: 2020-08-05 10:07:47
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-06 14:46:40 * @LastEditTime: 2021-07-08 19:32:50
* @Description: 图文课新增/编辑页 * @Description: 图文课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -280,7 +280,6 @@ class AddGraphicsCourse extends React.Component { ...@@ -280,7 +280,6 @@ class AddGraphicsCourse extends React.Component {
}; };
handleSelectCover = (file) => { handleSelectCover = (file) => {
// this.uploadCoverImage(file);
this.setState({ this.setState({
visible: true, visible: true,
imageFile:file imageFile:file
......
...@@ -356,7 +356,6 @@ class AddOfflineCourse extends React.Component { ...@@ -356,7 +356,6 @@ class AddOfflineCourse extends React.Component {
} }
handleSelectCover = (file)=> { handleSelectCover = (file)=> {
// this.uploadCoverImage(file);
this.setState({ this.setState({
visible: true, visible: true,
imageFile:file imageFile:file
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-05 10:07:47 * @Date: 2020-08-05 10:07:47
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-06 14:48:10 * @LastEditTime: 2021-07-08 19:34:10
* @Description: 视频课新增/编辑页 * @Description: 视频课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -261,7 +261,6 @@ class AddVideoCourse extends React.Component { ...@@ -261,7 +261,6 @@ class AddVideoCourse extends React.Component {
_.each(studentIds, (item) => { _.each(studentIds, (item) => {
studentList.push({ studentId: item }) studentList.push({ studentId: item })
}) })
// this.setState({ studentModal: null });
this.setState({ studentList }) this.setState({ studentList })
this.setState({ studentModal: false }) this.setState({ studentModal: false })
} }
...@@ -427,7 +426,6 @@ class AddVideoCourse extends React.Component { ...@@ -427,7 +426,6 @@ class AddVideoCourse extends React.Component {
}) })
} }
handleSelectCover = (file) => { handleSelectCover = (file) => {
// this.uploadImage(file)
this.setState({ this.setState({
visible: true, visible: true,
imageFile:file imageFile:file
......
...@@ -188,7 +188,7 @@ class Classification extends Component { ...@@ -188,7 +188,7 @@ class Classification extends Component {
<div className='sider-title'>知识分类</div> <div className='sider-title'>知识分类</div>
<Search <Search
className='sider-search' className='sider-search'
placeholder='搜索名称分类' placeholder='搜索分类名称'
onSearch={(value) => { onSearch={(value) => {
this.queryCategoryTree(value); this.queryCategoryTree(value);
}} }}
......
...@@ -72,7 +72,6 @@ class BasicInfo extends React.Component { ...@@ -72,7 +72,6 @@ class BasicInfo extends React.Component {
}, 1000); }, 1000);
}; };
handleSelectCover = (file) => { handleSelectCover = (file) => {
// this.uploadImage(file);
this.setState({ this.setState({
visible: true, visible: true,
imageFile:file imageFile:file
......
...@@ -330,7 +330,7 @@ class UserLearningData extends React.Component { ...@@ -330,7 +330,7 @@ class UserLearningData extends React.Component {
<span> <span>
<span>学习进度</span> <span>学习进度</span>
<Tooltip title='学员培训计划中达到“已完成”状态的课程数/总课程数'> <Tooltip title='学员培训计划中达到“已完成”状态的课程数/总课程数'>
<i className='icon iconfont' style={{ marginLeft: '5px', cursor: 'pointer', color: '#bfbfbf', fontSize: '14px' }}> <i className='icon iconfont' style={{ marginLeft: '5px', cursor: 'pointer', color: '#bfbfbf', fontSize: '14px', fontWeight: 'normal' }}>
&#xe61d; &#xe61d;
</i> </i>
</Tooltip> </Tooltip>
......
...@@ -106,8 +106,9 @@ ...@@ -106,8 +106,9 @@
background-color: @active-color; background-color: @active-color;
color: #fff; color: #fff;
border-radius: 2px; border-radius: 2px;
&:hover { &.single-menu {
color: #fff; background: rgba(41, 102, 255, .1) !important;
color: @active-color;
} }
} }
.ant-menu-submenu { .ant-menu-submenu {
...@@ -124,7 +125,7 @@ ...@@ -124,7 +125,7 @@
color: @active-color; color: @active-color;
.ant-menu-item-selected { .ant-menu-item-selected {
color: #fff; color: @active-color;
.listType { .listType {
background: @active-color; background: @active-color;
} }
...@@ -266,16 +267,12 @@ ...@@ -266,16 +267,12 @@
.shink-footer { .shink-footer {
left: 74px; left: 74px;
} }
// &:hover{
// .menu-type-icon{
// display:inline-block;
// }
// }
} }
.ant-menu-submenu-open.ant-menu-submenu-inline > .ant-menu-submenu-title > .ant-menu-submenu-arrow {
color: #2966FF;
}
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected { .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
background: @active-color !important; background: rgba(41, 102, 255, .1) !important;
} }
.ant-menu.ant-menu-dark, .ant-menu.ant-menu-dark,
.ant-menu-dark .ant-menu-sub, .ant-menu-dark .ant-menu-sub,
......
...@@ -238,7 +238,7 @@ function Aside(props: any) { ...@@ -238,7 +238,7 @@ function Aside(props: any) {
icon={ icon={
!menuType && item.groupCode === selectKeyParent ? ( !menuType && item.groupCode === selectKeyParent ? (
<div className='icon-img-box' style={{ backgroundColor: '#2966FF', width: '40px', height: '40px' }}> <div className='icon-img-box' style={{ backgroundColor: '#2966FF', width: '40px', height: '40px' }}>
<img src={item.selectImg} className='icon-img' /> <img src={item.img} className='icon-img' />
</div> </div>
) : ( ) : (
<div className='icon-img-box' style={{ backgroundColor: '#fff', width: '40px', height: '40px', display: 'inline-block' }}> <div className='icon-img-box' style={{ backgroundColor: '#fff', width: '40px', height: '40px', display: 'inline-block' }}>
...@@ -268,6 +268,7 @@ function Aside(props: any) { ...@@ -268,6 +268,7 @@ function Aside(props: any) {
} else { } else {
return ( return (
<Menu.Item <Menu.Item
className="single-menu"
onClick={() => { onClick={() => {
toggleMenu(item, item.groupCode); toggleMenu(item, item.groupCode);
}} }}
...@@ -275,11 +276,11 @@ function Aside(props: any) { ...@@ -275,11 +276,11 @@ function Aside(props: any) {
icon={ icon={
!menuType && item.groupCode === selectKeyParent ? ( !menuType && item.groupCode === selectKeyParent ? (
<div className='icon-img-box' style={{ backgroundColor: '#2966FF' }}> <div className='icon-img-box' style={{ backgroundColor: '#2966FF' }}>
<img src={item.selectImg} className='icon-img' /> <img src={item.img} className='icon-img' />
</div> </div>
) : ( ) : (
<div className='icon-img-box'> <div className='icon-img-box'>
<img src={selectKey === item.groupCode ? item.selectImg : item.img} className='icon-img' /> <img src={item.img} className='icon-img' />
</div> </div>
) )
}> }>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: wufan * @Author: wufan
* @Date: 2020-11-30 10:47:38 * @Date: 2020-11-30 10:47:38
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-08 14:25:58 * @LastEditTime: 2021-07-08 19:35:17
* @Description: web学院banner页面 * @Description: web学院banner页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -210,10 +210,6 @@ class StoreH5Decoration extends React.Component { ...@@ -210,10 +210,6 @@ class StoreH5Decoration extends React.Component {
// 选择云盘资源 // 选择云盘资源
handleSelectImg = (file) => { handleSelectImg = (file) => {
// this.setState({
// showSelectFileModal: false,
// });
// this.uploadImage(file);
if(file){ if(file){
this.setState({ this.setState({
visible: true, visible: true,
......
...@@ -74,7 +74,6 @@ class StoreInfo extends React.Component { ...@@ -74,7 +74,6 @@ class StoreInfo extends React.Component {
}) })
} }
handleSelectCover = (file)=> { handleSelectCover = (file)=> {
// this.uploadImage(file);
this.setState({ this.setState({
visible: true, visible: true,
imageFile:file imageFile:file
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: wufan * @Author: wufan
* @Date: 2020-11-30 10:47:38 * @Date: 2020-11-30 10:47:38
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-08 14:26:11 * @LastEditTime: 2021-07-08 19:35:27
* @Description: web学院banner页面 * @Description: web学院banner页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -209,10 +209,6 @@ class StoreWebDecoration extends React.Component { ...@@ -209,10 +209,6 @@ class StoreWebDecoration extends React.Component {
// 选择云盘资源 // 选择云盘资源
handleSelectImg = (file) => { handleSelectImg = (file) => {
// this.setState({
// showSelectFileModal: false,
// });
// this.uploadImage(file);
if(file){ if(file){
this.setState({ this.setState({
visible: true, visible: true,
......
...@@ -539,15 +539,15 @@ class CourseCategoryManage extends Component { ...@@ -539,15 +539,15 @@ class CourseCategoryManage extends Component {
return ( return (
<div className='page course-category-manage'> <div className='page course-category-manage'>
{['aid', 'knowledge'].includes(getParameterByName('from')) ? ( {['aid', 'knowledge'].includes(getParameterByName('from')) ? (
<Breadcrumbs navList='课程分类' goBack={() => window.RCHistory.goBack()} /> <Breadcrumbs navList='分类管理' goBack={() => window.RCHistory.goBack()} />
) : ( ) : (
<div className='content-header'>课程分类</div> <div className='content-header'>分类管理</div>
)} )}
<div className='box'> <div className='box'>
<div className='search-condition'> <div className='search-condition'>
<span className='search-label'>搜索名称:</span> <span className='search-label'>搜索名称:</span>
<Search <Search
placeholder='请输入名称' placeholder='搜索分类名称'
style={{ width: '300px' }} style={{ width: '300px' }}
onSearch={(value) => this.queryCategoryTree('init', value)} onSearch={(value) => this.queryCategoryTree('init', value)}
className='search-input' className='search-input'
......
...@@ -189,7 +189,7 @@ class CourseCategorySiderTree extends Component { ...@@ -189,7 +189,7 @@ class CourseCategorySiderTree extends Component {
)} )}
<Search <Search
className='sider-search' className='sider-search'
placeholder='搜索名称分类' placeholder='搜索分类名称'
onSearch={(value) => { onSearch={(value) => {
this.queryCategoryTree('init', value); this.queryCategoryTree('init', value);
}} }}
......
...@@ -11,6 +11,8 @@ import { XMContext } from '@/store/context'; ...@@ -11,6 +11,8 @@ import { XMContext } from '@/store/context';
import ExamShareModal from './ExamShareModal'; import ExamShareModal from './ExamShareModal';
import DataAnalysic from './DataAnalysic'; import DataAnalysic from './DataAnalysic';
import PreviewModal from './PreviewModal'; import PreviewModal from './PreviewModal';
import college from '@/common/lottie/college.json';
import './index.less'; import './index.less';
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
const { Search } = Input; const { Search } = Input;
...@@ -426,6 +428,7 @@ function ExaminationManager(props: any) { ...@@ -426,6 +428,7 @@ function ExaminationManager(props: any) {
pagination={false} pagination={false}
style={{ margin: '0px 0 16px' }} style={{ margin: '0px 0 16px' }}
renderEmpty={{ renderEmpty={{
image: college,
description: <span style={{ display: 'block', paddingBottom: 24 }}>暂无数据</span>, description: <span style={{ display: 'block', paddingBottom: 24 }}>暂无数据</span>,
}}></XMTable> }}></XMTable>
{total > 0 && ( {total > 0 && (
......
...@@ -31,6 +31,8 @@ import _ from "underscore"; ...@@ -31,6 +31,8 @@ import _ from "underscore";
import PaperPreviewModal from "../modal/PreviewPaperModal"; import PaperPreviewModal from "../modal/PreviewPaperModal";
import MoveModal from '../../modal/MoveModal'; import MoveModal from '../../modal/MoveModal';
import Bus from "@/core/bus"; import Bus from "@/core/bus";
import college from '@/common/lottie/college';
const { Search } = Input; const { Search } = Input;
...@@ -625,6 +627,7 @@ class PaperList extends Component { ...@@ -625,6 +627,7 @@ class PaperList extends Component {
bordered bordered
loading={loading} loading={loading}
renderEmpty={{ renderEmpty={{
image: college,
description: <span style={{ display: 'block', paddingBottom: 24 }}>还没有试卷</span> description: <span style={{ display: 'block', paddingBottom: 24 }}>还没有试卷</span>
}} }}
/> />
...@@ -641,6 +644,7 @@ class PaperList extends Component { ...@@ -641,6 +644,7 @@ class PaperList extends Component {
pagination={false} pagination={false}
bordered bordered
renderEmpty={{ renderEmpty={{
image: college,
description: <span style={{ display: 'block', paddingBottom: 24 }}>还没有试卷</span> description: <span style={{ display: 'block', paddingBottom: 24 }}>还没有试卷</span>
}} }}
/> />
......
...@@ -25,6 +25,8 @@ import AidToolService from "@/domains/aid-tool-domain/AidToolService"; ...@@ -25,6 +25,8 @@ import AidToolService from "@/domains/aid-tool-domain/AidToolService";
import _ from "underscore"; import _ from "underscore";
import Bus from "@/core/bus"; import Bus from "@/core/bus";
import moment from 'moment'; import moment from 'moment';
import { XMTable } from '@/components';
import college from '@/common/lottie/college';
const { Search } = Input; const { Search } = Input;
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
...@@ -201,19 +203,6 @@ class SelectQuestionList extends Component { ...@@ -201,19 +203,6 @@ class SelectQuestionList extends Component {
return columns; return columns;
}; };
// 自定义表格空状态
customizeRenderEmpty = () => {
return (
<Empty
image="https://image.xiaomaiketang.com/xm/emptyTable.png"
imageStyle={{
height: 100,
}}
description={"还没有题目"}
></Empty>
);
};
onShowSizeChange = (current, size) => { onShowSizeChange = (current, size) => {
if (current == size) { if (current == size) {
return; return;
...@@ -431,8 +420,11 @@ class SelectQuestionList extends Component { ...@@ -431,8 +420,11 @@ class SelectQuestionList extends Component {
)} )}
</div> </div>
<div className="select-question-content"> <div className="select-question-content">
<ConfigProvider renderEmpty={this.customizeRenderEmpty}> <XMTable
<Table renderEmpty={{
image: college,
description: '还没有题目'
}}
rowSelection={rowSelection} rowSelection={rowSelection}
rowKey={(record) => record.id} rowKey={(record) => record.id}
dataSource={dataSource} dataSource={dataSource}
...@@ -441,7 +433,6 @@ class SelectQuestionList extends Component { ...@@ -441,7 +433,6 @@ class SelectQuestionList extends Component {
onChange={this.handleChangeTable} onChange={this.handleChangeTable}
bordered bordered
/> />
</ConfigProvider>
<div className="box-footer"> <div className="box-footer">
<PageControl <PageControl
current={current - 1} current={current - 1}
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Table, ConfigProvider, Empty, Row, Input, Select, Tooltip, Space, Button, Modal, message, Menu, Dropdown, DatePicker } from 'antd'; import { Row, Input, Select, Tooltip, Space, Button, Modal, message, Menu, Dropdown, DatePicker } from 'antd';
import _ from 'underscore'; import _ from 'underscore';
import { Route, withRouter } from 'react-router-dom'; import { Route, withRouter } from 'react-router-dom';
import { DownOutlined } from '@ant-design/icons'; import { DownOutlined } from '@ant-design/icons';
...@@ -21,6 +21,8 @@ import Bus from '@/core/bus'; ...@@ -21,6 +21,8 @@ import Bus from '@/core/bus';
import moment from 'moment'; import moment from 'moment';
import Service from '@/common/js/service'; import Service from '@/common/js/service';
import MoveModal from '../../modal/MoveModal'; import MoveModal from '../../modal/MoveModal';
import college from '@/common/lottie/college';
import './QuestionList.less'; import './QuestionList.less';
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
...@@ -671,6 +673,7 @@ class QuestionList extends Component { ...@@ -671,6 +673,7 @@ class QuestionList extends Component {
onChange={this.handleChangeTable} onChange={this.handleChangeTable}
rowSelection={rowSelection} rowSelection={rowSelection}
renderEmpty={{ renderEmpty={{
image: college,
description: ( description: (
<span style={{ display: 'block', paddingBottom: 24 }}> <span style={{ display: 'block', paddingBottom: 24 }}>
<span>还没有题目</span> <span>还没有题目</span>
......
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