ZaiZai hai 1 ano
pai
achega
bf6166c6b3
Modificáronse 3 ficheiros con 19 adicións e 7 borrados
  1. 7 5
      src/views/exctab/exceltab.vue
  2. 6 1
      src/views/project/list.vue
  3. 6 1
      src/views/project/tree.vue

+ 7 - 5
src/views/exctab/exceltab.vue

@@ -52,7 +52,7 @@
 
 <script setup>
 import { HcDelMsg } from 'hc-vue3-ui'
-import { onActivated, ref } from 'vue'
+import { onActivated, onDeactivated, ref } from 'vue'
 import { getDictionaryData } from '~uti/tools'
 import { arrToId, deepClone, formValidate, getArrValue, isNullES } from 'js-fast-way'
 import HcClearTemplate from './excel/template.vue'
@@ -205,8 +205,10 @@ const elementRecognition = (row) => {
     rowElementInfo.value = row
     isElementShow.value = true
 }
-</script>
-
-<style lang="scss">
 
-</style>
+//离开了当前页面
+onDeactivated(() => {
+    isRowTempShow.value = false
+    isElementShow.value = false
+})
+</script>

+ 6 - 1
src/views/project/list.vue

@@ -45,7 +45,7 @@
 </template>
 
 <script setup>
-import { nextTick, onActivated, ref } from 'vue'
+import { nextTick, onActivated, onDeactivated, ref } from 'vue'
 import { getArrValue, getObjValue } from 'js-fast-way'
 import InfoDialog from './list/info-dialog.vue'
 import HcWbsTree from './list/wbs-tree.vue'
@@ -175,6 +175,11 @@ const addProjectClick = () => {
         isProjectDrawer.value = true
     })
 }
+
+//离开了当前页面
+onDeactivated(() => {
+    //isDrawerTempShow.value = false
+})
 </script>
 
 <style lang="scss">

+ 6 - 1
src/views/project/tree.vue

@@ -17,7 +17,7 @@
 </template>
 
 <script setup>
-import { onActivated, ref } from 'vue'
+import { onActivated, onDeactivated, ref } from 'vue'
 import { getArrValue } from 'js-fast-way'
 import HcDrawerTemp from './tree/drawer-temp.vue'
 import mainApi from '~api/project/tree'
@@ -70,4 +70,9 @@ const tableRowClick = (row) => {
     tableInfo.value = row
     isDrawerTempShow.value = true
 }
+
+//离开了当前页面
+onDeactivated(() => {
+    isDrawerTempShow.value = false
+})
 </script>