From 1a0d067d41cdcb224f89e7e02caca5292f5e48a0 Mon Sep 17 00:00:00 2001 From: "liu.shiyi" Date: Wed, 26 Jun 2024 16:38:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=B7=BB=E5=8A=A0echart=E6=A1=91=E5=9F=BA?= =?UTF-8?q?=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BasicComponents/Candlestick/setting.vue | 1 - .../packages/BasicComponents/Sankey/index.vue | 268 ++++++++++ .../BasicComponents/Sankey/setting.vue | 496 ++++++++++++++++++ .../BasicComponents/Sankey/settingConfig.js | 101 ++++ .../RightSetting/DataSetting.vue | 32 +- data-room-ui/packages/G2Plots/plotList.js | 3 +- 6 files changed, 898 insertions(+), 3 deletions(-) create mode 100644 data-room-ui/packages/BasicComponents/Sankey/index.vue create mode 100644 data-room-ui/packages/BasicComponents/Sankey/setting.vue create mode 100644 data-room-ui/packages/BasicComponents/Sankey/settingConfig.js diff --git a/data-room-ui/packages/BasicComponents/Candlestick/setting.vue b/data-room-ui/packages/BasicComponents/Candlestick/setting.vue index 8e8a0bf3..60c86563 100644 --- a/data-room-ui/packages/BasicComponents/Candlestick/setting.vue +++ b/data-room-ui/packages/BasicComponents/Candlestick/setting.vue @@ -349,7 +349,6 @@ import { predefineColors } from 'data-room-ui/js/utils/colorList' export default { name: 'BarSetting', components: { - ColorSelect, ColorPicker, PosWhSetting, SettingTitle, diff --git a/data-room-ui/packages/BasicComponents/Sankey/index.vue b/data-room-ui/packages/BasicComponents/Sankey/index.vue new file mode 100644 index 00000000..c7b42865 --- /dev/null +++ b/data-room-ui/packages/BasicComponents/Sankey/index.vue @@ -0,0 +1,268 @@ + + + + + diff --git a/data-room-ui/packages/BasicComponents/Sankey/setting.vue b/data-room-ui/packages/BasicComponents/Sankey/setting.vue new file mode 100644 index 00000000..0ce8885f --- /dev/null +++ b/data-room-ui/packages/BasicComponents/Sankey/setting.vue @@ -0,0 +1,496 @@ + + + + diff --git a/data-room-ui/packages/BasicComponents/Sankey/settingConfig.js b/data-room-ui/packages/BasicComponents/Sankey/settingConfig.js new file mode 100644 index 00000000..5180548a --- /dev/null +++ b/data-room-ui/packages/BasicComponents/Sankey/settingConfig.js @@ -0,0 +1,101 @@ +import { commonConfig, displayOption } from 'data-room-ui/js/config' +import Icon from 'data-room-ui/assets/images/bigScreenIcon/export' +import cloneDeep from 'lodash/cloneDeep' + +export const settingConfig = { + padding: [10, 10, 10, 10], + legend: false, + isGroup: true, + data: [], + color: '', + theme: 'dark', + displayOption: { + ...displayOption, + params: { + enable: true + }, + dimensionField: { + // 指标 + label: '起始节点', + enable: true, + multiple: false // 是否多选 + }, + metricField: { + label: '目标节点', // 维度/查询字段 + enable: true, + multiple: false // 是否多选 + }, + seriesField: { + // 系列 + label: '权重', + enable: true, + multiple: false // 是否多选 + } + } +} +const customConfig = { + type: 'sankey', + root: { + version: '2023071001', + contribution: false, + // 绕x轴旋转角度 + rotateX: 0, + // 绕y轴旋转角度 + rotateY: 0, + // 绕z轴旋转角度 + rotateZ: 0, + // 透视距离 + perspective: 0, + skewX: 0, + skewY: 0 + }, + customize: { + // 自定义样式 + normal: { + labelPosition: 'right', + labelColor: '#fff', + labelFontSize: 12, + labelFontWeight: 'bold', + itemBorderColor: '#aaa', + itemBorderWidth: 1, + itemBorderType: 'solid', + lineColor: 'gradient', + lineCurveness: 0.5 + }, + emphasis: { + labelPosition: 'right', + labelColor: '#fff', + labelFontSize: 12, + labelFontWeight: 'bold', + itemBorderColor: '#aaa', + itemBorderWidth: 1, + itemBorderType: 'solid', + lineColor: 'gradient', + lineCurveness: 0.5 + } + } +} + +export const dataConfig = { + ...commonConfig(customConfig) +} + +export const sankeyData = { + name: '桑基图', + title: '桑基图', + icon: Icon.getNameList()[18], + border: { type: '', titleHeight: 60, fontSize: 16, isTitle: true, padding: [0, 0, 0, 0] }, + className: + 'com.gccloud.dataroom.core.module.chart.components.ScreenCandlestickChart', + w: 450, + h: 320, + x: 0, + y: 0, + type: 'sankey', + option: { + ...cloneDeep(settingConfig) + }, + setting: undefined, // 右侧面板自定义配置 + dataHandler: {}, // 数据自定义处理js脚本 + ...cloneDeep(dataConfig) +} diff --git a/data-room-ui/packages/BigScreenDesign/RightSetting/DataSetting.vue b/data-room-ui/packages/BigScreenDesign/RightSetting/DataSetting.vue index 996a3331..c58091bf 100644 --- a/data-room-ui/packages/BigScreenDesign/RightSetting/DataSetting.vue +++ b/data-room-ui/packages/BigScreenDesign/RightSetting/DataSetting.vue @@ -129,7 +129,7 @@ class="data-form-item" > + + + + +
+
+ {{ field.comment !== "" ? field.comment : field.name }} +
+
+ {{ field.name }} +
+
+
+
+