lex 1 рік тому
батько
коміт
50b569a817

+ 6 - 2
src/views/natural-resources/components/my-resources/index.tsx

@@ -146,13 +146,14 @@ export default defineComponent({
         //
       }
     };
-
+    const searchGroupResourcesRef = ref();
     onMounted(() => {
       getList();
     });
     return () => (
       <>
         <SearchGroupResources
+          ref={searchGroupResourcesRef}
           onSearch={(item: any) => onSearch(item)}
           onUpload={() => {
             state.editList = [];
@@ -282,11 +283,14 @@ export default defineComponent({
           blockScroll={false}>
           <UploadModal
             editStatus={state.editStatus}
-            onClose={() => (state.uploadStatus = false)}
+            onClose={() => {
+              state.uploadStatus = false;
+            }}
             onConfirm={() => {
               state.editIds = [];
               state.editList = [];
               state.saveStatus = false;
+              searchGroupResourcesRef.value?.resetStatus();
               onSearch(state.searchGroup);
             }}
             list={state.editList}

+ 8 - 1
src/views/natural-resources/components/my-resources/search-group-resources.tsx

@@ -14,7 +14,7 @@ import { useCatchStore } from '/src/store/modules/catchData';
 export default defineComponent({
   name: 'search-group',
   emits: ['search', 'upload', 'edit', 'selectAll', 'delete', 'update'],
-  setup(props, { emit }) {
+  setup(props, { emit, expose }) {
     const resourceList = ref([] as any[]);
     const catchStore = useCatchStore();
     const forms = reactive({
@@ -48,6 +48,13 @@ export default defineComponent({
       // 获取声部列表
       await catchStore.getSubjects();
     });
+
+    const resetStatus = () => {
+      state.isSelectAll = false;
+    };
+    expose({
+      resetStatus
+    });
     return () => (
       <div class={styles.searchGroup}>
         <div class={styles.searchCatatory}>