时间更改获取接口
This commit is contained in:
parent
5b93e3373b
commit
228fd0a5c6
|
@ -20,6 +20,8 @@ export const useTimeStore = defineStore("time", () => {
|
||||||
const months:Ref<any> = ref(now.getMonth() + 1);
|
const months:Ref<any> = ref(now.getMonth() + 1);
|
||||||
const days:Ref<any>=ref(now.getDate());
|
const days:Ref<any>=ref(now.getDate());
|
||||||
const nowDays:Ref<any> = ref(dates);
|
const nowDays:Ref<any> = ref(dates);
|
||||||
|
|
||||||
|
const allDates:any = reactive({years: years, months: months, days:days})
|
||||||
const setYears = (year:any) => {
|
const setYears = (year:any) => {
|
||||||
years.value = year;
|
years.value = year;
|
||||||
};
|
};
|
||||||
|
@ -59,5 +61,5 @@ export const useTimeStore = defineStore("time", () => {
|
||||||
return titles
|
return titles
|
||||||
})
|
})
|
||||||
|
|
||||||
return { years, months,days,nowDays, setYears, setMounths,setDays,setNowDays,computDate,nowTitle };
|
return { years, months,days,nowDays, setYears, setMounths,setDays,setNowDays,computDate,nowTitle,allDates };
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ import { useTimeStore } from "@/stores/index";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
const timeStore = useTimeStore();
|
const timeStore = useTimeStore();
|
||||||
|
|
||||||
const { nowTitle, years, months, days } = storeToRefs(timeStore);
|
const { nowTitle, years, months, days,allDates } = storeToRefs(timeStore);
|
||||||
|
|
||||||
import { AdminPCIndex, WeekPay, StatisticsReportedRanking, GetBatch } from "@/api";
|
import { AdminPCIndex, WeekPay, StatisticsReportedRanking, GetBatch } from "@/api";
|
||||||
import { useDataStore } from "@/stores/index";
|
import { useDataStore } from "@/stores/index";
|
||||||
|
@ -138,7 +138,15 @@ const getAdminPCIndex = () => {
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
watch(years,()=>{
|
watch(allDates,()=>{
|
||||||
|
console.log('allDates',allDates.value);
|
||||||
|
payData()
|
||||||
|
getAdminPCIndex()
|
||||||
|
},{
|
||||||
|
deep: true
|
||||||
|
})
|
||||||
|
|
||||||
|
/* watch(years,()=>{
|
||||||
// console.log('years.value',years.value);
|
// console.log('years.value',years.value);
|
||||||
payData()
|
payData()
|
||||||
getAdminPCIndex()
|
getAdminPCIndex()
|
||||||
|
@ -153,8 +161,7 @@ watch(days,()=>{
|
||||||
// console.log('days.value',days.value);
|
// console.log('days.value',days.value);
|
||||||
payData()
|
payData()
|
||||||
getAdminPCIndex()
|
getAdminPCIndex()
|
||||||
|
}) */
|
||||||
})
|
|
||||||
|
|
||||||
const batchs = ref()
|
const batchs = ref()
|
||||||
// 获取学历层次
|
// 获取学历层次
|
||||||
|
|
Loading…
Reference in New Issue