diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss
index 892f191e7..953b21fc6 100644
--- a/nezha-fronted/src/assets/stylus/main.scss
+++ b/nezha-fronted/src/assets/stylus/main.scss
@@ -643,7 +643,6 @@ li{
display: flex;
align-items: center;
justify-content: center;
- padding-top: 3px;
cursor: ns-resize;
}
.sub-list-window-control {
diff --git a/nezha-fronted/src/components/common/bottomBox/bottomBox.vue b/nezha-fronted/src/components/common/bottomBox/bottomBox.vue
index 1dbde1915..24175e9a9 100644
--- a/nezha-fronted/src/components/common/bottomBox/bottomBox.vue
+++ b/nezha-fronted/src/components/common/bottomBox/bottomBox.vue
@@ -37,6 +37,10 @@
+
+
+
+
@@ -47,15 +51,17 @@
import alertMessageTab from "./tabs/alertMessageTab";
import endpointQueryTab from "./tabs/endpointQueryTab";
import endpointTab from "./tabs/endpointTab";
+ import panelTab from "./tabs/panelTab";
export default {
- name: "cabinetBox",
+ name: "bottomBox",
components:{
'common-detail-tab': commonDetailTab,
'cabinet-tab': cabinetTab,
'alert-message-tab': alertMessageTab,
'endpoint-query-tab': endpointQueryTab,
'endpoint-tab': endpointTab,
+ 'panel-tab': panelTab,
},
props: {
isFullScreen: false, //是否全屏
diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/panelTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/panelTab.vue
new file mode 100644
index 000000000..d4ad7ffd3
--- /dev/null
+++ b/nezha-fronted/src/components/common/bottomBox/tabs/panelTab.vue
@@ -0,0 +1,634 @@
+
+
+
+
+
+
+
+
diff --git a/nezha-fronted/src/components/page/config/model.vue b/nezha-fronted/src/components/page/config/model.vue
index 391037593..1818ef048 100644
--- a/nezha-fronted/src/components/page/config/model.vue
+++ b/nezha-fronted/src/components/page/config/model.vue
@@ -34,57 +34,64 @@
-
-
-
+
@@ -74,7 +74,7 @@
-
+
{
- if (response.code === 200) {
- this.$emit("reloadOnlyPanel");
- this.$store.commit('panelListChange', true);
- } else {
- if(response.msg){
- this.$message.error(response.msg);
- }else {
- this.$message.error(response);
+ panelId = this.autocompleteExist(this.panelName2);
+ if (!panelId) {
+ this.$post('panel', {name: this.panelName2}).then(response => {
+ if (response.code === 200) {
+ this.$emit("reloadOnlyPanel");
+ this.$store.commit('panelListChange', true);
+ panelId = this.autocompleteExist(this.panelName2);
+ } else {
+ if(response.msg){
+ this.$message.error(response.msg);
+ }else {
+ this.$message.error(response);
+ }
}
-
- }
- });
+ });
+ }
}
+
let intervalTime = 1; //设置3秒超时
let interval = setInterval(() => {
- panelId = this.autocompleteExist(this.panelName2);
if (panelId) {
this.panelId = panelId;
- console.log('___params___',params)
this.$post('panel/' + this.panelId + '/charts', params).then(response => {
if (response.code === 200) {
this.esc();
@@ -1018,13 +1020,15 @@
deep: true,
immediate: true,
handler(n, o) {
- if (this.selectFirstPanel) {
- this.selectFirstPanel = false;
- this.panelId = n[0].id;
- } else if (this.panelName) {
- for (let i = 0; i < n.length; i++) {
- if (n[i].name == this.panelName) {
- this.panelId = n[i].id;
+ if (this.showPanel.type != 'model') {
+ if (this.selectFirstPanel) {
+ this.selectFirstPanel = false;
+ this.panelId = n[0].id;
+ } else if (this.panelName) {
+ for (let i = 0; i < n.length; i++) {
+ if (n[i].name == this.panelName) {
+ this.panelId = n[i].id;
+ }
}
}
}