Merge branch 'dev-3.2' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.3
This commit is contained in:
@@ -134,9 +134,14 @@ export default {
|
||||
})
|
||||
minTime = timeSorted.length ? timeSorted[0][0] : ''
|
||||
maxTime = timeSorted.length ? timeSorted[timeSorted.length - 1][0] : ''
|
||||
minValue = valueSorted.length ? valueSorted[0][1] : ''
|
||||
maxValue = valueSorted.length ? valueSorted[valueSorted.length - 1][1] : ''
|
||||
minValue = valueSorted.length ? valueSorted[0][1] : 0
|
||||
maxValue = valueSorted.length ? valueSorted[valueSorted.length - 1][1] : 0
|
||||
const unit = chartDataFormat.getUnit(chartUnit)
|
||||
if (!isNaN(maxValue)) {
|
||||
maxValue = Number(maxValue)
|
||||
} else {
|
||||
maxValue = 0
|
||||
}
|
||||
maxValue = chartDataFormat.formatDatas(maxValue, unit.type, 'ceil', unit.ascii) // 取最大值后 需要对其进行取整
|
||||
let oldValue = maxValue
|
||||
let dot = 0
|
||||
@@ -155,7 +160,8 @@ export default {
|
||||
maxValue = Math.floor(oldValue) / Math.pow(10, dot)
|
||||
dot++
|
||||
}
|
||||
const copies = chartDataFormat.copies(oldValue, unit.type)
|
||||
console.log(oldValue)
|
||||
const copies = chartDataFormat.copies(Number(oldValue), unit.type)
|
||||
return { minTime, maxTime, minValue, maxValue, copies, unit, dot }
|
||||
},
|
||||
xAxisLabelFormatter (minTime, maxTime) {
|
||||
|
||||
@@ -790,6 +790,9 @@ export default {
|
||||
}
|
||||
},
|
||||
Interval: function (value, copies, type, interValType) {
|
||||
if (!copies) {
|
||||
copies = 1
|
||||
}
|
||||
if (interValType === 'max' && value < 1) {
|
||||
if (value < 1) {
|
||||
value = 1
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
id="asset-list"
|
||||
:params="filter"
|
||||
:params-type="paramsType"
|
||||
:permissions="{import: 'main_add', export: 'panel_edit'}"
|
||||
:permissions="{import: 'main_add', export: 'main_edit'}"
|
||||
class="top-tool-export margin-r-10"
|
||||
export-file-name="asset-charts"
|
||||
export-url="visual/panel/export"
|
||||
@@ -60,8 +60,8 @@
|
||||
:showLock="from === fromRoute.endpoint"
|
||||
class="top-tool-export margin-r-10"
|
||||
export-file-name="endpoint-charts"
|
||||
export-url="visual/panel/export"
|
||||
import-url="visual/panel/import"
|
||||
:export-url="'visual/panel/export'"
|
||||
:import-url="'visual/panel/import'"
|
||||
@afterImport="getTableData"
|
||||
@panelLockChange="panelLockChange"
|
||||
>
|
||||
|
||||
@@ -99,6 +99,10 @@ function isEqual (o1, o2) {
|
||||
return isEqualForInner(o1, o2)
|
||||
}
|
||||
export const myLoading = {
|
||||
// v-my-loading:circle3.scaleMin.icon= flag
|
||||
// 参数 circle3 为对应的class 名 需要添加div的 在bind内处理。
|
||||
// 后续可跟多个参数 scaleMin 缩小0.5 scaleMax 放大2倍
|
||||
// icon 为box 没有宽高 、icon 以及flex内的小块使用
|
||||
bind: myLoadingFunction,
|
||||
update: myLoadingFunctionUpdate,
|
||||
unbind: function (el, binding) {
|
||||
|
||||
Reference in New Issue
Block a user