From c48c27fc96e26309e8ab0df414dcb179c0348e2f Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 07 十二月 2023 14:39:23 +0800
Subject: [PATCH] 整合代码

---
 Source/UBCS-WEB/src/views/statistic/statisticPage.vue |   58 ++++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 44 insertions(+), 14 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/statistic/statisticPage.vue b/Source/UBCS-WEB/src/views/statistic/statisticPage.vue
index 979622f..9403436 100644
--- a/Source/UBCS-WEB/src/views/statistic/statisticPage.vue
+++ b/Source/UBCS-WEB/src/views/statistic/statisticPage.vue
@@ -115,7 +115,50 @@
         this.$message.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒');
         return;
       }
+      let codeStatus = this.selectData.every(key => key.codeType)
+      if (!codeStatus) {
+        this.$message.warning("璇锋鏌ュ凡鍕鹃�夋暟鎹被鍨嬫槸鍚︿负绌猴紒");
+        return;
+      }
 
+      this.dataKeyList = this.selectData.map(obj => obj.code)
+      const btmName = this.dataKeyList.join(",");
+      if (btmName) {
+        // this.menuList=[
+        //   {
+        //     menuData: [
+        //       [0, 0, 0, 0, 0, 0, 4, 9, 12, 12, 12, 12],
+        //       [0, 0, 0, 0, 0, 0, 4, 5, 3, 0, 0, 0]
+        //     ],
+        //     code:1
+        //   },
+        //   {
+        //     menuData: [
+        //       [0, 0, 0, 1, 1, 1, 1, 1, 1, 29, 5315, 5315],
+        //       [0, 0, 0, 1, 0, 0, 0, 0, 0, 28, 5286, 0]
+        //     ],
+        //     code:2
+        //   },
+        //   {
+        //     menuData: [
+        //       [0, 58, 60, 61, 75, 84, 145, 162, 166, 177, 186, 186],
+        //       [0, 58, 2, 1, 14, 9, 61, 17, 4, 11, 9, 0]
+        //     ],
+        //     code:3
+        //   }
+        // ]
+        // this.nextSave();
+        // this.$message.success('淇濆瓨鎴愬姛')
+        getStatisticAnalysis({btmNames: btmName}).then(res => {
+          this.menuList = res.data.data;
+          this.nextSave();
+          this.$message.success('淇濆瓨鎴愬姛')
+        });
+      }else {
+        this.$message.warning('璇烽�夋嫨鏁版嵁锛�')
+      }
+    },
+    nextSave() {
       const typeList = {
         "0": "lineList",
         "1": "pieList",
@@ -124,21 +167,8 @@
       };
 
       let hasValidData = false; // 娣诲姞涓�涓爣蹇楁潵璁板綍鏄惁鏈夋湁鏁堢殑閫夋嫨鏁版嵁
-      let codeStatus = this.selectData.every(key => key.codeType)
-      if (!codeStatus) {
-        this.$message.warning("璇锋鏌ュ凡鍕鹃�夋暟鎹被鍨嬫槸鍚︿负绌猴紒");
-        return;
-      }
-      this.dataKeyList = this.selectData.map(obj => obj.code)
-      const btmName = this.dataKeyList.join(",");
-      if (btmName) {
-        getStatisticAnalysis({btmNames:btmName}  ).then(res=>{
-          this.menuList = res.data.data;
-          this.$message.success('淇濆瓨鎴愬姛')
-        })
 
-      }
-      this.selectData.forEach((item,index) => {
+      this.selectData.forEach((item, index) => {
         item.menuData = this.menuList[index].menuData;
         const dataKey = typeList[item.codeType];
         if (dataKey) {

--
Gitblit v1.9.3