From 2d7ad3224b123ee597a7cdc6354439710ee81b73 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Thu, 1 Apr 2021 17:40:12 +0800
Subject: [PATCH] =?UTF-8?q?feat:=E7=94=BB=E5=B8=83=E5=88=87=E6=8D=A2?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../canvas/components/Editor/ContextMenu.vue | 166 +++++++++---------
.../canvas/components/Editor/Shape.vue | 21 +++
.../components/canvas/components/Toolbar.vue | 11 ++
frontend/src/views/panel/edit/index.vue | 4 +-
frontend/src/views/panel/index.vue | 78 +++-----
.../src/views/panel/list/ChartViewEdit.vue | 156 ++++++++++++++++
frontend/src/views/panel/list/PanelList.vue | 2 +-
frontend/src/views/panel/list/PanelMain.vue | 68 +++++++
8 files changed, 373 insertions(+), 133 deletions(-)
create mode 100644 frontend/src/views/panel/list/ChartViewEdit.vue
create mode 100644 frontend/src/views/panel/list/PanelMain.vue
diff --git a/frontend/src/components/canvas/components/Editor/ContextMenu.vue b/frontend/src/components/canvas/components/Editor/ContextMenu.vue
index fc875e497e..f2394163c4 100644
--- a/frontend/src/components/canvas/components/Editor/ContextMenu.vue
+++ b/frontend/src/components/canvas/components/Editor/ContextMenu.vue
@@ -1,92 +1,96 @@
-
+
@@ -123,4 +127,4 @@ export default {
}
}
}
-
\ No newline at end of file
+
diff --git a/frontend/src/components/canvas/components/Editor/Shape.vue b/frontend/src/components/canvas/components/Editor/Shape.vue
index 3d2cfc2c35..c2ebc6bc61 100644
--- a/frontend/src/components/canvas/components/Editor/Shape.vue
+++ b/frontend/src/components/canvas/components/Editor/Shape.vue
@@ -2,6 +2,14 @@
+
+
+
+
+
+
+
+
diff --git a/frontend/src/components/canvas/components/Toolbar.vue b/frontend/src/components/canvas/components/Toolbar.vue
index a10461c18b..da7e773473 100644
--- a/frontend/src/components/canvas/components/Toolbar.vue
+++ b/frontend/src/components/canvas/components/Toolbar.vue
@@ -31,6 +31,12 @@
+
+
+
+ 关闭
+
+
@@ -46,6 +52,7 @@ import { commonStyle, commonAttr } from '@/components/canvas/custom-component/co
import eventBus from '@/components/canvas/utils/eventBus'
import { deepCopy } from '@/components/canvas/utils/utils'
import { post } from '@/api/panel/panel'
+import bus from '@/utils/bus'
export default {
data() {
@@ -77,6 +84,10 @@ export default {
this.scale = this.canvasStyleData.scale
},
methods: {
+ closePanelEdit() {
+ debugger
+ bus.$emit('PanelSwitchComponent', { name: 'PanelMain' })
+ },
goFile() {
this.$refs.files.click()
},
diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue
index 87e5868132..6003b3c937 100644
--- a/frontend/src/views/panel/edit/index.vue
+++ b/frontend/src/views/panel/edit/index.vue
@@ -67,6 +67,7 @@
+
@@ -94,6 +95,7 @@ import 'element-ui/lib/theme-chalk/index.css'
import '@/components/canvas/styles/reset.css'
import { ApplicationContext } from '@/utils/ApplicationContext'
export default {
+ name: 'PanelEdit',
components: {
DeMainContainer,
DeContainer,
@@ -102,11 +104,11 @@ export default {
ViewSelect,
Editor,
Toolbar
-
},
data() {
return {
show: false,
+ editView: false,
clickNotClose: false,
showIndex: -1,
activeName: 'attr',
diff --git a/frontend/src/views/panel/index.vue b/frontend/src/views/panel/index.vue
index 92a7295752..ed7a82ce00 100644
--- a/frontend/src/views/panel/index.vue
+++ b/frontend/src/views/panel/index.vue
@@ -1,25 +1,5 @@
-
-
-
-
-
- 列表
-
-
-
- 收藏
- 开发中...
-
-
- 分享
-
-
-
-
-
-
-
+
@@ -27,45 +7,42 @@
@@ -80,6 +57,7 @@ export default {
.ms-main-container {
height: calc(100vh - 56px);
+ padding: 0;
}
diff --git a/frontend/src/views/panel/list/ChartViewEdit.vue b/frontend/src/views/panel/list/ChartViewEdit.vue
new file mode 100644
index 0000000000..2f80983b62
--- /dev/null
+++ b/frontend/src/views/panel/list/ChartViewEdit.vue
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+ 名称:{{ panelInfo.name || '测试仪表板' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/panel/list/PanelList.vue b/frontend/src/views/panel/list/PanelList.vue
index 1313f2bdb5..13bdedb650 100644
--- a/frontend/src/views/panel/list/PanelList.vue
+++ b/frontend/src/views/panel/list/PanelList.vue
@@ -519,7 +519,7 @@ export default {
},
edit(data) {
this.$store.dispatch('panel/setPanelInfo', data)
- this.$router.replace('/panelEdit')
+ bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
},
link(data) {
this.linkVisible = true
diff --git a/frontend/src/views/panel/list/PanelMain.vue b/frontend/src/views/panel/list/PanelMain.vue
new file mode 100644
index 0000000000..2ed83a6168
--- /dev/null
+++ b/frontend/src/views/panel/list/PanelMain.vue
@@ -0,0 +1,68 @@
+
+
+
+
+
+ 列表
+
+
+
+ 收藏
+ 开发中...
+
+
+ 分享
+
+
+
+
+
+
+
+
+
+
+
+
+