From 520d3352656ec74bed9991d4c8874422a27b9277 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 05 十二月 2023 15:39:53 +0800
Subject: [PATCH] 整合代码
---
Source/UBCS-WEB/src/views/statistic/statisticPage.vue | 33 +++++++++++++++++++--------------
1 files changed, 19 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..a823bc9 100644
--- a/Source/UBCS-WEB/src/views/statistic/statisticPage.vue
+++ b/Source/UBCS-WEB/src/views/statistic/statisticPage.vue
@@ -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,21 +142,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