diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue
index dae87841f3..818637badb 100644
--- a/frontend/src/views/chart/view/ChartEdit.vue
+++ b/frontend/src/views/chart/view/ChartEdit.vue
@@ -1519,6 +1519,7 @@ export default {
this.closeChangeChart()
// 从仪表板入口关闭
if (this.$route.path.indexOf('panel') > -1) {
+ this.$store.commit('recordSnapshot')
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
}
this.$success(this.$t('commons.save_success'))
diff --git a/frontend/src/views/chart/view/TableSelector.vue b/frontend/src/views/chart/view/TableSelector.vue
index ebfdc2a107..92548c41f8 100644
--- a/frontend/src/views/chart/view/TableSelector.vue
+++ b/frontend/src/views/chart/view/TableSelector.vue
@@ -1,7 +1,7 @@
-
+
@@ -54,7 +54,7 @@ export default {
type: Boolean,
required: false,
default: false
- },
+ }
},
data() {
return {
@@ -69,7 +69,7 @@ export default {
methods: {
getTable(table) {
// this.table = table
- getTable(table.id).then(response => {
+ table && table.id && getTable(table.id).then(response => {
this.table = response.data
this.$emit('getTable', this.table)
}).catch(res => {
diff --git a/frontend/src/views/panel/ViewSelect/index.vue b/frontend/src/views/panel/ViewSelect/index.vue
index c246762728..aedf7e0c26 100644
--- a/frontend/src/views/panel/ViewSelect/index.vue
+++ b/frontend/src/views/panel/ViewSelect/index.vue
@@ -34,8 +34,8 @@
@check="checkChanged"
@node-drag-end="dragEnd"
>
-
-
+
+
@@ -48,7 +48,17 @@
- {{ data.name }}
+ {{ data.name }}
+
+
+
+
+
@@ -63,6 +73,8 @@ import { deepCopy } from '@/components/canvas/utils/utils'
import eventBus from '@/components/canvas/utils/eventBus'
import { mapState } from 'vuex'
import { queryPanelViewTree } from '@/api/panel/panel'
+import { deleteCircle } from '@/api/chart/chart'
+import { delUser } from '@/api/system/user'
export default {
name: 'ViewSelect',
@@ -176,8 +188,20 @@ export default {
component.auxiliaryMatrix = this.canvasStyleData.auxiliaryMatrix
component.moveStatus = 'start'
return component
+ },
+ deleteHistory(data, node) {
+ deleteCircle(data.id).then(() => {
+ this.$success(this.$t('commons.delete_success'))
+ this.remove(node, data)
+ // this.loadData()
+ })
+ },
+ remove(node, data) {
+ const parent = node.parent
+ const children = parent.data.children || parent.data
+ const index = children.findIndex(d => d.id === data.id)
+ children.splice(index, 1)
}
-
}
}
@@ -198,4 +222,22 @@ export default {
width: 100%;
height: 100%;
}
+
+ .father .child {
+ /*display: none;*/
+ visibility: hidden;
+ }
+ .father:hover .child {
+ /*display: inline;*/
+ visibility: visible;
+ }
+
+ .custom-tree-node-list {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-size: 14px;
+ padding:0 8px;
+ }