| | |
| | | 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", |
| | |
| | | }; |
| | | |
| | | 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) { |