From 970ab1b58ed966f033ebc28fc5ee4ff1b03cbfae Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期一, 11 十二月 2023 18:38:24 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/views/statistic/statisticPage.vue |   40 ++++++++++++++++++++++++----------------
 1 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/statistic/statisticPage.vue b/Source/UBCS-WEB/src/views/statistic/statisticPage.vue
index 979622f..0a62428 100644
--- a/Source/UBCS-WEB/src/views/statistic/statisticPage.vue
+++ b/Source/UBCS-WEB/src/views/statistic/statisticPage.vue
@@ -48,7 +48,7 @@
   </span>
     </el-dialog>
     <!--    echarts缁勪欢-->
-    <div style="margin-top: 15px">
+    <div style="margin-top: 15px;padding-bottom: 35px">
       <lineChart v-for="(item,index) in lineList" :key="index" :chartName="item.menuName"
                  :lineData="item.menuData"></lineChart>
       <pieChart v-for="(item,index) in pieList" :key="index" :chartName="item.menuName"
@@ -79,7 +79,7 @@
   name: "statisticPage",
   data() {
     return {
-      menuList:[],
+      menuList: [],
       dataKeyList: [],
       addVisible: false,
       chartName: "",
@@ -115,7 +115,25 @@
         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) {
+        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,25 +142,15 @@
       };
 
       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) {
           this[dataKey].push(item);
+          this[dataKey].forEach(res=>{
+            console.log('res',res)
+          })
           hasValidData = true;
         }
       });

--
Gitblit v1.9.3