From 76a9e755ef42b12cfcf16ac9f293322a34d348bd Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期四, 16 五月 2024 16:58:00 +0800
Subject: [PATCH] 1、首页公司级和分厂级看板中的问题列表接口完成与后端数据联调 2、问题反馈页面完成所有布局及相关功能

---
 src/views/dashboard/IndexSignage.vue |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/views/dashboard/IndexSignage.vue b/src/views/dashboard/IndexSignage.vue
index 8681db6..cd50929 100644
--- a/src/views/dashboard/IndexSignage.vue
+++ b/src/views/dashboard/IndexSignage.vue
@@ -109,6 +109,7 @@
         barChartData: [],
         doubleBarChart: '',
         doubleBarChartData: {},
+        workshopProblemChartData: [['-', '-', '-']],
         efficiencyChartConfig: {},
         maintenanceConfig: {},
         problemConfig: {},
@@ -121,7 +122,6 @@
     mounted() {
       window.addEventListener('resize', this.handleWindowResize)
       this.getChartDataByApi()
-      this.drawProblemChart()
     },
     beforeDestroy() {
       window.removeEventListener('resize', this.handleWindowResize)
@@ -137,6 +137,7 @@
         this.getTwoMaintenanceChartDataByApi()
         this.getBarChartDataByApi()
         this.getDoubleBarChartDataByApi()
+        this.getWorkshopProblemChartDataByApi()
       },
 
       /* 璋冪敤鎺ュ彛鑾峰彇璁惧杩愯鐘舵�� */
@@ -239,7 +240,7 @@
       getTwoMaintenanceChartDataByApi() {
         signageApi.getTwoMaintenancePlanListApi()
           .then(res => {
-            if (res.success && res.result) this.twoMaintenanceChartData = res.result.map(item => [item.centerName, item.maintenanceDate, item.content])
+            if (res.success && res.result.length > 0) this.twoMaintenanceChartData = res.result.map(item => [item.centerName, item.maintenanceDate, item.content])
             this.drawMaintenanceChart()
           })
       },
@@ -273,6 +274,16 @@
           .then(res => {
             if (res.success) this.doubleBarChartData = res.result
             this.drawDoubleBarChart()
+          })
+      },
+
+      /* 璋冪敤鎺ュ彛鑾峰彇杞﹂棿闂鍒楄〃*/
+      getWorkshopProblemChartDataByApi() {
+        signageApi.getWorkshopProblemListApi()
+          .then(res => {
+            console.log('res', res.result)
+            if (res.success && res.result.length > 0) this.workshopProblemChartData = res.result.map(item => [item.content, item.createTime])
+            this.drawWorkshopProblemChart()
           })
       },
 
@@ -1144,27 +1155,16 @@
       },
 
       /* 缁樺埗闂婊氬姩琛� */
-      drawProblemChart() {
+      drawWorkshopProblemChart() {
         this.problemConfig = {
           indexHeader: '搴忓彿',
-          header: ['鏃堕棿', '闂鍐呭'],
+          header: [ '闂鍐呭', '鏃堕棿'],
           headerBGC: '#86D186',
           oddRowBGC: '#7CBF7C',
           evenRowBGC: '#7CBF7C',
-          data: [
-            // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'],
-            // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'],
-            // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'],
-            // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'],
-            // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'],
-            // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'],
-            // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'],
-            // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'],
-            // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'],
-            // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂']
-          ],
+          data: this.workshopProblemChartData,
           index: true,
-          columnWidth: [100, 300, 300],
+          columnWidth: [100, 300, 150],
           align: ['center']
         }
       },

--
Gitblit v1.9.3