提交代码

This commit is contained in:
guanj
2025-11-14 15:00:10 +08:00
parent 49dcf440ff
commit 0af955d05c
7 changed files with 38 additions and 27 deletions

View File

@@ -1,4 +1,4 @@
import { number } from "vue-types"
import { number } from 'vue-types'
const dataProcessing = (arr: any[]) => {
return arr
@@ -14,7 +14,7 @@ const calculateValue = (o: number, value: number, num: number, isMin: boolean) =
} else if (value > -1 && value < 0 && isMin == false) {
return 0
}
let base
if (Math.abs(o) >= 100) {
base = 100
@@ -24,9 +24,10 @@ const calculateValue = (o: number, value: number, num: number, isMin: boolean) =
base = 1
} else {
const multiple = 1 / 0.1
// 先放大→向上取整→再缩小
return Math.ceil(Math.abs(o) * multiple) / multiple
base = Math.ceil(Math.abs(o) * multiple) / multiple
}
let calculatedValue
if (isMin) {
if (value < 0) {
@@ -39,7 +40,6 @@ const calculateValue = (o: number, value: number, num: number, isMin: boolean) =
calculatedValue = value - num * value
} else {
calculatedValue = value + num * value
}
}
@@ -62,7 +62,7 @@ export const yMethod = (arr: any) => {
let min = 0
maxValue = Math.max(...numList)
minValue = Math.min(...numList)
const o = maxValue - minValue
const o = maxValue - minValue == 0 ? maxValue : maxValue - minValue
min = calculateValue(o, minValue, num, true)
max = calculateValue(o, maxValue, num, false)

View File

@@ -51,7 +51,8 @@ export default class TableStore {
exportProcessingData: null,
beforeSearchFun: null,
height: '',
publicHeight: 0
publicHeight: 0,
filename: '',
})
constructor(public options: TableStoreParams) {
@@ -105,8 +106,10 @@ export default class TableStore {
this.table.webPagingData = window.XEUtils.chunk(this.table.data, this.table.params.pageSize)
this.table.data = this.table.webPagingData[this.table.params.pageNum - 1]
}
this.table.loadCallback && this.table.loadCallback()
this.table.loading = false
})
.catch(() => {
this.table.loading = false
@@ -142,6 +145,7 @@ export default class TableStore {
'selection-change',
() => {
this.table.selection = data as TableRow[]
}
],
[