Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
向伟
educationStu
Commits
da76ee9a
Commit
da76ee9a
authored
Jan 27, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
d5d2cd2b
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
385 additions
and
75 deletions
+385
-75
pages.json
src/pages.json
+8
-0
list.vue
src/pages/appointment/list.vue
+23
-18
list2.vue
src/pages/appointment/list2.vue
+22
-0
record.vue
src/pages/appointment/record.vue
+113
-0
orderList.vue
src/pages/contract/orderList.vue
+15
-1
person.vue
src/pages/person/person.vue
+4
-1
timeTable.vue
src/pages/timetable/timeTable.vue
+192
-55
date.js
src/utils/date.js
+8
-0
No files found.
src/pages.json
View file @
da76ee9a
...
@@ -129,6 +129,14 @@
...
@@ -129,6 +129,14 @@
"navigationStyle"
:
"custom"
"navigationStyle"
:
"custom"
}
}
}]
}]
},{
"root"
:
"pages/appointment"
,
//约课分包
"pages"
:[
{
"path"
:
"list"
},
{
"path"
:
"mySubscribe"
},
{
"path"
:
"timeSlot"
},
{
"path"
:
"record"
}
]
}
}
],
],
"tabBar"
:
{
"tabBar"
:
{
...
...
src/pages/appointment/list.vue
View file @
da76ee9a
...
@@ -7,6 +7,13 @@
...
@@ -7,6 +7,13 @@
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
}
}
.basics-block
{
width
:
50%
;
box-sizing
:
border-box
;
padding-left
:
10
rpx
;
text-align
:
left
;
font-size
:
26
rpx
;
}
.box-top
{
.box-top
{
display
:
flex
;
display
:
flex
;
box-shadow
:
0
4
rpx
24
rpx
rgba
(
100
,
101
,
102
,
.12
);
box-shadow
:
0
4
rpx
24
rpx
rgba
(
100
,
101
,
102
,
.12
);
...
@@ -55,30 +62,29 @@
...
@@ -55,30 +62,29 @@
font-size
:
13px
;
font-size
:
13px
;
color
:
#111
;
color
:
#111
;
height
:
100%
;
height
:
100%
;
display
:
flex
;
flex-wrap
:
wrap
;
align-content
:
space-around
;
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"Appointmentlist"
>
<div
class=
"Appointmentlist"
>
<view
class=
"basics"
>
<view
class=
"basics"
>
<view
class=
"basics-box"
>
<view
class=
"basics-box"
>
<view
class=
"row"
style=
"justify-content: space-between;"
>
<view
class=
"row basics-block"
>
<view
class=
"row"
>
提前几天预约:
{{
basics
.
AdvanceDay
||
0
}}
天
提前几天预约:
{{
basics
.
AdvanceDay
}}
天
</view>
</view>
<view
class=
"row"
>
<view
class=
"row basics-block"
>
可预约时间:
{{
basics
.
ScrollETime
}}
可预约时间:
{{
basics
.
ScrollETime
||
'无'
}}
</view>
</view>
<view
class=
"row basics-block"
>
可预约的天数:
{{
basics
.
AppointDay
||
0
}}
天
</view>
</view>
<view
class=
"row"
style=
"justify-content: space-between;"
>
<view
class=
"row basics-block"
>
<view
class=
"row"
>
可预约的天数:
{{
basics
.
AppointDay
}}
天
</view>
<view
class=
"row"
>
是否可以继续预约:
{{
basics
.
IsNextAppoint
?
'是'
:
'否'
}}
是否可以继续预约:
{{
basics
.
IsNextAppoint
?
'是'
:
'否'
}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"box-top"
>
<view
class=
"box-top"
>
<view
class=
"box-top-item row"
@
click=
"getscreen(1)"
>
<view
class=
"box-top-item row"
@
click=
"getscreen(1)"
>
<view
class=
"ellipsis"
>
<view
class=
"ellipsis"
>
...
@@ -100,7 +106,7 @@
...
@@ -100,7 +106,7 @@
<scroll-view
:scroll-y=
"true"
style=
"height: calc(100vh - 100rpx - 200rpx);width: calc(100vw);"
>
<scroll-view
:scroll-y=
"true"
style=
"height: calc(100vh - 100rpx - 200rpx);width: calc(100vw);"
>
<view
class=
"center"
v-for=
'(x,y) in dataList'
:key =
'y'
@
click=
"gotimelist(x)"
>
<view
class=
"center"
v-for=
'(x,y) in dataList'
:key =
'y'
@
click=
"gotimelist(x)"
>
<view
class=
"center-box"
>
<view
class=
"center-box"
>
<view
class=
"center-top row"
>
<view
class=
"center-top row"
>
<image
:src=
'x.TeacherHead'
mode=
"aspectFill"
style=
"width:38px ;height: 38px;border-radius: 50%;"
></image>
<image
:src=
'x.TeacherHead'
mode=
"aspectFill"
style=
"width:38px ;height: 38px;border-radius: 50%;"
></image>
<view
style=
"margin-left: 15px;padding-bottom:10px ;"
>
<view
style=
"margin-left: 15px;padding-bottom:10px ;"
>
<div
style=
"font-size: 13px;color: #111;font-weight: bold"
>
{{
x
.
TeacherName
}}
</div>
<div
style=
"font-size: 13px;color: #111;font-weight: bold"
>
{{
x
.
TeacherName
}}
</div>
...
@@ -120,8 +126,7 @@
...
@@ -120,8 +126,7 @@
<view
v-else
>
<view
v-else
>
<van-empty
description=
"暂无约课老师"
/>
<van-empty
description=
"暂无约课老师"
/>
</view>
</view>
<van-calendar
:show=
"dateshow"
@
confirm=
"onConfirm"
:default-date=
'defaultDate'
@
close=
'dateshow=false'
/>
<van-calendar
:show=
"dateshow"
color=
"#2961fe"
@
confirm=
"onConfirm"
:default-date=
'defaultDate'
@
close=
'dateshow=false'
/>
</div>
</div>
</
template
>
</
template
>
...
...
src/pages/appointment/list2.vue
0 → 100644
View file @
da76ee9a
<
template
>
<view
class=
""
>
</view>
</
template
>
<
script
>
import
{
ref
,
toRefs
,
reactive
,
getCurrentInstance
}
from
'vue'
export
default
{
setup
(){
const
data
=
reactive
({
})
return
{
...
toRefs
(
data
)
}
}
}
</
script
>
<
style
>
</
style
>
src/pages/appointment/record.vue
0 → 100644
View file @
da76ee9a
<
template
>
<view
class=
""
>
<view
class=
"box-top"
>
<view
class=
"box-top-item flex"
@
click=
"showCalendar"
>
<view
class=
"ellipsis"
>
<text
v-if=
"date.length==2"
>
{{
date
[
0
]
}}
-
{{
date
[
1
]
}}
</text>
<text
v-else
>
选择日期
</text>
</view>
<van-icon
name=
"arrow-down"
size=
'12'
style=
'margin-left: 5px;'
/>
</view>
<picker
mode=
"selector"
range-key=
"Name"
style=
"width: 50%;"
:range=
"stateList"
@
change=
"getState"
>
<view
class=
"box-top-item flex"
style=
"width: 100%;height: 100rpx;"
>
<view
class=
"ellipsis"
>
{{
stateName
}}
</view>
<van-icon
name=
"arrow-down"
size=
'12'
style=
'margin-left: 5px;'
/>
</view>
</picker>
</view>
<van-calendar
:show=
"isShowcalendar"
type=
"range"
@
close=
"isShowcalendar=false"
@
confirm=
"onConfirmCalendar"
/>
</view>
</
template
>
<
script
>
import
{
toRefs
,
reactive
,
getCurrentInstance
}
from
'vue'
import
{
DateFormat
}
from
'../../utils/date.js'
export
default
{
setup
(){
const
data
=
reactive
({
msg
:{
State
:
1
,
},
isShowcalendar
:
false
,
date
:[],
stateName
:
"不限"
,
stateList
:[
{
Name
:
"待确认"
,
Id
:
1
,
},
{
Name
:
"待上课"
,
Id
:
2
},{
Name
:
"已上课"
,
Id
:
3
},{
Name
:
"缺席"
,
Id
:
4
}
]
})
const
methods
=
{
showCalendar
(){
data
.
isShowcalendar
=
true
},
getState
(
e
){
let
i
=
e
.
detail
.
value
;
data
.
stateName
=
data
.
stateList
[
i
].
Name
;
let
id
=
data
.
stateList
[
i
].
Id
},
onConfirmCalendar
(
e
){
data
.
isShowcalendar
=
false
let
dateS
=
DateFormat
(
e
.
detail
[
0
],
'/'
)
let
dateE
=
DateFormat
(
e
.
detail
[
1
],
'/'
)
data
.
date
=
[
dateS
,
dateE
]
console
.
log
(
68
,
data
.
date
)
}
}
return
{
...
toRefs
(
data
),
...
methods
}
},
onLoad
()
{
uni
.
setNavigationBarTitle
({
title
:
"约课记录"
})
}
}
</
script
>
<
style
scoped
>
.flex
{
display
:
flex
;
align-items
:
center
;
}
.box-top
{
display
:
flex
;
box-shadow
:
0
4
rpx
24
rpx
rgba
(
100
,
101
,
102
,
.12
);
height
:
100
rpx
;
background
:
#FFF
;
}
.box-top-item
{
width
:
50%
;
justify-content
:
center
;
font-size
:
13px
;
}
.ellipsis
{
font-size
:
24
rpx
;
max-width
:
80%
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
</
style
>
src/pages/contract/orderList.vue
View file @
da76ee9a
...
@@ -33,7 +33,15 @@
...
@@ -33,7 +33,15 @@
color
:
#0000ff
;
color
:
#0000ff
;
font-size
:
24
rpx
;
font-size
:
24
rpx
;
}
}
.Order_Type
{
box-sizing
:
border-box
;
padding
:
4
rpx
14
rpx
;
font-size
:
20
rpx
;
background-color
:
#2961fe
;
margin-left
:
20
rpx
;
color
:
#FFFFFF
;
border-radius
:
20
rpx
;
}
.courseName
{
.courseName
{
font-size
:
40
rpx
;
font-size
:
40
rpx
;
margin-bottom
:
20
rpx
;
margin-bottom
:
20
rpx
;
...
@@ -109,6 +117,12 @@
...
@@ -109,6 +117,12 @@
<view
class=
"Order_Top"
>
<view
class=
"Order_Top"
>
<view
class=
"Order_label"
>
订单号:
</view>
<view
class=
"Order_label"
>
订单号:
</view>
<view
class=
"Order_Number"
>
#
{{
item
.
OrderId
}}
</view>
<view
class=
"Order_Number"
>
#
{{
item
.
OrderId
}}
</view>
<view
class=
"Order_Type"
v-if=
"item.ClassScrollType===1"
>
跟班
</view>
<view
class=
"Order_Type"
style=
"background-color: #29CC40;"
v-if=
"item.ClassScrollType===2"
>
约课
</view>
</view>
</view>
<view
class=
"p-lc-c"
>
<view
class=
"p-lc-c"
>
<view
class=
"p-lc-item"
>
<view
class=
"p-lc-item"
>
...
...
src/pages/person/person.vue
View file @
da76ee9a
...
@@ -43,6 +43,9 @@
...
@@ -43,6 +43,9 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
""
@
click=
"jumpPage(`/pages/appointment/record`)"
>
约课记录
</view>
<view
class=
"courseInfo"
>
<view
class=
"courseInfo"
>
<view
class=
"title"
>
课程信息
</view>
<view
class=
"title"
>
课程信息
</view>
<view
class=
"statistic"
>
<view
class=
"statistic"
>
...
@@ -106,7 +109,7 @@
...
@@ -106,7 +109,7 @@
}}
</view>
}}
</view>
<view
class=
"Grade"
>
等级:
{{
pageData
.
CourseInfo
.
CourseRate
||
''
}}
</view>
<view
class=
"Grade"
>
等级:
{{
pageData
.
CourseInfo
.
CourseRate
||
''
}}
</view>
<view><text
class=
"Grade"
>
状态:
</text>
<view><text
class=
"Grade"
>
状态:
</text>
<text
class=
"StatusName"
>
{{
<text
class=
"StatusName"
v-if=
"pageData.CourseInfo.ClassStatusName"
>
{{
pageData
.
CourseInfo
.
ClassStatusName
pageData
.
CourseInfo
.
ClassStatusName
}}
</text>
}}
</text>
</view>
</view>
...
...
src/pages/timetable/timeTable.vue
View file @
da76ee9a
<
template
>
<
template
>
<view
class=
""
:style=
"
{ 'padding-top': `${statusBarHeight}px` }">
<view
class=
""
:style=
"
{ 'padding-top': `${statusBarHeight}px` }">
<view
style=
"height: 100rpx"
></view>
<view
style=
"height: 100rpx"
></view>
<view
class=
"navbar"
>
<view
class=
"navbar"
>
<van-nav-bar
title=
"课表"
fixed
title-class=
"navTitle"
>
<van-nav-bar
title=
"课表"
fixed
title-class=
"navTitle"
>
...
@@ -17,14 +18,17 @@
...
@@ -17,14 +18,17 @@
<van-popup
:show=
"showPopup"
round
position=
"bottom"
custom-style=
"height: 50%"
@
close=
"onClose"
>
<van-popup
:show=
"showPopup"
round
position=
"bottom"
custom-style=
"height: 50%"
@
close=
"onClose"
>
<van-datetime-picker
type=
"year-month"
:value=
"getCurrentDate"
@
cancel=
"onClose"
@
confirm=
"onConfirm"
/>
<van-datetime-picker
type=
"year-month"
:value=
"getCurrentDate"
@
cancel=
"onClose"
@
confirm=
"onConfirm"
/>
</van-popup>
</van-popup>
<swiper
:style=
"
{height:!isShowAllDay?'220rpx':'620rpx'}" circular :current-item-id="2"
@change="changeSwiper($event,preSwiperId)">
<swiper-item
v-for=
"(Sitem,Sindex) in swiperArr"
:key=
"Sindex"
:item-id=
"Sitem.id"
style=
"height: 400rpx;"
>
<view
class=
"calendar flex flex_wrap"
>
<view
class=
"calendar flex flex_wrap"
>
<view
v-for=
"(item, index) in weekArr"
:key=
"index"
class=
"calendar-week-item no_shrink"
>
<view
v-for=
"(item, index) in weekArr"
:key=
"index"
class=
"calendar-week-item no_shrink"
>
<view
class=
"calendar-week"
>
{{
item
}}
</view>
<view
class=
"calendar-week"
>
{{
item
}}
</view>
</view>
</view>
<view
v-for=
"(item, index) in sliceWeekArr"
:key=
"index"
class=
"calendar-item no_shrink"
<view
v-for=
"(item, index) in sliceWeekArr"
:key=
"index"
class=
"calendar-item no_shrink"
v-if=
"!isShowAllDay"
>
v-if=
"!isShowAllDay"
>
<view
class=
"calendar-day flex flex_center_center"
ref=
"calendarDay"
@
click=
"calendarActive(item)
"
<view
class=
"calendar-day flex flex_center_center"
ref=
"calendarDay
"
v-show=
"item"
>
@
click=
"calendarActive(item)"
v-show=
"item"
>
<view
class=
""
<view
class=
""
:class=
"
{ 'calendar-active': activeDay === item.day ,'calendar-leave':isLeave(item),'calendar-leave2':isLeave2(item)}">
:class=
"
{ 'calendar-active': activeDay === item.day ,'calendar-leave':isLeave(item),'calendar-leave2':isLeave2(item)}">
{{
item
.
day
}}
{{
item
.
day
}}
...
@@ -33,7 +37,8 @@
...
@@ -33,7 +37,8 @@
<view
class=
"isToday"
v-if=
"item.isToday === 1"
>
今天
</view>
<view
class=
"isToday"
v-if=
"item.isToday === 1"
>
今天
</view>
<view
class=
"haveCourse"
v-if=
"getHaveCourse(item)"
></view>
<view
class=
"haveCourse"
v-if=
"getHaveCourse(item)"
></view>
</view>
</view>
<view
v-for=
"(item, index) in calendar"
:key=
"index"
class=
"calendar-item no_shrink"
v-if=
"isShowAllDay"
>
<view
v-for=
"(item, index) in calendar"
:key=
"index"
class=
"calendar-item no_shrink"
v-if=
"isShowAllDay"
>
<view
class=
"calendar-day flex flex_center_center"
ref=
"calendarDay"
<view
class=
"calendar-day flex flex_center_center"
ref=
"calendarDay"
@
click=
"calendarActive(item), sliceWeek(item)"
v-show=
"item"
>
@
click=
"calendarActive(item), sliceWeek(item)"
v-show=
"item"
>
<view
class=
""
<view
class=
""
...
@@ -54,19 +59,24 @@
...
@@ -54,19 +59,24 @@
</van-divider>
</van-divider>
</view>
</view>
</view>
</view>
</swiper-item>
</swiper>
<view
class=
"Timetable-box"
>
<view
class=
"Timetable-box"
>
<view
class=
"flex flex_center_center"
v-if=
"loading"
>
<view
class=
"flex flex_center_center
loading
"
v-if=
"loading"
>
<van-loading
size=
"48rpx"
type=
"spinner"
>
加载中...
</van-loading>
<van-loading
size=
"48rpx"
type=
"spinner"
>
加载中...
</van-loading>
</view>
</view>
<van-empty
description=
"暂无课程"
v-if=
"dataList.length === 0"
/>
<van-empty
description=
"暂无课程"
v-if=
"dataList.length === 0"
/>
<view
class=
"btnfixed"
>
<image
@
click=
"goappointment"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/jiaheb2b/checkDuplicate_btn.png"
mode=
"widthFix"
></image>
</view>
<view
v-for=
"(item, index) in dataList"
:key=
"index"
v-if=
"dataList.length > 0"
>
<view
v-for=
"(item, index) in dataList"
:key=
"index"
v-if=
"dataList.length > 0"
>
<Item
:data=
"item"
/>
<Item
:data=
"item"
/>
</view>
</view>
</view>
</view>
<van-toast
id=
"van-toast"
/>
<van-toast
id=
"van-toast"
/>
<view
class=
"btnfixed"
>
<image
@
click=
"goappointment"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/jiaheb2b/checkDuplicate_btn.png"
mode=
"widthFix"
></image>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -82,6 +92,7 @@
...
@@ -82,6 +92,7 @@
computed
,
computed
,
onMounted
,
onMounted
,
nextTick
,
nextTick
,
inject
,
}
from
"vue"
;
}
from
"vue"
;
import
{
import
{
getWeek
,
getWeek
,
...
@@ -98,6 +109,7 @@
...
@@ -98,6 +109,7 @@
Item
Item
},
},
setup
(
props
)
{
setup
(
props
)
{
const
Toast
=
inject
(
'$toast'
)
let
weekArr
=
[
"日"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
];
let
weekArr
=
[
"日"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
];
//年月选择
//年月选择
let
currentDate
=
ref
(
0
);
let
currentDate
=
ref
(
0
);
...
@@ -127,7 +139,7 @@
...
@@ -127,7 +139,7 @@
sliceWeek
(
newArr
[
0
]);
sliceWeek
(
newArr
[
0
]);
data
.
msg
.
StartTime
=
currentDate
.
value
+
'-01'
data
.
msg
.
StartTime
=
currentDate
.
value
+
'-01'
data
.
msg
.
EndTime
=
currentDate
.
value
+
'-'
+
getMonthMaxDay
(
year
,
month
);
data
.
msg
.
EndTime
=
currentDate
.
value
+
'-'
+
getMonthMaxDay
(
year
,
month
);
that
.
getData
()
//
that.getData()
that
.
getAllData
()
that
.
getAllData
()
};
};
...
@@ -160,8 +172,8 @@
...
@@ -160,8 +172,8 @@
let
isShowAllDay
=
ref
(
false
);
let
isShowAllDay
=
ref
(
false
);
let
sliceWeekArr
=
ref
([]);
let
sliceWeekArr
=
ref
([]);
let
sliceWeek
=
(
item
)
=>
{
let
sliceWeek
=
(
item
)
=>
{
let
w
=
item
.
$orig
?.
week
||
item
.
week
||
0
let
w
=
item
.
$orig
?.
week
||
item
.
week
||
0
let
d
=
item
.
$orig
?.
day
||
item
.
day
||
0
let
d
=
item
.
$orig
?.
day
||
item
.
day
||
0
let
newArr
=
calendar
.
value
.
slice
(
emptyArr
.
length
,
calendar
.
value
.
length
);
let
newArr
=
calendar
.
value
.
slice
(
emptyArr
.
length
,
calendar
.
value
.
length
);
let
s
=
d
-
(
w
+
1
)
<=
0
?
0
:
d
-
(
w
+
1
);
let
s
=
d
-
(
w
+
1
)
<=
0
?
0
:
d
-
(
w
+
1
);
let
e
=
d
+
(
6
-
w
);
let
e
=
d
+
(
6
-
w
);
...
@@ -169,13 +181,19 @@
...
@@ -169,13 +181,19 @@
if
(
s
===
0
)
{
if
(
s
===
0
)
{
sliceWeekArr
.
value
.
unshift
(...
emptyArr
);
sliceWeekArr
.
value
.
unshift
(...
emptyArr
);
}
}
};
};
//切换日历展示模式
//切换日历展示模式
let
changeCalendar
=
()
=>
{
let
changeCalendar
=
()
=>
{
isShowAllDay
.
value
=
!
isShowAllDay
.
value
;
isShowAllDay
.
value
=
!
isShowAllDay
.
value
;
};
};
//-------------------上边日历部分---------------------------------------
//-------------------上边日历部分---------------------------------------
let
loadingS
=
()
=>
Toast
({
type
:
"loading"
,
message
:
"加载中..."
,
mask
:
true
,
duration
:
0
,
forbidClick
:
true
,
})
let
data
=
reactive
({
let
data
=
reactive
({
msg
:
{
msg
:
{
ClassId
:
0
,
ClassId
:
0
,
...
@@ -186,12 +204,40 @@
...
@@ -186,12 +204,40 @@
dataList
:
[],
dataList
:
[],
allData
:
[],
allData
:
[],
loading
:
false
,
loading
:
false
,
swiperArr
:
[{
y
:
2022
,
m
:
1
,
id
:
1
},
{
y
:
2022
,
m
:
2
,
id
:
2
},
{
y
:
2022
,
m
:
3
,
id
:
3
}],
swiperArrDemo
:
[{
y
:
2022
,
m
:
1
,
id
:
1
},
{
y
:
2022
,
m
:
2
,
id
:
2
},
{
y
:
2022
,
m
:
3
,
id
:
3
}],
currentSwiper
:
1
,
preSwiperId
:
1
,
timer
:
null
,
//防抖
});
});
let
methods
=
{
let
methods
=
{
// 获取当天数据
// 获取当天数据
async
getData
()
{
async
getData
()
{
if
(
data
.
msg
.
ClassId
<=
0
)
return
//
if(data.msg.ClassId
<=
0
)
return
data
.
loading
=
true
data
.
loading
=
true
let
res
=
await
getStundentPlanStatistical
(
data
.
msg
);
let
res
=
await
getStundentPlanStatistical
(
data
.
msg
);
data
.
loading
=
false
data
.
loading
=
false
...
@@ -201,11 +247,20 @@
...
@@ -201,11 +247,20 @@
},
},
//获取当月数据
//获取当月数据
async
getAllData
()
{
async
getAllData
()
{
if
(
data
.
msg
.
ClassId
<=
0
)
return
// if(data.msg.ClassId
<=
0
)
return
loadingS
()
try
{
let
res
=
await
getStundentPlanStatistical
(
data
.
msg
);
let
res
=
await
getStundentPlanStatistical
(
data
.
msg
);
Toast
.
clear
()
if
(
data
.
timer
)
data
.
timer
=
null
if
(
res
)
{
if
(
res
)
{
data
.
dataList
=
res
.
Data
;
data
.
allData
=
res
.
Data
;
data
.
allData
=
res
.
Data
;
}
}
}
catch
{
Toast
.
clear
()
}
},
},
jumpPage
(
url
)
{
jumpPage
(
url
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
...
@@ -261,11 +316,78 @@
...
@@ -261,11 +316,78 @@
}
}
return
res
return
res
},
},
goappointment
(){
goappointment
()
{
let
day
=
currentDate
.
value
+
'-'
+
activeDay
.
value
;
let
day
=
currentDate
.
value
+
'-'
+
activeDay
.
value
;
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/appointment/list?day='
+
day
,
url
:
'/pages/appointment/list?day='
+
day
,
});
});
},
changeSwiper
(
val
,
PreId
)
{
let
CurId
=
val
.
detail
.
current
data
.
currentSwiper
=
1
if
((
CurId
>
PreId
&&
(
CurId
!==
2
||
PreId
!==
0
))
||
(
CurId
==
0
&&
PreId
==
2
))
{
console
.
log
(
'右滑'
)
methods
.
right
(
CurId
)
}
else
if
((
CurId
<
PreId
&&
(
CurId
!==
0
||
PreId
!==
2
))
||
(
CurId
==
2
&&
PreId
==
0
))
{
console
.
log
(
'左滑'
)
methods
.
left
(
CurId
)
}
data
.
preSwiperId
=
val
.
detail
.
current
},
right
(
curId
)
{
data
.
swiperArrDemo
.
forEach
(
e
=>
{
if
(
e
.
m
==
12
)
{
e
.
y
=
e
.
y
+
1
e
.
m
=
1
}
else
{
e
.
m
+=
1
}
})
if
(
curId
==
0
)
{
data
.
swiperArr
=
[
data
.
swiperArrDemo
[
1
],
{},
{}]
}
else
if
(
curId
==
1
)
{
data
.
swiperArr
=
[{},
data
.
swiperArrDemo
[
1
],
{}]
}
else
if
(
curId
==
2
)
{
data
.
swiperArr
=
[{},
{},
data
.
swiperArrDemo
[
1
]]
}
const
showM
=
data
.
swiperArrDemo
[
1
]
const
obj
=
{
detail
:
showM
.
y
+
'-'
+
(
showM
.
m
<
10
?
'0'
+
showM
.
m
:
showM
.
m
)
+
'-01'
}
if
(
data
.
timer
)
clearTimeout
(
data
.
timer
)
data
.
timer
=
setTimeout
(()
=>
{
onConfirm
(
obj
)
},
500
)
},
left
(
curId
)
{
data
.
swiperArrDemo
.
forEach
(
e
=>
{
if
(
e
.
m
==
1
)
{
e
.
y
=
e
.
y
-
1
e
.
m
=
12
}
else
{
e
.
m
=
e
.
m
-
1
}
})
if
(
curId
==
0
)
{
data
.
swiperArr
=
[
data
.
swiperArrDemo
[
1
],
{},
{}]
}
else
if
(
curId
==
1
)
{
data
.
swiperArr
=
[{},
data
.
swiperArrDemo
[
1
],
{}]
}
else
if
(
curId
==
2
)
{
data
.
swiperArr
=
[{},
{},
data
.
swiperArrDemo
[
1
]]
}
const
showM
=
data
.
swiperArrDemo
[
1
]
const
obj
=
{
detail
:
showM
.
y
+
'-'
+
(
showM
.
m
<
10
?
'0'
+
showM
.
m
:
showM
.
m
)
+
'-01'
}
if
(
data
.
timer
)
clearTimeout
(
data
.
timer
)
data
.
timer
=
setTimeout
(()
=>
{
onConfirm
(
obj
)
},
500
)
}
}
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
...
@@ -304,9 +426,9 @@
...
@@ -304,9 +426,9 @@
// this.msg.ClassId = indexData.ClassId
// this.msg.ClassId = indexData.ClassId
this
.
msg
.
ClassId
=
'1'
this
.
msg
.
ClassId
=
'1'
this
.
msg
.
StartTime
=
getToday
(
'y'
,
'm'
)
+
'-01'
;
this
.
msg
.
StartTime
=
getToday
(
'y'
,
'm'
)
+
'-01'
;
this
.
msg
.
EndTime
=
getToday
(
'y'
,
'm'
)
+
'-'
+
getMonthMaxDay
();
this
.
msg
.
EndTime
=
getToday
(
'y'
,
'm'
)
+
'-'
+
getMonthMaxDay
();
if
(
this
.
$isLogin
())
{
if
(
this
.
$isLogin
())
{
this
.
getData
()
//
this.getData()
this
.
getAllData
()
this
.
getAllData
()
}
}
},
},
...
@@ -314,6 +436,11 @@
...
@@ -314,6 +436,11 @@
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.swiper
{
/* min-height: 400rpx; */
height
:
620
rpx
;
}
.chooseDate
{
.chooseDate
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
...
@@ -427,14 +554,24 @@
...
@@ -427,14 +554,24 @@
top
:
10
rpx
;
top
:
10
rpx
;
right
:
10
rpx
;
right
:
10
rpx
;
}
}
.btnfixed
{
.btnfixed
{
position
:
fixed
;
position
:
fixed
;
right
:
0px
;
right
:
0px
;
bottom
:
92px
;
bottom
:
92px
;
z-index
:
9999
;
z-index
:
9999
;
}
}
.btnfixed
image
{
.btnfixed
image
{
width
:
80px
;
width
:
80px
;
height
:
auto
;
height
:
auto
;
}
}
.loading
{
/* position: fixed;
top: 200rpx;
left: 50%;
z-index: 999;
transform: translateX(-50%); */
}
</
style
>
</
style
>
src/utils/date.js
View file @
da76ee9a
...
@@ -72,3 +72,11 @@ export let getdate = (time, tomorrow) => {
...
@@ -72,3 +72,11 @@ export let getdate = (time, tomorrow) => {
let
d
=
year
+
"-"
+
month
+
'-'
+
day
let
d
=
year
+
"-"
+
month
+
'-'
+
day
return
d
return
d
}
}
export
let
DateFormat
=
(
time
,
separator
=
'-'
)
=>
{
let
date
=
new
Date
(
time
)
let
year
=
date
.
getFullYear
()
let
month
=
date
.
getMonth
()
<
9
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
let
day
=
date
.
getDate
()
<
10
?
'0'
+
(
date
.
getDate
())
:
date
.
getDate
()
let
d
=
year
+
separator
+
month
+
separator
+
day
return
d
}
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