kagg886 2 månader sedan
förälder
incheckning
d58afc9ca3
1 ändrade filer med 9 tillägg och 1 borttagningar
  1. 9 1
      src/views/system/report/list/index.vue

+ 9 - 1
src/views/system/report/list/index.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import { computed, getCurrentInstance, onMounted, ref, unref } from 'vue'
+import { computed, getCurrentInstance, onMounted, onUnmounted, ref, unref, watch } from 'vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { Delete, Edit, Plus, Search, View } from '@element-plus/icons-vue'
 import { useLoading } from '/@/utils/loading-util'
@@ -456,6 +456,14 @@ const handleDetail = (row: Complaint) => {
 	showDetail.value = true
 }
 
+const fn = watch(showDetail,(newVal) => {
+	if (newVal) return
+	complaintDetailId.value = undefined
+	complaintDetailProps.value = undefined
+})
+
+onUnmounted(fn)
+
 //发起审批
 const ckFlowRef = ref()
 const handleStartFlow = (row: FlowDemoTableColumns | null) => {