From 5ae897a2d0203684b15d24b1745f78b2de559537 Mon Sep 17 00:00:00 2001 From: isqianming Date: Sat, 7 Aug 2021 12:35:57 +0800 Subject: [PATCH 01/47] =?UTF-8?q?=E5=A0=86=E5=8F=A0=E5=9B=BE=E5=89=8D?= =?UTF-8?q?=E7=BD=AE-=E5=BE=85=E4=BC=98=E5=8C=96=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- report-ui/src/mixins/queryform.js | 8 +- .../views/report/bigscreen/designer/tools.js | 629 ++++++++++++++++++ .../widget/bar/widgetBarStackChart.vue | 397 +++++++++++ .../report/bigscreen/designer/widget/temp.vue | 4 +- .../bigscreen/designer/widget/widget.vue | 5 +- 5 files changed, 1040 insertions(+), 3 deletions(-) create mode 100644 report-ui/src/views/report/bigscreen/designer/widget/bar/widgetBarStackChart.vue diff --git a/report-ui/src/mixins/queryform.js b/report-ui/src/mixins/queryform.js index c368c32b..d3447d6e 100644 --- a/report-ui/src/mixins/queryform.js +++ b/report-ui/src/mixins/queryform.js @@ -125,7 +125,9 @@ export default { return this.gaugeFn(params.chartProperties, data); } else if (chartType == "widget-text") { return this.widgettext(params.chartProperties, data) - } else { + } else if (chartType == "widget-barstack") { + return this.barStackFn(params.chartProperties, data) + }else{ return data } }, @@ -156,6 +158,10 @@ export default { ananysicData["xAxis"] = xAxisList; ananysicData["series"] = series; return ananysicData; + }, + //柱状堆叠图 + barStackFn(chartProperties, data){ + }, // 饼图、漏斗图 piechartFn(chartProperties, data) { diff --git a/report-ui/src/views/report/bigscreen/designer/tools.js b/report-ui/src/views/report/bigscreen/designer/tools.js index 3f6aaef9..f15b19e6 100644 --- a/report-ui/src/views/report/bigscreen/designer/tools.js +++ b/report-ui/src/views/report/bigscreen/designer/tools.js @@ -5665,6 +5665,635 @@ const widgetTools = [ ] } }, + { + code: 'widgetBarStackChart', + type: 'chart', + label: '柱状堆叠图', + icon: 'iconzhuzhuangtu', + options: { + // 配置 + setup: [ + { + type: 'el-input-text', + label: '图层名称', + name: 'layerName', + required: false, + placeholder: '', + value: '柱状堆叠图', + }, + { + type: 'el-switch', + label: '竖展示', + name: 'verticalShow', + required: false, + placeholder: '', + value: false, + }, + { + type: 'vue-color', + label: '背景颜色', + name: 'background', + required: false, + placeholder: '', + value: '' + }, + [ + { + name: '柱体设置', + list: [ + { + type: 'el-slider', + label: '最大宽度', + name: 'maxWidth', + required: false, + placeholder: '', + value: 10, + }, + { + type: 'el-slider', + label: '圆角', + name: 'radius', + require: false, + placeholder: '', + value: 5, + }, + { + type: 'el-slider', + label: '最小高度', + name: 'minHeight', + require: false, + placeholder: '', + value: 0, + }, + ], + }, + { + name: '标题设置', + list: [ + { + type: 'el-switch', + label: '标题', + name: 'isNoTitle', + required: false, + placeholder: '', + value: true, + }, + { + type: 'el-input-text', + label: '标题', + name: 'titleText', + required: false, + placeholder: '', + value: '', + }, + { + type: 'vue-color', + label: '字体颜色', + name: 'textColor', + required: false, + placeholder: '', + value: '#FFD700' + }, + { + type: 'el-select', + label: '字体粗细', + name: 'textFontWeight', + required: false, + placeholder: '', + selectOptions: [ + {code: 'normal', name: '正常'}, + {code: 'bold', name: '粗体'}, + {code: 'bolder', name: '特粗体'}, + {code: 'lighter', name: '细体'} + ], + value: 'normal' + }, + { + type: 'el-input-number', + label: '字体大小', + name: 'textFontSize', + required: false, + placeholder: '', + value: 20 + }, + { + type: 'el-select', + label: '字体位置', + name: 'textAlign', + required: false, + placeholder: '', + selectOptions: [ + {code: 'center', name: '居中'}, + {code: 'left', name: '左对齐'}, + {code: 'right', name: '右对齐'}, + ], + value: 'center' + }, + { + type: 'el-input-text', + label: '副标题', + name: 'subText', + required: false, + placeholder: '', + value: '' + }, + { + type: 'vue-color', + label: '字体颜色', + name: 'subTextColor', + required: false, + placeholder: '', + value: 'rgba(30, 144, 255, 1)' + }, + { + type: 'el-input-text', + label: '字体粗细', + name: 'subTextFontWeight', + required: false, + placeholder: '', + selectOptions: [ + {code: 'normal', name: '正常'}, + {code: 'bold', name: '粗体'}, + {code: 'bolder', name: '特粗体'}, + {code: 'lighter', name: '细体'} + ], + value: 'normal' + }, + { + type: 'el-input-number', + label: '字体大小', + name: 'subTextFontSize', + required: false, + placeholder: '', + value: 20 + }, + ], + }, + { + name: 'X轴设置', + list: [ + { + type: 'el-input-text', + label: '名称', + name: 'xName', + required: false, + placeholder: '', + value: '' + }, + { + type: 'el-switch', + label: '显示', + name: 'hideX', + required: false, + placeholder: '', + value: true, + }, + { + type: 'vue-color', + label: '坐标名颜色', + name: 'xNameColor', + required: false, + placeholder: '', + value: '#fff' + }, + { + type: 'el-input-number', + label: '字体大小', + name: 'xNameFontSize', + required: false, + placeholder: '', + value: 12 + }, + { + type: 'el-slider', + label: '文字角度', + name: 'textAngle', + required: false, + placeholder: '', + value: 0 + }, + { + type: 'el-input-number', + label: '文字间隔', + name: 'textInterval', + required: false, + placeholder: '', + value: '' + }, + { + type: 'el-switch', + label: '轴反转', + name: 'reversalX', + required: false, + placeholder: '', + value: false + }, + { + type: 'vue-color', + label: '颜色', + name: 'Xcolor', + required: false, + placeholder: '', + value: '#fff', + }, + { + type: 'el-input-number', + label: '字号', + name: 'fontSizeX', + required: false, + placeholder: '', + value: 12, + }, + { + type: 'vue-color', + label: '轴颜色', + name: 'lineColorX', + required: false, + placeholder: '', + value: '#fff', + }, + { + type: 'el-switch', + label: '分割线显示', + name: 'isShowSplitLineX', + require: false, + placeholder: '', + value: false, + }, + { + type: 'vue-color', + label: '分割线颜色', + name: 'splitLineColorX', + required: false, + placeholder: '', + value: '#fff', + + } + ], + }, + { + name: 'Y轴设置', + list: [ + { + type: 'el-input-text', + label: '名称', + name: 'textNameY', + require: false, + placeholder: '', + value: '' + }, + { + type: 'el-switch', + label: '显示', + name: 'isShowY', + require: false, + placeholder: '', + value: true, + }, + { + type: 'vue-color', + label: '坐标名颜色', + name: 'NameColorY', + required: false, + placeholder: '', + value: '#fff', + }, + { + type: 'el-input-number', + label: '字体大小', + name: 'NameFontSizeY', + required: false, + placeholder: '', + value: 12, + }, + { + type: 'el-switch', + label: '轴反转', + name: 'reversalY', + required: false, + placeholder: '', + value: false + }, + { + type: 'vue-color', + label: '颜色', + name: 'colorY', + required: false, + placeholder: '', + value: '#fff', + }, + { + type: 'el-input-number', + label: '字号', + name: 'fontSizeY', + required: false, + placeholder: '', + value: 12, + }, + { + type: 'vue-color', + label: '轴颜色', + name: 'lineColorY', + required: false, + placeholder: '', + value: '#fff', + }, { + type: 'el-switch', + label: '分割线显示', + name: 'isShowSplitLineY', + require: false, + placeholder: '', + value: false, + }, { + type: 'vue-color', + label: '分割线颜色', + name: 'splitLineColorY', + required: false, + placeholder: '', + value: '#fff', + + } + ], + }, + { + name: '数值设定', + list: [ + { + type: 'el-switch', + label: '显示', + name: 'isShow', + required: false, + placeholder: '', + value: false + }, + { + type: 'el-input-number', + label: '字体大小', + name: 'fontSize', + required: false, + placeholder: '', + value: 14 + }, + { + type: 'vue-color', + label: '字体颜色', + name: 'subTextColor', + required: false, + placeholder: '', + value: '#fff' + }, + { + type: 'el-select', + label: '字体粗细', + name: 'fontWeight', + required: false, + placeholder: '', + selectOptions: [ + {code: 'normal', name: '正常'}, + {code: 'bold', name: '粗体'}, + {code: 'bolder', name: '特粗体'}, + {code: 'lighter', name: '细体'} + ], + value: 'normal' + }, + ], + }, + { + name: '提示语设置', + list: [ + { + type: 'el-input-number', + label: '字体大小', + name: 'fontSize', + required: false, + placeholder: '', + }, + { + type: 'vue-color', + label: '字体颜色', + name: 'lineColor', + required: false, + placeholder: '', + }, + ], + }, + { + name: '坐标轴边距设置', + list: [ + { + type: 'el-slider', + label: '左边距(像素)', + name: 'marginLeft', + required: false, + placeholder: '', + value: 10, + }, { + type: 'el-slider', + label: '顶边距(像素)', + name: 'marginTop', + required: false, + placeholder: '', + value: 50, + }, { + type: 'el-slider', + label: '右边距(像素)', + name: 'marginRight', + required: false, + placeholder: '', + value: 40, + }, { + type: 'el-slider', + label: '底边距(像素)', + name: 'marginBottom', + required: false, + placeholder: '', + value: 10, + }, + ], + }, + { + name: '图例操作', + list: [ + { + type: 'el-switch', + label: '图例', + name: 'isShowLegend', + required: false, + placeholder: '', + value: true, + }, + { + type: 'vue-color', + label: '字体颜色', + name: 'lengedColor', + required: false, + placeholder: '', + value: '#fff', + }, + { + type: 'el-input-number', + label: '字体大小', + name: 'lengedFontSize', + required: false, + placeholder: '', + value: 16, + }, + { + type: 'el-input-number', + label: '图例宽度', + name: 'lengedWidth', + required: false, + placeholder: '', + value: 15, + }, + { + type: 'el-select', + label: '横向位置', + name: 'lateralPosition', + required: false, + placeholder: '', + selectOptions: [ + {code: 'left', name: '左对齐'}, + {code: 'right', name: '右对齐'}, + ], + value: '' + }, + { + type: 'el-select', + label: '纵向位置', + name: 'longitudinalPosition', + required: false, + placeholder: '', + selectOptions: [ + {code: 'top', name: '顶部'}, + {code: 'bottom', name: '底部'}, + ], + value: '' + }, + { + type: 'el-select', + label: '布局前置', + name: 'layoutFront', + required: false, + placeholder: '', + selectOptions: [ + {code: 'vertical', name: '竖排'}, + {code: 'horizontal', name: '横排'}, + ], + value: '' + }, + ], + }, + { + name: '自定义配色', + list: [ + { + type: 'customColor', + label: '', + name: 'customColor', + required: false, + value: [{color: '#ff7f50'}, {color: '#87cefa'}, {color: '#da70d6'}, {color: '#32cd32'}, {color: '#6495ed'}], + }, + ], + }, + ], + ], + // 数据 + data: [ + { + type: 'el-radio-group', + label: '数据类型', + name: 'dataType', + require: false, + placeholder: '', + selectValue: true, + selectOptions: [ + { + code: 'staticData', + name: '静态数据', + }, + { + code: 'dynamicData', + name: '动态数据', + }, + ], + value: 'staticData', + }, + { + type: 'el-input-number', + label: '刷新时间(毫秒)', + name: 'refreshTime', + relactiveDom: 'dataType', + relactiveDomValue: 'dynamicData', + value: 5000 + }, + { + type: 'el-button', + label: '静态数据', + name: 'staticData', + required: false, + placeholder: 'px', + relactiveDom: 'dataType', + relactiveDomValue: 'staticData', + value: [ + {"axis":"2021-07-25","name":"A","data":"12"}, + {"axis":"2021-07-25","name":"B","data":"20"}, + {"axis":"2021-07-26","name":"B","data":"5"}, + {"axis":"2021-07-26","name":"C","data":"20"}, + {"axis":"2021-07-27","name":"A","data":"15"}, + {"axis":"2021-07-27","name":"B","data":"30"}, + {"axis":"2021-07-27","name":"C","data":"5"} + ], + }, + { + type: 'dycustComponents', + label: '', + name: 'dynamicData', + required: false, + placeholder: 'px', + relactiveDom: 'dataType', + relactiveDomValue: 'dynamicData', + chartType: 'widget-barstack', + value: '', + }, + ], + // 坐标 + position: [ + { + type: 'el-input-number', + label: '左边距', + name: 'left', + required: false, + placeholder: 'px', + value: 0, + }, + { + type: 'el-input-number', + label: '上边距', + name: 'top', + required: false, + placeholder: 'px', + value: 0, + }, + { + type: 'el-input-number', + label: '宽度', + name: 'width', + required: false, + placeholder: '该容器在1920px大屏中的宽度', + value: 400, + }, + { + type: 'el-input-number', + label: '高度', + name: 'height', + required: false, + placeholder: '该容器在1080px大屏中的高度', + value: 200, + }, + ], + }, + }, ] const getToolByCode = function (code) { diff --git a/report-ui/src/views/report/bigscreen/designer/widget/bar/widgetBarStackChart.vue b/report-ui/src/views/report/bigscreen/designer/widget/bar/widgetBarStackChart.vue new file mode 100644 index 00000000..41eff3ec --- /dev/null +++ b/report-ui/src/views/report/bigscreen/designer/widget/bar/widgetBarStackChart.vue @@ -0,0 +1,397 @@ + + + + + diff --git a/report-ui/src/views/report/bigscreen/designer/widget/temp.vue b/report-ui/src/views/report/bigscreen/designer/widget/temp.vue index 819fc466..cd5b12ed 100644 --- a/report-ui/src/views/report/bigscreen/designer/widget/temp.vue +++ b/report-ui/src/views/report/bigscreen/designer/widget/temp.vue @@ -31,6 +31,7 @@ import widgetTable from "./widgetTable.vue"; import widgetMap from "./widgetMap.vue"; import widgetPiePercentageChart from "./pie/widgetPiePercentageChart"; import widgetAirBubbleMap from "./map/widgetAirBubbleMap"; +import widgetBarStackChart from "./bar/widgetBarStackChart"; export default { name: "WidgetTemp", components: { @@ -53,7 +54,8 @@ export default { widgetTable, widgetMap, widgetPiePercentageChart, - widgetAirBubbleMap + widgetAirBubbleMap, + widgetBarStackChart }, model: { prop: "value", diff --git a/report-ui/src/views/report/bigscreen/designer/widget/widget.vue b/report-ui/src/views/report/bigscreen/designer/widget/widget.vue index 890adae2..ef15fc23 100644 --- a/report-ui/src/views/report/bigscreen/designer/widget/widget.vue +++ b/report-ui/src/views/report/bigscreen/designer/widget/widget.vue @@ -41,6 +41,8 @@ import widgetTable from "./widgetTable.vue"; import widgetMap from "./widgetMap.vue"; import widgetPiePercentageChart from "./pie/widgetPiePercentageChart"; import widgetAirBubbleMap from "./map/widgetAirBubbleMap"; +import widgetBarStackChart from "./bar/widgetBarStackChart"; + export default { name: "Widget", components: { @@ -63,7 +65,8 @@ export default { widgetTable, widgetMap, widgetPiePercentageChart, - widgetAirBubbleMap + widgetAirBubbleMap, + widgetBarStackChart }, model: { prop: "value", From 9c4652e269ccd6f2c37f371f7efa7f7959c11232 Mon Sep 17 00:00:00 2001 From: isqianming Date: Wed, 11 Aug 2021 19:13:18 +0800 Subject: [PATCH 02/47] update --- .../src/views/report/bigscreen/designer/tools.js | 11 ++++++----- .../designer/widget/bar/widgetBarStackChart.vue | 13 +++++++------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/report-ui/src/views/report/bigscreen/designer/tools.js b/report-ui/src/views/report/bigscreen/designer/tools.js index f15b19e6..910dd7bb 100644 --- a/report-ui/src/views/report/bigscreen/designer/tools.js +++ b/report-ui/src/views/report/bigscreen/designer/tools.js @@ -6155,8 +6155,9 @@ const widgetTools = [ selectOptions: [ {code: 'left', name: '左对齐'}, {code: 'right', name: '右对齐'}, + //{code: 'mid', name: '居中'}, ], - value: '' + value: 'left' }, { type: 'el-select', @@ -6168,7 +6169,7 @@ const widgetTools = [ {code: 'top', name: '顶部'}, {code: 'bottom', name: '底部'}, ], - value: '' + value: 'top' }, { type: 'el-select', @@ -6180,11 +6181,11 @@ const widgetTools = [ {code: 'vertical', name: '竖排'}, {code: 'horizontal', name: '横排'}, ], - value: '' + value: 'horizontal' }, ], }, - { + /*{ name: '自定义配色', list: [ { @@ -6195,7 +6196,7 @@ const widgetTools = [ value: [{color: '#ff7f50'}, {color: '#87cefa'}, {color: '#da70d6'}, {color: '#32cd32'}, {color: '#6495ed'}], }, ], - }, + },*/ ], ], // 数据 diff --git a/report-ui/src/views/report/bigscreen/designer/widget/bar/widgetBarStackChart.vue b/report-ui/src/views/report/bigscreen/designer/widget/bar/widgetBarStackChart.vue index 41eff3ec..4413748e 100644 --- a/report-ui/src/views/report/bigscreen/designer/widget/bar/widgetBarStackChart.vue +++ b/report-ui/src/views/report/bigscreen/designer/widget/bar/widgetBarStackChart.vue @@ -94,16 +94,16 @@ export default { // 修改图标options属性 editorOptions() { this.setOptionsTitle(); - //this.setOptionsX(); - //this.setOptionsY(); + this.setOptionsX(); + this.setOptionsY(); this.setOptionsTop(); this.setOptionsTooltip(); this.setOptionsMargin(); - //this.setOptionsLegend(); + this.setOptionsLegend(); //this.setOptionsColor(); this.setOptionsData(); }, - // 标题修改 + // 标题修改 对应数据内容例如ABC等的调整 setOptionsTitle() { const optionsCollapse = this.optionsSetup; const title = {}; @@ -195,7 +195,7 @@ export default { }; this.options.yAxis = yAxis; }, - // 数值设定 or 柱体设置 + // 数值设定 or 柱体设置 数值设定字体大小,默认值没回显 setOptionsTop() { const optionsCollapse = this.optionsSetup; const series = this.options.series; @@ -303,7 +303,8 @@ export default { return newArr; }, //静态数据 - staticDataFn(val, optionsSetup) { + staticDataFn(val) { + const optionsSetup = this.optionsSetup; const series = this.options.series; let xAxisList = [] let yAxisList = [] From f2a45a605f4b3c0e409f6497f4e327937b050d87 Mon Sep 17 00:00:00 2001 From: isqianming Date: Thu, 12 Aug 2021 09:17:40 +0800 Subject: [PATCH 03/47] update --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 80aeb545..1233ba32 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ http://serverip:9095 ## 谁在使用 -希望你们的logo出现在此,[请点此Issue进行登记](https://gitee.com/anji-plus/report/issues/I3ZXT4)
+希望你们的logo出现在此,[请点此Issue进行登记](https://gitee.com/anji-plus/report/issues/I3ZXT4) ,我们将优先支持
@@ -128,6 +128,14 @@ http://serverip:9095 - 基础图表增加 - 现有图表功能修复/增加 +## 版本问题 +已知以下版本存在兼容性问题 +- Node.js V16 +- Jdk 11 +- Mysql 8.0 +- Windows 11 + + ## 技术支持 **如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues)
** From dc4cced74fd3c0887612cc6f329d32c52444a44c Mon Sep 17 00:00:00 2001 From: isqianming Date: Fri, 13 Aug 2021 11:22:14 +0800 Subject: [PATCH 04/47] update --- report-ui/src/mixins/queryform.js | 9 +++++---- report-ui/src/views/report/bigscreen/designer/tools.js | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/report-ui/src/mixins/queryform.js b/report-ui/src/mixins/queryform.js index d3447d6e..3ec8d289 100644 --- a/report-ui/src/mixins/queryform.js +++ b/report-ui/src/mixins/queryform.js @@ -109,6 +109,7 @@ export default { // widget-gauge 仪表盘 // widget-text 文本框 // widge-table 表格(数据不要转) + // widget-stackchart 堆叠图 const chartType = params.chartType if ( chartType == "widget-barchart" || @@ -125,8 +126,8 @@ export default { return this.gaugeFn(params.chartProperties, data); } else if (chartType == "widget-text") { return this.widgettext(params.chartProperties, data) - } else if (chartType == "widget-barstack") { - return this.barStackFn(params.chartProperties, data) + } else if (chartType == "widget-stackchart") { + return this.stackChartFn(params.chartProperties, data) }else{ return data } @@ -159,8 +160,8 @@ export default { ananysicData["series"] = series; return ananysicData; }, - //柱状堆叠图 - barStackFn(chartProperties, data){ + //堆叠图 + stackChartFn(chartProperties, data){ }, // 饼图、漏斗图 diff --git a/report-ui/src/views/report/bigscreen/designer/tools.js b/report-ui/src/views/report/bigscreen/designer/tools.js index 910dd7bb..451a373b 100644 --- a/report-ui/src/views/report/bigscreen/designer/tools.js +++ b/report-ui/src/views/report/bigscreen/designer/tools.js @@ -6254,7 +6254,7 @@ const widgetTools = [ placeholder: 'px', relactiveDom: 'dataType', relactiveDomValue: 'dynamicData', - chartType: 'widget-barstack', + chartType: 'widget-stackchart', value: '', }, ], From c98ddf8de6d548d4a9fdcd3fbdaf70f432067af6 Mon Sep 17 00:00:00 2001 From: qianlishi <1432731663@qq.com> Date: Mon, 16 Aug 2021 13:41:13 +0800 Subject: [PATCH 05/47] =?UTF-8?q?login=20=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- report-ui/src/utils/request.js | 2 +- report-ui/src/views/login.vue | 279 +++++++++++++++++---------------- 2 files changed, 144 insertions(+), 137 deletions(-) diff --git a/report-ui/src/utils/request.js b/report-ui/src/utils/request.js index 98fd24bc..77453695 100644 --- a/report-ui/src/utils/request.js +++ b/report-ui/src/utils/request.js @@ -49,7 +49,7 @@ service.interceptors.response.use( type: 'error', duration: 5 * 1000 }) - return Promise.reject('error') + return response.data } else { return response.data } diff --git a/report-ui/src/views/login.vue b/report-ui/src/views/login.vue index 56814d20..1f3e802a 100644 --- a/report-ui/src/views/login.vue +++ b/report-ui/src/views/login.vue @@ -8,20 +8,19 @@