|
@@ -40,41 +40,30 @@
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
</uni-list-item>
|
|
</uni-list-item>
|
|
|
- <uni-list-item @click="toEditDiary(day)" v-for="(day, index) in '一二三四五六日'" :key="index" clickable>
|
|
|
|
|
- <!-- <template v-slot:footer>
|
|
|
|
|
|
|
+ <uni-list-item @click="toEditDiary(scrollInto)" clickable>
|
|
|
|
|
+ <template v-slot:header>
|
|
|
|
|
+ <view class="date">
|
|
|
|
|
+ <uni-row>本周</uni-row>
|
|
|
|
|
+ <uni-row>11.11-11.17</uni-row>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-slot:footer>
|
|
|
<view class="content">
|
|
<view class="content">
|
|
|
- <view style="margin-bottom: 5px;">
|
|
|
|
|
- <uni-row gutter="10">
|
|
|
|
|
- <uni-col :span="12">周{{day}}</uni-col>
|
|
|
|
|
- <uni-col :span="12">11.1{{index+1}}</uni-col>
|
|
|
|
|
- </uni-row>
|
|
|
|
|
- </view>
|
|
|
|
|
<uni-row :gutter="10">
|
|
<uni-row :gutter="10">
|
|
|
- <uni-col :span="4">
|
|
|
|
|
- <text>任务</text>
|
|
|
|
|
- </uni-col>
|
|
|
|
|
- <uni-col :span="20">
|
|
|
|
|
- <uni-easyinput type="textarea" v-model="TODO" disabled autoHeight placeholder="请输入内容"></uni-easyinput>
|
|
|
|
|
- </uni-col>
|
|
|
|
|
- </uni-row>
|
|
|
|
|
- <uni-row :gutter="10">
|
|
|
|
|
- <uni-col :span="4">
|
|
|
|
|
- <text>完成</text>
|
|
|
|
|
- </uni-col>
|
|
|
|
|
- <uni-col :span="20">
|
|
|
|
|
- <uni-easyinput type="textarea" v-model="DONE" disabled autoHeight placeholder="请输入内容"></uni-easyinput>
|
|
|
|
|
|
|
+ <uni-col :span="8">
|
|
|
|
|
+ <uni-easyinput type="textarea" disabled v-model="TODO" autoHeight placeholder="请输入内容"></uni-easyinput>
|
|
|
</uni-col>
|
|
</uni-col>
|
|
|
- </uni-row>
|
|
|
|
|
- <uni-row :gutter="10">
|
|
|
|
|
- <uni-col :span="4">
|
|
|
|
|
- <text>反馈</text>
|
|
|
|
|
|
|
+ <uni-col :span="8">
|
|
|
|
|
+ <uni-easyinput type="textarea" disabled v-model="DONE" autoHeight placeholder="请输入内容"></uni-easyinput>
|
|
|
</uni-col>
|
|
</uni-col>
|
|
|
- <uni-col :span="20">
|
|
|
|
|
- <uni-easyinput type="textarea" v-model="TAG" disabled autoHeight placeholder="请输入内容"></uni-easyinput>
|
|
|
|
|
|
|
+ <uni-col :span="8">
|
|
|
|
|
+ <uni-easyinput type="textarea" disabled v-model="BUG" autoHeight placeholder="请输入内容"></uni-easyinput>
|
|
|
</uni-col>
|
|
</uni-col>
|
|
|
</uni-row>
|
|
</uni-row>
|
|
|
</view>
|
|
</view>
|
|
|
- </template> -->
|
|
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </uni-list-item>
|
|
|
|
|
+ <uni-list-item @click="toEditDiary(day)" v-for="(day, index) in '一二三四五六日'" :key="index" clickable>
|
|
|
<template v-slot:header>
|
|
<template v-slot:header>
|
|
|
<view class="date">
|
|
<view class="date">
|
|
|
<uni-row :gutter="10">周{{day}}</uni-row>
|
|
<uni-row :gutter="10">周{{day}}</uni-row>
|
|
@@ -85,13 +74,13 @@
|
|
|
<view class="content">
|
|
<view class="content">
|
|
|
<uni-row :gutter="10">
|
|
<uni-row :gutter="10">
|
|
|
<uni-col :span="8">
|
|
<uni-col :span="8">
|
|
|
- <uni-easyinput type="textarea" v-model="TODO" disabled autoHeight placeholder="请输入内容"></uni-easyinput>
|
|
|
|
|
|
|
+ <uni-easyinput type="textarea" disabled v-model="TODO" autoHeight placeholder="请输入内容"></uni-easyinput>
|
|
|
</uni-col>
|
|
</uni-col>
|
|
|
<uni-col :span="8">
|
|
<uni-col :span="8">
|
|
|
- <uni-easyinput type="textarea" v-model="DONE" disabled autoHeight placeholder="请输入内容"></uni-easyinput>
|
|
|
|
|
|
|
+ <uni-easyinput type="textarea" disabled v-model="DONE" autoHeight placeholder="请输入内容"></uni-easyinput>
|
|
|
</uni-col>
|
|
</uni-col>
|
|
|
<uni-col :span="8">
|
|
<uni-col :span="8">
|
|
|
- <uni-easyinput type="textarea" v-model="TAG" disabled autoHeight placeholder="请输入内容"></uni-easyinput>
|
|
|
|
|
|
|
+ <uni-easyinput type="textarea" disabled v-model="BUG" autoHeight placeholder="请输入内容"></uni-easyinput>
|
|
|
</uni-col>
|
|
</uni-col>
|
|
|
</uni-row>
|
|
</uni-row>
|
|
|
</view>
|
|
</view>
|
|
@@ -112,12 +101,15 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import { onMounted, reactive, ref } from 'vue'
|
|
import { onMounted, reactive, ref } from 'vue'
|
|
|
import $tab from '@/plugins/tab.js'
|
|
import $tab from '@/plugins/tab.js'
|
|
|
|
|
+
|
|
|
const TODO = ref('1. 完成 通讯录 页面\n2. 完成 人员信息 页面')
|
|
const TODO = ref('1. 完成 通讯录 页面\n2. 完成 人员信息 页面')
|
|
|
const DONE = ref('1. 完成 通讯录 页面\n2. 完成 通讯录人员信息 页面\n3. 解决 地图无法正常显示定位 问题')
|
|
const DONE = ref('1. 完成 通讯录 页面\n2. 完成 通讯录人员信息 页面\n3. 解决 地图无法正常显示定位 问题')
|
|
|
- const TAG = ref('原生 map 组件仅提供查看地图功能,不提供定位功能')
|
|
|
|
|
- function toEditDiary(e) {
|
|
|
|
|
- console.log('toEditDiary', e);
|
|
|
|
|
- $tab.navigateTo('/pages/work/diary/edit?day=' + e)
|
|
|
|
|
|
|
+ const BUG = ref('原生 map 组件仅提供查看地图功能,不提供定位功能')
|
|
|
|
|
+
|
|
|
|
|
+ function toEditDiary(day) {
|
|
|
|
|
+ console.log('toEditDiary', day);
|
|
|
|
|
+ // getWeekNumber(new Date())
|
|
|
|
|
+ $tab.navigateTo('/pages/work/diary/edit?day=' + day)
|
|
|
}
|
|
}
|
|
|
const rightDrawer = ref(null)
|
|
const rightDrawer = ref(null)
|
|
|
function showDrawer() {
|
|
function showDrawer() {
|
|
@@ -186,21 +178,32 @@
|
|
|
}
|
|
}
|
|
|
function getWeekNumber(date) {
|
|
function getWeekNumber(date) {
|
|
|
// 创建一个新的日期对象,传入日期
|
|
// 创建一个新的日期对象,传入日期
|
|
|
- const tempDate = new Date(date.getTime())
|
|
|
|
|
-
|
|
|
|
|
- // 将日期调整到该年的第一天(1月1日)
|
|
|
|
|
- tempDate.setDate(tempDate.getDate() + 4 - (tempDate.getDay() || 7))
|
|
|
|
|
|
|
+ const tempDate = new Date('2019-12-31 15:56:02')
|
|
|
|
|
+ let day = tempDate.getDay()
|
|
|
|
|
|
|
|
- // 获取该年1月1日对应的周四所在的日期
|
|
|
|
|
- const yearStart = new Date(tempDate.getFullYear(), 0, 1)
|
|
|
|
|
|
|
+ // 调整到同一周的周四
|
|
|
|
|
+ // day 为 0(即周日),则使用 7 代替 day
|
|
|
|
|
+ tempDate.setDate(tempDate.getDate() + 4 - (day || 7))
|
|
|
|
|
+ // 将日期调整到 周四 这年的第一天(1月1日)
|
|
|
|
|
+ const year = new Date(tempDate.getFullYear(), 0, 1)
|
|
|
|
|
|
|
|
// 计算并返回当前日期所在的周数
|
|
// 计算并返回当前日期所在的周数
|
|
|
- const weekNumber = Math.ceil(((tempDate - yearStart) / 86400000 + 1) / 7)
|
|
|
|
|
- // 计算年份
|
|
|
|
|
- let year = date.getFullYear()
|
|
|
|
|
- if (weekNumber == 1 && date.getDate() >= 7) year += 1
|
|
|
|
|
|
|
+ const week = Math.ceil(((tempDate - year) / 86400000 + 1) / 7)
|
|
|
|
|
|
|
|
- return weekNumber
|
|
|
|
|
|
|
+ let _date = {
|
|
|
|
|
+ year: year.getFullYear(),
|
|
|
|
|
+ week,
|
|
|
|
|
+ day
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log('_date', _date);
|
|
|
|
|
+ return week
|
|
|
|
|
+ }
|
|
|
|
|
+ function getTotalWeeksInYear(date) {
|
|
|
|
|
+ // 创建一个新的日期对象,传入日期
|
|
|
|
|
+ const tempDate = new Date(date)
|
|
|
|
|
+ const year = tempDate.getFullYear()
|
|
|
|
|
+ const startOfYear = new Date(year, 0, 1); // 1 月 1 日
|
|
|
|
|
+ const endOfYear = new Date(year, 11, 31); // 12 月 31 日
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
@@ -279,7 +282,6 @@
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
|
|
|
|
|
.is-disabled {
|
|
.is-disabled {
|
|
|
- background-color: #fff !important;
|
|
|
|
|
color: #000 !important;
|
|
color: #000 !important;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|