From 1534aee0339dee8000cdd26c21797cf3ad391f7a Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期一, 06 五月 2024 17:33:23 +0800 Subject: [PATCH] 新增折线图模块功能 --- src/views/historymode/HistoryMode.vue | 29 +++++++++++++++++++++-------- 1 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/views/historymode/HistoryMode.vue b/src/views/historymode/HistoryMode.vue index 50dc1f0..179e2cd 100644 --- a/src/views/historymode/HistoryMode.vue +++ b/src/views/historymode/HistoryMode.vue @@ -1,12 +1,21 @@ <template> - <div class="fy-container"> + <div class="p-events-none m-t-2"> <el-row justify="center"> <SearchBar search-time="" @search="fetchHistroyData"></SearchBar> </el-row> - <FactorRadio - :device-type="deviceType" - @change="(e) => (factorType = e)" - ></FactorRadio> + <el-row class="m-t-2"> + <FactorRadio + :device-type="deviceType" + @change="(e) => (factorType = e)" + ></FactorRadio> + </el-row> + <el-row class="m-t-2"> + <FactorLegend + class="m-t-2" + :factor="factorDatas.factor[factorType]" + ></FactorLegend> + </el-row> + <TrendAnalysis :factor-datas="factorDatas"></TrendAnalysis> </div> </template> @@ -18,8 +27,10 @@ import moment from 'moment'; import { TYPE0 } from '@/constant/device-type'; import { FactorDatas } from '@/model/FactorDatas'; +import TrendAnalysis from './component/TrendAnalysis.vue'; export default { + components: { TrendAnalysis }, setup() { const { loading, fetchData } = useFetchData(10000); return { loading, fetchData }; @@ -60,7 +71,7 @@ // this.factorMode = factorMode; // this.factorType = factorType; // this.factorName = factorName; - // this.factorDatas.refreshHeight(this.factorType + 1 + ''); + this.factorDatas.refreshHeight(this.factorType); // this.refreshLegend(this.factorDatas); // this.mapMaker.setFactorType(factorType); // if (!this.mapMaker.runStatus()) { @@ -108,7 +119,7 @@ }, fetchRealTimeData() { // fixme 2024.5.3 姝ゅ鍒濆鑾峰彇鐨勬暟鎹紝鍙傛暟搴旇鐢眘earchbar鍐冲畾锛屽悗缁慨鏀� - this.fetchData((page, pageSize) => { + this.fetchData((page) => { return monitorDataApi .fetchHistroyData({ deviceCode: '0a0000000001', @@ -133,6 +144,8 @@ }; </script> <style scoped> -.fy-container { +.p-events-auto { + /* background-color: antiquewhite; */ + /* padding-top: 1px; */ } </style> -- Gitblit v1.9.3