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
076df9ec
Commit
076df9ec
authored
Jun 21, 2021
by
wufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:人员管理和学院管理table默认图替换
parent
9e611ef6
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
59 additions
and
238 deletions
+59
-238
src/bu-components/ChooseMembersModal.jsx
+1
-2
src/bu-components/CopyFileModal.jsx
+1
-1
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/plan-manage/components/PlanFilter.jsx
+2
-2
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/examination-manager/Index.tsx
+1
-10
No files found.
src/bu-components/ChooseMembersModal.jsx
View file @
076df9ec
...
@@ -5,9 +5,8 @@
...
@@ -5,9 +5,8 @@
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Modal
,
Input
,
Table
}
from
'antd'
;
import
{
Modal
,
Input
}
from
'antd'
;
import
Service
from
'@/common/js/service'
;
import
Service
from
'@/common/js/service'
;
// import _ from 'underscore';
import
'./ChooseMembersModal.less'
;
import
'./ChooseMembersModal.less'
;
import
User
from
'@/common/js/user'
import
User
from
'@/common/js/user'
import
{
XMTable
}
from
'@/components'
;
import
{
XMTable
}
from
'@/components'
;
...
...
src/bu-components/CopyFileModal.jsx
View file @
076df9ec
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*/
*/
import
React
from
'react'
;
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
Service
from
'@/common/js/service'
;
import
{
FILE_TYPE_ICON_MAP
,
DEFAULT_SIZE_UNIT
}
from
"@/domains/resource-disk/constants"
;
import
{
FILE_TYPE_ICON_MAP
,
DEFAULT_SIZE_UNIT
}
from
"@/domains/resource-disk/constants"
;
import
LottieIcon
from
'@/components/LottieIcon'
;
import
LottieIcon
from
'@/components/LottieIcon'
;
...
...
src/modules/college-manage/EmployeeManage.tsx
View file @
076df9ec
...
@@ -8,17 +8,16 @@
...
@@ -8,17 +8,16 @@
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
_
from
"underscore"
;
import
_
from
"underscore"
;
import
PageControl
from
"@/components/PageControl"
;
import
{
CheckBox
,
PageControl
}
from
"@/components"
;
import
{
CheckBox
}
from
"@/components"
;
import
{
Button
,
Table
,
Modal
,
message
,
Input
}
from
"antd"
;
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
StoreService
from
"@/domains/store-domain/storeService"
;
import
EmployeeAddOrEditModal
from
"../store-manage/EmployeeAddOrEditModal"
;
import
EmployeeAddOrEditModal
from
"../store-manage/EmployeeAddOrEditModal"
;
import
User
from
"@/common/js/user"
;
import
User
from
"@/common/js/user"
;
import
"./EmployeeManage.less"
;
import
"./EmployeeManage.less"
;
import
ChooseMembersModal
from
"./modal/ChooseMembersModal"
;
import
ChooseMembersModal
from
"./modal/ChooseMembersModal"
;
import
SetEmployeeModal
from
"./modal/SetEmployeeModal"
;
const
{
confirm
}
=
Modal
;
const
{
confirm
}
=
Modal
;
const
{
Search
}
=
Input
;
const
{
Search
}
=
Input
;
...
@@ -364,7 +363,11 @@ function EmployeeManage() {
...
@@ -364,7 +363,11 @@ function EmployeeManage() {
}
}
</
div
>
</
div
>
<
div
className=
"box-body"
>
<
div
className=
"box-body"
>
<
Table
<
XMTable
renderEmpty=
{
{
image
:
college
,
description
:
'暂无数据'
}
}
size=
{
"middle"
}
size=
{
"middle"
}
pagination=
{
false
}
pagination=
{
false
}
dataSource=
{
employeeList
}
dataSource=
{
employeeList
}
...
...
src/modules/college-manage/UserManagePage.tsx
View file @
076df9ec
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditors: wufan
* @LastEditTime: 2021-0
5-30 15:57:40
* @LastEditTime: 2021-0
6-21 11:13:15
* @Description: 学员管理页面
* @Description: 学员管理页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -11,13 +11,15 @@ import React, { useEffect, useState } from "react";
...
@@ -11,13 +11,15 @@ import React, { useEffect, useState } from "react";
import
{
withRouter
}
from
"react-router-dom"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
_
from
"underscore"
;
import
_
from
"underscore"
;
import
{
PageControl
}
from
"@/components"
;
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
StoreService
from
"@/domains/store-domain/storeService"
;
import
User
from
"@/common/js/user"
;
import
User
from
"@/common/js/user"
;
import
ChooseMembersModal
from
"./modal/ChooseMembersModal"
;
import
ChooseMembersModal
from
"./modal/ChooseMembersModal"
;
import
{
XMTable
}
from
'@/components'
;
import
college
from
'@/common/lottie/college.json'
;
import
"./UserManagePage.less"
;
import
"./UserManagePage.less"
;
import
moment
from
"moment"
;
import
moment
from
"moment"
;
const
{
Option
}
=
Select
;
const
{
Option
}
=
Select
;
const
{
Search
}
=
Input
;
const
{
Search
}
=
Input
;
const
{
RangePicker
}
=
DatePicker
;
const
{
RangePicker
}
=
DatePicker
;
...
@@ -198,7 +200,11 @@ function UserManagePage() {
...
@@ -198,7 +200,11 @@ function UserManagePage() {
>
添加学员
</
Button
>
>
添加学员
</
Button
>
}
}
<
div
className=
"box-body"
>
<
div
className=
"box-body"
>
<
Table
<
XMTable
renderEmpty=
{
{
image
:
college
,
description
:
'暂无数据'
}
}
size=
{
"middle"
}
size=
{
"middle"
}
pagination=
{
false
}
pagination=
{
false
}
dataSource=
{
userList
}
dataSource=
{
userList
}
...
...
src/modules/college-manage/modal/ChooseMembersModal.jsx
View file @
076df9ec
...
@@ -5,8 +5,9 @@
...
@@ -5,8 +5,9 @@
*/
*/
import
React
from
'react'
;
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
{
XMTable
}
from
'@/components'
;
import
college
from
'@/common/lottie/college.json'
;
import
Service
from
'@/common/js/service'
;
import
Service
from
'@/common/js/service'
;
import
User
from
'@/common/js/user'
import
User
from
'@/common/js/user'
import
SetEmployeeModal
from
"./SetEmployeeModal"
;
import
SetEmployeeModal
from
"./SetEmployeeModal"
;
...
@@ -319,7 +320,7 @@ class ChooseMembersModal extends React.Component {
...
@@ -319,7 +320,7 @@ class ChooseMembersModal extends React.Component {
pagination=
{
false
}
pagination=
{
false
}
scroll=
{
{
y
:
290
}
}
scroll=
{
{
y
:
290
}
}
renderEmpty=
{
{
renderEmpty=
{
{
image
:
searchKey
?
search
:
''
,
image
:
searchKey
?
search
:
college
,
description
:
<
div
>
description
:
<
div
>
<
div
style=
{
{
color
:
'#333'
}
}
>
暂无数据
</
div
>
<
div
style=
{
{
color
:
'#333'
}
}
>
暂无数据
</
div
>
<
div
style=
{
{
color
:
'#666'
,
padding
:
'0 32px'
,
fontSize
:
'12px'
}
}
>
需要先将员工添加到企微可见范围后,员工才会出现在这里
</
div
>
<
div
style=
{
{
color
:
'#666'
,
padding
:
'0 32px'
,
fontSize
:
'12px'
}
}
>
需要先将员工添加到企微可见范围后,员工才会出现在这里
</
div
>
...
@@ -346,7 +347,11 @@ class ChooseMembersModal extends React.Component {
...
@@ -346,7 +347,11 @@ class ChooseMembersModal extends React.Component {
<
span
className=
{
(
selectUserList
.
length
>
0
)
?
'span-right-l'
:
null
}
>
清空
</
span
>
<
span
className=
{
(
selectUserList
.
length
>
0
)
?
'span-right-l'
:
null
}
>
清空
</
span
>
</
div
>
</
div
>
<
div
className=
'container-right-body'
>
<
div
className=
'container-right-body'
>
<
Table
<
XMTable
renderEmpty=
{
{
image
:
college
,
description
:
'暂无数据'
}
}
rowKey=
{
(
record
)
=>
record
.
enterpriseVisibleUserId
}
rowKey=
{
(
record
)
=>
record
.
enterpriseVisibleUserId
}
dataSource=
{
selectUserList
}
dataSource=
{
selectUserList
}
columns=
{
this
.
selectedColumnsRight
()
}
columns=
{
this
.
selectedColumnsRight
()
}
...
...
src/modules/college-manage/modal/ChooseMembersModal.less
View file @
076df9ec
...
@@ -125,7 +125,9 @@
...
@@ -125,7 +125,9 @@
.ant-empty-normal {
.ant-empty-normal {
margin: 120px 0 !important;
margin: 120px 0 !important;
}
}
.ant-empty {
margin-top: 76px;
}
.avatar{
.avatar{
display: flex;
display: flex;
align-items: center;
align-items: center;
...
...
src/modules/plan-manage/components/PlanFilter.jsx
View file @
076df9ec
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* @Description: 大班直播、互动班课列表的筛选组件
* @Description: 大班直播、互动班课列表的筛选组件
*/
*/
import
React
,
{
useState
,
use
Ref
,
use
Effect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
withRouter
}
from
'react-router-dom'
;
import
{
withRouter
}
from
'react-router-dom'
;
import
{
Row
,
Input
,
Select
,
Tooltip
}
from
'antd'
;
import
{
Row
,
Input
,
Select
,
Tooltip
}
from
'antd'
;
import
RangePicker
from
"@/modules/common/DateRangePicker"
;
import
RangePicker
from
"@/modules/common/DateRangePicker"
;
...
@@ -86,7 +86,7 @@ function PlanFilter(props) {
...
@@ -86,7 +86,7 @@ function PlanFilter(props) {
};
};
StoreService
.
getStoreUserBasicPage
(
_query
).
then
((
res
)
=>
{
StoreService
.
getStoreUserBasicPage
(
_query
).
then
((
res
)
=>
{
const
{
result
=
{}
}
=
res
;
const
{
result
=
{}
}
=
res
;
const
{
records
=
[],
total
=
0
,
hasNext
}
=
result
;
const
{
records
=
[],
hasNext
}
=
result
;
const
list
=
current
>
1
?
creatorList
.
concat
(
records
)
:
records
;
const
list
=
current
>
1
?
creatorList
.
concat
(
records
)
:
records
;
setHasNext
(
hasNext
);
setHasNext
(
hasNext
);
setCreatorList
(
list
);
setCreatorList
(
list
);
...
...
src/modules/store-manage/StoreDecorationPage.tsx
View file @
076df9ec
...
@@ -2,13 +2,13 @@
...
@@ -2,13 +2,13 @@
* @Author: wufan
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditors: wufan
* @LastEditTime: 2021-0
2-01 14:12:38
* @LastEditTime: 2021-0
6-21 11:17:44
* @Description: 学院装修页面
* @Description: 学院装修页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
import
React
,
{
use
Effect
,
use
State
}
from
"react"
;
import
React
,
{
useState
}
from
"react"
;
import
{
withRouter
,
Switch
,
Route
}
from
"react-router-dom"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
_
from
"underscore"
;
import
_
from
"underscore"
;
import
{
Tabs
}
from
"antd"
;
import
{
Tabs
}
from
"antd"
;
import
"./StoreDecorationPage.less"
;
import
"./StoreDecorationPage.less"
;
...
@@ -16,9 +16,6 @@ import StoreH5DecorationTab from "./StoreH5DecorationTab";
...
@@ -16,9 +16,6 @@ import StoreH5DecorationTab from "./StoreH5DecorationTab";
import
StoreWebDecorationTab
from
"./StoreWebDecorationTab"
;
import
StoreWebDecorationTab
from
"./StoreWebDecorationTab"
;
const
{
TabPane
}
=
Tabs
;
const
{
TabPane
}
=
Tabs
;
declare
var
window
:
any
;
interface
StoreDecoprationProps
{
interface
StoreDecoprationProps
{
match
:
{
match
:
{
url
:
string
;
url
:
string
;
...
@@ -27,7 +24,6 @@ interface StoreDecoprationProps {
...
@@ -27,7 +24,6 @@ interface StoreDecoprationProps {
function
StoreDecorationPage
(
props
:
StoreDecoprationProps
)
{
function
StoreDecorationPage
(
props
:
StoreDecoprationProps
)
{
const
[
currentTab
,
setCurrentTab
]
=
useState
(
"h5"
);
const
[
currentTab
,
setCurrentTab
]
=
useState
(
"h5"
);
const
{
match
}
=
props
;
return
(
return
(
<
div
className=
"page store-decoration-page"
>
<
div
className=
"page store-decoration-page"
>
...
@@ -36,7 +32,6 @@ function StoreDecorationPage(props: StoreDecoprationProps) {
...
@@ -36,7 +32,6 @@ function StoreDecorationPage(props: StoreDecoprationProps) {
<
Tabs
<
Tabs
onChange=
{
(
key
)
=>
{
onChange=
{
(
key
)
=>
{
setCurrentTab
(
key
);
setCurrentTab
(
key
);
// window.RCHistory.push(`$
{
match
.
url
}
/store-decoration/
$
{
key
}
`);
}
}
}
}
activeKey=
{
currentTab
}
activeKey=
{
currentTab
}
>
>
...
...
src/modules/store-manage/StoreH5DecorationTab.jsx
View file @
076df9ec
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditors: wufan
* @LastEditTime: 2021-0
5-28 16:20:26
* @LastEditTime: 2021-0
6-21 11:16:21
* @Description: web学院banner页面
* @Description: web学院banner页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -10,8 +10,7 @@
...
@@ -10,8 +10,7 @@
import
React
from
"react"
;
import
React
from
"react"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
_
from
"underscore"
;
import
_
from
"underscore"
;
// import PhotoClip from 'photoclip'
import
{
Modal
,
message
,
Button
}
from
"antd"
;
import
{
Table
,
Modal
,
message
,
Button
}
from
"antd"
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
import
{
import
{
sortableContainer
,
sortableContainer
,
...
@@ -24,6 +23,8 @@ import User from "@/common/js/user";
...
@@ -24,6 +23,8 @@ import User from "@/common/js/user";
import
SelectPrepareFileModal
from
"@/modules/prepare-lesson/modal/SelectPrepareFileModal"
;
import
SelectPrepareFileModal
from
"@/modules/prepare-lesson/modal/SelectPrepareFileModal"
;
import
"./StoreDecorationPage.less"
;
import
"./StoreDecorationPage.less"
;
import
Upload
from
"@/core/upload"
;
import
Upload
from
"@/core/upload"
;
import
{
XMTable
}
from
'@/components'
;
import
college
from
'@/common/lottie/college'
;
const
{
confirm
}
=
Modal
;
const
{
confirm
}
=
Modal
;
const
DragHandle
=
sortableHandle
(()
=>
(
const
DragHandle
=
sortableHandle
(()
=>
(
...
@@ -391,7 +392,11 @@ class StoreH5Decoration extends React.Component {
...
@@ -391,7 +392,11 @@ class StoreH5Decoration extends React.Component {
</
Button
>
</
Button
>
</
div
>
</
div
>
<
div
className=
"box-body"
>
<
div
className=
"box-body"
>
<
Table
<
XMTable
renderEmpty=
{
{
image
:
college
,
description
:
'暂无数据'
}
}
size=
{
"middle"
}
size=
{
"middle"
}
pagination=
{
false
}
pagination=
{
false
}
dataSource=
{
storeDecorationlist
}
dataSource=
{
storeDecorationlist
}
...
...
src/modules/store-manage/StoreWebDecorationTab.jsx
View file @
076df9ec
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditors: wufan
* @LastEditTime: 2021-0
5-28 16:21:04
* @LastEditTime: 2021-0
6-21 11:16:31
* @Description: web学院banner页面
* @Description: web学院banner页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -10,8 +10,7 @@
...
@@ -10,8 +10,7 @@
import
React
from
"react"
;
import
React
from
"react"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
_
from
"underscore"
;
import
_
from
"underscore"
;
// import PhotoClip from 'photoclip'
import
{
Modal
,
message
,
Button
}
from
"antd"
;
import
{
Table
,
Modal
,
message
,
Button
}
from
"antd"
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
import
{
import
{
sortableContainer
,
sortableContainer
,
...
@@ -24,6 +23,8 @@ import User from "@/common/js/user";
...
@@ -24,6 +23,8 @@ import User from "@/common/js/user";
import
SelectPrepareFileModal
from
"@/modules/prepare-lesson/modal/SelectPrepareFileModal"
;
import
SelectPrepareFileModal
from
"@/modules/prepare-lesson/modal/SelectPrepareFileModal"
;
import
"./StoreDecorationPage.less"
;
import
"./StoreDecorationPage.less"
;
import
Upload
from
"@/core/upload"
;
import
Upload
from
"@/core/upload"
;
import
{
XMTable
}
from
'@/components'
;
import
college
from
'@/common/lottie/college'
;
const
{
confirm
}
=
Modal
;
const
{
confirm
}
=
Modal
;
const
DragHandle
=
sortableHandle
(()
=>
(
const
DragHandle
=
sortableHandle
(()
=>
(
...
@@ -389,7 +390,11 @@ class StoreWebDecoration extends React.Component {
...
@@ -389,7 +390,11 @@ class StoreWebDecoration extends React.Component {
</
Button
>
</
Button
>
</
div
>
</
div
>
<
div
className=
"box-body"
>
<
div
className=
"box-body"
>
<
Table
<
XMTable
renderEmpty=
{
{
image
:
college
,
description
:
'暂无数据'
}
}
size=
{
"middle"
}
size=
{
"middle"
}
pagination=
{
false
}
pagination=
{
false
}
dataSource=
{
storeDecorationlist
}
dataSource=
{
storeDecorationlist
}
...
...
src/modules/teach-tool/components/AnswerDescPage.jsx
View file @
076df9ec
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-04-08 15:50:52
* @Date: 2021-04-08 15:50:52
* @LastEditors: wufan
* @LastEditors: wufan
* @LastEditTime: 2021-0
4-24 15:55:19
* @LastEditTime: 2021-0
6-21 11:24:48
* @Description: 助学工具-考试-答案详情
* @Description: 助学工具-考试-答案详情
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Route
,
withRouter
}
from
'react-router-dom'
;
import
{
withRouter
}
from
'react-router-dom'
;
import
User
from
'@/common/js/user'
;
import
User
from
'@/common/js/user'
;
import
Service
from
'@/common/js/service'
;
import
Service
from
'@/common/js/service'
;
import
Lottie
from
'lottie-web'
;
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',
...
@@ -20,7 +20,6 @@ const NUM_TO_WORD_MAP = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
function
AnswerDescPage
(
props
)
{
function
AnswerDescPage
(
props
)
{
const
examId
=
props
.
match
.
params
.
testId
.
replace
(
/
\?
.+/
,
''
);
const
examId
=
props
.
match
.
params
.
testId
.
replace
(
/
\?
.+/
,
''
);
const
paperId
=
window
.
getParameterByName
(
'paperId'
);
const
paperId
=
window
.
getParameterByName
(
'paperId'
);
const
[
customerId
,
setCustomerId
]
=
useState
(
''
);
const
[
examDetail
,
setExamDetail
]
=
useState
({
const
[
examDetail
,
setExamDetail
]
=
useState
({
examDesc
:
''
,
examDesc
:
''
,
examDuration
:
0
,
examDuration
:
0
,
...
@@ -155,68 +154,10 @@ function AnswerDescPage(props) {
...
@@ -155,68 +154,10 @@ function AnswerDescPage(props) {
setIsShowErrorPage
(
true
);
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
()
{
function
handleRenderQuestionItem
()
{
return
_
.
map
(
questionList
,
(
questionItem
,
questionIndex
)
=>
{
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
(
return
(
<
div
className=
{
`question-info-item`
}
>
<
div
className=
{
`question-info-item`
}
>
{
renderStem
(
questionItem
,
questionStemList
,
questionType
,
score
,
orderIndex
,
questionId
,
gapFillingAnswerList
)
}
{
renderStem
(
questionItem
,
questionStemList
,
questionType
,
score
,
orderIndex
,
questionId
,
gapFillingAnswerList
)
}
...
@@ -225,7 +166,6 @@ function AnswerDescPage(props) {
...
@@ -225,7 +166,6 @@ function AnswerDescPage(props) {
return
renderOption
(
optionItem
,
optionIndex
,
questionId
);
return
renderOption
(
optionItem
,
optionIndex
,
questionId
);
})
}
})
}
{
renderAnswerCompare
(
questionId
,
questionType
,
optionList
,
gapFillingAnswerList
)
}
{
renderAnswerCompare
(
questionId
,
questionType
,
optionList
,
gapFillingAnswerList
)
}
{
/* {renderAnswerDesc(questionAnswerDescList)} */
}
</
div
>
</
div
>
);
);
});
});
...
@@ -503,133 +443,6 @@ function AnswerDescPage(props) {
...
@@ -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
()
{
function
chooseErrorAnswer
()
{
...
@@ -640,8 +453,6 @@ function AnswerDescPage(props) {
...
@@ -640,8 +453,6 @@ function AnswerDescPage(props) {
setQuestionList
(
!
onlyError
?
errorQuestionList
:
allQuestionList
);
setQuestionList
(
!
onlyError
?
errorQuestionList
:
allQuestionList
);
}
}
const
{
totalQuestionCount
,
userCorrectQuestion
}
=
examDetail
;
let
sortedAnswerList
=
[];
let
sortedAnswerList
=
[];
let
userAnswerMap
=
{};
let
userAnswerMap
=
{};
userAnswerList
.
forEach
((
item
)
=>
{
userAnswerList
.
forEach
((
item
)
=>
{
...
@@ -689,7 +500,6 @@ function AnswerDescPage(props) {
...
@@ -689,7 +500,6 @@ function AnswerDescPage(props) {
<
div
className=
'question-list-box'
>
{
handleRenderQuestionItem
()
}
</
div
>
<
div
className=
'question-list-box'
>
{
handleRenderQuestionItem
()
}
</
div
>
</
div
>
</
div
>
</
If
>
</
If
>
{
/* {renderFooterText()} */
}
</
div
>
</
div
>
{
showScanFile
&&
(
{
showScanFile
&&
(
<
ScanFileModal
<
ScanFileModal
...
...
src/modules/teach-tool/examination-manager/Index.tsx
View file @
076df9ec
import
React
,
{
useState
,
useRef
,
useEffect
,
useContext
}
from
'react'
;
import
React
,
{
useState
,
useRef
,
useEffect
,
useContext
}
from
'react'
;
import
{
Input
,
Select
,
DatePicker
,
Tooltip
,
Button
,
Table
,
Dropdown
,
Menu
,
Modal
}
from
'antd'
;
import
{
Input
,
Select
,
DatePicker
,
Tooltip
,
Button
,
Dropdown
,
Menu
,
Modal
}
from
'antd'
;
import
TeacherSelect
from
'@/modules/common/TeacherSelect'
;
import
TeacherSelect
from
'@/modules/common/TeacherSelect'
;
import
{
Route
,
withRouter
}
from
'react-router-dom'
;
import
{
Route
,
withRouter
}
from
'react-router-dom'
;
import
Service
from
'@/common/js/service'
;
import
Service
from
'@/common/js/service'
;
...
@@ -14,8 +14,6 @@ import PreviewModal from './PreviewModal';
...
@@ -14,8 +14,6 @@ import PreviewModal from './PreviewModal';
import
'./index.less'
;
import
'./index.less'
;
const
{
RangePicker
}
=
DatePicker
;
const
{
RangePicker
}
=
DatePicker
;
const
{
Search
}
=
Input
;
const
{
Search
}
=
Input
;
const
{
Option
}
=
Select
;
interface
sortType
{
interface
sortType
{
type
:
'ascend'
|
'descend'
|
null
|
undefined
;
type
:
'ascend'
|
'descend'
|
null
|
undefined
;
}
}
...
@@ -42,9 +40,7 @@ function ExaminationManager(props: any) {
...
@@ -42,9 +40,7 @@ function ExaminationManager(props: any) {
type
:
undefined
,
type
:
undefined
,
};
};
const
sortEnum
=
{};
const
{
match
}
=
props
;
const
{
match
}
=
props
;
const
sortState
:
any
=
false
;
const
ctx
:
any
=
useContext
(
XMContext
);
const
ctx
:
any
=
useContext
(
XMContext
);
const
[
query
,
setQuery
]
=
useState
(
queryInit
);
const
[
query
,
setQuery
]
=
useState
(
queryInit
);
const
[
expandFilter
,
setExpandFilter
]
=
useState
(
false
);
const
[
expandFilter
,
setExpandFilter
]
=
useState
(
false
);
...
@@ -53,7 +49,6 @@ function ExaminationManager(props: any) {
...
@@ -53,7 +49,6 @@ function ExaminationManager(props: any) {
const
[
field
,
setfield
]
=
useState
(
''
);
const
[
field
,
setfield
]
=
useState
(
''
);
const
[
order
,
setOrder
]
=
useState
(
sortStatus
.
type
);
const
[
order
,
setOrder
]
=
useState
(
sortStatus
.
type
);
const
[
modal
,
setModal
]
=
useState
(
null
);
const
[
modal
,
setModal
]
=
useState
(
null
);
const
[
questionCntSort
,
setQuestionCntSort
]
=
useState
(
sortState
);
const
[
openPreviewModal
,
setOpenPreviewModal
]
=
useState
(
false
);
const
[
openPreviewModal
,
setOpenPreviewModal
]
=
useState
(
false
);
const
[
info
,
setInfo
]
=
useState
({
examDuration
:
0
});
const
[
info
,
setInfo
]
=
useState
({
examDuration
:
0
});
const
queryRef
=
useRef
({});
const
queryRef
=
useRef
({});
...
@@ -76,7 +71,6 @@ function ExaminationManager(props: any) {
...
@@ -76,7 +71,6 @@ function ExaminationManager(props: any) {
const
columns
=
[
const
columns
=
[
{
{
title
:
'考试'
,
title
:
'考试'
,
// fixed:fixStr.left,
width
:
320
,
width
:
320
,
dataIndex
:
'examName'
,
dataIndex
:
'examName'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
render
:
(
text
:
any
,
record
:
any
)
=>
{
...
@@ -279,9 +273,6 @@ function ExaminationManager(props: any) {
...
@@ -279,9 +273,6 @@ function ExaminationManager(props: any) {
function
getList
()
{
function
getList
()
{
const
_query
=
{
...
queryRef
.
current
};
const
_query
=
{
...
queryRef
.
current
};
// if(_query.examCreator){
// _query.examCreator =parseInt(_query.examCreator)
// }
Service
.
Hades
(
'public/hades/queryExamPageList'
,
{
Service
.
Hades
(
'public/hades/queryExamPageList'
,
{
...
_query
,
...
_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