From 772313f79294f87b99dc3de00961135fe1af57b9 Mon Sep 17 00:00:00 2001 From: gaoshp <291585735@qq.com> Date: 星期六, 20 四月 2024 20:28:10 +0800 Subject: [PATCH] 更新效率 --- src/views/mdc/components/Shift.vue | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/views/mdc/components/Shift.vue b/src/views/mdc/components/Shift.vue index 9adc08a..a0a6a2e 100644 --- a/src/views/mdc/components/Shift.vue +++ b/src/views/mdc/components/Shift.vue @@ -1,15 +1,16 @@ <!-- * @Date: 2024-04-18 21:52:18 * @LastEditors: Sneed - * @LastEditTime: 2024-04-20 19:40:06 + * @LastEditTime: 2024-04-20 19:51:13 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/Shift.vue --> <template> <el-row> <el-col> <el-button-group> - <el-button :type="btnListActive == item.id ? 'primary' : ''" v-for="item in btnList" :key="item.id">{{ - item.title }}</el-button> + <el-button @click="btnListActive = item.id" :type="btnListActive == item.id ? 'primary' : ''" + v-for="item in btnList" :key="item.id">{{ + item.title }}</el-button> </el-button-group> </el-col> <el-col style="margin-top: 12px;"> @@ -66,8 +67,23 @@ option2: null, } }, + watch: { + btnListActive(val) { + this.query({ + ...this.params, + startDate: val, + endDate: val + }) + this.queryChart({ + ...this.params, + startDate: val, + endDate: val + }) + } + }, methods: { init(params) { + this.params = params this.getTime({ endDate: params.endDate, startDate: params.startDate, -- Gitblit v1.9.3