瀏覽代碼

提交测试

1
mo 3 年之前
父節點
當前提交
4c8e0b109e

+ 1 - 1
src/App.vue

@@ -373,7 +373,7 @@ input[type="number"] {
   display: flex;
   flex-direction: row;
   justify-content: flex-end;
-  div {
+  & >div {
     line-height: 40px;
     text-align: center;
     color: #fff;

+ 2 - 1
src/router/notKeepAliveList.js

@@ -124,5 +124,6 @@ export default [
   '/agentList',
   '/groupChatManager', // 群组管理
   '/littleArtistCamp', // 小小艺术家训练营
-  '/sysGroupCat'
+  '/sysGroupCat',
+  '/business/liveStudentList'
 ]

+ 12 - 0
src/store/modules/permission.js

@@ -606,6 +606,18 @@ function setDetailRoute(accessedRoutes) {
           }
         },
         {
+          name: "直播学员",
+          path: "liveStudentList",
+          component: () => import("@/views/liveClassManager/addStudentList"),
+          hidden: true,
+          meta: {
+            noCache: "1",
+            title: "直播学员",
+            belongTopMenu: "/business",
+            activeMenu: "/liveClassManager"
+          }
+        },
+        {
           name: "学员缴费设置",
           path: "studentPaySet",
           component: () =>

+ 188 - 60
src/views/liveClassManager/modals/addStudentList.vue → src/views/liveClassManager/addStudentList.vue

@@ -1,7 +1,13 @@
 <template>
-  <div class="">
-    <!-- m-core -->
-    <div class="">
+  <div class="m-container">
+    <!-- -->
+    <h2>
+      <el-page-header
+        @back="onCancel"
+        :content="$route.query.name + '学员名单'"
+      ></el-page-header>
+    </h2>
+    <div class="m-core">
       <el-form :inline="true" :model="searchForm">
         <el-form-item>
           <el-input
@@ -20,6 +26,7 @@
             multiple
             v-model.trim="searchForm.organIdList"
             placeholder="请选择分部"
+            @change="onBranchChange"
           >
             <el-option
               v-for="(item, index) in selects.branchs"
@@ -29,6 +36,43 @@
             ></el-option>
           </select-all>
         </el-form-item>
+        <el-form-item>
+          <el-select
+            multiple
+            collapse-tags
+            v-model.trim="searchForm.cooperationOrganId"
+            clearable
+            filterable
+            placeholder="请选择合作单位"
+            :disabled="searchForm.organIdList.length <= 0"
+          >
+            <el-option
+              v-for="(item, index) in cooperationList"
+              :key="index"
+              :value="item.id"
+              :label="item.name"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            multiple
+            collapse-tags
+            :disabled="searchForm.organIdList.length <= 0"
+            v-model.trim="searchForm.musicGroupId"
+            clearable
+            filterable
+            placeholder="请选择乐团"
+          >
+            <el-option
+              v-for="(item, index) in teamList"
+              :key="index"
+              :value="item.id"
+              :label="item.name"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+
         <el-form-item prop="subjectId">
           <el-select
             v-model="searchForm.subjectId"
@@ -45,12 +89,29 @@
           </el-select>
         </el-form-item>
         <el-form-item>
+          <el-select
+            multiple
+            collapse-tags
+            v-model.trim="searchForm.groupList"
+            clearable
+            filterable
+            placeholder="请选择群聊"
+          >
+            <el-option
+              v-for="(item, index) in groupList"
+              :key="index"
+              :value="item.id"
+              :label="item.name"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
           <el-button @click="search" type="primary">搜索</el-button>
           <el-button @click="onReSet" type="danger">重置</el-button>
         </el-form-item>
       </el-form>
       <div class="btnWrap">
-        <auth auths="imLiveRoomBlack/add">
+        <auth auths="imLiveRoomPurview/add">
           <el-button
             @click="addBlack"
             type="primary"
@@ -58,15 +119,24 @@
             >添加学员</el-button
           >
         </auth>
-        <auth auths="imLiveRoomBlack/add">
-          <el-button
-            @click="addBlack"
-            type="primary"
-            style="margin-bottom: 10px"
-            >导入学员</el-button
-          >
-        </auth>
-        <auth auths="imLiveRoomBlack/delete">
+        <el-upload
+          v-permission="'imLiveRoomPurview/importPurviewUser'"
+          action="/api-web/imLiveRoomPurview/importPurviewUser"
+          :show-file-list="false"
+          :before-upload="beforeUpload"
+          accept=".xlsx,.xls"
+          :data="{
+            roomUid:$route.query.roomUid
+          }"
+          :headers="headers"
+          :on-error="handleError"
+          :on-success="handleSuccess"
+        >
+          <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"
             >删除学员</el-button
           >
@@ -112,7 +182,7 @@
           <el-table-column align="center" prop="studentId" label="操作">
             <template slot-scope="scope">
               <div>
-                <auth auths="imLiveRoomBlack/delete">
+                <auth auths="imLiveRoomPurview/delete">
                   <el-button type="text" @click="deteleBlack(scope.row)"
                     >删除</el-button
                   >
@@ -131,25 +201,41 @@
         />
       </div>
     </div>
-    <addStudentModel @getList="getList" ref="setBlack" />
+    <addStudentModel @getList="getList" ref="addStudentModel" />
   </div>
 </template>
 <script>
-import { addLiveGoodsMapper, getBlackList, deteleBlackList } from "../api";
-import { getLiveGoodsMapperList } from "@/views/liveShopManger/api";
+import {
+  getLiveStudentList,
+  deteleLiveStudentList,
+} from "./api";
+
 import pagination from "@/components/Pagination/index";
-import addStudentModel from "./addStudentModel";
+import addStudentModel from "./modals/addStudentModel";
+import { getGroupList } from "@/views/groupChatManager/api";
+import { queryByOrganId } from "@/api/systemManage";
+import { getTeamList } from "@/api/teamServer";
+import { getToken, getTenantId } from "@/utils/auth";
+import load from "@/utils/loading";
 export default {
   name: "liveAddStudentList",
   //
-  components: { pagination, addStudentModel},
+  components: { pagination, addStudentModel },
   data() {
     return {
+      headers: { Authorization: getToken(), tenantId: getTenantId() },
       searchForm: {
         search: "",
+        organIdList: [],
+        cooperationOrganId: [],
+        musicGroupId: [],
+        groupList: [],
       },
       tableList: [],
       organList: [],
+      cooperationList: [],
+      groupList: [],
+      teamList: [],
       rules: {
         // 分页规则
         limit: 10, // 限制显示条数
@@ -169,13 +255,29 @@ export default {
   mounted() {
     this.$store.dispatch("setSubjects");
     this.$store.dispatch("setBranchs");
+    this.getGroupList();
     this.getList();
   },
   methods: {
+    async getGroupList() {
+      const res = await getGroupList({ page: 1, rows: 9999 });
+      this.groupList = res.data.rows;
+    },
     async getList() {
       try {
-        const res = await getBlackList({
-          ...this.searchForm,
+        const {
+          organIdList,
+          cooperationOrganId,
+          musicGroupId,
+          groupList,
+          ...rest
+        } = this.searchForm;
+        const res = await getLiveStudentList({
+          organIds: organIdList.join(","),
+          schoolIds: cooperationOrganId.join(","),
+          teamIds: musicGroupId.join(","),
+          groupIds: groupList.join(","),
+          ...rest,
           page: this.rules.page,
           rows: this.rules.limit,
           roomUid: this.$route.query.roomUid,
@@ -203,38 +305,15 @@ export default {
       this.getList();
     },
     onReSet() {
-      this.searchForm.search = "";
-      this.clearCom();
-      this.search();
-    },
-    async submit() {
-      if (!this.chioseIdList || this.chioseIdList.length <= 0) {
-        this.$message.error("请至少选择一名学员");
-        return;
-      }
-      try {
-        let idList = this.chioseIdList
-          .map((group) => {
-            return group.userId;
-          })
-          .join(",");
-        const res = await addLiveGoodsMapper({
-          liveGoodsIds: idList,
-          liveId: this.activeRow.roomUid,
-        });
-        this.$message.success("添加成功");
-        this.$emit("getList");
-        // this.onClose();
+      (this.searchForm = {
+        search: "",
+        organIdList: [],
+        cooperationOrganId: [],
+        musicGroupId: [],
+        groupList: [],
+      }),
         this.clearCom();
-      } catch (e) {
-        console.log(e);
-      }
-
-      // 开始  addGroupMessageList
-      /**
-       *
-
-       */
+      this.search();
     },
     handleSelectionChange(val) {
       if (val.length > 0) {
@@ -288,16 +367,16 @@ export default {
       this.$store.dispatch("delVisitedViews", this.$route);
     },
     async deteleBlack(row) {
-      this.$confirm(`你确定将${row.username}移除黑名单?`, "提示", {
+      this.$confirm(`你确定将${row.username}移除直播间?`, "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
       })
         .then(async () => {
           try {
-            const res = await deteleBlackList({
+            const res = await deteleLiveStudentList({
               roomUid: this.$route.query.roomUid,
-              userIdList: row.userId + "",
+              ids: row.userId + "",
             });
             this.getList();
             this.clearCom();
@@ -308,7 +387,9 @@ export default {
         .catch();
     },
     addBlack() {
-      this.$refs.setBlack.openDioag({ roomUid: this.$route.query.roomUid });
+      this.$refs.addStudentModel.openDioag({
+        roomUid: this.$route.query.roomUid,
+      });
     },
     removes() {
       if (!this.chioseIdList || this.chioseIdList.length <= 0) {
@@ -320,7 +401,7 @@ export default {
           return group.username;
         })
         .join(",");
-      this.$confirm(`你确定将${str}移除黑名单?`, "提示", {
+      this.$confirm(`你确定将${str}移除直播间?`, "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
@@ -332,11 +413,11 @@ export default {
             })
             .join(",");
           try {
-            const res = await deteleBlackList({
+            const res = await deteleLiveStudentList({
               roomUid: this.$route.query.roomUid,
-              userIdList: idList,
+              ids: idList,
             });
-            this.$message.success("除成功");
+            this.$message.success("除成功");
             this.getList();
             this.clearCom();
           } catch (e) {
@@ -345,6 +426,53 @@ export default {
         })
         .catch();
     },
+    async onBranchChange(val) {
+      // this.searchForm.cooperationOrganId = [];
+      this.$set(this.searchForm, "cooperationOrganId", []);
+      if (val && val.length > 0) {
+        let organId = val.join(",");
+        try {
+          await queryByOrganId({ organId }).then((res) => {
+            if (res.code == 200) {
+              this.cooperationList = res.data;
+            }
+          });
+
+          await getTeamList({ organId, page: 1, rows: 9999 }).then((res) => {
+            if (res.code == 200) {
+              this.teamList = res.data.rows;
+            }
+          });
+        } catch (e) {
+          console.log(e);
+        }
+      }
+    },
+    beforeUpload(file) {
+      //  (file.type)
+      // const isJPG = file.type === '.xlsx' || file.type === '.xls';
+      // // const isLt2M = file.size / 1024 / 1024 < 2;
+      // if (!isJPG) {
+      //   this.$message.error('上传头像图片只能是 JPG 格式!');
+      // }
+      // return isJPG;
+      // this.goodsLoading = true
+      load.startLoading();
+    },
+    handleSuccess(response, file, fileList) {
+      // 导入商品
+      // 报表导出
+      load.endLoading();
+      if (response.code == 200) {
+        this.$message.success("导入成功");
+        this.getList()
+      }  else {
+        this.$message.error(response.msg);
+      }
+    },
+    handleError(err, file, fileList) {
+      load.endLoading();
+    },
   },
 };
 </script>

+ 58 - 0
src/views/liveClassManager/api.js

@@ -208,3 +208,61 @@ export const getGoodsOrderList= data => {
     params: data
   })
 }
+
+// 获取直播间学员
+export const getLiveStudentList= data => {
+  return request({
+    url: '/api-web/imLiveRoomPurview/queryStudent',
+    method: 'post',
+    data,
+  })
+}
+
+// 获取群聊
+export const getGroupList= data => {
+  return request({
+    url: '/api-web/imLiveRoomPurview/selectRoomPurviewGroup',
+    method: 'post',
+    data,
+  })
+}
+
+// 获取待添加直播间的学生
+export const getWaitLiveStudentList= data => {
+  return request({
+    url: '/api-web/imLiveRoomPurview/selectRoomPurviewStudent',
+    method: 'post',
+    data,
+  })
+}
+
+// 添加学生到直播间
+export const addLiveStudentList= data => {
+  return request({
+    url: '/api-web/imLiveRoomPurview/add',
+    method: 'get',
+    data,
+    params: data
+  })
+}
+
+
+// 移除直播间
+export const deteleLiveStudentList= data => {
+  return request({
+    url: '/api-web/imLiveRoomPurview/delete',
+    method: 'get',
+    data,
+    params: data
+  })
+}
+
+// 一键添加   imLiveRoomPurview/addByCondition
+export const addByCondition= data => {
+  return request({
+    url: '/api-web/imLiveRoomPurview/addByCondition',
+    method: 'post',
+    data,
+    params: data
+  })
+}

+ 10 - 2
src/views/liveClassManager/index.vue

@@ -144,9 +144,11 @@
                   </span>
                   <el-dropdown-menu slot="dropdown">
                     <el-dropdown-item
-                      v-if="permission('imLiveBroadcastRoom/roomDestroy')"
+                      v-if="permission('/liveStudentList')&&scope.row.popularizeType!=='ALL'"
                     >
-                      <el-button type="text" @click="closeRoom(scope.row)"
+                      <el-button
+                        type="text"
+                        @click="lookStudentDetail(scope.row)"
                         >观看学员</el-button
                       >
                     </el-dropdown-item>
@@ -514,6 +516,12 @@ export default {
     gotoBuylist(row) {
       this.$refs.sellShopList.openDioag(row);
     },
+    lookStudentDetail(row) {
+      this.$router.push({
+        path: "/business/liveStudentList",
+        query: { roomUid: row.roomUid,name:row.roomTitle },
+      });
+    },
   },
 };
 </script>

+ 236 - 33
src/views/liveClassManager/modals/addStudentModel.vue

@@ -9,19 +9,117 @@
     >
       <div>
         <el-form :inline="true" :model="searchForm">
-          <el-form-item>
-            <el-input
-              v-model.trim="searchForm.search"
-              clearable
-              @keyup.enter.native="search"
-              placeholder="学员姓名/编号/手机号"
-            ></el-input>
-          </el-form-item>
-          <el-form-item>
-            <el-button @click="search" type="primary">搜索</el-button>
-            <el-button @click="onReSet" type="danger">重置</el-button>
-          </el-form-item>
+          <el-form :inline="true" :model="searchForm">
+            <el-form-item>
+              <el-input
+                v-model.trim="searchForm.search"
+                clearable
+                @keyup.enter.native="search"
+                placeholder="学员名/编号/手机号"
+              ></el-input>
+            </el-form-item>
+            <el-form-item prop="organIdList">
+              <select-all
+                class="multiple"
+                clearable
+                filterable
+                collapse-tags
+                multiple
+                v-model.trim="searchForm.organIdList"
+                placeholder="请选择分部"
+                @change="onBranchChange"
+              >
+                <el-option
+                  v-for="(item, index) in selects.branchs"
+                  :key="index"
+                  :label="item.name"
+                  :value="item.id"
+                ></el-option>
+              </select-all>
+            </el-form-item>
+            <el-form-item>
+              <el-select
+                multiple
+                collapse-tags
+                v-model.trim="searchForm.cooperationOrganId"
+                clearable
+                filterable
+                placeholder="请选择合作单位"
+                :disabled="searchForm.organIdList.length <= 0"
+              >
+                <el-option
+                  v-for="(item, index) in cooperationList"
+                  :key="index"
+                  :value="item.id"
+                  :label="item.name"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item>
+              <el-select
+                multiple
+                collapse-tags
+                :disabled="searchForm.organIdList.length <= 0"
+                v-model.trim="searchForm.musicGroupId"
+                clearable
+                filterable
+                placeholder="请选择乐团"
+              >
+                <el-option
+                  v-for="(item, index) in teamList"
+                  :key="index"
+                  :value="item.id"
+                  :label="item.name"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+
+            <el-form-item prop="subjectId">
+              <el-select
+                v-model="searchForm.subjectId"
+                clearable
+                filterable
+                placeholder="请选择声部"
+              >
+                <el-option
+                  v-for="item in selects.subjects"
+                  :value="item.id"
+                  :label="item.name"
+                  :key="item.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item>
+              <el-select
+                multiple
+                collapse-tags
+                v-model.trim="searchForm.groupList"
+                clearable
+                filterable
+                placeholder="请选择群聊"
+              >
+                <el-option
+                  v-for="(item, index) in groupList"
+                  :key="index"
+                  :value="item.id"
+                  :label="item.name"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item>
+              <el-button @click="search" type="primary">搜索</el-button>
+              <el-button @click="onReSet" type="danger">重置</el-button>
+            </el-form-item>
+          </el-form>
         </el-form>
+        <auth auths="imLiveRoomPurview/addByCondition">
+          <el-button
+            @click="addAllStudent"
+            type="primary"
+            style="margin-bottom: 10px"
+            >一键添加</el-button
+          >
+        </auth>
         <div class="tableWrap">
           <el-table
             style="width: 100%"
@@ -34,7 +132,7 @@
             <el-table-column type="selection" width="55"> </el-table-column>
             <el-table-column
               align="center"
-              prop="id"
+              prop="userId"
               label="学员编号"
             ></el-table-column>
             <el-table-column
@@ -44,6 +142,8 @@
             ></el-table-column>
             <el-table-column align="center" prop="phone" label="手机号">
             </el-table-column>
+            <el-table-column align="center" prop="subjectName" label="声部">
+            </el-table-column>
           </el-table>
           <pagination
             sync
@@ -62,9 +162,15 @@
   </div>
 </template>
 <script>
-import { addBlackList, getWaitBlackList } from "../api";
-import { getLiveGoodsMapperList } from "@/views/liveShopManger/api";
+import {
+  addLiveStudentList,
+  getWaitLiveStudentList,
+  addByCondition,
+} from "../api";
 import pagination from "@/components/Pagination/index";
+import { getGroupList } from "@/views/groupChatManager/api";
+import { queryByOrganId } from "@/api/systemManage";
+import { getTeamList } from "@/api/teamServer";
 export default {
   name: "eidtPostMsg",
   components: { pagination },
@@ -72,9 +178,16 @@ export default {
     return {
       searchForm: {
         search: "",
+        organIdList: [],
+        cooperationOrganId: [],
+        musicGroupId: [],
+        groupList: [],
       },
       tableList: [],
       organList: [],
+      cooperationList: [],
+      groupList: [],
+      teamList: [],
       rules: {
         // 分页规则
         limit: 10, // 限制显示条数
@@ -91,12 +204,31 @@ export default {
     };
   },
 
-  mounted() {},
+  mounted() {
+    this.$store.dispatch("setSubjects");
+    this.$store.dispatch("setBranchs");
+    this.getGroupList();
+  },
   methods: {
+    async getGroupList() {
+      const res = await getGroupList({ page: 1, rows: 9999 });
+      this.groupList = res.data.rows;
+    },
     async getList() {
       try {
-        const res = await getWaitBlackList({
-          ...this.searchForm,
+        const {
+          organIdList,
+          cooperationOrganId,
+          musicGroupId,
+          groupList,
+          ...rest
+        } = this.searchForm;
+        const res = await getWaitLiveStudentList({
+          organIds: organIdList.join(","),
+          schoolIds: cooperationOrganId.join(","),
+          teamIds: musicGroupId.join(","),
+          groupIds: groupList.join(","),
+          ...rest,
           page: this.rules.page,
           rows: this.rules.limit,
           roomUid: this.activeRow.roomUid,
@@ -104,12 +236,12 @@ export default {
         this.tableList = res.data.rows;
         this.rules.total = res.data.total;
         let idList = this.chioseIdList.map((group) => {
-          return group.id;
+          return group.userId;
         });
         this.isNewPage = true;
         this.$nextTick(() => {
           this.tableList.forEach((course) => {
-            if (idList.indexOf(course.id) != -1) {
+            if (idList.indexOf(course.userId) != -1) {
               this.$refs.multipleSelection.toggleRowSelection(course, true);
             }
           });
@@ -124,7 +256,15 @@ export default {
       this.getList();
     },
     onReSet() {
-      this.searchForm.search = "";
+      (this.searchForm = {
+        search: "",
+        organIdList: [],
+        cooperationOrganId: [],
+        musicGroupId: [],
+        groupList: [],
+      }),
+        this.clearCom();
+      this.search();
       this.clearCom();
       this.search();
     },
@@ -133,14 +273,15 @@ export default {
         this.$message.error("请至少选择一名学生");
         return;
       }
+
       try {
         let idList = this.chioseIdList
           .map((group) => {
-            return group.id;
+            return group.userId;
           })
           .join(",");
-        const res = await addBlackList({
-          userIdList: idList,
+        const res = await addLiveStudentList({
+          ids: idList,
           roomUid: this.activeRow.roomUid,
         });
         this.$message.success("添加成功");
@@ -162,25 +303,25 @@ export default {
         this.chioseIdList = this.chioseIdList.concat(val);
         this.chioseIdList = this.$helpers.lodash.uniqBy(
           this.chioseIdList,
-          "id"
+          "userId"
         );
       } else {
         if (this.isNewPage) return;
         let idList = this.chioseIdList.map((group) => {
-          return group.id;
+          return group.userId;
         });
         this.$nextTick(() => {
           let tableIdList = [];
           this.tableList.forEach((group) => {
-            tableIdList.push(group.id);
-            if (idList.indexOf(group.id) != -1) {
+            tableIdList.push(group.userId);
+            if (idList.indexOf(group.userId) != -1) {
               this.$refs.multipleSelection.toggleRowSelection(group, false);
             }
           });
           this.chioseIdList = this.$helpers.lodash.remove(
             this.chioseIdList,
             function (item) {
-              return tableIdList.indexOf(item.id) == -1;
+              return tableIdList.indexOf(item.userId) == -1;
             }
           );
           if (this.chioseIdList.length <= 0) {
@@ -195,10 +336,10 @@ export default {
     },
     onTableSelect(rows, row) {
       let idList = this.chioseIdList.map((group) => {
-        return group.id;
+        return group.userId;
       });
-      if (idList.indexOf(row.id) != -1) {
-        this.chioseIdList.splice(idList.indexOf(row.id), 1);
+      if (idList.indexOf(row.userId) != -1) {
+        this.chioseIdList.splice(idList.indexOf(row.userId), 1);
         if (this.chioseIdList.length <= 0) {
           this.clearCom();
         }
@@ -206,7 +347,7 @@ export default {
     },
     onClose() {
       this.clearCom();
-      this.searchForm.search = ''
+      this.searchForm.search = "";
       this.lookVisible = false;
     },
     openDioag(row) {
@@ -214,6 +355,68 @@ export default {
       this.lookVisible = true;
       this.getList();
     },
+    async onBranchChange(val) {
+      // this.searchForm.cooperationOrganId = [];
+      this.$set(this.searchForm, "cooperationOrganId", []);
+      if (val && val.length > 0) {
+        let organId = val.join(",");
+        try {
+          await queryByOrganId({ organId }).then((res) => {
+            if (res.code == 200) {
+              this.cooperationList = res.data;
+            }
+          });
+
+          await getTeamList({ organId, page: 1, rows: 9999 }).then((res) => {
+            if (res.code == 200) {
+              this.teamList = res.data.rows;
+            }
+          });
+        } catch (e) {
+          console.log(e);
+        }
+      }
+    },
+    async addAllStudent() {
+      const {
+        organIdList,
+        cooperationOrganId,
+        musicGroupId,
+        groupList,
+        ...rest
+      } = this.searchForm;
+      if (
+        !organIdList.join(",") &&
+        !cooperationOrganId.join(",") &&
+        !musicGroupId.join(",") &&
+        !groupList.join(",") &&
+        !this.searchForm.search
+      ) {
+        this.$message.error("请至少选择一个搜索条件");
+        return;
+      }
+      try {
+        await this.$confirm(
+          "确认后当前所选条件下所有学生都可观看直播",
+          "提示",
+          {
+            type: "warning",
+          }
+        );
+
+        const res = await addByCondition({
+          organIds: organIdList.join(","),
+          schoolIds: cooperationOrganId.join(","),
+          teamIds: musicGroupId.join(","),
+          groupIds: groupList.join(","),
+          ...rest,
+          roomUid: this.activeRow.roomUid,
+        });
+        this.$message.success("添加成功");
+        this.$emit("getList");
+        this.onClose();
+      } catch (e) {}
+    },
   },
 };
 </script>