diff --git a/frontend/src/components/deCustomCm/deBtn.vue b/frontend/src/components/deCustomCm/deBtn.vue index f950e9f85d..55df2934bb 100644 --- a/frontend/src/components/deCustomCm/deBtn.vue +++ b/frontend/src/components/deCustomCm/deBtn.vue @@ -1,6 +1,7 @@ @@ -32,13 +48,18 @@ export default { chartInfo: { type: Object, default: () => {} + }, + titleClass: { + type: Object, + default: () => {} } }, data() { return { chartTitleEditer: false, chartTitleUpdate: '', - chart: {} + chart: {}, + showClose: false } }, computed: { @@ -48,6 +69,10 @@ export default { ...mapState(['mobileLayoutStatus', 'previewVisible']), panelInfo() { return this.$store.state.panel.panelInfo + }, + inputStyle() { + const { fontSize, color, fontWeight, fontStyle, fontFamily } = this.titleClass + return { fontSize, color, fontWeight, fontStyle, fontFamily, height: fontSize } } }, watch: { @@ -58,6 +83,9 @@ export default { }, immediate: true, deep: true + }, + chartTitleUpdate(val) { + this.showClose = !!val } }, methods: { @@ -274,13 +302,17 @@ export default { }, lostFocus() { this.chartTitleEditer = false + this.showClose = false }, handleTitleEditer() { if ( this.mainActiveName !== 'PanelEdit' || this.mobileLayoutStatus || this.previewVisible - ) { return } + ) { + return + } + this.showClose = true this.chartTitleEditer = true this.chartTitleUpdate = this.chart.title this.$nextTick(() => { @@ -322,15 +354,38 @@ export default { ? JSON.parse(chartView.customFilter) : {} chartView.senior = chartView.senior ? JSON.parse(chartView.senior) : {} + chartView.customStyle.text.title = this.chartTitleUpdate + + this.$store.commit('recordViewEdit', { + viewId: this.chart.id, + hasEdit: true + }) + const view = JSON.parse(JSON.stringify(chartView)) + view.xaxis = JSON.stringify(chartView.xaxis) + view.viewFields = JSON.stringify(chartView.viewFields) + view.xaxisExt = JSON.stringify(chartView.xaxisExt) + view.yaxis = JSON.stringify(chartView.yaxis) + view.yaxisExt = JSON.stringify(chartView.yaxisExt) + view.extStack = JSON.stringify(chartView.extStack) + view.drillFields = JSON.stringify(chartView.drillFields) + view.extBubble = JSON.stringify(chartView.extBubble) + view.customAttr = JSON.stringify(chartView.customAttr) + view.customStyle = JSON.stringify(chartView.customStyle) + view.customFilter = JSON.stringify(chartView.customFilter) + view.senior = JSON.stringify(chartView.senior) + view.title = this.chartTitleUpdate + view.name = this.chartTitleUpdate + view.stylePriority = chartView.stylePriority const viewSave = this.buildParam(chartView, true, 'chart', false, false) if (!viewSave) return viewEditSave(this.panelInfo.id, viewSave).then(() => { this.chart.title = this.chartTitleUpdate bus.$emit('aside-set-title', this.chart.title) }) - this.$store.commit('recordViewEdit', { - viewId: this.chart.id, - hasEdit: true + bus.$emit('view-in-cache', { + type: 'styleChange', + viewId: chartView.id, + viewInfo: view }) }) } @@ -339,7 +394,17 @@ export default { diff --git a/frontend/src/views/chart/components/normal/LabelNormal.vue b/frontend/src/views/chart/components/normal/LabelNormal.vue index 0ebe162b6a..08881845ae 100644 --- a/frontend/src/views/chart/components/normal/LabelNormal.vue +++ b/frontend/src/views/chart/components/normal/LabelNormal.vue @@ -11,7 +11,10 @@ style="cursor: default;display: block;" >
- +
- + {{ table.name }} @@ -396,6 +397,11 @@ export default { font-weight: 500; margin-right: 8px; color: var(--deTextPrimary, #1f2329); + display: inline-block; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + max-width: 50%; } .de-tag { diff --git a/frontend/src/views/system/log/FilterUser.vue b/frontend/src/views/system/log/FilterUser.vue index 512098c640..494e64d8b6 100644 --- a/frontend/src/views/system/log/FilterUser.vue +++ b/frontend/src/views/system/log/FilterUser.vue @@ -67,20 +67,19 @@
-
- + {{ $t("commons.reset") - }} - + {{ $t("commons.adv_search.search") - }} + }}