yh 3 週間 前
コミット
02b016f9e6
2 ファイル変更44 行追加2 行削除
  1. 20 1
      src/views/member/list.vue
  2. 24 1
      src/views/member/mylist.vue

+ 20 - 1
src/views/member/list.vue

@@ -545,8 +545,27 @@ export default {
 
 
     /** 重置按钮操作 */
     /** 重置按钮操作 */
     resetQuery() {
     resetQuery() {
+      // 1. 清空日期
       this.dateRange = [];
       this.dateRange = [];
-      this.resetForm("queryForm");
+
+      // 2. 清空表单绑定的 queryParams(真正生效的重置)
+      this.queryParams = {
+        pageNum: 1,
+        pageSize: 10,
+        nickname: null,
+        isMyFsUser: false,
+        phone: null,
+        tagIds: [],
+        tabValue: "0",
+        watchCourseType: "0",
+        missCourseStatus: "0",
+        continueMissCourseSort: "0",
+        registerStartTime: null,
+        registerEndTime: null,
+        projectId: null,
+      };
+
+      // 3. 重新查询
       this.handleQuery();
       this.handleQuery();
     },
     },
 
 

+ 24 - 1
src/views/member/mylist.vue

@@ -575,8 +575,31 @@ export default {
 
 
     /** 重置按钮操作 */
     /** 重置按钮操作 */
     resetQuery() {
     resetQuery() {
+      // 1. 清空日期范围
       this.dateRange = [];
       this.dateRange = [];
-      this.resetForm("queryForm");
+
+      // 2. 清空表单输入框(真正生效)
+      if (this.$refs.queryForm) {
+        this.$refs.queryForm.resetFields();
+      }
+
+      // 3. 强制还原查询参数(保险)
+      this.queryParams = {
+        pageNum: 1,
+        pageSize: 10,
+        nickname: null,
+        phone: null,
+        tagIds: [],
+        tabValue: "0",
+        watchCourseType: "0",
+        missCourseStatus: "0",
+        continueMissCourseSort: "0",
+        registerStartTime: null,
+        registerEndTime: null,
+        projectId: null,
+      };
+
+      // 4. 重新查询
       this.handleQuery();
       this.handleQuery();
     },
     },