From 09413863b5e6bab75859de762735653318f7b056 Mon Sep 17 00:00:00 2001
From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com>
Date: Wed, 23 Oct 2024 09:10:06 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=A0=B7=E5=BC=8F=E7=AD=89?=
=?UTF-8?q?=E9=80=BB=E8=BE=91=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 6 +++
pages/workPlan/custody/index.vue | 9 ++++
pages/workPlan/index/components/calendar.vue | 52 +++++++++++++++++--
.../workbench/components/custody-model.vue | 10 +++-
4 files changed, 71 insertions(+), 6 deletions(-)
create mode 100644 pages/workPlan/custody/index.vue
diff --git a/pages.json b/pages.json
index ea058a1..84ee6f9 100644
--- a/pages.json
+++ b/pages.json
@@ -761,6 +761,12 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "pages/workPlan/custody/index",
+ "style": {
+ "navigationStyle": "custom"
+ }
+ },
{
"path": "pages/workPlan/dayPlan/index",
"style": {
diff --git a/pages/workPlan/custody/index.vue b/pages/workPlan/custody/index.vue
new file mode 100644
index 0000000..6a6bdd0
--- /dev/null
+++ b/pages/workPlan/custody/index.vue
@@ -0,0 +1,9 @@
+
+ 现场监护
+
+
+
+
+
diff --git a/pages/workPlan/index/components/calendar.vue b/pages/workPlan/index/components/calendar.vue
index bd0a65f..a843e71 100644
--- a/pages/workPlan/index/components/calendar.vue
+++ b/pages/workPlan/index/components/calendar.vue
@@ -54,9 +54,9 @@
-
+
{{ item.title }}
- {{ item.time }}
+ {{ weekTimeChange(index) }}
@@ -79,8 +79,8 @@
工程名称
作业人数
- 周二
- 10/22
+ {{ currentWeekDay }}
+ {{ currentDays }}
@@ -189,11 +189,25 @@ export default {
}
],
days: [],
+ // currentWeekDay: this.$moment().day(),
+ currentDays: this.$moment().format('MM-DD'),
customDates: {
'2023-06-15': '自定义内容'
}
}
},
+ computed: {
+ weekTimeChange() {
+ return index => {
+ return this.$moment(this.weekStart)
+ .add(index - 1, 'days')
+ .format('MM-DD')
+ }
+ },
+ currentWeekDay() {
+ return this.onTransWeek(this.$moment(this.currentDay).day())
+ }
+ },
mounted() {
this.generateCalendar()
},
@@ -252,8 +266,10 @@ export default {
changeDay(delta) {
if (delta > 0) {
this.currentDay = this.$moment(this.currentDay).add(1, 'days').format('YYYY-MM-DD')
+ this.currentDays = this.$moment(this.currentDays).add(1, 'days').format('MM-DD')
} else {
this.currentDay = this.$moment(this.currentDay).subtract(1, 'days').format('YYYY-MM-DD')
+ this.currentDays = this.$moment(this.currentDays).subtract(1, 'days').format('MM-DD')
}
},
changeWeek(delta) {
@@ -269,6 +285,34 @@ export default {
console.log('选择的日期', day.date)
// 在这里可以添加选择日期后的逻辑
},
+ onTransWeek(num) {
+ let weekStr = ''
+ switch (num) {
+ case 0:
+ weekStr = '周日'
+ break
+ case 1:
+ weekStr = '周一'
+ break
+ case 2:
+ weekStr = '周二'
+ break
+ case 3:
+ weekStr = '周三'
+ break
+ case 4:
+ weekStr = '周四'
+ break
+ case 5:
+ weekStr = '周五'
+ break
+ case 6:
+ weekStr = '周六'
+ break
+ }
+
+ return weekStr
+ },
onCheckTime(type) {
this.activeType = type
}
diff --git a/pages/workPlan/workbench/components/custody-model.vue b/pages/workPlan/workbench/components/custody-model.vue
index 6af5b72..53546ed 100644
--- a/pages/workPlan/workbench/components/custody-model.vue
+++ b/pages/workPlan/workbench/components/custody-model.vue
@@ -3,7 +3,7 @@
现场监护
-
+
现场监护
@@ -12,7 +12,13 @@