From a09f0991bab9791e0c4911dbe4077579bc7016f4 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期三, 09 十月 2024 23:31:47 +0800
Subject: [PATCH] update
---
src/views/home/widgets/components/mdcRunning.vue | 26 +++++++++++++++++++-------
1 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/src/views/home/widgets/components/mdcRunning.vue b/src/views/home/widgets/components/mdcRunning.vue
index 3cfb93a..563cb25 100644
--- a/src/views/home/widgets/components/mdcRunning.vue
+++ b/src/views/home/widgets/components/mdcRunning.vue
@@ -2,14 +2,14 @@
* @Author: lzhe lzhe@example.com
* @Date: 2024-04-16 15:22:46
* @LastEditors: lzhe lzhe@example.com
- * @LastEditTime: 2024-06-21 01:45:18
+ * @LastEditTime: 2024-09-19 10:23:52
* @FilePath: /CPSnew/smart-web/src/views/home/widgets/components/mdcDeviceStatus.vue
* @Description: 杩欐槸榛樿璁剧疆,璇疯缃甡customMade`, 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<el-card shadow="hover" header="璁惧杩愯鏃堕暱鎺掑悕" style="height: 100%;" class="running">
<div class="running-icon">
- <el-icon><RefreshLeft /></el-icon>
+ <el-icon @click="refreshBtn"><RefreshLeft /></el-icon>
<el-icon @click="showSearch"><Filter /></el-icon>
</div>
<div class="no-list">璁惧杩愯鏃堕暱{{timeLevel}}灏忔椂鍐呭墠{{top}}鍚�</div>
@@ -37,6 +37,7 @@
:data="parentData"
:props="{ label: 'title' }"
style="width:80%;"
+ :default-checked-keys="selectedIds"
:render-after-expand="false" />
</div>
<div>
@@ -76,6 +77,7 @@
description: "蹇�熸煡鐪嬭澶囪繍琛屾椂闀挎帓鍚�",
data() {
return {
+ selectedIds: [],
parentData: {},
list: [],
timeLevelList: [],
@@ -86,8 +88,8 @@
top: ""
},
isSearch: false,
- timeLevel: "",
- top: "",
+ timeLevel: "24",
+ top: "5",
apiResource: {
workStationIdList: []
},
@@ -119,7 +121,7 @@
},
series: [
{
- data: [3.96, 3.95, 3.93, 3.91, 3.91, 3.9, 3.85],
+ data: [],
type: 'bar',
label: {
show: true, // 鏄剧ず鏍囩
@@ -128,7 +130,10 @@
// 杩斿洖鏁版嵁鍊煎拰鎮ㄦ兂瑕佹坊鍔犵殑瀛楃涓茬殑缁勫悎
return params.value + 'h'; // 渚嬪锛岃繑鍥� '3.96 鏂囧瓧'
}
- }
+ },
+ itemStyle: {
+ color: '#5CBF7D'
+ }
}
]
},
@@ -145,6 +150,9 @@
}
},
methods: {
+ refreshBtn() {
+ this.getList();
+ },
showSearch() {
this.search.timeLevel = this.timeLevel;
this.search.top = this.top;
@@ -206,7 +214,10 @@
this.cardData = this.$CONFIG.DEFAULT_GRID.data;
this.cardData.forEach(item=> {
if(item.cardKey == "mdcRunning") {
+ if(item.apiResource == "") return;
this.apiResource = JSON.parse(item.apiResource);
+ this.selectedIds = this.apiResource.workStationIdList;
+ this.search.workStationIdList = this.apiResource.workStationIdList;
this.timeLevel = this.apiResource.timeLevel;
this.top = this.apiResource.top;
if(this.apiResource.workStationIdList.length > 0) {
@@ -222,7 +233,8 @@
var recordDom = document.getElementById('running');
if(res.data.categories.length == 0) return;
this.option.yAxis.data = res.data.categories;
- this.option.series.data = res.data.series;
+ this.option.series[0].data = res.data.series[0].data;
+ console.log(this.option.series.data,res.data.series[0].data,2)
var myChart = echarts.init(recordDom);
myChart.setOption(this.option);
}
--
Gitblit v1.9.3