浏览代码

实时刷新

1
mo 4 年之前
父节点
当前提交
c9907a6e93
共有 1 个文件被更改,包括 17 次插入14 次删除
  1. 17 14
      src/views/teamDetail/components/studentList.vue

+ 17 - 14
src/views/teamDetail/components/studentList.vue

@@ -1613,6 +1613,7 @@ export default {
       }
     },
     getList() {
+         this.getTeamStudent();
       let obj = {
         musicGroupId: this.teamid,
         page: this.rules.page,
@@ -1630,14 +1631,15 @@ export default {
         comeOnPackage: this.searchForm.comeOnPackage,
         carePackage: this.searchForm.carePackage,
       };
-      getTeamStudentList(obj).then((res) => {
+     return getTeamStudentList(obj).then((res) => {
         if (res.code == 200) {
           this.tableList = res.data.rows;
           this.rules.total = res.data.total;
           this.getStudentStatus();
+          return res
         }
       });
-      this.getTeamStudent();
+
     },
     addPay(row) {
       this.createUserPayVisible = true;
@@ -2232,18 +2234,19 @@ export default {
       resetPlanNum(this.leftList).then((res) => {});
     },
     openChangeVoice(row) {
-      console.log(row);
-      // this.getList().then((res) => {
-      //   for (const item of res.data.rows) {
-      //     if (item.id === row.id) {
-      //       this.rowDetail = { ...item, studentId: row.userId };
-      //       this.changeVoiceVisible = true;
-      //            console.log( this.rowDetail)
-      //     }
-      //   }
-      // });
-      this.rowDetail = { ...row, studentId: row.userId };
-      this.changeVoiceVisible = true;
+      // console.log(row);
+      // this.getList
+      this.getList().then((res) => {
+        for (const item of res.data.rows) {
+          if (item.userId === row.userId) {
+            this.rowDetail = { ...item, studentId: row.userId };
+            this.changeVoiceVisible = true;
+                 console.log( this.rowDetail)
+          }
+        }
+      });
+      // this.rowDetail = { ...row, studentId: row.userId };
+      // this.changeVoiceVisible = true;
     },
     closeChangeVoice() {
       this.changeVoiceVisible = false;