fix: 删除 console

This commit is contained in:
zhangyu
2021-12-07 17:53:23 +08:00
parent eb77fd22a8
commit 9567944859
12 changed files with 4 additions and 20 deletions

View File

@@ -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>

View File

@@ -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] : ''

View File

@@ -141,7 +141,6 @@ export default {
} catch (e) {
console.info(e)
}
console.log(param)
param.showHeader = true
return {
...item,

View File

@@ -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
}

View File

@@ -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

View File

@@ -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,

View File

@@ -298,7 +298,6 @@ export default {
},
addMapping () {
const bacColor = randomcolor()
console.log(bacColor)
this.chartConfig.param.valueMapping.mapping.push({
type: 'value',
show: true,

View File

@@ -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) => {

View File

@@ -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()

View File

@@ -459,7 +459,6 @@ export default {
})
},
messageDetail (row) {
console.log(row)
if (row.alertRule.type == 3) {
return
}

View File

@@ -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 }]

View File

@@ -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