Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
0794a910
Commit
0794a910
authored
Jun 25, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Plain Diff
fix:解决合并学院初始化直播课创建时间默认值的分支冲突
parents
82795b18
ad079064
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
222 additions
and
273 deletions
+222
-273
src/bu-components/ChooseMembersModal.jsx
+1
-2
src/bu-components/CopyFileModal.jsx
+1
-1
src/common/js/axios.ts
+1
-6
src/common/lottie/search.json
+0
-0
src/components/LottieIcon.tsx
+4
-2
src/modules/college-manage/EmployeeManage.tsx
+8
-5
src/modules/college-manage/UserManagePage.tsx
+10
-4
src/modules/college-manage/modal/ChooseMembersModal.jsx
+8
-3
src/modules/college-manage/modal/ChooseMembersModal.less
+3
-1
src/modules/course-manage/components/LiveCourseList.jsx
+0
-0
src/modules/plan-manage/components/PlanFilter.jsx
+2
-2
src/modules/root/Header.jsx
+6
-6
src/modules/root/Login.jsx
+107
-5
src/modules/root/Menu.less
+1
-1
src/modules/root/Menu.tsx
+22
-10
src/modules/root/WechatLogin.tsx
+4
-4
src/modules/store-manage/StoreDecorationPage.tsx
+3
-8
src/modules/store-manage/StoreH5DecorationTab.jsx
+9
-4
src/modules/store-manage/StoreWebDecorationTab.jsx
+9
-4
src/modules/teach-tool/components/AnswerDescPage.jsx
+4
-194
src/modules/teach-tool/components/CourseCategoryManage.jsx
+12
-1
src/modules/teach-tool/components/CourseCategoryManage.less
+6
-0
src/modules/teach-tool/examination-manager/Index.tsx
+1
-10
No files found.
src/bu-components/ChooseMembersModal.jsx
View file @
0794a910
...
...
@@ -5,9 +5,8 @@
*/
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
{
XMTable
}
from
'@/components'
;
...
...
src/bu-components/CopyFileModal.jsx
View file @
0794a910
...
...
@@ -5,7 +5,7 @@
*/
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
'@/components/LottieIcon'
;
...
...
src/common/js/axios.ts
View file @
0794a910
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-31 09:34:31
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-2
1 17:21:17
* @LastEditTime: 2021-06-2
4 19:34:21
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -88,10 +88,6 @@ class Axios {
if
(
success
||
resultCode
===
0
)
{
return
response
;
}
else
if
(
!
options
.
reject
)
{
// if(code === "NONE_STORE_USER"){
// window.RCHistory.replace('/login');
// return Promise.reject();
// }
message
.
error
(
ResMessage
||
resultMsg
);
}
return
Promise
.
reject
(
response
.
data
);
...
...
@@ -110,7 +106,6 @@ class Axios {
break
;
default
:
message
.
error
(
error
.
message
);
console
.
log
(
'222'
);
break
;
}
return
Promise
.
reject
(
error
.
message
);
...
...
src/common/lottie/search.json
0 → 100644
View file @
0794a910
This diff is collapsed.
Click to expand it.
src/components/LottieIcon.tsx
View file @
0794a910
...
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2021-06-15 13:48:35
* @LastEditors: wufan
* @LastEditTime: 2021-06-
15 14:24:57
* @LastEditTime: 2021-06-
24 11:10:45
* @Description: Description
*/
import
React
from
'react'
;
...
...
@@ -12,6 +12,7 @@ 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
search
from
'@/common/lottie/search.json'
;
import
'./LottieIcon.less'
;
...
...
@@ -29,7 +30,8 @@ const ANIMATION_DATA_MAP: {
student
,
activity
,
teacher
,
college
college
,
search
}
function
LottieIcon
(
props
:
LottieIconInterface
)
{
...
...
src/modules/college-manage/EmployeeManage.tsx
View file @
0794a910
...
...
@@ -8,17 +8,16 @@
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
"./EmployeeManage.less"
;
import
ChooseMembersModal
from
"./modal/ChooseMembersModal"
;
import
SetEmployeeModal
from
"./modal/SetEmployeeModal"
;
const
{
confirm
}
=
Modal
;
const
{
Search
}
=
Input
;
...
...
@@ -364,7 +363,11 @@ function EmployeeManage() {
}
</
div
>
<
div
className=
"box-body"
>
<
Table
<
XMTable
renderEmpty=
{
{
image
:
college
,
description
:
'暂无数据'
}
}
size=
{
"middle"
}
pagination=
{
false
}
dataSource=
{
employeeList
}
...
...
src/modules/college-manage/UserManagePage.tsx
View file @
0794a910
...
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2021-0
5-30 15:57:40
* @LastEditTime: 2021-0
6-21 11:13:15
* @Description: 学员管理页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -11,13 +11,15 @@ 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
"./UserManagePage.less"
;
import
moment
from
"moment"
;
const
{
Option
}
=
Select
;
const
{
Search
}
=
Input
;
const
{
RangePicker
}
=
DatePicker
;
...
...
@@ -198,7 +200,11 @@ function UserManagePage() {
>
添加学员
</
Button
>
}
<
div
className=
"box-body"
>
<
Table
<
XMTable
renderEmpty=
{
{
image
:
college
,
description
:
'暂无数据'
}
}
size=
{
"middle"
}
pagination=
{
false
}
dataSource=
{
userList
}
...
...
src/modules/college-manage/modal/ChooseMembersModal.jsx
View file @
0794a910
...
...
@@ -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"
;
...
...
@@ -319,7 +320,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
>
...
...
@@ -346,7 +347,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
()
}
...
...
src/modules/college-manage/modal/ChooseMembersModal.less
View file @
0794a910
...
...
@@ -125,7 +125,9 @@
.ant-empty-normal {
margin: 120px 0 !important;
}
.ant-empty {
margin-top: 76px;
}
.avatar{
display: flex;
align-items: center;
...
...
src/modules/course-manage/components/LiveCourseList.jsx
View file @
0794a910
This diff is collapsed.
Click to expand it.
src/modules/plan-manage/components/PlanFilter.jsx
View file @
0794a910
...
...
@@ -6,7 +6,7 @@
* @Description: 大班直播、互动班课列表的筛选组件
*/
import
React
,
{
useState
,
use
Ref
,
use
Effect
}
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
);
...
...
src/modules/root/Header.jsx
View file @
0794a910
/*
* @Author: 吴文洁
* @Date: 2019-09-10 18:26:03
* @LastEditors:
Please set LastEditors
* @LastEditTime: 2021-06-2
4 09:52:03
* @LastEditors:
fusanqiasng
* @LastEditTime: 2021-06-2
5 14:33:49
* @Description:
*/
import
React
,
{
useRef
,
useContext
,
useEffect
,
useState
}
from
'react'
;
...
...
@@ -271,14 +271,14 @@ function Header(props) {
onChange=
{
(
e
)
=>
{
setStoreId
(
e
.
target
.
value
);
User
.
setStoreId
(
e
.
target
.
value
);
list
.
map
((
item
)
=>
{
if
(
item
.
id
===
e
.
target
.
value
)
{
list
.
map
((
item
)
=>
{
if
(
item
.
id
===
e
.
target
.
value
)
{
User
.
setStoreUserId
(
item
.
storeUserId
);
}
})
})
;
User
.
setUserId
(
User
.
getUserId
());
User
.
setToken
(
User
.
getToken
());
User
.
setEnterpriseId
(
User
.
getEnterpriseId
())
User
.
setEnterpriseId
(
User
.
getEnterpriseId
())
;
window
.
RCHistory
.
push
(
'/home'
);
window
.
location
.
reload
();
}
}
...
...
src/modules/root/Login.jsx
View file @
0794a910
...
...
@@ -12,6 +12,10 @@ import user from '@/common/js/user';
const
{
TabPane
}
=
Tabs
;
function
Login
(
props
)
{
/**
* 手机登陆入口,暂时隐藏,此页注释代码勿删
*/
// const [phone, setPhone] = useState(''); // 登录手机号
// const [phoneverify, setPhoneverify] = useState(''); // 密码登录验证码
// const [openCheck1, setOpenCheck1] = useState(false);
...
...
@@ -22,6 +26,10 @@ function Login(props) {
// const [phoneError, setPhoneError] = useState(false);
// const [checkObject1, setCheckObject1] = useState({});
/**
* 手机登陆入口,暂时隐藏,此页注释代码勿删
*/
useEffect
(()
=>
{
const
enterpriseId
=
getParameterByName
(
'enterpriseId'
);
const
userId
=
getParameterByName
(
'userId'
);
...
...
@@ -51,19 +59,24 @@ function Login(props) {
userId
,
};
BaseService
.
getWXWorkLoginNoCheck
(
params
).
then
((
res
)
=>
{
User
.
setUserId
(
res
.
result
.
loginInfo
.
userId
)
User
.
setToken
(
res
.
result
.
loginInfo
.
xmToken
)
User
.
setEnterpriseId
(
res
.
result
.
enterpriseId
)
window
.
currentStoreUserInfo
=
{}
User
.
setUserId
(
res
.
result
.
loginInfo
.
userId
)
;
User
.
setToken
(
res
.
result
.
loginInfo
.
xmToken
)
;
User
.
setEnterpriseId
(
res
.
result
.
enterpriseId
)
;
window
.
currentStoreUserInfo
=
{}
;
window
.
currentStoreUserInfo
.
userId
=
res
.
result
.
loginInfo
.
userId
;
window
.
currentStoreUserInfo
.
token
=
res
.
result
.
loginInfo
.
xmToken
;
window
.
currentStoreUserInfo
.
enterpriseId
=
res
.
result
.
enterpriseId
;
User
.
setIdentifier
(
res
.
result
.
identifier
)
User
.
setIdentifier
(
res
.
result
.
identifier
)
;
window
.
RCHistory
.
push
({
pathname
:
`/switch-route`
,
});
});
}
/**
* 手机登陆入口,暂时隐藏,此页注释代码勿删
*/
// async function checkAccount(code, callback = () => {}) {
// callback();
// }
...
...
@@ -151,6 +164,10 @@ function Login(props) {
// });
// }
/**
* 手机登陆入口,暂时隐藏,此页注释代码勿删
*/
return
(
<
div
className=
'login-page'
>
<
div
className=
'logo-img-box'
>
...
...
@@ -171,6 +188,91 @@ function Login(props) {
<
TabPane
tab=
'企业微信登录'
key=
'1'
>
<
WechatLogin
></
WechatLogin
>
</
TabPane
>
{
/* 手机登陆入口,暂时隐藏,此页注释代码勿删 */
}
{
/* <TabPane tab='手机号登录' key='2'>
<div className='login-form'>
<div className='form'>
<div className='username' style={{ marginBottom: 16 }}>
<Input
type='phone'
autoComplete='off'
name='account'
maxLength={11}
placeholder="请输入手机号"
value={phone}
onChange={(e) => {
setPhone(e.target.value)
}}
/>
</div>
<div className='error-message'></div>
<div className='phoneverify'>
<Input
type="text"
id="phoneverify"
name="phoneverify"
placeholder="请输入验证码"
autoComplete="off"
value={phoneverify}
maxLength={4}
onChange={(e) => {
setPhoneverify(e.target.value)
}}
/>
<Popover
visible={openCheck1}
trigger='click'
title=''
content={
<div>
<span style={{ fontSize: '12px', color: '#999', marginBottom: 8, display: 'block' }}>请完成安全验证</span>
<CheckBeforeSendCode
callback={(data, nc) => {
setCheckObject1(nc)
checkAccount(1, (userType) => {
handleSendSMSCode(data, userType)
setTimeout(() => {
setOpenCheck1(false)
}, 500)
})
}}
/>
</div>
}
onVisibleChange={(value) => {
if (!value) {
setOpenCheck1(false)
}
}}
placement='bottomRight'>
<div
className='btn'
id='sendVerifyCode'
onClick={() => {
if (checking1) return
checkSend(1)
}}>
{codeText}
</div>
</Popover>
</div>
<div className='error-message'>{errorMessage}</div>
<div className='submit'>
<div className='btn'>
<span
id='loginIn'
onClick={() => {
handleSubmit()
}}>
登录
</span>
</div>
</div>
</div>
</div>
</TabPane> */
}
{
/* 手机登陆入口,暂时隐藏,此页注释代码勿删 */
}
</
Tabs
>
</
div
>
</
div
>
...
...
src/modules/root/Menu.less
View file @
0794a910
...
...
@@ -64,7 +64,7 @@
.icon-img{
width:18px;
height:18px;
margin-right:
1
6px;
margin-right:6px;
}
.listType {
width: 5px;
...
...
src/modules/root/Menu.tsx
View file @
0794a910
import
React
,
{
Key
,
useContext
,
useEffect
,
useRef
,
useState
}
from
'react'
;
import
React
,
{
Key
,
useContext
,
useEffect
,
useRef
,
useState
,
useMemo
}
from
'react'
;
import
{
withRouter
,
}
from
'react-router-dom'
;
import
{
Menu
}
from
'antd'
;
import
{
Menu
}
from
'antd'
;
import
{
menuList
}
from
'../../routes//config/menuList'
import
{
XMContext
}
from
'../../store/context'
;
import
Service
from
"@/common/js/service"
;
...
...
@@ -13,13 +13,14 @@ import "./Menu.less";
const
{
SubMenu
}
=
Menu
;
function
Aside
(
props
:
any
)
{
const
{
menuType
,
handleMenuType
}
=
props
const
{
menuType
,
handleMenuType
}
=
props
const
ctx
:
any
=
useContext
(
XMContext
);
const
[
selectKey
,
setSelectKey
]
=
useState
();
const
[
openKeys
,
setOpenKeys
]
=
useState
([
''
]);
const
[
topLogoUrl
,
setTopLogoUrl
]
=
useState
(
""
)
const
[
collapsed
,
setCollapsed
]
=
useState
(
false
)
const
rootSubmenuKeys
=
_
.
pluck
(
menuList
,
'groupCode'
);
useEffect
(()
=>
{
const
link
=
props
.
location
.
pathname
;
menuList
.
map
((
item
:
any
,
index
:
any
)
=>
{
...
...
@@ -36,13 +37,14 @@ function Aside(props: any) {
return
item
;
})
},
[
props
.
location
.
pathname
])
useEffect
(()
=>
{
useEffect
(()
=>
{
getTopLeftLogo
()
},[])
},
[])
function
getTopLeftLogo
()
{
if
(
User
.
getToken
())
{
StoreService
.
getStoreDetail
({
storeId
:
User
.
getStoreId
()
})
.
then
(
res
=>
{
StoreService
.
getStoreDetail
({
storeId
:
User
.
getStoreId
()
})
.
then
(
res
=>
{
if
(
_
.
isEmpty
(
res
.
result
.
logo
))
{
setTopLogoUrl
(
"https://image.xiaomaiketang.com/xm/fe4NCjr7XF.png"
)
}
else
{
...
...
@@ -52,12 +54,14 @@ function Aside(props: any) {
})
}
}
function
toggleMenu
(
item
:
any
)
{
window
.
RCHistory
.
push
(
item
.
link
)
if
(
!
menuType
)
{
setOpenKeys
([])
}
}
function
onOpenChange
(
key
:
Key
[])
{
if
(
typeof
key
===
"string"
)
{
if
(
openKeys
.
includes
(
key
))
{
...
...
@@ -86,6 +90,13 @@ function Aside(props: any) {
setCollapsed
(
!
collapsed
)
}
const
openKeysConstrol
=
useMemo
(()
=>
{
return
{
[
menuType
?
'openKeys'
:
'defaultOpenKeys'
]:
openKeys
};
},
[
menuType
,
openKeys
])
return
(
<
div
id=
"left-container"
...
...
@@ -97,7 +108,7 @@ function Aside(props: any) {
>
<
div
className=
"top-ctrl"
>
<
div
className=
"topLogo"
>
{
menuType
&&
<
img
src=
{
topLogoUrl
}
alt=
""
className=
"img1"
></
img
>
}
{
menuType
&&
<
img
src=
{
topLogoUrl
}
alt=
""
className=
"img1"
></
img
>
}
</
div
>
<
div
className=
"menu-type-icon"
onClick=
{
handleMenu
}
>
{
menuType
?
(
...
...
@@ -120,9 +131,10 @@ function Aside(props: any) {
<
div
className=
"nav"
>
<
Menu
style=
{
menuType
?
{
minHeight
:
"100%"
,
background
:
'#0E1935'
}:{
minHeight
:
"100%"
,
background
:
'#0E1935'
,
width
:
"56px"
}
}
{
...
openKeysConstrol
}
style=
{
menuType
?
{
minHeight
:
"100%"
,
background
:
'#0E1935'
}
:
{
minHeight
:
"100%"
,
background
:
'#0E1935'
,
width
:
"56px"
}
}
selectedKeys=
{
selectKey
}
openKeys=
{
menuType
?
openKeys
:
[]
}
onOpenChange=
{
onOpenChange
}
inlineCollapsed=
{
collapsed
}
mode=
{
menuType
?
"inline"
:
"vertical"
}
...
...
src/modules/root/WechatLogin.tsx
View file @
0794a910
...
...
@@ -28,15 +28,11 @@ export default function WechatLogin(props: any) {
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'
}
`
;
// console.log(redirect)
// const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww409ccf9c6e31f19e&redirect_uri=${encodeURIComponent(redirect)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
// console.log(url)
const
qrcodeWrapDom
:
any
=
document
.
querySelector
(
'#qrcode'
);
let
qrnode
=
new
qrcode
({
text
:
redirect
,
correctLevel
:
2
,
size
:
180
,
// image: 'https://image.xiaomaiketang.com/xm/Newk4NrxKC.png',
image
:
'https://image.xiaomaiketang.com/xm/bFkRBz7teA.png'
,
imageSize
:
50
,
});
...
...
@@ -81,6 +77,10 @@ export default function WechatLogin(props: any) {
window
.
currentStoreUserInfo
.
token
=
_res
.
result
.
loginInfo
.
xmToken
;
window
.
currentStoreUserInfo
.
enterpriseId
=
_res
.
result
.
enterpriseId
;
User
.
setIdentifier
(
_res
.
result
.
identifier
);
window
.
currentStoreUserInfo
=
{}
window
.
currentStoreUserInfo
.
userId
=
_res
.
result
.
loginInfo
.
userId
;
window
.
currentStoreUserInfo
.
token
=
_res
.
result
.
loginInfo
.
xmToken
;
window
.
currentStoreUserInfo
.
enterpriseId
=
_res
.
result
.
enterpriseId
;
window
.
RCHistory
.
push
({
pathname
:
`/switch-route`
,
});
...
...
src/modules/store-manage/StoreDecorationPage.tsx
View file @
0794a910
...
...
@@ -2,13 +2,13 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2021-0
2-01 14:12:38
* @LastEditTime: 2021-0
6-21 11:17:44
* @Description: 学院装修页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
,
{
use
Effect
,
use
State
}
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
}
>
...
...
src/modules/store-manage/StoreH5DecorationTab.jsx
View file @
0794a910
...
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2021-0
5-28 16:20:26
* @LastEditTime: 2021-0
6-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
}
...
...
src/modules/store-manage/StoreWebDecorationTab.jsx
View file @
0794a910
...
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2021-0
5-28 16:21:04
* @LastEditTime: 2021-0
6-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
}
...
...
src/modules/teach-tool/components/AnswerDescPage.jsx
View file @
0794a910
...
...
@@ -2,12 +2,12 @@
* @Author: yuananting
* @Date: 2021-04-08 15:50:52
* @LastEditors: wufan
* @LastEditTime: 2021-0
4-24 15:55:19
* @LastEditTime: 2021-0
6-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'
>

</
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'
>

</
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'
>

</
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'
>

</
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
...
...
src/modules/teach-tool/components/CourseCategoryManage.jsx
View file @
0794a910
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-23 18:28:50
* @LastEditors: fusanqiasng
* @LastEditTime: 2021-06-
16 17:35:55
* @LastEditTime: 2021-06-
25 14:35:20
* @Description: 助学工具-课程分类
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -14,9 +14,11 @@ import AidToolService from '@/domains/aid-tool-domain/AidToolService';
import
User
from
'@/common/js/user'
;
import
{
Tree
,
Input
,
Space
,
Button
,
Menu
,
Dropdown
,
message
,
Modal
}
from
'antd'
;
import
ShowTips
from
'@/components/ShowTips'
;
import
LottieIcon
from
'@/components/LottieIcon'
;
const
{
DirectoryTree
}
=
Tree
;
const
{
Search
}
=
Input
;
const
{
confirm
}
=
Modal
;
class
CourseCategoryManage
extends
Component
{
constructor
(
props
)
{
super
(
props
);
...
...
@@ -567,6 +569,9 @@ class CourseCategoryManage extends Component {
<
ShowTips
message=
'为方便管理,该分类用于课程、培训计划、题库、知识库等模块,改动将同步各模块更新'
/>
</
div
>
<
div
className=
'course-category-tree'
>
{
<
Choose
>
<
When
condition=
{
treeData
.
length
!==
0
}
>
<
DirectoryTree
expandedKeys=
{
expandedKeys
}
autoExpandParent=
{
autoExpandParent
}
...
...
@@ -577,6 +582,12 @@ class CourseCategoryManage extends Component {
blockNode
onDrop=
{
this
.
onDrop
}
treeData=
{
treeData
}
></
DirectoryTree
>
</
When
>
<
Otherwise
>
<
LottieIcon
title=
{
<
span
className=
'desc'
>
搜索无结果
</
span
>
}
type=
'search'
size=
{
150
}
/>
</
Otherwise
>
</
Choose
>
}
</
div
>
</
div
>
{
operateCourseCategoryModal
}
...
...
src/modules/teach-tool/components/CourseCategoryManage.less
View file @
0794a910
...
...
@@ -14,6 +14,12 @@
margin-top: 12px;
width: 900px;
border: 1px solid #e8e8e8;
.lottie-icon {
margin-top: 100px!important;
.desc {
color: #999!important;
}
}
.ant-tree.ant-tree-directory {
font-size: 14px;
font-weight: 400;
...
...
src/modules/teach-tool/examination-manager/Index.tsx
View file @
0794a910
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'
;
...
...
@@ -14,8 +14,6 @@ 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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment