|
@@ -1,5 +1,19 @@
|
|
<template>
|
|
<template>
|
|
<BaseBlockCom title="日历提醒">
|
|
<BaseBlockCom title="日历提醒">
|
|
|
|
+ <template #title>
|
|
|
|
+ <CusFormColumn
|
|
|
|
+ link="dept"
|
|
|
|
+ v-model:param="deptId"/>
|
|
|
|
+ <div class="more">查看更多》</div>
|
|
|
|
+ </template>
|
|
|
|
+ <div class="main">
|
|
|
|
+ <template v-for="item in getWeekCN(startWeek)">
|
|
|
|
+ <div class="item">{{item}}</div>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-for="item in Handle.getMonthCalendarData($store.state.app.timestamp, startWeek)">
|
|
|
|
+ <div class="item">{{item}}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
</BaseBlockCom>
|
|
</BaseBlockCom>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -20,6 +34,7 @@ import {useStore} from 'vuex'
|
|
import {useRouter, useRoute} from 'vue-router'
|
|
import {useRouter, useRoute} from 'vue-router'
|
|
import BaseBlockCom from '../../common/base-block.vue'
|
|
import BaseBlockCom from '../../common/base-block.vue'
|
|
import ButtonSwitchCom from '../../common/button-switch.vue'
|
|
import ButtonSwitchCom from '../../common/button-switch.vue'
|
|
|
|
+import * as Handle from '../../common/handle'
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: '',
|
|
name: '',
|
|
@@ -32,13 +47,50 @@ export default defineComponent({
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
|
|
const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
|
|
- const state = reactive({})
|
|
+ const state = reactive({
|
|
|
|
+ Handle: Handle,
|
|
|
|
+ deptId: '',
|
|
|
|
+ startWeek: 0
|
|
|
|
+ })
|
|
|
|
+ const getWeekCN = (xq) => {
|
|
|
|
+ const m = new Map([
|
|
|
|
+ [0, '日'],
|
|
|
|
+ [1, '一'],
|
|
|
|
+ [2, '二'],
|
|
|
|
+ [3, '三'],
|
|
|
|
+ [4, '四'],
|
|
|
|
+ [5, '五'],
|
|
|
|
+ [6, '六'],
|
|
|
|
+ ])
|
|
|
|
+ const weekArray: any = [];
|
|
|
|
+ for (let i = 0; i < 7; i++) {
|
|
|
|
+ const index = (xq + i) % 7;
|
|
|
|
+ weekArray.push(m.get(index));
|
|
|
|
+ }
|
|
|
|
+ return weekArray
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ onMounted(() => {
|
|
|
|
+ })
|
|
return {
|
|
return {
|
|
- ...toRefs(state)
|
|
+ ...toRefs(state),
|
|
|
|
+ getWeekCN
|
|
}
|
|
}
|
|
},
|
|
},
|
|
})
|
|
})
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
|
+.more {
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #2EB8FF;
|
|
|
|
+ margin-right: 10px;
|
|
|
|
+}
|
|
|
|
+.main {
|
|
|
|
+ display: grid;
|
|
|
|
+ grid-template-columns: repeat(7, 1fr);
|
|
|
|
+ row-gap: 10px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|