Explorar el Código

准备开始 分享改造

1
mo hace 2 años
padre
commit
4be77a9f35

+ 16 - 19
src/views/liveClassManager/modals/setBlack.vue

@@ -34,12 +34,12 @@
             <el-table-column type="selection" width="55"> </el-table-column>
             <el-table-column
               align="center"
-              prop="id"
+              prop="studentId"
               label="学员编号"
             ></el-table-column>
             <el-table-column
               align="center"
-              prop="username"
+              prop="studentName"
               label="学员姓名"
             ></el-table-column>
             <el-table-column align="center" prop="phone" label="手机号">
@@ -62,7 +62,7 @@
   </div>
 </template>
 <script>
-import { addBlackList, getWaitBlackList } from "../api";
+import { addBlackList, getWaitBlackList, getLiveBroadcastRoomDetailList } from "../api";
 import { getLiveGoodsMapperList } from "@/views/liveShopManger/api";
 import pagination from "@/components/Pagination/index";
 export default {
@@ -95,7 +95,7 @@ export default {
   methods: {
     async getList() {
       try {
-        const res = await getWaitBlackList({
+        const res = await getLiveBroadcastRoomDetailList({
           ...this.searchForm,
           page: this.rules.page,
           rows: this.rules.limit,
@@ -104,12 +104,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.studentId;
         });
         this.isNewPage = true;
         this.$nextTick(() => {
           this.tableList.forEach((course) => {
-            if (idList.indexOf(course.id) != -1) {
+            if (studentIdList.indexOf(course.studentId) != -1) {
               this.$refs.multipleSelection.toggleRowSelection(course, true);
             }
           });
@@ -136,7 +136,7 @@ export default {
       try {
         let idList = this.chioseIdList
           .map((group) => {
-            return group.id;
+            return group.studentId;
           })
           .join(",");
         const res = await addBlackList({
@@ -160,27 +160,24 @@ export default {
     handleSelectionChange(val) {
       if (val.length > 0) {
         this.chioseIdList = this.chioseIdList.concat(val);
-        this.chioseIdList = this.$helpers.lodash.uniqBy(
-          this.chioseIdList,
-          "id"
-        );
+        this.chioseIdList = this.$helpers.lodash.uniqBy(this.chioseIdList, "id");
       } else {
         if (this.isNewPage) return;
         let idList = this.chioseIdList.map((group) => {
-          return group.id;
+          return group.studentId;
         });
         this.$nextTick(() => {
           let tableIdList = [];
           this.tableList.forEach((group) => {
-            tableIdList.push(group.id);
-            if (idList.indexOf(group.id) != -1) {
+            tableIdList.push(group.studentId);
+            if (idList.indexOf(group.studentId) != -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.studentId) == -1;
             }
           );
           if (this.chioseIdList.length <= 0) {
@@ -195,10 +192,10 @@ export default {
     },
     onTableSelect(rows, row) {
       let idList = this.chioseIdList.map((group) => {
-        return group.id;
+        return group.studentId;
       });
-      if (idList.indexOf(row.id) != -1) {
-        this.chioseIdList.splice(idList.indexOf(row.id), 1);
+      if (idList.indexOf(row.studentId) != -1) {
+        this.chioseIdList.splice(idList.indexOf(row.studentId), 1);
         if (this.chioseIdList.length <= 0) {
           this.clearCom();
         }
@@ -206,7 +203,7 @@ export default {
     },
     onClose() {
       this.clearCom();
-      this.searchForm.search = ''
+      this.searchForm.search = "";
       this.lookVisible = false;
     },
     openDioag(row) {

+ 17 - 2
src/views/liveClassManager/newLiveClass.vue

@@ -294,8 +294,22 @@
             :rules="[{ required: true, message: '请选择推广类型' }]"
           >
             <el-radio-group v-model="form.popularizeType" @change="changeType">
-              <el-radio label="ALL">全员</el-radio>
-              <el-radio label="PRIVATE">部分</el-radio>
+              <el-radio label="ALL">公开</el-radio>
+              <el-radio label="PRIVATE">私密</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-row>
+        <el-row class="row">
+          <el-form-item
+            class="mline"
+            label="观看模式"
+            prop="viewMode"
+            label-width="130px"
+            :rules="[{ required: true, message: '请选择推广类型' }]"
+          >
+            <el-radio-group v-model="form.viewMode">
+              <el-radio label="LOGIN">登陆</el-radio>
+              <el-radio label="VISITOR">游客</el-radio>
             </el-radio-group>
           </el-form-item>
         </el-row>
@@ -506,6 +520,7 @@ export default {
           whether_view_shop_cart: 0,
         },
         checkList: [],
+        viewMode: "LOGIN",
       },
       serviceProvider: "tencentCloud",
       remoteLoading: false,