周历
This commit is contained in:
parent
546270f4aa
commit
c73e27774e
@ -319,13 +319,18 @@ export default {
|
||||
paiming: "rank",
|
||||
wo: "my",
|
||||
yizhucexuesheng: "This number is already registered as a student",
|
||||
zhouri:"baiSunday",
|
||||
zhouri:"Sunday",
|
||||
zhouyi:"Monday",
|
||||
zhouer:"Tuesday",
|
||||
zhousan:"Wednesday",
|
||||
zhousi:"Thursday",
|
||||
zhouwu:"Friday",
|
||||
zhouliu:"Saturday",
|
||||
shangyige:"previous",
|
||||
xiayige:"next",
|
||||
nian:"year",
|
||||
yues:"month",
|
||||
zhourili:"Week",
|
||||
shichangtishi:"",
|
||||
renshutishi: '',
|
||||
tixianzhu: "",
|
||||
|
@ -326,6 +326,11 @@ export default {
|
||||
zhousi:"周四",
|
||||
zhouwu:"周五",
|
||||
zhouliu:"周六",
|
||||
shangyige:"上一月",
|
||||
xiayige:"下一月",
|
||||
nian:"年",
|
||||
yues:"月",
|
||||
zhourili:"周日历",
|
||||
shichangtishi:"",
|
||||
renshutishi: '',
|
||||
tixianzhu:"",
|
||||
|
@ -103,7 +103,7 @@ export function getweek(time: string, id: string,zhou?: number){
|
||||
|
||||
for(let i = 0; i < 7; i++){
|
||||
console.log(i);
|
||||
now = now.day(i + 1)
|
||||
now = now.day(i)
|
||||
date[i] = {day: ""};
|
||||
date[i].day = now.year() + "-" + (now.month() + 1 < 10 ? '0' + (now.month() + 1) : (now.month() + 1)) + "-" + (now.date() < 10 ? '0' + now.date() : now.date())
|
||||
date[i].list = []
|
||||
|
@ -3,26 +3,26 @@
|
||||
<div class="head">
|
||||
<div @click="shang">
|
||||
<img src="../../static/images/left.png" alt="">
|
||||
上一月
|
||||
{{lan.$t("shangyige")}}
|
||||
</div>
|
||||
{{month.year}}年{{month.yue}}月
|
||||
{{month.year}}{{lan.$t("nian")}}{{month.yue}}{{lan.$t("yues")}}
|
||||
<a-button type="primary" class="button" @click="navto()">
|
||||
周日历
|
||||
{{lan.$t("zhourili")}}
|
||||
</a-button>
|
||||
<div @click="xia">
|
||||
下一月
|
||||
{{lan.$t("xiayige")}}
|
||||
<img src="../../static/images/right.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="yue">
|
||||
<div class="heads">
|
||||
<div :class="{zhou: yue == 0 && month.zhou == 0}">周日</div>
|
||||
<div :class="{zhou: yue == 0 && month.zhou == 1}">周一</div>
|
||||
<div :class="{zhou: yue == 0 && month.zhou == 2}">周二</div>
|
||||
<div :class="{zhou: yue == 0 && month.zhou == 3}">周三</div>
|
||||
<div :class="{zhou: yue == 0 && month.zhou == 4}">周四</div>
|
||||
<div :class="{zhou: yue == 0 && month.zhou == 5}">周五</div>
|
||||
<div :class="{zhou: yue == 0 && month.zhou == 6}">周六</div>
|
||||
<div :class="{zhou: yue == 0 && month.zhou == 0}">{{lan.$t("zhouri")}}</div>
|
||||
<div :class="{zhou: yue == 0 && month.zhou == 1}">{{lan.$t("zhouyi")}}</div>
|
||||
<div :class="{zhou: yue == 0 && month.zhou == 2}">{{lan.$t("zhouer")}}</div>
|
||||
<div :class="{zhou: yue == 0 && month.zhou == 3}">{{lan.$t("zhousan")}}</div>
|
||||
<div :class="{zhou: yue == 0 && month.zhou == 4}">{{lan.$t("zhousi")}}</div>
|
||||
<div :class="{zhou: yue == 0 && month.zhou == 5}">{{lan.$t("zhouwu")}}</div>
|
||||
<div :class="{zhou: yue == 0 && month.zhou == 6}">{{lan.$t("zhouliu")}}</div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="row" v-for="(item,index) in month.date" :key="index">
|
||||
@ -195,14 +195,14 @@ import { getdate, getDay } from "@/utils/date"
|
||||
import { getdatelist } from '@/api';
|
||||
import store from '@/store';
|
||||
import router from '@/router';
|
||||
import { useI18n } from '@/utils/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
props:{
|
||||
|
||||
},
|
||||
setup(){
|
||||
console.log(1)
|
||||
|
||||
const lan = useI18n();
|
||||
const month: any = ref({zhou:0,data:[]});
|
||||
const yue = ref(0);
|
||||
const userid = computed(() => {
|
||||
@ -287,7 +287,8 @@ export default defineComponent({
|
||||
shang,
|
||||
yue,
|
||||
navto,
|
||||
gotolive
|
||||
gotolive,
|
||||
lan
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -15,26 +15,26 @@
|
||||
<div class="week">
|
||||
<div class="heads">
|
||||
<div></div>
|
||||
<div :class="{ zhou: zhou == 0 && week.zhou == 0 }">
|
||||
{{lan.$t("zhouri")}}<span>{{ week.date[0].day }}</span>
|
||||
</div>
|
||||
<div :class="{ zhou: zhou == 0 && week.zhou == 1 }">
|
||||
周一<span>{{ week.date[0].day }}</span>
|
||||
{{lan.$t("zhouyi")}}<span>{{ week.date[1].day }}</span>
|
||||
</div>
|
||||
<div :class="{ zhou: zhou == 0 && week.zhou == 2 }">
|
||||
周二<span>{{ week.date[1].day }}</span>
|
||||
{{lan.$t("zhouer")}}<span>{{ week.date[2].day }}</span>
|
||||
</div>
|
||||
<div :class="{ zhou: zhou == 0 && week.zhou == 3 }">
|
||||
周三<span>{{ week.date[2].day }}</span>
|
||||
{{lan.$t("zhousan")}}<span>{{ week.date[3].day }}</span>
|
||||
</div>
|
||||
<div :class="{ zhou: zhou == 0 && week.zhou == 4 }">
|
||||
周四<span>{{ week.date[3].day }}</span>
|
||||
{{lan.$t("zhousi")}}<span>{{ week.date[4].day }}</span>
|
||||
</div>
|
||||
<div :class="{ zhou: zhou == 0 && week.zhou == 5 }">
|
||||
周五<span>{{ week.date[4].day }}</span>
|
||||
{{lan.$t("zhouwu")}}<span>{{ week.date[5].day }}</span>
|
||||
</div>
|
||||
<div :class="{ zhou: zhou == 0 && week.zhou == 6 }">
|
||||
周六<span>{{ week.date[5].day }}</span>
|
||||
</div>
|
||||
<div :class="{ zhou: zhou == 0 && week.zhou == 0 }">
|
||||
周日<span>{{ week.date[6].day }}</span>
|
||||
{{lan.$t("zhouliu")}}<span>{{ week.date[6].day }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="body">
|
||||
@ -256,6 +256,7 @@ import { getdatelist, userinfo } from '@/api';
|
||||
import router from '@/router';
|
||||
import dayjs from 'dayjs';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from '@/utils/i18n';
|
||||
|
||||
export default defineComponent({
|
||||
props: {},
|
||||
@ -265,7 +266,7 @@ export default defineComponent({
|
||||
const time: any = useRoute().query.time;
|
||||
let userid = userinfo.value.memberid;
|
||||
const week = ref<any>(getweek(time, userinfo.value.zoneValue));
|
||||
|
||||
const lan = useI18n()
|
||||
function getdates(userid: number){
|
||||
getdatelist(week.value.start, week.value.end, userid).then((res: any)=>{
|
||||
console.log(res)
|
||||
@ -358,7 +359,8 @@ export default defineComponent({
|
||||
top,
|
||||
times,
|
||||
xs,
|
||||
tolive
|
||||
tolive,
|
||||
lan
|
||||
};
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user