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
1
Merge Requests
1
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
7b88a534
Commit
7b88a534
authored
Jul 06, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:培训计划学习进度接口联调
parent
5ca73a22
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
59 deletions
+57
-59
src/data-source/plan/request-apis.ts
+16
-16
src/modules/plan-manage/components/UserLearningDataFilter.jsx
+0
-0
src/modules/plan-manage/modal/UserLearnDetailModal.jsx
+32
-43
src/modules/plan-manage/modal/UserLearnDetailModal.less
+9
-0
No files found.
src/data-source/plan/request-apis.ts
View file @
7b88a534
/*
/*
* @Author: zhangleyuan
* @Author: zhangleyuan
* @Date: 2021-02-21 16:08:38
* @Date: 2021-02-21 16:08:38
* @LastEditors:
zhangleyuan
* @LastEditors:
yuananting
* @LastEditTime: 2021-0
3-09 12:54:31
* @LastEditTime: 2021-0
7-06 11:26:27
* @Description: 描述一下
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
import
Service
from
"@/common/js/service"
;
import
Service
from
'@/common/js/service'
;
export
function
getTrainingPlanPage
(
params
:
object
)
{
export
function
getTrainingPlanPage
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/getTrainingPlanPage"
,
params
);
return
Service
.
Hades
(
'public/hades/getTrainingPlanPage'
,
params
);
}
}
export
function
createTrainingPlan
(
params
:
object
)
{
export
function
createTrainingPlan
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/createTrainingPlan"
,
params
);
return
Service
.
Hades
(
'public/hades/createTrainingPlan'
,
params
);
}
}
export
function
updateStateTrainingPlan
(
params
:
object
)
{
export
function
updateStateTrainingPlan
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/updateStateTrainingPlan"
,
params
);
return
Service
.
Hades
(
'public/hades/updateStateTrainingPlan'
,
params
);
}
}
export
function
getTrainingPlanDetail
(
params
:
object
)
{
export
function
getTrainingPlanDetail
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/getTrainingPlanDetail"
,
params
);
return
Service
.
Hades
(
'public/hades/getTrainingPlanDetail'
,
params
);
}
}
export
function
updateTrainingPlan
(
params
:
object
)
{
export
function
updateTrainingPlan
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/updateTrainingPlan"
,
params
);
return
Service
.
Hades
(
'public/hades/updateTrainingPlan'
,
params
);
}
}
export
function
deleteTrainingPlan
(
params
:
object
)
{
export
function
deleteTrainingPlan
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/deleteTrainingPlan"
,
params
);
return
Service
.
Hades
(
'public/hades/deleteTrainingPlan'
,
params
);
}
}
export
function
getPlanUserRecordPage
(
params
:
object
)
{
export
function
getPlanUserRecordPage
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/getPlanUserRecordPage"
,
params
);
return
Service
.
Hades
(
'public/hades/getPlanUserRecordPage'
,
params
);
}
}
export
function
getPlanCustomerRecordPage
(
params
:
object
)
{
export
function
getPlanCustomerRecordPage
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/getPlanCustomerRecordPage"
,
params
);
return
Service
.
Hades
(
'public/hades/getPlanCustomerRecordPage'
,
params
);
}
}
export
function
getPlanCustomerDetail
(
params
:
object
)
{
export
function
getPlanCustomerDetail
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/getPlanCustomerDetail"
,
params
);
return
Service
.
Hades
(
'public/customerHades/getPlanCustomerDetail'
,
params
);
}
}
export
function
getPlanCustomerAboutUser
(
params
:
object
)
{
export
function
getPlanCustomerAboutUser
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/getPlanCustomerAboutUser"
,
params
);
return
Service
.
Hades
(
'public/hades/getPlanCustomerAboutUser'
,
params
);
}
}
export
function
removePlanCustomer
(
params
:
object
)
{
export
function
removePlanCustomer
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/removePlanCustomer"
,
params
);
return
Service
.
Hades
(
'public/hades/removePlanCustomer'
,
params
);
}
}
export
function
getStorePlanAll
(
params
:
object
)
{
export
function
getStorePlanAll
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/getStorePlanAll"
,
params
);
return
Service
.
Hades
(
'public/hades/getStorePlanAll'
,
params
);
}
}
export
function
getTrainingCourseAutoCancel
(
params
:
object
)
{
export
function
getTrainingCourseAutoCancel
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/getTrainingCourseAutoCancel"
,
params
);
return
Service
.
Hades
(
'public/hades/getTrainingCourseAutoCancel'
,
params
);
}
}
src/modules/plan-manage/components/UserLearningDataFilter.jsx
View file @
7b88a534
This diff is collapsed.
Click to expand it.
src/modules/plan-manage/modal/UserLearnDetailModal.jsx
View file @
7b88a534
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-07-05 10:50:30
* @Date: 2021-07-05 10:50:30
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-07-0
5 11:05:31
* @LastEditTime: 2021-07-0
6 13:53:12
* @Description: 描述一下咯
* @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...
@@ -80,27 +80,6 @@ class UserLearnDetailModal extends React.Component {
...
@@ -80,27 +80,6 @@ class UserLearnDetailModal extends React.Component {
learnFinishPercentage
,
learnFinishPercentage
,
coverUrl
:
coverUrl
||
defaultCover
,
coverUrl
:
coverUrl
||
defaultCover
,
};
};
taskCustomerVOList
.
map
((
item
)
=>
{
let
videoClass
=
item
.
courseVOList
&&
item
.
courseVOList
.
filter
((
childItem
,
childIndex
)
=>
{
return
(
childItem
.
courseType
=
'VOICE'
);
});
videoClass
.
map
((
chapterItem
,
chapterIndex
)
=>
{
chapterItem
.
chapterList
=
[
{
chapterName
:
'第一节1'
,
percentage
:
'80%'
,
},
{
chapterName
:
'第一节2'
,
percentage
:
'10%'
,
},
];
return
chapterItem
;
});
return
item
;
});
this
.
setState
({
this
.
setState
({
storeCustomerName
,
storeCustomerName
,
storeCustomerPhone
,
storeCustomerPhone
,
...
@@ -207,14 +186,28 @@ class UserLearnDetailModal extends React.Component {
...
@@ -207,14 +186,28 @@ class UserLearnDetailModal extends React.Component {
const
columns
=
[
const
columns
=
[
{
{
title
:
'课节名称'
,
title
:
'课节名称'
,
key
:
'
chapterN
ame'
,
key
:
'
n
ame'
,
dataIndex
:
'
chapterN
ame'
,
dataIndex
:
'
n
ame'
,
width
:
'80%'
,
width
:
'80%'
,
render
:
(
val
,
record
,
index
)
=>
{
return
(
<
div
className=
'chapter-record'
>
<
span
>
{
chapterIndex
+
1
}
.
{
index
+
1
}
</
span
>
<
img
className=
'chapter-img'
src=
'https://image.xiaomaiketang.com/xm/TKwbQGYDBR.png'
/>
<
span
>
{
record
.
name
}
</
span
>
</
div
>
);
},
},
},
{
{
title
:
'学习进度'
,
title
:
'学习进度'
,
key
:
'percentage'
,
key
:
'watchProgress'
,
dataIndex
:
'percentage'
,
dataIndex
:
'watchProgress'
,
render
:
(
val
,
record
)
=>
{
return
<
span
>
{
val
}
%
</
span
>;
},
},
},
];
];
return
columns
;
return
columns
;
...
@@ -252,41 +245,37 @@ class UserLearnDetailModal extends React.Component {
...
@@ -252,41 +245,37 @@ class UserLearnDetailModal extends React.Component {
dataSource=
{
taskDataSource
}
dataSource=
{
taskDataSource
}
columns=
{
this
.
parseTaskColumns
()
}
columns=
{
this
.
parseTaskColumns
()
}
pagination=
{
false
}
pagination=
{
false
}
expandedRowRender=
{
(
record
,
index
)
=>
{
expandable=
{
{
if
(
!
record
.
courseVOList
)
{
expandedRowRender
:
(
record
,
index
)
=>
{
return
;
}
if
(
record
.
courseVOList
.
length
!==
0
)
{
return
(
return
(
<
div
>
<
div
>
<
Table
<
Table
showHeader=
{
false
}
showHeader=
{
false
}
pagination=
{
false
}
className=
'child-table'
rowKey=
{
(
record
)
=>
record
.
courseId
}
dataSource=
{
record
.
courseVOList
}
dataSource=
{
record
.
courseVOList
}
columns=
{
this
.
parseCourseColumns
(
index
)
}
columns=
{
this
.
parseCourseColumns
(
index
)
}
className=
'child-table'
pagination=
{
false
}
expandedRowRender=
{
(
chapterRecord
,
chapterIndex
)
=>
{
expandable=
{
{
if
(
!
chapterRecord
.
chapterList
)
{
expandedRowRender
:
(
chapterRecord
,
chapterIndex
)
=>
{
return
;
}
if
(
chapterRecord
.
chapterList
.
length
!==
0
)
{
return
(
return
(
<
div
>
<
div
>
<
Table
<
Table
showHeader=
{
false
}
showHeader=
{
false
}
pagination=
{
false
}
dataSource=
{
chapterRecord
.
courseChapterList
}
dataSource=
{
chapterRecord
.
chapterList
}
columns=
{
this
.
parseChapterColumns
(
chapterIndex
)
}
columns=
{
this
.
parseChapterColumns
(
chapterIndex
)
}
className=
'chapter-table'
pagination=
{
false
}
/>
/>
</
div
>
</
div
>
);
);
}
},
rowExpandable
:
(
record
)
=>
record
.
courseChapterList
&&
record
.
courseChapterList
.
length
!==
0
,
}
}
}
}
/>
/>
</
div
>
</
div
>
);
);
}
},
rowExpandable
:
(
record
)
=>
record
.
courseVOList
&&
record
.
courseVOList
.
length
!==
0
,
}
}
}
}
rowClassName=
{
(
record
,
index
)
=>
{
rowClassName=
{
(
record
,
index
)
=>
{
if
(
index
%
2
===
0
)
{
if
(
index
%
2
===
0
)
{
...
...
src/modules/plan-manage/modal/UserLearnDetailModal.less
View file @
7b88a534
...
@@ -57,6 +57,15 @@
...
@@ -57,6 +57,15 @@
}
}
}
}
}
}
.chapter-record {
display: flex;
align-items: center;
.chapter-img {
width: 18px;
height: 18px;
margin: 0 10px;
}
}
.record-name {
.record-name {
display: flex;
display: flex;
.img-con {
.img-con {
...
...
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