diff --git a/backend/src/main/java/io/dataease/service/chart/util/ChartDataBuild.java b/backend/src/main/java/io/dataease/service/chart/util/ChartDataBuild.java index d2351a8a3e..7af383f8bd 100644 --- a/backend/src/main/java/io/dataease/service/chart/util/ChartDataBuild.java +++ b/backend/src/main/java/io/dataease/service/chart/util/ChartDataBuild.java @@ -158,12 +158,17 @@ public class ChartDataBuild { } catch (Exception e) { axisChartDataDTO.setValue(new BigDecimal(0)); } - if ("line".equals(view.getType()) && CollectionUtils.isEmpty(xAxisExt)) { - axisChartDataDTO.setCategory(yAxis.get(j).getName()); - } else { - axisChartDataDTO.setCategory(b.toString()); - } + axisChartDataDTO.setCategory(b.toString()); dataList.add(axisChartDataDTO); + + if ("line".equals(view.getType())) { + if (CollectionUtils.isEmpty(xAxisExt)){ + axisChartDataDTO.setCategory(yAxis.get(j).getName()); + } else { + // 多指标只取第一个 + break; + } + } } } map.put("data", dataList); diff --git a/frontend/src/components/canvas/components/Toolbar.vue b/frontend/src/components/canvas/components/Toolbar.vue index 1ab2995f04..994cbac5d7 100644 --- a/frontend/src/components/canvas/components/Toolbar.vue +++ b/frontend/src/components/canvas/components/Toolbar.vue @@ -294,7 +294,7 @@ export default { created() { eventBus.$on('editPanelInitReady', this.editPanelInit) eventBus.$on('preview', this.preview) - eventBus.$on('save', this.save) + eventBus.$on('checkAndSave', this.checkAndSave) eventBus.$on('clearCanvas', this.clearCanvas) this.scale = this.canvasStyleData.scale this.mobileLayoutInitStatus = this.mobileLayoutStatus @@ -303,13 +303,18 @@ export default { }, beforeDestroy() { eventBus.$off('preview', this.preview) - eventBus.$off('save', this.save) + eventBus.$off('checkAndSave', this.checkAndSave) eventBus.$off('clearCanvas', this.clearCanvas) eventBus.$off('editPanelInitReady', this.editPanelInit) clearInterval(this.timer) this.timer = null }, methods: { + checkAndSave() { + if (!this.saveButtonDisabled) { + this.save(false) + } + }, editPanelInit() { this.showGridSwitch = this.canvasStyleData.aidedDesign.showGrid }, diff --git a/frontend/src/components/canvas/components/editor/CanvasOptBar.vue b/frontend/src/components/canvas/components/editor/CanvasOptBar.vue index 0f174096c0..4aae7a12ad 100644 --- a/frontend/src/components/canvas/components/editor/CanvasOptBar.vue +++ b/frontend/src/components/canvas/components/editor/CanvasOptBar.vue @@ -8,6 +8,7 @@ v-if="isPublicLink" ref="widget-div" class="function-div" + :class="functionClass" > {{ $t('panel.remove_all_linkage') }} + >{{ $t('panel.remove_all_linkage') }} { @@ -142,13 +164,43 @@ export default { width: max-content; text-align: end; z-index: 999; - ::v-deep button:hover { - background-color: rgba(31, 35, 41, 0.1); - color: #1F2329; - font-weight: bold; - border-color: rgba(31, 35, 41, 0.1) + border-radius: 4px; + ::v-deep button { + border-radius: 0px; + } + } + .function-light { + background: #FFFFFF; + border: 1px solid #DEE0E3; + box-shadow: 0px 4px 8px rgb(31 35 41 / 10%); + ::v-deep button { + background-color: #FFFFFF; + box-shadow: 0px 4px 8px rgba(31, 35, 41, 0.1); + border: 1px solid #DEE0E3; + &:hover { + background-color: rgba(31, 35, 41, 0.1); + color: #1F2329; + font-weight: bold; + border-color: rgba(31, 35, 41, 0.1) + } + } + } + .function-dark { + background: #1A1A1A; + border: 1px solid #434343; + box-shadow: 0px 4px 8px rgba(26, 26, 26, 0.1); + ::v-deep button { + background-color: #1A1A1A; + border: 1px solid #434343; + box-shadow: 0px 4px 8px rgba(26, 26, 26, 0.1); + color: #FFFFFF; + &:hover { + background-color: rgba(235, 235, 235, 0.1); + color: #EBEBEB; + font-weight: bold; + border-color: rgba(235, 235, 235, 0.1); + } } - } &:hover { border-top: 60px solid rgba(245, 74, 69, 0);; diff --git a/frontend/src/components/canvas/components/editor/EditBar.vue b/frontend/src/components/canvas/components/editor/EditBar.vue index 6a4d7bd3c2..3f2c726998 100644 --- a/frontend/src/components/canvas/components/editor/EditBar.vue +++ b/frontend/src/components/canvas/components/editor/EditBar.vue @@ -193,6 +193,7 @@ import LinkJumpSet from '@/views/panel/linkJumpSet' import Background from '@/views/background/index' import MapLayerController from '@/views/chart/components/map/MapLayerController' import { uploadFileResult } from '@/api/staticResource/staticResource' +import eventBus from '@/components/canvas/utils/eventBus' export default { components: { Background, LinkJumpSet, FieldsList, SettingMenu, LinkageField, MapLayerController }, @@ -364,9 +365,16 @@ export default { this.initCurFields() if (this.element.type === 'view') { bus.$on('initCurFields-' + this.element.id, this.initCurFields) + eventBus.$on('viewEnlarge', this.viewEnlarge) } }, + beforeDestroy() { + eventBus.$off('preview', this.showViewDetails) + }, methods: { + viewEnlarge() { + this.showViewDetails('enlarge') + }, backgroundSetClose() { this.boardSetVisible = false }, diff --git a/frontend/src/components/canvas/components/editor/Preview.vue b/frontend/src/components/canvas/components/editor/Preview.vue index 770930e288..2aeb6fb1d5 100644 --- a/frontend/src/components/canvas/components/editor/Preview.vue +++ b/frontend/src/components/canvas/components/editor/Preview.vue @@ -11,6 +11,7 @@ >
{ + this.clearAllLinkage() this.searchCount++ }, refreshTime) } }, + clearAllLinkage() { + this.$store.commit('clearPanelLinkageInfo') + bus.$emit('clear_panel_linkage', { viewId: 'all' }) + }, changeStyleWithScale, getStyle, restore() { @@ -610,11 +616,16 @@ export default { const domId = this.canvasInfoTemp setTimeout(() => { this.exporting = true + this.backScreenShot = true + const scrollHeight = document.getElementById('preview-temp-canvas-main').scrollHeight + + document.getElementById('preview-canvas-main').style.height = (scrollHeight + 'px') setTimeout(() => { html2canvas(document.getElementById(domId)).then(canvas => { const snapshot = canvas.toDataURL('image/jpeg', 1) // 是图片质量 this.dataLoading = false this.exporting = false + this.backScreenShot = false if (snapshot !== '') { this.snapshotInfo = snapshot this.pdfExportShow = true diff --git a/frontend/src/components/canvas/components/editor/SettingMenu.vue b/frontend/src/components/canvas/components/editor/SettingMenu.vue index 56d30a4e9c..c1c1ac35bd 100644 --- a/frontend/src/components/canvas/components/editor/SettingMenu.vue +++ b/frontend/src/components/canvas/components/editor/SettingMenu.vue @@ -90,6 +90,13 @@ {{ $t('panel.hyperlinks') }} + + + {{ $t('panel.position_adjust') }} +
@@ -213,6 +220,9 @@ export default { this.showCustomSort = false }) }, + positionAdjust() { + bus.$emit('change_panel_right_draw', true) + }, edit() { if (this.curComponent.type === 'custom') { bus.$emit('component-dialog-edit', 'update') diff --git a/frontend/src/components/canvas/customComponent/UserView.vue b/frontend/src/components/canvas/customComponent/UserView.vue index cfedd58b54..2c5988c915 100644 --- a/frontend/src/components/canvas/customComponent/UserView.vue +++ b/frontend/src/components/canvas/customComponent/UserView.vue @@ -585,6 +585,9 @@ export default { updateParams['customAttr'] = this.sourceCustomAttrStr } else if (param.custom === 'customStyle') { const sourceCustomStyle = JSON.parse(this.sourceCustomStyleStr) + if (param.property === 'margin') { + sourceCustomStyle[param.property] = param.value + } sourceCustomStyle[param.property][param.value.modifyName] = param.value[param.value.modifyName] this.sourceCustomStyleStr = JSON.stringify(sourceCustomStyle) this.chart.customStyle = this.sourceCustomStyleStr diff --git a/frontend/src/components/canvas/utils/shortcutKey.js b/frontend/src/components/canvas/utils/shortcutKey.js index 2c1cba10e6..3e1dd16b7f 100644 --- a/frontend/src/components/canvas/utils/shortcutKey.js +++ b/frontend/src/components/canvas/utils/shortcutKey.js @@ -1,4 +1,5 @@ import store from '@/store' +import eventBus from '@/components/canvas/utils/eventBus' const ctrlKey = 17 const commandKey = 91 // mac command @@ -15,8 +16,13 @@ const bKey = 66 // 拆分 const lKey = 76 // 锁定 const dKey = 68 // 删除 + const deleteKey = 46 // 删除 +const sKey = 83 // 保存 + +const enlargeKey = 190 // command + . + export const keycodes = [66, 67, 68, 69, 71, 76, 80, 83, 85, 86, 88, 89, 90] // 与组件状态无关的操作 @@ -35,10 +41,13 @@ const unlockMap = { [bKey]: decompose, [dKey]: deleteComponent, [deleteKey]: deleteComponent, - [lKey]: lock + [lKey]: lock, + [sKey]: save, + [enlargeKey]: viewEnlarge } let isCtrlOrCommandDown = false + // Monitor key operations globally and execute corresponding commands export function listenGlobalKeyDown() { window.onkeydown = (e) => { @@ -47,7 +56,7 @@ export function listenGlobalKeyDown() { if (keyCode === ctrlKey || keyCode === commandKey) { isCtrlOrCommandDown = true } else if (isCtrlOrCommandDown) { - if (keyCode === zKey || keyCode === yKey) { + if (keyCode === zKey || keyCode === yKey || keyCode === vKey || keyCode === cKey || keyCode === sKey || keyCode === enlargeKey) { e.preventDefault() unlockMap[keyCode]() } @@ -107,3 +116,11 @@ function deleteComponent() { function lock() { store.commit('lock') } + +function save() { + eventBus.$emit('checkAndSave') +} + +function viewEnlarge() { + eventBus.$emit('viewEnlarge') +} diff --git a/frontend/src/icons/svg/link-back.svg b/frontend/src/icons/svg/link-back.svg index 1d1352fe5d..88339b6c3a 100644 --- a/frontend/src/icons/svg/link-back.svg +++ b/frontend/src/icons/svg/link-back.svg @@ -1,4 +1 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/frontend/src/icons/svg/link-down.svg b/frontend/src/icons/svg/link-down.svg index 90a6a5bda1..f0aaca266a 100644 --- a/frontend/src/icons/svg/link-down.svg +++ b/frontend/src/icons/svg/link-down.svg @@ -1,4 +1 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 7416bd843a..27593a9bfa 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -1447,7 +1447,11 @@ export default { total_sort_none: 'None', total_sort_asc: 'ASC', total_sort_desc: 'DESC', - total_sort_field: 'Sort Field' + total_sort_field: 'Sort Field', + empty_data_strategy: 'Empty Data Strategy', + break_line: 'Disconnection', + set_zero: 'Set Zero', + ignore_data: 'Ignore Data' }, dataset: { spend_time: 'Spend', @@ -1872,6 +1876,11 @@ export default { back_parent: 'Back to previous' }, panel: { + position_adjust: 'Position', + space_top: 'Top', + space_left: 'Left', + space_width: 'Widht', + space_height: 'Height', to_top: 'To Top', down: 'Down', mobile_style_setting: 'Style setting', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index c62f20507e..bf544b33f0 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -1447,7 +1447,11 @@ export default { total_sort_none: '無', total_sort_asc: '升序', total_sort_desc: '降序', - total_sort_field: '排序字段' + total_sort_field: '排序字段', + empty_data_strategy: '空值處理', + break_line: '線條斷開', + set_zero: '置為0,線條不斷開', + ignore_data: '跳過空值,不展示' }, dataset: { spend_time: '耗時', @@ -1872,6 +1876,11 @@ export default { back_parent: '返回上一級' }, panel: { + position_adjust: '位置', + space_top: '上', + space_left: '左', + space_width: '寬', + space_height: '高', to_top: '置頂', down: '下載', mobile_style_setting: '樣式設置', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index d36c92ed67..f7514d1000 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -1446,7 +1446,11 @@ export default { total_sort_none: '无', total_sort_asc: '升序', total_sort_desc: '降序', - total_sort_field: '排序字段' + total_sort_field: '排序字段', + empty_data_strategy: '空值处理', + break_line: '线条断开', + set_zero: '置为0,线条不断开', + ignore_data: '跳过空值,不展示' }, dataset: { spend_time: '耗时', @@ -1872,6 +1876,11 @@ export default { back_parent: '返回上一级' }, panel: { + position_adjust: '位置', + space_top: '上', + space_left: '左', + space_width: '宽', + space_height: '高', to_top: '置顶', down: '下载', mobile_style_setting: '样式设置', diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index f03e066752..64cbee8318 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -22,12 +22,10 @@ import layer from '@/components/canvas/store/layer' import snapshot from '@/components/canvas/store/snapshot' import lock from '@/components/canvas/store/lock' import task from './modules/task' -import { valueValid, formatCondition } from '@/utils/conditionUtil' +import { formatCondition, valueValid } from '@/utils/conditionUtil' import { Condition } from '@/components/widget/bean/Condition' -import { - DEFAULT_COMMON_CANVAS_STYLE_STRING -} from '@/views/panel/panel' +import { DEFAULT_COMMON_CANVAS_STYLE_STRING } from '@/views/panel/panel' import bus from '@/utils/bus' import { BASE_MOBILE_STYLE } from '@/components/canvas/customComponent/component-list' import { TYPE_CONFIGS } from '@/views/chart/chart/util' @@ -236,10 +234,10 @@ const data = { setShapeStyle({ curComponent, canvasStyleData, curCanvasScaleMap }, { top, left, width, height, rotate }) { const curCanvasScaleSelf = curCanvasScaleMap[curComponent.canvasId] if (curComponent) { - if (top || top === 0) curComponent.style.top = (top / curCanvasScaleSelf.scalePointHeight) + 0.0000001 - if (left || left === 0) curComponent.style.left = (left / curCanvasScaleSelf.scalePointWidth) + 0.0000001 - if (width || width === 0) curComponent.style.width = (width / curCanvasScaleSelf.scalePointWidth + 0.0000001) - if (height || height === 0) curComponent.style.height = (height / curCanvasScaleSelf.scalePointHeight) + 0.0000001 + if (top || top === 0) curComponent.style.top = Math.round((top / curCanvasScaleSelf.scalePointHeight)) + if (left || left === 0) curComponent.style.left = Math.round((left / curCanvasScaleSelf.scalePointWidth)) + if (width || width === 0) curComponent.style.width = Math.round((width / curCanvasScaleSelf.scalePointWidth)) + if (height || height === 0) curComponent.style.height = Math.round((height / curCanvasScaleSelf.scalePointHeight)) if (rotate || rotate === 0) curComponent.style.rotate = rotate } }, diff --git a/frontend/src/views/chart/chart/chart.js b/frontend/src/views/chart/chart/chart.js index c9c81595cc..25e805936d 100644 --- a/frontend/src/views/chart/chart/chart.js +++ b/frontend/src/views/chart/chart/chart.js @@ -439,7 +439,8 @@ export const DEFAULT_FUNCTION_CFG = { sliderRange: [0, 10], sliderBg: '#FFFFFF', sliderFillBg: '#BCD6F1', - sliderTextClolor: '#999999' + sliderTextClolor: '#999999', + emptyDataStrategy: 'breakLine' } export const DEFAULT_THRESHOLD = { gaugeThreshold: '', diff --git a/frontend/src/views/chart/chart/line/line_antv.js b/frontend/src/views/chart/chart/line/line_antv.js index fa6f38bf52..d1a9c93948 100644 --- a/frontend/src/views/chart/chart/line/line_antv.js +++ b/frontend/src/views/chart/chart/line/line_antv.js @@ -10,7 +10,8 @@ import { getSlider, getAnalyse } from '@/views/chart/chart/common/common_antv' -import { antVCustomColor } from '@/views/chart/chart/util' +import { antVCustomColor, handleEmptyDataStrategy } from '@/views/chart/chart/util' +import _ from 'lodash' export function baseLineOptionAntV(plot, container, chart, action) { // theme @@ -23,7 +24,7 @@ export function baseLineOptionAntV(plot, container, chart, action) { const xAxis = getXAxis(chart) const yAxis = getYAxis(chart) // data - const data = chart.data.data + const data = _.cloneDeep(chart.data.data) // config const slider = getSlider(chart) const analyse = getAnalyse(chart) @@ -87,7 +88,8 @@ export function baseLineOptionAntV(plot, container, chart, action) { } // custom color options.color = antVCustomColor(chart) - + const emptyDataStrategy = chart.senior ? JSON.parse(chart.senior)?.functionCfg.emptyDataStrategy : 'breakLine' + handleEmptyDataStrategy(emptyDataStrategy, chart, data, options) // 开始渲染 if (plot) { plot.destroy() diff --git a/frontend/src/views/chart/chart/map/map.js b/frontend/src/views/chart/chart/map/map.js index 2675295976..fbc331b0cb 100644 --- a/frontend/src/views/chart/chart/map/map.js +++ b/frontend/src/views/chart/chart/map/map.js @@ -37,7 +37,7 @@ const fillGradientColor = (data, colors) => { }) return data } -export function baseMapOption(chart_option, chart, themeStyle, curAreaCode) { +export function baseMapOption(chart_option, chart, themeStyle, curAreaCode, seriesId) { // 处理shape attr let customAttr = {} let isGradient = false @@ -45,7 +45,7 @@ export function baseMapOption(chart_option, chart, themeStyle, curAreaCode) { if (chart.customAttr) { customAttr = JSON.parse(chart.customAttr) if (chart.yaxis && chart.yaxis.length > 1) { - let currentSeriesId = customAttr.currentSeriesId + let currentSeriesId = seriesId const yAxis = JSON.parse(chart.yaxis) if (!currentSeriesId || !yAxis.some(item => item.id === currentSeriesId)) { currentSeriesId = yAxis[0].id diff --git a/frontend/src/views/chart/chart/util.js b/frontend/src/views/chart/chart/util.js index 6a0593eed8..00084eace9 100644 --- a/frontend/src/views/chart/chart/util.js +++ b/frontend/src/views/chart/chart/util.js @@ -3323,3 +3323,120 @@ export function getRemark(chart) { } export const quotaViews = ['label', 'richTextView', 'text', 'gauge', 'liquid'] + +export function handleEmptyDataStrategy(strategy, chart, data, options) { + if (!data?.length) { + return + } + if (strategy === 'ignoreData') { + handleIgnoreData(chart, data) + return + } + const yaxis = JSON.parse(chart.yaxis) + const extAxis = JSON.parse(chart.xaxisExt) + const multiDimension = yaxis?.length >= 2 || extAxis?.length > 0 + switch (strategy) { + case 'breakLine': { + if (multiDimension) { + // 多维度线条断开 + handleBreakLineMultiDimension(chart, data, options) + } else { + // 单维度线条断开 + options.connectNulls = false + } + break + } + case 'setZero': { + if (multiDimension > 0) { + // 多维度置0 + handleSetZeroMultiDimension(chart, data, options) + } else { + // 单维度置0 + handleSetZeroSingleDimension(chart, data, options) + } + break + } + default: + break + } +} + +function handleBreakLineMultiDimension(chart, data, options) { + options.connectNulls = false + const dimensionInfoMap = new Map() + const subDimensionSet = new Set() + for (let i = 0; i < data.length; i++) { + const item = data[i] + const dimensionInfo = dimensionInfoMap.get(item.field) + if (dimensionInfo) { + dimensionInfo.set.add(item.category) + } else { + dimensionInfoMap.set(item.field, { set: new Set([item.category]), index: i }) + } + subDimensionSet.add(item.category) + } + // Map 是按照插入顺序排序的,所以插入索引往后推 + let insertCount = 0 + dimensionInfoMap.forEach((dimensionInfo, field) => { + if (dimensionInfo.set.size < subDimensionSet.size) { + const toBeFillDimension = [...subDimensionSet].filter(item => !dimensionInfo.set.has(item)) + toBeFillDimension.forEach(dimension => { + data.splice(dimensionInfo.index + insertCount, 0, { + field, + value: null, + category: dimension + }) + }) + insertCount += toBeFillDimension.size + } + }) +} + +function handleSetZeroMultiDimension(chart, data) { + const dimensionInfoMap = new Map() + const subDimensionSet = new Set() + for (let i = 0; i < data.length; i++) { + const item = data[i] + if (item.value === null) { + item.value = 0 + } + const dimensionInfo = dimensionInfoMap.get(item.field) + if (dimensionInfo) { + dimensionInfo.set.add(item.category) + } else { + dimensionInfoMap.set(item.field, { set: new Set([item.category]), index: i }) + } + subDimensionSet.add(item.category) + } + let insertCount = 0 + dimensionInfoMap.forEach((dimensionInfo, field) => { + if (dimensionInfo.set.size < subDimensionSet.size) { + const toBeFillDimension = [...subDimensionSet].filter(item => !dimensionInfo.set.has(item)) + toBeFillDimension.forEach(dimension => { + data.splice(dimensionInfo.index + insertCount, 0, { + field, + value: 0, + category: dimension + }) + }) + insertCount += toBeFillDimension.size + } + }) +} + +function handleSetZeroSingleDimension(chart, data) { + data.forEach(item => { + if (item.value === null) { + item.value = 0 + } + }) +} + +function handleIgnoreData(chart, data) { + for (let i = data.length - 1; i >= 0; i--) { + const item = data[i] + if (item.value === null) { + data.splice(i, 1) + } + } +} diff --git a/frontend/src/views/chart/components/ChartComponent.vue b/frontend/src/views/chart/components/ChartComponent.vue index 89862e73df..1c8cedf253 100644 --- a/frontend/src/views/chart/components/ChartComponent.vue +++ b/frontend/src/views/chart/components/ChartComponent.vue @@ -119,7 +119,8 @@ export default { linkageActiveParam: null, buttonTextColor: null, loading: true, - showSuspension: true + showSuspension: true, + currentSeriesId: null } }, @@ -132,6 +133,11 @@ export default { ]) }, watch: { + currentSeriesId(value, old) { + if (value !== old) { + this.preDraw() + } + }, chart: { handler(newVal, oldVla) { this.preDraw() @@ -171,9 +177,7 @@ export default { if (id !== this.chart.id) { return } - const customAttr = JSON.parse(this.chart.customAttr) - customAttr.currentSeriesId = seriesId - this.chart.customAttr = JSON.stringify(customAttr) + this.currentSeriesId = seriesId }, reDrawView() { this.myChart.dispatchAction({ @@ -366,7 +370,7 @@ export default { this.buttonTextColor = null } } - const chart_option = baseMapOption(base_json, chart, this.buttonTextColor, curAreaCode) + const chart_option = baseMapOption(base_json, chart, this.buttonTextColor, curAreaCode, this.currentSeriesId) this.myEcharts(chart_option) const opt = this.myChart.getOption() if (opt && opt.series) { diff --git a/frontend/src/views/chart/components/map/MapController.vue b/frontend/src/views/chart/components/map/MapController.vue index 706abe3663..2f877ceae4 100644 --- a/frontend/src/views/chart/components/map/MapController.vue +++ b/frontend/src/views/chart/components/map/MapController.vue @@ -79,10 +79,19 @@ export default { this.chart.customAttr = JSON.stringify(this.customAttr) }, callParent(methodName, param) { - this.$emit(methodName, param) + this.$emit(this.toLowerLine(methodName), param) }, init() { + }, + toLowerLine(str) { + var temp = str.replace(/[A-Z]/g, function(match) { + return '-' + match.toLowerCase() + }) + if (temp.slice(0, 1) === '-') { + temp = temp.slice(1) + } + return temp } } } diff --git a/frontend/src/views/chart/components/senior/FunctionCfg.vue b/frontend/src/views/chart/components/senior/FunctionCfg.vue index 4c76c7159a..4fe2252ca1 100644 --- a/frontend/src/views/chart/components/senior/FunctionCfg.vue +++ b/frontend/src/views/chart/components/senior/FunctionCfg.vue @@ -67,6 +67,20 @@ @change="changeFunctionCfg" /> + + + {{ $t('chart.break_line') }} + {{ $t('chart.set_zero') }} + {{ $t('chart.ignore_data') }} + + @@ -110,7 +124,7 @@ export default { senior = JSON.parse(chart.senior) } if (senior.functionCfg) { - this.functionForm = senior.functionCfg + this.functionForm = { ...DEFAULT_FUNCTION_CFG, ...senior.functionCfg } } else { this.functionForm = JSON.parse(JSON.stringify(DEFAULT_FUNCTION_CFG)) } @@ -123,7 +137,7 @@ export default { } - diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index ae3f8df8fe..30ac660e0c 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -74,7 +74,9 @@ round @click="changeDs" > - {{ $t('panel.template_view_tips') }} + {{ $t('panel.template_view_tips') }}
@@ -1107,6 +1109,16 @@ + + + + {{ $t('chart.cancel') }} + >{{ $t('chart.cancel') }} + {{ $t('chart.confirm') }} + >{{ $t('chart.confirm') }} + @@ -1262,12 +1276,14 @@ {{ $t('chart.cancel') }} + >{{ $t('chart.cancel') }} + {{ $t('chart.confirm') }} + >{{ $t('chart.confirm') }} + {{ $t('chart.cancel') }} + >{{ $t('chart.cancel') }} + {{ $t('chart.confirm') }} + >{{ $t('chart.confirm') }} + {{ $t('chart.cancel') }} + >{{ $t('chart.cancel') }} + {{ $t('chart.confirm') }} + >{{ $t('chart.confirm') }} + @@ -1346,7 +1366,8 @@ {{ $t('chart.cancel') }} + >{{ $t('chart.cancel') }} + {{ $t('chart.close') }} + >{{ $t('chart.close') }} + @@ -1411,7 +1433,8 @@ size="mini" style="float: right;" @click="closeEditChartField" - >{{ $t('chart.close') }} + >{{ $t('chart.close') }} + @@ -1436,12 +1459,14 @@ {{ $t('chart.cancel') }} + >{{ $t('chart.cancel') }} + {{ $t('chart.confirm') }} + >{{ $t('chart.confirm') }} + @@ -1466,12 +1491,14 @@ {{ $t('chart.cancel') }} + >{{ $t('chart.cancel') }} + {{ $t('chart.confirm') }} + >{{ $t('chart.confirm') }} + @@ -1498,12 +1525,14 @@ {{ $t('chart.cancel') }} + >{{ $t('chart.cancel') }} + {{ $t('chart.confirm') }} + >{{ $t('chart.confirm') }} + @@ -1530,12 +1559,14 @@ {{ $t('chart.cancel') }} + >{{ $t('chart.cancel') }} + {{ $t('chart.confirm') }} + >{{ $t('chart.confirm') }} + @@ -1562,10 +1593,11 @@ - diff --git a/frontend/src/views/login/index.vue b/frontend/src/views/login/index.vue index 3dd8fda949..c577ca6809 100644 --- a/frontend/src/views/login/index.vue +++ b/frontend/src/views/login/index.vue @@ -259,10 +259,10 @@ export default { return this.$store.state.user.loginMsg }, qrTypes() { - return this.loginTypes && this.loginTypes.filter(item => item > 3 && item < 8) || [] + return this.loginTypes && this.loginTypes.filter(item => item > 3 && item < 7) || [] }, radioTypes() { - return this.loginTypes && this.loginTypes.filter(item => item < 4 || item > 7) || [] + return this.loginTypes && this.loginTypes.filter(item => item < 4 || item > 6) || [] } }, watch: { diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 5d4f1914a5..1634189267 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -283,11 +283,10 @@ @click="changeRightDrawOpen(false)" /> + {{ $t('panel.position_adjust') }} -
- {{ $t('panel.select_view') }} -
+
@@ -526,10 +525,12 @@ import DeCanvas from '@/components/canvas/DeCanvas' import TextAttr from '@/components/canvas/components/TextAttr' import { userLoginInfo } from '@/api/systemInfo/userLogin' import { activeWatermark } from '@/components/canvas/tools/watermark' +import PositionAdjust from '@/views/chart/view/PositionAdjust' export default { name: 'PanelEdit', components: { + PositionAdjust, TextAttr, DeCanvas, Multiplexing, diff --git a/frontend/src/views/panel/export/PDFPreExport.vue b/frontend/src/views/panel/export/PDFPreExport.vue index 586b653d0a..8d2c54076c 100644 --- a/frontend/src/views/panel/export/PDFPreExport.vue +++ b/frontend/src/views/panel/export/PDFPreExport.vue @@ -117,7 +117,7 @@ export default { initContent() { this.templateContentChange = this.templateContent for (const [key, value] of Object.entries(this.varsInfo)) { - this.templateContentChange = pdfTemplateReplaceAll(this.templateContentChange, key, value) + this.templateContentChange = pdfTemplateReplaceAll(this.templateContentChange, key, value || '') } },