NEZ-860 feat:cabinet 列表页面增加 批量删除按钮

This commit is contained in:
zhangyu
2021-07-22 14:13:38 +08:00
parent fd9ac901cf
commit 030ecd4e75
3 changed files with 16 additions and 3 deletions

View File

@@ -932,13 +932,17 @@ export default {
let chartUnit = chartInfo.unit
chartUnit = chartUnit || 2
const unit = chartDataFormat.getUnit(chartUnit)
// const flag = JSON.stringify(value).length > JSON.stringify(chartDataFormat.Interval(maxValue, copies, unit.type)).length
if (chartDataFormat.Interval(maxValue, copies, unit.type, 'min') < 1 && dot < 2) {
dot = 2
}
if (dot == 0) {
dot = 1
}
dot = bus.countDecimals(value)
// console.log(dot,val)
if (dot < self.chartDot) {
dot = self.chartDot
}
return unit.compute(value, index, -1, dot)
}
}
@@ -1055,8 +1059,6 @@ export default {
let paramsDot = bus.countDecimals(item.data[1])
if (paramsDot < self.chartDot) {
paramsDot = self.chartDot
} else if (paramsDot > 6) {
paramsDot = 6
}
if (i === 0) {
const value = bus.computeTimezone(item.data[0])

View File

@@ -44,6 +44,13 @@
import-url="/dc/cabinet/import"
@afterImport="getTableData"
>
<template v-slot:before>
<div>
<el-dropdown-item>
<delete-button :type="'link'" :title="$t('overall.batchDel')" id="asset-model-batch-delete" v-has="'dc_delete'" :api="url" :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true"></delete-button>
</el-dropdown-item>
</div>
</template>
</top-tool-more-options>
</template>
<template v-slot:pagination>

View File

@@ -495,6 +495,10 @@ export default {
dot = 1
}
this.chartDot = dot
dot = bus.countDecimals(value)
if (dot < this.chartDot) {
dot = this.chartDot
}
return unit.compute(value, index, -1, dot)
},
setRandomColors: function (num) { // 当线条过多,默认颜色数量不够时须使用此方法,num 颜色的数量通常传递series的length即可