首页样式等逻辑完善
This commit is contained in:
parent
dccf64980d
commit
09413863b5
|
|
@ -761,6 +761,12 @@
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/workPlan/custody/index",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/workPlan/dayPlan/index",
|
"path": "pages/workPlan/dayPlan/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
<template>
|
||||||
|
<view>现场监护</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
||||||
|
|
@ -54,9 +54,9 @@
|
||||||
<!-- 选择周的时候日历 -->
|
<!-- 选择周的时候日历 -->
|
||||||
<view v-show="activeType === 2">
|
<view v-show="activeType === 2">
|
||||||
<view class="week-th">
|
<view class="week-th">
|
||||||
<view v-for="item in weekList" :key="item">
|
<view v-for="(item, index) in weekList" :key="item">
|
||||||
<text>{{ item.title }}</text>
|
<text>{{ item.title }}</text>
|
||||||
<text v-if="item !== '分公司'" style="margin-top: 6rpx">{{ item.time }}</text>
|
<text v-if="index !== 0" style="margin-top: 6rpx">{{ weekTimeChange(index) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -79,8 +79,8 @@
|
||||||
<view>工程名称</view>
|
<view>工程名称</view>
|
||||||
<view>作业人数</view>
|
<view>作业人数</view>
|
||||||
<view>
|
<view>
|
||||||
<text>周二</text>
|
<text>{{ currentWeekDay }}</text>
|
||||||
<text>10/22</text>
|
<text>{{ currentDays }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -189,11 +189,25 @@ export default {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
days: [],
|
days: [],
|
||||||
|
// currentWeekDay: this.$moment().day(),
|
||||||
|
currentDays: this.$moment().format('MM-DD'),
|
||||||
customDates: {
|
customDates: {
|
||||||
'2023-06-15': '自定义内容'
|
'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() {
|
mounted() {
|
||||||
this.generateCalendar()
|
this.generateCalendar()
|
||||||
},
|
},
|
||||||
|
|
@ -252,8 +266,10 @@ export default {
|
||||||
changeDay(delta) {
|
changeDay(delta) {
|
||||||
if (delta > 0) {
|
if (delta > 0) {
|
||||||
this.currentDay = this.$moment(this.currentDay).add(1, 'days').format('YYYY-MM-DD')
|
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 {
|
} else {
|
||||||
this.currentDay = this.$moment(this.currentDay).subtract(1, 'days').format('YYYY-MM-DD')
|
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) {
|
changeWeek(delta) {
|
||||||
|
|
@ -269,6 +285,34 @@ export default {
|
||||||
console.log('选择的日期', day.date)
|
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) {
|
onCheckTime(type) {
|
||||||
this.activeType = type
|
this.activeType = type
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<view class="custody">
|
<view class="custody">
|
||||||
<h4>现场监护</h4>
|
<h4>现场监护</h4>
|
||||||
<view class="custody-content">
|
<view class="custody-content">
|
||||||
<view class="icon-box">
|
<view class="icon-box" @tap="onJumpCustody">
|
||||||
<image src="@/static/realName/attendance_statistics.png" mode="scaleToFill" />
|
<image src="@/static/realName/attendance_statistics.png" mode="scaleToFill" />
|
||||||
现场监护
|
现场监护
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -12,7 +12,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {}
|
export default {
|
||||||
|
methods: {
|
||||||
|
onJumpCustody() {
|
||||||
|
uni.navigateTo({ url: '/pages/workPlan/custody/index' })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue