From dae9f4c6724b7cb0d897fb40c53e72018d0785a1 Mon Sep 17 00:00:00 2001 From: zyh Date: Tue, 27 Sep 2022 14:48:34 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-2227=20feat=EF=BC=9Atext=20chart=20?= =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E7=BC=96=E8=BE=91=E5=99=A8=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=8F=92=E5=85=A5=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/chart/richTextEditor.vue | 49 ++++++++++--------- .../common/rightBox/chart/chartRightBox.vue | 4 +- .../rightBox/chart/otherChartConfig.vue | 4 -- 3 files changed, 27 insertions(+), 30 deletions(-) diff --git a/nezha-fronted/src/components/chart/richTextEditor.vue b/nezha-fronted/src/components/chart/richTextEditor.vue index 5d2aefd87..b28a8e692 100644 --- a/nezha-fronted/src/components/chart/richTextEditor.vue +++ b/nezha-fronted/src/components/chart/richTextEditor.vue @@ -54,7 +54,6 @@ export default { // 覆盖默认上传图片 const toolbar = this.quill.getModule('toolbar') toolbar.addHandler('image', (value) => { - this.uploadType = 'image' if (value) { this.$refs.upload.$children[0].$refs.input.click() } else { @@ -106,6 +105,7 @@ export default { }, // 上传图片 async uploadChange (file) { + // 图片小于4M const isLt4M = (file.size / 1024 / 1024) < 4 if (isLt4M) { console.log(this.$axios.defaults.baseURL + 'file/download/') @@ -142,29 +142,30 @@ export default { diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue index 1f4b36d31..f1a4a3348 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue @@ -109,7 +109,7 @@ {{$t('overall.save')}} - + { + setTimeout(() => { const start = new Date().setHours(new Date().getHours() - 1) const end = new Date() this.timeRange = [bus.computeTimezoneTime(start), bus.computeTimezoneTime(end)] diff --git a/nezha-fronted/src/components/common/rightBox/chart/otherChartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/otherChartConfig.vue index 9d585f7fa..6eefe3d65 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/otherChartConfig.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/otherChartConfig.vue @@ -416,7 +416,3 @@ export default { } } - -