gaoshp
2024-04-20 772313f79294f87b99dc3de00961135fe1af57b9
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,