From 7a56f172d2a004247147e85cca17a35d0233c825 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E4=B8=96=E6=9E=97?=
<463572181@qq.com>
Date: Mon, 27 Feb 2023 14:00:36 +0800
Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E7=BB=84=E4=BB=B6=E8=81=94=E5=8A=A8?=
=?UTF-8?q?=E6=A1=88=E4=BE=8B(=E6=9F=B1=E5=9B=BE=EF=BC=9A=E8=A7=A6?=
=?UTF-8?q?=E5=8F=91=E8=80=85+=E6=8E=A5=E6=94=B6=E8=80=85;=20=E6=8A=98?=
=?UTF-8?q?=E7=BA=BF=E5=9B=BE=EF=BC=9A=E8=A7=A6=E5=8F=91=E8=80=85+?=
=?UTF-8?q?=E6=8E=A5=E6=94=B6=E8=80=85;=20=E7=99=BE=E5=88=86=E6=AF=94?=
=?UTF-8?q?=E5=9B=BE=EF=BC=9A=E6=8E=A5=E6=94=B6=E8=80=85;=20)=202=E3=80=81?=
=?UTF-8?q?=E4=BF=9D=E5=AD=98=E3=80=81=E9=A2=84=E8=A7=88=E3=80=81=E6=92=A4?=
=?UTF-8?q?=E5=9B=9E=E6=8C=89=E9=92=AE=E5=8F=AF=E7=82=B9=E5=87=BB=E8=8C=83?=
=?UTF-8?q?=E5=9B=B4=E8=B0=83=E6=95=B4;=203=E3=80=81=E6=8B=96=E5=85=A5?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6=E9=85=8D=E7=BD=AE=E9=A1=B9=E5=AE=9A=E4=BD=8D?=
=?UTF-8?q?=E4=B8=8D=E5=87=86=E7=9A=84bug=E4=BF=AE=E5=A4=8D;=204=E3=80=81?=
=?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=9D=E5=A7=8B=E5=A4=A7=E5=B1=8F=E9=BB=98?=
=?UTF-8?q?=E8=AE=A4=E8=83=8C=E6=99=AF=E8=89=B2=E4=B8=8D=E7=94=9F=E6=95=88?=
=?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98;?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
report-ui/src/store/index.js | 4 +-
report-ui/src/store/modules/designer.js | 42 +++
.../designer/components/componentLinkage.vue | 290 ++++++++++++++++++
.../designer/components/dynamicForm.vue | 23 ++
.../bigscreenDesigner/designer/index.vue | 79 ++++-
.../designer/linkageLogic.js | 128 ++++++++
.../configure/barCharts/widget-barchart.js | 12 +
.../configure/lineCharts/widget-linechart.js | 12 +
.../percentCharts/widget-pie-percentage.js | 12 +
.../bigscreenDesigner/designer/tools/index.js | 7 +-
.../bigscreenDesigner/designer/tools/main.js | 6 +-
.../designer/widget/bar/widgetBarchart.vue | 27 +-
.../designer/widget/line/widgetLinechart.vue | 27 +-
.../percent/widgetPiePercentageChart.vue | 26 +-
.../designer/widget/temp.vue | 6 +-
.../designer/widget/widget.vue | 2 +-
.../views/bigscreenDesigner/viewer/index.vue | 11 +
17 files changed, 684 insertions(+), 30 deletions(-)
create mode 100644 report-ui/src/store/modules/designer.js
create mode 100644 report-ui/src/views/bigscreenDesigner/designer/components/componentLinkage.vue
create mode 100644 report-ui/src/views/bigscreenDesigner/designer/linkageLogic.js
diff --git a/report-ui/src/store/index.js b/report-ui/src/store/index.js
index f011f382..89cec40a 100644
--- a/report-ui/src/store/index.js
+++ b/report-ui/src/store/index.js
@@ -7,6 +7,7 @@ import app from './modules/app'
import user from './modules/user'
import cacheView from './modules/cachaView'
import help from './modules/help'
+import designer from './modules/designer'
Vue.use(Vuex)
@@ -18,7 +19,8 @@ const store = new Vuex.Store({
app,
user,
cacheView,
- help
+ help,
+ designer
},
state: { },
plugins: [initPlugin],
diff --git a/report-ui/src/store/modules/designer.js b/report-ui/src/store/modules/designer.js
new file mode 100644
index 00000000..ae275cac
--- /dev/null
+++ b/report-ui/src/store/modules/designer.js
@@ -0,0 +1,42 @@
+/*
+ * @Author: chengsl
+ * @Date: 2022-11-08 10:30:37
+ * @LastEditors: chengsl
+ * @LastEditTime: 2023-02-24 09:54:34
+ * @Description: 设计器公用变量
+ */
+
+const designer = {
+ state: {
+ allComponentLinkage: [], // 所有组件之间的联动配置
+ },
+
+ mutations: {
+ SET_ALL_COMPONENT_LINKAGE: (state, params) => {
+ var { index = -1, widgetId = '', linkageArr } = params
+ try {
+ console.log('params---', params)
+ linkageArr = linkageArr.map(item => {
+ const arr = item.widgetValue.split('-$-')
+ return {
+ originId: widgetId,
+ targetId: arr[0],
+ targetName: arr[1],
+ paramsConfig: item.paramsConfig
+ }
+ })
+ } catch (error) {
+ linkageArr = [] // 兼容异常错误导致页面加载不出来
+ }
+ state.allComponentLinkage[index] = {
+ index: +index,
+ widgetId,
+ linkageArr
+ }
+ }
+ },
+
+ actions: {}
+}
+
+export default designer
diff --git a/report-ui/src/views/bigscreenDesigner/designer/components/componentLinkage.vue b/report-ui/src/views/bigscreenDesigner/designer/components/componentLinkage.vue
new file mode 100644
index 00000000..44f25771
--- /dev/null
+++ b/report-ui/src/views/bigscreenDesigner/designer/components/componentLinkage.vue
@@ -0,0 +1,290 @@
+
+