Commit 3311a82d by chenshu

fix:merge

parents 1b88c13b 87bc40cb
import React, { useEffect, useState } from 'react';
import { Empty, ConfigProvider, Table } from 'antd';
import Lottie from 'react-lottie';
import * as noData from '../modules/lottie/noData/data.json';
function XMTable(props) {
const [empty, setEmpty] = useState(props.renderEmpty || {});
......@@ -12,9 +14,25 @@ function XMTable(props) {
// 自定义表格空状态
function customizeRenderEmpty() {
const defaultOptions = {
loop: true,
autoplay: true,
animationData: empty.image || noData,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
}
}
return (
<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={{
height: 150,
}}
......
......@@ -6,9 +6,11 @@
import React from 'react';
import { Modal, Input, Table, message, Tooltip, Empty } from 'antd';
import { XMTable } from '@/components';
import Service from '@/common/js/service';
import User from '@/common/js/user'
import SetEmployeeModal from "./SetEmployeeModal";
import search from '../../lottie/search/data.json';
import './ChooseMembersModal.less';
import _ from 'underscore';
import WechatApi from '@/common/js/wechatApi';
......@@ -354,19 +356,18 @@ class ChooseMembersModal extends React.Component {
enterButton={<span className="icon iconfont">&#xe832;</span>}
/>
<div className='container-left-body-table'>
<Table
<XMTable
rowKey={(record) => record.enterpriseVisibleUserId}
dataSource={allUserList}
columns={this.selectedColumnsLeft()}
pagination={false}
scroll={{ y: 290}}
// bordered={true}
locale={{
emptyText: <div>
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={false} />
<div style={{ color: '#333', marginTop: -70 }}>暂无数据</div>
renderEmpty={{
image: searchKey ? search : '',
description: <div>
<div style={{ color: '#333' }}>暂无数据</div>
<div style={{ color: '#666', padding: '0 32px', fontSize: '12px' }}>需要先将员工添加到企微可见范围后,员工才会出现在这里</div>
</div>,
</div>
}}
size={'small'}
rowSelection={{
......
/*
* @Author: 吴文洁
* @Date: 2020-06-22 14:26:37
* @Last Modified by: 吴文洁
* @Last Modified time: 2020-07-23 09:33:02
* @Last Modified by: chenshu
* @Last Modified time: 2021-06-08 18:18:46
*/
import React, { useEffect, useState } from 'react';
import { Modal, Button, Table, Progress, message, Tooltip, Spin, Popconfirm } from 'antd';
......@@ -40,7 +40,7 @@ class ManageCoursewareModal extends React.Component {
componentDidMount() {
this.getCoursewareList();
var animation = Lottie.loadAnimation({
path: "https://image.xiaomaiketang.com/xm/MQwp2aJaxf.json",
path: "https://image.xiaomaiketang.com/xm/SDBkP7mbJX.json",
name: "test",
renderer: "svg",
loop: true,
......
......@@ -10,7 +10,6 @@
import React from "react";
import { Modal, message, Tooltip, Switch, Dropdown, Button } from "antd";
import { Route, withRouter } from "react-router-dom";
import Lottie from 'react-lottie';
import { PageControl, XMTable } from "@/components";
import { LIVE_SHARE_MAP } from "@/common/constants/academic/cloudClass";
import { appId, shareUrl, LIVE_SHARE } from "@/domains/course-domain/constants";
......@@ -18,7 +17,6 @@ import ScanFileModal from "../../resource-disk/modal/ScanFileModal";
import WatchData from "./WatchData";
import KnowledgeAPI from "@/data-source/knowledge/request-api";
import ENUM from "../ENUM.js";
import * as nodata from '../../lottie/nodata/data.json';
import "./KnowledgeBaseList.less";
const DEFAULT_SIZE_UNIT = 1000 * 1000 // 将B转换成M
......@@ -494,14 +492,6 @@ class KnowledgeBaseList extends React.Component {
preserveSelectedRowKeys: true,
onChange: onSelectChange,
}
const defaultOptions = {
loop: true,
autoplay: true,
animationData: nodata,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
}
}
return (
<div className="knowledge-base-list">
<XMTable
......@@ -515,15 +505,6 @@ class KnowledgeBaseList extends React.Component {
bordered
className="knowledge-list-table"
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>
}}
/>
......
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: 吴文洁
* @Date: 2020-06-09 10:47:51
* @Last Modified by: 吴文洁
* @Last Modified time: 2020-07-23 09:33:09
* @Last Modified by: chenshu
* @Last Modified time: 2021-06-08 18:10:25
* @Description: 文件夹列表
*/
......@@ -11,12 +11,13 @@ import { Table, Menu, Dropdown, Modal, message,Tooltip } from 'antd';
import _ from 'underscore';
// import * as lodash from 'lodash';
import { PageControl, LottieIcon } from 'xiaomai-b-components';
import { XMTable } from '@/components';
import Service from '@/common/js/service';
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 { 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 SelectPrepareFileModal from '@/bu-components/SelectPrepareFileModal';
import CopyFileModal from '@/bu-components/CopyFileModal';
......@@ -693,9 +694,11 @@ class FolderList extends React.Component {
</When>
<Otherwise>
<LottieIcon
title={
<Choose>
<XMTable
className="add-empty"
renderEmpty={{
image: !showResultPage ? addData : search,
description: <Choose>
<When condition={!showResultPage}>
<input
multiple
......@@ -709,7 +712,7 @@ class FolderList extends React.Component {
{
<Choose>
<When condition={hasManagementAuthority}>
<div>你还没有上传文件,点击
<div className="lottie-icon-title">你还没有上传文件,点击
<Tooltip title="支持文件类型:ppt、word、excel、pdf、jpg、mp3、mp4">
<span
className="upload-btn"
......@@ -729,7 +732,7 @@ class FolderList extends React.Component {
<div className="desc">搜索无结果</div>
</Otherwise>
</Choose>
}
}}
/>
</Otherwise>
</Choose>
......
......@@ -215,14 +215,12 @@
cursor: pointer;
}
.lottie-icon {
&__title {
color: #999;
.upload-btn {
color: #5A8EFA;
margin: 0 4px;
cursor: pointer;
}
.lottie-icon-title {
color: #999;
.upload-btn {
color: #5A8EFA;
margin: 0 4px;
cursor: pointer;
}
}
// td.ant-table-column-sort{
......@@ -230,6 +228,11 @@
// }
}
}
.add-empty {
.ant-table-cell {
border: none;
}
}
}
......
import User from '@/common/js/user';
import React from 'react';
import Lottie from "lottie-web";
import Header from './Header'
import Service from "@/common/js/service";
import './ErrorCollege.less';
......@@ -14,6 +15,14 @@ export default class ErrorCollege extends React.Component {
componentDidMount() {
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() {
......@@ -39,7 +48,7 @@ export default class ErrorCollege extends React.Component {
<div className="error-college-page">
<Header id="error" handleMenuType={this.handleMenuType} menuType={menuType} />
<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>
</div>
</div>
......
import React, { useState, useRef, useEffect, useContext } from 'react';
import { Input, Select, DatePicker, Tooltip, Button, Table, Dropdown, Menu, Modal } from 'antd';
import Lottie from 'react-lottie';
import TeacherSelect from '@/modules/common/TeacherSelect';
import { Route, withRouter } from 'react-router-dom';
import Service from '@/common/js/service';
import moment from 'moment';
import { PageControl, XMTable } from '@/components';
import AddExam from './AddExam';
import User from '@/common/js/user';
import { XMContext } from '@/store/context';
import ExamShareModal from './ExamShareModal';
import DataAnalysic from './DataAnalysic';
import PreviewModal from './PreviewModal';
import * as nodata from '../../lottie/nodata/data.json';
import './index.less';
import User from "@/common/js/user";
import { XMContext } from "@/store/context";
import ExamShareModal from './ExamShareModal'
import DataAnalysic from './DataAnalysic'
import PreviewModal from './PreviewModal'
import './index.less'
const { RangePicker } = DatePicker;
const { Search } = Input;
const { Option } = Select;
......@@ -313,14 +311,6 @@ function ExaminationManager(props: any) {
setQuery(_query);
}
const defaultOptions = {
loop: true,
autoplay: true,
animationData: nodata,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice',
},
};
return (
<div className='page examination-manager'>
<div className='content-header'>考试</div>
......@@ -444,12 +434,7 @@ function ExaminationManager(props: any) {
pagination={false}
style={{ margin: '0px 0 16px' }}
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>
}}></XMTable>
{total > 0 && (
<PageControl
......
......@@ -22,7 +22,6 @@ import {
Space,
Radio,
} from "antd";
import Lottie from 'react-lottie';
import { PlusOutlined } from "@ant-design/icons";
import { XMTable } from "@/components";
import ShowTips from "@/components/ShowTips";
......@@ -737,58 +736,6 @@ class OperatePaper extends Component {
totalScore,
} = formData;
const { match } = this.props;
const defaultOptions = {
loop: true,
autoplay: true,
animationData: paperEmpty,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
}
}
const selectQuestionList = [...this.state.selectQuestionList];
const questionTypeEnum = {
SINGLE_CHOICE: "【单选题】",
MULTI_CHOICE: "【多选题】",
JUDGE: "【判断题】",
GAP_FILLING: "【填空题】",
INDEFINITE_CHOICE: "【不定项选择题】",
};
const typeColumns = [
{
title: "题型",
dataIndex: "typeKey",
key: "typeKey",
render: (text, record, index) => <span style={{color: '#333333'}}>{questionTypeEnum[text]}</span>,
},
{
title: "操作",
key: "action",
align: 'right',
render: (text, record, index) => (
<Space size="middle">
<span
style={{color: index > 0 ? '#2966FF' : '#CCCCCC', cursor: 'pointer'}}
onClick={() => {
index > 0 && this.handleMoveTypeSorter(index, -1);
}}
>
上移
</span>
<span style={{color: '#BFBFBF'}}> | </span>
<span
style={{color: index < 4 ? '#2966FF' : '#CCCCCC', cursor: 'pointer'}}
onClick={() => {
index < 4 && this.handleMoveTypeSorter(index, 1);
}}
>
下移
</span>
</Space>
),
},
];
return (
<div>
<div className="page operate-paper-page">
......@@ -906,15 +853,7 @@ class OperatePaper extends Component {
pagination={false}
onChange={this.sortByQuestionType}
renderEmpty={{
image: <div style={{ marginTop: 24 }}>
<Lottie
options={defaultOptions}
height={150}
width={150}
isStopped={false}
isPaused={false}
/>
</div>,
image: paperEmpty,
description: <span style={{ display: 'block', paddingBottom: 24 }}>请在左上角添加题目</span>
}}
/>
......
......@@ -19,7 +19,6 @@ import {
ConfigProvider,
Empty,
} from "antd";
import Lottie from 'react-lottie';
import { PageControl, XMTable } from "@/components";
import "./PaperList.less";
import { Route, withRouter } from "react-router-dom";
......@@ -31,7 +30,6 @@ import Service from "@/common/js/service";
import _ from "underscore";
import PaperPreviewModal from "../modal/PreviewPaperModal";
import MoveModal from '../../modal/MoveModal';
import * as nodata from '../../../lottie/nodata/data.json';
import Bus from "@/core/bus";
const { Search } = Input;
......@@ -547,14 +545,6 @@ class PaperList extends Component {
User.getUserRole()
);
const { match } = this.props;
const defaultOptions = {
loop: true,
autoplay: true,
animationData: nodata,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
}
}
return (
<div className={"paper-list " + this.props.type}>
<div className="paper-list-filter">
......@@ -635,15 +625,6 @@ class PaperList extends Component {
bordered
loading={loading}
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>
}}
/>
......@@ -660,16 +641,7 @@ class PaperList extends Component {
pagination={false}
bordered
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>
}}
/>
)}
......
......@@ -6,11 +6,25 @@
* @Description: 助学工具-题库-题目列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import React, { Component } from 'react';
import { Table, ConfigProvider, Empty, Row, Input, Select, Tooltip, Space, Button, Modal, message, Menu, Dropdown, DatePicker } from 'antd';
import Lottie from 'react-lottie';
import _ from 'underscore';
import { Route, withRouter } from 'react-router-dom';
import React, { Component } from "react";
import {
Table,
ConfigProvider,
Empty,
Row,
Input,
Select,
Tooltip,
Space,
Button,
Modal,
message,
Menu,
Dropdown,
DatePicker,
} from "antd";
import _ from "underscore";
import { Route, withRouter } from "react-router-dom";
import { DownOutlined } from '@ant-design/icons';
import { PageControl, XMTable } from '@/components';
import User from '@/common/js/user';
......@@ -22,8 +36,7 @@ import Bus from '@/core/bus';
import moment from 'moment';
import Service from '@/common/js/service';
import MoveModal from '../../modal/MoveModal';
import * as nodata from '../../../lottie/nodata/data.json';
import './QuestionList.less';
import "./QuestionList.less";
const { RangePicker } = DatePicker;
const { Search } = Input;
......@@ -549,14 +562,6 @@ class QuestionList extends Component {
preserveSelectedRowKeys: true,
onChange: this.onSelectChange,
};
const defaultOptions = {
loop: true,
autoplay: true,
animationData: nodata,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice',
},
};
return (
<div className='question-list'>
<div className='question-list-filter'>
......@@ -681,15 +686,9 @@ class QuestionList extends Component {
onChange={this.handleChangeTable}
rowSelection={rowSelection}
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>
{['CloudManager', 'StoreManager'].includes(User.getUserRole()) && categoryId && (
description: <span style={{ display: 'block', paddingBottom: 24 }}><span>还没有题目</span>
{["CloudManager", "StoreManager"].includes(User.getUserRole()) &&
categoryId && (
<span>
,快去
<span
......@@ -703,7 +702,6 @@ class QuestionList extends Component {
</span>
)}
</span>
),
}}
/>
{total > 0 && (
......
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