From 6ef9e5189ac1888b8c4c504d5c5d3f431807ff56 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期六, 15 三月 2025 11:57:40 +0800
Subject: [PATCH] 修改电路试验单位
---
src/components/do/a6-device/operation-overview.vue | 203 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 200 insertions(+), 3 deletions(-)
diff --git a/src/components/do/a6-device/operation-overview.vue b/src/components/do/a6-device/operation-overview.vue
index 390d388..c0c809d 100644
--- a/src/components/do/a6-device/operation-overview.vue
+++ b/src/components/do/a6-device/operation-overview.vue
@@ -1,13 +1,210 @@
+<!-- 璁惧杩愯鎬昏 -->
<template>
- <div>杩愯鎬昏</div>
+ <div>
+ <div class="page">
+ <echart-module id="'page-left'" :config="chartConfig" :datas="chartData" class="page-left"></echart-module>
+ <div class="page-right">
+ <div class="form-item">
+ <label>鍚敤鏃堕暱(骞�)</label>
+ <span>{{deviceData.usedYears}}</span>
+ </div>
+ <div class="form-item">
+ <label>鏁呴殰娆℃暟</label>
+ <span>{{deviceData.faultCount}}</span>
+ </div>
+ <div class="form-item">
+ <label>鏈�杩戞晠闅滄棩鏈�</label>
+ <span>{{ deviceData.faultDate }}</span>
+ </div>
+ <div class="form-item">
+ <label>鏈�杩戞牎鍑嗘棩鏈�</label>
+ <span>{{deviceData.lastCalibrationDate }}</span>
+ </div>
+ <div class="form-item">
+ <label>涓嬫鏍″噯鏃ユ湡</label>
+ <span>{{deviceData.nextCalibrationDate}}</span>
+ </div>
+ <div class="form-item">
+ <label>鏍″噯鎬荤粨璁�</label>
+ <span :class="formatColorStyle(deviceData.calibrateStatus)">{{ deviceData.calibrateStatus }}</span>
+ </div>
+ <div class="form-item">
+ <label>鏈�杩戞牳鏌ユ棩鏈�</label>
+ <span>{{deviceData.lastExamineDate}}</span>
+ </div>
+ <div class="form-item">
+ <label>涓嬫鏍告煡鏃ユ湡</label>
+ <span>{{deviceData.nextExamineDate}}</span>
+ </div>
+ <div class="form-item">
+ <label>鏍告煡鎬荤粨璁�</label>
+ <span :class="formatColorStyle(deviceData.examineStatus)">{{deviceData.examineStatus}}</span>
+ </div>
+ <div class="form-item">
+ <label>璁惧杩愯鐘舵��</label>
+ <span :class="formatColorStyle(deviceData.deviceStatus)">{{deviceData.deviceStatus}}</span>
+ </div>
+ <div class="form-item">
+ <label>鏈�杩戠淮鎶ゆ棩鏈�</label>
+ <span>{{ deviceData.maintenanceDate }}</span>
+ </div>
+ <div class="form-item">
+ <label>涓嬫缁存姢鏃ユ湡</label>
+ <span>{{ deviceData.nextMaintenanceDate }}</span>
+ </div>
+ <div class="form-item">
+ <label>缁存姢绫诲瀷</label>
+ <span>{{ deviceData.maintenanceType }}</span>
+ </div>
+ <div class="form-item">
+ <label>娴嬮噺椤圭洰</label>
+ <span>{{ deviceData.insProduct }}</span>
+ </div>
+ </div>
+ </div>
+ </div>
</template>
<script>
-export default {
+import EchartModule from '../../tool/echart.vue'
+export default {
+ components: {EchartModule},
+ props: {
+ clickNodeVal: {
+ type: Object,
+ default: () => {
+ return {};
+ }
+ }
+ },
+ data(){
+ return {
+ chartConfig:{
+ height: '',
+ isLoading:true,
+ type:'gauge'
+ },
+ chartData:{
+ formatter: "宸茶繃鏍″噯鏃ユ湡鐧惧垎姣�: {c}%",
+ color:[
+ [0.3, '#21a700'],
+ [0.7, '#0066ff'],
+ [1, '#d80000']
+ ],
+ value: 0,
+ },
+ form:{
+ value1:''
+ },
+ formData:{
+ usedAge:12
+ },
+ //璁惧鏁版嵁鏀堕泦
+ deviceData:{
+
+ }
+ }
+ },
+ mounted(){
+ //鑾峰彇璁惧鏁呴殰鐨勪俊鎭�
+ this.getDeviceInfo(this.clickNodeVal.value);
+ },
+ methods:{
+ formatColorStyle(status){
+ if(status==null || status=="" || status==undefined){
+ return ""
+ }
+ let styleStr = ''
+ switch(status){
+ case"鍚堟牸":
+ styleStr = 'success'
+ break;
+ case"涓嶅悎鏍�":
+ styleStr = 'failed'
+ break;
+ case"鍏朵粬":
+ styleStr = 'other'
+ break;
+ case"姝e父":
+ styleStr = 'success'
+ break;
+ case"缁翠慨":
+ styleStr = 'other'
+ break;
+ case"鍋滅敤":
+ styleStr = 'stop'
+ break;
+ case"鎶ュ簾":
+ styleStr = 'failed'
+ break;
+ }
+ return styleStr;
+ },
+ //鑾峰彇璁惧杩愯鎬昏淇℃伅
+ getDeviceInfo(deviceId){
+ this.$axios.get(this.$api.deviceFault.getDevice+"/"+deviceId).then(res=>{
+ if(res.code==200){
+ this.deviceData=res.data
+ this.chartData.value = res.data.progress
+ }
+ })
+ },
+ },
+ watch: {
+ // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊
+ clickNodeVal(newVal) {
+ // 鏄惁瀛樺湪value锛屽瓨鍦╲alue浠h〃涓轰笁绾�
+ if (this.clickNodeVal.value) {
+ this.getDeviceInfo(newVal.value)
+ }
+ }
+ }
}
</script>
<style scoped>
-
+.page{
+ width: 100%;
+ height: 100vh;
+ display: flex;
+}
+.page-left{
+ width: 420px;
+ height: 420px;
+ margin-top: 40px;
+ margin-right: 40px;
+}
+.page-right{
+ flex: 1;
+ height:calc(100% - 200px);
+ overflow: scroll;
+ /* background: red; */
+}
+.form-item{
+ line-height: 42px;
+ font-size: 14px;
+}
+.page-right label{
+ color: #999;
+ width: 110px;
+ display: inline-block;
+ text-align: right;
+ margin-right: 20px;
+}
+.el-radio__input.is-disabled+span.el-radio__label{
+ color: #606266 !important;
+}
+.success{
+ color:#21a700
+}
+.failed{
+ color:#d80000
+}
+.other{
+ color: #e8a849;
+}
+.stop{
+ color: #909399;
+}
</style>
--
Gitblit v1.9.3