From b8dc4ccc6ee580b084aa860e64af2d90d1cb5979 Mon Sep 17 00:00:00 2001
From: 石广澎 <shiguangpeng@163.com>
Date: 星期三, 29 十一月 2023 10:11:52 +0800
Subject: [PATCH] feat: 1、首页接口对接 2、部门物品分发

---
 admin-web/src/views/dashboard/components/LBJETJ.vue |   48 ++++++++++++++++++++++++++++++------------------
 1 files changed, 30 insertions(+), 18 deletions(-)

diff --git a/admin-web/src/views/dashboard/components/LBJETJ.vue b/admin-web/src/views/dashboard/components/LBJETJ.vue
index 36d2057..a2b2956 100644
--- a/admin-web/src/views/dashboard/components/LBJETJ.vue
+++ b/admin-web/src/views/dashboard/components/LBJETJ.vue
@@ -13,12 +13,34 @@
 import * as dash from "@/api/dashboard/dash";
 
 export default {
-  name: 'LBSLTJ',
+  name: 'LBJETJ',
   props: {
-    activeId: {
-      type: String,
-      default: '',
+    num: {
+      type: Object,
+      default: {
+        aTotalNum: 0,
+        aTotalPrice: 0,
+        bTotalNum: 0,
+        bTotalPrice: 0,
+        cTotalNum: 0,
+        cTotalPrice: 0,
+        tenantId: 0,
+        totalNum: 0,
+        totalPrice: 0,
+        xiaFaNum: 0,
+        zhanYouPercent: 0,
+      },
     },
+  },
+  watch:{
+    num(){
+      this.options.series[0].data = [
+        {value: parseFloat(this.num.aTotalPrice), name: 'A绫�'},
+        {value: parseFloat(this.num.bTotalPrice), name: 'B绫�'},
+        {value: parseFloat(this.num.cTotalPrice), name: 'C绫�'},
+      ]
+      this.myChart.setOption(this.options);
+    }
   },
   data() {
     return {
@@ -31,14 +53,6 @@
   },
   methods: {
     getCenterLine() {
-      // getCenterLine({
-      //   id: this.activeId,
-      //   weekFlag: this.weekFlag,
-      //   monthFlag: this.monthFlag,
-      //   startDay: this.value2 ? this.value2[0] : null,
-      //   endDay: this.value2 ? this.value2[1] : null
-      // }).then(res => {
-      //   const data = res.data
       var chartDom = document.getElementById('LBJETJ');
       this.myChart = echarts.init(chartDom);
       // 鐩戝惉灞忓箷瀹藉害鍙樺寲锛氬綋娴忚鍣ㄥ彂鐢焤esize浜嬩欢鐨勬椂鍊欙紝瑙﹀彂echart鐨剅esize浜嬩欢锛岄噸缁榗anvas
@@ -62,7 +76,7 @@
         series: [
           {
 
-            name: 'Access From',
+            name: '绫诲埆閲戦缁熻',
             type: 'pie',
             minAngle: 2, // 鏈�灏忕殑鎵囧尯瑙掑害锛�0~360锛夛紝鐢ㄤ簬闃叉鏌愪釜鍊艰繃灏忓鑷存墖鍖哄お灏忓奖鍝嶄氦浜�
             avoidLabelOverlap: true, // 鏄惁鍚敤闃叉鏍囩閲嶅彔绛栫暐
@@ -82,11 +96,9 @@
               }
             },
             data: [
-              { value: 100, name: '绛夌骇涓�' },
-              { value: 100, name: '绛夌骇浜�' },
-              { value: 100, name: '绛夌骇涓�' },
-
-            ]
+              {value: parseFloat(this.num.aTotalPrice), name: 'A绫�'},
+              {value: parseFloat(this.num.bTotalPrice), name: 'B绫�'},
+              {value: parseFloat(this.num.cTotalPrice), name: 'C绫�'},]
           }]
       };
       this.options && this.myChart.setOption(this.options);

--
Gitblit v1.9.1