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
7c14f866
Commit
7c14f866
authored
Mar 05, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理培训计划
parent
f1660f92
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
301 additions
and
17 deletions
+301
-17
src/data-source/course/request-api.ts
+5
-1
src/domains/course-domain/CourseService.ts
+6
-2
src/modules/course-manage/components/LiveCourseList.jsx
+5
-2
src/modules/course-manage/modal/RelatedPlanModal.jsx
+89
-11
src/modules/course-manage/modal/RelatedPlanModal.less
+121
-0
src/modules/plan-manage/modal/relatedCourseModal.jsx
+0
-1
src/modules/store-manage/StoreInfo.jsx
+75
-0
No files found.
src/data-source/course/request-api.ts
View file @
7c14f866
...
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-12-12 11:57:10
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-0
2-28 13:47:38
* @LastEditTime: 2021-0
3-05 17:20:29
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -85,3 +85,6 @@ export function videoWatchInfo(params: object) {
export
function
videoScheduleBasePage
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/videoScheduleBasePage"
,
params
);
}
export
function
relatedCourseToPlan
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/relatedCourseToPlan"
,
params
);
}
\ No newline at end of file
src/domains/course-domain/CourseService.ts
View file @
7c14f866
...
...
@@ -2,14 +2,14 @@
* @Author: wufan
* @Date: 2020-11-25 18:25:02
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-0
2-28 15:15:37
* @LastEditTime: 2021-0
3-05 17:20:56
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
{
fetchLecturerData
,
fetchUserData
,
exportStudentCourseData
,
exportPlayBackCourseData
,
fetchPlaybackList
,
createLiveCloudCourse
,
getLiveCloudCoursePage
,
getLiveCloudCourseDetail
,
updateLiveCloudCourse
,
turnOnOrOffLiveCloudCourse
,
delLiveCloudCourse
,
changeVideoShelfState
,
createVideoSchedule
,
delVideoSchedule
,
editVideoSchedule
,
userWatchInfo
,
videoSchedulePage
,
videoScheduleDetail
,
videoWatchInfo
,
getQrcode
,
getLiveCloudCourseBasePage
,
videoScheduleBasePage
editVideoSchedule
,
userWatchInfo
,
videoSchedulePage
,
videoScheduleDetail
,
videoWatchInfo
,
getQrcode
,
getLiveCloudCourseBasePage
,
videoScheduleBasePage
,
relatedCourseToPlan
}
from
'@/data-source/course/request-api'
;
export
default
class
courseService
{
...
...
@@ -91,4 +91,7 @@ export default class courseService {
static
videoScheduleBasePage
(
params
:
any
){
return
videoScheduleBasePage
(
params
);
}
static
relatedCourseToPlan
(
params
:
any
){
return
relatedCourseToPlan
(
params
);
}
}
\ No newline at end of file
src/modules/course-manage/components/LiveCourseList.jsx
View file @
7c14f866
...
...
@@ -663,7 +663,8 @@ class LiveCourseList extends React.Component {
}
handleRelatedModalShow
=
(
item
)
=>
{
this
.
setState
({
RelatedPlanModalVisible
:
true
RelatedPlanModalVisible
:
true
,
selectCourseId
:
item
.
liveCourseId
})
}
closeRelatedPlanModalVisible
=
()
=>
{
...
...
@@ -678,7 +679,8 @@ class LiveCourseList extends React.Component {
downloadUrl
,
url
,
columns
,
openCoursewareModal
,
editData
,
RelatedPlanModalVisible
RelatedPlanModalVisible
,
selectCourseId
}
=
this
.
state
;
const
{
match
}
=
this
.
props
;
...
...
@@ -733,6 +735,7 @@ class LiveCourseList extends React.Component {
<
RelatedPlanModal
onClose=
{
this
.
closeRelatedPlanModalVisible
}
visible=
{
RelatedPlanModalVisible
}
selectCourseId=
{
selectCourseId
}
/>
}
<
iframe
src=
{
url
}
style=
{
{
display
:
"none"
}
}
/>
...
...
src/modules/course-manage/modal/RelatedPlanModal.jsx
View file @
7c14f866
import
React
from
'react'
;
import
{
Table
,
Modal
,
Input
}
from
'antd'
;
import
{
PageControl
}
from
"@/components"
;
import
PlanService
from
'@/domains/plan-domain/planService'
import
CourseService
from
"@/domains/course-domain/CourseService"
;
import
PlanService
from
"@/domains/plan-domain/planService"
;
import
User
from
'@/common/js/user'
import
'./RelatedPlanModal.less'
;
import
_
from
"underscore"
;
...
...
@@ -16,6 +17,7 @@ class RelatedPlanModal extends React.Component {
current
:
1
,
},
totalCount
:
0
,
selectPlanList
:{},
};
}
componentDidMount
()
{
...
...
@@ -34,12 +36,13 @@ class RelatedPlanModal extends React.Component {
const
{
result
=
{}
}
=
res
;
const
{
records
=
[],
total
=
0
}
=
result
;
this
.
setState
({
dataSource
:
re
sult
,
//
totalCount: Number(total)
dataSource
:
re
cords
,
totalCount
:
Number
(
total
)
});
});
}
handleChangePlanName
=
(
value
)
=>
{
const
{
query
}
=
this
.
state
;
query
.
planName
=
value
;
query
.
current
=
1
;
this
.
setState
({
...
...
@@ -88,8 +91,51 @@ class RelatedPlanModal extends React.Component {
];
return
columns
;
}
selectPlanList
=
(
record
,
selected
,
planId
)
=>
{
const
{
selectPlanList
}
=
this
.
state
;
let
_selectPlanList
=
{...
selectPlanList
};
if
(
selected
)
{
if
(
!
_selectPlanList
[
planId
]){
_selectPlanList
[
planId
]
=
{}
}
_selectPlanList
[
planId
].
taskBaseVOList
=
[];
_selectPlanList
[
planId
].
planId
=
planId
;
_selectPlanList
[
planId
].
taskBaseVOList
.
push
(
record
);
}
else
{
if
(
!
_selectPlanList
[
planId
]){
_selectPlanList
[
planId
]
=
{}
}
_selectPlanList
[
planId
].
taskBaseVOList
=
[];
_selectPlanList
[
planId
].
planId
=
planId
;
}
this
.
setState
({
selectPlanList
:
_selectPlanList
});
}
handleSelectPlanListData
(
selectPlanList
){
let
_selectPlanList
=
[];
for
(
let
key
in
selectPlanList
){
let
item
=
{};
if
(
selectPlanList
[
key
].
taskBaseVOList
){
item
.
planId
=
selectPlanList
[
key
].
planId
;
item
.
taskId
=
selectPlanList
[
key
].
taskBaseVOList
[
0
].
taskId
;
}
_selectPlanList
.
push
(
item
)
}
return
_selectPlanList
;
}
confirmRelatedPlan
=
()
=>
{
const
{
selectPlanList
}
=
this
.
state
;
const
params
=
{
courseId
:
this
.
props
.
selectCourseId
,
relatedPlanList
:
this
.
handleSelectPlanListData
(
selectPlanList
),
storeId
:
User
.
getStoreId
(),
}
CourseService
.
relatedCourseToPlan
(
params
).
then
((
res
)
=>
{
this
.
props
.
onClose
();
});
}
render
()
{
const
{
size
,
dataSource
,
totalCount
,
query
,
selectOperatorList
}
=
this
.
state
;
const
{
size
,
dataSource
,
totalCount
,
query
,
selectOperatorList
,
selectPlanList
}
=
this
.
state
;
const
{
visible
}
=
this
.
props
;
return
(
<
Modal
...
...
@@ -100,11 +146,21 @@ class RelatedPlanModal extends React.Component {
className=
"related-plan-modal"
closable=
{
true
}
width=
{
800
}
onOk=
{
()
=>
this
.
props
.
onSelect
(
selectOperatorList
)
}
onOk=
{
()
=>
this
.
confirmRelatedPlan
(
)
}
closeIcon=
{
<
span
className=
"icon iconfont modal-close-icon"
>

</
span
>
}
>
<
div
className=
"search-container"
>
<
Search
placeholder=
"搜索培训计划名称"
style=
{
{
width
:
200
}
}
onChange=
{
(
e
)
=>
{
this
.
handleChangePlanName
(
e
.
target
.
value
)}
}
onSearch=
{
()
=>
{
this
.
handleFetchDataList
()}
}
/>
<
Search
placeholder=
"搜索培训计划名称"
style=
{
{
width
:
207
}
}
onChange=
{
(
e
)
=>
{
this
.
handleChangePlanName
(
e
.
target
.
value
)}
}
onSearch=
{
()
=>
{
this
.
handleFetchDataList
()}
}
enterButton=
{
<
span
className=
"icon iconfont"
>

</
span
>
}
/>
</
div
>
<
div
className=
"select-container"
>
<
span
className=
"icon iconfont tip"
>

</
span
>
<
span
className=
"text"
>
已选择3个任务
</
span
>
<
span
className=
"clear"
>
清空
</
span
>
</
div
>
<
div
>
<
Table
...
...
@@ -113,19 +169,41 @@ class RelatedPlanModal extends React.Component {
dataSource=
{
dataSource
}
columns=
{
this
.
parsePlanColumns
()
}
pagination=
{
false
}
expandedRowRender=
{
(
record
,
index
)
=>
{
if
(
!
record
.
taskBaseVOList
){
expandedRowRender=
{
(
_
record
,
index
)
=>
{
if
(
!
_
record
.
taskBaseVOList
){
return
}
if
(
record
.
taskBaseVOList
.
length
!==
0
){
if
(
_record
.
taskBaseVOList
.
length
!==
0
){
const
selectPlan
=
selectPlanList
[
_record
.
planId
]
let
taskBaseVOList
=
[];
if
(
selectPlan
){
taskBaseVOList
=
selectPlan
.
taskBaseVOList
;
}
console
.
log
(
'taskBaseVOList'
,
taskBaseVOList
);
return
<
div
>
<
Table
rowKey=
{
record
=>
record
.
taskId
}
pagination=
{
false
}
dataSource=
{
record
.
taskBaseVOList
}
dataSource=
{
_
record
.
taskBaseVOList
}
columns=
{
this
.
parseTaskColumns
(
index
)
}
className=
"child-table"
rowSelection=
{
{
type
:
'checkbox'
type
:
'checkbox'
,
selectedRowKeys
:
_
.
pluck
(
taskBaseVOList
,
'taskId'
),
onSelect
:
(
record
,
selected
)
=>
{
this
.
selectPlanList
(
record
,
selected
,
_record
.
planId
);
},
onSelectAll
:
(
selected
,
_selectedRows
,
changeRows
)
=>
{
// let _list = [];
// if (selected)
{
// _list = _.uniq(selectVideo.concat(changeRows), false, (item) => item.id);
//
}
else
{
// _list = _.reject(selectVideo, (item) => _.find(changeRows, (data) => data.id === item.id));
//
}
// this.setState(
{
selectVideo
:
_list
});
},
}
}
/>
</
div
>
...
...
src/modules/course-manage/modal/RelatedPlanModal.less
View file @
7c14f866
.related-plan-modal{
.search-container{
margin-bottom:16px;
}
.select-container{
margin-bottom:12px;
background: #FFF4DD;
border-radius: 4px;
padding:6px 16px;
width: 207px;
height: 32px;
.tip{
font-size:14px;
color:#FF9D14;
margin-right:8px;
}
.text{
font-size:14px;
color:#666;
margin-right:30px;
}
.clear{
color:#5289FA;
font-size:14px;
}
}
.plan-table{
.taskName{
color:#666666;
font-size:14px;
}
.task-learn-percentage{
color:#666666;
font-size:14px;
}
.course-info{
margin-left:57px;
.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;
}
}
.ant-table-content{
border:1px solid #e8e8e8;
tr{
td{
border:none;
}
.child-table{
.ant-table-content{
border:none;
thead{
display:none;
}
tbody tr td{
border-bottom:none;
}
}
}
}
.odd-row{
background:transparent;
td{
background: #FFF;
}
& + .ant-table-expanded-row{
background:transparent;
td{
background: #FFF;
}
}
&:hover{
& + .ant-table-expanded-row{
background:transparent;
td{
background: #F3f6fa !important;
}
}
}
}
.even-row{
background:transparent;
td{
background: #FAFAFA;
}
& + .ant-table-expanded-row{
background:transparent;
td{
background: #FAFAFA;
}
}
&:hover{
& + .ant-table-expanded-row{
background:transparent;
td{
background: #F3f6fa !important;
}
}
}
}
}
}
}
\ No newline at end of file
src/modules/plan-manage/modal/relatedCourseModal.jsx
View file @
7c14f866
...
...
@@ -340,7 +340,6 @@ class SelectOperatorModal extends React.Component {
onSelect
:
(
record
,
selected
)
=>
{
this
.
selectVideoList
(
record
,
selected
);
},
onSelectAll
:
(
selected
,
_selectedRows
,
changeRows
)
=>
{
let
_list
=
[];
if
(
selected
)
{
...
...
src/modules/store-manage/StoreInfo.jsx
View file @
7c14f866
import
React
from
'react'
;
import
{
withRouter
}
from
"react-router-dom"
;
import
{
Form
,
Input
,
Button
,
Checkbox
,
Select
}
from
'antd'
;
class
StoreInfo
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
...
...
@@ -9,6 +10,80 @@ class StoreInfo extends React.Component {
render
()
{
return
(
<
div
className=
"page"
>
<
div
className=
"content-header"
>
店铺基本信息
</
div
>
<
div
className=
"box"
>
<
div
>
<
Form
>
<
Form
.
Item
label=
"店铺简称"
name=
"storeName"
rules=
{
[{
required
:
true
,
message
:
'Please input your username!'
}]
}
>
<
Input
style=
{
{
width
:
'300px'
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"店铺名称"
name=
"storeFullName"
rules=
{
[{
required
:
true
,
message
:
'Please input your username!'
}]
}
>
<
Input
style=
{
{
width
:
'300px'
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"店铺logo"
>
<
img
src=
""
></
img
>
</
Form
.
Item
>
<
Form
.
Item
label=
"店铺类型"
name=
"subjectType"
rules=
{
[{
required
:
true
}]
}
>
<
Select
placeholder=
"Select a option and change input text above"
allowClear
style=
{
{
width
:
'300px'
}
}
>
<
Option
value=
"COMPANY"
>
male
</
Option
>
<
Option
value=
"INSTITUTION"
>
female
</
Option
>
<
Option
value=
"ELSE"
>
other
</
Option
>
<
Option
value=
"TEAM "
>
other
</
Option
>
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
label=
"店铺所属行业"
rules=
{
[{
required
:
true
}]
}
name=
"corpIndustry"
>
<
Select
placeholder=
"Select a option and change input text above"
style=
{
{
width
:
'300px'
}
}
allowClear
>
<
Option
value=
"male"
>
male
</
Option
>
<
Option
value=
"female"
>
female
</
Option
>
<
Option
value=
"other"
>
other
</
Option
>
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
label=
"店铺所属子类行业"
rules=
{
[{
required
:
true
}]
}
name=
"corpSubIndustry"
>
<
Select
placeholder=
"Select a option and change input text above"
allowClear
style=
{
{
width
:
'300px'
}
}
>
<
Option
value=
"male"
>
male
</
Option
>
<
Option
value=
"female"
>
female
</
Option
>
<
Option
value=
"other"
>
other
</
Option
>
</
Select
>
</
Form
.
Item
>
</
Form
>
</
div
>
<
div
><
Button
type=
"primary"
>
更新信息
</
Button
></
div
>
</
div
>
</
div
>
)
...
...
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