Commit cbccd6de authored by 罗超's avatar 罗超

1

parent 918fcc2e
......@@ -29,6 +29,15 @@
"style": {
"navigationStyle": "custom"
}
},
{
"path": "askForLeave" //请假
},
{
"path": "askForLeaveDetail" //请假详情
},
{
"path": "askForLeaveList" //请假列表
}
]
},
......
......@@ -22,6 +22,7 @@
<view class="btn-box">
<van-button
custom-class="leave-btn"
@click="jumpPage('/pages/course/askForLeave')"
>请假</van-button
>
<van-button custom-class="already-leave-btn one_line">已请假</van-button>
......
......@@ -126,6 +126,7 @@ export default {
let onClose = () => {
showPopup.value = false;
};
let onConfirm = (val) => {
showPopup.value = false;
isShowAllDay.value = true;
......@@ -146,10 +147,11 @@ export default {
let calendar = ref([]);
//默认选中
let activeDay = ref(1);
//切换选中日期
let calendarActive = (item) => {
activeDay.value = item.day;
};
let emptyArr = []; //补空
let emptyArr = []; //日历补空
let getcalendar = (y, m) => {
calendar.value = getWeek(y, m);
if (calendar.value[0].week > 0) {
......@@ -170,6 +172,7 @@ export default {
sliceWeekArr.value.unshift(...emptyArr);
}
};
//切换日历展示模式
let changeCalendar = () => {
isShowAllDay.value = !isShowAllDay.value;
};
......
......@@ -8,18 +8,16 @@ export let getWeek = (year, month) => {
let date = new Date(year + '-' + month + '-' + i)
let week = date.getDay()
let weekStr = ""
let isToday=0
let today=new Date(getToday()).getTime()
let today2=new Date(year+'-'+(month<10?'0'+month:month)+'-'+(i<10?'0'+i:i)).getTime()
if(today===today2){
isToday=1
console.log(i,isToday)
let isToday = 0
let today = new Date(getToday()).getTime()
let today2 = new Date(year + '-' + (month < 10 ? '0' + month : month) + '-' + (i < 10 ? '0' + i : i)).getTime()
if (today === today2) {
isToday = 1
}
arr.push({
week: week,
day: i,
isToday:isToday
isToday: isToday
})
}
return arr
......@@ -29,7 +27,7 @@ export let getToday = (y, m, d) => {
let date = new Date()
let year = date.getFullYear()
let month = date.getMonth() < 9 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
let day = date.getDate() < 9 ? '0' + (date.getDate() + 1) : date.getDate()
let day = date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()
let today = year + "-" + month + '-' + day
let curMonth = year + "-" + month
if (y && m) {
......@@ -37,5 +35,14 @@ export let getToday = (y, m, d) => {
} else {
return today
}
}
export let getdate = (time) => {
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 + "-" + month + '-' + day
// let curMonth = year + "-" + month
return d
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment