From f1b409d09a1047ab786c5e4911cf99412e179a31 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 07 十一月 2023 10:25:53 +0800
Subject: [PATCH] 1.综合看板  100%

---
 src/views/kanbanManager/zhkb.vue |   38 +++++++++++++++++++++++---------------
 1 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/src/views/kanbanManager/zhkb.vue b/src/views/kanbanManager/zhkb.vue
index 892d7e5..1000a2f 100644
--- a/src/views/kanbanManager/zhkb.vue
+++ b/src/views/kanbanManager/zhkb.vue
@@ -45,7 +45,7 @@
                 </div>
 
               </div>
-              <div style="height: 260px;">
+              <div style="height: 280px;">
                 <div id="all01" class="flex_c_c" style="width: 100%;height:100%;" />
               </div>
             </div>
@@ -84,7 +84,7 @@
           <div style="width: 1000px;">
             <div class="smallTitle">
               <svg-icon icon-class="blcs" class="svg_class" />
-              璐ㄩ噺涓嶈壇
+              璐ㄩ噺涓嶈壇(杩戜竴鍛�)
             </div>
             <div class="lineContent horn" style="height: 380px;display: flex;justify-content: space-between">
               <div id="cjzl03" class="flex_c_c" style="width: 100%;height:100%" />
@@ -126,6 +126,13 @@
 <script>
 import './kbCommon.css'
 import { loadEcharts, all01, all02, cjzl03 } from '@/utils/myEcharts'
+import {
+  WorkShopCompreLeftTop,
+  WorkShopCompreRightBottom,
+  WorkShopCompreRightTop, WorkShopProduceBottomLeftData,
+  WorkShopProduceBottomRightData
+} from '@/api/kanbanManager'
+import { PrentOrganizationNoCompany } from '@/api/GeneralBasicData'
 // import {
 //   QCBadCenterLeftWeek,
 //   ShopSearch, WorkShopCompreLeftTop, WorkShopCompreRightBottom, WorkShopCompreRightTop
@@ -161,19 +168,20 @@
     }, 1000 * 60 * 120)
   },
   mounted() {
-    // this.getAllApi()
+    this.getAllApi()
   },
   methods: {
     async getAllApi() {
-      const { data: res } = await ShopSearch()
-      this.wkshopArr = res
-      const temp = this.wkshopArr.map(i => i.org_code)
-      // const temp = this.wkshopArr.map(i => i.org_code)
+      const res = await PrentOrganizationNoCompany()
+      this.wkshopArr = res.data
+
+      const temp = ['CJ001', '006', 'LD001', 'ZP001']
 
       temp.forEach(i => {
-        const aa = this.wkshopArr.find(j => j.org_code === i).org_name
+        const aa = this.wkshopArr.find(j => j.torg_code === i).torg_name
         this.legendData.push(aa)
       })
+
       const res2 = await WorkShopCompreLeftTop({ wkshopcode: temp.join(',') })
       for (const res2Key in res2.data.LeftTop) {
         const data = {
@@ -186,7 +194,7 @@
           data.good_qty = res2.data.LeftTop[res2Key][0].good_qty
           data.plan_qty = res2.data.LeftTop[res2Key][0].plan_qty
           data.wkshp_code = res2.data.LeftTop[res2Key][0].wkshp_code
-          data.wkshp_name = this.wkshopArr.find(i => i.org_code === data.wkshp_code).org_name
+          data.wkshp_name = this.wkshopArr.find(i => i.torg_code === data.wkshp_code).torg_name
           this.LeftTopData01.push(data)
         }
       }
@@ -200,7 +208,7 @@
           data.quantity = res2.data.LeftBottom[res2Key][0].quantity
           data.plan_qty = res2.data.LeftBottom[res2Key][0].plan_qty
           data.wkshp_code = res2.data.LeftBottom[res2Key][0].wkshp_code
-          data.wkshp_name = this.wkshopArr.find(i => i.org_code === data.wkshp_code).org_name
+          data.wkshp_name = this.wkshopArr.find(i => i.torg_code === data.wkshp_code).torg_name
           this.LeftTopData02.push(data)
         }
       }
@@ -221,7 +229,7 @@
               data.good_qty = res2.data.LeftTop[res2Key][0].good_qty
               data.plan_qty = res2.data.LeftTop[res2Key][0].plan_qty
               data.wkshp_code = res2.data.LeftTop[res2Key][0].wkshp_code
-              data.wkshp_name = this.wkshopArr.find(i => i.org_code === data.wkshp_code).org_name
+              data.wkshp_name = this.wkshopArr.find(i => i.torg_code === data.wkshp_code).torg_name
               this.LeftTopData01.push(data)
             }
           }
@@ -235,7 +243,7 @@
               data.quantity = res2.data.LeftBottom[res2Key][0].quantity
               data.plan_qty = res2.data.LeftBottom[res2Key][0].plan_qty
               data.wkshp_code = res2.data.LeftBottom[res2Key][0].wkshp_code
-              data.wkshp_name = this.wkshopArr.find(i => i.org_code === data.wkshp_code).org_name
+              data.wkshp_name = this.wkshopArr.find(i => i.torg_code === data.wkshp_code).torg_name
               this.LeftTopData02.push(data)
             }
           }
@@ -281,7 +289,7 @@
         })
       }, 1000 * 40)
 
-      const res4 = await QCBadCenterLeftWeek({ wkshopcode: temp.join(',') })
+      const res4 = await WorkShopProduceBottomLeftData({ wkshopcode: temp.join(',') })
       this.cjzl03_xData = res4.data[temp[0]].map(i => i.click_date)
       for (const res4Key in res4.data) {
         if (temp.includes(res4Key)) {
@@ -291,7 +299,7 @@
       }
       loadEcharts('cjzl03', cjzl03(this.cjzl03_xData, this.legendData, this.cjzl03_yData, true))
       setInterval(() => {
-        QCBadCenterLeftWeek({ wkshopcode: temp.join(',') }).then(res4 => {
+        WorkShopProduceBottomLeftData({ wkshopcode: temp.join(',') }).then(res4 => {
           this.cjzl03_yData = []
 
           this.cjzl03_xData = res4.data[temp[0]].map(i => i.click_date)
@@ -405,7 +413,7 @@
 }
 
 .all_block01{
-  width:187px;
+  width:237px;
   height: 180px;
 }
 .all_block02{

--
Gitblit v1.9.3