From 91513e171078ed6b0887f87b9fced33895d6d3fb Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期二, 08 七月 2025 08:35:50 +0800 Subject: [PATCH] 2025.7.8 --- src/stores/area.js | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/stores/area.js b/src/stores/area.js index 933ce87..59e5d8e 100644 --- a/src/stores/area.js +++ b/src/stores/area.js @@ -6,6 +6,9 @@ export const useAreaStore = defineStore('area', { state: () => { return { + locations: {}, + sceneType: {}, + time: '', area: { provincecode: undefined, provincename: undefined, @@ -28,9 +31,19 @@ this.area.cityname = location.cName this.area.districtcode = location.dCode this.area.districtname = location.dName + + this.locations = { + pCode: location.pCode, + pName: location.pName, + cCode: location.cCode, + cName: location.cName, + dCode: location.dCode, + dName: location.dName + } }, setTimePeriod(time, type) { - const d = time ? dayjs(time) : dayjs() + this.time = time ? time : new Date() + const d = dayjs(this.time) this.area.starttime = d.startOf(type).format('YYYY-MM-DD HH:mm:ss') this.area.endtime = d.endOf(type).format('YYYY-MM-DD HH:mm:ss') }, @@ -44,7 +57,8 @@ }, // 璁剧疆鍦烘櫙绫诲瀷 setSceneType(t) { - this.area.scensetypeid = t + this.sceneType = t + this.area.scensetypeid = t.value } } }) -- Gitblit v1.9.3