From 601fa0e7bfdb0eddd13f09e8b32b8759c376f6dd Mon Sep 17 00:00:00 2001 From: Qiuxia Fan Date: Mon, 21 Mar 2022 18:29:46 +0800 Subject: [PATCH] set tool --- src/views/Layer.vue | 6 +++--- src/views/dashboard/Edit.vue | 2 +- src/views/dashboard/panel/Tool.vue | 9 +++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/views/Layer.vue b/src/views/Layer.vue index 08e4c84a..b7f3210c 100644 --- a/src/views/Layer.vue +++ b/src/views/Layer.vue @@ -46,9 +46,11 @@ const layer = ref("GENERAL"); getDashboard(); async function getDashboard() { + setLayer(String(route.name)); + dashboardStore.setLayer(layer.value); + dashboardStore.setEntity(EntityType[0].value); dashboardStore.setMode(false); dashboardStore.setCurrentDashboard(null); - setLayer(String(route.name)); await dashboardStore.setDashboards(); const index = dashboardStore.dashboards.findIndex( (d: { name: string; isRoot: boolean; layer: string; entity: string }) => @@ -97,8 +99,6 @@ function setLayer(n: string) { layer.value = "GENERAL"; break; } - dashboardStore.setLayer(layer.value); - dashboardStore.setEntity(EntityType[1].value); } watch( () => route.name, diff --git a/src/views/dashboard/Edit.vue b/src/views/dashboard/Edit.vue index ab33ad15..67d850c1 100644 --- a/src/views/dashboard/Edit.vue +++ b/src/views/dashboard/Edit.vue @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->