fix: 删除 console
This commit is contained in:
@@ -84,7 +84,6 @@ export default {
|
||||
chartOption.series = this.initPieData(this.chartInfo, chartOption.series[0], this.chartData) // 生成series和legends
|
||||
// chartOption.series.label.formatter = this.pieFormatterLabel
|
||||
chartOption.tooltip.formatter = this.formatterFunc
|
||||
console.log(chartOption, 'chartOption')
|
||||
/* 使用setTimeout延迟渲染图表,避免样式错乱 */
|
||||
setTimeout(() => {
|
||||
const myChart = this.isInit ? echarts.init(document.getElementById(`chart-canvas-${this.chartId}`)) : getChart(this.chartId)
|
||||
@@ -111,7 +110,6 @@ export default {
|
||||
const valueSorted = datas.sort((a, b) => {
|
||||
return a[1] - b[1]
|
||||
})
|
||||
console.log(timeSorted, valueSorted)
|
||||
minTime = timeSorted.length ? timeSorted[0][0] : ''
|
||||
maxTime = timeSorted.length ? timeSorted[timeSorted.length - 1][0] : ''
|
||||
minValue = valueSorted.length ? valueSorted[0][1] : ''
|
||||
@@ -127,7 +125,6 @@ export default {
|
||||
if (s) {
|
||||
const value = getMetricTypeValue(data.values, chartInfo.param.statistics)
|
||||
const mapping = this.selectMapping(value, chartInfo.param.valueMapping)
|
||||
console.log(mapping)
|
||||
// eslint-disable-next-line vue/no-mutating-props
|
||||
mapping && (this.chartOption.color[colorIndex] = mapping.color.bac)
|
||||
s.data.push({
|
||||
@@ -207,7 +204,7 @@ export default {
|
||||
try {
|
||||
this.isStack = this.chartInfo.param.stack
|
||||
} catch (e) {}
|
||||
// this.initChart(this.chartOption)
|
||||
this.initChart(this.chartOption)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -102,7 +102,6 @@ export default {
|
||||
const valueSorted = datas.sort((a, b) => {
|
||||
return a[1] - b[1]
|
||||
})
|
||||
console.log(timeSorted, valueSorted)
|
||||
minTime = timeSorted.length ? timeSorted[0][0] : ''
|
||||
maxTime = timeSorted.length ? timeSorted[timeSorted.length - 1][0] : ''
|
||||
minValue = valueSorted.length ? valueSorted[0][1] : ''
|
||||
|
||||
@@ -141,7 +141,6 @@ export default {
|
||||
} catch (e) {
|
||||
console.info(e)
|
||||
}
|
||||
console.log(param)
|
||||
param.showHeader = true
|
||||
return {
|
||||
...item,
|
||||
|
||||
@@ -23,13 +23,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleTimeSeries (chartInfo, seriesTemplate, originalDatas) {
|
||||
console.log(chartInfo, seriesTemplate, originalDatas)
|
||||
const series = []
|
||||
let colorIndex = 0
|
||||
originalDatas.forEach((originalData, expressionIndex) => {
|
||||
originalData.forEach((data, dataIndex) => {
|
||||
const s = lodash.cloneDeep(seriesTemplate)
|
||||
console.log(seriesTemplate)
|
||||
if (s) {
|
||||
s.data = data.values
|
||||
s.name = this.handleLegend(chartInfo, data, expressionIndex, dataIndex, colorIndex)
|
||||
@@ -82,7 +80,6 @@ export default {
|
||||
}
|
||||
// 处理legend别名
|
||||
let alias = this.handleLegendAlias(legend, chartInfo.elements[expressionIndex].legend)
|
||||
console.log(alias)
|
||||
if (!alias) {
|
||||
alias = legend
|
||||
}
|
||||
|
||||
@@ -77,7 +77,6 @@ export default {
|
||||
this.query(elements, startTime, endTime, step)
|
||||
},
|
||||
query (elements, startTime, endTime, step) {
|
||||
console.log(this.chartInfo.datasource, elements, startTime, endTime, step)
|
||||
try {
|
||||
switch (this.chartInfo.datasource) {
|
||||
case 'metrics':
|
||||
@@ -112,7 +111,6 @@ export default {
|
||||
chartData.push({ error: r.msg || r.error || r })
|
||||
}
|
||||
})
|
||||
console.log(chartData)
|
||||
this.chartData = chartData
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
|
||||
@@ -915,8 +915,8 @@ const chartData = {
|
||||
show: true,
|
||||
mapping: [
|
||||
{ type: 'value', show: true, value: 2, display: 'value', color: { bac: '#8ef9ab', text: '#6a21bc' } },
|
||||
{ type: 'range', show: true, display: 'range', color: { bac: '#ef1cd0', text: '#66d815' }, from: 0, to: 123123 },
|
||||
{ type: 'regx', show: true, display: 'regx', color: { bac: '#d406e2', text: '#f722ec' }, regx: '123' }]
|
||||
{ type: 'range', show: true, display: 'range', color: { bac: '#ef1cd0', text: '#66d815' }, from: 2, to: 123123 },
|
||||
{ type: 'regx', show: true, display: 'regx', color: { bac: '#000000', text: '#ffffff' }, regx: '2' }]
|
||||
}
|
||||
}),
|
||||
pid: null,
|
||||
@@ -924,7 +924,7 @@ const chartData = {
|
||||
remark: '123',
|
||||
seq: null,
|
||||
x: 0,
|
||||
y: 12,
|
||||
y: 0,
|
||||
w: 6,
|
||||
h: 4,
|
||||
i: 690506,
|
||||
|
||||
@@ -298,7 +298,6 @@ export default {
|
||||
},
|
||||
addMapping () {
|
||||
const bacColor = randomcolor()
|
||||
console.log(bacColor)
|
||||
this.chartConfig.param.valueMapping.mapping.push({
|
||||
type: 'value',
|
||||
show: true,
|
||||
|
||||
@@ -1098,7 +1098,6 @@ export default {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log(this.searchMsg.searchLabelList.find(key => this.select_list[this.sreach_num].label == key.label))
|
||||
if (keyCode == 8) {
|
||||
if (this.delcriteriaBool || !this.input_sreach) {
|
||||
this.searchMsg.searchLabelList.forEach((val, k) => {
|
||||
|
||||
@@ -139,7 +139,6 @@ export default {
|
||||
changeLocal (lang) {
|
||||
localStorage.setItem('nz-language', lang)
|
||||
this.$store.commit('setLanguage', lang)
|
||||
console.log(lang)
|
||||
this.$i18n.locale = lang
|
||||
setTimeout(() => {
|
||||
window.location.reload()
|
||||
|
||||
@@ -459,7 +459,6 @@ export default {
|
||||
})
|
||||
},
|
||||
messageDetail (row) {
|
||||
console.log(row)
|
||||
if (row.alertRule.type == 3) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1551,7 +1551,6 @@ export default {
|
||||
})
|
||||
},
|
||||
valueMappingChange: function (value) {
|
||||
console.log(this.editChart.param.valueMapping.type)
|
||||
if (this.editChart.param.valueMapping.type == 'value') {
|
||||
this.editChart.param.valueMapping.mapping = [{ text: '', value: '', color: { bac: '#fff', text: '#000' } }]
|
||||
this.showPicker = [{ bac: false, text: false }]
|
||||
|
||||
@@ -386,7 +386,6 @@ export default {
|
||||
},
|
||||
// 编辑图表信息,打开编辑弹窗
|
||||
editChart (data, copy) {
|
||||
console.log(456)
|
||||
if (copy) {
|
||||
this.chart = JSON.parse(JSON.stringify(data))
|
||||
this.chart.panelId = this.showPanel.id
|
||||
|
||||
Reference in New Issue
Block a user