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
2c634bc6
Commit
2c634bc6
authored
Mar 09, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理任务排序
parent
b3ffb2aa
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
272 additions
and
61 deletions
+272
-61
src/data-source/plan/request-apis.ts
+5
-1
src/data-source/store/request-apis.ts
+3
-1
src/domains/plan-domain/planService.ts
+6
-2
src/modules/plan-manage/AddPlan.jsx
+15
-4
src/modules/plan-manage/components/ExpiredCourseList.jsx
+15
-5
src/modules/plan-manage/components/TrainingTask.jsx
+120
-48
src/modules/plan-manage/components/TrainingTask.less
+106
-0
src/modules/plan-manage/modal/relatedCourseModal.jsx
+2
-0
No files found.
src/data-source/plan/request-apis.ts
View file @
2c634bc6
...
...
@@ -2,7 +2,7 @@
* @Author: zhangleyuan
* @Date: 2021-02-21 16:08:38
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-0
5 14:04:52
* @LastEditTime: 2021-03-0
9 12:54:31
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -44,3 +44,6 @@ export function removePlanCustomer(params: object) {
export
function
getStorePlanAll
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/getStorePlanAll"
,
params
);
}
export
function
getTrainingCourseAutoCancel
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/getTrainingCourseAutoCancel"
,
params
);
}
\ No newline at end of file
src/data-source/store/request-apis.ts
View file @
2c634bc6
...
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-25 18:25:02
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-0
8 11:47:58
* @LastEditTime: 2021-03-0
9 10:28:03
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -74,3 +74,5 @@ export function updateStoreMessage(params: object) {
export
function
getStoreDetail
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/getStoreDetail"
,
params
);
}
src/domains/plan-domain/planService.ts
View file @
2c634bc6
...
...
@@ -2,11 +2,11 @@
* @Author: zhangleyuan
* @Date: 2021-02-21 16:15:38
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-0
5 14:04:25
* @LastEditTime: 2021-03-0
9 12:54:46
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
{
getTrainingPlanPage
,
createTrainingPlan
,
updateStateTrainingPlan
,
getTrainingPlanDetail
,
updateTrainingPlan
,
deleteTrainingPlan
,
getPlanUserRecordPage
,
getPlanCustomerRecordPage
,
getPlanCustomerDetail
,
getPlanCustomerAboutUser
,
removePlanCustomer
,
getStorePlanAll
}
from
'@/data-source/plan/request-apis'
;
import
{
getTrainingPlanPage
,
createTrainingPlan
,
updateStateTrainingPlan
,
getTrainingPlanDetail
,
updateTrainingPlan
,
deleteTrainingPlan
,
getPlanUserRecordPage
,
getPlanCustomerRecordPage
,
getPlanCustomerDetail
,
getPlanCustomerAboutUser
,
removePlanCustomer
,
getStorePlanAll
,
getTrainingCourseAutoCancel
}
from
'@/data-source/plan/request-apis'
;
export
default
class
PlanService
{
// 获取员工列表
static
getTrainingPlanPage
(
params
:
any
)
{
...
...
@@ -45,4 +45,7 @@ export default class PlanService {
static
getStorePlanAll
(
params
:
any
)
{
return
getStorePlanAll
(
params
);
}
static
getTrainingCourseAutoCancel
(
params
:
any
)
{
return
getTrainingCourseAutoCancel
(
params
);
}
}
\ No newline at end of file
src/modules/plan-manage/AddPlan.jsx
View file @
2c634bc6
...
...
@@ -2,7 +2,7 @@
* @Author: zhangleyuan
* @Date: 2021-02-20 16:13:39
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-0
8 18:19:14
* @LastEditTime: 2021-03-0
9 12:54:53
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -27,7 +27,8 @@ const defaultBasicData = {
instro
:
''
,
operateType
:
'All_Operate'
,
percentCompleteLive
:
80
,
percentCompleteVideo
:
80
percentCompleteVideo
:
80
,
}
const
defaultTaskList
=
[];
...
...
@@ -36,11 +37,21 @@ function AddPlan() {
const
type
=
getParameterByName
(
"type"
);
const
[
basicData
,
setBasicData
]
=
useState
(
defaultBasicData
);
const
[
taskList
,
setTaskList
]
=
useState
(
defaultTaskList
);
const
[
expiredCourseList
,
setExpiredCourseList
]
=
useState
([]);
useEffect
(()
=>
{
if
(
type
===
'edit'
){
getPlanDetail
();
getPlanCustomerState
();
}
},
id
)
function
getPlanCustomerState
(){
PlanService
.
getTrainingCourseAutoCancel
({
planId
:
id
}).
then
((
res
)
=>
{
const
expiredCourseList
=
res
.
result
;
setExpiredCourseList
(
expiredCourseList
)
})
}
function
getPlanDetail
(){
PlanService
.
getTrainingPlanDetail
({
planId
:
id
...
...
@@ -220,10 +231,10 @@ function AddPlan() {
<
TrainingTask
data=
{
taskList
}
onChange=
{
handleChangeTaskInfo
}
/>
}
</
div
>
{
type
===
'edit'
&&
{
(
type
===
'edit'
&&
expiredCourseList
.
length
>
0
)
&&
<
div
className=
"expired-info__wrap"
>
<
div
className=
"title"
>
失效课程
</
div
>
<
ExpiredCourseList
/>
<
ExpiredCourseList
expiredCourseList=
{
expiredCourseList
}
/>
</
div
>
}
</
div
>
...
...
src/modules/plan-manage/components/ExpiredCourseList.jsx
View file @
2c634bc6
...
...
@@ -4,33 +4,43 @@ import { withRouter } from 'react-router-dom';
import
User
from
'@/common/js/user'
;
import
'./ExpiredCourseList.less'
;
function
ExpiredCourseList
()
{
function
ExpiredCourseList
(
props
)
{
return
(
<
div
className=
"expired-course-list"
>
<
div
className=
"course-item"
>
{
props
.
expiredCourseList
.
map
((
item
,
index
)
=>
{
return
<
div
className=
"course-item"
>
<
div
className=
"course-left"
>
<
div
className=
"course-status"
>
未成功开课
</
div
>
<
div
className=
"course-info"
>
<
div
className=
"course-type"
>
{
item
.
courseType
===
"LIVE"
&&
<
span
>
直播课
</
span
>
}
{
item
.
courseType
===
"VOICE "
&&
<
span
>
视频课
</
span
>
}
</
div
>
<
div
className=
"course-instro"
>
<
div
className=
"course-name"
>
课程名称最多四十个字课程名称最多四十个字课程名称最多四十个字课程名称最多四十个字
{
item
.
courseName
}
</
div
>
<
div
className=
"task-name"
>
培训名称最多二十个字培训名称最多二十个字
{
item
.
taskName
}
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
"course-time"
>
上课时间:47238095327
上课时间:
{
formatDate
(
'YYYY-MM-DD H:i'
,
item
.
startTime
)
}
</
div
>
</
div
>
})
}
</
div
>
);
}
...
...
src/modules/plan-manage/components/TrainingTask.jsx
View file @
2c634bc6
This diff is collapsed.
Click to expand it.
src/modules/plan-manage/components/TrainingTask.less
View file @
2c634bc6
...
...
@@ -2,4 +2,110 @@
thead{
display:none;
}
.ant-form-item{
margin-bottom:0 !important;
}
.task-item{
.task-con{
display:flex;
padding:16px;
background: #F7F8F9;
border-radius: 2px;
justify-content: space-between;
align-items: center;
.task-instro{
display:flex;
align-items: center;
.open-icon{
color:#999999;
font-size:10px;
}
.task-name-con{
display:flex;
align-items: center;
color:#333333;
font-size:14px;
.number{
margin-right:10px;
margin-left:10px;
}
.task-name-input{
width: 300px;
height: 32px;
background: #FFFFFF;
border-radius: 4px;
}
}
}
}
.operate{
.operate__item{
cursor:pointer;
margin-left:16px;
color:#666666;
font-size:14px;
.icon{
color:#999;
}
.text{
margin-left:8px;
}
}
}
.course-box{
.course-item{
display:flex;
padding:16px 16px 16px 51px;
justify-content: space-between;
align-items: center;
.course-info{
.ant-form{
display:inline-block;
}
.course-name-input{
margin-right:8px;
}
.course-type{
font-size:11px;
color:#666666;
padding:1px 8px;
border: 1px solid #999999;
margin-right:4px;
border-radius: 2px;
}
.course-name{
color:#666666;
font-size:14px;
margin-right:8px;
}
.tip{
font-size:14px;
color:#FF4F4F;
margin-right:2px;
}
.course-state{
color:#999;
font-size:14px;
}
}
}
.add-course-con{
padding:16px 51px;
color: #5289FA;
font-size:14px;
}
}
}
.add-task-con{
height: 52px;
background: #F7F8F9;
border-radius: 2px;
padding:16px;
margin-top:16px;
.add-task-btn{
color: #5289FA;
font-size:14px;
}
}
}
src/modules/plan-manage/modal/relatedCourseModal.jsx
View file @
2c634bc6
...
...
@@ -295,6 +295,7 @@ class SelectOperatorModal extends React.Component {
_item
.
courseId
=
item
.
id
;
_item
.
courseType
=
"VOICE"
;
_item
.
courseName
=
item
.
courseName
;
return
_item
;
})
}
...
...
@@ -304,6 +305,7 @@ class SelectOperatorModal extends React.Component {
_item
.
courseId
=
item
.
liveCourseId
;
_item
.
courseType
=
"LIVE"
;
_item
.
courseName
=
item
.
courseName
;
_item
.
courseState
=
item
.
courseState
;
return
_item
;
})
}
...
...
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