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] : ''
|
minTime = timeSorted.length ? timeSorted[0][0] : ''
|
||||||
maxTime = timeSorted.length ? timeSorted[timeSorted.length - 1][0] : ''
|
maxTime = timeSorted.length ? timeSorted[timeSorted.length - 1][0] : ''
|
||||||
minValue = valueSorted.length ? valueSorted[0][1] : ''
|
minValue = valueSorted.length ? valueSorted[0][1] : 0
|
||||||
maxValue = valueSorted.length ? valueSorted[valueSorted.length - 1][1] : ''
|
maxValue = valueSorted.length ? valueSorted[valueSorted.length - 1][1] : 0
|
||||||
const unit = chartDataFormat.getUnit(chartUnit)
|
const unit = chartDataFormat.getUnit(chartUnit)
|
||||||
|
if (!isNaN(maxValue)) {
|
||||||
|
maxValue = Number(maxValue)
|
||||||
|
} else {
|
||||||
|
maxValue = 0
|
||||||
|
}
|
||||||
maxValue = chartDataFormat.formatDatas(maxValue, unit.type, 'ceil', unit.ascii) // 取最大值后 需要对其进行取整
|
maxValue = chartDataFormat.formatDatas(maxValue, unit.type, 'ceil', unit.ascii) // 取最大值后 需要对其进行取整
|
||||||
let oldValue = maxValue
|
let oldValue = maxValue
|
||||||
let dot = 0
|
let dot = 0
|
||||||
@@ -155,7 +160,8 @@ export default {
|
|||||||
maxValue = Math.floor(oldValue) / Math.pow(10, dot)
|
maxValue = Math.floor(oldValue) / Math.pow(10, dot)
|
||||||
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 }
|
return { minTime, maxTime, minValue, maxValue, copies, unit, dot }
|
||||||
},
|
},
|
||||||
xAxisLabelFormatter (minTime, maxTime) {
|
xAxisLabelFormatter (minTime, maxTime) {
|
||||||
|
|||||||
@@ -790,6 +790,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
Interval: function (value, copies, type, interValType) {
|
Interval: function (value, copies, type, interValType) {
|
||||||
|
if (!copies) {
|
||||||
|
copies = 1
|
||||||
|
}
|
||||||
if (interValType === 'max' && value < 1) {
|
if (interValType === 'max' && value < 1) {
|
||||||
if (value < 1) {
|
if (value < 1) {
|
||||||
value = 1
|
value = 1
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
id="asset-list"
|
id="asset-list"
|
||||||
:params="filter"
|
:params="filter"
|
||||||
:params-type="paramsType"
|
:params-type="paramsType"
|
||||||
:permissions="{import: 'main_add', export: 'panel_edit'}"
|
:permissions="{import: 'main_add', export: 'main_edit'}"
|
||||||
class="top-tool-export margin-r-10"
|
class="top-tool-export margin-r-10"
|
||||||
export-file-name="asset-charts"
|
export-file-name="asset-charts"
|
||||||
export-url="visual/panel/export"
|
export-url="visual/panel/export"
|
||||||
@@ -60,8 +60,8 @@
|
|||||||
:showLock="from === fromRoute.endpoint"
|
:showLock="from === fromRoute.endpoint"
|
||||||
class="top-tool-export margin-r-10"
|
class="top-tool-export margin-r-10"
|
||||||
export-file-name="endpoint-charts"
|
export-file-name="endpoint-charts"
|
||||||
export-url="visual/panel/export"
|
:export-url="'visual/panel/export'"
|
||||||
import-url="visual/panel/import"
|
:import-url="'visual/panel/import'"
|
||||||
@afterImport="getTableData"
|
@afterImport="getTableData"
|
||||||
@panelLockChange="panelLockChange"
|
@panelLockChange="panelLockChange"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -99,6 +99,10 @@ function isEqual (o1, o2) {
|
|||||||
return isEqualForInner(o1, o2)
|
return isEqualForInner(o1, o2)
|
||||||
}
|
}
|
||||||
export const myLoading = {
|
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,
|
bind: myLoadingFunction,
|
||||||
update: myLoadingFunctionUpdate,
|
update: myLoadingFunctionUpdate,
|
||||||
unbind: function (el, binding) {
|
unbind: function (el, binding) {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<div id="chart-import" @click="showImportBox(1)"><i class="nz-icon nz-icon-upload"></i>{{$t('overall.importExcel')}}</div>
|
<div id="chart-import" @click="showImportBox(1)"><i class="nz-icon nz-icon-upload"></i>{{$t('overall.importExcel')}}</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item v-has="permissions.export" v-if="exportUrl">
|
<el-dropdown-item v-has="permissions.export" v-if="exportUrl">
|
||||||
<div id="chart-export"@click="showImportBox(2)"><i class="nz-icon nz-icon-download1"></i>{{$t('overall.exportExcel')}}</div>
|
<div id="chart-export" @click="showImportBox(2)"><i class="nz-icon nz-icon-download1"></i>{{$t('overall.exportExcel')}}</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<!-- import、export之后的内容 -->
|
<!-- import、export之后的内容 -->
|
||||||
<slot name="after"></slot>
|
<slot name="after"></slot>
|
||||||
|
|||||||
Reference in New Issue
Block a user