From fb336f319c71291fa09de3e7f67f1ccfab3cb7c8 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Sat, 23 Sep 2023 15:58:40 +0800
Subject: [PATCH] 媒体搜索框

---
 src/components/common/sidebar.vue |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/components/common/sidebar.vue b/src/components/common/sidebar.vue
index a9be91d..fbd379a 100644
--- a/src/components/common/sidebar.vue
+++ b/src/components/common/sidebar.vue
@@ -28,7 +28,8 @@
 import { getRoot } from '/@/root'
 import * as icons from '@ant-design/icons-vue'
 import { ERouterName } from '/@/types'
-
+import { testUnBind } from '/@/api/manage'
+import { useMyStore } from '/@/store'
 interface IOptions {
   key: number
   label: string
@@ -60,16 +61,23 @@
       { key: 4, label: '航线库', path: '/' + ERouterName.WAYLINE, icon: 'NodeIndexOutlined' },
       { key: 5, label: '计划库', path: '/' + ERouterName.TASK, icon: 'CalendarOutlined' }
     ]
-
+    const store = useMyStore()
     function selectedRoute (item: IOptions) {
       const path = typeof item.path === 'string' ? item.path : item.path.path
       return root.$route.path?.indexOf(path) === 0
     }
-
-    function goBack () {
+    const osdVisible = computed(() => {
+      return store.state.osdVisible
+    })
+    const snList = computed(() => store.state.common.snList)
+    async function goBack () {
+      const query = toRefs(osdVisible.value)
+      snList.value.forEach(async (v: string) => {
+        await testUnBind(v)
+      })
+      store.commit('SET_OSD_VISIBLE_INFO', { ...query, visible: false })
       root.$router.push('/' + ERouterName.PROJECT_LIST)
     }
-
     return {
       options,
       selectedRoute,

--
Gitblit v1.9.3