From fe08b9392c5dc0d9b5931c193805ee9593b4006c Mon Sep 17 00:00:00 2001 From: qianming Date: Wed, 3 Nov 2021 15:35:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=B1=E7=BA=BF=E5=9B=BE=E8=B0=83=E6=95=B4?= =?UTF-8?q?=EF=BC=8C=E5=8E=BB=E6=8E=89=E5=9B=BE=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- report-ui/src/mixins/queryform.js | 2 +- .../tools/echartsConfigJson/widget-barlinechart.js | 13 +++++++------ .../designer/widget/widgetBarlinechart.vue | 14 ++++++-------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/report-ui/src/mixins/queryform.js b/report-ui/src/mixins/queryform.js index 4107c1f8..62d8273d 100644 --- a/report-ui/src/mixins/queryform.js +++ b/report-ui/src/mixins/queryform.js @@ -129,7 +129,7 @@ export default { return data } }, - // 柱状图、折线图、折柱图 + // 柱状图、折线图、柱线图 barOrLineChartFn(chartProperties, data) { const ananysicData = {}; const xAxisList = []; diff --git a/report-ui/src/views/report/bigscreen/designer/tools/echartsConfigJson/widget-barlinechart.js b/report-ui/src/views/report/bigscreen/designer/tools/echartsConfigJson/widget-barlinechart.js index 1e8ec2db..a743eeb4 100644 --- a/report-ui/src/views/report/bigscreen/designer/tools/echartsConfigJson/widget-barlinechart.js +++ b/report-ui/src/views/report/bigscreen/designer/tools/echartsConfigJson/widget-barlinechart.js @@ -1,5 +1,5 @@ /* - * @Descripttion: 主线图 + * @Descripttion: 柱线图 * @version: * @Author: qianlishi * @Date: 2021-08-29 07:26:48 @@ -595,7 +595,7 @@ export const widgetBarlinechart = { list: [ { type: 'el-switch', - label: '图例', + label: '显示', name: 'isShowLegend', required: false, placeholder: '', @@ -610,7 +610,7 @@ export const widgetBarlinechart = { value: '#fff', }, { - type: 'el-input-text', + type: 'el-input-number', label: '字体大小', name: 'lengedFontSize', required: false, @@ -632,10 +632,11 @@ export const widgetBarlinechart = { required: false, placeholder: '', selectOptions: [ + {code: 'center', name: '居中'}, {code: 'left', name: '左对齐'}, {code: 'right', name: '右对齐'}, ], - value: '' + value: 'center' }, { type: 'el-select', @@ -647,7 +648,7 @@ export const widgetBarlinechart = { {code: 'top', name: '顶部'}, {code: 'bottom', name: '底部'}, ], - value: '' + value: 'top' }, { type: 'el-select', @@ -659,7 +660,7 @@ export const widgetBarlinechart = { {code: 'vertical', name: '竖排'}, {code: 'horizontal', name: '横排'}, ], - value: '' + value: 'horizontal' }, ], }, diff --git a/report-ui/src/views/report/bigscreen/designer/widget/widgetBarlinechart.vue b/report-ui/src/views/report/bigscreen/designer/widget/widgetBarlinechart.vue index a45bb19a..2102e0ba 100644 --- a/report-ui/src/views/report/bigscreen/designer/widget/widgetBarlinechart.vue +++ b/report-ui/src/views/report/bigscreen/designer/widget/widgetBarlinechart.vue @@ -31,7 +31,6 @@ export default { textStyle: { color: "#fff" }, - data: ["货运量", "货运总量"] }, xAxis: [ { @@ -139,7 +138,7 @@ export default { this.setOptionsTooltip(); this.setOptionsData(); this.setOptionsMargin(); - this.setOptionsLegend(); + //this.setOptionsLegend(); this.setOptionsColor(); }, // 标题修改 @@ -341,23 +340,23 @@ export default { }; this.options.grid = grid; }, - // 图例操作 legend +/* // 图例操作 legend setOptionsLegend() { const optionsCollapse = this.optionsSetup; const legend = this.options.legend; legend.show = optionsCollapse.isShowLegend; - legend.left = optionsCollapse.lateralPosition == "left" ? 0 : "auto"; - legend.right = optionsCollapse.lateralPosition == "right" ? 0 : "auto"; + legend.left = optionsCollapse.lateralPosition; legend.top = optionsCollapse.longitudinalPosition == "top" ? 0 : "auto"; legend.bottom = optionsCollapse.longitudinalPosition == "bottom" ? 0 : "auto"; legend.orient = optionsCollapse.layoutFront; legend.textStyle = { color: optionsCollapse.lengedColor, - fontSize: optionsCollapse.fontSize + fontSize: optionsCollapse.lengedFontSize }; legend.itemWidth = optionsCollapse.lengedWidth; - }, + console.log(legend); + },*/ // 图例颜色修改 setOptionsColor() { const optionsCollapse = this.optionsSetup; @@ -373,7 +372,6 @@ export default { // 数据处理 setOptionsData() { const optionsData = this.optionsData; // 数据类型 静态 or 动态 - console.log(optionsData); optionsData.dataType == "staticData" ? this.staticDataFn(optionsData.staticData) : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);