|
@@ -336,6 +336,17 @@ const queryForm = reactive({
|
|
|
time: "",
|
|
|
month: "",
|
|
|
});
|
|
|
+const getTime = () => {
|
|
|
+ // 创建一个新的 Date 对象
|
|
|
+ const currentDate = new Date();
|
|
|
+ // 获取当前年份
|
|
|
+ const currentYear = currentDate.getFullYear();
|
|
|
+ // 获取当前月份(0-11)
|
|
|
+ const currentMonth = currentDate.getMonth() + 1; // 月份从0开始,所以需要加1
|
|
|
+ queryForm.time = currentYear + "";
|
|
|
+ queryForm.month = currentMonth;
|
|
|
+};
|
|
|
+getTime();
|
|
|
const month = ref([
|
|
|
{
|
|
|
label: "1月",
|