fix: 修复bug:柱状图导入数据问题; 直接访问工具收藏栏报错问题

This commit is contained in:
osiris
2024-03-26 18:47:51 +08:00
parent 4631227f9a
commit df8ed7f9c8
5 changed files with 16 additions and 6 deletions
+4 -2
View File
@@ -272,10 +272,12 @@ const updateDataFile = async (params) => {
if(sheetArray.length == 0){
continue;
}
for(let item in sheetArray){
if (sheetArray[item] != undefined) {
tmpColumnData.push(sheetArray[item][0])
tmpValueData.push(sheetArray[item][1])
let tmp1 = sheetArray as []
tmpColumnData.push(tmp1[item][0])
tmpValueData.push(tmp1[item][1])
}
}
useCount++
@@ -5,6 +5,7 @@ import { useRoute } from 'vue-router'
import { useToolsStore } from '@/store/modules/tools'
import { useUserStore } from '@/store/modules/user'
import { ElMessage } from 'element-plus'
import {rtrim} from '@/utils/string'
const props = defineProps({
title: String,
id: Number
@@ -22,7 +23,8 @@ const userStore = useUserStore()
//根据路由查询tool id
const getToolInfo = async () => {
searchParam.route = route.path
let routeStr = route.path
searchParam.route = rtrim(routeStr, '/')
await toolsStore.getToolInfo(searchParam)
}