Commit c5250b93 by maolipeng

Merge branch 'master' into feature/zhujian/0726/qwLiving

# Conflicts:
#	src/index.tsx
#	src/modules/course-manage/components/AddLiveBasic.jsx
#	src/modules/course-manage/components/LiveCourseList.jsx
#	src/modules/course-manage/components/LiveCourseOpt.jsx
parents 14151dfe c869f06f
......@@ -72,6 +72,7 @@ function getClientEnvironment(publicUrl) {
// Useful for determining whether we’re running in production mode.
// Most importantly, it switches React into the correct mode.
NODE_ENV: process.env.NODE_ENV || 'development',
BRAND: process.env.BRAND || 'xiaomai',
DEPLOY_ENV: process.env.DEPLOY_ENV,
// Useful for resolving the correct path to static assets in `public`.
// For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
......
......@@ -93,6 +93,7 @@
"style-loader": "0.23.1",
"terser-webpack-plugin": "2.3.8",
"ts-pnp": "1.1.6",
"better-npm-run": "^0.1.0",
"typescript": "^4.0.2",
"underscore": "^1.10.2",
"url-loader": "2.3.0",
......@@ -111,12 +112,45 @@
"start:rc": "cross-env DEPLOY_ENV=rc node scripts/start.js",
"start:gray": "cross-env DEPLOY_ENV=gray node scripts/start.js",
"start:prod": "cross-env DEPLOY_ENV=prod node scripts/start.js",
"start:syoo": "better-npm-run start:syoo",
"build:dev": "cross-env DEPLOY_ENV=dev node scripts/build.js",
"build:dev1": "cross-env DEPLOY_ENV=dev node scripts/build.js",
"build:dev1": "better-npm-run build:dev1",
"build:rc": "cross-env DEPLOY_ENV=rc node scripts/build.js",
"build:gray": "cross-env DEPLOY_ENV=gray node scripts/build.js",
"build:gray-syoo": "better-npm-run build:gray-syoo",
"build:prod-syoo": "better-npm-run build:prod-syoo",
"build:prod": "cross-env DEPLOY_ENV=prod node scripts/build.js"
},
"betterScripts": {
"start:syoo": {
"command": "node scripts/start.js",
"env": {
"DEPLOY_ENV": "",
"BRAND": "syoo"
}
},
"build:gray-syoo": {
"command": "node scripts/build.js",
"env": {
"DEPLOY_ENV": "gray",
"BRAND": "syoo"
}
},
"build:prod-syoo": {
"command": "node scripts/build.js",
"env": {
"DEPLOY_ENV": "prod",
"BRAND": "syoo"
}
},
"build:dev1":{
"command": "node scripts/build.js",
"env": {
"DEPLOY_ENV": "dev1",
"BRAND": "syoo"
}
}
},
"eslintConfig": {
"extends": "react-app"
},
......@@ -146,4 +180,4 @@
"ali-oss": "^6.12.0",
"react-sortable-hoc": "^1.11.0"
}
}
}
\ No newline at end of file
......@@ -17,7 +17,7 @@
<!-- <link rel="apple-touch-icon" href="../src/common/images/logo.png" /> -->
<link rel="shortcut icon" href="https://image.xiaomaiketang.com/xm/KGSYFEpcHT.png">
<title>小麦企学院</title>
<title>扫码登陆</title>
<script type="text/javascript" charset="utf-8" src="./jquery.min.js"></script>
<style type="text/css">
......@@ -75,7 +75,7 @@
$(document).ready(function () {
var BASIC_HOST_MAP = {
dev: 'https://dev-heimdall.xiaomai5.com/',
dev1: 'https://dev1-heimdall.xiaomai5.com/',
dev1: 'https://dev-heimdall.xiaomai5.com/',
rc: 'https://rc-heimdall.xiaomai5.com/',
gray: 'https://gray-heimdall.xiaomai5.com/',
prod: 'https://gateway.xiaomai5.com/'
......@@ -104,11 +104,12 @@
const appTermEnum = getParameterByName('appTermEnum');
const code = getParameterByName('code');
const ticket = getParameterByName('ticket');
const corpType = getParameterByName('corpType') || 'X_MAI';
if (!code) {
postJSON('hades/anon/hades/getCorpTrainSuiteId', {}, (res) => {
GetJSON('hades/anon/hades/getCorpTrainSuiteId', (res) => {
const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${res.result}&redirect_uri=${encodeURIComponent(location.href)}&response_type=code&scope=snsapi_privateinfo&state=STATE#wechat_redirect`
location.href = url
})
......@@ -118,7 +119,8 @@
postJSON("hades/anon/hades/wXWorkUserTicketLogin", {
appTermEnum: appTermEnum,
code: code,
ticket: ticket
ticket: ticket,
corpType
}, (res) => {
if (res.code == 200) {
$('#success').show()
......@@ -133,7 +135,20 @@
}
function GetJSON(url, callback) {
const ajaxOptions = {
type: 'GET',
url: BASIC_HOST_MAP[env] + url+`?corpType=${corpType}`,
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
timeout: 20000,
success(res, status, xhr) {
callback(res)
},
};
$.ajax(ajaxOptions)
}
......
......@@ -8,7 +8,7 @@
*/
import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse, AxiosPromise, AxiosError } from 'axios';
import { message, Modal } from 'antd';
import { corpType } from '@/domains/brand/constants'
import { BASIC_HOST, TIME_OUT, USER_TYPE, VERSION, PROJECT } from '@/domains/basic-domain/constants';
import User from './user';
......@@ -24,12 +24,12 @@ interface FetchOptions {
requestType: string, // 请求类型 form为表单类型 json为json类型,默认json类型
reject: boolean,
}
interface HeadersType{
storeId?:any,
storeUserId?:any,
userId?:any,
xmtoken?:any,
enterpriseId?:string|null
interface HeadersType {
storeId?: any,
storeUserId?: any,
userId?: any,
xmtoken?: any,
enterpriseId?: string | null
}
class Axios {
static post(
......@@ -40,18 +40,18 @@ class Axios {
): Promise<any> {
const _url = `${url}?storeId=${User.getStoreId()}&token=${User.getToken()}&storeUserId=${User.getStoreUserId()}&userId=${User.getUserId()}`;
return new Promise((resolve, reject) => {
let headerObject:HeadersType={};
if(User.getStoreId()){
headerObject.storeId = User.getStoreId();
let headerObject: HeadersType = {};
if (User.getStoreId()) {
headerObject.storeId = User.getStoreId();
}
if(User.getStoreUserId()){
headerObject.storeUserId = User.getStoreUserId();
if (User.getStoreUserId()) {
headerObject.storeUserId = User.getStoreUserId();
}
if(User.getUserId()){
headerObject.userId = User.getUserId();
if (User.getUserId()) {
headerObject.userId = User.getUserId();
}
if(User.getToken()){
headerObject.xmtoken = User.getToken();
if (User.getToken()) {
headerObject.xmtoken = User.getToken();
}
if (User.getEnterpriseId()) {
headerObject.enterpriseId = User.getEnterpriseId();
......@@ -65,7 +65,7 @@ class Axios {
'Content-Type': options.requestType === 'form' ? 'application/x-www-form-urlencoded' : 'application/json; charset=UTF-8',
}
});
if (method !== 'GET' && options.requestType === 'form') {
instance.defaults.transformRequest = [(queryParam): string => {
let ret: string = '';
......@@ -92,8 +92,8 @@ class Axios {
const { message: ResMessage, success, resultMsg, code: resultCode } = response.data;
if (resultCode === "CROP_DEPLOY_PAST_BETTER") {
Modal.warning({
title:"服务已到期",
content: "当前企业购买的小麦企学院服务已到期,如需继续使用学院功能,请尽快续费购买",
title: "服务已到期",
content: `当前企业购买的${window.brandName}服务已到期,如需继续使用学院功能,请尽快续费购买`,
okText: "我知道了"
})
} else if (resultCode === "LIVE_START_FORBID_DEL") {
......@@ -110,24 +110,24 @@ class Axios {
return Promise.reject(response.data);
}, (error): AxiosPromise => {
const requestStatus = error.request.status
switch (requestStatus){
switch (requestStatus) {
case 401:
User.removeUserId();
User.removeToken();
window.RCHistory.replace('/login');
break;
break;
case 403:
message.error('暂无查看权限');
window.RCHistory.replace('/login');
return Promise.reject();
break;
break;
case 504:
message.error('网络状况不稳定,如果出现数据异常,请刷新页面');
Promise.reject();
break;
break;
default:
message.error(error.message);
break;
break;
}
return Promise.reject(error.message);
});
......@@ -136,7 +136,9 @@ class Axios {
if (method === 'GET') {
config = Object.assign({ params, url: `${BASIC_HOST}${_url}`, method });
} else {
config = Object.assign({ data: params, url: `${BASIC_HOST}${_url}`, method });
console.log(corpType)
config = Object.assign({ data: { corpType, ...(params || {}) }, url: `${BASIC_HOST}${_url}`, method });
console.log(config,'config')
}
instance(config).then((res: AxiosResponse): void => {
......
import React, { ReactElement } from "react";
import { Popover } from "antd";
import { TooltipPlacement } from "antd/lib/tooltip";
import { brandLogo,xfrwm } from '@/domains/brand/constants'
import { ActionType } from "rc-trigger/lib/interface";
import "./ContactWidget.less"
......@@ -8,14 +9,14 @@ interface ContactWidgetProps {
placement: TooltipPlacement
children: React.ReactElement
visible?: boolean
trigger: ActionType | ActionType[]
trigger: string | string[]
}
function Content() {
return (
<div className="contact-widget">
<div className="qrcode">
<img src="https://cdn.xiaomai5.com/qixueyuankehu.png" alt=""></img>
<img src={xfrwm} 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>
......@@ -27,7 +28,7 @@ function Content() {
export default function ContactWidget(props:ContactWidgetProps) {
return <Popover
className="contact-widget-popover"
overlayClassName="contact-widget-popover"
placement={props.placement}
arrowPointAtCenter
content={Content}
......
......@@ -7,23 +7,24 @@
* @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts
*/
import { MapInterface } from '@/domains/basic-domain/interface'
import { path, live } from '@/domains/brand/constants'
// 默认是 dev 环境
const ENV: string = process.env.DEPLOY_ENV || 'dev'
console.log('process.env.DEPLOY_ENV', process)
console.log('process.env.DEPLOY_ENV', process.env, ENV, 'hjkkkk')
const BASIC_HOST_MAP: MapInterface = {
dev: 'https://dev-heimdall.xiaomai5.com/',
dev1: 'https://dev1-heimdall.xiaomai5.com/',
dev1: 'https://dev-heimdall.xiaomai5.com/',
rc: 'https://rc-heimdall.xiaomai5.com/',
gray: 'https://gray-heimdall.xiaomai5.com/',
prod: 'https://gateway.xiaomai5.com/',
}
const PATH_MAP: MapInterface = {
dev: 'https://dev.xiaomai5.com/xiaomai-cloud-class-web/h5.html',
dev1: 'https://dev.xiaomai5.com/xiaomai-cloud-class-web/h5.html',
dev1: 'https://dev.xiaomai5.com/dev1/xiaomai-cloud-class-web/h5.html',
rc: 'https://rc.xiaomai5.com/xiaomai-cloud-class-web/h5.html',
gray: 'https://res.xiaomai0.com/xiaomai-cloud-class-web/gray/h5.html',
prod: 'https://res.xiaomai0.com/xiaomai-cloud-class-web/h5.html',
gray: path + '/gray/h5.html',
prod: path + '/h5.html',
}
export const YZ_APPId = "yozoqvpO2Hvz8346";
......
export const BRAND: any = process.env.BRAND;
const BrandNameMap: any = {
xiaomai: '小麦企学院',
syoo: '云课堂'
}
const BrandIconMap: any = {
xiaomai: 'https://image.xiaomaiketang.com/xm/bFkRBz7teA.png',
syoo: 'https://image.xiaomaiketang.com/xm/PfDseQHZtB.png'
}
const BrandLogoMap: any = {
xiaomai: 'https://image.xiaomaiketang.com/xm/6k8PPCmywG.png',
syoo: 'https://image.xiaomaiketang.com/xm/T7NRKwrfQE.png'
}
const BrandBannerMap: any = {
xiaomai: 'https://image.xiaomaiketang.com/xm/CDCcdAdaPs.png',
syoo: 'https://image.xiaomaiketang.com/xm/DzMHpX7GWF.png'
}
const PATH_MAP: any = {
xiaomai: 'https://res.xiaomai0.com/xiaomai-cloud-class-web',
syoo: 'https://study.syoo.cn/syoo-cloud-class-web',
}
const LIVE_SHARE_MAP: any = {
xiaomai: 'https://res.xiaomai0.com/store-live',
syoo: 'https://study.syoo.cn/syoo-store-live',
}
const CorpType_MAP: any = {
xiaomai: 'X_MAI',
syoo: 'S_YOU',
}
const XF_RWM_MAP: any = {
xiaomai: 'https://cdn.xiaomai5.com/qixueyuankehu.png',
syoo: 'https://image.xiaomaiketang.com/xm/Z2X2GTmKdj.png'
}
export const brandName: string = BrandNameMap[BRAND];
export const brandIcon: string = BrandIconMap[BRAND];
export const brandLogo: string = BrandLogoMap[BRAND];
export const brandBanner: string = BrandBannerMap[BRAND];
export const path: string = PATH_MAP[BRAND];
export const live: string = LIVE_SHARE_MAP[BRAND];
export const corpType: string = CorpType_MAP[BRAND];
export const xfrwm: string = XF_RWM_MAP[BRAND]
window.brandName = BrandNameMap[BRAND];
......@@ -7,6 +7,7 @@
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
import { MapInterface } from '@/domains/basic-domain/interface'
import { path, live } from '@/domains/brand/constants'
const ENV: string = process.env.DEPLOY_ENV || 'dev';
const appIdMap: MapInterface = {
......@@ -14,7 +15,7 @@ const appIdMap: MapInterface = {
dev1: 'wx3ea60e78ddfa277e',
rc: 'wx5c5a1fb71ecab7bc',
gray: "wx3dda02036493ada6", // 小麦校讯通
prod: 'wx3dda02036493ada6'
prod: 'wx3dda02036493ada6',
}
const shareUrlMap: MapInterface = {
......@@ -22,15 +23,15 @@ const shareUrlMap: MapInterface = {
'dev1': 'https://dev.xiaomai5.com/share/show?appid=',
'rc': 'https://rc.xiaomai5.com/share/show?appid=',
'prod': 'https://prod.xiaomai5.com/share/show?appid=',
'gray': 'https://prod.xiaomai5.com/share/show?appid='
'gray': 'https://prod.xiaomai5.com/share/show?appid=',
}
const LIVE_SHARE_MAP: MapInterface = {
dev: 'https://dev.xiaomai5.com/store-live/index.html#/',
dev1: 'https://dev.xiaomai5.com/store-live/index.html#/',
dev1: 'https://dev.xiaomai5.com/dev1/store-live/index.html#/',
rc: 'https://rc.xiaomai5.com/store-live/index.html#/',
gray: 'https://res.xiaomai0.com/store-live/gray/index.html#/',
prod: 'https://res.xiaomai0.com/store-live/index.html#/',
gray: live+'/gray/index.html#/',
prod: live+'/index.html#/',
}
......
......@@ -22,16 +22,17 @@
content="小麦企学院,企业培训,员工培训,企业大学,企业内训,企业外训,培训计划,培训素材,企培,企训,资料云盘,培训课程,培训任务,直播课,线上课,图文课,线下课,知识库,作业,考试,排行榜,培训类别管理,定制培训计划,管理数据,学习数据,企学院,资料共享,培训数字化,数字化培训,培训工具,在线培训,线上培训,培训saas,培训管理,企业微信培训,对客培训,客户培训,直播培训,互联网培训,新员工培训,管理培训,管理者培训,工人培训,制造业培训,餐饮培训,服务业培训,零售培训,门店培训,工厂培训,车间培训,培训补贴,人事培训,财务培训,职场培训,企业学院平台,教育企业学院,教育企业平台,教育平台学院,企业学习,酷学院,小鹅通,企业学院,云学堂,时代光华,云课堂,魔学院,云大学,米知云,授课学堂"
/>
<!-- <link rel="apple-touch-icon" href="../src/common/images/logo.png" /> -->
<link rel="shortcut icon" href="https://image.xiaomaiketang.com/xm/c4KiP2epBP.png" />
<!-- <link rel="shortcut icon" href="https://image.xiaomaiketang.com/xm/c4KiP2epBP.png" /> -->
<!-- <link rel="shortcut icon" href="https://image.xiaomaiketang.com/xm/WGWCtxiGzE.png"> -->
<!--
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="stylesheet" href="//at.alicdn.com/t/font_2223403_oe5p510553.css" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="stylesheet" href="//at.alicdn.com/t/font_2223403_oe5p510553.css" />
<!--
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
......@@ -40,7 +41,6 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>小麦企学院</title>
<script type="text/javascript" src="https://image.xiaomaiketang.com/xm/iscroll-zoom-min.js"></script>
<script type="text/javascript" src="https://image.xiaomaiketang.com/xm/hammer.min.js"></script>
<script type="text/javascript" src="https://image.xiaomaiketang.com/xm/lrz.all.bundle.js"></script>
......@@ -64,6 +64,5 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</body>
</html>
......@@ -24,12 +24,20 @@ import User from '@/common/js/user';
import Service from "@/common/js/service";
import BaseService from '@/domains/basic-domain/baseService';
import routeHook from '@/core/routeHook'
import {brandName,BRAND,brandIcon} from '@/domains/brand/constants'
declare var getParameterByName: any;
declare var window: any;
window.currentStoreUserInfo = {}
const history = createHashHistory();
document.title=brandName;
var iconUrl =brandIcon;
var linkzh = document.createElement('link');
linkzh.setAttribute('rel',"shortcut icon");
linkzh.setAttribute('href',iconUrl);
document.head.appendChild(linkzh);
window.RCHistory = _.extend({}, history, {
push: (obj: any) => {
console.log(routeHook.getCallbackNum(), 'routeHook.getCallbackNum()')
......
......@@ -166,7 +166,7 @@ function EmployeeManage() {
},
},
{
title: "身份",
title: "角色",
dataIndex: "role",
key: "role",
render: (val: string) => {
......@@ -276,7 +276,7 @@ function EmployeeManage() {
return (
<div className="page employee-manage-page">
<div className="content-header">员工管理</div>
<div className="content-header">角色管理</div>
<div className="box">
<div className="box-header">
<div
......@@ -326,7 +326,7 @@ function EmployeeManage() {
</div>
<div>
身份
角色
{_.map(roleIds, (item: any) => {
return (
<CheckBox
......
/*
* @Author: your name
* @Date: 2021-08-04 15:21:36
* @LastEditTime: 2021-08-04 15:23:37
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /xiaomai-cloud-class-web/src/modules/college-manage/LimitTip.tsx
*/
import React, { useContext, useEffect, useState } from "react";
import { Tooltip } from "antd"
import { VersionContext } from "@/store/context";
......@@ -26,7 +34,7 @@ export default function LimitTip(props:{total:number,type:string,tip:() => React
{
isOver ? (
<>
<div style={{marginLeft:"14px",display:"inline-block"}}>当前企业使用人数已达到上限 (<span style={{color:"#333333",fontWeight:"bold"}}>{limitUser}</span>人),将无法添加新员工、新学员,如需增加人数限制,请联系小麦企学院服务平台。</div>
<div style={{marginLeft:"14px",display:"inline-block"}}>当前企业使用人数已达到上限 <span style={{color:"#333333",fontWeight:"bold"}}>{limitUser}</span>人,将无法添加新员工、新学员,如需增加人数限制,请联系{window.brandName}服务平台。</div>
<ContactWidget trigger="hover" placement="bottom">
<div className="renew-text">立即续费<span className="icon iconfont" style={{fontSize:"10px"}}>&#59291;</span></div>
</ContactWidget>
......
......@@ -77,7 +77,7 @@ export default class SetEmployeeModal extends React.Component {
))}
</div>
<div className="detail-box">
<div className="title">员工身份</div>
<div className="title">员工角色</div>
<RadioGroup
value={roleCode}
onChange={(e) => {
......
import React, { useEffect, useState } from 'react'
import { TreeSelect } from 'antd'
import User from '@/common/js/user'
import Service from '@/common/js/service'
function CourseCatalogSelect(props) {
let {
showSearch = true,
value = '',
treeNodeFilterProp = 'title',
style = { width: 240 },
dropdownStyle = { maxHeight: 300, overflow: 'auto' },
placeholder = '请选择课程类型',
allowClear = true,
onChange = () => {},
} = props
let [courseCatalogList, setCourseCatalogList] = useState([])
useEffect(() => {
//获取分类列表
function getCourseCatalogList() {
Service.Hades('public/hades/queryCategoryTree', { source: 0, tenantId: User.getStoreId(), count: false, userId: User.getUserId() }).then((res) => {
const { categoryList = [] } = res.result
let list = renderTreeNodes(categoryList)
setCourseCatalogList(list)
})
}
function renderTreeNodes(list) {
let newTreeData = list.map((item) => {
item.title = item.categoryName
item.value = item.id
item.key = item.id
console.log(value, item.value, value === item.value, 'item.categoryName')
if (item.sonCategoryList) {
item.children = renderTreeNodes(item.sonCategoryList)
}
return item
})
return newTreeData
}
getCourseCatalogList()
}, [])
return (
<TreeSelect
treeNodeLabelProp='categoryName'
showSearch={showSearch}
treeNodeFilterProp={treeNodeFilterProp}
style={style}
value={value}
dropdownStyle={dropdownStyle}
treeData={courseCatalogList}
placeholder={placeholder}
allowClear={allowClear}
treeDefaultExpandAll
onChange={(value, label) => {
onChange(value, label)
}}
/>
)
}
export default CourseCatalogSelect
export { default as RangePicker } from './DateRangePicker'
export { default as CourseCatalogSelect } from './CourseCatalogSelect'
......@@ -281,7 +281,7 @@ class AddLive extends React.Component {
if (User.getExpirationTime() && moment().valueOf() > Number(User.getExpirationTime())) {
Modal.warning({
title: '服务已到期',
content: '当前企业购买的小麦企学院服务已到期,如需继续使用学院功能,请尽快续费购买',
content: `当前企业购买的${window.brandName}服务已到期,如需继续使用学院功能,请尽快续费购买`,
okText: '我知道了',
});
return;
......@@ -536,7 +536,7 @@ class AddLive extends React.Component {
<Breadcrumbs navList={type == 'add' ? '新建直播课' : '编辑直播课'} goBack={this.handleGoBack} />
<div className='box'>
<div className='show-tips'>
<ShowTips message='请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企学院保有依据国家规定及平台规则进行处理的权利' />
<ShowTips message={`请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,${window.brandName}保有依据国家规定及平台规则进行处理的权利`} />
</div>
<div className='add-live-page__form'>
<div className='basic-info__wrap'>
......
......@@ -6,25 +6,21 @@
* @Description: 新建/编辑直播课-基本信息
*/
import React from 'react';
import { Input, Button, message, Cascader, Modal } from 'antd';
import UploadOss from '@/core/upload';
import { ImgCutModalNew } from '@/components';
import StoreService from '@/domains/store-domain/storeService';
import SelectPrepareFileModal from '@/modules/prepare-lesson/modal/SelectPrepareFileModal';
import Upload from '@/core/upload';
import Cropper from 'react-cropper';
import React from 'react'
import { Input, Button, message, Cascader } from 'antd'
import { CourseCatalogSelect } from '@/modules/common'
import StoreService from '@/domains/store-domain/storeService'
import SelectPrepareFileModal from '@/modules/prepare-lesson/modal/SelectPrepareFileModal'
import Upload from '@/core/upload'
import ImgClipModal from '@/components/ImgClipModal'
import 'cropperjs/dist/cropper.css';
import './AddLiveBasic.less';
import 'cropperjs/dist/cropper.css'
import './AddLiveBasic.less'
const defaultCover = 'https://image.xiaomaiketang.com/xm/Yip2YtFDwH.png';
const fieldNames = { label: 'categoryName', value: 'id', children: 'sonCategoryList' };
let cutFlag = false;
let timer = null;
const defaultCover = 'https://image.xiaomaiketang.com/xm/Yip2YtFDwH.png'
const fieldNames = { label: 'categoryName', value: 'id', children: 'sonCategoryList' }
class AddLiveBasic extends React.Component {
constructor(props) {
super(props);
super(props)
this.state = {
imageFile: null,
showCutModal: false,
......@@ -39,57 +35,44 @@ class AddLiveBasic extends React.Component {
componentWillUnmount() {}
componentDidMount() {
this.getCourseCatalogList();
this.getCourseCatalogList()
}
getCourseCatalogList = () => {
StoreService.getCourseCatalogList({ current: 1, size: 1000 }).then((res) => {
this.setState({
courseCatalogList: res.result.records,
});
});
})
})
}
// 使用默认封面图
handleResetCoverUrl = () => {
const {
data: { coverUrl },
} = this.props;
const isDefaultCover = coverUrl === defaultCover;
} = this.props
const isDefaultCover = coverUrl === defaultCover
// 如果已经是默认图的话,不做任何任何处理
if (isDefaultCover) return;
message.success('已替换为默认图');
this.props.onChange('coverUrl', defaultCover);
if (isDefaultCover) return
message.success('已替换为默认图')
this.props.onChange('coverUrl', defaultCover)
setTimeout(() => {
this.props.onChange('coverId', null);
}, 1000);
};
this.props.onChange('coverId', null)
}, 1000)
}
handleChangeCatalogList = (value) => {
this.props.onChange('categoryId', value)
}
catalogChange = (value) => {
const changeValueLength = value.length;
switch (changeValueLength) {
case 1:
this.props.onChange('categoryId', value[0]);
break;
case 2:
this.props.onChange('categoryId', value[1]);
break;
default:
this.props.onChange('categoryId', null);
break;
}
};
handleSelectCover = (file) => {
this.setState({
visible: true,
imageFile:file
});
imageFile: file,
})
}
//获取resourceId
getSignature = (blob, fileName) => {
const { choosedBannerId } = this.state;
getSignature = (blob) => {
Upload.uploadBlobToOSS(blob, 'cover' + new Date().valueOf(), null, 'signInfo').then((signInfo) => {
this.setState(
{
......@@ -98,26 +81,25 @@ class AddLiveBasic extends React.Component {
visible: false,
},
() => this.updateCover()
);
});
};
updateCover = () =>{
const {coverClicpPath,coverId} = this.state
)
})
}
updateCover = () => {
const { coverClicpPath, coverId } = this.state
this.setState({
showSelectFileModal: false,
});
this.props.onChange('coverUrl', coverClicpPath);
})
this.props.onChange('coverUrl', coverClicpPath)
setTimeout(() => {
this.props.onChange('coverId', coverId);
}, 1000);
};
this.props.onChange('coverId', coverId)
}, 1000)
}
render() {
const { showCutModal, imageFile, courseCatalogList, showSelectFileModal, visible, cutImageBlob, hasImgReady } = this.state;
const { data, pageType, isEdit } = this.props;
const { courseName, categoryName, coverUrl } = data;
const fileName = '';
const { imageFile, showSelectFileModal, visible } = this.state
const { data } = this.props
const { courseName, coverUrl, categoryId } = data
// 当前是否使用的是默认图片
const isDefaultCover = coverUrl === defaultCover;
const isDefaultCover = coverUrl === defaultCover
return (
<div className='add-live__basic-info'>
<div className='course-name'>
......@@ -131,7 +113,7 @@ class AddLiveBasic extends React.Component {
maxLength={this.state.courseNameLimit}
style={{ width: 240 }}
onChange={(e) => {
this.props.onChange('courseName', e.target.value);
this.props.onChange('courseName', e.target.value)
}}
/>
</div>
......@@ -151,7 +133,7 @@ class AddLiveBasic extends React.Component {
onClick={() => {
this.setState({
showSelectFileModal: true,
});
})
}}>
上传图片
</Button>
......@@ -165,45 +147,16 @@ class AddLiveBasic extends React.Component {
<span className='label'>
<span className='require'>*</span>课程分类:
</span>
{pageType === 'add' && (
<div style={_.find(this.props.exItems,(item)=>{return item === "categoryId"})?{border:"1px solid red",display:"inline-block"}:{display:"inline-block"}}>
<Cascader
options={courseCatalogList}
displayRender={(label) => label.join('-')}
fieldNames={fieldNames}
onChange={this.catalogChange}
style={{ width: 240 }}
placeholder='请选择课程分类'
suffixIcon={
<span className='icon iconfont' style={{ fontSize: '12px', color: '#BFBFBF' }}>
&#xe835;
</span>
}
/>
</div>
)}
{pageType === 'edit' && categoryName && (
<div style={_.find(this.props.exItems,(item)=>{return item === "categoryId"})?{border:"1px solid red",display:"inline-block"}:{display:"inline-block"}}>
<Cascader
disabled={!isEdit ? true : false}
defaultValue={[categoryName]}
options={courseCatalogList}
displayRender={(label) => label.join('-')}
fieldNames={fieldNames}
onChange={this.catalogChange}
style={{ width: 240 }}
placeholder='请选择课程分类'
suffixIcon={
<span className='icon iconfont' style={{ fontSize: '12px', color: '#BFBFBF' }}>
&#xe835;
</span>
}
/>
</div>
)}
<div style={_.find(this.props.exItems,(item)=>{return item === "categoryId"})?{border:"1px solid red",display:"inline-block"}:{display:"inline-block"}}>
<CourseCatalogSelect
value={categoryId}
onChange={(value, label) => {
this.handleChangeCatalogList(value, label)
}}
/>
</div>
</div>
{showSelectFileModal &&
{showSelectFileModal && (
<SelectPrepareFileModal
key='basic'
operateType='select'
......@@ -213,17 +166,24 @@ class AddLiveBasic extends React.Component {
tooltip='支持文件类型:jpg、jpeg、png'
isOpen={showSelectFileModal}
onClose={() => {
this.setState({ showSelectFileModal: false });
this.setState({ showSelectFileModal: false })
}}
onSelect={this.handleSelectCover}
/>
}
{ visible &&
<ImgClipModal visible={visible} imgUrl={imageFile.ossUrl} onConfirm={this.getSignature} onClose={()=>{this.setState({ visible: false });}}/>
}
)}
{visible && (
<ImgClipModal
visible={visible}
imgUrl={imageFile.ossUrl}
onConfirm={this.getSignature}
onClose={() => {
this.setState({ visible: false })
}}
/>
)}
</div>
);
)
}
}
export default AddLiveBasic;
export default AddLiveBasic
......@@ -106,7 +106,7 @@ class LiveCourseFilter extends React.Component {
delete query.endTime
} else {
query.startTime = dates[0]?.startOf('day').valueOf()
query.endTime = dates[0]?.endOf('day').valueOf()
query.endTime = dates[1]?.endOf('day').valueOf()
}
this.setState(
{
......
......@@ -63,22 +63,24 @@ class LiveCourseOpt extends React.Component {
// 下载直播客户端
handleDownloadClient = () => {
const { isMac } = this.state;
const BRAND = process.env.BRAND;
// 判断学员系统
let platform;
if(!isMac){
if (!isMac) {
platform = 1
} else {
platform = 4
}
BaseService
.getLastedVersion({ model: 5, platform})
.then((res) => {
const a = document.createElement("a");
document.body.appendChild(a);
a.href = res.result.releaseUrl;
a.click();
document.body.removeChild(a);
})
.getLastedVersion({ model: 5, platform })
.then((res) => {
const a = document.createElement("a");
document.body.appendChild(a);
a.href = res.result.releaseUrl;
a.click();
document.body.removeChild(a);
})
}
render() {
const userRole = User.getUserRole();
......@@ -87,7 +89,7 @@ class LiveCourseOpt extends React.Component {
<div className="live-course-opt">
<LiveModeSelect onClose={this.onModeSelectClose} onSelected={this.onModeSelected} isShow={this.state.showModeSelect}/>
<div className="opt__left">
{ userRole !== "CloudLecturer" &&
{userRole !== "CloudLecturer" &&
<Button type="primary" onClick={this.handleCreateLiveCouese}>新建直播课</Button>
}
{/* <Button type="primary" onClick={this.handleCreateQWCouese}>新建企微直播课</Button> */}
......
......@@ -98,7 +98,7 @@ class GraphicsCourseFilter extends React.Component {
delete query.endTime
} else {
query.beginTime = dates[0]?.startOf('day').valueOf()
query.endTime = dates[0]?.endOf('day').valueOf()
query.endTime = dates[1]?.endOf('day').valueOf()
}
this.setState(
{
......
......@@ -6,66 +6,54 @@
* @LastEditTime: 2020-12-22 20:30:54
*/
import React from 'react'
import { Modal, Button, Table } from "antd";
import "./AccountChargeModal";
import { Modal, Button, Table } from 'antd'
import './AccountChargeModal'
const data = [
{ person: "上台人数1v1", price: "3元/人/小时" },
{ person: "上台人数1v2", price: "3元/人/小时" },
{ person: "上台人数1v3", price: "3元/人/小时" },
{ person: "上台人数1v4", price: "3元/人/小时" },
{ person: "上台人数1v5", price: "3元/人/小时" },
{ person: "上台人数1v6", price: "3元/人/小时" },
{ person: "上台人数1v7", price: "4元/人/小时" },
{ person: "上台人数1v8", price: "4元/人/小时" },
{ person: "上台人数1v9", price: "8元/人/小时" },
{ person: "上台人数1v10", price: "8元/人/小时" },
{ person: "上台人数1v11", price: "8元/人/小时" },
{ person: "上台人数1v12", price: "8元/人/小时" },
];
{ person: '上台人数1v1', price: '3元/人/小时' },
{ person: '上台人数1v2', price: '3元/人/小时' },
{ person: '上台人数1v3', price: '3元/人/小时' },
{ person: '上台人数1v4', price: '3元/人/小时' },
{ person: '上台人数1v5', price: '3元/人/小时' },
{ person: '上台人数1v6', price: '3元/人/小时' },
{ person: '上台人数1v7', price: '4元/人/小时' },
{ person: '上台人数1v8', price: '4元/人/小时' },
{ person: '上台人数1v9', price: '8元/人/小时' },
{ person: '上台人数1v10', price: '8元/人/小时' },
{ person: '上台人数1v11', price: '8元/人/小时' },
{ person: '上台人数1v12', price: '8元/人/小时' },
]
function ChargeExplainModal(props) {
return (
<Modal
title="计费说明"
title='计费说明'
visible={true}
className="charge-explain-modal"
className='charge-explain-modal'
width={880}
maskClosable={false}
closeIcon={<span className="icon iconfont modal-close-icon">&#xe6ef;</span>}
closeIcon={<span className='icon iconfont modal-close-icon'>&#xe6ef;</span>}
onCancel={() => {
props.close();
props.close()
}}
footer={[
<Button
type="primary"
type='primary'
onClick={() => {
props.close();
}}
>
props.close()
}}>
关闭
</Button>,
]}
>
]}>
<div>
<div className="explain-title">1)直播课时费</div>
<p className="main-explain-block">
每节课上课费用 = 上台人数单价 × 有效出勤学生和老师人数 × 排课时长
</p>
<div className='explain-title'>1)直播课时费</div>
<p className='main-explain-block'>每节课上课费用 = 上台人数单价 × 有效出勤学生和老师人数 × 排课时长</p>
<ul>
<li>
1. 上课老师、学生和助教在教室中的累计时长满10分钟即为有效出勤;
</li>
<li>
2.
排课时长指创建课节设置的课节时长,最小计费单位为0.5小时,不足0.5小时按0.5小时计算;
</li>
<li>
3.
上台人数单价:以排课时设定的上台人数上限为准,不同直播教室类型的课时单价不同。
</li>
<li>1. 上课老师、学生和助教在教室中的累计时长满10分钟即为有效出勤;</li>
<li>2. 排课时长指创建课节设置的课节时长,最小计费单位为0.5小时,不足0.5小时按0.5小时计算;</li>
<li>3. 上台人数单价:以排课时设定的上台人数上限为准,不同直播教室类型的课时单价不同。</li>
</ul>
<p className="main-explain-text" style={{marginTop: 16,marginBottom: 8}}>
<p className='main-explain-text' style={{ marginTop: 16, marginBottom: 8 }}>
温馨提醒:上台人数1vN,1为授课老师,N为同时与老师视频互动学生数;直播课时费将在老师下课后立即结算。
</p>
<table style={{ width: 333 }}>
......@@ -82,47 +70,43 @@ function ChargeExplainModal(props) {
<td>{item.person}</td>
<td>{item.price}</td>
</tr>
);
)
})}
</tbody>
</table>
<p className="main-explain-text">
<p className='main-explain-text'>
示例:王老师排了一节45分钟的课程,选择的直播教室类型为5人上台,安排了1位助教、12位学生。那么,排课时长45分钟记为1小时;全员累计在线时长≥10min,老师+助教+学生共计1+1+12=14人;课时单价3元/人/小时。所以,此节课的直播课时费=1x14x3=42元
</p>
<div className="explain-title mt16">2)录制费</div>
<p className="main-explain-block">录制费 = 录课单价 × 回放视频时长</p>
<div className='explain-title mt16'>2)录制费</div>
<p className='main-explain-block'>录制费 = 录课单价 × 回放视频时长</p>
<ul>
<li>1. 结算时间:从回放视频生成后立即结算</li>
<li> 2. 回放视频时长:0.5h起收,不足0.5h的按0.5h结算</li>
<li> 3. 单价:2元/小时</li>
</ul>
<p className="main-explain-text">
示例:生成了49分26秒的回放视频,不足1h按1h计算,总费用=1(h)*2元/h=2元
</p>
<div className="explain-title mt16">3)流量费</div>
<p className="main-explain-block">
观看回放视频流量费 = 流量单价 × 回放流量
</p>
<p className="main-explain-text">
<p className='main-explain-text'>示例:生成了49分26秒的回放视频,不足1h按1h计算,总费用=1(h)*2元/h=2元</p>
<div className='explain-title mt16'>3)流量费</div>
<p className='main-explain-block'>观看回放视频流量费 = 流量单价 × 回放流量</p>
<p className='main-explain-text'>
目前收费报价:0元(限时免费)
<br /> 若后续变更收费,将提前30日通告收费方式及价格标准
</p>
<div className="explain-title mt16">4)存储费</div>
<p className="main-explain-block">存储实际扣费 = 存储单价 × 存储文件大小</p>
<p className="main-explain-text">
<div className='explain-title mt16'>4)存储费</div>
<p className='main-explain-block'>存储实际扣费 = 存储单价 × 存储文件大小</p>
<p className='main-explain-text'>
目前收费报价:0元(限时免费)
<br />
若后续变更收费,将提前30日通告收费方式及价格标准
</p>
<div className="explain-title mt16">5)其他说明</div>
<div className="main-explain-text">
余额不足时将限制使用创建直播课、老师和学生进入直播间、老师和学生观看回放视频、在资料云盘或直播间上传文件等功能,请注意及时充值。(余额<300元时将发送短信提醒,请注意查看。)
<div className='explain-title mt16'>5)其他说明</div>
<div className='main-explain-text'>
余额不足时将限制使用创建直播课、老师和学生进入直播间、老师和学生观看回放视频、在素材库或直播间上传文件等功能,请注意及时充值。(余额<300元时将发送短信提醒,请注意查看。)
</div>
</div>
</Modal>
);
)
}
export default ChargeExplainModal;
export default ChargeExplainModal
......@@ -136,10 +136,10 @@ class OfflineCourseFilter extends React.Component {
<Row type='flex' justify='space-between' align='top'>
<div className='search-condition'>
<div className='search-condition__item'>
<span className='search-name'>线下名称:</span>
<span className='search-name'>线下活动名称:</span>
<Search
value={courseName}
placeholder='搜索线下名称'
placeholder='搜索线下活动名称'
onChange={(e) => {
this.handleChangeQuery('courseName', e.target.value)
}}
......
.video-course-filter {
position: relative;
.video-list-table{
.video-list-table {
// tr:nth-child(even){
// background: transparent !important;
// }
// tr:nth-child(odd){
// td{
......@@ -24,13 +23,14 @@
margin-bottom: 12px;
align-items: center;
display: flex;
.search-name{
.search-name {
width: 114px;
vertical-align: middle;
}
.shelf-status{
width:84px;
display:inline-block;
text-align:right;
.shelf-status {
width: 84px;
display: inline-block;
text-align: right;
}
}
}
......@@ -49,7 +49,7 @@
line-height: 20px;
.fold-icon {
font-size: 12px;
margin-left:4px;
margin-left: 4px;
}
}
}
......
......@@ -6,23 +6,23 @@
* @Description: 线上课-操作模块
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
import React from 'react';
import { Button } from 'antd';
import './OfflineCourseOpt.less';
import React from 'react'
import { Button } from 'antd'
export default function OfflineCourseOpt() {
import './OfflineCourseOpt.less'
export default function OfflineCourseOpt() {
return (
<div className="video-course-opt">
<div className='video-course-opt'>
<Button
type="primary"
type='primary'
onClick={() => {
RCHistory.push('/create-offline-course?type=add');
RCHistory.push('/create-offline-course?type=add')
}}
className="mr12"
>新建线下课</Button>
className='mr12'>
新建线下活动
</Button>
</div>
);
)
}
import React from 'react';
import React from 'react'
import OfflineCourseFilter from './components/OfflineCourseFilter';
import OfflineCourseOpt from './components/OfflineCourseOpt';
import OfflineCourseList from './components/OfflineCourseList';
import Service from '@/common/js/service';
import OfflineCourseFilter from './components/OfflineCourseFilter'
import OfflineCourseOpt from './components/OfflineCourseOpt'
import OfflineCourseList from './components/OfflineCourseList'
import Service from '@/common/js/service'
import User from '@/common/js/user'
class OfflineCoursePage extends React.Component {
constructor(props) {
super(props);
super(props)
this.state = {
query: {
size: 10,
current: 1,
storeId:User.getStoreId()
storeId: User.getStoreId(),
},
dataSource: [], // 线下课列表
totalCount: 0, // 线下课数据总条数
dataSource: [], // 线下课列表
totalCount: 0, // 线下课数据总条数
}
}
componentWillMount() {
// 获取线下课列表
this.handleFetchScheduleList();
this.handleFetchScheduleList()
}
// 获取线下课列表
handleFetchScheduleList = (_query = {}) => {
const query = {
...this.state.query,
..._query
};
..._query,
}
// 更新请求参数
this.setState({ query });
this.setState({ query })
Service.Hades('public/hades/getOfflineCoursePage', query).then((res) => {
const { result = {} } = res || {};
const { records = [], total = 0 } = result;
const { result = {} } = res || {}
const { records = [], total = 0 } = result
this.setState({
dataSource: records,
totalCount: Number(total)
});
totalCount: Number(total),
})
})
}
render() {
const { dataSource, totalCount, query } = this.state;
const { dataSource, totalCount, query } = this.state
return (
<div className="page video-course-page">
<div className="content-header">线下课</div>
<div className='page video-course-page'>
<div className='content-header'>线下活动</div>
<div className="box">
<div className='box'>
{/* 搜索模块 */}
<OfflineCourseFilter
onChange={this.handleFetchScheduleList}
/>
<OfflineCourseFilter onChange={this.handleFetchScheduleList} />
{/* 操作模块 */}
{window.ctx.xmState.storeUserPermissionList.includes('AddOfflineClass') && <OfflineCourseOpt />}
{/* 线下课列表模块 */}
<OfflineCourseList
query={query}
dataSource={dataSource}
totalCount={totalCount}
onChange={this.handleFetchScheduleList}
/>
<OfflineCourseList query={query} dataSource={dataSource} totalCount={totalCount} onChange={this.handleFetchScheduleList} />
</div>
</div>
)
}
}
export default OfflineCoursePage;
export default OfflineCoursePage
......@@ -7,59 +7,59 @@ import moment from "moment";
export default function HomeTip() {
const [isOverNum, setIsOverNum] = useState<boolean>(false)
const [tipType, setTipType] = useState(0) //0不显示1即将过期2已过期
const [expirationTime, setExpirationTime] = useState("")
const [surplusDay, setSurplusDay] = useState(0)
const versionInfo = useContext(VersionContext)
useEffect(()=> {
if (versionInfo) {
setIsOverNum(versionInfo.userNum === -1 ? false : versionInfo.whetherReachUserNum)
setSurplusDay(versionInfo.surplusDayTime)
setExpirationTime(versionInfo.validEndTime)
if (versionInfo.stateEnum === "NO") {
setTipType(2)
} else if (versionInfo.surplusDayTime === 30 || versionInfo.surplusDayTime <= 7) {
setTipType(1)
}
const [isOverNum, setIsOverNum] = useState<boolean>(false)
const [tipType, setTipType] = useState(0) //0不显示1即将过期2已过期
const [expirationTime, setExpirationTime] = useState("")
const [surplusDay, setSurplusDay] = useState(0)
const versionInfo = useContext(VersionContext)
useEffect(() => {
if (versionInfo) {
setIsOverNum(versionInfo.userNum === -1 ? false : versionInfo.whetherReachUserNum)
setSurplusDay(versionInfo.surplusDayTime)
setExpirationTime(versionInfo.validEndTime)
if (versionInfo.stateEnum === "NO") {
setTipType(2)
} else if (versionInfo.surplusDayTime === 30 || versionInfo.surplusDayTime <= 7) {
setTipType(1)
}
},[versionInfo])
return (
<div className="home-tip">
{
(isOverNum || tipType !== 0) &&
}
}, [versionInfo])
return (
<div className="home-tip">
{
(isOverNum || tipType !== 0) &&
<div className="tip">
<Carousel dotPosition="left" dots={false} autoplay={true} autoplaySpeed={5000}>
{
isOverNum && (
<div className="content">
<span className="icon iconfont" style={{color:"#FF4F4F",marginRight:"8px"}}>&#xe61d;</span>温馨提示:企业使用人数已达上限,将无法新增员工、学员,如需增加人数限制,请联系小麦企学院服务平台。
<ContactWidget placement="bottom" trigger="hover"><div className="renew-btn">立即续费</div></ContactWidget>
<span className="icon iconfont" style={{ color: "#FF4F4F", marginRight: "8px" }}>&#xe61d;</span>{`温馨提示:企业使用人数已达上限,将无法新增员工、学员,如需增加人数限制,请联系${window.brandName}服务平台。`}
<ContactWidget placement="bottom" trigger="hover"><div className="renew-btn">立即续费</div></ContactWidget>
</div>
)
}
{
tipType === 2 && (
<div className="content">
<span className="icon iconfont" style={{color:"#FF4F4F",marginRight:"8px"}}>&#xe61d;</span>版本到期提醒:当前企业购买的小麦企学院服务已于{moment(versionInfo?.validEndTimeST).format("YYYY-MM-DD HH:mm:ss")}到期,到期后仍可访问,但功能不可使用,建议尽快续费购买哦~
<ContactWidget placement="bottom" trigger="hover"><div className="renew-btn">立即续费</div></ContactWidget>
<span className="icon iconfont" style={{ color: "#FF4F4F", marginRight: "8px" }}>&#xe61d;</span>版本到期提醒:当前企业购买的{`${window.brandName}`}服务已于{moment(versionInfo?.validEndTimeST).format("YYYY-MM-DD HH:mm:ss")}到期,到期后仍可访问,但功能不可使用,建议尽快续费购买哦~
<ContactWidget placement="bottom" trigger="hover"><div className="renew-btn">立即续费</div></ContactWidget>
</div>
)
}
{
tipType === 1 && (
<div className="content">
<span className="icon iconfont" style={{color:"#FF4F4F",marginRight:"8px"}}>&#xe61d;</span>当前企业购买的小麦企学院服务仅剩{surplusDay}天(于{expirationTime}到期),为了不影响使用,建议尽快续费购买哦~
<ContactWidget placement="bottom" trigger="hover"><div className="renew-btn">立即续费</div></ContactWidget>
<span className="icon iconfont" style={{ color: "#FF4F4F", marginRight: "8px" }}>&#xe61d;</span>当前企业购买的{`${window.brandName}`}服务仅剩{surplusDay}天(于{expirationTime}到期),为了不影响使用,建议尽快续费购买哦~
<ContactWidget placement="bottom" trigger="hover"><div className="renew-btn">立即续费</div></ContactWidget>
</div>
)
}
</Carousel>
</div>
}
}
</div>
)
}
\ No newline at end of file
)
}
\ No newline at end of file
......@@ -22,7 +22,6 @@ import "./KnowledgeBaseList.less";
const DEFAULT_SIZE_UNIT = 1000 * 1000 // 将B转换成M
const { confirm } = Modal
const ENV = process.env.DEPLOY_ENV || "dev"
class KnowledgeBaseList extends React.Component {
constructor(props) {
......
......@@ -19,7 +19,6 @@ import "./LiveList.less";
import CourseService from "@/domains/course-domain/CourseService";
import User from "@/common/js/user";
const ENV = process.env.DEPLOY_ENV || "dev";
class VideoList extends React.Component {
constructor(props) {
......
......@@ -281,7 +281,7 @@ function AddPlan() {
<Breadcrumbs navList={type == 'add' ? '新建培训计划' : '编辑培训计划'} goBack={handleGoBack} />
<div className='box'>
<div className='show-tips'>
<ShowTips message='请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企学院保有依据国家规定及平台规则进行处理的权利' />
<ShowTips message={`请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,${window.brandName}保有依据国家规定及平台规则进行处理的权利`} />
</div>
<div className='add-plan-page__form'>
<div className='basic-info__wrap'>
......
/*
* @Author: 吴文洁
* @Date: 2020-06-09 09:47:21
* @Author: 吴文洁
* @Date: 2020-06-09 09:47:21
* @Last Modified by: 吴文洁
* @Last Modified time: 2020-06-23 14:54:14
* @Description: 网络磁盘(我的文件、公共文件、员工文件)
*/
import React from 'react';
import React from 'react'
import { DISK_MAP } from "@/common/constants/academic/lessonEnum";
import { DISK_MAP } from '@/common/constants/academic/lessonEnum'
function DiskList(props) {
const { diskList, currentRootDisk } = props;
const { diskList, currentRootDisk } = props
return (
<div className="disk-list__wrap">
<div className="disk-list">
{
diskList.map((item) => {
<div className='disk-list__wrap'>
<div className='disk-list'>
{diskList.map((item) => {
const isActive = item.disk === currentRootDisk.disk
const isActive = item.disk === currentRootDisk.disk;
return (
<div
key={item.disk}
className={`item ${isActive ? 'active' : ''}`}
onClick={() => { props.onChange(item)}}
>
{
item.disk === 'MYSELF' &&
<span className="icon iconfont">&#xe7a5;</span>
}
{
item.disk === 'COMMON' &&
<span className="icon iconfont">&#xe79d;</span>
}
{
item.disk === 'EMPLOYEE' &&
<span className="icon iconfont">&#xe7a3;</span>
}
<span className="disk-name">{ item.folderName }</span>
</div>
)
})
}
return (
<div
key={item.disk}
className={`item ${isActive ? 'active' : ''}`}
onClick={() => {
props.onChange(item)
}}>
{item.disk === 'MYSELF' && <span className='icon iconfont'>&#xe7a5;</span>}
{item.disk === 'COMMON' && <span className='icon iconfont'>&#xe79d;</span>}
{item.disk === 'EMPLOYEE' && <span className='icon iconfont'>&#xe7a3;</span>}
<span className='disk-name'>{item.folderName}</span>
</div>
)
})}
</div>
<a
className="guide-href"
<a
className='guide-href'
href={window.NewVersion ? 'https://mp.weixin.qq.com/s/s0XN0Gk4Xul192SmTd6znw' : 'https://mp.weixin.qq.com/s/2EMWaaa3LQwkJd59bmy8pA'}
target="_blank"
>
进一步了解资料云盘
target='_blank'>
进一步了解素材库
</a>
</div>
)
};
}
export default DiskList;
\ No newline at end of file
export default DiskList
import React from 'react';
import { withRouter } from 'react-router-dom';
import { Modal, Button } from 'antd';
import React from 'react'
import { withRouter } from 'react-router-dom'
import { Modal, Button } from 'antd'
import User from '@/common/js/user';
import User from '@/common/js/user'
import FolderManage from './components/FolderManage';
import DiskList from './components/DiskList';
import { DISK_MAP } from "@/common/constants/academic/lessonEnum";
import FolderManage from './components/FolderManage'
import DiskList from './components/DiskList'
import { DISK_MAP } from '@/common/constants/academic/lessonEnum'
import './index.less';
import './index.less'
const { teacherId, gmtCreate } = window.currentUserInstInfo;
const { teacherId, gmtCreate } = window.currentUserInstInfo
// 判断是否是5.0或4.0T端
const isTeacher = !!teacherId;
const isTeacher = !!teacherId
// 判断是新用户还是老用户(gmtCreate小于上线日期的话就是老用户)
const onlineDate = +new Date('2020-07-17 00:00:00');
const isOldUser = gmtCreate <= onlineDate;
const onlineDate = +new Date('2020-07-17 00:00:00')
const isOldUser = gmtCreate <= onlineDate
const defaultRootDisk = {
folderName: '我的文件',
disk: 'MYSELF',
uploadPower: false
uploadPower: false,
}
class PrepareLessonPage extends React.Component {
constructor(props) {
super(props);
const prepareLessonTips = localStorage.getItem('prepare_lesson_tips');
super(props)
const prepareLessonTips = localStorage.getItem('prepare_lesson_tips')
this.state = {
prepareLessonTips,
diskList: [], // 可见磁盘目录
currentRootDisk: defaultRootDisk
diskList: [], // 可见磁盘目录
currentRootDisk: defaultRootDisk,
}
}
componentWillMount() {
this.handleFetchDiskList();
this.handleFetchDiskList()
}
handleFetchDiskList = async () => {
const res = await axios.Apollo('public/apollo/getUserDisk', {});
const { result = [] } = res;
const res = await axios.Apollo('public/apollo/getUserDisk', {})
const { result = [] } = res
const diskList = result.map((item) => {
return {
...item,
folderName: DISK_MAP[item.disk]
folderName: DISK_MAP[item.disk],
}
});
})
this.setState({
diskList,
currentRootDisk: diskList[0] || defaultRootDisk
});
currentRootDisk: diskList[0] || defaultRootDisk,
})
}
handleChangeDisk = (disk) => {
this.setState({
currentRootDisk: disk
});
currentRootDisk: disk,
})
}
render() {
const { currentRootDisk, prepareLessonTips, diskList } = this.state;
const { currentRootDisk, prepareLessonTips, diskList } = this.state
return (
<div className="prepare-lesson-page page">
<div className="content-header">资料云盘</div>
<div className="box content-body">
<DiskList
diskList={diskList}
currentRootDisk={currentRootDisk}
onChange={this.handleChangeDisk}
/>
<FolderManage
currentRootDisk={currentRootDisk}
/>
<div className='prepare-lesson-page page'>
<div className='content-header'>素材库</div>
<div className='box content-body'>
<DiskList diskList={diskList} currentRootDisk={currentRootDisk} onChange={this.handleChangeDisk} />
<FolderManage currentRootDisk={currentRootDisk} />
</div>
{/* 老用户显示弹窗提示 */}
<Modal
title="备课本改版"
title='备课本改版'
visible={!prepareLessonTips && isOldUser}
footer={null}
width={680}
maskClosable={false}
closeIcon={<span className="icon iconfont modal-close-icon">&#xe6ef;</span>}
className="prepare-lesson-upgrade-modal"
closeIcon={<span className='icon iconfont modal-close-icon'>&#xe6ef;</span>}
className='prepare-lesson-upgrade-modal'
onCancel={() => {
this.setState({
prepareLessonTips: true
prepareLessonTips: true,
})
}}
>
<div className="title">“备课本” 升级为 “资料云盘” 了!</div>
<div className="upgrade-list">
<div className="upgrade-list__item">
<img src="https://xiaomai-image.oss-cn-hangzhou.aliyuncs.com/1594780611301.png" alt=""/>
<div className="item-title">存储更便捷</div>
<div className="item-sub-title">讲次关联模式升级文件夹模式,存储不再受讲次限制</div>
}}>
<div className='title'>“备课本” 升级为 “素材库” 了!</div>
<div className='upgrade-list'>
<div className='upgrade-list__item'>
<img src='https://xiaomai-image.oss-cn-hangzhou.aliyuncs.com/1594780611301.png' alt='' />
<div className='item-title'>存储更便捷</div>
<div className='item-sub-title'>讲次关联模式升级文件夹模式,存储不再受讲次限制</div>
</div>
<div className="upgrade-list__item">
<img src="https://xiaomai-image.oss-cn-hangzhou.aliyuncs.com/1594780629259.png" alt=""/>
<div className="item-title">结构更清晰</div>
<div className="item-sub-title">新增“我的文件”“公共文件”“员工文件”,满足机构存储需求</div>
<div className='upgrade-list__item'>
<img src='https://xiaomai-image.oss-cn-hangzhou.aliyuncs.com/1594780629259.png' alt='' />
<div className='item-title'>结构更清晰</div>
<div className='item-sub-title'>新增“我的文件”“公共文件”“员工文件”,满足机构存储需求</div>
</div>
<div className="upgrade-list__item">
<img src="https://xiaomai-image.oss-cn-hangzhou.aliyuncs.com/1594780641665.png" alt=""/>
<div className="item-title">同步更方便</div>
<div className="item-sub-title">支持主管直接查看员工文件,优质资料一目了然</div>
<div className='upgrade-list__item'>
<img src='https://xiaomai-image.oss-cn-hangzhou.aliyuncs.com/1594780641665.png' alt='' />
<div className='item-title'>同步更方便</div>
<div className='item-sub-title'>支持主管直接查看员工文件,优质资料一目了然</div>
</div>
</div>
<div
className="footer"
className='footer'
onClick={() => {
this.setState({ prepareLessonTips: true });
localStorage.setItem('prepare_lesson_tips', true);
}}
>我知道了</div>
this.setState({ prepareLessonTips: true })
localStorage.setItem('prepare_lesson_tips', true)
}}>
我知道了
</div>
</Modal>
</div>
)
}
}
export default PrepareLessonPage;
\ No newline at end of file
export default PrepareLessonPage
import React from 'react';
import Service from '@/common/js/service';
import { DISK_MAP } from '@/domains/resource-disk/constants';
import FolderManage from './components/FolderManage';
import DiskList from './components/DiskList';
import './index.less';
import React from 'react'
import Service from '@/common/js/service'
import { DISK_MAP } from '@/domains/resource-disk/constants'
import FolderManage from './components/FolderManage'
import DiskList from './components/DiskList'
import './index.less'
const defaultRootDisk = {
folderName: '公共文件',
disk: 'COMMON',
uploadPower: true
uploadPower: true,
}
class PrepareLessonPage extends React.Component {
constructor(props) {
super(props);
super(props)
this.state = {
// 目前只有公共文件,先由前端定义
diskList: [
{
folderName: '公共文件',
disk: 'COMMON',
uploadPower: true
}
], // 可见磁盘目录
currentRootDisk: defaultRootDisk
uploadPower: true,
},
], // 可见磁盘目录
currentRootDisk: defaultRootDisk,
}
}
handleChangeDisk = (disk) => {
this.setState({
currentRootDisk: disk
});
currentRootDisk: disk,
})
}
render() {
const { currentRootDisk, diskList } = this.state;
console.log('currentRootDisk',currentRootDisk);
const { currentRootDisk, diskList } = this.state
console.log('currentRootDisk', currentRootDisk)
return (
<div className="prepare-lesson-page page">
<div className="content-header">资料云盘</div>
<div className="box content-body">
<DiskList
diskList={diskList}
currentRootDisk={currentRootDisk}
onChange={this.handleChangeDisk}
/>
<FolderManage
currentRootDisk={currentRootDisk}
/>
<div className='prepare-lesson-page page'>
<div className='content-header'>素材库</div>
<div className='box content-body'>
<DiskList diskList={diskList} currentRootDisk={currentRootDisk} onChange={this.handleChangeDisk} />
<FolderManage currentRootDisk={currentRootDisk} />
</div>
</div>
)
}
}
export default PrepareLessonPage;
\ No newline at end of file
export default PrepareLessonPage
......@@ -34,7 +34,7 @@ class ScanFileModal extends React.Component {
style={{ width: 632, objectFit: "cover" }}
/>
)}
{fileType === "VIDEO" && (
{(fileType ==="VIDEO" || fileType === "MP4") && (
<div>
<Player
src={item.mediaUrl || item.ossAddress || item.ossUrl}
......
......@@ -6,6 +6,7 @@ import BaseService from "@/domains/basic-domain/baseService";
import User from "@/common/js/user";
import Breadcrumbs from "@/components/Breadcrumbs";
import ImgClipModal from '@/components/ImgClipModal'
import { brandLogo } from '@/domains/brand/constants'
import './CreateCollege.less';
let cutFlag = false;
......@@ -16,7 +17,7 @@ export default class CreateCollege extends React.Component {
super(props);
this.state = {
avatar: 'https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png',
logo: 'https://image.xiaomaiketang.com/xm/fe4NCjr7XF.png',
logo: brandLogo,
name: '',
enterpriseId: User.getEnterpriseId(),
imageFile: null, // 需要被截取的图片
......@@ -111,7 +112,7 @@ export default class CreateCollege extends React.Component {
<div className="college-manage-page">
<div className="college-header">
<div className="box">
<img className="box-image" src="https://image.xiaomaiketang.com/xm/fe4NCjr7XF.png" />
<img className="box-image" src={brandLogo} />
</div>
</div>
<div className="breadcrumb-wrap">
......@@ -134,7 +135,7 @@ export default class CreateCollege extends React.Component {
className="icon iconfont"
onClick={() => {
this.setState({
logo: 'https://image.xiaomaiketang.com/xm/fe4NCjr7XF.png',
logo: brandLogo,
visible: false,
})
}}
......
......@@ -154,7 +154,7 @@ function Header(props) {
});
}}>
<span className='menu-before iconfont icon'>&#xe84e;</span>
<span>进入管理后台</span>
<span>多学院管理面板</span>
<span className='menu-after iconfont icon'>&#xe79b;</span>
</div>
)}
......@@ -337,7 +337,7 @@ function Header(props) {
<div
className='url-link'
onClick={() => {
window.open(`${LIVE_SHARE}store/index?id=${window.currentStoreUserInfo.storeId||User.getStoreId()}&userId=${window.currentStoreUserInfo.userId||User.getUserId()}&enterpriseId=${window.currentStoreUserInfo.enterpriseId||User.getEnterpriseId()}&from=admin&avatar=${avatar}`);
window.open(`${LIVE_SHARE}store/index?id=${window.currentStoreUserInfo.storeId || User.getStoreId()}&userId=${window.currentStoreUserInfo.userId || User.getUserId()}&enterpriseId=${window.currentStoreUserInfo.enterpriseId || User.getEnterpriseId()}&from=admin&avatar=${avatar}`);
}}>
{'立即前往 >'}
</div>
......@@ -355,12 +355,15 @@ function Header(props) {
<span className='text'>分享学院</span>
</span>
</div>
<div className='help'>
<a href={helpCenterUrl} target='_blank' className='help-btn'>
<span className='icon iconfont tool-tip-right'>&#xe8ed;</span>
<span className='text'>帮助中心</span>
</a>
</div>
{
process.env.BRAND == 'xiaomai' && <div className='help'>
<a href={helpCenterUrl} target='_blank' className='help-btn'>
<span className='icon iconfont tool-tip-right'>&#xe8ed;</span>
<span className='text'>帮助中心</span>
</a>
</div>
}
</div>
<Dropdown overlay={userMenu()} arrow>
<div className='user'>
......
......@@ -9,7 +9,7 @@ import BaseService from '@/domains/basic-domain/baseService';
import axios from 'axios';
import storage from '@/common/js/storage';
import _ from 'underscore';
import user from '@/common/js/user';
import {brandLogo,brandBanner} from '@/domains/brand/constants'
const { TabPane } = Tabs;
function Login(props) {
......@@ -156,12 +156,12 @@ function Login(props) {
return (
<div className='login-page'>
<div className='logo-img-box'>
<img src='https://image.xiaomaiketang.com/xm/6k8PPCmywG.png' className='logo-img' />
<img src={brandLogo} className='logo-img' />
</div>
<div className='login-main'>
<div className='left-banner'>
<div className='img-box'>
<img src='https://image.xiaomaiketang.com/xm/CDCcdAdaPs.png' alt='' />
<img src={brandBanner} alt='' />
</div>
</div>
<div className='login-box'>
......
......@@ -12,6 +12,7 @@ import classNames from 'classnames';
import User from "@/common/js/user"
import _ from 'underscore';
import tBus from '@/core/tbus'
import { brandLogo } from '@/domains/brand/constants'
import "./Menu.less";
import { display } from 'html2canvas/dist/types/css/property-descriptors/display';
import ContactWidget from '@/components/ContactWidget';
......@@ -158,7 +159,7 @@ function Aside(props: any) {
if (User.getToken()) {
StoreService.getStoreDetail({ storeId: User.getStoreId() }).then((res) => {
if (_.isEmpty(res.result.logo)) {
setTopLogoUrl('https://image.xiaomaiketang.com/xm/fe4NCjr7XF.png');
setTopLogoUrl(brandLogo);
} else {
setTopLogoUrl(res.result.logo);
}
......
......@@ -3,8 +3,9 @@ import Service from "@/common/js/service";
import User from '@/common/js/user';
import qrcode from "@/libs/qrcode/qrcode.js";
import { PATH } from '@/domains/basic-domain/constants';
import { corpType } from '@/domains/brand/constants'
import './WechatLogin.less';
const Logo = require('@/common/images/logo.png');
import { brandName, BRAND, brandIcon, brandLogo } from '@/domains/brand/constants'
declare var location: any;
declare var window: any;
......@@ -28,13 +29,13 @@ export default function WechatLogin(props: any) {
if (status === 0) {
Service.Hades('anon/hades/getTicket', {}).then((res: any) => {
setTicket(res.result);
const redirect = `${PATH}?ticket=${res.result}&appTermEnum=XIAOMAI_CLOUD_CLASS_PC_WEB_ADMIN&env=${process.env.DEPLOY_ENV || 'dev'}`;
const redirect = `${PATH}?ticket=${res.result}&appTermEnum=XIAOMAI_CLOUD_CLASS_PC_WEB_ADMIN&env=${process.env.DEPLOY_ENV || 'dev'}&corpType=${corpType}`;
const qrcodeWrapDom: any = document.querySelector('#qrcode');
let qrnode = new qrcode({
text: redirect,
correctLevel: 2,
size: 180,
image: 'https://image.xiaomaiketang.com/xm/bFkRBz7teA.png',
image: brandIcon,
imageSize: 50,
});
qrcodeWrapDom.innerHTML = '';
......
......@@ -273,7 +273,7 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
</Form.Item>
)}
<Form.Item
label="员工身份"
label="员工角色"
name="role"
rules={[{ required: false }]}
style={{marginBottom:'-2px !important'}}
......
......@@ -251,7 +251,7 @@ function EmployeesManagePage() {
function handleDeleteWorkWechatEmployeeConfirm(record: RecordTypes) {
return confirm({
title: "你确定要删除此员工吗?",
content: "管理员需在企业微信后台的“小麦企学院”应用管理中移除此员工,此员工才无法继续登陆小麦企学院",
content:`管理员需在企业微信后台的“${window.brandName}”应用管理中移除此员工,此员工才无法继续登陆${window.brandName}`,
icon: (
<span className="icon iconfont default-confirm-icon">&#xe839; </span>
),
......@@ -300,7 +300,7 @@ function EmployeesManagePage() {
return (
<div className=" page employee-manage-page">
<div className="content-header">员工管理</div>
<div className="content-header">角色管理</div>
<div className="box">
<div className="box-header">
<div
......
.store-decoration-page {
.box {
padding-top:11px!important;
padding-top: 11px !important;
}
thead {
display: none;
......@@ -27,11 +27,11 @@
}
.banner-thumbnail {
width: 230px;
height: 79px;
height: 96px;
}
.web-banner-thumbnail {
width: 389px;
height: 67px;
height: 162px;
}
.index-num {
......@@ -51,18 +51,17 @@
.operation {
.edit {
color: #2966FF;
color: #2966ff;
cursor: pointer;
}
.divider-line {
color:#BFBFBF
color: #bfbfbf;
}
.delete {
color: #2966FF;
color: #2966ff;
cursor: pointer;
}
}
}
.clip-box {
display: flex;
......@@ -86,7 +85,7 @@
.preview-url {
width: 500px;
height: 73px;
background: #E6E6E6;
background: #e6e6e6;
}
#preview-url-box {
......@@ -112,11 +111,11 @@
}
.banner-thumbnail {
width: 230px;
height: 79px;
height: 96px;
}
.web-banner-thumbnail {
width: 389px;
height: 67px;
height: 162px;
}
.index-num {
height: 33px;
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-23 18:28:50
* @LastEditors: wufan
* @LastEditTime: 2021-06-24 13:39:30
* @LastEditTime: 2021-07-23 15:02:34
* @Description: 助学工具-课程分类
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......
......@@ -31,7 +31,7 @@
height: 44px;
padding: 0;
span {
line-height: 44px;
line-height: 47px;
vertical-align: middle;
}
.ant-tree-node-content-wrapper.ant-tree-node-selected {
......@@ -45,10 +45,10 @@
*.node-title-div {
width: 100%;
display: flex;
justify-content: space-between;
.title-opts {
visibility: hidden;
margin-right: 16px;
margin-left: 24px;
margin-bottom: 4px;
}
}
}
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-22 10:59:43
* @LastEditors: yuananting
* @LastEditTime: 2021-07-13 11:54:21
* @LastEditTime: 2021-07-27 13:37:07
* @Description: 助学工具-侧边课程分类树
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -184,7 +184,7 @@ class CourseCategorySiderTree extends Component {
return (
<div className='category-tree-sider'>
{['QUESTION_INDEX', 'PAPER_INDEX'].includes(this.props.fromModule) && (
{this.props.type !== 'modal-select' && (
<div className='sider-title'>{this.props.fromModule === 'QUESTION_INDEX' ? '题目分类' : '试卷分类'}</div>
)}
<Search
......@@ -195,7 +195,7 @@ class CourseCategorySiderTree extends Component {
}}
enterButton={<span className='icon iconfont'>&#xe832;</span>}
/>
{['QUESTION_INDEX', 'PAPER_INDEX'].includes(this.props.fromModule) && User.getUserRole() !== 'CloudLecturer' && this.props.type !== 'modal-select' && (
{['QUESTION_INDEX', 'PAPER'].includes(this.props.fromModule) && User.getUserRole() !== 'CloudLecturer' && this.props.type !== 'modal-select' && (
<div className='sider-btn'>
<Button
onClick={() => {
......@@ -207,7 +207,7 @@ class CourseCategorySiderTree extends Component {
</Button>
</div>
)}
<div className='sider-tree'>
<div className={`sider-tree ${this.props.type === 'modal-select' ? 'modal-sider-tree' : 'page-sider-tree'}`}>
<DirectoryTree
expandedKeys={expandedKeys}
autoExpandParent={autoExpandParent}
......
......@@ -16,15 +16,21 @@
margin-bottom: 16px;
}
.modal-sider-tree {
height: calc(60vh - 61px);
}
.page-sider-tree {
height: calc(100vh - 300px);
}
.sider-tree {
width: 244px;
overflow: scroll;
height: calc(100vh - 300px);
.empty-tree-tip {
text-align: center;
margin-top: 100%;
.empty-tree-btn {
color: #2966FF;
color: #2966ff;
cursor: pointer;
}
}
......@@ -44,7 +50,7 @@
white-space: nowrap;
}
.ant-tree-node-content-wrapper.ant-tree-node-selected {
color: #2966FF;
color: #2966ff;
}
}
.ant-tree-treenode-selected:hover::before,
......
......@@ -8,8 +8,8 @@
.xm-audio {
display: flex;
align-items: center;
width: 280px;
padding: 10px 20px;
width: 315px;
padding: 10px 0 10px 20px;
border-radius: 5px;
background-color: #ffffff;
.audio-image {
......
......@@ -84,7 +84,7 @@ function AddExam(props: any) {
tenantId: User.getStoreId(),
source: 0,
}
Service.Hades('public/hades/queryExamPageList', param).then(res=> {
Service.Hades('public/hades/queryExamPageList', param).then(res => {
const { result = {} } = res;
setExamList(result.records || [])
})
......@@ -155,7 +155,7 @@ function AddExam(props: any) {
return
}
if(checkExist(param.examName)) {
if (checkExist(param.examName)) {
message.warning('此考试名称已存在');
return
}
......@@ -275,14 +275,14 @@ function AddExam(props: any) {
// 校验考试名称是否存在
function checkExist(examName: any) {
var result:any = null;
examList.length > 0 && examList.forEach((item:any) => {
var result: any = null;
examList.length > 0 && examList.forEach((item: any) => {
if (result != null) {
return result;
}
if (props.type === 'edit') {
if (item.examName === examName && item.examId !== match.params.id) {
result = item;
result = item;
}
} else {
if (item.examName === examName) {
......@@ -314,9 +314,9 @@ function AddExam(props: any) {
<Breadcrumbs navList={title} goBack={handleGoBack} />
<div className="box">
<div className="show-tips">
<ShowTips message="请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企学院保有依据国家规定及平台规则进行处理的权利" />
</div> <div className="form">
<div className="show-tips">
<ShowTips message={`请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,${window.brandName}保有依据国家规定及平台规则进行处理的权利`} />
</div> <div className="form">
<div className="title">基本信息</div>
<Form
labelCol={{ span: 3 }}
......@@ -324,7 +324,7 @@ function AddExam(props: any) {
layout="horizontal"
>
<Form.Item label="考试名称"
validateStatus={(check && (!examName || (examName.length > 40 || checkExist(examName)) )) ? 'error' : ''}
validateStatus={(check && (!examName || (examName.length > 40 || checkExist(examName)))) ? 'error' : ''}
help={check && (!examName ? '请输入考试名称' : (examName.length > 40 ? '考试名称最多40字' : (checkExist(examName) && '此考试名称已存在')))}
required>
......@@ -458,7 +458,7 @@ function AddExam(props: any) {
onChange={(val) => { setNeedPhone(val ? 'NEED_PHONE_VERIFY' : 'DO_NOT_NEED_PHONE_VERIFY') }}
></Switch>
<div style={{ position: 'relative', left: 8, color: "#999" }}>
{needPhone == 'NEED_PHONE_VERIFY' ? '已开启,学员需绑定手机号才可参与考试' : '已关闭,学员无需绑定手机号即可参与考试'}
{needPhone == 'NEED_PHONE_VERIFY' ? '已开启,学员需绑定手机号才可参与考试' : '已关闭,学员无需绑定手机号即可参与考试'}
</div>
</div>
</Form.Item>
......@@ -470,7 +470,7 @@ function AddExam(props: any) {
onChange={(val) => { setNeedOptionDisorder(val ? 'OPTION_RANDOM' : 'OPTION_SORT') }}
></Switch>
<div style={{ position: 'relative', left: 8, color: "#999" }}>
{needOptionDisorder == 'OPTION_RANDOM' ? '已开启,选项随机排序' : '已关闭,选项按设置顺序排序'}
{needOptionDisorder == 'OPTION_RANDOM' ? '已开启,选项随机排序' : '已关闭,选项按设置顺序排序'}
</div>
</div>
......
/*
* @Author: yuananting
* @Date: 2021-06-16 10:14:37
* @LastEditors: yuananting
* @LastEditTime: 2021-07-27 14:04:03
* @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import React, { useState, useRef, useEffect, useContext } from 'react'
import { message, Modal } from 'antd';
import { withRouter } from 'react-router-dom';
......@@ -12,14 +20,14 @@ function SelectPaperModal(props: any) {
useEffect(() => {
itemRef.current = item
console.log(item, 'khjkhjkhjk')
}, [item])
return <Modal
maskClosable={false}
width={900}
width={1080}
title="选择试卷"
visible={true}
centered={true}
onOk={() => {
props.onSelect(itemRef.current);
props.close();
......@@ -27,9 +35,7 @@ function SelectPaperModal(props: any) {
}
onCancel={() => { props.close() }}
>
<div style={{ maxHeight: 500 }}>
<PaperContent paperId={item.paperId} onSelect={(item: any) => { setItem(item) }} type='modal-select'></PaperContent>
</div>
<PaperContent paperId={item.paperId} onSelect={(item: any) => { setItem(item) }} type='modal-select'></PaperContent>
</Modal >
}
......
......@@ -18,4 +18,8 @@
background: #fafafa;
}
}
.ant-table-wrapper {
max-height: calc(100vh - 280px);
overflow: scroll;
}
}
......@@ -800,7 +800,7 @@ class OperatePaper extends Component {
<Spin spinning={loading}>
<div className='box'>
<div className='show-tips'>
<ShowTips message='请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企学院保有依据国家规定及平台规则进行处理的权利' />
<ShowTips message={`请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,${window.brandName}保有依据国家规定及平台规则进行处理的权利`} />
</div>
<Form ref={this.formRef} style={{ marginTop: 24 }}>
<Form.Item
......
......@@ -7,7 +7,8 @@
.table-style {
border: 1px solid #f0f0f0 !important;
margin-bottom: 70px;
max-height: calc(~'100vh - 465px');
max-height: calc(~'100vh - 437px');
min-height: 323px;
overflow: scroll;
}
.ant-tabs {
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-03-27 14:55:14
* @LastEditors: yuananting
* @LastEditTime: 2021-04-07 10:25:44
* @LastEditTime: 2021-07-27 13:33:51
* @Description: 助学工具-试卷主页面
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -19,14 +19,14 @@ class PaperContent extends Component {
render() {
return (
<div className={this.props.type == "modal-select"? "paper-content-page paper-content-modal":"paper-content-page"} >
<div className="paper-content-page" >
<div
style={{ borderRight: "0.5px solid #EEEEEE", paddingRight: "4px" }}
>
<div className="sider" >
<CourseCategorySiderTree
type={this.props.type}
fromModule="PAPER_INDEX"
fromModule="PAPER"
/>
</div>
</div>
......
.paper-content-page {
display: flex;
&.paper-content-modal{
max-height: 500px;
.sider,.content{
max-height: 100%;
overflow: auto;
}
.content{
height: auto;
overflow: auto;
}
}
.sider {
min-width: 244px;
}
.content {
width: 100%;
margin-left: 24px;
height: calc(100vh - 160px);
.modal-paper-list {
.ant-table-wrapper {
overflow: scroll;
height: calc(60vh - 109px);
border: 1px solid #e8e8e8;
}
}
.page-paper-list {
height: calc(100vh - 260px);
overflow: scroll;
}
.ant-table-column-sorters {
padding: 0;
}
.ant-table-tbody > tr > td {
border: none;
}
}
}
\ No newline at end of file
}
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting
* @LastEditTime: 2021-07-13 15:16:52
* @LastEditTime: 2021-07-27 13:59:01
* @Description: 助学工具-题库-试卷列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -616,7 +616,7 @@ class PaperList extends Component {
</div>
)}
<div className="paper-list-content">
<div className={`paper-list-content ${this.props.type == "modal-select" ? "modal-paper-list" : "page-paper-list"}`}>
{this.props.type !== "modal-select" ? (
<XMTable
rowKey={(record) => record.paperId}
......@@ -642,7 +642,6 @@ class PaperList extends Component {
rowSelection={rowSelection}
columns={this.parseColumns()}
pagination={false}
bordered
renderEmpty={{
image: college,
description: <span style={{ display: 'block', paddingBottom: 24 }}>还没有试卷</span>
......@@ -656,7 +655,6 @@ class PaperList extends Component {
current={current - 1}
pageSize={size}
total={total}
size={this.props.type == "modal-select" ? "small" : "middle"}
toPage={(page) => {
const _query = { ...query, current: page + 1 };
this.setState({ query: _query }, () =>
......
......@@ -2,6 +2,7 @@
.select-box {
display: flex;
align-items: center;
margin-bottom: 12px;
.select-container {
margin-right: 24px;
.con {
......@@ -74,9 +75,6 @@
}
.paper-list-content {
position: relative;
margin-top: 12px;
height: calc(100vh - 260px);
overflow: scroll;
.empty-list-tip {
color: #2966ff;
cursor: pointer;
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting
* @LastEditTime: 2021-05-30 18:17:05
* @LastEditTime: 2021-07-27 14:00:12
* @Description: 助学工具-新建试卷-选择题目列表
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -420,19 +420,18 @@ class SelectQuestionList extends Component {
)}
</div>
<div className="select-question-content">
<XMTable
renderEmpty={{
image: college,
description: '还没有题目'
}}
rowSelection={rowSelection}
rowKey={(record) => record.id}
dataSource={dataSource}
columns={this.parseColumns()}
pagination={false}
onChange={this.handleChangeTable}
bordered
/>
<XMTable
renderEmpty={{
image: college,
description: '还没有题目'
}}
rowSelection={rowSelection}
rowKey={(record) => record.id}
dataSource={dataSource}
columns={this.parseColumns()}
pagination={false}
onChange={this.handleChangeTable}
/>
<div className="box-footer">
<PageControl
current={current - 1}
......
......@@ -101,7 +101,6 @@
.voice-box {
margin-bottom: 12px;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.1);
padding: 10px 20px;
width: 320px;
}
}
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-03-29 10:52:26
* @LastEditors: yuananting
* @LastEditTime: 2021-06-07 14:45:02
* @LastEditTime: 2021-07-27 13:53:14
* @Description: 助学工具-试卷-新建选择题目弹窗
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -40,6 +40,7 @@ class SelectQuestionModal extends Component {
title="选择题目"
visible={true}
width={1080}
centered={true}
onOk={() => {
this.props.setSelectedQuestion(
this.listRef.current.state.selectQuestionKeys.map((item, index) => {
......@@ -60,15 +61,15 @@ class SelectQuestionModal extends Component {
}}
onCancel={this.props.close}
>
<div className="box content-body" style={{maxHeight:500}}>
<div className="box content-body">
<div
style={{ borderRight: "0.5px solid #EEEEEE", paddingRight: "4px",overflowY:'auto',overflowX:'hidden'}}
style={{ borderRight: "0.5px solid #EEEEEE", paddingRight: "4px" }}
>
<div className="sider">
<CourseCategorySiderTree fromModule="QUESTION_MODAL" />
<CourseCategorySiderTree fromModule="QUESTION_MODAL" type="modal-select" />
</div>
</div>
<div className="content" style={{height:'auto',overflowY:'auto'}}>
<div className="content">
<SelectQuestionList ref={this.listRef} />
</div>
</div>
......
.select-question-modal {
.content-body {
display: flex;
height: calc(~'100% - 48px');
.sider {
min-width: 244px;
}
.content {
width: 100%;
margin-left: 24px;
height: calc(100vh - 160px);
.select-question-list {
.select-question-content {
.ant-table-wrapper {
overflow: scroll;
height: calc(60vh - 159px);
border: 1px solid #E8E8E8;
}
}
}
}
}
.ant-table-column-sorters {
padding: 0;
}
}
.select-question-modal.ant-modal {
max-height: 70% !important;
.ant-table-tbody > tr > td {
border: none;
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-21 17:51:01
* @LastEditors: yuananting
* @LastEditTime: 2021-04-07 10:45:07
* @LastEditTime: 2021-07-27 13:11:51
* @Description: 助学工具-题库
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -26,7 +26,7 @@ class QuestionIndex extends Component {
style={{ borderRight: "0.5px solid #EEEEEE", paddingRight: "4px" }}
>
<div className="sider">
<CourseCategorySiderTree fromModule="QUESTION_INDEX" />
<CourseCategorySiderTree fromModule="QUESTION_INDEX" type="" />
</div>
</div>
<div className="content">
......
......@@ -303,7 +303,7 @@ class OperateQuestion extends Component {
/>
<div className="box">
<div className="show-tips">
<ShowTips message="请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企学院保有依据国家规定及平台规则进行处理的权利" />
<ShowTips message={`请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,${window.brandName}保有依据国家规定及平台规则进行处理的权利`} />
</div>
<Tabs
style={{ marginTop: 32 }}
......
......@@ -314,7 +314,6 @@
.audio-box {
position: relative;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.1);
padding: 10px 20px;
width: 320px;
margin-bottom: 12px;
.icon_sider {
......
......@@ -53,7 +53,7 @@ class BatchImportQuestionModal extends Component {
if (User.getExpirationTime() && moment().valueOf() > Number(User.getExpirationTime())) {
Modal.warning({
title:"服务已到期",
content: "当前企业购买的小麦企学院服务已到期,如需继续使用学院功能,请尽快续费购买",
content: `当前企业购买的${window.brandName}服务已到期,如需继续使用学院功能,请尽快续费购买`,
okText: "我知道了"
})
return
......
......@@ -68,7 +68,6 @@
.voice-box {
margin-bottom: 12px;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.1);
padding: 10px 20px;
width: 320px;
}
}
......@@ -144,7 +143,6 @@
.voice-box {
margin-bottom: 12px;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.1);
padding: 10px 20px;
width: 320px;
}
}
......@@ -248,7 +246,6 @@
margin-bottom: 16px;
.audio-box {
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.1);
padding: 10px 20px;
width: 320px;
margin-bottom: 12px;
}
......
......@@ -5,37 +5,37 @@
* @LastEditTime: 2021-05-13 16:39:51
* @Description: 内容线路由配置
*/
import Home from '@/modules/home/Home';
import EmployeesManagePage from '@/modules/store-manage/EmployeesManagePage';
import EmployeeManage from '@/modules/college-manage/EmployeeManage';
import personalInfoPage from '@/modules/personalInfo';
import UserManagePage from '@/modules/store-manage/UserManagePage';
import UserManage from '@/modules/college-manage/UserManagePage';
import StoreDecorationPage from '@/modules/store-manage/StoreDecorationPage';
import CourseCatalogPage from '@/modules/store-manage/CourseCatalogPage';
import LiveCoursePage from '@/modules/course-manage/LiveCoursePage';
import AddLivePage from '@/modules/course-manage/AddLive';
import VideoCoursePage from '@/modules/course-manage/video-course';
import GraphicsCoursePage from '@/modules/course-manage/graphics-course';
import OfflineCoursePage from '@/modules/course-manage/offline-course';
import AddVideoCoursePage from '@/modules/course-manage/video-course/AddVideoCourse';
import AddGraphicsCoursePage from '@/modules/course-manage/graphics-course/AddGraphicsCourse';
import AddOfflineCoursePage from '@/modules/course-manage/offline-course/AddOfflineCourse';
import Home from '@/modules/home/Home'
import EmployeesManagePage from '@/modules/store-manage/EmployeesManagePage'
import EmployeeManage from '@/modules/college-manage/EmployeeManage'
import personalInfoPage from '@/modules/personalInfo'
import UserManagePage from '@/modules/store-manage/UserManagePage'
import UserManage from '@/modules/college-manage/UserManagePage'
import StoreDecorationPage from '@/modules/store-manage/StoreDecorationPage'
import CourseCatalogPage from '@/modules/store-manage/CourseCatalogPage'
import LiveCoursePage from '@/modules/course-manage/LiveCoursePage'
import AddLivePage from '@/modules/course-manage/AddLive'
import VideoCoursePage from '@/modules/course-manage/video-course'
import GraphicsCoursePage from '@/modules/course-manage/graphics-course'
import OfflineCoursePage from '@/modules/course-manage/offline-course'
import AddVideoCoursePage from '@/modules/course-manage/video-course/AddVideoCourse'
import AddGraphicsCoursePage from '@/modules/course-manage/graphics-course/AddGraphicsCourse'
import AddOfflineCoursePage from '@/modules/course-manage/offline-course/AddOfflineCourse'
// import DataList from '@/modules/course-manage/DataList/DataList';
// import ClassBook from '@/modules/resource-disk';
import ResourceDisk from '@/modules/resource-disk';
import SwitchRoute from '@/modules/root/SwitchRoute';
import PlanPage from '@/modules/plan-manage/PlanPage';
import AddPlanPage from '@/modules/plan-manage/AddPlan';
import LearningDataPage from '@/modules/plan-manage/LearningData';
import StoreInfoPage from '@/modules/store-manage/StoreInfo';
import CourseCategoryManage from '@/modules/teach-tool/components/CourseCategoryManage';
import QuestionManageIndex from '@/modules/teach-tool/question-manage/Index';
import PaperManageIndex from '@/modules/teach-tool/paper-manage/Index';
import ExaminationManagerIndex from '@/modules/teach-tool/examination-manager/Index';
import ExaminationManagerTestDetail from '@/modules/teach-tool/examination-manager/TestDetailPage';
import KnowledgeBase from '@/modules/knowledge-base/index';
import CollegeInfoPage from '@/modules/college-manage/CollegeInfoPage';
import ResourceDisk from '@/modules/resource-disk'
import SwitchRoute from '@/modules/root/SwitchRoute'
import PlanPage from '@/modules/plan-manage/PlanPage'
import AddPlanPage from '@/modules/plan-manage/AddPlan'
import LearningDataPage from '@/modules/plan-manage/LearningData'
import StoreInfoPage from '@/modules/store-manage/StoreInfo'
import CourseCategoryManage from '@/modules/teach-tool/components/CourseCategoryManage'
import QuestionManageIndex from '@/modules/teach-tool/question-manage/Index'
import PaperManageIndex from '@/modules/teach-tool/paper-manage/Index'
import ExaminationManagerIndex from '@/modules/teach-tool/examination-manager/Index'
import ExaminationManagerTestDetail from '@/modules/teach-tool/examination-manager/TestDetailPage'
import KnowledgeBase from '@/modules/knowledge-base/index'
import CollegeInfoPage from '@/modules/college-manage/CollegeInfoPage'
const mainRoutes = [
{
......@@ -46,12 +46,12 @@ const mainRoutes = [
{
path: '/employees-manage',
component: EmployeesManagePage,
name: '员工管理',
name: '角色管理',
},
{
path: '/college-employee',
component: EmployeeManage,
name: '员工管理',
name: '角色管理',
},
{
path: '/personal-info',
......@@ -91,7 +91,7 @@ const mainRoutes = [
{
path: '/offline-course',
component: OfflineCoursePage,
name: '线下',
name: '线下活动',
},
{
path: '/create-live-course',
......@@ -117,12 +117,12 @@ const mainRoutes = [
{
path: '/create-offline-course',
component: AddOfflineCoursePage,
name: '创建线下',
name: '创建线下活动',
},
{
path: '/resource-disk',
component: ResourceDisk,
name: '资料云盘',
name: '素材库',
},
{
path: '/question-manage-index',
......@@ -180,6 +180,6 @@ const mainRoutes = [
component: LearningDataPage,
name: '学习数据',
},
];
]
export default mainRoutes;
export default mainRoutes
......@@ -28,8 +28,8 @@ export const menuList: any = [
link: '/live-course',
},
{
groupName: "线上课",
groupCode: "CourseVideoClass",
groupName: '线上课',
groupCode: 'CourseVideoClass',
link: '/video-course',
},
{
......@@ -38,7 +38,7 @@ export const menuList: any = [
link: '/graphics-course',
},
{
groupName: '线下',
groupName: '线下活动',
groupCode: 'OfflineClass',
link: '/offline-course',
},
......@@ -91,7 +91,7 @@ export const menuList: any = [
selectImg: 'https://image.xiaomaiketang.com/xm/hJKCfibC22.png',
},
{
groupName: '资料云盘',
groupName: '素材库',
groupCode: 'CloudDisk',
icon: '&#xe8aa;',
link: '/resource-disk',
......@@ -99,14 +99,14 @@ export const menuList: any = [
selectImg: 'https://image.xiaomaiketang.com/xm/5sN4MzjxYc.png',
},
{
groupName: '人员管理',
groupName: '权限管理',
groupCode: 'PersonManage',
icon: '&#xe8a4;',
img: 'https://image.xiaomaiketang.com/xm/PRCnrt35y8.png',
selectImg: 'https://image.xiaomaiketang.com/xm/GhkwbdpwfK.png',
children: [
{
groupName: '员工管理',
groupName: '角色管理',
groupCode: 'ShopStaff',
link: '/college-employee',
},
......@@ -151,4 +151,4 @@ export const menuList: any = [
},
],
},
];
]
import LiveCoursePage from "@/modules/course-manage/LiveCoursePage";
import ResourceDisk from "@/modules/resource-disk";
import LiveCoursePage from '@/modules/course-manage/LiveCoursePage'
import ResourceDisk from '@/modules/resource-disk'
const redirectRoutes = [
{
path: "/redirect-to-live-course",
path: '/redirect-to-live-course',
component: LiveCoursePage,
name: "课程管理",
name: '课程管理',
},
{
path: "/redirect-to-resource-disk",
path: '/redirect-to-resource-disk',
component: ResourceDisk,
name: "资料云盘",
name: '素材库',
},
];
]
export default redirectRoutes;
export default redirectRoutes
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