fix: 修复bug:柱状图导入数据问题; 直接访问工具收藏栏报错问题
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user