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/FieldEdit.vue b/frontend/src/views/dataset/data/FieldEdit.vue index eb46831c15..07d9f4bd90 100644 --- a/frontend/src/views/dataset/data/FieldEdit.vue +++ b/frontend/src/views/dataset/data/FieldEdit.vue @@ -860,8 +860,8 @@ export default { item.dateFormat = item.dateFormatType } } - if(item.dateFormatType === 'custom' && !item.dateFormat){ - return; + if (item.dateFormatType === 'custom' && !item.dateFormat) { + return } post('/dataset/field/save', item) .then((response) => { diff --git a/frontend/src/views/dataset/data/UpdateInfo.vue b/frontend/src/views/dataset/data/UpdateInfo.vue index 731aafb176..f728a0bf28 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 === 'Stopped' && task.rate !== 'SIMPLE') || 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 @@ @@ -329,11 +341,14 @@ export default { }, data() { return { - tabActive: 'all', + tabActive: 'RDBMS', + databaseList: [], currentNodeId: '', dsTypeRelate: false, expandedArray: [], tData: [], + nameMap: ['relational_database', 'non_relational_database', 'other'], + typeList: ['RDBMS', 'NORDBMS', 'OTHER'], treeLoading: false, dsTypes: [], dsTypesForDriver: [], @@ -386,15 +401,7 @@ export default { } }, computed: { - ...mapGetters(['user']), - databaseList() { - if (this.tabActive === 'all') { - return this.dsTypes - } - return this.dsTypes.filter( - (ele) => ele.databaseClassification === this.tabActive - ) - } + ...mapGetters(['user']) }, watch: { key(val) { @@ -406,6 +413,9 @@ export default { this.datasourceTypes() }, methods: { + handleClick() { + document.querySelector(`.${this.tabActive}`).scrollIntoView() + }, createDriveOrDs() { if (this.showView === 'Driver') { this.addDriver() @@ -478,11 +488,17 @@ export default { datasourceTypes() { listDatasourceType().then((res) => { this.dsTypes = res.data + const databaseList = [[], [], []] this.dsTypes.forEach((item) => { + const index = this.typeList.findIndex(ele => ele === item.databaseClassification) + if (index !== -1) { + databaseList[index].push(item) + } if (item.isJdbc) { this.dsTypesForDriver.push(item) } }) + this.databaseList = databaseList }) }, refreshType(datasource) { @@ -802,24 +818,38 @@ export default { width: 100%; max-height: 65vh; overflow-y: auto; - display: flex; - flex-wrap: wrap; - margin-top: -3px; + margin-top: 3px; position: relative; z-index: 10; + + .name { + margin: 16px 0; + font-family: PingFang SC; + font-size: 16px; + font-weight: 500; + line-height: 24px; + color: var(--deTextPrimary, #1F2329); + } + + .item-container { + display: flex; + width: 100%; + flex-wrap: wrap; + } + .db-card { - height: 193px; - width: 270px; + height: 141px; + width: 177.6px; display: flex; flex-wrap: wrap; background: #ffffff; border: 1px solid #dee0e3; border-radius: 4px; - margin-bottom: 24px; - margin-left: 22px; + margin-bottom: 16px; + margin-left: 16px; img { width: 100%; - height: 154.58px; + height: 102px; border-top-left-radius: 4px; border-top-right-radius: 4px; } diff --git a/frontend/src/views/system/task/DatasetTaskList.vue b/frontend/src/views/system/task/DatasetTaskList.vue index 3c16f7d221..b48c86bbf4 100644 --- a/frontend/src/views/system/task/DatasetTaskList.vue +++ b/frontend/src/views/system/task/DatasetTaskList.vue @@ -36,8 +36,8 @@ icon="iconfont icon-icon-filter" @click="filterShow" >{{ - $t("user.filter") - }} + $t("user.filter") + }} @@ -83,7 +83,7 @@ > {{ paginationConfig.total }} {{ $t("user.result_one") }} - + {{ ele }} + class="el-icon-close" + @click="clearOneFilter(index)" + />

@@ -197,8 +197,8 @@ v-if="scope.row.lastExecStatus" :class="[`de-${scope.row.lastExecStatus}-pre`, 'de-status']" >{{ - $t(`dataset.${scope.row.lastExecStatus.toLocaleLowerCase()}`) - }} + $t(`dataset.${scope.row.lastExecStatus.toLocaleLowerCase()}`) + }} {{ - $t("dataset.close") - }} + $t("dataset.close") + }}