From a6cf534c976bc6a4505951a9c6c1d2bbaefc6d99 Mon Sep 17 00:00:00 2001
From: lzhe <lzhe@example.com>
Date: 星期二, 30 四月 2024 22:16:17 +0800
Subject: [PATCH] 1

---
 src/views/mdc/time-analysis.vue |   54 ++++++++++++------------------------------------------
 1 files changed, 12 insertions(+), 42 deletions(-)

diff --git a/src/views/mdc/time-analysis.vue b/src/views/mdc/time-analysis.vue
index bf2fcd3..7b6dd50 100644
--- a/src/views/mdc/time-analysis.vue
+++ b/src/views/mdc/time-analysis.vue
@@ -2,7 +2,7 @@
  * @Author: lzhe lzhe@example.com
  * @Date: 2024-04-26 09:36:18
  * @LastEditors: lzhe lzhe@example.com
- * @LastEditTime: 2024-04-28 18:58:58
+ * @LastEditTime: 2024-04-30 10:03:05
  * @FilePath: /smart-web/src/views/mdc/status-record.vue
  * @Description: 杩欐槸榛樿璁剧疆,璇疯缃甡customMade`, 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 -->
@@ -59,9 +59,9 @@
                             </el-collapse-item>
                             </el-collapse>
                         </div>
-                        <div class="paginationwork">
+                        <!-- <div class="paginationwork">
                             <el-pagination layout="prev, pager, next" @current-change="recordChange" :total="total" :default-page-size="6"/>
-                        </div>
+                        </div> -->
                     </div>
                 </el-tab-pane>
                 <el-tab-pane label="鎸夋椂闂村懆鏈熺粺璁�" name="time">
@@ -323,45 +323,6 @@
         this.getDataA();
     },
     methods: {
-        convertArrayToPercentage(inputArray) {  
-            return inputArray.map((subarray, index) => {  
-                // 璁$畻瀛愭暟缁勭殑鎬诲拰  
-                var total = subarray.reduce((acc, obj) => acc + obj.count, 0);  
-                
-                // 纭繚鎬诲拰涓嶄负0锛屼互閬垮厤闄や互0鐨勯敊璇�  
-                if (total === 0) {  
-                    return {  
-                        name: `Direct${index + 1}`,  
-                        type: 'bar',  
-                        stack: 'total',  
-                        label: {  
-                            show: true  
-                        },  
-                        emphasis: {  
-                            focus: 'series'  
-                        },  
-                        data: subarray.map(() => 0) // 濡傛灉鎬诲拰涓�0锛屽垯杩斿洖鍏ㄤ负'0%'鐨勭櫨鍒嗘瘮鏁扮粍  
-                    };  
-                }  
-                
-                // 璁$畻鐧惧垎姣斿苟鍒涘缓鏂扮殑data鏁扮粍  
-                var percentages = subarray.map(obj => ((obj.count / total) * 100).toFixed(2));  
-                
-                // 杩斿洖缁撴灉瀵硅薄  
-                return {  
-                    name: `Direct${index + 1}`,  
-                    type: 'bar',  
-                    stack: 'total',  
-                    label: {  
-                        show: true  
-                    },  
-                    emphasis: {  
-                        focus: 'series'  
-                    },  
-                    data: percentages // 灏嗚绠楀緱鍒扮殑鐧惧垎姣旀暟缁勪綔涓篸ata  
-                };  
-            });  
-        },
     	getDataA() {
     		var ids = [];
     		this.treeChecked.forEach(item=> {
@@ -431,6 +392,7 @@
                     emphasis: {
                         focus: 'series'
                     },
+                    barWidth: 60,
                     data
                 }
             }); 
@@ -530,6 +492,14 @@
             this.activeName = val;
             if(val == "time") {  //鎸夋椂闂村懆鏈熺粺璁�
                 if(this.setTitle.length != 0) {
+                    var obj = {
+                        endDate: this.btnList[0].id,
+                        startDate: this.btnList[0].id,
+                        statisticalMethod: "WEEK"
+                    }
+                    this.$HTTP.post(`/api/blade-mdc/efficiency-analysis/interval`,obj).then(res=> {
+                        console.log(res)
+                    })
                     var arr = [];
                     arr.push({
                         btnList: this.btnList,

--
Gitblit v1.9.3