Pārlūkot izejas kodu

优化一键添加

1
mo 2 gadi atpakaļ
vecāks
revīzija
936da94435

+ 8 - 1
src/views/liveClassManager/api.js

@@ -375,7 +375,14 @@ export function addShareStudent(data) {
     data,
   });
 }
-
+// 一件添加
+export function addShareStudentQuite(data) {
+  return request({
+    url: "/api-web/courseShare/saveCourseShareByOne",
+    method: "post",
+    data,
+  });
+}
 
 // 删除分享学员
 export function deleteShareStudent(data) {

+ 4 - 0
src/views/liveClassManager/liveClassTwo/components/courseAdjust.vue

@@ -637,6 +637,7 @@ export default {
       });
     },
     startShare(row) {
+      this.actvieRow = row;
       this.shareModeForm.courseId = row.id;
       this.shareModeForm.shareMode = row.shareMode || "";
       this.shareModeVisible = true;
@@ -647,6 +648,9 @@ export default {
           ...this.shareModeForm,
           shareMode: this.shareModeForm.shareMode,
         });
+        if (this.shareModeForm.shareMode == "PRIVATE") {
+          this.gotoShareList(this.actvieRow);
+        }
         this.shareModeVisible = false;
         this.$message.success("创建成功");
         this.getList();

+ 4 - 4
src/views/liveClassManager/modals/addShareStudentModel.vue

@@ -112,7 +112,7 @@
             </el-form-item>
           </el-form>
         </el-form>
-        <auth auths="imLiveRoomPurview/addByCondition">
+        <auth auths="courseShare/saveCourseShareByOne">
           <el-button @click="addAllStudent" type="primary" style="margin-bottom: 10px"
             >一键添加</el-button
           >
@@ -159,7 +159,7 @@
   </div>
 </template>
 <script>
-import { addShareStudent, getWaitShareStudent, addByCondition } from "../api";
+import { addShareStudent, getWaitShareStudent, addShareStudentQuite } from "../api";
 import pagination from "@/components/Pagination/index";
 import { getGroupList } from "@/views/groupChatManager/api";
 import { queryByOrganId } from "@/api/systemManage";
@@ -388,13 +388,13 @@ export default {
           type: "warning",
         });
 
-        const res = await addByCondition({
+        const res = await addShareStudentQuite({
           organIds: organIdList.join(","),
           schoolIds: cooperationOrganId.join(","),
           teamIds: musicGroupId.join(","),
           groupIds: groupList.join(","),
           ...rest,
-          roomUid: this.activeRow.roomUid,
+          courseId: this.activeRow.courseId,
         });
         this.$message.success("添加成功");
         this.$emit("getList");

+ 1 - 1
vue.config.js

@@ -18,7 +18,7 @@ const name = defaultSettings.title || "管乐迷后台管理系统"; // page tit
 // let target = "https://online.dayaedu.com"; //线上
 // let target = 'http://192.168.3.20:8000' //邹璇
 // let target = 'http://192.168.3.161:8000' //勇哥
-// let target = "http://192.168.3.143:8000"; //
+// let target = "http://192.168.3.14:8005"; // 原谅
 let target = "https://test.dayaedu.com"; //测试环境
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {