智能工廠生產監控大屏-vue純前端靜態頁面練習

學習前端還是非常有意思的,因為前端真的是可見即所得,可以做出來非常好看漂亮的頁面,最近我就在使用前端技術 做一些大屏報表,在制作這些大屏報表過程中,又熟練的練習了自己的學到的相關的前端技術,接下來把做出來的效果 分享給大家。
使用的技術是vue2 + element-ui
· Vue2:
· Element-UI:
· ECharts:
· Node版本 16.20
安裝依賴:npm i
運行項目:npm run serve
打包項目:npm run build
介紹了使用的技術后,接下來給大家看一下頁面效果,
在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述
一共做了大概四個頁面的 頁面 頁面需求主要是實現的對工廠的一種數據大屏的統計和展示,讓大家通過大屏報表可以一目了然的看到工廠里的使用情況。
因為是練習前端項目,所以是個純前端的頁面,沒有對接后端。
有興趣學習的小伙伴可以去看看~
源碼地址:
https://wwwoop.com/home/Index/projectInfo?goodsId=105&typeParam=2&subKey=1

部分代碼:

<template><div class="equipment-monitor"><div class="monitor-header"><data-card v-for="(card, index) in equipmentCards" :key="index":title="card.title":value="card.value":unit="card.unit":icon="card.icon":value-color="card.valueColor":footer="card.footer":trend-type="card.trendType":trend-value="card.trendValue"/></div><div class="monitor-content"><div class="equipment-status"><div class="status-header"><h3>設備運行狀態</h3><div class="status-legend"><span class="legend-item"><span class="dot running"></span>運行中</span><span class="legend-item"><span class="dot idle"></span>空閑</span><span class="legend-item"><span class="dot maintenance"></span>維護中</span><span class="legend-item"><span class="dot fault"></span>故障</span></div></div><div class="equipment-list"><div v-for="(item, index) in equipmentList" :key="index"class="equipment-item"><div class="equipment-name">{{ item.name }}</div><div class="equipment-info"><div class="status-indicator" :class="item.status"></div><div class="equipment-details"><div class="detail-item"><span class="label">運行時間:</span><span class="value">{{ item.runTime }}</span></div><div class="detail-item"><span class="label">效率:</span><span class="value">{{ item.efficiency }}%</span></div><div class="detail-item"><span class="label">溫度:</span><span class="value" :class="{'warning': item.temperature > 75}">{{ item.temperature }}°C</span></div></div></div></div></div></div><div class="monitor-charts"><div class="chart-row"><div class="chart-item"><pie-chart title="設備狀態分布" :data="equipmentStatusData"height="250px"/></div><div class="chart-item"><line-chart title="設備運行效率趨勢" :x-data="efficiencyTrendData.xData" :series="efficiencyTrendData.series"height="250px"/></div></div><div class="chart-item maintenance-chart"><bar-chart title="設備維護記錄" :x-data="maintenanceData.xData" :series="maintenanceData.series"height="250px"/></div></div></div></div>
</template><script>
// 作者:json
import DataCard from '../components/DataCard.vue'
import LineChart from '../components/charts/LineChart.vue'
import BarChart from '../components/charts/BarChart.vue'
import PieChart from '../components/charts/PieChart.vue'export default {name: 'EquipmentMonitor',components: {DataCard,LineChart,BarChart,PieChart},data() {return {// 頂部卡片數據equipmentCards: [{title: '設備總數',value: '42',unit: '臺',icon: 'el-icon-s-platform',valueColor: '#40a9ff'},{title: '運行設備',value: '36',unit: '臺',icon: 'el-icon-s-operation',valueColor: '#52c41a',footer: '運行率',trendType: 'up',trendValue: '85.7%'},{title: '故障設備',value: '2',unit: '臺',icon: 'el-icon-warning',valueColor: '#f5222d',footer: '較昨日',trendType: 'down',trendValue: '1臺'},{title: '設備健康度',value: '92.5',unit: '%',icon: 'el-icon-s-help',valueColor: '#faad14',footer: '較上月',trendType: 'up',trendValue: '1.2%'}],// 設備列表equipmentList: [{name: '注塑機 #1',status: 'running',runTime: '12h 45m',efficiency: 96,temperature: 68},{name: '注塑機 #2',status: 'running',runTime: '8h 30m',efficiency: 94,temperature: 72},{name: '裝配線 #1',status: 'running',runTime: '10h 15m',efficiency: 92,temperature: 65},{name: '裝配線 #2',status: 'idle',runTime: '0h 0m',efficiency: 0,temperature: 45},{name: '包裝機 #1',status: 'running',runTime: '11h 20m',efficiency: 90,temperature: 62},{name: '包裝機 #2',status: 'maintenance',runTime: '0h 0m',efficiency: 0,temperature: 40},{name: '測試設備 #1',status: 'running',runTime: '9h 50m',efficiency: 95,temperature: 58},{name: '測試設備 #2',status: 'fault',runTime: '0h 0m',efficiency: 0,temperature: 82}],// 設備狀態分布equipmentStatusData: [{ value: 36, name: '運行中', itemStyle: { color: '#52c41a' } },{ value: 2, name: '空閑', itemStyle: { color: '#40a9ff' } },{ value: 2, name: '維護中', itemStyle: { color: '#faad14' } },{ value: 2, name: '故障', itemStyle: { color: '#f5222d' } }],// 效率趨勢數據efficiencyTrendData: {xData: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],series: [{name: '設備效率',data: [88, 86, 90, 89, 91, 90, 92, 93, 91, 94, 93, 95],color: '#40a9ff'}]},// 維護記錄數據maintenanceData: {xData: ['注塑機', '裝配線', '包裝機', '測試設備', '物流設備', '其他'],series: [{name: '計劃維護',data: [5, 3, 4, 2, 3, 1],color: '#40a9ff'},{name: '緊急維護',data: [2, 1, 2, 1, 0, 1],color: '#f5222d'}]}}}
}
</script><style scoped>
.equipment-monitor {height: 100%;display: flex;flex-direction: column;
}.monitor-header {display: grid;grid-template-columns: repeat(4, 1fr);gap: 15px;margin-bottom: 15px;
}.monitor-content {flex: 1;display: grid;grid-template-columns: 40% 60%;gap: 15px;overflow: hidden;
}.equipment-status {background: rgba(6, 30, 93, 0.5);border: 1px solid #1d4584;border-radius: 4px;padding: 15px;display: flex;flex-direction: column;
}.status-header {display: flex;justify-content: space-between;align-items: center;margin-bottom: 15px;
}.status-header h3 {color: #40a9ff;margin: 0;font-size: 16px;
}.status-legend {display: flex;gap: 10px;
}.legend-item {display: flex;align-items: center;font-size: 12px;color: rgba(255, 255, 255, 0.7);
}.dot {width: 8px;height: 8px;border-radius: 50%;margin-right: 5px;
}.dot.running {background-color: #52c41a;
}.dot.idle {background-color: #40a9ff;
}.dot.maintenance {background-color: #faad14;
}.dot.fault {background-color: #f5222d;
}.equipment-list {flex: 1;overflow-y: auto;display: grid;grid-template-columns: repeat(2, 1fr);gap: 10px;
}.equipment-item {background: rgba(6, 30, 93, 0.3);border: 1px solid rgba(29, 69, 132, 0.5);border-radius: 4px;padding: 10px;
}.equipment-name {font-weight: bold;margin-bottom: 10px;color: #fff;
}.equipment-info {display: flex;align-items: center;
}.status-indicator {width: 12px;height: 12px;border-radius: 50%;margin-right: 10px;
}.status-indicator.running {background-color: #52c41a;box-shadow: 0 0 5px #52c41a;
}.status-indicator.idle {background-color: #40a9ff;box-shadow: 0 0 5px #40a9ff;
}.status-indicator.maintenance {background-color: #faad14;box-shadow: 0 0 5px #faad14;
}.status-indicator.fault {background-color: #f5222d;box-shadow: 0 0 5px #f5222d;animation: blink 1s infinite;
}@keyframes blink {0% { opacity: 1; }50% { opacity: 0.5; }100% { opacity: 1; }
}.equipment-details {flex: 1;
}.detail-item {display: flex;justify-content: space-between;font-size: 12px;margin-bottom: 5px;
}.detail-item .label {color: rgba(255, 255, 255, 0.7);
}.detail-item .value {color: #fff;
}.detail-item .value.warning {color: #f5222d;
}.monitor-charts {display: flex;flex-direction: column;gap: 15px;
}.chart-row {display: grid;grid-template-columns: repeat(2, 1fr);gap: 15px;
}.maintenance-chart {height: 250px;
}
</style>

目錄截圖:
在這里插入圖片描述

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/web/93228.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/93228.shtml
英文地址,請注明出處:http://en.pswp.cn/web/93228.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

HTTP 協議詳細介紹

目錄一、HTTP 的基本概念與歷史演進1. 核心定義2. 歷史版本演進二、HTTP 的核心工作原理1. 請求-響應模型2. 基于 TCP 的傳輸&#xff08;HTTP/1.1、HTTP/2&#xff09;三、HTTP 請求結構1. 請求行2. 請求頭3. 請求體四、HTTP 響應結構1. 狀態行2. 響應頭3. 響應體五、HTTP 與 …

正則化:從過擬合到泛化的「平衡藝術」

在機器學習領域&#xff0c;有一個幾乎所有從業者都會遇到的「噩夢」&#xff1a;模型在訓練集上表現完美&#xff08;損失趨近于0&#xff09;&#xff0c;但在測試集上卻大幅「翻車」。這種現象被稱為「過擬合」&#xff08;Overfitting&#xff09;&#xff0c;它像一把雙刃…

[Python 基礎課程]根據描述定義一個 Person 類

人都屬于人類這個物種&#xff0c;每一個人都會有姓名和年齡&#xff0c;人都可以介紹自己&#xff0c;隨著時間的流逝&#xff0c;人都會增加年齡&#xff0c;每一個人都能獲取到自己的物種信息。 我們的抽象過程&#xff1a; 所有的 Person 對象都應該有一個共同的屬性來表示…

熱門手機機型重啟速度對比

以下是2023-2024年市場主流熱門手機機型的重啟速度對比分析&#xff0c;基于公開測試數據和用戶反饋整理&#xff08;數據會因系統版本和測試環境不同存在波動&#xff09;&#xff1a;旗艦機型重啟速度排名&#xff08;冷啟動&#xff09;排名機型平均重啟時間關鍵配置優化技術…

第454題.四數相加II

第454題.四數相加II 力扣題目鏈接(opens new window) 給定四個包含整數的數組列表 A , B , C , D ,計算有多少個元組 (i, j, k, l) &#xff0c;使得 A[i] B[j] C[k] D[l] 0。 為了使問題簡單化&#xff0c;所有的 A, B, C, D 具有相同的長度 N&#xff0c;且 0 ≤ N ≤…

力扣top100(day04-05)--堆

本文為力扣TOP100刷題筆記 筆者根據數據結構理論加上最近刷題整理了一套 數據結構理論加常用方法以下為該文章&#xff1a; 力扣外傳之數據結構&#xff08;一篇文章搞定數據結構&#xff09; 215. 數組中的第K個最大元素 class Solution {// 快速選擇遞歸函數int quickselect(…

CCS雙軸相位偏移光源 讓淺凹痕無處遁形

在工業檢測中&#xff0c;淺凹痕表面檢測對精度和可靠性要求極高&#xff0c;工業光源在此過程中扮演著關鍵角色&#xff0c;工業光源通過精準的光學設計&#xff08;角度、波長、強度&#xff09;將肉眼不可見的淺凹痕轉化為可量化的光學信號&#xff0c;是實現高精度自動化檢…

專題三_二分_x 的平方根

一&#xff1a;題目解釋&#xff1a;返回x的算數平方根&#xff0c;如果是小數&#xff0c;則舍去小數部分&#xff0c;返回整數即可&#xff01;二&#xff1a;算法①&#xff1a;暴力從1開始求平方&#xff0c;最后要么直接找到一個值的平方為x&#xff0c;要么發現x在兩個相…

Python 操作 Redis 的客戶端庫 redis-py

Python 操作 Redis 的客戶端庫 redis-py1. Installation2. Connect and test3. Connection Pools4. Redis Commands4.1. set(name, value, exNone, pxNone, nxFalse, xxFalse, keepttlFalse, getFalse, exatNone, pxatNone)4.1.1. setnx(name, value)4.1.2. setex(name, time, …

社區物業HCommunity本地部署手冊

HC小區管理系統安裝手動版 更多文章參考&#xff1a; http://www.homecommunity.cn/pages/hc/hcH5_cn.html 1.0 說明 很多開發不太喜歡用梓豪安裝&#xff0c;希望通過手工自己安裝&#xff0c;這個就需要開發人員 有一定的安裝軟件能力&#xff0c;比如能夠自行安裝mysql能…

單例模式-使用局部變量懶漢不用加鎖

在 C11 及之后&#xff0c;“局部靜態變量懶漢”&#xff08;Meyers’ Singleton&#xff09;不需要自己加鎖&#xff0c;標準已經幫你做好了線程安全。 Singleton& getInstance() {static Singleton inst; // ← 這一句并發時只會初始化一次return inst; }首次調用時&am…

51單片機-GPIO介紹

本章概述思維導圖&#xff1a;51單片機引腳介紹STC89系列51單片機引腳介紹STC89系列51單片機的引腳是單片機與外部電路連接的接口&#xff0c;用于實現電源供電、時鐘信號輸入、控制信號輸出以及數據輸入輸出等功能。PDIP封裝引腳圖&#xff1a;1. 電源引腳&#xff1a;VCC&…

CERT/CC警告:新型HTTP/2漏洞“MadeYouReset“恐致全球服務器遭DDoS攻擊癱瘓

2025年8月15日CERT/CC&#xff08;計算機應急響應協調中心&#xff09;近日發布漏洞公告&#xff0c;警告多個HTTP/2實現中新發現的缺陷可能被威脅行為者用于發起高效拒絕服務&#xff08;DoS&#xff09;或分布式拒絕服務&#xff08;DDoS&#xff09;攻擊。該漏洞被非正式命名…

[Chat-LangChain] 會話圖(LangGraph) | 大語言模型(LLM)

第二章&#xff1a;會話圖&#xff08;LangGraph&#xff09; 在第一章中&#xff0c;我們學習了前端用戶界面——這是聊天機器人的"面孔"&#xff0c;我們在這里輸入問題并查看答案。 我們看到了消息如何從聊天窗口傳遞到聊天機器人的"大腦"。現在&…

Flask錯誤處理與會話技術詳解

flask入門day03 錯誤處理 1.abort函數&#xff1a;放棄請求并返回錯誤代碼 詳細狀態碼 from flask import Flask,abort,render_template ? app Flask(__name__) ? app.route(/) def index():return 我是首頁 ? app.route(/error) def error():abort(404)return 沒有找到…

java程序打包成exe,再打成安裝包,沒有jdk環境下可運行

一、前提條件準備&#xff1a;1、要被打包的程序文件&#xff1a;rest_assistant-1.0-SNAPSHOT.jarapplication.yml2、圖標文件tubiao123.ico3、jre4、打包成exe的軟件 config.exe4j5、打成安裝包的軟件 Inno Setup Compiler二、config.exe4j 的 exe打包配置步驟 按照以下圖進行…

區塊鏈技術原理(11)-以太坊交易

文章目錄什么是交易&#xff1f;交易類型交易生命周期關鍵概念&#xff1a;Gas 與交易費用交易狀態與失敗原因總結什么是交易&#xff1f; “交易&#xff08;Transaction&#xff09;” 是從一個賬戶向另一個賬戶發送的經過數字簽名的指令 。例如&#xff0c;如果 Bob 發送 A…

小兔鮮兒-小程序uni-app(二)

小兔鮮兒-小程序uni-app7.小兔鮮兒 - 用戶模塊會員中心頁(我的)靜態結構參考代碼會員設置頁分包預下載靜態結構退出登錄會員信息頁靜態結構獲取會員信息渲染會員信息更新會員頭像更新表單信息8.小兔鮮兒 - 地址模塊準備工作靜態結構地址管理頁地址表單頁動態設置標題新建地址頁…

BLE 廣播信道與數據信道:沖突避免、信道映射與自適應跳頻實現

低功耗藍牙(BLE)技術憑借低功耗、短距離、低成本的特性,已廣泛應用于智能家居、可穿戴設備、工業物聯網等領域。在 BLE 協議中,信道管理是保障通信可靠性的核心機制,其中廣播信道與數據信道的設計、沖突避免策略、跳頻技術更是面試中的高頻考點。本文將從基礎原理到實戰真…

nodejs03-常用模塊

nodejs 常用的核心模塊 Node.js 是一個基于 Chrome V8 引擎的 JavaScript 運行環境&#xff0c; 它允許 JavaScript 運行在服務器端。Node.js 擁有豐富的標準庫&#xff0c;也就是核心模塊&#xff0c; 這些模塊提供了各種功能&#xff0c; 使得開發服務器端應用程序變得簡單高…