From 91fedc0d8a9fe77f17c3cbfcf68befb0f93aabf3 Mon Sep 17 00:00:00 2001 From: ysn <2126564605@qq.com> Date: Tue, 16 Jun 2026 17:20:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AF=BC=E8=88=AA=E6=A0=8F-=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Breadcrumb/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index cbbd9a1..f96ddcb 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -47,7 +47,7 @@ export default { } // 判断是否为视讯 if (!this.isDashboard(matched[0])) { - matched = [{ path: "/video/index", meta: { title: "视讯" } }].concat(matched) + matched = [{ path: "/index", meta: { title: "视讯" } }].concat(matched) } this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) }, From b00a22869166a50c7e3a6491f9d0d72135629f7f Mon Sep 17 00:00:00 2001 From: ysn <2126564605@qq.com> Date: Tue, 16 Jun 2026 19:55:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=97=85=E4=BE=8B=E5=BA=93-=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=97=A5=E6=9C=9F=E8=8C=83=E5=9B=B4-=E5=BF=AB?= =?UTF-8?q?=E6=8D=B7=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cases/index.vue | 186 ++++++++++++++++++-------------------- 1 file changed, 88 insertions(+), 98 deletions(-) diff --git a/src/views/cases/index.vue b/src/views/cases/index.vue index 553efb2..4eb805f 100644 --- a/src/views/cases/index.vue +++ b/src/views/cases/index.vue @@ -22,11 +22,26 @@ range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" - :picker-options="datePickerOptions" style="width: 100%" /> + + + + {{ shortcut.text }} + + + + + + - - - + + + - - - + + - - @@ -277,7 +292,8 @@ type="text" @click="handleTimeSectionUpdate(scope.row)" :disabled=" - scope.row.reporter_id != userInfo.id || ![1, 5].includes(scope.row.status) + scope.row.reporter_id != userInfo.id || + ![1, 5].includes(scope.row.status) " > {{ scope.row.date_time }} {{ scope.row.time_section }} @@ -473,92 +489,16 @@ export default { // 查询参数 timeType: "date_time", date: [], - datePickerOptions: { - shortcuts: [ - { - text: "今天", - onClick: (picker) => { - const end = new Date(); - const start = new Date(); - picker.$emit("pick", [start, end]); - }, - }, - { - text: "昨天", - onClick: (picker) => { - const end = new Date(); - end.setTime(end.getTime() - 3600 * 1000 * 24); - const start = new Date(end); - picker.$emit("pick", [start, end]); - }, - }, - { - text: "本周", - onClick: (picker) => { - const end = new Date(); - const start = new Date(); - const day = start.getDay(); - start.setDate(start.getDate() - day + (day === 0 ? -6 : 1)); - // 设置结束日期为本周最后一天(周日) - end.setDate(start.getDate() + 6); - end.setHours(23, 59, 59, 999); - picker.$emit("pick", [start, end]); - }, - }, - { - text: "本月", - onClick: (picker) => { - const end = new Date( - new Date().getFullYear(), - new Date().getMonth() + 1, - 0, - 23, - 59, - 59, - 999 - ); - const start = new Date( - new Date().getFullYear(), - new Date().getMonth(), - 1 - ); - picker.$emit("pick", [start, end]); - }, - }, - { - text: "上月", - onClick: (picker) => { - const end = new Date( - new Date().getFullYear(), - new Date().getMonth(), - 0 - ); - const start = new Date( - new Date().getFullYear(), - new Date().getMonth() - 1, - 1 - ); - picker.$emit("pick", [start, end]); - }, - }, - { - text: "今年", - onClick: (picker) => { - const end = new Date( - new Date().getFullYear(), - 11, - 31, - 23, - 59, - 59, - 999 - ); - const start = new Date(new Date().getFullYear(), 0, 1); - picker.$emit("pick", [start, end]); - }, - }, - ], - }, + // 快捷日期选项 + datePickerOptionsShortcuts: [ + { text: "今天", key: "today" }, + { text: "昨天", key: "yesterday" }, + { text: "本周", key: "week" }, + { text: "本月", key: "month" }, + { text: "上月", key: "lastMonth" }, + { text: "今年", key: "year" }, + ], + currentDateShortcut: "", queryParams: { page: 1, size: 10, @@ -590,6 +530,56 @@ export default { this.initDataDictionaries(); }, methods: { + // 快捷日期选择处理 + handleDateShortcut(key) { + let start = new Date(); + let end = new Date(); + switch (key) { + case "today": + break; + case "yesterday": + end.setTime(end.getTime() - 3600 * 1000 * 24); + start = new Date(end); + break; + case "week": + const day = start.getDay(); + start.setDate(start.getDate() - day + (day === 0 ? -6 : 1)); + // 设置结束日期为本周最后一天(周日) + end.setDate(start.getDate() + 6); + end.setHours(23, 59, 59, 999); + break; + case "month": + end = new Date( + new Date().getFullYear(), + new Date().getMonth() + 1, + 0, + 23, + 59, + 59, + 999 + ); + start = new Date(new Date().getFullYear(), new Date().getMonth(), 1); + break; + case "lastMonth": + end = new Date(new Date().getFullYear(), new Date().getMonth(), 0); + start = new Date( + new Date().getFullYear(), + new Date().getMonth() - 1, + 1 + ); + break; + case "year": + end = new Date(new Date().getFullYear(), 11, 31, 23, 59, 59, 999); + start = new Date(new Date().getFullYear(), 0, 1); + break; + default: + break; + } + + this.date = [start, end]; + this.currentDateShortcut = key; + }, + // 初始化数据字典 initDataDictionaries() { this.loadExamRooms(); @@ -642,9 +632,9 @@ export default { // 重置按钮操作 resetQuery() { this.resetForm("queryForm"); - const today = new Date().toISOString().split("T")[0]; this.timeType = "date_time"; - this.date = [today, today]; + this.currentDateShortcut = "today"; + this.handleDateShortcut(this.currentDateShortcut); this.queryParams.patient_type = this.patientTypeList[0].value; // this.queryParams.report_type = this.reportTypeList[0].value; this.handleQuery();