From dbccefad2f7bb8674a05c6c19ca391f5785baf7a Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Wed, 30 Nov 2022 11:47:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=86=E5=9B=BE=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E5=90=8E=E4=BF=AE=E6=94=B9=E5=90=8D=E7=A7=B0bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF=E7=9C=8B?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4=20=E6=95=B0=E6=8D=AE=E6=BA=90=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E9=99=90=E5=88=B6=E4=BF=9D=E5=AD=98=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/components/editor/EditBar.vue | 2 +- .../canvas/components/editor/SettingMenu.vue | 5 +- .../src/components/deCustomCm/DeTextarea.vue | 16 ++++-- frontend/src/utils/request.js | 5 +- .../chart/components/ChartTitleUpdate.vue | 2 +- frontend/src/views/chart/view/ChartEdit.vue | 3 +- .../src/views/dataset/data/UpdateInfo.vue | 2 +- .../panel/appTemplateMarket/log/index.vue | 16 +++--- frontend/src/views/panel/edit/index.vue | 8 +-- .../src/views/system/datasource/DsForm.vue | 1 + .../src/views/system/task/DatasetTaskList.vue | 56 +++++++++---------- 11 files changed, 62 insertions(+), 54 deletions(-) diff --git a/frontend/src/components/canvas/components/editor/EditBar.vue b/frontend/src/components/canvas/components/editor/EditBar.vue index 698658c3d8..471c4186f2 100644 --- a/frontend/src/components/canvas/components/editor/EditBar.vue +++ b/frontend/src/components/canvas/components/editor/EditBar.vue @@ -372,7 +372,7 @@ export default { ]) }, mounted() { - if (navigator.platform.indexOf('Mac') == -1) { + if (navigator.platform.indexOf('Mac') === -1) { this.systemOS = 'Other' } this.initCurFields() diff --git a/frontend/src/components/canvas/components/editor/SettingMenu.vue b/frontend/src/components/canvas/components/editor/SettingMenu.vue index 8eebf374c9..c7b85a1cfe 100644 --- a/frontend/src/components/canvas/components/editor/SettingMenu.vue +++ b/frontend/src/components/canvas/components/editor/SettingMenu.vue @@ -17,8 +17,7 @@ v-if="curComponent.type != 'custom-button'" icon="el-icon-document-copy" @click.native="copy" - >{{ $t('panel.copy') }}(+ D Control + D) + >{{ $t('panel.copy') }}(+ D Control + D) @@ -16,14 +16,14 @@ export default { directives: { count: { update: function(el, binding) { - const lg = binding.value?.length || 0 + const lg = binding.value.value?.length || 0 const count = el.querySelector('.el-input__count') if (!count) return if (!lg) { if (count?.classList?.contains('no-zore')) { count.classList.remove('no-zore') } - count.innerHTML = '0/200' + count.innerHTML = `0/${binding.value.maxlength || 200}` return } if (el.querySelector('.no-zore')) { @@ -34,7 +34,7 @@ export default { const num = document.createElement('span') const total = document.createElement('span') num.style.color = '#1F2329' - total.innerHTML = '/200' + total.innerHTML = `/${binding.value.maxlength || 200}` num.innerHTML = lg if (!newCount) return newCount.classList.add('el-input__count', 'no-zore') @@ -46,7 +46,11 @@ export default { }, props: { disabled: Boolean, - value: String + value: String, + maxlength: { + type: Number, + default: 200 + } }, methods: { handleChange(val) { diff --git a/frontend/src/utils/request.js b/frontend/src/utils/request.js index c9baf7f7df..78536360fc 100644 --- a/frontend/src/utils/request.js +++ b/frontend/src/utils/request.js @@ -108,13 +108,16 @@ service.interceptors.response.use(response => { const headers = error.response && error.response.headers || error.response || config.headers config.loading && tryHideLoading(store.getters.currentPath) - let msg + let msg = '' if (error.response) { checkAuth(error.response) msg = error.response.data.message || error.response.data } else { msg = error.message } + if (msg.length > 600) { + msg = msg.slice(0, 600) + } !config.hideMsg && (!headers['authentication-status']) && $error(msg) return Promise.reject(config.url === '/dataset/table/sqlPreview' ? msg : error) }) diff --git a/frontend/src/views/chart/components/ChartTitleUpdate.vue b/frontend/src/views/chart/components/ChartTitleUpdate.vue index 684ca0c194..a37a471c3e 100644 --- a/frontend/src/views/chart/components/ChartTitleUpdate.vue +++ b/frontend/src/views/chart/components/ChartTitleUpdate.vue @@ -380,8 +380,8 @@ export default { if (!viewSave) return viewEditSave(this.panelInfo.id, viewSave).then(() => { this.chart.title = this.chartTitleUpdate - bus.$emit('aside-set-title', this.chart.title) }) + bus.$emit('title-name', this.chart.title, chartView.id) bus.$emit('view-in-cache', { type: 'styleChange', viewId: chartView.id, diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index a0f02eac61..920404837e 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -1934,7 +1934,8 @@ export default { }, methods: { - setTitle(title) { + setTitle(title, id) { + if (this.view.id !== id) return this.view.customStyle.text = { ...this.view.customStyle.text, title } this.view.title = title this.view.name = title diff --git a/frontend/src/views/dataset/data/UpdateInfo.vue b/frontend/src/views/dataset/data/UpdateInfo.vue index 731aafb176..89f14bba8a 100644 --- a/frontend/src/views/dataset/data/UpdateInfo.vue +++ b/frontend/src/views/dataset/data/UpdateInfo.vue @@ -861,7 +861,7 @@ export default { }, disableExec(task) { return ( - (task.status === 'Stopped' && task.rate !== 'SIMPLE') || task.status === 'Pending' || task.status ==='Exec' || !hasDataPermission('manage', task.privileges) + task.status === 'Pending' || task.status === 'Exec' || !hasDataPermission('manage', task.privileges) ) }, disableDelete(task) { diff --git a/frontend/src/views/panel/appTemplateMarket/log/index.vue b/frontend/src/views/panel/appTemplateMarket/log/index.vue index 307ca921e1..bff056a815 100644 --- a/frontend/src/views/panel/appTemplateMarket/log/index.vue +++ b/frontend/src/views/panel/appTemplateMarket/log/index.vue @@ -1,8 +1,8 @@