| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="heade_title"> |
| | | <image class="icon" src="../../static/staff/ar_left@2x.png" mode="widthFix"></image> |
| | | <text class="date">{{ activeDate }}</text> |
| | | <image class="icon" src="../../static/staff/ar_right@2x.png" mode="widthFix"></image> |
| | | <image class="icon" src="../../static/staff/ar_left@2x.png" @click="changeDate(-1)" mode="widthFix"></image> |
| | | <text class="date">{{ activeDateCum }}</text> |
| | | <image class="icon" src="../../static/staff/ar_right@2x.png" @click="changeDate(1)" mode="widthFix"></image> |
| | | </view> |
| | | <!-- --> |
| | | <view class="meeting_list"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | | data() { |
| | | return { |
| | | activeDate: '2022年', |
| | | isShowDetail: true, |
| | | activeDate: '', |
| | | isShowDetail: false, |
| | | meetingList: [ |
| | | { name: '201会议室' }, |
| | | { name: '201会议室' }, |
| | |
| | | ] |
| | | |
| | | }; |
| | | }, |
| | | computed: { |
| | | activeDateCum(){ |
| | | const { activeDate } = this |
| | | let weeks = ['周日', '周一','周二','周三','周四','周五','周六'] |
| | | return dayjs(activeDate).format('YYYY年M月D日') + ' ' + weeks[dayjs(activeDate).day()] |
| | | } |
| | | }, |
| | | created() { |
| | | this.activeDate = dayjs().format('YYYY-MM-DD') |
| | | }, |
| | | methods: { |
| | | changeDate(num){ |
| | | const { activeDate } = this |
| | | let fn = num > 0 ? 'add' : 'subtract' |
| | | this.activeDate = dayjs(activeDate)[fn](1, 'days').format('YYYY-MM-DD') |
| | | } |
| | | } |
| | | } |
| | | </script> |