@ -0,0 +1,5 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"ModyQyW.vscode-uni-helper"
|
||||
]
|
||||
}
|
||||
@ -1,32 +0,0 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<navbar :title="title"></navbar>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import navbar from "@/components/navbar.vue"
|
||||
export default {
|
||||
components: {
|
||||
navbar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: "title"
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
/deep/.u-navbar {
|
||||
border-radius: 0 0 40rpx 40rpx / 0 0 80rpx 80rpx !important;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,632 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 用户信息 -->
|
||||
<view class="user-info">
|
||||
<view class="head-img">
|
||||
<u-avatar src="/static/logo.png" size="104"></u-avatar>
|
||||
</view>
|
||||
|
||||
<view class="name">
|
||||
您好,XXX
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 搜索 -->
|
||||
<view class="search">
|
||||
<view class="input-content">
|
||||
<u-input height="40" :custom-style="inputStyle"></u-input>
|
||||
</view>
|
||||
<view class="icon">
|
||||
<u-icon name="search" size="46" color="#ABAEBE"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 轮播图 -->
|
||||
<view class="swiper">
|
||||
<swiper indicator-dots="true" indicator-color="rgba(255,255,255,0.5)" indicator-active-color="#FFFFFF">
|
||||
<swiper-item v-for="(item,index) in 3" :key="index">
|
||||
<view class="swiper-content"
|
||||
style="background-image: url('../../static/home/Covid - 19 Data.png');background-size: 100% 100%;">
|
||||
<view class="swiper-title">
|
||||
四世同堂服务管理
|
||||
</view>
|
||||
<view class="swiper-text">
|
||||
欢迎使用管理小程序
|
||||
</view>
|
||||
<view class="cir1"></view>
|
||||
<view class="cir2"></view>
|
||||
<view class="cir3"></view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
<!-- 数据展示 -->
|
||||
<view class="show-data">
|
||||
<view class="cir4"></view>
|
||||
<view class="cir5"></view>
|
||||
|
||||
<view class="title">
|
||||
<view class="title-text">数据展示</view>
|
||||
<view class="more">
|
||||
<view class="more-text">更多</view>
|
||||
<view class="icon">
|
||||
<u-icon name="arrow-right" color="#A7AFBC" size="24"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="data-content">
|
||||
<view v-for="(item,index) in dataList" :key="index" class="data-item">
|
||||
<view class="data-title">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="data-value">
|
||||
<view class="number">{{item.value}}</view>
|
||||
<view class="unit" v-if="item.type === 0">位</view>
|
||||
<view class="unit" v-else>小时</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="data-statistics">
|
||||
<view class="statistics-item">
|
||||
<view class="statistics-title">
|
||||
<view class="icon3"></view>
|
||||
<view class="text">
|
||||
进行中
|
||||
</view>
|
||||
</view>
|
||||
<view class="statistics-value">
|
||||
<view class="number">1</view>
|
||||
<view class="unit">位</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="statistics-item">
|
||||
<view class="statistics-title">
|
||||
<view class="icon1"></view>
|
||||
<view class="text">
|
||||
待护理
|
||||
</view>
|
||||
</view>
|
||||
<view class="statistics-value">
|
||||
<view class="number">36</view>
|
||||
<view class="unit">位</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="statistics-item">
|
||||
<view class="statistics-title">
|
||||
<view class="icon2"></view>
|
||||
<view class="text">
|
||||
已完成
|
||||
</view>
|
||||
</view>
|
||||
<view class="statistics-value">
|
||||
<view class="number">366</view>
|
||||
<view class="unit">位</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 信息提醒 -->
|
||||
<view class="info-remind">
|
||||
<view class="title">
|
||||
<view class="title-text">信息提醒</view>
|
||||
<view class="more">
|
||||
<view class="more-text">更多</view>
|
||||
<view class="icon">
|
||||
<u-icon name="arrow-right" color="#A7AFBC" size="24"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="info-list">
|
||||
<view v-for="(item,inedx) in infoList" :key="index" class="info-item">
|
||||
<view class="info-icon">
|
||||
<u-image :src="item.icon" height="80" width="80" shape="circle"></u-image>
|
||||
</view>
|
||||
<view class="info-content">
|
||||
<view class="info-title">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="info-time">
|
||||
{{item.time}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
inputStyle: {
|
||||
width: "468rpx",
|
||||
fontSize: "28rpx",
|
||||
fontWeight: "500"
|
||||
},
|
||||
dataList: [{
|
||||
title: "今日服务数量",
|
||||
value: 6,
|
||||
type: 0
|
||||
}, {
|
||||
title: "本月服务数量",
|
||||
value: 36,
|
||||
type: 0
|
||||
}, {
|
||||
title: "今日服务工时",
|
||||
value: 6,
|
||||
type: 1
|
||||
}, {
|
||||
title: "本月服务工时",
|
||||
value: 136,
|
||||
type: 1
|
||||
}],
|
||||
infoList: [{
|
||||
title: "学习护理让老年人活动康复的训练",
|
||||
icon: "/static/logo.png",
|
||||
time: "2022-06-26 12:23:45"
|
||||
},
|
||||
{
|
||||
title: "学习护理让老年人活动康复的训练",
|
||||
icon: "/static/logo.png",
|
||||
time: "2022-06-26 12:23:45"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
// 继承类
|
||||
.cir {
|
||||
background: #FFFFFF;
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
margin-top: 96rpx;
|
||||
|
||||
.head-img {
|
||||
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 392rpx;
|
||||
height: 34rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #36596A;
|
||||
line-height: 34rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.search {
|
||||
width: 710rpx;
|
||||
height: 90rpx;
|
||||
background: #FFFFFF;
|
||||
border: 2rpx solid #FAFBFC;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
margin: 24rpx 24rpx 0 24rpx;
|
||||
|
||||
.input-content {
|
||||
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
|
||||
.icon {
|
||||
|
||||
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper {
|
||||
margin: 30rpx 20rpx 0 20rpx;
|
||||
|
||||
swiper-item {
|
||||
border-radius: 16rpx;
|
||||
|
||||
}
|
||||
|
||||
.swiper-content {
|
||||
width: 710rpx;
|
||||
height: 322rpx;
|
||||
background: #1479FF;
|
||||
position: relative;
|
||||
|
||||
.cir1 {
|
||||
@extend .cir;
|
||||
|
||||
width: 230rpx;
|
||||
height: 230rpx;
|
||||
opacity: 0.06;
|
||||
|
||||
position: absolute;
|
||||
top: 184rpx;
|
||||
right: 652rpx;
|
||||
}
|
||||
|
||||
.cir2 {
|
||||
@extend .cir;
|
||||
width: 170rpx;
|
||||
height: 170rpx;
|
||||
opacity: 0.1;
|
||||
|
||||
position: absolute;
|
||||
top: 278rpx;
|
||||
right: 552rpx;
|
||||
}
|
||||
|
||||
.cir3 {
|
||||
@extend .cir;
|
||||
width: 244rpx;
|
||||
height: 244rpx;
|
||||
opacity: 0.06;
|
||||
|
||||
position: absolute;
|
||||
bottom: 260rpx;
|
||||
right: 150rpx;
|
||||
}
|
||||
|
||||
.swiper-title {
|
||||
width: 302rpx;
|
||||
height: 50rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
line-height: 26rpx;
|
||||
|
||||
position: absolute;
|
||||
top: 94rpx;
|
||||
left: 44rpx;
|
||||
}
|
||||
|
||||
.swiper-text {
|
||||
width: 500rpx;
|
||||
height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
line-height: 18rpx;
|
||||
|
||||
position: absolute;
|
||||
top: 164rpx;
|
||||
left: 44rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.show-data {
|
||||
width: 710rpx;
|
||||
height: 492rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(219, 218, 218, 0.5);
|
||||
overflow: hidden;
|
||||
border-radius: 10rpx;
|
||||
|
||||
margin: 30rpx auto 0 auto;
|
||||
padding: 0 22rpx;
|
||||
position: relative;
|
||||
|
||||
.cir4 {
|
||||
@extend .cir;
|
||||
height: 110rpx;
|
||||
width: 110rpx;
|
||||
opacity: 0.06;
|
||||
background: #1479FF;
|
||||
|
||||
position: absolute;
|
||||
top: 422rpx;
|
||||
right: 666rpx;
|
||||
}
|
||||
|
||||
.cir5 {
|
||||
@extend .cir;
|
||||
background-color: #1479FF;
|
||||
width: 94rpx;
|
||||
height: 94rpx;
|
||||
opacity: 0.1;
|
||||
|
||||
position: absolute;
|
||||
top: 468rpx;
|
||||
right: 618rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: solid 2rpx #EEEFF5;
|
||||
justify-content: space-between;
|
||||
|
||||
.title-text {
|
||||
width: 270rpx;
|
||||
height: 48rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
line-height: 48rpx;
|
||||
|
||||
//padding-left: 22rpx;
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
width: 160rpx;
|
||||
height: 14rpx;
|
||||
background: linear-gradient(270deg, rgba(52, 139, 254, 0) 0%, #1479FF 100%);
|
||||
border-radius: 6rpx;
|
||||
opacity: 0.3;
|
||||
|
||||
position: absolute;
|
||||
top: 32rpx;
|
||||
left: 0rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.more {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
//padding-right: 20rpx;
|
||||
|
||||
.more-text {
|
||||
width: 48rpx;
|
||||
height: 34rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #A7AFBC;
|
||||
line-height: 34rpx;
|
||||
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.data-content {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
|
||||
.data-item {
|
||||
flex-basis: 50%;
|
||||
|
||||
padding: 24rpx 0 0 20rpx;
|
||||
|
||||
.data-title {
|
||||
width: 200rpx;
|
||||
height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #ABAEBE;
|
||||
line-height: 20rpx;
|
||||
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
width: 4rpx;
|
||||
height: 28rpx;
|
||||
background: #1479FF;
|
||||
border-radius: 4rpx;
|
||||
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.data-value {
|
||||
height: 50rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.number {
|
||||
height: 50rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #36596A;
|
||||
line-height: 50rpx;
|
||||
|
||||
padding-right: 8rpx;
|
||||
}
|
||||
|
||||
.unit {
|
||||
height: 50rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #ABAEBE;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.data-statistics {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
|
||||
margin-top: 38rpx;
|
||||
|
||||
.statistics-item {
|
||||
flex: 1;
|
||||
|
||||
.statistics-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
// 待护理
|
||||
.icon1 {
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
background: #FDB030;
|
||||
border-radius: 100%;
|
||||
|
||||
margin-right: 14rpx;
|
||||
}
|
||||
|
||||
//已完成
|
||||
.icon2 {
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
background: #1173FF;
|
||||
border-radius: 100%;
|
||||
|
||||
margin-right: 14rpx;
|
||||
}
|
||||
|
||||
//进行中
|
||||
.icon3 {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
background: #2EC28B;
|
||||
border-radius: 100%;
|
||||
|
||||
margin-right: 14rpx;
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
border: 2rpx solid #2EC28B;
|
||||
border-radius: 100%;
|
||||
animation: icon-scale 3s linear infinite;
|
||||
|
||||
position: absolute;
|
||||
top: -8rpx;
|
||||
left: -8rpx;
|
||||
}
|
||||
|
||||
@keyframes icon-scale {
|
||||
|
||||
0%,
|
||||
30%,
|
||||
100%,
|
||||
40% {
|
||||
transform: scale(0.7, 0.7);
|
||||
}
|
||||
|
||||
70% {
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
width: 84rpx;
|
||||
height: 40rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #36596A;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.statistics-value {
|
||||
display: flex;
|
||||
|
||||
.number {
|
||||
height: 50rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #36596A;
|
||||
line-height: 50rpx;
|
||||
|
||||
padding-right: 12rpx;
|
||||
padding-left: 34rpx;
|
||||
}
|
||||
|
||||
.unit {
|
||||
width: 100rpx;
|
||||
height: 50rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #ABAEBE;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.info-remind {
|
||||
@extend .show-data;
|
||||
width: 710rpx;
|
||||
height: 406rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(219, 218, 218, 0.5);
|
||||
border-radius: 10rpx;
|
||||
|
||||
margin: 30rpx auto;
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
padding: 38rpx 0 20rpx 0;
|
||||
|
||||
.info-icon {}
|
||||
|
||||
.info-content {
|
||||
|
||||
margin-left: 24rpx;
|
||||
|
||||
.info-title {
|
||||
width: 480rpx;
|
||||
height: 46rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #36596A;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
.info-time {
|
||||
width: 600rpx;
|
||||
height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #ABAEBE;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default{
|
||||
data(){
|
||||
return{
|
||||
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
|
||||
},
|
||||
computed:{
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
@ -0,0 +1,384 @@
|
||||
<template>
|
||||
<view>
|
||||
<cpn-navbar title="护理日历"></cpn-navbar>
|
||||
|
||||
<view>
|
||||
<!-- 选择器 -->
|
||||
<view class="selecter">
|
||||
<view class="select-year">
|
||||
<view class="text">
|
||||
{{select.year}}
|
||||
</view>
|
||||
<view class="arrow">
|
||||
<u-icon name="arrow-down" size="20" color="#36596A"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="select-month">
|
||||
<view class="arrow">
|
||||
<u-icon name="arrow-left" size="20" color="#36596A"></u-icon>
|
||||
</view>
|
||||
<view class="text">
|
||||
{{select.month}}月
|
||||
</view>
|
||||
<view class="arrow">
|
||||
<u-icon name="arrow-right" size="20" color="#36596A"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 日历表 -->
|
||||
<view class="canlendar">
|
||||
<view v-for="(row,index) in calendar" :key="index" class="row">
|
||||
<view v-for="(date,index1) in row" :key="index1" @click="dateClick(date,index1)" class="item"
|
||||
:class="{itemOver:date.type === -1||date.type === 1||date.type === 2,itemActive:date.date === dateIndex&&date.type === 0}">
|
||||
{{date.date}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 日期状态提示 -->
|
||||
<view class="status">
|
||||
<view class="status-item">
|
||||
<view class="icon1"></view>
|
||||
<view>进行中</view>
|
||||
</view>
|
||||
<view class="status-item">
|
||||
<view class="icon2"></view>
|
||||
<view>待护理</view>
|
||||
</view>
|
||||
<view class="status-item">
|
||||
<view class="icon3"></view>
|
||||
<view>已完成</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
//时间选择
|
||||
select: {
|
||||
year: new Date().getFullYear(),
|
||||
month: new Date().getMonth() + 1
|
||||
},
|
||||
//当前选择日期
|
||||
dateIndex: null,
|
||||
calendar: '',
|
||||
params: {
|
||||
year: true,
|
||||
month: true,
|
||||
day: false,
|
||||
hour: false,
|
||||
minute: false,
|
||||
second: false
|
||||
},
|
||||
show: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dateClick(date, index1) {
|
||||
if (date.type === 0) {
|
||||
this.dateIndex = date.date
|
||||
}
|
||||
},
|
||||
getCalendar(year, month) {
|
||||
let res = []
|
||||
|
||||
//判断是否闰年
|
||||
function isLeap(year) {
|
||||
return (year % 100 == 0 ? (year % 400 == 0 ? 29 : 28) : (year % 4 == 0 ? 29 : 28))
|
||||
}
|
||||
|
||||
//获取年的每个月天数
|
||||
let mDays = new Map()
|
||||
mDays.set(1, 31)
|
||||
mDays.set(2, isLeap(year))
|
||||
mDays.set(3, 31)
|
||||
mDays.set(4, 30)
|
||||
mDays.set(5, 31)
|
||||
mDays.set(6, 30)
|
||||
mDays.set(7, 31)
|
||||
mDays.set(8, 31)
|
||||
mDays.set(9, 30)
|
||||
mDays.set(10, 31)
|
||||
mDays.set(11, 30)
|
||||
mDays.set(12, 31)
|
||||
|
||||
//获取月份的开始星期
|
||||
let startDay =
|
||||
new Date(`${year}-${month}-1`).getDay() != 0 ? new Date(`${year}-${month}-1`).getDay() : 7
|
||||
|
||||
//let arrayLength = Math.ceil((mDays.get(month) + startDay) / 7)
|
||||
let arrayLength = 6
|
||||
|
||||
for (let i = 1; i <= arrayLength; i++) {
|
||||
res.push([])
|
||||
for (let j = 0; j < 7; j++) {
|
||||
let index = (i - 1) * 7 + j
|
||||
let date = index - startDay + 2
|
||||
if (date < 1) {
|
||||
res[i - 1].push({
|
||||
date: (mDays.get(month - 1) ? mDays.get(month - 1) : 31) + date,
|
||||
type: 1
|
||||
})
|
||||
} else if (date > mDays.get(month)) {
|
||||
res[i - 1].push({
|
||||
date: date - mDays.get(month),
|
||||
type: 2
|
||||
})
|
||||
} else {
|
||||
let nowDate = `${new Date().getFullYear()}-${new Date().getMonth()+1}-${new Date().getDate()}`
|
||||
nowDate == `${this.year}-${this.month}-${date}` ?
|
||||
res[i - 1].push({
|
||||
date,
|
||||
type: 0,
|
||||
today: true
|
||||
}) :
|
||||
res[i - 1].push({
|
||||
date,
|
||||
type: 0
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
res.unshift([{
|
||||
date: "一",
|
||||
type: -1
|
||||
}, {
|
||||
date: "二",
|
||||
type: -1
|
||||
}, {
|
||||
date: "三",
|
||||
type: -1
|
||||
}, {
|
||||
date: "四",
|
||||
type: -1
|
||||
}, {
|
||||
date: "五",
|
||||
type: -1
|
||||
}, {
|
||||
date: "六",
|
||||
type: -1
|
||||
}, {
|
||||
date: "日",
|
||||
type: -1
|
||||
}])
|
||||
this.calendar = res
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
watch: {
|
||||
year: {
|
||||
handler(newVal, oldVal) {
|
||||
this.getCalendar(this.select.year, this.select.month)
|
||||
},
|
||||
immediate: false
|
||||
},
|
||||
month: {
|
||||
handler(newVal, oldVal) {
|
||||
this.getCalendar(this.select.year, this.select.month)
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
//公共
|
||||
/deep/.u-navbar {
|
||||
border-radius: 0 0 50rpx 50rpx;
|
||||
}
|
||||
|
||||
// 待护理
|
||||
.icon1 {
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
background: #FDB030;
|
||||
border-radius: 100%;
|
||||
|
||||
margin-right: 14rpx;
|
||||
}
|
||||
|
||||
//已完成
|
||||
.icon2 {
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
background: #1173FF;
|
||||
border-radius: 100%;
|
||||
|
||||
margin-right: 14rpx;
|
||||
}
|
||||
|
||||
//进行中
|
||||
.icon3 {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
background: #2EC28B;
|
||||
border-radius: 100%;
|
||||
|
||||
margin-right: 14rpx;
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
border: 2rpx solid #2EC28B;
|
||||
border-radius: 100%;
|
||||
animation: icon-scale 3s linear infinite;
|
||||
|
||||
position: absolute;
|
||||
top: -8rpx;
|
||||
left: -8rpx;
|
||||
}
|
||||
|
||||
@keyframes icon-scale {
|
||||
|
||||
0%,
|
||||
30%,
|
||||
100%,
|
||||
40% {
|
||||
transform: scale(0.7, 0.7);
|
||||
}
|
||||
|
||||
70% {
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.selecter {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
margin-top: 44rpx;
|
||||
|
||||
.select-year {
|
||||
width: 224rpx;
|
||||
height: 70rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
margin-left: 34rpx;
|
||||
|
||||
.text {
|
||||
flex: 1;
|
||||
height: 40rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
background: rgba(20, 121, 255, 0.1);
|
||||
border-radius: 5rpx;
|
||||
border: 2rpx solid #FFFFFF;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.select-month {
|
||||
width: 224rpx;
|
||||
height: 70rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
margin-right: 40rpx;
|
||||
|
||||
.arrow {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
background: rgba(20, 121, 255, 0.1);
|
||||
border-radius: 5rpx;
|
||||
border: 2rpx solid #FFFFFF;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.text {
|
||||
width: 52rpx;
|
||||
height: 40rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.canlendar {
|
||||
width: 710rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 40rpx;
|
||||
|
||||
margin: 36rpx auto 0 auto;
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
|
||||
.item {
|
||||
height: 64rpx;
|
||||
width: 64rpx;
|
||||
text-align: center;
|
||||
line-height: 64rpx;
|
||||
border-radius: 10rpx;
|
||||
|
||||
margin: 20rpx;
|
||||
}
|
||||
|
||||
//非本月的日
|
||||
.itemOver {
|
||||
color: #B7B7B7;
|
||||
}
|
||||
|
||||
//选择的日
|
||||
.itemActive {
|
||||
color: #fff;
|
||||
background-color: #0F0F0F;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.status {
|
||||
height: 40rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #36596A;
|
||||
line-height: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
margin: 36rpx 132rpx 0 132rpx;
|
||||
|
||||
.status-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 193 KiB |
|
After Width: | Height: | Size: 452 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |