Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
X
xzf_uniapp-wechat-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
李智书
xzf_uniapp-wechat-web
Commits
abfb1f5d
Commit
abfb1f5d
authored
Aug 28, 2023
by
袁玲利
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
校园报告
parent
6eaace67
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
197 additions
and
46 deletions
+197
-46
src/components/canlendar.vue
src/components/canlendar.vue
+63
-14
src/pages/ApplyConsumption/Home/Home.vue
src/pages/ApplyConsumption/Home/Home.vue
+2
-1
src/pages/ApplyConsumption/campusReport/campusReport.vue
src/pages/ApplyConsumption/campusReport/campusReport.vue
+132
-31
No files found.
src/components/canlendar.vue
View file @
abfb1f5d
...
...
@@ -5,7 +5,8 @@
</div>
<div
class=
"calendar-inner"
>
<div
class=
"calendar-item"
v-for=
"(item, index) of calendarList"
:key=
"index"
:class=
"[item.disable ? 'disabled' : '',item.value=='2023-08-23'||item.value=='2023-08-18'||item.value=='2023-08-28'?'signdate':'',item.value===currentDay?'today':'']"
>
:class=
"[item.disable ? 'disabled' : '',item.signdate ? 'signdate':'',item.value===currentDay?'today':'']"
@
click=
"changeToday_(item)"
>
<!--
<div
v-if=
"item.value=='2023-08-23'||item.value=='2023-08-18'||item.value=='2023-08-28'"
class=
"icons"
>
<span
v-if=
"item.value=='2023-08-23'"
>
早中
</span>
<span
v-else-if=
"item.value=='2023-08-18'"
>
早中晚
</span>
...
...
@@ -33,13 +34,26 @@
type
:
String
,
default
:
""
},
cateringAbnormalTypeGroupList
:
{
type
:
Array
,
default
:
function
()
{
return
[];
}
},
changeToday
:
{
type
:
Function
,
default
:
function
()
{
}
}
},
data
()
{
return
{
current
:
{},
// 当前时间
weekList
:
[
'
一
'
,
'
二
'
,
'
三
'
,
'
四
'
,
'
五
'
,
'
六
'
,
'
日
'
],
calendarList
:
[],
// 用于遍历显示
shareDate
:
new
Date
()
shareDate
:
new
Date
(),
groupList
:
[],
}
},
computed
:
{
...
...
@@ -63,15 +77,19 @@
},
methods
:
{
init
()
{
console
.
log
(
this
.
shareDate_
,)
console
.
log
(
this
.
shareDate_
,
)
this
.
shareDate
=
new
Date
(
this
.
shareDate_
);
this
.
current
=
this
.
currentDate
;
this
.
groupList
=
this
.
cateringAbnormalTypeGroupList
// this.shareDate = new Date('2023-05-01')
console
.
log
(
this
.
shareDate
,
'
shareDate11111
'
)
// 初始化当前时间
// this.setCurrent();
this
.
calendarCreator
();
},
changeToday_
(
item
)
{
this
.
$emit
(
'
changeToday
'
,
item
)
},
// 判断当前月有多少天
getDaysByMonth
(
year
,
month
)
{
return
new
Date
(
year
,
month
+
1
,
0
).
getDate
();
...
...
@@ -138,6 +156,7 @@
calendarCreator
()
{
// 一天有多少毫秒
const
oneDayMS
=
24
*
60
*
60
*
1000
;
console
.
log
(
this
.
groupList
,
'
groupList
'
)
let
list
=
[];
let
{
...
...
@@ -158,32 +177,62 @@
let
suffixDaysLen
=
lastDay
===
0
?
0
:
7
-
lastDay
;
// 毫秒数
let
end
=
new
Date
(
year
,
month
+
1
,
0
).
getTime
()
+
oneDayMS
*
suffixDaysLen
;
// 默认每月第一天
let
currentToday
=
{
month
:
this
.
current
.
month
,
unrecordedZao
:
false
,
unrecordedWu
:
false
,
unrecordedWan
:
false
}
while
(
begin
<=
end
)
{
this
.
shareDate
.
setTime
(
begin
);
let
year
=
this
.
shareDate
.
getFullYear
();
let
curMonth
=
this
.
shareDate
.
getMonth
();
let
date
=
this
.
shareDate
.
getDate
();
l
ist
.
push
(
{
l
et
obj
=
{
year
:
year
,
month
:
curMonth
,
date
:
date
,
disable
:
curMonth
!==
month
,
value
:
this
.
stringify
(
year
,
curMonth
,
date
)
});
value
:
this
.
stringify
(
year
,
curMonth
,
date
),
signdate
:
false
}
if
(
curMonth
==
month
)
{
let
f
=
this
.
groupList
.
filter
(
y
=>
y
.
date
==
date
)
if
(
f
.
length
)
{
obj
.
signdate
=
true
if
(
f
[
0
].
date
==
1
){
currentToday
=
Object
.
assign
(
currentToday
,
f
[
0
])
}
}
}
list
.
push
(
obj
);
begin
+=
oneDayMS
;
}
console
.
log
(
currentToday
,
'
currentToday
'
)
this
.
changeToday_
(
currentToday
)
this
.
calendarList
=
list
;
console
.
log
(
list
,
'
calendarList
'
)
}
},
watch
:
{
currentDate
(
val
)
{
this
.
current
=
val
currentDate
(
val
,
oldVal
)
{
if
(
val
!==
oldVal
)
{
this
.
current
=
val
;
this
.
calendarCreator
();
}
},
shareDate_
(
val
)
{
this
.
shareDate
=
new
Date
(
val
)
shareDate_
(
val
,
oldVal
)
{
if
(
val
!==
oldVal
)
{
this
.
shareDate
=
new
Date
(
val
)
this
.
calendarCreator
();
}
},
cateringAbnormalTypeGroupList
(
val
,
oldVal
)
{
if
(
val
!==
oldVal
)
{
this
.
groupList
=
val
this
.
calendarCreator
();
}
}
},
...
...
@@ -232,7 +281,7 @@
width
:
88
rpx
;
height
:
88
rpx
;
box-sizing
:
border-box
;
padding-top
:
28
rpx
;
/* padding-top: 28rpx; */
border-radius
:
22
rpx
;
margin
:
5
rpx
;
justify-content
:
center
;
...
...
@@ -241,7 +290,7 @@
font-family
:
PingFangSC-Semibold
,
PingFang
SC
;
font-weight
:
600
;
color
:
rgba
(
0
,
0
,
0
,
0.75
);
line-height
:
45
rpx
;
line-height
:
88
rpx
;
flex-direction
:
column
;
}
...
...
src/pages/ApplyConsumption/Home/Home.vue
View file @
abfb1f5d
...
...
@@ -238,7 +238,7 @@
return
}
this
.
userInfo
=
{
schoolId
:
data
.
data
[
'
schoolId
'
],
schoolId
:
data
.
data
[
'
schoolId
'
]
||
''
,
userId
:
data
.
data
[
'
userId
'
],
userType
:
data
.
data
[
'
userType
'
]
||
''
}
...
...
@@ -267,6 +267,7 @@
}
data
.
data
[
'
schoolConsumption
'
]
=
schoolConsumption
this
.
HomeDataInfo
=
data
.
data
sessionStorage
.
setItem
(
'
HomeDataInfo
'
,
JSON
.
stringify
(
this
.
HomeDataInfo
))
sessionStorage
.
setItem
(
'
accountId
'
,
this
.
HomeDataInfo
[
'
accountId
'
])
// 查询消费会员权益项
this
.
QueryProductContractItem
()
...
...
src/pages/ApplyConsumption/campusReport/campusReport.vue
View file @
abfb1f5d
This diff is collapsed.
Click to expand it.
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