From 66dfb577b6fae5343acb1b57b63ff41a423bee05 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Tue, 14 Jun 2022 14:06:55 +0800 Subject: [PATCH] chore: cleanup unnecessary console log Signed-off-by: Ryan Wang --- .../canvas/components/Editor/index.vue | 2 +- .../canvas/custom-component/DeStreamMedia.vue | 2 +- .../src/components/canvas/store/snapshot.js | 2 - frontend/src/components/canvas/utils/style.js | 1 - .../src/components/canvas/utils/translate.js | 2 - .../src/components/dataease/DeOutWidget.vue | 1 - .../serviceImpl/TimeDateRangeServiceImpl.js | 1 - .../widget/serviceImpl/TimeDateServiceImpl.js | 1 - .../serviceImpl/TimeMonthServiceImpl.js | 1 - .../serviceImpl/TimeQuarterServiceImpl.js | 1 - .../widget/serviceImpl/TimeYearServiceImpl.js | 1 - frontend/src/plugins/Export2Excel.js | 47 ------------------- frontend/src/views/chart/chart/bar/bar.js | 2 - .../src/views/chart/chart/funnel/funnel.js | 1 - frontend/src/views/chart/chart/gauge/gauge.js | 2 - .../src/views/chart/chart/gauge/gauge_antv.js | 1 - frontend/src/views/chart/chart/line/line.js | 1 - frontend/src/views/chart/chart/map/map.js | 1 - frontend/src/views/chart/chart/mix/mix.js | 1 - frontend/src/views/chart/chart/pie/pie.js | 2 - frontend/src/views/chart/chart/radar/radar.js | 1 - .../src/views/chart/chart/scatter/scatter.js | 1 - .../src/views/chart/chart/treemap/treemap.js | 1 - frontend/src/views/chart/view/ChartEdit.vue | 3 +- frontend/src/views/link/view/index.vue | 4 +- .../src/views/panel/list/PanelViewShow.vue | 2 +- 26 files changed, 7 insertions(+), 78 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue index 2996cd6174..392b1e590e 100644 --- a/frontend/src/components/canvas/components/Editor/index.vue +++ b/frontend/src/components/canvas/components/Editor/index.vue @@ -768,7 +768,7 @@ function findBelowItems(item) { break } } catch (e) { - console.log('positionBox igonre') + console.error('positionBox igonre', e) } } } diff --git a/frontend/src/components/canvas/custom-component/DeStreamMedia.vue b/frontend/src/components/canvas/custom-component/DeStreamMedia.vue index dfc68d2a41..ca721e004d 100644 --- a/frontend/src/components/canvas/custom-component/DeStreamMedia.vue +++ b/frontend/src/components/canvas/custom-component/DeStreamMedia.vue @@ -115,7 +115,7 @@ export default { this.flvPlayer.load() this.flvPlayer.play() } catch (error) { - console.log('flvjs err ignore') + console.error('flvjs err ignore', error) } } } diff --git a/frontend/src/components/canvas/store/snapshot.js b/frontend/src/components/canvas/store/snapshot.js index 3c5937278e..25dc34c8cd 100644 --- a/frontend/src/components/canvas/store/snapshot.js +++ b/frontend/src/components/canvas/store/snapshot.js @@ -34,7 +34,6 @@ export default { recordSnapshot(state) { state.changeTimes++ - // console.log('recordSnapshot') // 添加新的快照 state.snapshotData[++state.snapshotIndex] = deepCopy(state.componentData) state.snapshotStyleData[state.snapshotIndex] = deepCopy(state.canvasStyleData) @@ -45,7 +44,6 @@ export default { } }, refreshSnapshot(state) { - // console.log('refreshSnapshot') // 刷新快照 state.snapshotData = [deepCopy(state.componentData)] state.snapshotStyleData = [deepCopy(state.canvasStyleData)] diff --git a/frontend/src/components/canvas/utils/style.js b/frontend/src/components/canvas/utils/style.js index 96106289a4..9fc58db439 100644 --- a/frontend/src/components/canvas/utils/style.js +++ b/frontend/src/components/canvas/utils/style.js @@ -167,7 +167,6 @@ export function recursionTransObj(template, infoObj, scale, terminal) { if (infoObj[templateKey] && infoObj[templateKey][templateProp]) { // 移动端特殊属性值设置 if (terminal === 'mobile' && mobileSpecialProps[templateProp] !== undefined) { - // console.log('mobile:' + templateProp + mobileSpecialProps[templateProp]) infoObj[templateKey][templateProp] = mobileSpecialProps[templateProp] } else { infoObj[templateKey][templateProp] = getScaleValue(infoObj[templateKey][templateProp], scale) diff --git a/frontend/src/components/canvas/utils/translate.js b/frontend/src/components/canvas/utils/translate.js index f7c7fc116d..8dfa34cc36 100644 --- a/frontend/src/components/canvas/utils/translate.js +++ b/frontend/src/components/canvas/utils/translate.js @@ -130,7 +130,6 @@ export function changeStyleWithScale(value) { export function changeStyleWithScaleHeightInAuto(value) { const scale = store.state.canvasStyleData.scaleHeight ? store.state.canvasStyleData.scaleHeight : 100 const result = value * scale / 100 - // console.log('heightInAuto=>' + scale + ';' + result) return result } @@ -138,7 +137,6 @@ export function changeStyleWithScaleHeightInAuto(value) { export function changeStyleWithScaleWidthInAuto(value) { const scale = store.state.canvasStyleData.scaleWidth ? store.state.canvasStyleData.scaleWidth : 100 const result = value * scale / 100 - // console.log('widthInAuto=>' + scale + ';' + result) return result } diff --git a/frontend/src/components/dataease/DeOutWidget.vue b/frontend/src/components/dataease/DeOutWidget.vue index b9b9933ebd..8735cb4f8b 100644 --- a/frontend/src/components/dataease/DeOutWidget.vue +++ b/frontend/src/components/dataease/DeOutWidget.vue @@ -114,7 +114,6 @@ export default { // this.watchSize() }, created() { - // console.log('aaaaaa') const { horizontal, vertical } = this.element.style this.$set(this.element.style, 'horizontal', horizontal || 'left') this.$set(this.element.style, 'vertical', vertical || 'center') diff --git a/frontend/src/components/widget/serviceImpl/TimeDateRangeServiceImpl.js b/frontend/src/components/widget/serviceImpl/TimeDateRangeServiceImpl.js index d06b70a722..372ecb68ba 100644 --- a/frontend/src/components/widget/serviceImpl/TimeDateRangeServiceImpl.js +++ b/frontend/src/components/widget/serviceImpl/TimeDateRangeServiceImpl.js @@ -68,7 +68,6 @@ class TimeDateRangeServiceImpl extends WidgetService { initLeftPanel() { const value = JSON.parse(JSON.stringify(leftPanel)) return value - // console.log('this is first initWidget') } initFilterDialog() { diff --git a/frontend/src/components/widget/serviceImpl/TimeDateServiceImpl.js b/frontend/src/components/widget/serviceImpl/TimeDateServiceImpl.js index 6dfba9a4a4..2931d7afce 100644 --- a/frontend/src/components/widget/serviceImpl/TimeDateServiceImpl.js +++ b/frontend/src/components/widget/serviceImpl/TimeDateServiceImpl.js @@ -79,7 +79,6 @@ class TimeDateServiceImpl extends WidgetService { initLeftPanel() { const value = JSON.parse(JSON.stringify(leftPanel)) return value - // console.log('this is first initWidget') } initFilterDialog() { diff --git a/frontend/src/components/widget/serviceImpl/TimeMonthServiceImpl.js b/frontend/src/components/widget/serviceImpl/TimeMonthServiceImpl.js index 53f8c277f6..7a5ed3699a 100644 --- a/frontend/src/components/widget/serviceImpl/TimeMonthServiceImpl.js +++ b/frontend/src/components/widget/serviceImpl/TimeMonthServiceImpl.js @@ -72,7 +72,6 @@ class TimeMonthServiceImpl extends WidgetService { initLeftPanel() { const value = JSON.parse(JSON.stringify(leftPanel)) return value - // console.log('this is first initWidget') } initFilterDialog() { diff --git a/frontend/src/components/widget/serviceImpl/TimeQuarterServiceImpl.js b/frontend/src/components/widget/serviceImpl/TimeQuarterServiceImpl.js index 7592655e34..a3bcd9535d 100644 --- a/frontend/src/components/widget/serviceImpl/TimeQuarterServiceImpl.js +++ b/frontend/src/components/widget/serviceImpl/TimeQuarterServiceImpl.js @@ -44,7 +44,6 @@ class TimeQuarterServiceImpl extends WidgetService { initLeftPanel() { const value = JSON.parse(JSON.stringify(leftPanel)) return value - // console.log('this is first initWidget') } initFilterDialog() { diff --git a/frontend/src/components/widget/serviceImpl/TimeYearServiceImpl.js b/frontend/src/components/widget/serviceImpl/TimeYearServiceImpl.js index 67ce9ec172..7c164340a5 100644 --- a/frontend/src/components/widget/serviceImpl/TimeYearServiceImpl.js +++ b/frontend/src/components/widget/serviceImpl/TimeYearServiceImpl.js @@ -71,7 +71,6 @@ class TimeYearServiceImpl extends WidgetService { initLeftPanel() { const value = JSON.parse(JSON.stringify(leftPanel)) return value - // console.log('this is first initWidget') } initFilterDialog() { diff --git a/frontend/src/plugins/Export2Excel.js b/frontend/src/plugins/Export2Excel.js index 7252b86318..d3bc687d21 100644 --- a/frontend/src/plugins/Export2Excel.js +++ b/frontend/src/plugins/Export2Excel.js @@ -92,14 +92,12 @@ function s2ab(s) { export function export_table_to_excel(id) { var theTable = document.getElementById(id) - console.log('a') var oo = generateArray(theTable) var ranges = oo[1] /* original data */ var data = oo[0] var ws_name = 'SheetJS' - console.log(data) var wb = new Workbook(); var ws = sheet_from_array_of_arrays(data) @@ -137,48 +135,3 @@ export function export_json_to_excel(th, jsonData, defaultTitle) { var title = defaultTitle || '列表' saveAs(new Blob([s2ab(wbout)], { type: 'application/octet-stream' }), title + '.xlsx') } -// export default{ -// export_json_to_excel(th, jsonData, defaultTitle) { - -// /* original data */ - -// var data = jsonData; -// data.unshift(th); -// var ws_name = "SheetJS"; - -// var wb = new Workbook(), ws = sheet_from_array_of_arrays(data); - -// /* add worksheet to workbook */ -// wb.SheetNames.push(ws_name); -// wb.Sheets[ws_name] = ws; - -// var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'}); -// var title = defaultTitle || '列表' -// saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), title + ".xlsx") -// }, -// export_table_to_excel(id) { -// var theTable = document.getElementById(id); -// console.log('a') -// var oo = generateArray(theTable); -// var ranges = oo[1]; - -// /* original data */ -// var data = oo[0]; -// var ws_name = "SheetJS"; -// console.log(data); - -// var wb = new Workbook(), ws = sheet_from_array_of_arrays(data); - -// /* add ranges to worksheet */ -// // ws['!cols'] = ['apple', 'banan']; -// ws['!merges'] = ranges; - -// /* add worksheet to workbook */ -// wb.SheetNames.push(ws_name); -// wb.Sheets[ws_name] = ws; - -// var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'}); - -// saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), "test.xlsx") -// } -// } diff --git a/frontend/src/views/chart/chart/bar/bar.js b/frontend/src/views/chart/chart/bar/bar.js index aee859135f..044e53ed06 100644 --- a/frontend/src/views/chart/chart/bar/bar.js +++ b/frontend/src/views/chart/chart/bar/bar.js @@ -46,7 +46,6 @@ export function baseBarOption(chart_option, chart) { chart_option.series.push(y) } } - // console.log(chart_option); componentStyle(chart_option, chart) seniorCfg(chart_option, chart) return chart_option @@ -109,7 +108,6 @@ export function horizontalBarOption(chart_option, chart) { chart_option.series.push(y) } } - // console.log(chart_option); componentStyle(chart_option, chart) seniorCfg(chart_option, chart) return chart_option diff --git a/frontend/src/views/chart/chart/funnel/funnel.js b/frontend/src/views/chart/chart/funnel/funnel.js index 16f699d2b7..d38e2f3f30 100644 --- a/frontend/src/views/chart/chart/funnel/funnel.js +++ b/frontend/src/views/chart/chart/funnel/funnel.js @@ -47,7 +47,6 @@ export function baseFunnelOption(chart_option, chart) { } } } - // console.log(chart_option); componentStyle(chart_option, chart) return chart_option } diff --git a/frontend/src/views/chart/chart/gauge/gauge.js b/frontend/src/views/chart/chart/gauge/gauge.js index 9c45f7f8d7..9b7c641bb1 100644 --- a/frontend/src/views/chart/chart/gauge/gauge.js +++ b/frontend/src/views/chart/chart/gauge/gauge.js @@ -130,8 +130,6 @@ export function baseGaugeOption(chart_option, chart, scale = 1) { } } } - // console.log(chart_option.series[0]) - // console.log(chart_option); componentStyle(chart_option, chart) return chart_option } diff --git a/frontend/src/views/chart/chart/gauge/gauge_antv.js b/frontend/src/views/chart/chart/gauge/gauge_antv.js index 88f9711fd5..0d89bc3072 100644 --- a/frontend/src/views/chart/chart/gauge/gauge_antv.js +++ b/frontend/src/views/chart/chart/gauge/gauge_antv.js @@ -128,7 +128,6 @@ export function baseGaugeOptionAntV(plot, container, chart, action, scale = 1) { } } } - // console.log(options.indicator.pin) // 开始渲染 if (plot) { diff --git a/frontend/src/views/chart/chart/line/line.js b/frontend/src/views/chart/chart/line/line.js index faf0f5fb88..12fc3c4124 100644 --- a/frontend/src/views/chart/chart/line/line.js +++ b/frontend/src/views/chart/chart/line/line.js @@ -53,7 +53,6 @@ export function baseLineOption(chart_option, chart) { chart_option.series.push(y) } } - // console.log(chart_option); componentStyle(chart_option, chart) seniorCfg(chart_option, chart) return chart_option diff --git a/frontend/src/views/chart/chart/map/map.js b/frontend/src/views/chart/chart/map/map.js index 27ec15676d..1354cf27b1 100644 --- a/frontend/src/views/chart/chart/map/map.js +++ b/frontend/src/views/chart/chart/map/map.js @@ -80,7 +80,6 @@ export function baseMapOption(chart_option, chart) { } } } - // console.log(chart_option); componentStyle(chart_option, chart) return chart_option } diff --git a/frontend/src/views/chart/chart/mix/mix.js b/frontend/src/views/chart/chart/mix/mix.js index 3380996cb4..cb6f1fa506 100644 --- a/frontend/src/views/chart/chart/mix/mix.js +++ b/frontend/src/views/chart/chart/mix/mix.js @@ -66,7 +66,6 @@ export function baseMixOption(chart_option, chart) { chart_option.series.push(y) } } - // console.log(chart_option); componentStyle(chart_option, chart) seniorCfg(chart_option, chart) return chart_option diff --git a/frontend/src/views/chart/chart/pie/pie.js b/frontend/src/views/chart/chart/pie/pie.js index e7622d8dda..f92ab30e62 100644 --- a/frontend/src/views/chart/chart/pie/pie.js +++ b/frontend/src/views/chart/chart/pie/pie.js @@ -49,7 +49,6 @@ export function basePieOption(chart_option, chart) { } } } - // console.log(chart_option); componentStyle(chart_option, chart) return chart_option } @@ -102,7 +101,6 @@ export function rosePieOption(chart_option, chart) { } } } - // console.log(chart_option); componentStyle(chart_option, chart) return chart_option } diff --git a/frontend/src/views/chart/chart/radar/radar.js b/frontend/src/views/chart/chart/radar/radar.js index 0de2f39d7c..691cdde0c2 100644 --- a/frontend/src/views/chart/chart/radar/radar.js +++ b/frontend/src/views/chart/chart/radar/radar.js @@ -62,7 +62,6 @@ export function baseRadarOption(chart_option, chart) { chart_option.radar.indicator.push({ name: ele, max: max }) }) } - // console.log(chart_option); componentStyle(chart_option, chart) return chart_option } diff --git a/frontend/src/views/chart/chart/scatter/scatter.js b/frontend/src/views/chart/chart/scatter/scatter.js index d6f1a88a95..2e08f7c817 100644 --- a/frontend/src/views/chart/chart/scatter/scatter.js +++ b/frontend/src/views/chart/chart/scatter/scatter.js @@ -55,7 +55,6 @@ export function baseScatterOption(chart_option, chart, terminal = 'pc') { chart_option.series.push(y) } } - // console.log(chart_option); componentStyle(chart_option, chart) seniorCfg(chart_option, chart) return chart_option diff --git a/frontend/src/views/chart/chart/treemap/treemap.js b/frontend/src/views/chart/chart/treemap/treemap.js index 6c6befa083..90bc879b71 100644 --- a/frontend/src/views/chart/chart/treemap/treemap.js +++ b/frontend/src/views/chart/chart/treemap/treemap.js @@ -57,7 +57,6 @@ export function baseTreemapOption(chart_option, chart) { chart_option.series[0].name = chart.data.series[0].name } } - // console.log(chart_option); componentStyle(chart_option, chart) return chart_option } diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 0a8f3d1560..bf0418bafa 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -1345,7 +1345,8 @@ export default { } this.fieldShow = true }).catch(err => { - console.log(err) + console.error(err) + this.resetView() this.httpRequest.status = err.response.data.success this.httpRequest.msg = err.response.data.message diff --git a/frontend/src/views/link/view/index.vue b/frontend/src/views/link/view/index.vue index 0414eee3c0..d4a041dc46 100644 --- a/frontend/src/views/link/view/index.vue +++ b/frontend/src/views/link/view/index.vue @@ -101,7 +101,7 @@ export default { message: this.$t('panel.outer_param_decode_error'), type: 'error' }) - console.log('outerParams Decode error:', e) + console.error('outerParams Decode error:', e) } } @@ -125,7 +125,7 @@ export default { if (--loadingCount === 0) { this.show = true } - console.log('tempParam error:', e) + console.error('tempParam error:', e) } } diff --git a/frontend/src/views/panel/list/PanelViewShow.vue b/frontend/src/views/panel/list/PanelViewShow.vue index 045d58e99f..e590db7f98 100644 --- a/frontend/src/views/panel/list/PanelViewShow.vue +++ b/frontend/src/views/panel/list/PanelViewShow.vue @@ -326,7 +326,7 @@ export default { callBack(rsp.data) }) } catch (e) { - console.log('findResourceAsBase64 error') + console.error('findResourceAsBase64 error', e) callBack() } } else {