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
4a65aacb
Commit
4a65aacb
authored
Apr 10, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:用时转换
parent
080683db
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
14 deletions
+40
-14
src/modules/teach-tool/components/CourseCategorySiderTree.jsx
+2
-2
src/modules/teach-tool/examination-manager/UserData.tsx
+6
-5
src/modules/teach-tool/paper-manage/OperatePaper.jsx
+3
-3
src/modules/teach-tool/paper-manage/components/PaperList.jsx
+4
-4
src/modules/teach-tool/utils/dealTimeDuration.js
+25
-0
No files found.
src/modules/teach-tool/components/CourseCategorySiderTree.jsx
View file @
4a65aacb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-02-22 10:59:43
* @Date: 2021-02-22 10:59:43
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-04-10 1
0:59:32
* @LastEditTime: 2021-04-10 1
5:36:29
* @Description: 助学工具-侧边课程分类树
* @Description: 助学工具-侧边课程分类树
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -131,7 +131,7 @@ class CourseCategorySiderTree extends Component {
...
@@ -131,7 +131,7 @@ class CourseCategorySiderTree extends Component {
}
else
if
(
this
.
props
.
fromModule
===
"QUESTION_MODAL"
)
{
}
else
if
(
this
.
props
.
fromModule
===
"QUESTION_MODAL"
)
{
Bus
.
trigger
(
"queryQuestionModalList"
,
selectedKeys
[
0
]);
Bus
.
trigger
(
"queryQuestionModalList"
,
selectedKeys
[
0
]);
}
else
{
}
else
{
Bus
.
trigger
(
"queryPaperPageList"
,
selectedKeys
[
0
],
false
);
Bus
.
trigger
(
"queryPaperPageList"
,
selectedKeys
[
0
],
0
);
}
}
});
});
};
};
...
...
src/modules/teach-tool/examination-manager/UserData.tsx
View file @
4a65aacb
...
@@ -2,6 +2,7 @@ import React, { useState, useRef, useEffect } from 'react'
...
@@ -2,6 +2,7 @@ import React, { useState, useRef, useEffect } from 'react'
import
Service
from
"@/common/js/service"
;
import
Service
from
"@/common/js/service"
;
import
{
PageControl
}
from
"@/components"
;
import
{
PageControl
}
from
"@/components"
;
import
{
Input
,
Select
,
Tooltip
,
Table
,
Button
}
from
'antd'
;
import
{
Input
,
Select
,
Tooltip
,
Table
,
Button
}
from
'antd'
;
import
dealTimeDuration
from
"../utils/dealTimeDuration"
;
import
User
from
"@/common/js/user"
;
import
User
from
"@/common/js/user"
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
'./userData.less'
import
'./userData.less'
...
@@ -62,7 +63,7 @@ function DataAnalysic(props: any) {
...
@@ -62,7 +63,7 @@ function DataAnalysic(props: any) {
ascend
:
'CREATED_ASC'
,
ascend
:
'CREATED_ASC'
,
descend
:
'ACCURACY_DESC'
descend
:
'ACCURACY_DESC'
},
},
exam
Duration
:
{
user
Duration
:
{
ascend
:
'PASS_CNT_ASC'
,
ascend
:
'PASS_CNT_ASC'
,
descend
:
'CREATED_DESC'
descend
:
'CREATED_DESC'
},
},
...
@@ -144,10 +145,10 @@ function DataAnalysic(props: any) {
...
@@ -144,10 +145,10 @@ function DataAnalysic(props: any) {
},
},
{
{
title
:
"考试用时"
,
title
:
"考试用时"
,
dataIndex
:
"
exam
Duration"
,
dataIndex
:
"
user
Duration"
,
sorter
:
true
,
sorter
:
true
,
sortOrder
:
field
===
"
exam
Duration"
?
order
:
sortStatus
.
type
,
sortOrder
:
field
===
"
user
Duration"
?
order
:
sortStatus
.
type
,
render
:
(
text
:
any
)
=>
<
span
>
{
moment
(
text
).
format
(
"HH:mm:ss"
)
}
</
span
>,
render
:
(
text
:
any
)
=>
<
span
>
{
dealTimeDuration
(
Number
(
text
)
)
}
</
span
>,
},
},
...
@@ -210,7 +211,7 @@ function DataAnalysic(props: any) {
...
@@ -210,7 +211,7 @@ function DataAnalysic(props: any) {
<
div
className=
"subTitle"
>
平均分
</
div
>
<
div
className=
"subTitle"
>
平均分
</
div
>
</
div
>
</
div
>
<
div
className=
"item"
>
<
div
className=
"item"
>
<
div
className=
"num"
>
{
useData
.
averageDuration
||
0
}
</
div
>
<
div
className=
"num"
>
{
dealTimeDuration
(
useData
.
averageDuration
||
0
)
}
</
div
>
<
div
className=
"percent"
></
div
>
<
div
className=
"percent"
></
div
>
<
div
className=
"subTitle"
>
平均用时
</
div
>
<
div
className=
"subTitle"
>
平均用时
</
div
>
</
div
>
</
div
>
...
...
src/modules/teach-tool/paper-manage/OperatePaper.jsx
View file @
4a65aacb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-03-27 16:15:13
* @Date: 2021-03-27 16:15:13
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-04-10 1
1:04:26
* @LastEditTime: 2021-04-10 1
5:36:20
* @Description: 助学工具-新建/复制/编辑试卷
* @Description: 助学工具-新建/复制/编辑试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -327,7 +327,7 @@ class OperatePaper extends Component {
...
@@ -327,7 +327,7 @@ class OperatePaper extends Component {
window
.
RCHistory
.
push
({
window
.
RCHistory
.
push
({
pathname
:
`/paper-manage-index?categoryId=
${
categoryId
}
`
,
pathname
:
`/paper-manage-index?categoryId=
${
categoryId
}
`
,
});
});
Bus
.
trigger
(
"queryPaperPageList"
,
categoryId
,
true
);
Bus
.
trigger
(
"queryPaperPageList"
,
categoryId
,
selectQuestionList
.
length
);
Bus
.
trigger
(
"queryCategoryTree"
,
"remain"
);
Bus
.
trigger
(
"queryCategoryTree"
,
"remain"
);
}
}
});
});
...
@@ -343,7 +343,7 @@ class OperatePaper extends Component {
...
@@ -343,7 +343,7 @@ class OperatePaper extends Component {
"categoryId"
"categoryId"
)}
`
,
)}
`
,
});
});
Bus
.
trigger
(
"queryPaperPageList"
,
categoryId
,
true
);
Bus
.
trigger
(
"queryPaperPageList"
,
categoryId
,
selectQuestionList
.
length
);
}
}
});
});
}
}
...
...
src/modules/teach-tool/paper-manage/components/PaperList.jsx
View file @
4a65aacb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-02-25 11:23:47
* @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-04-10 1
1:03:26
* @LastEditTime: 2021-04-10 1
5:37:25
* @Description: 助学工具-题库-试卷列表数据
* @Description: 助学工具-题库-试卷列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -54,11 +54,11 @@ class PaperList extends Component {
...
@@ -54,11 +54,11 @@ class PaperList extends Component {
componentDidMount
()
{
componentDidMount
()
{
this
.
queryPaperPageList
();
this
.
queryPaperPageList
();
Bus
.
bind
(
"queryPaperPageList"
,
(
selectedCategoryId
,
delay
)
=>
{
Bus
.
bind
(
"queryPaperPageList"
,
(
selectedCategoryId
,
count
)
=>
{
selectedCategoryId
=
selectedCategoryId
=
selectedCategoryId
===
"null"
?
null
:
selectedCategoryId
;
selectedCategoryId
===
"null"
?
null
:
selectedCategoryId
;
this
.
setState
({
loading
:
true
});
this
.
setState
({
loading
:
true
});
if
(
delay
)
{
if
(
count
>=
100
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
InitSearch
(
selectedCategoryId
);
this
.
InitSearch
(
selectedCategoryId
);
},
5000
);
},
5000
);
...
@@ -73,7 +73,7 @@ class PaperList extends Component {
...
@@ -73,7 +73,7 @@ class PaperList extends Component {
}
}
// 初始化列表查询
// 初始化列表查询
InitSearch
=
(
categoryId
,
delay
)
=>
{
InitSearch
=
(
categoryId
)
=>
{
const
_query
=
{
const
_query
=
{
...
this
.
state
.
query
,
...
this
.
state
.
query
,
categoryId
,
categoryId
,
...
...
src/modules/teach-tool/utils/dealTimeDuration.js
0 → 100644
View file @
4a65aacb
/*
* @Author: 吴文洁
* @Date: 2020-08-20 14:51:18
* @LastEditors: yuananting
* @LastEditTime: 2021-04-10 15:29:16
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
const
dealTimeDuration
=
(
msTime
)
=>
{
let
time
=
msTime
/
1000
;
let
hour
=
Math
.
floor
(
time
/
60
/
60
)
%
24
>
9
?
Math
.
floor
(
time
/
60
/
60
)
%
24
:
"0"
+
(
Math
.
floor
(
time
/
60
/
60
)
%
24
);
let
minute
=
Math
.
floor
(
time
/
60
)
%
60
>
9
?
Math
.
floor
(
time
/
60
)
%
60
:
"0"
+
(
Math
.
floor
(
time
/
60
)
%
60
);
let
second
=
time
%
60
>
9
?
Math
.
round
(
time
%
60
)
:
"0"
+
Math
.
round
(
time
%
60
);
return
`
${
hour
}
:
${
minute
}
:
${
second
}
`
;
}
export
default
dealTimeDuration
;
\ No newline at end of file
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