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
6e5f9023
Commit
6e5f9023
authored
May 20, 2021
by
chenshu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复管理端部分问题
parent
d9637fd4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
4 deletions
+38
-4
src/modules/course-manage/offline-course/AddOfflineCourse.jsx
+35
-2
src/modules/course-manage/offline-course/components/OfflineCourseList.jsx
+3
-2
No files found.
src/modules/course-manage/offline-course/AddOfflineCourse.jsx
View file @
6e5f9023
...
...
@@ -215,7 +215,7 @@ class AddOfflineCourse extends React.Component {
startTimeApply
,
endTimeApply
,
quota
:
quota
<
0
?
null
:
quota
,
oldQuta
:
quota
<
0
?
null
:
quota
,
oldQuta
:
quota
,
calendarTime
,
signInTimeNum
,
signInTimeUnit
,
...
...
@@ -588,7 +588,7 @@ class AddOfflineCourse extends React.Component {
}
else
if
(
!
data
.
startTime
||
!
data
.
endTime
){
message
.
warning
(
'请选择上课时间'
);
resolve
(
false
);
}
else
if
(
moment
(
moment
(
data
.
calendarTime
[
0
]).
format
(
'YYYY-MM-DD'
)
+
moment
(
data
.
end
Time
).
format
(
' HH:mm'
)).
valueOf
()
<
Date
.
now
()){
}
else
if
(
moment
(
moment
(
data
.
calendarTime
[
0
]).
format
(
'YYYY-MM-DD'
)
+
moment
(
data
.
start
Time
).
format
(
' HH:mm'
)).
valueOf
()
<
Date
.
now
()){
message
.
warning
(
'上课时间不能早于现在'
);
resolve
(
false
);
}
else
if
(
data
.
startTime
>
data
.
endTime
){
...
...
@@ -1018,6 +1018,38 @@ class AddOfflineCourse extends React.Component {
format=
{
"YYYY-MM-DD HH:mm"
}
onChange=
{
(
dates
)
=>
{
this
.
handleChangeDates
(
dates
)
}
}
style=
{
{
width
:
"calc(100% - 70px)"
}
}
renderExtraFooter=
{
()
=>
calendarTime
[
0
]
?
<
div
style=
{
{
position
:
'absolute'
,
bottom
:
8
,
cursor
:
'pointer'
}
}
>
<
span
onClick=
{
()
=>
this
.
setState
({
startTimeApply
:
moment
(
calendarTime
[
0
]).
subtract
(
1
,
'days'
).
valueOf
(),
endTimeApply
:
calendarTime
[
0
]
})
}
style=
{
{
color
:
'#FFB714'
,
border
:
'1px solid #FFB714'
,
padding
:
'2px 8px'
,
borderRadius
:
'2px'
,
marginRight
:
8
,
}
}
>
上课前1天
</
span
>
<
span
onClick=
{
()
=>
this
.
setState
({
startTimeApply
:
moment
(
calendarTime
[
0
]).
subtract
(
2
,
'days'
).
valueOf
(),
endTimeApply
:
calendarTime
[
0
]
})
}
style=
{
{
color
:
'#FFB714'
,
border
:
'1px solid #FFB714'
,
padding
:
'2px 8px'
,
borderRadius
:
'2px'
,
marginRight
:
8
,
}
}
>
上课前2天
</
span
>
<
span
onClick=
{
()
=>
this
.
setState
({
startTimeApply
:
moment
(
calendarTime
[
0
]).
subtract
(
3
,
'days'
).
valueOf
(),
endTimeApply
:
calendarTime
[
0
]
})
}
style=
{
{
color
:
'#FFB714'
,
border
:
'1px solid #FFB714'
,
padding
:
'2px 8px'
,
borderRadius
:
'2px'
,
marginRight
:
8
,
}
}
>
上课前3天
</
span
>
</
div
>
:
null
}
/>
</
div
>
}
{
whetherSetApply
===
'YES'
&&
<
div
className=
"switch-item"
key=
"3"
>
...
...
@@ -1033,6 +1065,7 @@ class AddOfflineCourse extends React.Component {
min=
{
oldQuta
||
1
}
precision=
{
0
}
style=
{
{
margin
:
'0 4px'
,
width
:
90
}
}
disabled=
{
oldQuta
<
0
}
onChange=
{
(
value
)
=>
{
this
.
setState
({
quota
:
value
})
}
}
...
...
src/modules/course-manage/offline-course/components/OfflineCourseList.jsx
View file @
6e5f9023
...
...
@@ -125,7 +125,7 @@ class OfflineCourseList extends React.Component {
return
(
<
Switch
disabled=
{
item
.
courseState
===
'EXPIRED'
}
defaultC
hecked=
{
item
.
shelfState
===
"YES"
}
c
hecked=
{
item
.
shelfState
===
"YES"
}
onChange=
{
()
=>
this
.
changeShelfState
(
item
)
}
/>
)
...
...
@@ -226,7 +226,7 @@ class OfflineCourseList extends React.Component {
renderMoreOperate
=
(
item
)
=>
{
return
(
<
div
className=
"live-course-more-menu"
>
{
item
.
courseState
!==
'EXPIRED'
&&
<
div
{
item
.
courseState
!==
'EXPIRED'
&&
(
item
.
whetherSetSignIn
===
'YES'
||
item
.
whetherSetSignOut
===
'YES'
)
&&
<
div
className=
"operate__item"
key=
"qrcode"
onClick=
{
()
=>
{
...
...
@@ -287,6 +287,7 @@ class OfflineCourseList extends React.Component {
}
else
{
message
.
success
(
"已取消展示"
);
}
this
.
props
.
onChange
();
}
})
}
...
...
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