Commit 87bc40cb by chenshu

fix:修改样式

parent 7cf4fa0f
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,
}} }}
......
...@@ -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={{
......
/* /*
* @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,
......
...@@ -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>
}} }}
/> />
......
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.
/* /*
* @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>
......
...@@ -215,14 +215,12 @@ ...@@ -215,14 +215,12 @@
cursor: pointer; cursor: pointer;
} }
.lottie-icon { .lottie-icon-title {
&__title { color: #999;
color: #999; .upload-btn {
.upload-btn { color: #5A8EFA;
color: #5A8EFA; margin: 0 4px;
margin: 0 4px; cursor: pointer;
cursor: pointer;
}
} }
} }
// td.ant-table-column-sort{ // td.ant-table-column-sort{
...@@ -230,6 +228,11 @@ ...@@ -230,6 +228,11 @@
// } // }
} }
} }
.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 Lottie from "lottie-web";
import Header from './Header' import Header from './Header'
import Service from "@/common/js/service"; import Service from "@/common/js/service";
import './ErrorCollege.less'; import './ErrorCollege.less';
...@@ -14,6 +15,14 @@ export default class ErrorCollege extends React.Component { ...@@ -14,6 +15,14 @@ export default class ErrorCollege extends React.Component {
componentDidMount() { componentDidMount() {
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() {
...@@ -39,7 +48,7 @@ export default class ErrorCollege extends React.Component { ...@@ -39,7 +48,7 @@ export default class ErrorCollege extends React.Component {
<div className="error-college-page"> <div className="error-college-page">
<Header id="error" handleMenuType={this.handleMenuType} menuType={menuType} /> <Header id="error" handleMenuType={this.handleMenuType} menuType={menuType} />
<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>
......
import React, { useState, useRef, useEffect, useContext } from 'react' import React, { useState, useRef, useEffect, useContext } from 'react'
import { Input, Select, DatePicker, Tooltip, Button, Table, Dropdown, Menu, Modal } from 'antd'; import { Input, Select, DatePicker, Tooltip, Button, Table, Dropdown, Menu, Modal } from 'antd';
import Lottie from 'react-lottie';
import TeacherSelect from '@/modules/common/TeacherSelect'; import TeacherSelect from '@/modules/common/TeacherSelect';
import { Route, withRouter } from 'react-router-dom'; import { Route, withRouter } from 'react-router-dom';
import Service from "@/common/js/service"; import Service from "@/common/js/service";
...@@ -12,7 +11,6 @@ import { XMContext } from "@/store/context"; ...@@ -12,7 +11,6 @@ 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 * as nodata from '../../lottie/nodata/data.json';
import './index.less' import './index.less'
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
const { Search } = Input; const { Search } = Input;
...@@ -310,15 +308,7 @@ function ExaminationManager(props: any) { ...@@ -310,15 +308,7 @@ function ExaminationManager(props: any) {
_query.order = (orderEnum as any)[sorter.field][sorter.order] || 'EXAM_START_TIME_DESC' _query.order = (orderEnum as any)[sorter.field][sorter.order] || 'EXAM_START_TIME_DESC'
setQuery(_query) setQuery(_query)
} }
const defaultOptions = {
loop: true,
autoplay: true,
animationData: nodata,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
}
}
return <div className="page examination-manager"> return <div className="page examination-manager">
<div className="content-header">考试</div> <div className="content-header">考试</div>
<div className="box content-body"> <div className="box content-body">
...@@ -423,15 +413,6 @@ function ExaminationManager(props: any) { ...@@ -423,15 +413,6 @@ function ExaminationManager(props: any) {
pagination={false} pagination={false}
style={{ margin: '0px 0 16px' }} style={{ margin: '0px 0 16px' }}
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>
}} }}
> >
......
...@@ -20,7 +20,6 @@ import { ...@@ -20,7 +20,6 @@ import {
Modal, Modal,
Spin, Spin,
} from "antd"; } from "antd";
import Lottie from 'react-lottie';
import { PlusOutlined } from "@ant-design/icons"; import { PlusOutlined } from "@ant-design/icons";
import { XMTable } from "@/components"; import { XMTable } from "@/components";
import ShowTips from "@/components/ShowTips"; import ShowTips from "@/components/ShowTips";
...@@ -709,14 +708,6 @@ class OperatePaper extends Component { ...@@ -709,14 +708,6 @@ class OperatePaper extends Component {
totalScore, totalScore,
} = formData; } = formData;
const { match } = this.props; const { match } = this.props;
const defaultOptions = {
loop: true,
autoplay: true,
animationData: paperEmpty,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
}
}
return ( return (
<div> <div>
<div className="page operate-paper-page"> <div className="page operate-paper-page">
...@@ -826,15 +817,7 @@ class OperatePaper extends Component { ...@@ -826,15 +817,7 @@ class OperatePaper extends Component {
pagination={false} pagination={false}
onChange={this.sortByQuestionType} onChange={this.sortByQuestionType}
renderEmpty={{ renderEmpty={{
image: <div style={{ marginTop: 24 }}> image: paperEmpty,
<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>
}} }}
/> />
......
...@@ -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>
}} }}
/> />
)} )}
......
...@@ -23,7 +23,6 @@ import { ...@@ -23,7 +23,6 @@ import {
Dropdown, Dropdown,
DatePicker, DatePicker,
} from "antd"; } from "antd";
import Lottie from 'react-lottie';
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';
...@@ -37,7 +36,6 @@ import Bus from "@/core/bus"; ...@@ -37,7 +36,6 @@ 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 * as nodata from '../../../lottie/nodata/data.json';
import "./QuestionList.less"; import "./QuestionList.less";
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
...@@ -594,14 +592,6 @@ class QuestionList extends Component { ...@@ -594,14 +592,6 @@ class QuestionList extends Component {
preserveSelectedRowKeys: true, preserveSelectedRowKeys: true,
onChange: this.onSelectChange, onChange: this.onSelectChange,
}; };
const defaultOptions = {
loop: true,
autoplay: true,
animationData: nodata,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
}
}
return ( return (
<div className="question-list"> <div className="question-list">
<div className="question-list-filter"> <div className="question-list-filter">
...@@ -733,15 +723,6 @@ class QuestionList extends Component { ...@@ -733,15 +723,6 @@ class QuestionList extends Component {
onChange={this.handleChangeTable} onChange={this.handleChangeTable}
rowSelection={rowSelection} rowSelection={rowSelection}
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>还没有题目</span> description: <span style={{ display: 'block', paddingBottom: 24 }}><span>还没有题目</span>
{["CloudManager", "StoreManager"].includes(User.getUserRole()) && {["CloudManager", "StoreManager"].includes(User.getUserRole()) &&
categoryId && ( categoryId && (
......
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