Преглед на файлове

修复直播间选项

1
mo преди 2 години
родител
ревизия
7c477f73ac
променени са 2 файла, в които са добавени 25 реда и са изтрити 44 реда
  1. 18 40
      src/views/liveClassManager/addStudentList.vue
  2. 7 4
      src/views/liveClassManager/modals/addStudentModel.vue

+ 18 - 40
src/views/liveClassManager/addStudentList.vue

@@ -112,10 +112,7 @@
       </el-form>
       <div class="btnWrap">
         <auth auths="imLiveRoomPurview/add">
-          <el-button
-            @click="addBlack"
-            type="primary"
-            style="margin-bottom: 10px"
+          <el-button @click="addBlack" type="primary" style="margin-bottom: 10px"
             >添加学员</el-button
           >
         </auth>
@@ -126,15 +123,13 @@
           :before-upload="beforeUpload"
           accept=".xlsx,.xls"
           :data="{
-            roomUid:$route.query.roomUid
+            roomUid: $route.query.roomUid,
           }"
           :headers="headers"
           :on-error="handleError"
           :on-success="handleSuccess"
         >
-          <el-button type="primary" style="margin-bottom: 20px">
-            导入学员
-          </el-button>
+          <el-button type="primary" style="margin-bottom: 20px"> 导入学员 </el-button>
         </el-upload>
         <auth auths="imLiveRoomPurview/delete">
           <el-button @click="removes" type="danger" style="margin-bottom: 10px"
@@ -153,39 +148,25 @@
           ref="multipleSelection"
         >
           <el-table-column type="selection" width="55"> </el-table-column>
-          <el-table-column
-            align="center"
-            prop="userId"
-            label="编号"
-          ></el-table-column>
+          <el-table-column align="center" prop="userId" label="编号"></el-table-column>
           <el-table-column
             align="center"
             prop="username"
             label="学员姓名"
           ></el-table-column>
-          <el-table-column
-            align="center"
-            prop="organName"
-            label="分部"
-          ></el-table-column>
+          <el-table-column align="center" prop="organName" label="分部"></el-table-column>
           <el-table-column
             align="center"
             prop="subjectName"
             label="声部"
           ></el-table-column>
 
-          <el-table-column
-            align="center"
-            prop="phone"
-            label="手机号"
-          ></el-table-column>
+          <el-table-column align="center" prop="phone" label="手机号"></el-table-column>
           <el-table-column align="center" prop="studentId" label="操作">
             <template slot-scope="scope">
               <div>
                 <auth auths="imLiveRoomPurview/delete">
-                  <el-button type="text" @click="deteleBlack(scope.row)"
-                    >删除</el-button
-                  >
+                  <el-button type="text" @click="deteleBlack(scope.row)">删除</el-button>
                 </auth>
               </div>
             </template>
@@ -205,10 +186,7 @@
   </div>
 </template>
 <script>
-import {
-  getLiveStudentList,
-  deteleLiveStudentList,
-} from "./api";
+import { getLiveStudentList, deteleLiveStudentList } from "./api";
 
 import pagination from "@/components/Pagination/index";
 import addStudentModel from "./modals/addStudentModel";
@@ -318,10 +296,7 @@ export default {
     handleSelectionChange(val) {
       if (val.length > 0) {
         this.chioseIdList = this.chioseIdList.concat(val);
-        this.chioseIdList = this.$helpers.lodash.uniqBy(
-          this.chioseIdList,
-          "userId"
-        );
+        this.chioseIdList = this.$helpers.lodash.uniqBy(this.chioseIdList, "userId");
       } else {
         if (this.isNewPage) return;
         let idList = this.chioseIdList.map((group) => {
@@ -429,6 +404,7 @@ export default {
     async onBranchChange(val) {
       // this.searchForm.cooperationOrganId = [];
       this.$set(this.searchForm, "cooperationOrganId", []);
+      this.$set(this.searchForm, "musicGroupId", []);
       if (val && val.length > 0) {
         let organId = val.join(",");
         try {
@@ -438,11 +414,13 @@ export default {
             }
           });
 
-          await getTeamList({ organId, page: 1, rows: 9999 }).then((res) => {
-            if (res.code == 200) {
-              this.teamList = res.data.rows;
+          await getTeamList({ organId, page: 1, rows: 9999, status: "PROGRESS" }).then(
+            (res) => {
+              if (res.code == 200) {
+                this.teamList = res.data.rows;
+              }
             }
-          });
+          );
         } catch (e) {
           console.log(e);
         }
@@ -465,8 +443,8 @@ export default {
       load.endLoading();
       if (response.code == 200) {
         this.$message.success("导入成功");
-        this.getList()
-      }  else {
+        this.getList();
+      } else {
         this.$message.error(response.msg);
       }
     },

+ 7 - 4
src/views/liveClassManager/modals/addStudentModel.vue

@@ -353,6 +353,7 @@ export default {
     async onBranchChange(val) {
       // this.searchForm.cooperationOrganId = [];
       this.$set(this.searchForm, "cooperationOrganId", []);
+      this.$set(this.searchForm, "musicGroupId", []);
       if (val && val.length > 0) {
         let organId = val.join(",");
         try {
@@ -362,11 +363,13 @@ export default {
             }
           });
 
-          await getTeamList({ organId, page: 1, rows: 9999 }).then((res) => {
-            if (res.code == 200) {
-              this.teamList = res.data.rows;
+          await getTeamList({ organId, page: 1, rows: 9999, status: "PROGRESS" }).then(
+            (res) => {
+              if (res.code == 200) {
+                this.teamList = res.data.rows;
+              }
             }
-          });
+          );
         } catch (e) {
           console.log(e);
         }