| | |
| | | </el-form> |
| | | </div> |
| | | <div class="display-buttons"> |
| | | <div class="display-btn" @click="activeKey = 1" :class="{ 'active-display-btn': activeKey === 1 }"> |
| | | <div class="display-btn" @click="switchBtnType(1)" :class="{ 'active-display-btn': activeKey === 1 }"> |
| | | 图形 |
| | | </div> |
| | | <div class="display-btn" @click="activeKey = 2" :class="{ 'active-display-btn': activeKey === 2 }"> |
| | | <div class="display-btn" @click="switchBtnType(2)" :class="{ 'active-display-btn': activeKey === 2 }"> |
| | | 数据 |
| | | </div> |
| | | </div> |
| | |
| | | import { useRoute } from "vue-router" |
| | | const { period } = proxy.useDict("period") |
| | | import useSettingsStore from "@/store/modules/settings" |
| | | import {ElMessage} from "element-plus"; |
| | | const settingsStore = useSettingsStore() |
| | | watch( |
| | | () => settingsStore.sideTheme, |
| | |
| | | } |
| | | }) |
| | | queryParams.value.meterId = res.data.length > 0 ? res.data[0].code : "" |
| | | getList() |
| | | if (res.data.length > 0) { |
| | | getList() |
| | | } |
| | | } |
| | | }) |
| | | } |
| | |
| | | queryParams.value.dataTime = proxy.dayjs(new Date()).format("YYYY-MM-DD") |
| | | getElectricityMeter({ nodeId: queryParams.value.nodeId }) |
| | | } |
| | | |
| | | function switchBtnType(e) { |
| | | activeKey.value = e |
| | | if (e === 1) { |
| | | getList() |
| | | } |
| | | } |
| | | |
| | | const LineChartRef = ref() |
| | | function getList() { |
| | | if (!queryParams.value.meterId) { |
| | | ElMessage.error("请选择电表") |
| | | return |
| | | } |
| | | loading.value = true |
| | | |
| | | let params = { |
| | | nodeId: queryParams.value.nodeId, |
| | | timeType: queryParams.value.timeType, |