From 10562a6dac1492fe3dda566a800a4fec1f6e3bca Mon Sep 17 00:00:00 2001
From: gaosp <gaosp>
Date: 星期日, 14 一月 2024 15:09:34 +0800
Subject: [PATCH] Merge branch 'master' of http://www.beijingsoft.cn:9090/r/mdc-front

---
 src/container/workshop/device.vue |   38 ++++++++++++++++++++++++++++++--------
 1 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/src/container/workshop/device.vue b/src/container/workshop/device.vue
index 200863b..dc86674 100644
--- a/src/container/workshop/device.vue
+++ b/src/container/workshop/device.vue
@@ -1,7 +1,7 @@
 <!--
  * @Date: 2024-01-13 20:46:33
  * @LastEditors: Sneed
- * @LastEditTime: 2024-01-13 22:39:16
+ * @LastEditTime: 2024-01-14 13:18:54
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/workshop/device.vue
 -->
 <template>
@@ -20,21 +20,21 @@
                 <li>
                     <img src="./img/sd.png" alt="">
                     <div>
-                        <p>{{ item.cycleCount }}</p>
+                        <p>{{ efficiency}}</p>
                         <p>鑳藉姏鍒╃敤鐜�</p>
                     </div>
                 </li>
                 <li>
                     <img src="./img/sd.png" alt="">
                     <div>
-                        <p>{{ item.cycleCount }}</p>
+                        <p>{{ utilizationDaily}}</p>
                         <p>鏃ュ埄鐢ㄧ巼</p>
                     </div>
                 </li>
                 <li>
                     <img src="./img/sd.png" alt="">
                     <div>
-                        <p>{{ item.cycleCount }}</p>
+                        <p>{{ info.cycleCount}}</p>
                         <p>瀹屽伐浠舵暟</p>
                     </div>
                 </li>
@@ -45,17 +45,38 @@
 <script>
 import { getRequest,getUrl } from '@/api/Api'
 export default {
-    props: ['id'],
+    props: {
+        id: {
+            type: [String,Number]
+        },
+        info: {
+            type: Object,
+            default: function () {
+                return {}
+            }
+        }
+    },
     data () {
         return {
             care: false,
             item: {}
         }
     },
+    computed: {
+        efficiency () {
+            return this.info.efficiency || 0
+        },
+        utilizationDaily () {
+            return this.info.utilizationDaily || 0
+        },
+        cycleCount () {
+            return this.info.cycleCount || 0
+        }
+    },
     methods: {
         change (val) {
             console.log(val)
-            getRequest('machineConcern',{concern: val ? 1 : 0,id: this.item.id}).then(res => {
+            getRequest('machineConcern',{concern: val ? 1 : 0,id: this.id}).then(res => {
                 console.log(res)
             })
         },
@@ -93,10 +114,11 @@
     &>p:before {
         content: '';
         position: absolute;
+        z-index: 0;
         top: 50%;
         left: 0;
         transform: translateY(-50%);
-        width: 60px;
+        width: 30px;
         height: 1px;
         background: linear-gradient(270deg, #65A5D6 0%, rgba(11,70,115,0) 100%);
     }
@@ -106,7 +128,7 @@
         top: 50%;
         right: 0;
         transform: translateY(-50%);
-        width: 60px;
+        width: 30px;
         height: 1px;
         background: linear-gradient(90deg, #65A5D6 0%, rgba(11,70,115,0) 100%);
     }

--
Gitblit v1.9.3