Commit ac840091 by guomingpang

Merge branch 'dev' of…

Merge branch 'dev' of ssh://xmgit.ixm5.cn:10022/xiaomai-cloud-class/xiaomai-cloud-class-web into dev
parents 3f881d0e c4408618
......@@ -613,10 +613,11 @@ module.exports = function (webpackEnv) {
silent: true,
// The formatter is invoked directly in WebpackDevServerUtils during development
formatter: isEnvProduction ? typescriptFormatter : undefined
})
// new vConsolePlugin({
// enable: (process.env.DEPLOY_ENV === 'prod' || process.env.DEPLOY_ENV === 'beta') ? false : true
// })
}),
new vConsolePlugin({
enable: (process.env.DEPLOY_ENV === 'prod' || process.env.DEPLOY_ENV === 'beta') ? false : true
})
].filter(Boolean),
// Some libraries import Node modules but don't use them in the browser.
// Tell webpack to provide empty mocks for them so importing them works.
......
......@@ -34,7 +34,7 @@
"bizcharts": "^3.3.0",
"camelcase": "^5.3.1",
"case-sensitive-paths-webpack-plugin": "2.3.0",
"classnames": "^2.2.6",
"classnames": "^2.3.1",
"cropper": "^3.1.4",
"cross-env": "^7.0.3",
"css-loader": "3.4.2",
......@@ -143,7 +143,7 @@
"@types/jquery": "^3.5.4",
"ali-oss": "^6.12.0",
"react-sortable-hoc": "^1.11.0",
"vconsole-webpack-plugin": "^1.5.2"
"vconsole-webpack-plugin": "^1.6.1"
},
"husky": {
"hooks": {
......
......@@ -5,11 +5,13 @@
*/
import React from 'react';
import { Modal, Input, Table } from 'antd';
import { Modal, Input } from 'antd';
import Service from '@/common/js/service';
// import _ from 'underscore';
import './ChooseMembersModal.less';
import User from '@/common/js/user';
import User from '@/common/js/user'
import { XMTable } from '@/components';
import college from '@/common/lottie/college';
const { Search } = Input;
class ChooseMembersModal extends React.Component {
......@@ -202,10 +204,8 @@ class ChooseMembersModal extends React.Component {
title: '全选', // 实际为头像,但在表格上这行要求显示为全选
key: 'avatar',
dataIndex: 'avatar',
width: '40%',
render: (value, record) => {
const { adminName } = record;
return (
<div className='avatar'>
{
......@@ -231,7 +231,7 @@ class ChooseMembersModal extends React.Component {
title: '学员名',
key: 'adminNameRight',
dataIndex: 'adminName',
width: '70%',
width: '65%',
render: (value, record) => {
const { adminName = '', avatar } = record;
return (
......@@ -292,16 +292,19 @@ class ChooseMembersModal extends React.Component {
enterButton={<span className="icon iconfont">&#xe832;</span>}
/>
<div className='container-left-body-table'>
<Table
<XMTable
renderEmpty={{
image: college,
description: '暂无数据'
}}
rowKey={(record) => record.userId}
dataSource={allUserList}
columns={this.selectedColumnsLeft()}
pagination={false}
scroll={{ y: 290}}
// bordered={true}
size={'small'}
rowSelection={{
columnWidth : 24,
columnWidth : 63,
selectedRowKeys,
onChange : this.onChangeRow,
getCheckboxProps : this.getCheckboxProps,
......@@ -325,7 +328,11 @@ class ChooseMembersModal extends React.Component {
<span className={ (selectUserList.length > 0) ? 'span-right-l' : null }>清空</span>
</div>
<div className='container-right-body'>
<Table
<XMTable
renderEmpty={{
image: college,
description: '暂无数据'
}}
rowKey={(record) => record.userId}
dataSource={selectUserList}
columns={this.selectedColumnsRight()}
......
......@@ -37,7 +37,7 @@
>tr >td {
border-bottom: none;
background-color: #fff !important;
padding:8px 8px !important;
}
}
}
......@@ -45,6 +45,14 @@
.ant-empty-normal {
margin: 100px 0 !important;
}
.ant-empty {
margin-top: 60px;
}
.ant-empty-description {
color: #999;
}
.avatar{
display: flex;
align-items: center;
......@@ -119,6 +127,13 @@
margin: 144px 0 !important;
}
.ant-empty {
margin-top: 60px;
}
.ant-empty-description {
color: #999;
}
.avatar{
display: flex;
align-items: center;
......
......@@ -5,10 +5,10 @@
*/
import React from 'react';
import { Modal, Button, Breadcrumb, Radio, message } from 'antd';
import { Modal, Button, Breadcrumb, message } from 'antd';
import Service from '@/common/js/service';
import { FILE_TYPE_ICON_MAP, DEFAULT_SIZE_UNIT } from "@/domains/resource-disk/constants";
import { LottieIcon } from 'xiaomai-b-components';
import LottieIcon from '@/components/LottieIcon';
import _ from 'underscore';
import { getEllipsText } from "@/domains/basic-domain/utils";
import * as lodash from 'lodash';
......@@ -334,6 +334,8 @@ class CopyFileModal extends React.Component {
<div className="lottie-box">
<LottieIcon
title={<span className="desc">这个文件夹是空的</span>}
type="college"
size={150}
/>
</div>
}
......
......@@ -57,12 +57,17 @@
}
}
.lottie-box {
border:1px solid #E8E8E8;
border-radius:4px;
height: 320px;
.copy-body {
.lottie-box {
border:1px solid #E8E8E8;
border-radius:4px;
height: 320px;
}
.lottie-icon{
margin: 70px 0 !important;
.lottie-icon__title {
color: #999;
}
}
}
.lottie-icon{
margin: 100px 0;
}
\ No newline at end of file
......@@ -35,6 +35,9 @@
.ant-table-row{
background-color: #fff !important;
}
tr:first-child{
display: none;
}
.ant-table-row:hover{
background-color: #E9E9E9;
}
......
......@@ -10,7 +10,7 @@ import React from 'react';
import { Modal, Button, Radio, Checkbox, message, Tooltip } from 'antd';
import _ from 'underscore';
import * as lodash from 'lodash';
import { LottieIcon } from 'xiaomai-b-components';
import LottieIcon from '@/components/LottieIcon';
import Service from '@/common/js/service';
import { getEllipsText } from "@/domains/basic-domain/utils";
......@@ -647,6 +647,8 @@ class SelectPrepareFileModal extends React.Component {
<Otherwise>
<LottieIcon
title={<span className="desc">这个文件夹是空的</span>}
type="college"
size={150}
/>
</Otherwise>
</Choose>
......
......@@ -4,10 +4,10 @@
}
.lottie-icon {
margin: 12px 0 0 0;
margin: 0;
border: 1px solid #E8E8E8;
border-radius: 4px;
padding: 100px 0;
padding: 69px 0 59px 0;
.desc {
color: #999;
......
......@@ -7,11 +7,12 @@
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse, AxiosPromise, AxiosError } from 'axios';
import { message } from 'antd';
import { message, Modal } from 'antd';
import { BASIC_HOST, TIME_OUT, USER_TYPE, VERSION, PROJECT } from '@/domains/basic-domain/constants';
import User from './user';
import { content } from 'html2canvas/dist/types/css/property-descriptors/content';
interface FetchParams {
url: string,
......@@ -27,7 +28,8 @@ interface HeadersType{
storeId?:any,
storeUserId?:any,
userId?:any,
xmtoken?:any
xmtoken?:any,
enterpriseId?:string|null
}
class Axios {
static post(
......@@ -51,6 +53,9 @@ class Axios {
if(User.getToken()){
headerObject.xmtoken = User.getToken();
}
if (User.getEnterpriseId()) {
headerObject.enterpriseId = User.getEnterpriseId();
}
const instance: AxiosInstance = axios.create({
timeout: TIME_OUT,
responseType: 'json',
......@@ -84,8 +89,15 @@ class Axios {
})
instance.interceptors.response.use((response: AxiosResponse): AxiosResponse | AxiosPromise => {
const { message: ResMessage, success, resultMsg, resultCode } = response.data;
if (success || resultCode === 0) {
const { message: ResMessage, success, resultMsg, code: resultCode } = response.data;
const requestStatus = response.status;
if (requestStatus === 10001) {
Modal.warning({
title:"服务已到期",
content: "当前企业购买的小麦企学院服务已到期,如需继续使用学院功能,请尽快续费购买",
okText: "我知道了"
})
} else if (success || resultCode === 0) {
return response;
} else if (!options.reject) {
message.error(ResMessage || resultMsg);
......@@ -104,6 +116,13 @@ class Axios {
window.RCHistory.replace('/login');
return Promise.reject();
break;
case 10001:
Modal.warning({
title:"服务已到期",
content: "当前企业购买的小麦企学院服务已到期,如需继续使用学院功能,请尽快续费购买",
okText: "我知道了"
})
break;
default:
message.error(error.message);
break;
......
......@@ -11,8 +11,13 @@ import Storage from './storage';
import { PREFIX, USER_PREFIX } from '@/domains/basic-domain/constants';
class User {
getStoreId() {
return Storage.get(`${PREFIX}_storeId`);
getVersion() {
return Storage.getObj(`${PREFIX}_version`)
}
getStoreId(){
return Storage.get(`${PREFIX}_storeId`)
}
getEnterpriseId() {
......@@ -49,8 +54,12 @@ class User {
return Storage.get(`${PREFIX}_isAdmin`);
}
setStoreId(value: any) {
return Storage.set(`${PREFIX}_storeId`, value);
setVersion(value:any) {
return Storage.setObj(`${PREFIX}_version`,value)
}
setStoreId(value:any){
return Storage.set(`${PREFIX}_storeId`,value)
}
setEnterpriseId(value: any) {
......
......@@ -10,4 +10,7 @@
height: 100vh;
padding: 16px;
background-color: #F0F2F5;
}
.ant-tooltip-inner {
max-width: 1000px;
}
\ No newline at end of file
@font-face {
font-family: 'iconfont'; /* project id 2223403 */
src: url('//at.alicdn.com/t/font_2223403_boiin24pch6.eot');
src: url('//at.alicdn.com/t/font_2223403_boiin24pch6.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_2223403_boiin24pch6.woff2') format('woff2'),
url('//at.alicdn.com/t/font_2223403_boiin24pch6.woff') format('woff'),
url('//at.alicdn.com/t/font_2223403_boiin24pch6.ttf') format('truetype'),
url('//at.alicdn.com/t/font_2223403_boiin24pch6.svg#iconfont') format('svg');
font-family: 'iconfont'; /* Project id 2223403 */
src: url('//at.alicdn.com/t/font_2223403_oe5p510553.woff2?t=1624259078391') format('woff2'),
url('//at.alicdn.com/t/font_2223403_oe5p510553.woff?t=1624259078391') format('woff'),
url('//at.alicdn.com/t/font_2223403_oe5p510553.ttf?t=1624259078391') format('truetype');
}
.iconfont{
font-family:"iconfont" !important;
font-size:16px;
font-style:normal;
.iconfont {
font-family: 'iconfont' !important;
font-size: 16px;
font-style: normal;
}
.lottie-icon{
text-align: center;
margin-top: 200px;
margin-bottom: 50px;
&__title{
font-size:14px;
font-family:PingFangSC-Regular;
font-weight:400;
color:#999;
line-height:20px;
margin-top: 20px;
}
}
\ No newline at end of file
/*
* @Author: wufan
* @Date: 2021-06-15 13:48:35
* @LastEditors: wufan
* @LastEditTime: 2021-06-15 14:24:57
* @Description: Description
*/
import React from 'react';
import Lottie from 'react-lottie';
import student from '@/common/lottie/student.json';
import activity from '@/common/lottie/activity.json';
import teacher from '@/common/lottie/teacher.json';
import college from '@/common/lottie/college.json';
import './LottieIcon.less';
interface LottieIconInterface {
size: number,
type: string,
title: string,
isStopped: boolean,
isPaused: boolean,
}
const ANIMATION_DATA_MAP: {
[key: string]: any,
} = {
student,
activity,
teacher,
college
}
function LottieIcon(props: LottieIconInterface) {
const {
title,
size = 90,
type = 'student',
isPaused = true,
isStopped = true,
} = props;
const options = {
loop: true,
autoplay: true,
animationData: ANIMATION_DATA_MAP[type],
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
}
}
return (
<div className="lottie-icon">
<Lottie
options={options}
width={size}
height={size}
isPaused={isPaused}
isStopped={isStopped}
/>
<div className="lottie-icon__title">{title}</div>
</div>
)
}
export default LottieIcon;
\ No newline at end of file
/*
* @Author: wufan
* @Date: 2021-05-26 10:29:56
* @LastEditors: wufan
* @LastEditTime: 2021-06-17 14:15:00
* @Description: Description
*/
import React from "react";
import { Tag } from 'antd'
import "./WatchDataHeader.less";
interface WatchDataHeaderProps {
......
......@@ -14,7 +14,7 @@ export default class WechatApi {
timestamp: res.timestamp, // 必填,生成签名的时间戳
nonceStr: res.nonceStr,// 必填,生成签名的随机串
signature: res.signature,
jsApiList: ['startLiving'],
jsApiList: ['startLiving','downloadLivingReplay'],
success: function(res) {
console.log(res,'agentConfig')
},
......
......@@ -2,89 +2,89 @@
* @Author: yuananting
* @Date: 2021-03-03 15:13:12
* @LastEditors: fusanqiasng
* @LastEditTime: 2021-05-25 10:07:03
* @LastEditTime: 2021-06-16 09:57:18
* @Description: 助学工具接口
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import Service from '@/common/js/service'
import Service from '@/common/js/service';
export function queryExternalCategoryTree(params: object) {
return Service.Hades('public/externalHades/queryCategoryTree', params)
return Service.Hades('public/externalHades/queryCategoryTree', params);
}
export function queryCategoryTree(params: object) {
return Service.Hades('public/hades/queryCategoryTree', params)
return Service.Hades('public/hades/queryCategoryTree', params);
}
export function addCategory(params: object) {
return Service.Hades('public/hades/addCategory', params)
return Service.Hades('public/hades/addCategory', params);
}
export function delCategory(params: object) {
return Service.Hades('public/hades/delCategory', params)
return Service.Hades('public/hades/delCategory', params);
}
export function editCategory(params: object) {
return Service.Hades('public/hades/editCategory', params)
return Service.Hades('public/hades/editCategory', params);
}
export function editCategoryTree(params: object) {
return Service.Hades('public/hades/editCategoryTree', params)
export function moveCategory(params: object) {
return Service.Hades('public/hades/moveCategory', params);
}
export function queryQuestionPageList(params: object) {
return Service.Hades('public/hades/queryQuestionPageList', params)
return Service.Hades('public/hades/queryQuestionPageList', params);
}
export function addQuestion(params: object) {
return Service.Hades('public/hades/addQuestion', params)
return Service.Hades('public/hades/addQuestion', params);
}
export function deleteQuestion(params: object) {
return Service.Hades('public/hades/deleteQuestion', params)
return Service.Hades('public/hades/deleteQuestion', params);
}
export function queryQuestionDetails(params: object) {
return Service.Hades('public/hades/queryQuestionDetails', params)
return Service.Hades('public/hades/queryQuestionDetails', params);
}
export function editQuestion(params: object) {
return Service.Hades('public/hades/editQuestion', params)
return Service.Hades('public/hades/editQuestion', params);
}
export function batchImport(params: object) {
return Service.Hades('public/hades/batchImport', params)
return Service.Hades('public/hades/batchImport', params);
}
export function createPaper(params: object) {
return Service.Hades('public/hades/createPaper', params)
return Service.Hades('public/hades/createPaper', params);
}
export function queryPaperPageList(params: object) {
return Service.Hades('public/hades/queryPaperPageList', params)
return Service.Hades('public/hades/queryPaperPageList', params);
}
export function deletePaper(params: object) {
return Service.Hades('public/hades/deletePaper', params)
return Service.Hades('public/hades/deletePaper', params);
}
export function queryPaperDetail(params: object) {
return Service.Hades('public/hades/queryPaperDetail', params)
return Service.Hades('public/hades/queryPaperDetail', params);
}
export function viewPaper(params: object) {
return Service.Hades('public/hades/viewPaper', params)
return Service.Hades('public/hades/viewPaper', params);
}
export function editPaper(params: object) {
return Service.Hades('public/hades/editPaper', params)
return Service.Hades('public/hades/editPaper', params);
}
export function batchQueryQuestionDetails(params: object) {
return Service.Hades('public/hades/batchQueryQuestionDetails', params)
return Service.Hades('public/hades/batchQueryQuestionDetails', params);
}
export function queryQuestionPageListWithContent(params: object) {
return Service.Hades('public/hades/queryQuestionPageListWithContent', params)
return Service.Hades('public/hades/queryQuestionPageListWithContent', params);
}
......@@ -7,6 +7,7 @@
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import Service from "@/common/js/service";
import User from "@/common/js/user";
export function sendLoginAuthCode(params: object) {
return Service.Hades("anon/hades/sendLoginAuthCode", params);
......@@ -47,6 +48,9 @@ export function getEnterpriseUser(params: object) {
export function getWXWorkLoginNoCheck(params: object) {
return Service.Hades('anon/hades/getWXWorkLoginNoCheck', params);
}
export function getLesseeVersionMsg() {
return Service.Hades("public/hades/getLesseeVersionMsg",{enterpriseId:User.getEnterpriseId()})
}
export const getOssClient = (
data: object,
instId: string,
......
......@@ -7,6 +7,7 @@
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import Service from "@/common/js/service";
import User from "@/common/js/user"
export function getEmployeeList(params: object) {
return Service.Hades("public/hades/getStoreUserPage", params);
......@@ -76,3 +77,4 @@ export function getStoreDetail(params: object) {
}
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-03-11 11:34:37
* @LastEditors: fusanqiasng
* @LastEditTime: 2021-05-24 23:44:39
* @LastEditTime: 2021-06-16 09:56:46
* @Description: 助学工具接口
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -12,7 +12,7 @@ import {
addCategory,
delCategory,
editCategory,
editCategoryTree,
moveCategory,
addQuestion,
queryQuestionPageList,
deleteQuestion,
......@@ -26,8 +26,8 @@ import {
viewPaper,
editPaper,
batchQueryQuestionDetails,
queryQuestionPageListWithContent
} from '@/data-source/aidTool/request-apis'
queryQuestionPageListWithContent,
} from '@/data-source/aidTool/request-apis';
export default class AidToolService {
/**
* 查询运营端分类书
......@@ -35,101 +35,101 @@ export default class AidToolService {
* @returns
*/
static queryExternalCategoryTree(parmas: any) {
return queryExternalCategoryTree(parmas)
return queryExternalCategoryTree(parmas);
}
// 获取题目分类树
static queryCategoryTree(params: any) {
return queryCategoryTree(params)
return queryCategoryTree(params);
}
// 新增题目分类
static addCategory(params: any) {
return addCategory(params)
return addCategory(params);
}
// 删除分类
static delCategory(params: any) {
return delCategory(params)
return delCategory(params);
}
// 编辑分类
static editCategory(params: any) {
return editCategory(params)
return editCategory(params);
}
// 编辑分类树(拖拽)
static editCategoryTree(params: any) {
return editCategoryTree(params)
// 拖拽移动分类树
static moveCategory(params: any) {
return moveCategory(params);
}
// 查询题目列表
static queryQuestionPageList(params: any) {
return queryQuestionPageList(params)
return queryQuestionPageList(params);
}
// 添加题目
static addQuestion(params: any) {
return addQuestion(params)
return addQuestion(params);
}
// 删除题目
static deleteQuestion(params: any) {
return deleteQuestion(params)
return deleteQuestion(params);
}
// 预览题目
static queryQuestionDetails(params: any) {
return queryQuestionDetails(params)
return queryQuestionDetails(params);
}
// 编辑题目
static editQuestion(params: any) {
return editQuestion(params)
return editQuestion(params);
}
// 批量导入
static batchImport(params: any) {
return batchImport(params)
return batchImport(params);
}
// 创建试卷
static createPaper(params: any) {
return createPaper(params)
return createPaper(params);
}
// 查询试卷列表
static queryPaperPageList(params: any) {
return queryPaperPageList(params)
return queryPaperPageList(params);
}
// 删除试卷
static deletePaper(params: any) {
return deletePaper(params)
return deletePaper(params);
}
// 编辑前查询试卷信息
static queryPaperDetail(params: any) {
return queryPaperDetail(params)
return queryPaperDetail(params);
}
// 预览试卷
static viewPaper(params: any) {
return viewPaper(params)
return viewPaper(params);
}
// 编辑试卷
static editPaper(params: any) {
return editPaper(params)
return editPaper(params);
}
// 操作试卷-预览查询多题目信息
static batchQueryQuestionDetails(params: any) {
return batchQueryQuestionDetails(params)
return batchQueryQuestionDetails(params);
}
// 操作试卷-选择题目列表带题目详情
static queryQuestionPageListWithContent(params: any) {
return queryQuestionPageListWithContent(params)
return queryQuestionPageListWithContent(params);
}
}
......@@ -7,7 +7,7 @@
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import { getUserStore, getUserPermission ,logout,getStoreUser,sendBizAuthCode,editUserPhone,checkBizAuthCode,sendNewPhoneAuthCode,sendLoginAuthCode,login,getLastedVersion, getEnterpriseUser,getWXWorkLoginNoCheck} from '@/data-source/base/request-apis';
import { getUserStore, getUserPermission ,logout,getStoreUser,sendBizAuthCode,editUserPhone,checkBizAuthCode,sendNewPhoneAuthCode,sendLoginAuthCode,login,getLastedVersion, getEnterpriseUser,getWXWorkLoginNoCheck,getLesseeVersionMsg} from '@/data-source/base/request-apis';
export default class StoreService {
// 获取员工列表
......@@ -55,5 +55,8 @@ export default class StoreService {
static getWXWorkLoginNoCheck(params: any){
return getWXWorkLoginNoCheck(params);
}
//获取企业配置的版本信息
static getLesseeVersionMsg() {
return getLesseeVersionMsg();
}
}
\ No newline at end of file
/*
* @Author: 陈剑宇
* @Date: 2020-05-07 14:43:01
* @LastEditTime: 2021-05-28 15:20:40
* @LastEditors: fusanqiasng
* @LastEditTime: 2021-06-11 16:44:17
* @LastEditors: Please set LastEditors
* @Description:
* @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts
*/
......
/*
* @Author: 吴文洁
* @Date: 2020-08-20 09:21:40
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-02-20 17:08:58
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-11 15:17:56
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
......
......@@ -8,18 +8,19 @@
import React, { useEffect, useState } from "react";
import { withRouter } from "react-router-dom";
import _ from "underscore";
import PageControl from "@/components/PageControl";
import { CheckBox } from "@/components";
import { CheckBox, PageControl } from "@/components";
import { Button, Table, Modal, message, Input } from "antd";
import Service from '@/common/js/service';
import { XMTable } from '@/components';
import college from '@/common/lottie/college.json';
import StoreService from "@/domains/store-domain/storeService";
import EmployeeAddOrEditModal from "../store-manage/EmployeeAddOrEditModal";
import User from "@/common/js/user";
import WechatApi from '@/common/js/wechatApi';
import WWOpenDataCom from '@/components/WWOpenDataCom';
import LimitTip from "./LimitTip";
import "./EmployeeManage.less";
import ChooseMembersModal from "./modal/ChooseMembersModal";
import SetEmployeeModal from "./modal/SetEmployeeModal";
const { confirm } = Modal;
const { Search } = Input;
......@@ -372,8 +373,13 @@ function EmployeeManage() {
</Button>
}
</div>
<LimitTip type="员工" total={total} tip={()=>{return (<div>数据为当前学院的员工数,若员工存在多个学院,企业人数只统计为1人</div>)}}/>
<div className="box-body">
<Table
<XMTable
renderEmpty={{
image: college,
description: '暂无数据'
}}
size={"middle"}
pagination={false}
dataSource={employeeList}
......
.limit-tip {
height: 32px;
background: #E9EFFF;
border-radius: 2px;
margin-bottom: 13px;
.always {
display: inline-block;
font-size: 14px;
line-height: 32px;
font-weight: 400;
color: #666666;
margin-left: 16px;
.renew-text {
display: inline-block;
color: #2966FF;
cursor: pointer;
.renew-popover {
display: none;
position: absolute;
z-index: 1000;
width: 276px;
height: 294px;
transform: translate(-98px,13px);
box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.06);
background-color: white;
background-image: url(https://image.xiaomaiketang.com/xm/CZ4a752jzi.png);
background-repeat: no-repeat;
background-size: cover;
text-align: center;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 22px;
box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.06);
.popover-arrow {
position: absolute;
display: block;
width: 8.48528137px;
height: 8.48528137px;
background: 0 0;
border-style: solid;
border-width: 4.24264069px;
left: 50%;
transform: translateX(-50%) rotate(45deg);
top: -4px;
border-top-color: #fff;
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: #fff;
box-shadow: -2px -2px 5px #0000000f;
}
.qrcode {
width: 182px;
height: 204px;
background-color: white;
margin: 28px auto 16px auto;
img {
width: 150px;
height: 150px;
margin: 16px 16px 8px 16px;
}
}
}
&:hover .renew-popover {
display: block;
}
}
}
}
\ No newline at end of file
import React, { useEffect, useState } from "react";
import BaseService from "@/domains/basic-domain/baseService";
import { Tooltip } from "antd"
import "./LimitTip.less"
export default function LimitTip(props:{total:number,type:string,tip:() => React.ReactNode}) {
const [isOver, setIsOver] = useState(false)
const [limitUser, setLimitUser] = useState(0)
useEffect(()=> {
BaseService.getLesseeVersionMsg()
.then(res=> {
setIsOver(res.result.surplusUserNum === 0 || res.result.whetherReachUserNum)
setLimitUser(res.result.userNum)
})
},[])
return (
<div className="limit-tip">
<div className="always">本学院{props.type}<span style={{color:"#333333",fontWeight:"bold"}}>{props.total}</span>
<Tooltip overlayStyle={{maxWidth:"587px",width:"fit-content"}} placement="topLeft" arrowPointAtCenter title={props.tip}>
<span className="icon iconfont" style={{cursor:"pointer",marginLeft:"4px",color:"#bfbfbf"}}>&#59449;</span>
</Tooltip>
{
isOver ? (
<>
<div style={{marginLeft:"14px",display:"inline-block"}}>当前企业使用人数已达到上限 (<span style={{color:"#333333",fontWeight:"bold"}}>{limitUser}</span>人),将无法添加新员工、新学员,如需增加人数限制,请联系小麦企学院服务平台。</div>
<div className="renew-text">立即续费<span className="icon iconfont" style={{fontSize:"10px"}}>&#59291;</span>
<div className="renew-popover">
<div className="popover-arrow"><span className="popover-arrow-content"></span></div>
<div className="qrcode">
<img src="https://cdn.xiaomai5.com/qixueyuankehu.png" alt=""></img>
<div className="des">微信/企业微信扫码续费</div>
</div>
<div className="phone"><svg style={{position:"relative",top:"2px",marginRight:"4px"}} viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M512.651 3.78c-281.433 0-509.21 228.324-509.21 509.209 0 281.43 228.325 509.203 509.21 509.203 281.427 0 509.202-228.317 509.202-509.203 0.55-280.885-227.775-509.21-509.202-509.21z m198.205 743.553c-36.14 36.136-169.737 1.641-302.24-130.312-131.953-131.959-165.902-266.104-129.768-301.695 31.211-31.21 68.99-85.417 125.939-14.782 56.943 70.629 29.016 90.34-3.291 122.647-22.449 22.448 24.642 79.392 73.37 128.125 49.283 48.73 105.678 95.818 128.126 73.368 32.306-32.305 52.017-60.23 122.646-3.288 71.182 56.949 16.426 95.276-14.782 125.937z" p-id="4409" fill="#999999"></path></svg>
咨询电话:19157875632</div>
</div>
</div>
</>
) : ("")
}
</div>
</div>
)
}
\ No newline at end of file
......@@ -17,4 +17,5 @@
margin-left: 4px;
}
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2021-05-30 15:57:40
* @LastEditTime: 2021-06-21 11:13:15
* @Description: 学员管理页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -11,19 +11,25 @@ import React, { useEffect, useState } from "react";
import { withRouter } from "react-router-dom";
import _ from "underscore";
import { PageControl } from "@/components";
import { Table, Input, DatePicker, Select, Button, message } from "antd";
import { Input, DatePicker, Select, Button, message } from "antd";
import StoreService from "@/domains/store-domain/storeService";
import User from "@/common/js/user";
import ChooseMembersModal from "./modal/ChooseMembersModal";
import { XMTable } from '@/components';
import college from '@/common/lottie/college.json';
import LimitTip from "./LimitTip"
import "./UserManagePage.less";
import moment from "moment";
const { Option } = Select;
const { Search } = Input;
const { RangePicker } = DatePicker;
declare var window: any;
function UserManagePage() {
const [userList, setUserList] = useState([]);
const [model, setModel] = useState<React.ReactNode>(null);
......@@ -197,8 +203,13 @@ function UserManagePage() {
}}
>添加学员</Button>
}
<LimitTip type="学员" total={total} tip={()=>{ return (<div><div>1、数据为当前学院的员工数,若学员存在多个学院,企业人数只统计为1人;</div><div>2、若一个学员既用「企业微信」登录学习又用「微信」登录学习,企业人数将统计为2人。</div></div>)}}/>
<div className="box-body">
<Table
<XMTable
renderEmpty={{
image: college,
description: '暂无数据'
}}
size={"middle"}
pagination={false}
dataSource={userList}
......
......@@ -5,8 +5,9 @@
*/
import React from 'react';
import { Modal, Input, Table, message, Tooltip, Empty } from 'antd';
import { Modal, Input, message, Tooltip } from 'antd';
import { XMTable } from '@/components';
import college from '@/common/lottie/college.json';
import Service from '@/common/js/service';
import User from '@/common/js/user'
import SetEmployeeModal from "./SetEmployeeModal";
......@@ -252,7 +253,6 @@ class ChooseMembersModal extends React.Component {
title: '全选', // 实际为头像,但在表格上这行要求显示为全选
key: 'avatar',
dataIndex: 'avatar',
width: '40%',
render: (value, record) => {
const { name } = record;
......@@ -363,7 +363,7 @@ class ChooseMembersModal extends React.Component {
pagination={false}
scroll={{ y: 290}}
renderEmpty={{
image: searchKey ? search : '',
image: searchKey ? search : college,
description: <div>
<div style={{ color: '#333' }}>暂无数据</div>
<div style={{ color: '#666', padding: '0 32px', fontSize: '12px' }}>需要先将员工添加到企微可见范围后,员工才会出现在这里</div>
......@@ -371,7 +371,7 @@ class ChooseMembersModal extends React.Component {
}}
size={'small'}
rowSelection={{
columnWidth : 24,
columnWidth : 63,
selectedRowKeys,
onChange : this.onChangeRow,
getCheckboxProps : this.getCheckboxProps,
......@@ -390,7 +390,11 @@ class ChooseMembersModal extends React.Component {
<span className={ (selectUserList.length > 0) ? 'span-right-l' : null }>清空</span>
</div>
<div className='container-right-body'>
<Table
<XMTable
renderEmpty={{
image: college,
description: '暂无数据'
}}
rowKey={(record) => record.enterpriseVisibleUserId}
dataSource={selectUserList}
columns={this.selectedColumnsRight()}
......
......@@ -125,7 +125,9 @@
.ant-empty-normal {
margin: 120px 0 !important;
}
.ant-empty {
margin-top: 76px;
}
.avatar{
display: flex;
align-items: center;
......
......@@ -25,7 +25,7 @@ function CerateQWCourse(props: any) {
const [liveDuration, setLiveDuration] = useState(60);
const [liveStart, setLiveStart] = useState(0);
const [type, setType] = useState('0');
const [livingId, setLivingId] = useState(0);
function handleSave() {
const param = {
......@@ -42,6 +42,7 @@ function CerateQWCourse(props: any) {
Service.Hades('anon/hades/wxWorkCreateLiveDemo', param).then((res) => {
console.log(22)
handleConvertShortUrl(res.result)
setLivingId(res.result)
wx.invoke('startLiving', {
"livingId": res.result,
}, function (res: any) {
......@@ -72,6 +73,18 @@ function CerateQWCourse(props: any) {
})
}
function downloadLivingReplay(){
wx.invoke('downloadLivingReplay', {
livingId
}, function(res:any) {
console.log(res,'tyuuioythbn')
if (res.err_msg != "downloadLivingReplay:ok") {
// 错误处理
}
});
}
return <div className="page createQWCourse ">
<Breadcrumbs navList={props.type === 'edit' ? "编辑考试" : "新建直播课"} goBack={props.history.goBack} />
......@@ -139,6 +152,7 @@ function CerateQWCourse(props: any) {
<div style={{width:100,margin:'0 auto'}} className="qrcode"></div>
</div>
<div className="footer">
<Button onClick={downloadLivingReplay}>下载直播回放</Button>
<Button onClick={props.history.goBack}>取消</Button>
<Button type="primary" onClick={handleSave}>保存</Button>
</div>
......
/*
* @Author: 吴文洁
* @Date: 2020-08-05 10:12:45
* @LastEditors: yuananting
* @LastEditTime: 2021-06-02 15:05:54
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-15 20:01:05
* @Description: 视频课-列表模块
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
......
......@@ -4,15 +4,15 @@
* @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';
import React from 'react';
import { Modal, Button, Table, message, Tooltip, Spin, Popconfirm } from 'antd';
import { QuestionCircleOutlined,LoadingOutlined} from "@ant-design/icons";
import _ from 'underscore';
import moment from 'moment';
import Lottie from "lottie-web";
import User from '@/common/js/user';
import { suffixType, DEFAULT_SIZE_UNIT, SupportFileType } from '@/common/constants/academic/liveEnum';
import { FileVerifyMap, FileTypeIcon, DISK_MAP } from '@/common/constants/academic/lessonEnum';
import { suffixType, DEFAULT_SIZE_UNIT } from '@/common/constants/academic/liveEnum';
import { FileVerifyMap, FileTypeIcon } from '@/common/constants/academic/lessonEnum';
import ScanFileModal from '@/modules/prepare-lesson/modal/ScanFileModal'
import SelectPrepareFileModal from '@/modules/prepare-lesson/modal/SelectPrepareFileModal';
import Service from '@/common/js/service';
......@@ -229,14 +229,18 @@ class ManageCoursewareModal extends React.Component {
const antIcon = <LoadingOutlined/>;
const type = FileVerifyMap[fileType].type;
return <div className="courseware-name" onClick={() => this.handleScanFile(item)}>
{(type === 'JPG' || type === 'PNG') && item.progress ?
<Spin indicator={antIcon} />
:<img
src={FileTypeIcon[FileVerifyMap[fileType].type] || (item.docUrls[0] || {}).conversionFileUrl}
alt=""
className="item-img"
/>
}
<Choose>
<When condition={(type === 'JPG' || type === 'PNG') && item.progress}>
<Spin indicator={antIcon} />
</When>
<Otherwise>
<img
src={FileTypeIcon[FileVerifyMap[fileType].type] || (item.docUrls[0] || {}).conversionFileUrl}
alt=""
className="item-img"
/>
</Otherwise>
</Choose>
<Tooltip title={item.fileName}><span className="name">{item.fileName}</span></Tooltip>
</div>
},
......@@ -270,7 +274,7 @@ class ManageCoursewareModal extends React.Component {
width: "16%",
dataIndex: "control",
render: (_value, item) => {
const { uploadObject, failObject, cancelObject } = this.state;
const { failObject } = this.state;
const uploadFail = failObject[item.id];
// 上课前45分钟/上课中/已结束的情况下都不可操作
......@@ -295,7 +299,7 @@ class ManageCoursewareModal extends React.Component {
const {
list, scanFileModal, editData, cancelObject,
showSelectFileModal, selectedFileList,
diskList, currentRootDisk, isLessonPermission
diskList
} = this.state;
const _list = _.reject(list, (item) => cancelObject[item.id]);
return (
......
......@@ -52,6 +52,13 @@ class ShareLiveModal extends React.Component {
size: 98,
})
qrcodeWrapDom.appendChild(qrcodeNode)
const qrcodeWrapDomDownload = document.querySelector('#qrcodeWrap-dowload')
const qrcodeNodeDownLoad = new qrcode({
text: this.state.shareUrl,
size: 196,
})
qrcodeWrapDomDownload.appendChild(qrcodeNodeDownLoad)
}
)
})
......@@ -72,13 +79,12 @@ class ShareLiveModal extends React.Component {
() => {
this.setState({ time: new Date().valueOf() }, () => {
setTimeout(() => {
let node = document.getElementById('poster')
let node = document.getElementById('poster-dowload')
domtoimage.toPng(node).then((imgData) => {
console.log(imgData)
const download = document.createElement('a')
const { courseName } = this.props.data
$(download).attr('href', imgData).attr('download', `${courseName}.png`).get(0).click()
// this.props.close()
})
}, 1000)
})
......@@ -158,6 +164,29 @@ class ShareLiveModal extends React.Component {
<div className='qrcode-wrap__right' id='qrcodeWrap'></div>
</div>
</div>
<div id='poster-dowload'>
<div className='store-name'>
<span className='text'>{User.getStoreName()}</span>
</div>
<div className='course-name-title'>{type === 'videoClass' ? `${courseName}开课啦` : `邀请你观看直播:`}</div>
{type === 'liveClass' && <div class='live-couse-name'>{courseName}</div>}
<Choose>
<When condition={showImg}>
<img crossOrigin='*' src={coverImgSrc + `?=${time}`} className='course-cover' alt='' />
</When>
<Otherwise>
<img src={coverImgSrc + `?=${time}`} className='course-cover' alt='' />
</Otherwise>
</Choose>
<div className='qrcode-wrap'>
<div className='qrcode-wrap__left'>
<div className='text'>长按识别二维码进入观看</div>
<img className='finger' src='https://image.xiaomaiketang.com/xm/thpkWDwJsC.png' alt='' />
</div>
<div className='qrcode-wrap__right' id='qrcodeWrap-dowload'></div>
</div>
</div>
</div>
<div className='right'>
<div className='share-poster right__item'>
......
.share-live-modal {
.ant-modal-body {
display: flex;
#poster{
background: #FFF;
margin:0;
padding: 20px;
}
height:510px !important;
overflow: hidden !important;
.left {
width: 303px;
margin: 0 32px 0 16px;
box-shadow:0px 2px 10px 0px rgba(0,0,0,0.05);
border-radius: 12px;
.course-name-title {
font-size: 14px;
color: #333;
line-height: 20px;
margin-bottom: 4px;
}
.live-couse-name{
font-size:16px;
color:#333333;
font-weight: 600;
}
.course-name {
#poster{
background: #FFF;
margin:0;
padding: 20px;
margin-bottom:140px;
.course-name-title {
font-size: 14px;
color: #333;
font-size: 16px;
font-weight: 600;
line-height: 20px;
}
.course-cover {
width: 263px;
height: 143px;
border-radius: 6px;
margin-top: 8px;
}
margin-bottom: 4px;
}
.live-couse-name{
font-size:16px;
color:#333333;
font-weight: 600;
}
.course-name {
color: #333;
font-size: 16px;
font-weight: 600;
line-height: 20px;
}
.course-cover {
width: 263px;
height: 143px;
border-radius: 6px;
margin-top: 8px;
}
.qrcode-wrap {
padding: 0 16px;
display: flex;
align-items: center;
margin: 24px 0 16px 0;
.qrcode-wrap {
padding: 0 16px;
display: flex;
align-items: center;
margin: 24px 0 16px 0;
&__left {
width: 98px;
text-align: center;
margin-right: 22px;
.text {
line-height: 20px;
&__left {
width: 98px;
text-align: center;
margin-right: 22px;
.text {
line-height: 20px;
}
.finger {
width: 40px;
height: 40px;
margin-top: 8px;
}
}
.finger {
width: 40px;
height: 40px;
margin-top: 8px;
&__right {
width: 110px;
height: 110px;
padding: 6px
}
}
&__right {
width: 110px;
height: 110px;
padding: 6px
.store-name {
// padding: 8px 16px;
display: flex;
align-items: center;
margin-bottom: 8px;
.text {
font-size: 12px;
color: #999;
font-size: 14px;
line-height: 20px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
}
}
}
.store-name {
// padding: 8px 16px;
display: flex;
align-items: center;
#poster-dowload{
background: #FFF;
margin:0;
padding: 40px;
width:606px;
.course-name-title {
font-size: 28px;
color: #333;
line-height: 40px;
margin-bottom: 8px;
.text {
font-size: 12px;
color: #999;
font-size: 14px;
line-height: 20px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
}
.live-couse-name{
font-size:32px;
color:#333333;
font-weight: 600;
}
.course-name {
color: #333;
font-size: 32px;
font-weight: 600;
line-height: 40px;
}
.course-cover {
width: 526px;
height: 286px;
border-radius: 6px;
margin-top: 16px;
}
.qrcode-wrap {
padding: 0 32px;
display: flex;
align-items: center;
margin: 48px 0 32px 0;
&__left {
width: 196px;
text-align: center;
margin-right: 44px;
.text {
line-height: 40px;
}
.finger {
width: 80px;
height: 80px;
margin-top: 16px;
}
}
&__right {
width: 220px;
height: 220px;
padding: 12px
}
}
.store-name {
// padding: 8px 16px;
display: flex;
align-items: center;
margin-bottom: 16px;
.text {
font-size: 24px;
color: #999;
font-size: 28px;
line-height: 40px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
}
}
}
}
.right {
.title {
color: #333;
......
/*
* @Author: 吴文洁
* @Date: 2020-08-05 10:12:45
* @LastEditors: yuananting
* @LastEditTime: 2021-06-02 16:15:55
* @Description: 视频课-列表模块
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
import React from 'react';
import { Table, Modal, message , Tooltip,Switch,Dropdown} from 'antd';
import { Route, withRouter } from 'react-router-dom';
......
import React from 'react';
import React, { useEffect, useState } from 'react';
import { Select, Tooltip } from 'antd';
import DataSet from "@antv/data-set";
import { Chart as G2Chart } from '@antv/g2';
......@@ -19,10 +19,44 @@ import {
} from "bizcharts";
import moment from 'moment'
import Service from "@/common/js/service";
import BaseService from "@/domains/basic-domain/baseService";
import User from '@/common/js/user';
import './Home.less';
const Option = Select.Option;
function HomeTip() {
const [isOverNum, setIsOverNum] = useState(false)
useEffect(()=> {
BaseService.getLesseeVersionMsg()
.then(res=> {
setIsOverNum(res.result.surplusUserNum === 0)
})
},[])
return isOverNum ? (
<div className="home-tip">
<div className="content">
<span className="icon iconfont" style={{color:"#FF4F4F",marginRight:"8px"}}>&#xe61d;</span>温馨提示:企业使用人数已达上限,将无法新增员工、学员,如需增加人数限制,请联系小麦企学院服务平台。
<div className="renew-btn">立即续费
<div className="renew-popover">
<div className="popover-arrow"><span class="popover-arrow-content"></span></div>
<div className="qrcode">
<img src="https://cdn.xiaomai5.com/qixueyuankehu.png" alt=""></img>
<div className="des">微信/企业微信扫码续费</div>
</div>
<div className="phone"><svg style={{position:"relative",top:"2px",marginRight:"4px"}} viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M512.651 3.78c-281.433 0-509.21 228.324-509.21 509.209 0 281.43 228.325 509.203 509.21 509.203 281.427 0 509.202-228.317 509.202-509.203 0.55-280.885-227.775-509.21-509.202-509.21z m198.205 743.553c-36.14 36.136-169.737 1.641-302.24-130.312-131.953-131.959-165.902-266.104-129.768-301.695 31.211-31.21 68.99-85.417 125.939-14.782 56.943 70.629 29.016 90.34-3.291 122.647-22.449 22.448 24.642 79.392 73.37 128.125 49.283 48.73 105.678 95.818 128.126 73.368 32.306-32.305 52.017-60.23 122.646-3.288 71.182 56.949 16.426 95.276-14.782 125.937z" p-id="4409" fill="#999999"></path></svg>
咨询电话:19157875632</div>
</div>
</div>
</div>
</div>
) : ("")
}
class Home extends React.Component {
constructor(props) {
super(props);
......@@ -264,6 +298,7 @@ class Home extends React.Component {
};
return (
<div className="home-page">
<HomeTip />
<div className="data-wrap">
<div className="home-title">数据概况</div>
<div className="data-box">
......
......@@ -28,6 +28,81 @@
font-family: 'number';
src: url('https://image.xiaomaiketang.com/xm/n2sADd2jY6.TTF');
}
.home-tip {
height: 40px;
background: #FFE7E7;
margin-bottom: 16px;
.content {
font-size: 14px;
color: #666666;
font-weight: 400;
line-height: 40px;
padding-left: 16px;
.renew-btn {
display: inline-block;
width: 80px;
height: 28px;
background: #FF4F4F;
border-radius: 2px;
color: #ffffff;
font-size: 14px;
font-weight: 400;
line-height: 28px;
text-align: center;
cursor: pointer;
.renew-popover {
display: none;
position: absolute;
z-index: 1000;
width: 276px;
height: 294px;
transform: translate(-98px,13px);
box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.06);
background-color: white;
background-image: url(https://image.xiaomaiketang.com/xm/CZ4a752jzi.png);
background-repeat: no-repeat;
background-size: cover;
text-align: center;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 22px;
box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.06);
.popover-arrow {
position: absolute;
display: block;
width: 8.48528137px;
height: 8.48528137px;
background: 0 0;
border-style: solid;
border-width: 4.24264069px;
left: 50%;
transform: translateX(-50%) rotate(45deg);
top: -4px;
border-top-color: #fff;
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: #fff;
box-shadow: -2px -2px 5px #0000000f;
}
.qrcode {
width: 182px;
height: 204px;
background-color: white;
margin: 28px auto 16px auto;
img {
width: 150px;
height: 150px;
margin: 16px 16px 8px 16px;
}
}
}
&:hover .renew-popover {
display: block;
}
}
}
}
.data-wrap{
background: #FFF;
.data-box {
......
......@@ -2,17 +2,17 @@
* @Description:
* @Author: zangsuyun
* @Date: 2021-03-19 18:05:23
* @LastEditors: wufan
* @LastEditTime: 2021-05-30 16:48:46
* @LastEditors: fusanqiasng
* @LastEditTime: 2021-06-15 11:20:24
* @Copyright: © 2020 杭州杰竞科技有限公司 版权所有
*/
import React, { Component } from "react";
import { Input, Button, Tree } from "antd";
import "./Classification.less";
import User from "@/common/js/user";
import KnowledgeAPI from "@/data-source/knowledge/request-api";
import Bus from "@/core/bus";
import React, { Component } from 'react';
import { Input, Button, Tree } from 'antd';
import './Classification.less';
import User from '@/common/js/user';
import KnowledgeAPI from '@/data-source/knowledge/request-api';
import Bus from '@/core/bus';
const { Search } = Input;
const { DirectoryTree } = Tree;
......@@ -21,7 +21,7 @@ class Classification extends Component {
constructor(props) {
super(props);
this.state = {
selectedKeys: props.selectedKeys ? [props.selectedKeys] : ["0"],
selectedKeys: props.selectedKeys ? [props.selectedKeys] : ['0'],
searchValue: null,
NewEditQuestionBankCategory: null, //新增或编辑分类模态框
ImportCourseCategory: null, // 引用课程分类模态框
......@@ -32,11 +32,11 @@ class Classification extends Component {
componentDidMount() {
this.queryCategoryTree();
Bus.bind('knowledgeCategoryTree', this.queryCategoryTree)
Bus.bind('knowledgeCategoryTree', this.queryCategoryTree);
}
componentWillUnmount() {
Bus.unbind('knowledgeCategoryTree', this.queryCategoryTree)
Bus.unbind('knowledgeCategoryTree', this.queryCategoryTree);
}
shouldComponentUpdate = (nextProps, nextState) => {
......@@ -79,7 +79,7 @@ class Classification extends Component {
};
KnowledgeAPI.getCategoryTree(query).then((res) => {
const { categoryList = [], noCategoryCnt = 0 } = res.result;
let str = "未分类";
let str = '未分类';
if (categoryName) {
this.setState({ autoExpandParent: true });
if (str.indexOf(categoryName) < 0) {
......@@ -93,8 +93,8 @@ class Classification extends Component {
this.setState({ expandedKeys: nodeId });
} else {
const defaultNode = {
id: "0",
categoryName: "未分类",
id: '0',
categoryName: '未分类',
categoryCount: noCategoryCnt,
};
categoryList.unshift(defaultNode);
......@@ -110,8 +110,8 @@ class Classification extends Component {
} else {
this.setState({ autoExpandParent: false });
const defaultNode = {
id: "0",
categoryName: "未分类",
id: '0',
categoryName: '未分类',
categoryCount: noCategoryCnt,
};
categoryList.unshift(defaultNode);
......@@ -140,39 +140,35 @@ class Classification extends Component {
item.title =
!value || (value && item.categoryName.indexOf(value) > -1) ? (
<span>
{item.categoryName}{item.categoryCount}
{item.categoryName}
{item.categoryCount > 0 && <span>{item.categoryCount}</span>}
</span>
) : (
<span style={{ opacity: 0.5 }}>
{item.categoryName}{item.categoryCount}
{item.categoryName}
{item.categoryCount > 0 && <span>{item.categoryCount}</span>}
</span>
);
item.icon =
item.categoryName === "未分类" ? (
item.categoryName === '未分类' ? (
<img
style={{
width: "24px",
height: "24px",
opacity:
!value || (value && item.categoryName.indexOf(value) > -1)
? 1
: 0.5,
width: '24px',
height: '24px',
opacity: !value || (value && item.categoryName.indexOf(value) > -1) ? 1 : 0.5,
}}
src="https://image.xiaomaiketang.com/xm/defaultCategory.png"
alt=""
src='https://image.xiaomaiketang.com/xm/defaultCategory.png'
alt=''
/>
) : (
<img
style={{
width: "24px",
height: "24px",
opacity:
!value || (value && item.categoryName.indexOf(value) > -1)
? 1
: 0.5,
width: '24px',
height: '24px',
opacity: !value || (value && item.categoryName.indexOf(value) > -1) ? 1 : 0.5,
}}
src="https://image.xiaomaiketang.com/xm/hasCategory.png"
alt=""
src='https://image.xiaomaiketang.com/xm/hasCategory.png'
alt=''
/>
);
if (item.sonCategoryList) {
......@@ -186,36 +182,30 @@ class Classification extends Component {
};
render() {
const {
treeData,
expandedKeys,
selectedKeys,
autoExpandParent,
} = this.state;
const { treeData, expandedKeys, selectedKeys, autoExpandParent } = this.state;
return (
<div className="question-bank-sider">
<div className="sider-title">知识分类</div>
<div className='question-bank-sider'>
<div className='sider-title'>知识分类</div>
<Search
className="sider-search"
placeholder="搜索名称分类"
className='sider-search'
placeholder='搜索名称分类'
onSearch={(value) => {
this.queryCategoryTree(value);
}}
enterButton={<span className="icon iconfont">&#xe832;</span>}
style={{width: 230}}
enterButton={<span className='icon iconfont'>&#xe832;</span>}
style={{ width: 230 }}
/>
<div className="sider-btn">
<div className='sider-btn'>
<Button
onClick={() => {
window.RCHistory.push({
pathname: "/course-category-manage?from=knowledge",
pathname: '/course-category-manage?from=knowledge',
});
}}
>
}}>
分类管理
</Button>
</div>
<div className="sider-tree">
<div className='sider-tree'>
<DirectoryTree
expandedKeys={expandedKeys}
autoExpandParent={autoExpandParent}
......
......@@ -2,8 +2,8 @@
* @Description:
* @Author: zangsuyun
* @Date: 2021-03-12 14:49:40
* @LastEditors: wufan
* @LastEditTime: 2021-05-30 20:37:42
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-11 16:44:59
* @Copyright: © 2020 杭州杰竞科技有限公司 版权所有
*/
......
import React from 'react';
import { Button } from 'antd';
import { withRouter } from 'react-router-dom';
import User from '@/common/js/user';
import './ExpiredCourseList.less';
function ExpiredCourseList(props) {
......
......@@ -6,7 +6,7 @@
* @Description: 大班直播、互动班课列表的筛选组件
*/
import React, { useState, useRef, useEffect } from 'react';
import React, { useState, useEffect } from 'react';
import { withRouter } from 'react-router-dom';
import { Row, Input, Select ,Tooltip} from 'antd';
import RangePicker from "@/modules/common/DateRangePicker";
......@@ -86,7 +86,7 @@ function PlanFilter(props) {
};
StoreService.getStoreUserBasicPage( _query).then((res) => {
const { result = {} } = res;
const { records = [], total = 0, hasNext } = result;
const { records = [], hasNext } = result;
const list = current > 1 ? creatorList.concat(records) : records;
setHasNext(hasNext);
setCreatorList(list);
......
......@@ -2,7 +2,7 @@
* @Author: zhangleyuan
* @Date: 2021-02-20 16:46:46
* @LastEditors: fusanqiasng
* @LastEditTime: 2021-06-01 11:45:34
* @LastEditTime: 2021-06-15 14:37:20
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -10,7 +10,7 @@
import React, { useState } from 'react';
import { Table, Modal, message, Tooltip, Switch, Dropdown } from 'antd';
import { withRouter } from 'react-router-dom';
import { PageControl, XMTable } from "@/components";
import { PageControl, XMTable } from '@/components';
import PlanService from '@/domains/plan-domain/planService';
import SharePlanModal from '../modal/SharePlanModal';
import { LIVE_SHARE } from '@/domains/course-domain/constants';
......@@ -317,7 +317,7 @@ function PlanList(props) {
scroll={{ x: 1400 }}
className='plan-list-table'
renderEmpty={{
description: <span style={{ display: 'block', paddingBottom: 24 }}>还没有试卷</span>
description: <span style={{ display: 'block', paddingBottom: 24 }}>暂无数据</span>,
}}
/>
<div className='box-footer'>
......
......@@ -51,6 +51,13 @@ class ShareLiveModal extends React.Component {
size: 98,
})
qrcodeWrapDom.appendChild(qrcodeNode)
const qrcodeWrapDomDownload = document.querySelector('#qrcodeWrap-dowload')
const qrcodeNodeDownLoad = new qrcode({
text: this.state.shareUrl,
size: 196,
})
qrcodeWrapDomDownload.appendChild(qrcodeNodeDownLoad)
}
)
})
......@@ -70,9 +77,8 @@ class ShareLiveModal extends React.Component {
},
() => {
this.setState({ time: new Date().valueOf() }, () => {
let node = document.getElementById('poster')
let node = document.getElementById('poster-dowload')
domtoimage.toPng(node).then((imgData) => {
console.log(imgData)
const download = document.createElement('a')
const { planName } = this.props.data
$(download).attr('href', imgData).attr('download', `${planName}.png`).get(0).click()
......@@ -112,7 +118,7 @@ class ShareLiveModal extends React.Component {
<div className='course-name-title'>邀请你参与培训:</div>
<div class='live-couse-name'>{planName}</div>
<div className='live-couse-name'>{planName}</div>
<Choose>
<When condition={showImg}>
<img crossOrigin='*' src={coverUrl + `?=${time}`} className='course-cover' alt='' />
......@@ -130,6 +136,31 @@ class ShareLiveModal extends React.Component {
<div className='qrcode-wrap__right' id='qrcodeWrap'></div>
</div>
</div>
<div id='poster-dowload'>
<div className='store-name'>
<span className='text'>{User.getStoreName()}</span>
</div>
<div className='course-name-title'>邀请你参与培训:</div>
<div className='live-couse-name'>{planName}</div>
<Choose>
<When condition={showImg}>
<img crossOrigin='*' src={coverUrl + `?=${time}`} className='course-cover' alt='' />
</When>
<Otherwise>
<img src={coverUrl + `?=${time}`} className='course-cover' alt='' />
</Otherwise>
</Choose>
<div className='qrcode-wrap'>
<div className='qrcode-wrap__left'>
<div className='text'>长按识别二维码进入观看</div>
<img className='finger' src='https://image.xiaomaiketang.com/xm/thpkWDwJsC.png' alt='' />
</div>
<div className='qrcode-wrap__right' id='qrcodeWrap-dowload'></div>
</div>
</div>
</div>
<div className='right'>
<div className='share-poster right__item'>
......
.share-live-modal {
.ant-modal-body {
display: flex;
#poster{
background: #FFF;
margin:0;
padding: 20px;
}
height:510px !important;
overflow: hidden !important;
.left {
width: 303px;
margin: 0 32px 0 16px;
box-shadow:0px 2px 10px 0px rgba(0,0,0,0.05);
border-radius: 12px;
.course-name-title {
font-size: 14px;
color: #333;
line-height: 20px;
margin-bottom: 4px;
}
.live-couse-name{
font-size:16px;
color:#333333;
font-weight: 600;
}
.course-name {
color: #333;
font-size: 16px;
font-weight: 600;
line-height: 20px;
}
.course-cover {
width: 263px;
height: 143px;
border-radius: 6px;
margin-top: 8px;
}
#poster{
background: #FFF;
margin:0;
padding: 20px;
margin-bottom:140px;
.course-name-title {
font-size: 14px;
color: #333;
line-height: 20px;
margin-bottom: 4px;
}
.live-couse-name{
font-size:16px;
color:#333333;
font-weight: 600;
}
.course-name {
color: #333;
font-size: 16px;
font-weight: 600;
line-height: 20px;
}
.course-cover {
width: 263px;
height: 143px;
border-radius: 6px;
margin-top: 8px;
}
.qrcode-wrap {
padding: 0 16px;
display: flex;
align-items: center;
margin: 24px 0 16px 0;
.qrcode-wrap {
padding: 0 16px;
display: flex;
align-items: center;
margin: 24px 0 16px 0;
&__left {
width: 98px;
text-align: center;
margin-right: 22px;
.text {
line-height: 20px;
&__left {
width: 98px;
text-align: center;
margin-right: 22px;
.text {
line-height: 20px;
}
.finger {
width: 40px;
height: 40px;
margin-top: 8px;
}
}
.finger {
width: 40px;
height: 40px;
margin-top: 8px;
&__right {
width: 110px;
height: 110px;
padding: 6px
}
}
&__right {
width: 110px;
height: 110px;
padding: 6px
.store-name {
// padding: 8px 16px;
display: flex;
align-items: center;
margin-bottom: 8px;
.text {
font-size: 12px;
color: #999;
font-size: 14px;
line-height: 20px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
}
}
}
#poster-dowload{
background: #FFF;
margin:0;
padding: 40px;
width:606px;
.course-name-title {
font-size: 28px;
color: #333;
line-height: 40px;
margin-bottom: 8px;
}
.live-couse-name{
font-size:32px;
color:#333333;
font-weight: 600;
}
.course-name {
color: #333;
font-size: 32px;
font-weight: 600;
line-height: 40px;
}
.course-cover {
width: 526px;
height: 286px;
border-radius: 6px;
margin-top: 16px;
}
.store-name {
// padding: 8px 16px;
display: flex;
align-items: center;
margin-bottom: 8px;
.text {
font-size: 12px;
color: #999;
font-size: 14px;
line-height: 20px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
.qrcode-wrap {
padding: 0 32px;
display: flex;
align-items: center;
margin: 48px 0 32px 0;
&__left {
width: 196px;
text-align: center;
margin-right: 44px;
.text {
line-height: 40px;
}
.finger {
width: 80px;
height: 80px;
margin-top: 16px;
}
}
&__right {
width: 220px;
height: 220px;
padding: 12px
}
}
.store-name {
// padding: 8px 16px;
display: flex;
align-items: center;
margin-bottom: 16px;
.text {
font-size: 12px;
color: #999;
font-size: 28px;
line-height: 40px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
}
}
}
}
......
......@@ -7,23 +7,20 @@
*/
import React from 'react';
import { Modal, Button, Radio, Checkbox, Spin, Upload, message, Tooltip } from 'antd';
import InfiniteScroll from 'react-infinite-scroller';
import { Modal, Button, Radio, Checkbox, message, Tooltip } from 'antd';
import User from '@/common/js/user';
import { getEllipsText } from "@/core/util";
import DefaultIcon from '@/modules/common/DefaultIcon';
import UploadProgressModal from './UploadProgressModal';
import NonCompliantFileModal from './NonCompliantFileModal';
import Service from '@/common/js/service';
import _ from 'underscore';
import {
DEFAULT_SIZE_UNIT, FileTypeIcon, NonCompliantFileMap,
DISK_LIST, SupportFileType, LocalFileType,FileVerifyMap
DEFAULT_SIZE_UNIT, FileTypeIcon,
SupportFileType, FileVerifyMap
} from "@/common/constants/academic/lessonEnum";
import { getFileTypeByName } from '../components/FolderManage';
import LottieIcon from '@/components/LottieIcon';
import './SelectPrepareFileModal.less';
const defaultQuery = {
......@@ -660,9 +657,10 @@ class SelectPrepareFileModal extends React.Component {
}
</div>
</div> :
<DefaultIcon
type='student'
<LottieIcon
title={<span className="desc">这个文件夹是空的</span>}
type="college"
size={150}
/>
}
......
......@@ -9,8 +9,7 @@
import React from 'react';
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 { PageControl } from 'xiaomai-b-components';
import { XMTable } from '@/components';
import Service from '@/common/js/service';
import { formatDate } from '@/domains/basic-domain/utils';
......@@ -122,7 +121,7 @@ class FolderList extends React.Component {
break;
}
}
getYoZoSign = (data,type)=>{
getYoZoSign = (data,type,folderName)=>{
return new Promise((resolve) => {
let uploadParams;
if(type==="UPLOAD"){
......@@ -135,7 +134,8 @@ class FolderList extends React.Component {
uploadParams ={
fileVersionId:data,
instId:window.currentUserInstInfo.instId,
yoZoTypeEnum:'VIEW'
yoZoTypeEnum:'VIEW',
htmlTitle:folderName
}
}
Service.Apollo('public/apollo/getYoZoSign', uploadParams).then(res => {
......@@ -157,7 +157,7 @@ class FolderList extends React.Component {
}
// 预览文件
handleScanFile = async (folder) => {
const { folderFormat, folderSize, ossUrl,rights,fileVersionId,id} = folder;
const { folderFormat, folderSize, ossUrl,rights,fileVersionId,id,folderName} = folder;
const {currentRootDisk } = this.props;
//如果是公共文件且只有查看的权限的用户的预览对接的三方是永中
const that = this;
......@@ -183,8 +183,8 @@ class FolderList extends React.Component {
that.saveYoZoFileVersionId(response.data.data.fileVersionId,id);
const { previewing } = that.state;
if(previewing){
const previewSign = await that.getYoZoSign(response.data.data.fileVersionId,"VIEW");
const url = `https://eic.yozocloud.cn/api/view/file?fileVersionId=${response.data.data.fileVersionId}&appId=${appId}&sign=${previewSign}`
const previewSign = await that.getYoZoSign(response.data.data.fileVersionId,"VIEW",folderName);
const url = `https://eic.yozocloud.cn/api/view/file?fileVersionId=${response.data.data.fileVersionId}&appId=${appId}&sign=${previewSign}&htmlTitle=${folderName}`
that.setState({
previewStatus:'UPLOAD_SUCCESS',
url
......@@ -193,8 +193,8 @@ class FolderList extends React.Component {
})
})
}else{
const previewSign = await that.getYoZoSign(fileVersionId,"VIEW");
const url = `http://eic.yozocloud.cn/api/view/file?fileVersionId=${fileVersionId}&appId=${appId}&sign=${previewSign}`
const previewSign = await that.getYoZoSign(fileVersionId,"VIEW",folderName);
const url = `http://eic.yozocloud.cn/api/view/file?fileVersionId=${fileVersionId}&appId=${appId}&sign=${previewSign}&htmlTitle=${folderName}`
const a = document.createElement('a');
document.body.appendChild(a);
a.setAttribute('href', url);
......@@ -278,8 +278,6 @@ class FolderList extends React.Component {
this.handleDataDot(folderFormat);
}
cancelPreview = ()=>{
const rightDom = document.querySelector('.right-container');
rightDom.style.zIndex = 1;
this.setState({
previewing:false,
showPreviewModal:false,
......
......@@ -13,7 +13,7 @@ import _ from 'underscore';
import Service from '@/common/js/service';
import { getEllipsText } from '@/domains/basic-domain/utils';
import { DEFAULT_SIZE_UNIT, LOCAL_FILE_TYPE_MAP,FILR_VERIFY_MAP,SUPPORT_FILE_TYPE_MAP} from '@/domains/resource-disk/constants';
import { DEFAULT_SIZE_UNIT,FILR_VERIFY_MAP,SUPPORT_FILE_TYPE_MAP} from '@/domains/resource-disk/constants';
import { getFileTypeByName } from '@/domains/resource-disk/utils';
import UploadProgressModal from '@/bu-components/UploadProgressModal';
......
......@@ -29,25 +29,6 @@ class PrepareLessonPage extends React.Component {
}
}
componentWillMount() {
// this.handleFetchDiskList();
}
handleFetchDiskList = async () => {
const res = await Service.Hades('public/apollo/getUserDisk', {});
const { result = [] } = res;
const diskList = result.map((item) => {
return {
...item,
folderName: DISK_MAP[item.disk]
}
});
this.setState({
diskList,
currentRootDisk: diskList[0] || defaultRootDisk
});
}
handleChangeDisk = (disk) => {
this.setState({
currentRootDisk: disk
......
import React from 'react';
import { Modal, Input, Form, message } from 'antd';
import ShowTips from '@/bu-components/ShowTip';
import { Modal, Input, Form } from 'antd';
import './CreateFolderModal.less';
class CreateFolderModal extends React.Component {
......@@ -107,5 +106,4 @@ class CreateFolderModal extends React.Component {
}
}
// export default Form.create()(CreateFolderModal);
export default CreateFolderModal;
\ No newline at end of file
import React from 'react';
import { Modal} from 'antd';
import "./PreviewFileModal.less";
import { Spin } from 'antd'
class PreviewFileModal extends React.Component {
constructor(props) {
super(props);
......@@ -26,7 +25,7 @@ class PreviewFileModal extends React.Component {
<div className="preview-modal-content">
<div className="load-img-box">
{previewStatus === "UPLOAD" &&
<img className="load-img" src="https://image.xiaomaiketang.com/xm/3j32ashQst.png"></img>
<Spin size="large"/>
}
{previewStatus === "UPLOAD_SUCCESS" &&
<img className="load-img" src="https://image.xiaomaiketang.com/xm/jJRK3bTEdc.png"></img>
......
......@@ -15,6 +15,9 @@
text-align:center;
width:266px;
height:174px;
.ant-spin-dot-item{
background-color: #FFF;
}
.load-img-box{
.load-img{
width:44px;
......
......@@ -118,7 +118,6 @@ const App: React.FC = (props: any) => {
setMenuType(!menuType);
}
if (!storeUserId) {
return <div></div>
}
......@@ -129,7 +128,7 @@ const App: React.FC = (props: any) => {
<ConfigProvider locale={zhCN} autoInsertSpaceInButton={false}>
<Main menuType={menuType} />
</ConfigProvider>
<Menu menuType={menuType} handleMenuType={handleMenuType}/>
<Menu menuType={menuType} handleMenuType={handleMenuType} />
</div>
)
}
......
import React from 'react';
import React, { useEffect, useState } from 'react';
import moment from "moment"
import Service from "@/common/js/service";
import BaseService from "@/domains/basic-domain/baseService";
import User from "@/common/js/user";
import { LIVE_SHARE } from "@/domains/course-domain/constants";
import moment from 'moment';
import { Modal, message } from 'antd';
import './CollegeManagePage.less';
import storage from '@/common/js/storage';
const roleMap = {
CloudManager: "管理员",
......@@ -14,6 +15,88 @@ const roleMap = {
CloudOperator: '运营师',
};
function ExpirationPopover(props) {
const [showType, setShowType] = useState(0); //0不显示,1剩余30天,2小于等于7天,3已过期
useEffect(()=> {
if (props.surplusDayTime === 0 ) {
//已过期
let loginflag = storage.get("expiration_tip_login")
if (loginflag === null || loginflag === "true") {
//只有登陆进来的时候提示一次
console.log("showtype",showType)
setShowType(3)
}
return
}
//即将过期
if (props.surplusDayTime === 30) {
if (storage.get("expiration_tip"+User.getUserId()+"_thirty") == null || storage.get("expiration_tip"+User.getUserId()+"_thirty") === "true") {
setShowType(1)
}
return
}
if (props.surplusDayTime <= 7) {
let daysflag = storage.getObj("expiration_tip"+User.getUserId()+"_7day");
if (!daysflag) {
setShowType(2)
return
}
if (daysflag[props.surplusDayTime - 1] === 0) {
setShowType(2)
}
}
},[props.endTime,props.surplusDayTime])
function iknow() {
if (props.surplusDayTime === 0 ) {
//已过期
storage.set("expiration_tip_login",false)
} else if (props.surplusDayTime === 30) {
storage.set("expiration_tip"+User.getUserId()+"_thirty",false)
} else if (props.surplusDayTime <= 7) {
let daysflag = [0,0,0,0,0,0,0]
daysflag[props.surplusDayTime - 1] = 1
storage.setObj("expiration_tip"+User.getUserId()+"_7day",daysflag)
}
setShowType(0)
}
if (props.surplusDayTime > 30) {
return ("")
}
return (
<>
{
showType === 0 ? ("") :(
<div className="expirationpopover">
<div className="dialog">
<div className="title">服务到期提醒</div>
{
showType === 3 ? (
<div className="tip-text">当前企业购买的小麦企学院服务已于<span style={{color:"#FF4F4F"}}>{moment(props.endTime).format("YYYY-MM-DD")}</span>到期,到期后仍可访问,但功能不可使用,建议尽快续费购买哦~</div>
) : (
<div className="tip-text">当前企业购买的小麦企学院服务 <span style={{color:"#FF4F4F"}}>仅剩{props.surplusDayTime}</span>(于<span>{moment(props.endTime).format("YYYY-MM-DD")}</span>到期),为了不影响使用,建议尽快续费购买哦~</div>
)
}
<div className="qrcode">
<img src="https://cdn.xiaomai5.com/qixueyuankehu.png" alt=""></img>
<div className="des">微信/企业微信扫码续费</div>
</div>
<div className="phone"><svg style={{position:"relative",top:"2px",marginRight:"4px"}} viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M512.651 3.78c-281.433 0-509.21 228.324-509.21 509.209 0 281.43 228.325 509.203 509.21 509.203 281.427 0 509.202-228.317 509.202-509.203 0.55-280.885-227.775-509.21-509.202-509.21z m198.205 743.553c-36.14 36.136-169.737 1.641-302.24-130.312-131.953-131.959-165.902-266.104-129.768-301.695 31.211-31.21 68.99-85.417 125.939-14.782 56.943 70.629 29.016 90.34-3.291 122.647-22.449 22.448 24.642 79.392 73.37 128.125 49.283 48.73 105.678 95.818 128.126 73.368 32.306-32.305 52.017-60.23 122.646-3.288 71.182 56.949 16.426 95.276-14.782 125.937z" p-id="4409" fill="#999999"></path></svg>
咨询电话:19157875632</div>
<div className="button" onClick={iknow}>我知道了</div>
</div>
</div>
)
}
</>
)
}
export default class CollegeManagePage extends React.Component {
constructor(props) {
super(props);
......@@ -24,13 +107,16 @@ export default class CollegeManagePage extends React.Component {
enterpriseId: User.getEnterpriseId(),
isAdmin: false,
createStoreList:[],
joinStoreList:[]
joinStoreList:[],
surplusDayTime:365, //剩余天数
endTime: 0 //有效截至时间
};
}
componentDidMount() {
this.getStoreList();
this.getEnterpriseUser();
this.getVersion()
}
getEnterpriseUser() {
......@@ -44,6 +130,17 @@ export default class CollegeManagePage extends React.Component {
this.setState({ name, avatar, isAdmin })
});
}
getVersion() {
BaseService.getLesseeVersionMsg()
.then(res=> {
User.setVersion(res.result)
this.setState({
surplusDayTime: res.result.stateEnum === "YES" ? 0 : res.result.surplusDayTime,
endTime: res.result.validEndTime
})
})
}
getStoreList() {
const { enterpriseId } = this.state;
......@@ -132,6 +229,7 @@ export default class CollegeManagePage extends React.Component {
} = this.state;
return (
<div className="college-manage-page">
<ExpirationPopover surplusDayTime={this.state.surplusDayTime} endTime={this.state.endTime}/>
<div className="college-header">
<div className="box">
<img className="box-image" src="https://image.xiaomaiketang.com/xm/fe4NCjr7XF.png" />
......@@ -179,6 +277,7 @@ export default class CollegeManagePage extends React.Component {
return null;
};
User.setStoreId(item.id);
User.setStoreUserId(item.storeUserId);
window.RCHistory.push('/home')
}}
>
......@@ -196,6 +295,7 @@ export default class CollegeManagePage extends React.Component {
e.preventDefault();
e.stopPropagation();
User.setStoreId(item.id);
User.setStoreUserId(item.storeUserId);
window.RCHistory.push('/college-info')
}}
>编辑</span>
......@@ -250,6 +350,7 @@ export default class CollegeManagePage extends React.Component {
return null;
};
User.setStoreId(item.id);
User.setStoreUserId(item.storeUserId);
window.RCHistory.push('/home')
}}
>
......@@ -267,6 +368,7 @@ export default class CollegeManagePage extends React.Component {
e.preventDefault();
e.stopPropagation();
User.setStoreId(item.id);
User.setStoreUserId(item.storeUserId);
window.RCHistory.push('/college-info')
}}
>编辑</span>
......
......@@ -183,4 +183,78 @@
}
}
}
.expirationpopover {
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: rgba(0,0,0,0.7);
z-index: 1000;
.dialog {
width: 560px;
height: 486px;
background: #FFFFFF;
border-radius: 4px;
.title {
text-align: center;
font-size: 20px;
color: #333333;
font-weight: 500;
margin-top: 40px;
}
.tip-text {
font-size: 16px;
color: #666666;
font-weight: 400;
margin-top: 16px;
margin-right: 40px;
margin-left: 40px;
}
.qrcode {
width: 182px;
height: 204px;
background: #F1F3F6;
border-radius: 2px;
margin-top: 16px;
margin-left: auto;
margin-right: auto;
img {
width: 150px;
height: 150px;
margin: 16px 16px 8px 16px;
}
.des {
text-align: center;
font-size: 14px;
color: #333333;
font-weight: 400;
}
}
.phone {
text-align: center;
font-size: 14px;
color: #333333;
font-weight: 400;
margin-top: 16px;
}
.button {
width: 80px;
height: 32px;
background: #2966FF;
cursor: pointer;
margin-left: auto;
margin-right: auto;
margin-top: 24px;
font-size: 14px;
font-weight: 400;
color: #ffffff;
line-height: 32px;
text-align: center;
}
}
}
}
\ No newline at end of file
@import "../../core/variables.less";
@import '../../core/variables.less';
@top-height: 60px;
@icon-color: #939393;
.top-container {
......@@ -7,16 +7,23 @@
left: 0;
right: 0;
height: @top-height;
background-color: #2966FF;
background-color: #2966ff;
// z-index:2;
&::after{
content:'';
width:100%;
height:60px;
background: linear-gradient(180deg, #2966FF 0%, rgba(41, 102, 255, 0.82) 29%, rgba(41, 102, 255, 0.58) 55%, rgba(41, 102, 255, 0.27) 77%, rgba(7, 78, 255, 0) 100%);
position:absolute;
z-index:2;
top:59px;
&::after {
content: '';
width: 100%;
height: 60px;
background: linear-gradient(
180deg,
#2966ff 0%,
rgba(41, 102, 255, 0.82) 29%,
rgba(41, 102, 255, 0.58) 55%,
rgba(41, 102, 255, 0.27) 77%,
rgba(7, 78, 255, 0) 100%
);
position: absolute;
z-index: 2;
top: 59px;
}
.logo {
display: inline-block;
......@@ -26,7 +33,7 @@
.logo-name {
font-size: 14px;
font-weight: 500;
color: #2966FF;
color: #2966ff;
line-height: 20px;
vertical-align: middle;
font-weight: bold;
......@@ -204,7 +211,7 @@
cursor: pointer;
}
.college-name {
color:#FFFFFF;
color: #ffffff;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
......@@ -213,9 +220,9 @@
.icon {
font-size: 14px;
margin-left: 8px;
color: #FFF;
color: #fff;
&:hover {
color:#FFF;
color: #fff;
}
}
}
......@@ -283,7 +290,7 @@
align-items: center;
.store-name {
font-size: 14px;
color: #FFF;
color: #fff;
line-height: 49px;
margin-left: 8px;
white-space: nowrap;
......@@ -296,17 +303,17 @@
width: 1px;
height: 16px;
background-color: #f4f4f4;
margin-right:16px;
margin-right: 16px;
}
}
.right-box {
display: flex;
align-items: center;
}
.right-bg-img{
img{
width:277px;
height:60px;
.right-bg-img {
img {
width: 277px;
height: 60px;
}
}
.link-to-store {
......@@ -315,21 +322,21 @@
line-height: 49px;
.text {
font-size: 14px;
color: #FFF;
color: #fff;
line-height: 49px;
margin-left: 7px;
}
.iconfont {
color: #FFF;
color: #fff;
}
.link {
cursor: pointer;
position: relative;
.link-btn{
padding:3px 12px;
.link-btn {
padding: 3px 12px;
border: 1px solid rgba(255, 255, 255, 0.5);
border-radius: 4px;
&:hover{
&:hover {
border: 1px solid rgba(255, 255, 255, 1);
}
}
......@@ -362,7 +369,7 @@
line-height: 20px;
}
.url-link {
color: #2966FF;
color: #2966ff;
font-size: 14px;
line-height: 20px;
}
......@@ -386,19 +393,20 @@
line-height: 41px;
width: 130px;
}
}
}
}
}
.share {
.share,
.help {
cursor: pointer;
margin-left: 16px;
.share-btn{
padding:3px 12px;
.share-btn,
.help-btn {
padding: 3px 12px;
border: 1px solid rgba(255, 255, 255, 0.5);
border-radius: 4px;
&:hover{
&:hover {
border: 1px solid rgba(255, 255, 255, 1);
}
}
......@@ -529,7 +537,7 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color:#FFF;
color: #fff;
}
}
}
......@@ -588,7 +596,7 @@
.user-detail {
position: relative;
padding-bottom: 16px;
border-bottom: 1px solid #E8E8E8;
border-bottom: 1px solid #e8e8e8;
display: flex;
align-items: center;
justify-content: space-between;
......@@ -625,7 +633,7 @@
cursor: pointer;
color: #333;
.menu-before {
color: #BFBFBF;
color: #bfbfbf;
margin-right: 8px;
font-size: 14px;
}
......
......@@ -6,6 +6,7 @@ import CheckBeforeSendCode from '../../components/CheckBeforeSendCode'
import User from '@/common/js/user'
import WechatLogin from './WechatLogin'
import BaseService from '@/domains/basic-domain/baseService'
import storage from '@/common/js/storage'
import axios from 'axios'
import _ from 'underscore'
import user from '@/common/js/user'
......@@ -43,6 +44,7 @@ function Login(props) {
User.removeToken()
User.removeEnterpriseId()
}
storage.set("expiration_tip_login",true)
}, [])
function getWXWorkLoginNoCheck(enterpriseId, userId) {
const params = {
......
@import '../../core/variables.less';
@top-height: 60px;
@top-height: 0px;
@menu-bakg: #FFF;
@active-color: #2966FF;
.left-container {
position: absolute;
z-index: 2;
z-index: 10;
top: @top-height;
left: 0;
bottom: 0;
width: @xm-left-width;
background: @menu-bakg;
color: #333;
.menu-type-icon{
margin:4px 0 0px 150px;
cursor: pointer;
.icon{
font-size:14px;
color:#5E606A;
.top-ctrl {
display: flex;
align-items: center;
.topLogo {
height: 60px;
background: rgba(255, 255, 255, 0.5);
.img1 {
width: 138px;
height: 35px;
margin: 15px 0 15px 8px;
}
}
.menu-type-icon{
margin: 8px 14px 0px 4px;
cursor: pointer;
.icon{
font-size:14px;
color:#5E606A;
}
}
}
.ant-menu {
padding-left: 0 !important;
color: #333;
......@@ -128,7 +142,153 @@
// display:inline-block;
// }
// }
.version-info {
position: absolute;
height: 74px;
bottom: 0;
width: 100%;
cursor: pointer;
.row-1 {
width: fit-content;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 20px;
margin: 0 auto;
.version-name {
display: inline-block;
width: 58px;
text-align: center;
margin: 0 auto;
border-radius: 2px;
border: 1px solid #E8E8E8;
}
.renew {
display: inline-block;
width: 58px;
color: #2966FF;
margin-left: 8px;
.renew-popover {
display: none;
position: absolute;
width: 276px;
height: 294px;
left: 150px;
bottom: 52px;
box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.06);
background-color: white;
background-image: url(https://image.xiaomaiketang.com/xm/CZ4a752jzi.png);
background-repeat: no-repeat;
background-size: cover;
text-align: center;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 22px;
.qrcode {
width: 182px;
height: 204px;
background-color: white;
margin: 28px auto 16px auto;
img {
width: 150px;
height: 150px;
margin: 16px 16px 8px 16px;
}
.des {
}
}
}
.renew-popover-show {
display: block;
}
}
}
.expiration-time {
height: 24px;
text-align: center;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 22px;
margin: 6px auto 0 auto;
}
.popover {
display: none;
position: absolute;
z-index: 100;
padding: 16px 22px;
bottom: 22px;
width: 352px;
height: 198px;
right: -342px;
background: #FFFFFF;
box-shadow: 0px 2px 15px 0px rgba(0, 0, 0, 0.06);
.title {
display: inline-block;
width: 68px;
height: 22px;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
line-height: 22px;
margin-right: 8px;
}
.expiration-tag {
display: inline-block;
width: 52px;
height: 18px;
background: #EEEEEE;
border-radius: 2px;
text-align: center;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 17px;
}
&::before {
position: absolute;
content: "";
width: 16px;
height: 16px;
left: -8px;
top: 80%;
border: 8px solid transparent;
box-shadow: 0px 2px 15px 0px rgba(0, 0, 0, 0.06);
}
.content {
margin-top: 24px;
.widget {
display: inline-block;
}
.lable {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 22px;
}
.lable-text {
margin-top: 4px;
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 22px;
}
}
}
.popover-show {
display: block;
}
}
}
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
background:@active-color !important;
}
......
import React, { useContext, useEffect, useState } from 'react';
import React, { useContext, useEffect, useRef, useState } from 'react';
import {
withRouter,
} from 'react-router-dom';
import { Menu} from 'antd';
import { Menu, Popover, Tooltip } from 'antd';
import { RightOutlined } from '@ant-design/icons'
import { menuList } from '../../routes//config/menuList'
import { XMContext } from '../../store/context';
import BaseService from "@/domains/basic-domain/baseService";
import StoreService from '@/domains/store-domain/storeService';
import classNames from 'classnames';
import User from "@/common/js/user"
import _ from 'underscore';
import "./Menu.less";
import { display } from 'html2canvas/dist/types/css/property-descriptors/display';
import moment from 'moment';
const { SubMenu } = Menu;
interface VersionInfo {
dayTime: number
stateEnum: string
surplusDayTime: number
surplusUserNum: number
userNum: number
validEndTime: string
validStartTime: string
}
function VersionPanel(props:any) {
const [versionName,setVersionName] = useState("标准版")
const [showVersionPopover, setShowVersionPopover] = useState(false)
const [showRenewPopover, setShowRenewPopover] = useState(false)
const [isExpiration, setIsExpiration] = useState(false)
const [versionInfo, setVersionInfo] = useState<any>({})
useEffect(()=> {
BaseService.getLesseeVersionMsg()
.then(res=> {
let version = res.result
User.setVersion(version)
let versioninfo = {
userNum: version.userNum,
surplusUserNum: version.surplusUserNum,
surplusDayTime: version.surplusDayTime,
validEndTime: moment(version.validEndTime).format("YYYY-MM-DD"),
validStartTime: moment(version.validStartTime).format("YYYY-MM-DD"),
}
setVersionInfo(versioninfo)
if (version.surplusDayTime === 0) {
setIsExpiration(true)
}
})
},[])
function onVersionEnter() {
setShowVersionPopover(true)
}
function onVersionLeave() {
setShowVersionPopover(false)
setShowRenewPopover(false)
}
function onRenewClick() {
setShowRenewPopover(true)
setShowVersionPopover(false)
}
const versionPopoverClass = classNames({
'popover':true,
'popover-show':showVersionPopover
})
const renewPopoverClass = classNames({
'renew-popover': true,
'renew-popover-show': showRenewPopover
})
return (
<div className="version-info" onMouseEnter={onVersionEnter} onMouseLeave={onVersionLeave}>
<div className="row-1">
<div className="version-name">{versionName}</div>
<div className="renew" onClick={onRenewClick}>去续费<span className="icon iconfont" style={{fontSize:"10px"}}>&#59291;</span>
<div className={renewPopoverClass}>
<div className="qrcode">
<img src="https://cdn.xiaomai5.com/qixueyuankehu.png" alt=""></img>
<div className="des">微信/企业微信扫码续费</div>
</div>
<div className="phone"><svg style={{position:"relative",top:"2px",marginRight:"4px"}} viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M512.651 3.78c-281.433 0-509.21 228.324-509.21 509.209 0 281.43 228.325 509.203 509.21 509.203 281.427 0 509.202-228.317 509.202-509.203 0.55-280.885-227.775-509.21-509.202-509.21z m198.205 743.553c-36.14 36.136-169.737 1.641-302.24-130.312-131.953-131.959-165.902-266.104-129.768-301.695 31.211-31.21 68.99-85.417 125.939-14.782 56.943 70.629 29.016 90.34-3.291 122.647-22.449 22.448 24.642 79.392 73.37 128.125 49.283 48.73 105.678 95.818 128.126 73.368 32.306-32.305 52.017-60.23 122.646-3.288 71.182 56.949 16.426 95.276-14.782 125.937z" p-id="4409" fill="#999999"></path></svg>
咨询电话:19157875632</div>
</div>
</div>
</div>
<div className="expiration-time">有效期至{versionInfo.validEndTime}{isExpiration ? "(已过期)" : ""}</div>
<div className={versionPopoverClass}>
<div className="title">版本信息</div>
{isExpiration ? <div className="expiration-tag">已过期</div> : ""}
<div className="content">
<div className="widget" style={{marginRight:"40px",marginBottom:"16px"}}>
<div className="lable">剩余天数</div>
<div className="lable-text">{versionInfo.surplusDayTime}</div>
</div>
<div className="widget" style={{marginBottom:"16px"}}>
<div className="lable">有效起止日期</div>
<div className="lable-text">{versionInfo.validStartTime}~{versionInfo.validEndTime}</div>
</div>
<div className="widget" style={{marginRight:"40px",marginBottom:"8px"}}>
<div className="lable">剩余人数</div>
<div className="lable-text">{versionInfo.surplusUserNum}</div>
</div>
<div className="widget" style={{marginBottom:"8px"}}>
<div className="lable" style={{display:"inline-block"}}>人数限制</div>
<Tooltip overlayStyle={{maxWidth:"587px",width:"587px"}} placement="topLeft" arrowPointAtCenter title={()=>{ return (<div><div>1、若员工/学员存在多个学院,企业人数只统计为1人;</div><div>2、若一个学员既用「企业微信」登录学习又用「微信」登录学习,企业人数将统计为2人。</div></div>)}}>
<div style={{display:"inline-block",position:"relative",top:"2px",marginLeft:"4px"}}><span><svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1026" width="14" height="14"><path d="M512 68.266667c245.111467 0 443.733333 198.656 443.733333 443.733333s-198.621867 443.733333-443.733333 443.733333C266.922667 955.733333 68.266667 757.077333 68.266667 512S266.922667 68.266667 512 68.266667z m29.320533 596.548266c0.477867-27.989333 2.4576-48.196267 5.802667-60.654933 3.413333-12.458667 8.567467-23.4496 15.633067-33.0752 6.997333-9.557333 21.9136-24.507733 44.714666-44.714667 33.928533-30.037333 56.797867-55.637333 68.437334-76.5952a139.1616 139.1616 0 0 0 17.5104-68.846933c0-43.008-16.5888-79.701333-49.800534-110.011733-33.1776-30.378667-77.6192-45.533867-133.358933-45.533867-52.6336 0-94.958933 14.1312-126.976 42.3936-31.9488 28.2624-51.268267 68.949333-57.685333 122.094933l71.8848 8.533334c6.212267-39.6288 19.3536-68.778667 39.3216-87.483734 19.933867-18.6368 44.817067-27.989333 74.6496-27.989333 30.788267 0 56.900267 10.308267 78.165333 30.9248 21.265067 20.5824 31.880533 44.544 31.880533 71.748267 0 15.018667-3.618133 28.910933-10.922666 41.608533-7.168 12.731733-22.971733 29.764267-47.240534 51.131733-24.200533 21.367467-41.028267 37.649067-50.346666 48.810667-12.6976 15.291733-21.9136 30.481067-27.613867 45.533867-7.748267 19.933867-11.639467 43.690667-11.639467 71.133866 0 4.676267 0.1024 11.707733 0.341334 21.026134h67.242666z m8.192 140.3904v-79.735466h-79.701333v79.735466h79.701333z" fill="#bfbfbf" p-id="1027"></path></svg></span></div>
</Tooltip>
<div className="lable-text">{versionInfo.userNum}</div>
</div>
</div>
</div>
</div>
)
}
function Aside(props: any) {
const {menuType,handleMenuType}= props
const ctx: any = useContext(XMContext);
const [selectKey, setSelectKey] = useState();
const [openKeys, setOpenKeys] = useState(['']);
const [topLogoUrl, setTopLogoUrl] = useState("")
const rootSubmenuKeys = _.pluck(menuList, 'groupCode');
useEffect(() => {
const link = props.location.pathname;
......@@ -31,8 +147,27 @@ function Aside(props: any) {
return item;
})
}, [props.location.pathname])
useEffect(()=> {
getTopLeftLogo()
})
function getTopLeftLogo() {
if (User.getToken()) {
StoreService.getStoreDetail({storeId:User.getStoreId()})
.then(res=> {
if (_.isEmpty(res.result.logo)) {
setTopLogoUrl("https://image.xiaomaiketang.com/xm/fe4NCjr7XF.png")
} else {
setTopLogoUrl(res.result.logo)
}
})
}
}
function toggleMenu(item: any) {
window.RCHistory.push(item.link)
if (!menuType) {
setOpenKeys([])
}
}
function onOpenChange(key: any) {
if (openKeys.includes(key)) {
......@@ -41,6 +176,16 @@ function Aside(props: any) {
setOpenKeys([key]);
}
}
function onOpenChangeForHover(key: any) {
if (menuType) {
return
}
if (openKeys.includes(key)) {
setOpenKeys([]);
} else {
setOpenKeys([key]);
}
}
function handleMenu() {
handleMenuType();
}
......@@ -54,6 +199,10 @@ function Aside(props: any) {
: "left-container left-container-vertical"
}
>
<div className="top-ctrl">
<div className="topLogo">
{ menuType && <img src={topLogoUrl} alt="" className="img1"></img> }
</div>
<div className="menu-type-icon" onClick={handleMenu}>
{menuType ? (
<span
......@@ -69,6 +218,8 @@ function Aside(props: any) {
</span>
)}
</div>
</div>
<div className="left">
<div className="nav">
......@@ -85,7 +236,7 @@ function Aside(props: any) {
return null;
}
if (item.children) {
return <SubMenu key={item.groupCode} style={{ marginTop: 0 }} className="first-menu-item" title={<div >
return <SubMenu onTitleMouseEnter={() => onOpenChangeForHover(item.groupCode)} key={item.groupCode} style={{ marginTop: 0 }} className="first-menu-item" title={<div >
{/* <span style={{ marginRight: 16 }} className="iconfont icon" dangerouslySetInnerHTML={{ __html:item.icon}}></span> */}
<img src={item.img} className="icon-img"></img>
{menuType &&
......@@ -123,7 +274,10 @@ function Aside(props: any) {
}
</Menu>
</div>
</div>
<VersionPanel />
</div>
);
}
......
......@@ -2,13 +2,13 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2021-02-01 14:12:38
* @LastEditTime: 2021-06-21 11:17:44
* @Description: 学院装修页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import React, { useEffect, useState } from "react";
import { withRouter, Switch, Route } from "react-router-dom";
import React, { useState } from "react";
import { withRouter } from "react-router-dom";
import _ from "underscore";
import { Tabs } from "antd";
import "./StoreDecorationPage.less";
......@@ -16,9 +16,6 @@ import StoreH5DecorationTab from "./StoreH5DecorationTab";
import StoreWebDecorationTab from "./StoreWebDecorationTab";
const { TabPane } = Tabs;
declare var window: any;
interface StoreDecoprationProps {
match: {
url: string;
......@@ -27,7 +24,6 @@ interface StoreDecoprationProps {
function StoreDecorationPage(props: StoreDecoprationProps) {
const [currentTab, setCurrentTab] = useState("h5");
const { match } = props;
return (
<div className="page store-decoration-page">
......@@ -36,7 +32,6 @@ function StoreDecorationPage(props: StoreDecoprationProps) {
<Tabs
onChange={(key) => {
setCurrentTab(key);
// window.RCHistory.push(`${match.url}/store-decoration/${key}`);
}}
activeKey={currentTab}
>
......
......@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2021-05-28 16:20:26
* @LastEditTime: 2021-06-21 11:16:21
* @Description: web学院banner页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -10,8 +10,7 @@
import React from "react";
import { withRouter } from "react-router-dom";
import _ from "underscore";
// import PhotoClip from 'photoclip'
import { Table, Modal, message, Button } from "antd";
import { Modal, message, Button } from "antd";
import StoreService from "@/domains/store-domain/storeService";
import {
sortableContainer,
......@@ -24,6 +23,8 @@ import User from "@/common/js/user";
import SelectPrepareFileModal from "@/modules/prepare-lesson/modal/SelectPrepareFileModal";
import "./StoreDecorationPage.less";
import Upload from "@/core/upload";
import { XMTable } from '@/components';
import college from '@/common/lottie/college';
const { confirm } = Modal;
const DragHandle = sortableHandle(() => (
......@@ -391,7 +392,11 @@ class StoreH5Decoration extends React.Component {
</Button>
</div>
<div className="box-body">
<Table
<XMTable
renderEmpty={{
image: college,
description: '暂无数据'
}}
size={"middle"}
pagination={false}
dataSource={storeDecorationlist}
......
......@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2021-05-28 16:21:04
* @LastEditTime: 2021-06-21 11:16:31
* @Description: web学院banner页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -10,8 +10,7 @@
import React from "react";
import { withRouter } from "react-router-dom";
import _ from "underscore";
// import PhotoClip from 'photoclip'
import { Table, Modal, message, Button } from "antd";
import { Modal, message, Button } from "antd";
import StoreService from "@/domains/store-domain/storeService";
import {
sortableContainer,
......@@ -24,6 +23,8 @@ import User from "@/common/js/user";
import SelectPrepareFileModal from "@/modules/prepare-lesson/modal/SelectPrepareFileModal";
import "./StoreDecorationPage.less";
import Upload from "@/core/upload";
import { XMTable } from '@/components';
import college from '@/common/lottie/college';
const { confirm } = Modal;
const DragHandle = sortableHandle(() => (
......@@ -389,7 +390,11 @@ class StoreWebDecoration extends React.Component {
</Button>
</div>
<div className="box-body">
<Table
<XMTable
renderEmpty={{
image: college,
description: '暂无数据'
}}
size={"middle"}
pagination={false}
dataSource={storeDecorationlist}
......
......@@ -2,12 +2,12 @@
* @Author: yuananting
* @Date: 2021-04-08 15:50:52
* @LastEditors: wufan
* @LastEditTime: 2021-04-24 15:55:19
* @LastEditTime: 2021-06-21 11:24:48
* @Description: 助学工具-考试-答案详情
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import React, { useState, useEffect, useRef } from 'react';
import { Route, withRouter } from 'react-router-dom';
import React, { useState, useEffect} from 'react';
import { withRouter } from 'react-router-dom';
import User from '@/common/js/user';
import Service from '@/common/js/service';
import Lottie from 'lottie-web';
......@@ -20,7 +20,6 @@ const NUM_TO_WORD_MAP = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
function AnswerDescPage(props) {
const examId = props.match.params.testId.replace(/\?.+/, '');
const paperId = window.getParameterByName('paperId');
const [customerId, setCustomerId] = useState('');
const [examDetail, setExamDetail] = useState({
examDesc: '',
examDuration: 0,
......@@ -155,68 +154,10 @@ function AnswerDescPage(props) {
setIsShowErrorPage(true);
}
function handleChangeActiveIndex(isPre) {
if (onlyError) {
if (isPre && activeOrderIndex !== errorQuestionList[0].orderIndex) {
setActiveOrderIndex(errorQuestionList[activeIndex - 1].orderIndex);
setActiveIndex(activeIndex - 1);
} else if (!isPre && activeOrderIndex !== errorQuestionList[errorCount - 1].orderIndex) {
setActiveOrderIndex(errorQuestionList[activeIndex + 1].orderIndex);
setActiveIndex(activeIndex + 1);
}
} else {
if (isPre && activeOrderIndex !== 0) {
setActiveOrderIndex(activeIndex - 1);
setActiveIndex(activeIndex - 1);
} else if (!isPre && activeOrderIndex !== questionList.length - 1) {
setActiveOrderIndex(activeIndex + 1);
setActiveIndex(activeIndex + 1);
}
}
}
function renderFooterText() {
if (onlyError && errorCount > 0) {
// 只看错题
return (
<div className='footer-btn'>
<div className='pre-next'>
<div
className={`${activeOrderIndex === (errorQuestionList.length > 0 ? errorQuestionList[0].orderIndex : 0) ? 'disabled' : ''} pre`}
onClick={() => handleChangeActiveIndex(true)}>
<span className='icon iconfont'>&#xe79c;</span>
<div className='text'>上一题</div>
</div>
<div
className={`${activeOrderIndex === (errorQuestionList.length > 0 ? errorQuestionList[errorCount - 1].orderIndex : 0) ? 'disabled' : ''} next`}
onClick={() => handleChangeActiveIndex(false)}>
<div className='text'>下一题</div>
<span className='icon iconfont'>&#xe79b;</span>
</div>
</div>
</div>
);
} else if (!onlyError) {
return (
<div className='footer-btn'>
<div className='pre-next'>
<div className={`${activeOrderIndex === 0 ? 'disabled' : ''} pre`} onClick={() => handleChangeActiveIndex(true)}>
<span className='icon iconfont'>&#xe79c;</span>
<div className='text'>上一题</div>
</div>
<div className={`${activeOrderIndex === questionList.length - 1 ? 'disabled' : ''} next`} onClick={() => handleChangeActiveIndex(false)}>
<div className='text'>下一题</div>
<span className='icon iconfont'>&#xe79b;</span>
</div>
</div>
</div>
);
}
}
function handleRenderQuestionItem() {
return _.map(questionList, (questionItem, questionIndex) => {
const { questionStemList, optionList, gapFillingAnswerList, questionAnswerDescList, questionType, score, questionId, orderIndex } = questionItem;
const { questionStemList, optionList, gapFillingAnswerList, questionType, score, questionId, orderIndex } = questionItem;
return (
<div className={`question-info-item`}>
{renderStem(questionItem, questionStemList, questionType, score, orderIndex, questionId, gapFillingAnswerList)}
......@@ -225,7 +166,6 @@ function AnswerDescPage(props) {
return renderOption(optionItem, optionIndex, questionId);
})}
{renderAnswerCompare(questionId, questionType, optionList, gapFillingAnswerList)}
{/* {renderAnswerDesc(questionAnswerDescList)} */}
</div>
);
});
......@@ -503,133 +443,6 @@ function AnswerDescPage(props) {
}
}
// 渲染答案解析
function renderAnswerDesc(questionAnswerDescList) {
const textContent = _.filter(questionAnswerDescList, (item) => {
return item.type === 'RICH_TEXT';
});
const mediaContent = _.filter(questionAnswerDescList, (item) => {
return item.type !== 'RICH_TEXT';
});
let content = textContent.length > 0 ? `${textContent[0].content}:` : '';
let textDom = (
<div
key={0}
className='text-dom'
dangerouslySetInnerHTML={{
__html: content,
}}
/>
);
return (
<div className='desc-line__item'>
{textDom}
{renderAnswerDescMedia(mediaContent)}
</div>
);
}
// 渲染答案解析的多媒体
function renderAnswerDescMedia(mediaContent) {
const pictureMediaList = _.filter(mediaContent, (mediaItem) => {
return mediaItem.type === 'PICTURE';
});
const voiceMediaList = _.filter(mediaContent, (mediaItem) => {
return mediaItem.type === 'VOICE';
});
const audioMediaList = _.filter(mediaContent, (mediaItem) => {
return mediaItem.type === 'AUDIO';
});
const videoMediaList = _.filter(mediaContent, (mediaItem) => {
return mediaItem.type === 'VIDEO';
});
return (
<div className='desc-media-container'>
{pictureMediaList.length > 0 && (
<div className='desc-picture-box'>
{_.map(pictureMediaList, (pictureItem, pictureIndex) => {
let { content } = pictureItem;
return (
<div className='picture-box' key={pictureIndex}>
<img className='img-box' src={content} onClick={() => handleScanFile('JPG', content)} />
</div>
);
})}
</div>
)}
{audioMediaList.length > 0 && (
<div className='desc-audio-box'>
{_.map(audioMediaList, (audioItem, audioIndex) => {
let { content, size } = audioItem;
return (
<div className='audio-box' key={audioIndex}>
<XMAudio
forbidParse
url={content}
getDuration={(durationSize) => {
size = durationSize;
}}
index={audioIndex}
size={size || 1000}
/>
</div>
);
})}
</div>
)}
{voiceMediaList.length > 0 && (
<div className='desc-audio-box'>
{_.map(voiceMediaList, (voiceItem, voiceIndex) => {
let { content, size } = voiceItem;
return (
<div className='audio-box' key={voiceIndex}>
<XMAudio
forbidParse
url={content}
getDuration={(durationSize) => {
size = durationSize;
}}
index={voiceIndex}
size={size || 1000}
/>
</div>
);
})}
</div>
)}
{videoMediaList.length > 0 && (
<div className='desc-video-box'>
{_.map(videoMediaList, (videoItem, videoIndex) => {
let { content } = videoItem;
return (
<div className='video-box' key={videoIndex}>
<img className='video-box_content' src={`${content}?x-oss-process=video/snapshot,t_0,m_fast`} />
<img className='video-box_btn' src='https://image.xiaomaiketang.com/xm/r5H8cYm4ch.png' onClick={() => handleScanFile('MP4', content)} />
</div>
);
})}
</div>
)}
</div>
);
}
// 答题卡展开和收起
function handleToggleQuestionCardShow() {
setIsShowQuestionCard(!isShowQuestionCard);
}
// 快速跳转题目
function handleQuickActiveQuestion(orderIndex, answerIndex) {
setActiveOrderIndex(orderIndex);
setActiveIndex(answerIndex);
setIsShowQuestionCard(false);
}
// 只选错题
function chooseErrorAnswer() {
......@@ -640,8 +453,6 @@ function AnswerDescPage(props) {
setQuestionList(!onlyError ? errorQuestionList : allQuestionList);
}
const { totalQuestionCount, userCorrectQuestion } = examDetail;
let sortedAnswerList = [];
let userAnswerMap = {};
userAnswerList.forEach((item) => {
......@@ -689,7 +500,6 @@ function AnswerDescPage(props) {
<div className='question-list-box'>{handleRenderQuestionItem()}</div>
</div>
</If>
{/* {renderFooterText()} */}
</div>
{showScanFile && (
<ScanFileModal
......
/*
* @Author: yuananting
* @Date: 2021-02-22 10:59:43
* @LastEditors: yuananting
* @LastEditTime: 2021-04-13 13:55:37
* @LastEditors: fusanqiasng
* @LastEditTime: 2021-06-15 11:20:48
* @Description: 助学工具-侧边课程分类树
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import React, { Component } from "react";
import { Input, Button, Tree } from "antd";
import "./CourseCategorySiderTree.less";
import User from "@/common/js/user";
import AidToolService from "@/domains/aid-tool-domain/AidToolService";
import Bus from "@/core/bus";
import React, { Component } from 'react';
import { Input, Button, Tree } from 'antd';
import './CourseCategorySiderTree.less';
import User from '@/common/js/user';
import AidToolService from '@/domains/aid-tool-domain/AidToolService';
import Bus from '@/core/bus';
const { Search } = Input;
const { DirectoryTree } = Tree;
......@@ -20,31 +20,25 @@ class CourseCategorySiderTree extends Component {
constructor(props) {
super(props);
this.state = {
selectedKeys: ["QUESTION_INDEX", "PAPER_INDEX"].includes(props.fromModule)
? [getParameterByName("categoryId") || "null"]
: ["null"],
selectedKeys: ['QUESTION_INDEX', 'PAPER_INDEX'].includes(props.fromModule) ? [getParameterByName('categoryId') || 'null'] : ['null'],
treeData: props.treeData || [],
autoExpandParent: false,
};
}
componentDidMount() {
this.queryCategoryTree("init");
Bus.bind("queryCategoryTree", this.queryCategoryTree);
this.queryCategoryTree('init');
Bus.bind('queryCategoryTree', this.queryCategoryTree);
}
componentWillUnmount() {
Bus.unbind("queryCategoryTree", this.queryCategoryTree);
Bus.unbind('queryCategoryTree', this.queryCategoryTree);
}
// 查询分类树
queryCategoryTree = (type = "init", categoryName) => {
queryCategoryTree = (type = 'init', categoryName) => {
let query = {
bizType: ["QUESTION_INDEX", "QUESTION_MODAL"].includes(
this.props.fromModule
)
? "QUESTION"
: "PAPER",
bizType: ['QUESTION_INDEX', 'QUESTION_MODAL'].includes(this.props.fromModule) ? 'QUESTION' : 'PAPER',
categoryName,
count: true,
source: 0,
......@@ -53,7 +47,7 @@ class CourseCategorySiderTree extends Component {
};
AidToolService.queryCategoryTree(query).then((res) => {
const { categoryList = [], noCategoryCnt = 0 } = res.result;
let str = "未分类";
let str = '未分类';
if (categoryName) {
this.setState({ autoExpandParent: true });
if (str.indexOf(categoryName) < 0) {
......@@ -64,15 +58,15 @@ class CourseCategorySiderTree extends Component {
Object.keys(this.state.treeMap).forEach((item) => {
nodeId.push(item);
});
if (type === "init") {
if (type === 'init') {
this.setState({ expandedKeys: nodeId });
}
} else {
const defaultNode = {
id: "null",
categoryName: "未分类",
id: 'null',
categoryName: '未分类',
categoryCount: noCategoryCnt,
parentId: "0",
parentId: '0',
categoryLevel: 0,
};
categoryList.unshift(defaultNode);
......@@ -83,24 +77,24 @@ class CourseCategorySiderTree extends Component {
Object.keys(this.state.treeMap).forEach((item) => {
nodeId.push(item);
});
if (type === "init") {
if (type === 'init') {
this.setState({ expandedKeys: nodeId });
}
}
} else {
this.setState({ autoExpandParent: false });
const defaultNode = {
id: "null",
categoryName: "未分类",
id: 'null',
categoryName: '未分类',
categoryCount: noCategoryCnt,
parentId: "0",
parentId: '0',
categoryLevel: 0,
};
categoryList.unshift(defaultNode);
this.setState({
treeData: this.renderTreeNodes(categoryList, categoryName),
});
if (type === "init") {
if (type === 'init') {
this.setState({ expandedKeys: [] });
}
}
......@@ -126,12 +120,12 @@ class CourseCategorySiderTree extends Component {
// 树状选中事件
onSelect = (selectedKeys) => {
this.setState({ selectedKeys }, () => {
if (this.props.fromModule === "QUESTION_INDEX") {
Bus.trigger("queryQuestionPageList", selectedKeys[0]);
} else if (this.props.fromModule === "QUESTION_MODAL") {
Bus.trigger("queryQuestionPageListWithContent", selectedKeys[0]);
if (this.props.fromModule === 'QUESTION_INDEX') {
Bus.trigger('queryQuestionPageList', selectedKeys[0]);
} else if (this.props.fromModule === 'QUESTION_MODAL') {
Bus.trigger('queryQuestionPageListWithContent', selectedKeys[0]);
} else {
Bus.trigger("queryPaperPageList", selectedKeys[0], 0);
Bus.trigger('queryPaperPageList', selectedKeys[0], 0);
}
});
};
......@@ -144,39 +138,35 @@ class CourseCategorySiderTree extends Component {
item.title =
!value || (value && item.categoryName.indexOf(value) > -1) ? (
<span>
{item.categoryName}{item.categoryCount}
{item.categoryName}
{item.categoryCount > 0 && <span>{item.categoryCount}</span>}
</span>
) : (
<span style={{ opacity: 0.5 }}>
{item.categoryName}{item.categoryCount}
{item.categoryName}
{item.categoryCount > 0 && <span>{item.categoryCount}</span>}
</span>
);
item.icon =
item.categoryName === "未分类" ? (
item.categoryName === '未分类' ? (
<img
style={{
width: "24px",
height: "24px",
opacity:
!value || (value && item.categoryName.indexOf(value) > -1)
? 1
: 0.5,
width: '24px',
height: '24px',
opacity: !value || (value && item.categoryName.indexOf(value) > -1) ? 1 : 0.5,
}}
src="https://image.xiaomaiketang.com/xm/defaultCategory.png"
alt=""
src='https://image.xiaomaiketang.com/xm/defaultCategory.png'
alt=''
/>
) : (
<img
style={{
width: "24px",
height: "24px",
opacity:
!value || (value && item.categoryName.indexOf(value) > -1)
? 1
: 0.5,
width: '24px',
height: '24px',
opacity: !value || (value && item.categoryName.indexOf(value) > -1) ? 1 : 0.5,
}}
src="https://image.xiaomaiketang.com/xm/hasCategory.png"
alt=""
src='https://image.xiaomaiketang.com/xm/hasCategory.png'
alt=''
/>
);
if (item.sonCategoryList) {
......@@ -190,46 +180,34 @@ class CourseCategorySiderTree extends Component {
};
render() {
const {
treeData,
expandedKeys,
selectedKeys,
autoExpandParent,
} = this.state;
const { treeData, expandedKeys, selectedKeys, autoExpandParent } = this.state;
return (
<div className="category-tree-sider">
{["QUESTION_INDEX", "PAPER_INDEX"].includes(this.props.fromModule) && (
<div className="sider-title">
{this.props.fromModule === "QUESTION_INDEX"
? "题目分类"
: "试卷分类"}
</div>
<div className='category-tree-sider'>
{['QUESTION_INDEX', 'PAPER_INDEX'].includes(this.props.fromModule) && (
<div className='sider-title'>{this.props.fromModule === 'QUESTION_INDEX' ? '题目分类' : '试卷分类'}</div>
)}
<Search
className="sider-search"
placeholder="搜索名称分类"
className='sider-search'
placeholder='搜索名称分类'
onSearch={(value) => {
this.queryCategoryTree("init", value);
this.queryCategoryTree('init', value);
}}
enterButton={<span className="icon iconfont">&#xe832;</span>}
enterButton={<span className='icon iconfont'>&#xe832;</span>}
/>
{["QUESTION_INDEX", "PAPER_INDEX"].includes(this.props.fromModule) &&
User.getUserRole() !== "CloudLecturer" &&
this.props.type !== "modal-select" && (
<div className="sider-btn">
<Button
onClick={() => {
window.RCHistory.push({
pathname: "/course-category-manage?from=aid",
});
}}
>
分类管理
</Button>
</div>
)}
<div className="sider-tree">
{['QUESTION_INDEX', 'PAPER_INDEX'].includes(this.props.fromModule) && User.getUserRole() !== 'CloudLecturer' && this.props.type !== 'modal-select' && (
<div className='sider-btn'>
<Button
onClick={() => {
window.RCHistory.push({
pathname: '/course-category-manage?from=aid',
});
}}>
分类管理
</Button>
</div>
)}
<div className='sider-tree'>
<DirectoryTree
expandedKeys={expandedKeys}
autoExpandParent={autoExpandParent}
......
import React from 'react';
import { Modal, Button, message } from 'antd';
import { Modal, message,Button} from 'antd';
import html2canvas from 'html2canvas';
import User from "../../../common/js/user";
import QRCode from '../../../libs/qrcode/qrcode';
......@@ -27,7 +27,6 @@ class ExamShareModal extends React.Component {
handleConvertShortUrl = () => {
const longUrl = `${LIVE_SHARE}test_detail/${this.props.data.examId}?id=${User.getStoreId()}`
console.log(longUrl)
// 发请求
Service.Sales('public/businessShow/convertShortUrls', {
urls: [longUrl]
......
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, Dropdown, Menu, Modal } from 'antd';
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 './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;
interface sortType {
type: 'ascend' | 'descend' | null | undefined;
}
......@@ -42,9 +40,7 @@ function ExaminationManager(props: any) {
type: undefined,
};
const sortEnum = {};
const { match } = props;
const sortState: any = false;
const ctx: any = useContext(XMContext);
const [query, setQuery] = useState(queryInit);
const [expandFilter, setExpandFilter] = useState(false);
......@@ -53,7 +49,6 @@ function ExaminationManager(props: any) {
const [field, setfield] = useState('');
const [order, setOrder] = useState(sortStatus.type);
const [modal, setModal] = useState(null);
const [questionCntSort, setQuestionCntSort] = useState(sortState);
const [openPreviewModal, setOpenPreviewModal] = useState(false);
const [info, setInfo] = useState({ examDuration: 0 });
const queryRef = useRef({});
......@@ -76,7 +71,6 @@ function ExaminationManager(props: any) {
const columns = [
{
title: '考试',
// fixed:fixStr.left,
width: 320,
dataIndex: 'examName',
render: (text: any, record: any) => {
......@@ -279,9 +273,6 @@ function ExaminationManager(props: any) {
function getList() {
const _query = { ...queryRef.current };
// if(_query.examCreator){
// _query.examCreator =parseInt(_query.examCreator)
// }
Service.Hades('public/hades/queryExamPageList', {
..._query,
......@@ -434,7 +425,7 @@ function ExaminationManager(props: any) {
pagination={false}
style={{ margin: '0px 0 16px' }}
renderEmpty={{
description: <span style={{ display: 'block', paddingBottom: 24 }}>暂无数据</span>
description: <span style={{ display: 'block', paddingBottom: 24 }}>暂无数据</span>,
}}></XMTable>
{total > 0 && (
<PageControl
......
......@@ -184,7 +184,7 @@ function DataAnalysic(props: any) {
onClick={() => {
checkAnswerDetail(record);
}}>
答题详情
答题详情
</div>
</When>
<Otherwise>-</Otherwise>
......
/*
* @Author: yuananting
* @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting
* @LastEditTime: 2021-06-03 17:12:01
* @LastEditors: fusanqiasng
* @LastEditTime: 2021-06-15 14:41:18
* @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 _ 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';
......@@ -36,7 +21,7 @@ import Bus from '@/core/bus';
import moment from 'moment';
import Service from '@/common/js/service';
import MoveModal from '../../modal/MoveModal';
import "./QuestionList.less";
import './QuestionList.less';
const { RangePicker } = DatePicker;
const { Search } = Input;
......@@ -686,9 +671,10 @@ class QuestionList extends Component {
onChange={this.handleChangeTable}
rowSelection={rowSelection}
renderEmpty={{
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
......@@ -702,6 +688,7 @@ 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