fix:解决冲突
This commit is contained in:
@@ -60,8 +60,10 @@ dev_build:
|
||||
- zip -q -r $FILE_NAME ./*
|
||||
|
||||
# 将 dist zip 上传到 minio
|
||||
- md5sum $FILE_NAME > nz-gui-$CI_COMMIT_REF_NAME-latest.zip.md5sum.txt
|
||||
- mc cp $FILE_NAME nz/ci-cd/nz-gui/$FILE_NAME
|
||||
- mc cp $FILE_NAME nz/ci-cd/nz-gui/nz-gui-$CI_COMMIT_REF_NAME-latest.zip
|
||||
- mc cp nz-gui-$CI_COMMIT_REF_NAME-latest.zip.md5sum.txt nz/ci-cd/nz-gui/nz-gui-$CI_COMMIT_REF_NAME-latest.zip.md5sum.txt
|
||||
artifacts:
|
||||
name: "nz-gui-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA"
|
||||
when: on_success
|
||||
|
||||
@@ -195,18 +195,40 @@ export default {
|
||||
delete chartOption.tooltip.position
|
||||
}
|
||||
// 左y轴
|
||||
chartOption.yAxis[0].axisLabel.formatter = this.yAxisLabelFormatter(minValue, maxValue, copies, unit, decimals)
|
||||
|
||||
const leftData = this.chartData.filter(item => !item[0].yAxisIndex)
|
||||
console.log(leftData)
|
||||
const leftInfo = this.getMinMaxFromData(leftData, this.chartInfo.unit) //
|
||||
chartOption.yAxis[0].minInterval = chartDataFormat.Interval(leftInfo.maxValue, leftInfo.copies, leftInfo.unit.type, 'min')
|
||||
chartOption.yAxis[0].maxInterval = chartDataFormat.Interval(leftInfo.maxValue, leftInfo.copies, leftInfo.unit.type, 'max') * Math.ceil(chartOption.series.length / 5)
|
||||
if (this.chartInfo.param.stack) {
|
||||
chartOption.yAxis[0].maxInterval = chartOption.yAxis[0].maxInterval * (Math.ceil(chartOption.series.length / 5) + 1)
|
||||
}
|
||||
if (unit.type === 'Time' || unit.type === 'Date & Time') {
|
||||
delete chartOption.yAxis[0].minInterval
|
||||
delete chartOption.yAxis[0].maxInterval
|
||||
}
|
||||
chartOption.yAxis[0].min = this.chartInfo.param.min ? this.chartInfo.param.min : undefined
|
||||
chartOption.yAxis[0].max = this.chartInfo.param.max ? this.chartInfo.param.max : undefined
|
||||
chartOption.yAxis[0].axisLabel.formatter = this.yAxisLabelFormatter(minValue, maxValue, copies, unit, decimals)
|
||||
|
||||
// 右y轴
|
||||
if (this.chartInfo.param.enable.rightYAxis) {
|
||||
// 如果全都为右y轴数据 则右y轴显示网格
|
||||
const unit = chartDataFormat.getUnit(lodash.get(this, 'chartInfo.param.rightYAxis.unit', 2))
|
||||
const allRight = this.series.every(item => item.yAxisIndex == 1)
|
||||
chartOption.yAxis[1].splitLine.show = allRight
|
||||
|
||||
const unit = chartDataFormat.getUnit(lodash.get(this, 'chartInfo.param.rightYAxis.unit', 2))
|
||||
const rightData = this.chartData.filter(item => item[0].yAxisIndex)
|
||||
console.log(rightData, unit)
|
||||
const rightInfo = this.getMinMaxFromData(rightData, lodash.get(this, 'chartInfo.param.rightYAxis.unit', 2)) //
|
||||
chartOption.yAxis[1].minInterval = chartDataFormat.Interval(rightInfo.maxValue, rightInfo.copies, rightInfo.unit.type, 'min')
|
||||
chartOption.yAxis[1].maxInterval = chartDataFormat.Interval(rightInfo.maxValue, rightInfo.copies, rightInfo.unit.type, 'max') * Math.ceil(chartOption.series.length / 5)
|
||||
if (this.chartInfo.param.stack) {
|
||||
chartOption.yAxis[1].maxInterval = chartOption.yAxis[1].maxInterval * (Math.ceil(chartOption.series.length / 5) + 1)
|
||||
}
|
||||
if (unit.type === 'Time' || unit.type === 'Date & Time') {
|
||||
delete chartOption.yAxis[1].minInterval
|
||||
delete chartOption.yAxis[1].maxInterval
|
||||
}
|
||||
chartOption.yAxis[1].axisLabel.formatter = this.yAxisLabelFormatter(undefined, undefined, undefined, unit, decimals)
|
||||
chartOption.yAxis[1].min = this.chartInfo.param.rightYAxis.min ? this.chartInfo.param.rightYAxis.min : undefined
|
||||
chartOption.yAxis[1].max = this.chartInfo.param.rightYAxis.max ? this.chartInfo.param.rightYAxis.max : undefined
|
||||
@@ -572,7 +594,6 @@ export default {
|
||||
}
|
||||
color = self.stackTotalColorRight
|
||||
}
|
||||
|
||||
str += `
|
||||
<div class="tooltip__row">
|
||||
<div class="row__label" title="${self.$t('dashboard.dashboard.chartTotal')}">
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<span v-else :style="{background: item.color}" class="legend-shape"></span>
|
||||
<span :title="item.alias ? item.alias : item.name">{{item.alias ? item.alias : item.name}}</span>
|
||||
</div>
|
||||
<div v-for="(statistics, index) in item.statistics" :key="index" :class="{'legend-item--inactive': isGrey[index]}" class="legend--table-cell">{{(keepTwoDecimalFull(statistics.value))}}</div>
|
||||
<div v-for="(statistics, index) in item.statistics" :key="index" :class="{'legend-item--inactive': isGrey[index]}" class="legend--table-cell">{{(keepTwoDecimalFull(statistics.value, 'right'))}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -269,12 +269,16 @@ export default {
|
||||
}
|
||||
},
|
||||
// 四舍五入保留2位小数(不够位数,则用0替补)
|
||||
keepTwoDecimalFull (num) {
|
||||
keepTwoDecimalFull (num, type = 'left') {
|
||||
let chartUnit = this.chartInfo.unit
|
||||
if (type === 'right') {
|
||||
chartUnit = this.chartInfo.param.rightYAxis.unit
|
||||
}
|
||||
let result = parseFloat(num)
|
||||
if (isNaN(result)) {
|
||||
return '--'
|
||||
}
|
||||
result = chartDataFormat.getUnit(this.chartInfo.unit ? this.chartInfo.unit : 2).compute(result, null, -1, 2)
|
||||
result = chartDataFormat.getUnit(chartUnit || 2).compute(result, null, -1, 2)
|
||||
return result
|
||||
},
|
||||
getMaxValue (dataArg, chartInfo) {
|
||||
|
||||
@@ -369,6 +369,11 @@ function asciiCompute (num, ascii, units, dot = 2) {
|
||||
carry = parseInt(log)
|
||||
num = num / Math.pow(ascii, carry)
|
||||
}
|
||||
// if (num > 255) {
|
||||
// const log = Math.log(num) / Math.log(ascii)
|
||||
// carry = parseInt(log)
|
||||
// num = num / Math.pow(ascii, carry)
|
||||
// }
|
||||
if (Number.isInteger(num)) {
|
||||
return num * SIGN + ' ' + units[carry]
|
||||
} else {
|
||||
@@ -847,6 +852,11 @@ export default {
|
||||
interVal = Math.ceil(interVal) * Math.pow(1024, pow)
|
||||
}
|
||||
interVal = !isNaN(interVal) ? interVal : 1
|
||||
if (interVal >= 1 && interVal <= 512) {
|
||||
interVal = 512
|
||||
} else if (interVal > 512 && interVal <= 1024) {
|
||||
interVal = 1024
|
||||
}
|
||||
return interVal
|
||||
}
|
||||
if (type === 'DataRate' || type === 'Misc') {
|
||||
|
||||
@@ -84,6 +84,7 @@ export default {
|
||||
this.isNoData = true
|
||||
originalDatas.forEach((originalData, expressionIndex) => {
|
||||
originalData.forEach((data, dataIndex) => {
|
||||
console.log(data, 'data')
|
||||
if (colorIndex >= 20 && !this.showAllData) {
|
||||
colorIndex++
|
||||
return
|
||||
@@ -97,6 +98,9 @@ export default {
|
||||
chartInfo.param.rightYAxis && chartInfo.param.rightYAxis.elementNames.forEach(item => {
|
||||
if (data.elements.name == item) {
|
||||
s.yAxisIndex = 1
|
||||
data.yAxisIndex = 1
|
||||
} else {
|
||||
data.yAxisIndex = 0
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -114,8 +118,8 @@ export default {
|
||||
s.yAxisIndex = 1
|
||||
}
|
||||
|
||||
if (s.param && s.param.nullType) {
|
||||
s.connectNulls = s.param.nullType !== 'null'
|
||||
if (chartInfo.param && chartInfo.param.nullType) {
|
||||
s.connectNulls = chartInfo.param.nullType !== 'null'
|
||||
} else {
|
||||
s.connectNulls = false
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
@mouseenter="labelHover(item, 'other', true, false, $event)"
|
||||
@mouseleave="labelHover(item, 'other', false, false,)"
|
||||
>
|
||||
<div class="detail-row-info" :title="getRemoteText(item)">
|
||||
<div class="asset-manageIp" :title="getRemoteText(item)">
|
||||
<div class="detail-row-info">
|
||||
<div class="asset-manageIp">
|
||||
<el-tooltip effect="light" placement="right">
|
||||
<div slot="content">
|
||||
{{$t(getStatusText(item.status))}}
|
||||
|
||||
@@ -1061,6 +1061,9 @@ export function hideTableTooltip () {
|
||||
|
||||
/* 数字转换保留小数,数字很小时转为科学计数法, dot为保留几位小数 */
|
||||
export function formatScientificNotation (value, dot = 2) {
|
||||
if (isNaN(value) || value === null) {
|
||||
return value
|
||||
}
|
||||
let val = value ? parseFloat(Number(value).toFixed(dot)) : 0
|
||||
if (val === 0) {
|
||||
val = Number(value).toPrecision(dot + 1)
|
||||
|
||||
@@ -564,6 +564,9 @@ export default {
|
||||
this.$set(this.searchTime, 2, val + 'd')
|
||||
} else {
|
||||
this.isCustom = true
|
||||
if (!time[0]) {
|
||||
this.isCustom = false
|
||||
}
|
||||
this.$set(this.searchTime, 0, time[0])
|
||||
this.$set(this.searchTime, 1, time[1])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user