瀏覽代碼

Merge branch '03/03GRADE' into 11/24SAAS

mo 3 年之前
父節點
當前提交
c0f3af7df7

+ 14 - 0
src/constant/index.js

@@ -464,3 +464,17 @@ export const campState = {
   'ING':'进行中',
   'END':'已结束'
 }
+
+export const catgGoupType = {
+  NORMAL:'声部班',
+  MIX:'合奏班',
+  HIGH:'基础技能班',
+  VIP:'VIP课',
+  DEMO:'试听课',
+  SNAP:'临时班',
+  COMM:'对外课程',
+  HIGH_ONLINE:'线上基础技能班',
+  MUSIC_NETWORK:'乐团网管课',
+  PARENT_MEETING:'家长会',
+  TRAINING:'训练营'
+}

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

@@ -594,6 +594,18 @@ function setDetailRoute(accessedRoutes) {
           }
         },
         {
+          name: "黑名单",
+          path: "liveBlackList",
+          component: () => import("@/views/liveClassManager/studentBlacklist"),
+          hidden: true,
+          meta: {
+            noCache: "1",
+            title: "黑名单",
+            belongTopMenu: "/business",
+            activeMenu: "/liveClassManager"
+          }
+        },
+        {
           name: "学员缴费设置",
           path: "studentPaySet",
           component: () =>

+ 3 - 2
src/utils/searchArray.js

@@ -22,7 +22,8 @@ import {
   issue,
   feedbackType,
   feedbackTypeDesc,
-  campState
+  campState,
+  catgGoupType
 } from '../constant'
 // 课程类型
 let tenantConfig = sessionStorage.getItem('tenantConfig')
@@ -810,7 +811,7 @@ export const issueList = getValueForKey(issue)
 export const feedbackTypeList = getValueForKey(feedbackType)
 export const feedbackTypeDescList = getValueForKey(feedbackTypeDesc)
 export const campStateList = getValueForKey(campState)
-
+export const catgGoupTypeList =  getValueForKey(catgGoupType)
 //downListType
 function getValueForKey(obj) {
   let arr = []

+ 6 - 0
src/utils/vueFilter.js

@@ -839,6 +839,12 @@ Vue.filter("cloudGroupActive", value => {
 Vue.filter("chargingStatus", value => {
   return constant.chargingStatus[value];
 });
+
+// 群消息类型
+Vue.filter("catgGoupType", value => {
+  return constant.catgGoupType[value];
+});
+
 Vue.filter("usageStatus", value => {
   let obj = {
     0: "未使用",

+ 72 - 36
src/views/businessManager/shopManager/shopList.vue

@@ -143,7 +143,7 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item prop="replacementShowOrganId" v-if="tenantId==1">
+        <el-form-item prop="replacementShowOrganId" v-if="tenantId == 1">
           <el-select
             v-model.trim="searchForm.replacementShowOrganId"
             clearable
@@ -315,7 +315,12 @@
               />
             </template>
           </el-table-column> -->
-          <el-table-column align="center" label="是否库存预警" v-if="tenantId==1" :key="Math.random()">
+          <el-table-column
+            align="center"
+            label="是否库存预警"
+            v-if="tenantId == 1"
+            :key="Math.random()"
+          >
             <template slot-scope="scope">
               <span v-if="!scope.row.complementGoodsIdList">
                 {{ scope.row.stockWarning ? "是" : "否" }}
@@ -347,7 +352,13 @@
               }}</span>
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="stockCount" label="内部库存" v-if="tenantId==1" :key="Math.random()">
+          <el-table-column
+            align="center"
+            prop="stockCount"
+            label="内部库存"
+            v-if="tenantId == 1"
+            :key="Math.random()"
+          >
             <template slot-scope="scope">
               <!-- 先判断是否是组合商品 -->
               <span v-if="scope.row.complementGoodsIdList">
@@ -365,7 +376,13 @@
               <span v-else>{{ scope.row.taxStockCount }}</span>
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="stockType" label="库存类型" v-if="tenantId==1" :key="Math.random()">
+          <el-table-column
+            align="center"
+            prop="stockType"
+            label="库存类型"
+            v-if="tenantId == 1"
+            :key="Math.random()"
+          >
             <template slot-scope="scope">
               {{ scope.row.stockType | stockTypeStatus }}
             </template>
@@ -416,11 +433,13 @@
               <Tooltip :content="scope.row.desc" />
             </template>
           </el-table-column>
+          <!--   -->
           <el-table-column
             align="center"
             width="180px"
             label="操作"
             fixed="right"
+            key="caozuo"
           >
             <template slot-scope="scope">
               <!-- 组合商品没有进货清单按钮 v-permission="'/purchaseLlist'" -->
@@ -654,11 +673,11 @@
         />
         <el-form-item
           label="市场价"
-           class="hiddenStart"
+          class="hiddenStart"
           prop="marketPrice"
           :label-width="formLabelWidth"
         >
-        <template slot="label">
+          <template slot="label">
             <p style="position: relative">
               <span style="color: #f56c6c; margin-right: 4px">*</span>
               市场价
@@ -689,11 +708,11 @@
         </el-form-item>
         <el-form-item
           label="零售价"
-           class="hiddenStart"
+          class="hiddenStart"
           prop="discountPrice"
           :label-width="formLabelWidth"
         >
-         <template slot="label">
+          <template slot="label">
             <p style="position: relative">
               <span style="color: #f56c6c; margin-right: 4px">*</span>
               零售价
@@ -725,10 +744,10 @@
         <el-form-item
           label="商品团购价"
           prop="groupPurchasePrice"
-           class="hiddenStart"
+          class="hiddenStart"
           :label-width="formLabelWidth"
         >
-         <template slot="label">
+          <template slot="label">
             <p style="position: relative">
               <span style="color: #f56c6c; margin-right: 4px">*</span>
               团购价
@@ -888,7 +907,7 @@
             style="width: 400px !important"
             multiple
             clearable
-             :disabled="addDisabled"
+            :disabled="addDisabled"
           >
             <el-option
               v-for="item in selects.branchs"
@@ -911,7 +930,7 @@
             style="width: 400px !important"
             multiple
             clearable
-             :disabled="addDisabled"
+            :disabled="addDisabled"
           >
             <el-option
               v-for="item in selects.branchs"
@@ -934,7 +953,7 @@
             style="width: 400px !important"
             multiple
             clearable
-             :disabled="addDisabled"
+            :disabled="addDisabled"
           >
             <el-option
               v-for="item in selects.branchs"
@@ -945,7 +964,8 @@
           </select-all>
         </el-form-item>
         <!--  :disabled="pageDisabled || pageType == 'update'"  -->
-        <el-form-item  v-if="tenantId==1"
+        <el-form-item
+          v-if="tenantId == 1"
           label="乐器置换可售分部"
           prop="replacementShowOrganId"
           :label-width="formLabelWidth"
@@ -957,7 +977,7 @@
             style="width: 400px !important"
             multiple
             clearable
-             :disabled="addDisabled"
+            :disabled="addDisabled"
           >
             <el-option
               v-for="item in selects.branchs"
@@ -984,10 +1004,14 @@
             :disabled="addDisabled"
             :imageHeightM="400"
           ></upload> -->
-          <image-cropper :options="cropperOptions" :disabled="addDisabled" :imgSize="2" :imageUrl="form.image"  @crop-upload-success="cropSuccess" />
-          <p style="color: red">
-            请上传大小2M以内,格式为jpg、png、gif图片
-          </p>
+          <image-cropper
+            :options="cropperOptions"
+            :disabled="addDisabled"
+            :imgSize="2"
+            :imageUrl="form.image"
+            @crop-upload-success="cropSuccess"
+          />
+          <p style="color: red">请上传大小2M以内,格式为jpg、png、gif图片</p>
         </el-form-item>
         <br />
         <el-form-item
@@ -1044,7 +1068,7 @@ import { getToken, getTenantId } from "@/utils/auth";
 import { goodsType } from "@/utils/searchArray";
 import load from "@/utils/loading";
 import { permission } from "@/utils/directivePage";
-import ImageCropper from '@/components/ImageCropper'
+import ImageCropper from "@/components/ImageCropper";
 // import courseEvaluateVue from '@/views/teamDetail/componentCourse/courseEvaluate.vue';
 let validPrice = (rule, value, callback) => {
   if ((value == "" && typeof value == "string") || value == null) {
@@ -1071,7 +1095,7 @@ export default {
     pagination,
     Tooltip,
     Upload,
-    ImageCropper
+    ImageCropper,
   },
   name: "shopList",
   data() {
@@ -1096,15 +1120,15 @@ export default {
         musicGroupShow: null,
         courseViewType: null,
         replacementShow: null,
-        courseFeeShowOrganId:null,
-        educationShowOrganId:null,
-        memberFeeShowOrganId:null,
-        replacementShowOrganId:null,
-        studentShowOrganId:null
+        courseFeeShowOrganId: null,
+        educationShowOrganId: null,
+        memberFeeShowOrganId: null,
+        replacementShowOrganId: null,
+        studentShowOrganId: null,
       },
       headers: {
         Authorization: getToken(),
-        tenantId: getTenantId()
+        tenantId: getTenantId(),
       },
       searchLsit: [],
       tableList: [],
@@ -1316,21 +1340,21 @@ export default {
         ],
       },
       selectGoodsList: [],
-      tenantId:'',
+      tenantId: "",
       cropperOptions: {
         autoCrop: true, //是否默认生成截图框
         autoCropWidth: 300, //默认生成截图框宽度
         autoCropHeight: 300, //默认生成截图框高度
         fixedBox: true, //是否固定截图框大小 不允许改变
         previewsCircle: false, //预览图是否是圆形
-        title: '商品图片', //模态框上显示的标题
+        title: "商品图片", //模态框上显示的标题
       },
     };
   },
-async  mounted() {
+  async mounted() {
     // 获取分部
-    this.tenantId = this.$helpers.tenantId
-  await  this.$store.dispatch("setBranchs");
+    this.tenantId = this.$helpers.tenantId;
+    await this.$store.dispatch("setBranchs");
     this.init();
   },
   methods: {
@@ -1519,6 +1543,7 @@ async  mounted() {
     },
     onShopOperation(type, row) {
       // 添加或修改
+
       let params = {
         type: type,
       };
@@ -1723,9 +1748,15 @@ async  mounted() {
           if (form.replacementShowOrganId) {
             form.replacementShowOrganId = form.replacementShowOrganId.join(",");
           }
-          if(!form.studentShowOrganId&&!form.educationShowOrganId&&!form.courseFeeShowOrganId&&!form.courseFeeShowOrganId&&!form.replacementShowOrganId){
-            this.$message.error('请至少选择一个可见分部')
-            return
+          if (
+            !form.studentShowOrganId &&
+            !form.educationShowOrganId &&
+            !form.courseFeeShowOrganId &&
+            !form.courseFeeShowOrganId &&
+            !form.replacementShowOrganId
+          ) {
+            this.$message.error("请至少选择一个可见分部");
+            return;
           }
           form.goodsList = null;
           if (this.addType == "create" || this.addType == "copy") {
@@ -1806,6 +1837,12 @@ async  mounted() {
 };
 </script>
 <style lang="scss" scoped>
+/deep/.el-table__header,
+/deep/.el-table__body,
+/deep/.el-table__footer {
+   table-layout: inherit!important;
+  border-collapse: separate;
+}
 .alert {
   margin-bottom: 22px;
 }
@@ -1829,5 +1866,4 @@ async  mounted() {
     margin-right: 4px;
   }
 }
-
 </style>

+ 3 - 0
src/views/businessManager/shopManager/shopOperation.vue

@@ -750,6 +750,9 @@ export default {
               // 判断有没有Id,如果有则删除
               delete tempForm.id;
             }
+            tempForm.sellCount = 0;
+            tempForm.stockCount = 0;
+            tempForm.taxStockCount = 0;
             tempForm.status = "NO"; // 默认上架
             goodsAdd(tempForm).then((res) => {
               this.messageTips("保存", res);

+ 10 - 0
src/views/groupChatManager/api.js

@@ -91,3 +91,13 @@ export function addGroupMessageList(data) {
     data
   })
 }
+
+// 修改群聊
+export function updateImGroup(data) {
+  return request({
+    url: api + '/imGroup/updateImGroup',
+    method: 'POST',
+    // params: data,
+    data
+  })
+}

+ 58 - 13
src/views/groupChatManager/component/chatList.vue

@@ -12,9 +12,24 @@
           v-model.trim="searchForm.search"
           clearable
           @keyup.enter.native="search"
-          placeholder="群名称"
+          placeholder="群名称"
         ></el-input>
       </el-form-item>
+      <el-form-item prop="groupType">
+        <el-select
+          v-model.trim="searchForm.groupType"
+          clearable
+          filterable
+          placeholder="群聊类型"
+        >
+          <el-option
+            v-for="(item, index) in catgGoupTypeList"
+            :key="index"
+            :value="item.value"
+            :label="item.label"
+          ></el-option>
+        </el-select>
+      </el-form-item>
       <el-form-item>
         <el-button native-type="submit" type="primary">搜索</el-button>
         <el-button native-type="reset" type="danger">重置</el-button>
@@ -38,18 +53,36 @@
         <el-table-column
           align="center"
           prop="id"
-          label="群"
+          label="群"
         ></el-table-column>
         <el-table-column
           align="center"
           prop="name"
-          label="群名称"
+          label="群名称"
         ></el-table-column>
+        <el-table-column align="center" prop="groupType" label="群聊类型">
+          <template slot-scope="scope">
+            <div>
+              {{ scope.row.groupType | catgGoupType }}
+            </div>
+          </template>
+        </el-table-column>
         <el-table-column
           align="center"
           prop="memberNum"
           label="人数"
         ></el-table-column>
+        <el-table-column align="center" prop="memberNum" label="操作">
+          <template slot-scope="scope">
+            <div>
+              <auth auths="imGroup/updateImGroup">
+                <el-button type="text" @click="resetCat(scope.row)"
+                  >修改</el-button
+                >
+              </auth>
+            </div>
+          </template>
+        </el-table-column>
       </el-table>
       <pagination
         sync
@@ -60,7 +93,8 @@
         @pagination="getList"
       />
     </div>
-    <eidtPostMsg ref='eidtPostMsg' @clear="clearCom"/>
+    <eidtPostMsg ref="eidtPostMsg" @clear="clearCom" />
+    <eidtCatInfo ref="eidtCatInfo" @getList='getList' />
   </div>
 </template>
 <script>
@@ -70,15 +104,18 @@ import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
 import { getTimes } from "@/utils";
 import { getGroupList } from "../api";
-import eidtPostMsg from '../model/eidtPostMsg'
+import { catgGoupTypeList } from "@/utils/searchArray";
+import eidtPostMsg from "../model/eidtPostMsg";
+import eidtCatInfo from "../model/eidtCatInfo";
 export default {
-  components: { pagination,eidtPostMsg },
+  components: { pagination, eidtPostMsg ,eidtCatInfo},
   data() {
     return {
       searchForm: {
         search: null,
+        groupType: "",
       },
-
+      catgGoupTypeList,
       tableList: [],
       organList: [],
       rules: {
@@ -129,7 +166,7 @@ export default {
         this.$nextTick(() => {
           this.tableList.forEach((course) => {
             if (idList.indexOf(course.id) != -1) {
-            this.$refs.multipleSelection.toggleRowSelection(course, true);
+              this.$refs.multipleSelection.toggleRowSelection(course, true);
             }
           });
           this.isNewPage = false;
@@ -143,20 +180,25 @@ export default {
       this.getList();
     },
     onReSet() {
-      this.searchForm.search =
-      this.clearCom()
+      this.searchForm.search = "";
+      this.searchForm.groupType = "";
+      this.rules.page = 1;
+      this.getList();
     },
     postMsg() {
       if (!this.chioseIdList || this.chioseIdList.length <= 0) {
-        this.$message.error("请至少选择一个群");
+        this.$message.error("请至少选择一个群");
         return;
       }
-      this.$refs.eidtPostMsg.openDioag(this.chioseIdList)
+      this.$refs.eidtPostMsg.openDioag(this.chioseIdList);
     },
     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) => {
@@ -197,6 +239,9 @@ export default {
         }
       }
     },
+    resetCat(row){
+      this.$refs.eidtCatInfo.openResetDioag(row)
+    }
   },
 };
 </script>

+ 34 - 24
src/views/groupChatManager/component/timingMsgList.vue

@@ -8,14 +8,18 @@
       @reset="onReSet"
     >
       <el-form-item>
-        <el-select
-          v-model.trim="searchForm.sendFlag"
-          placeholder="状态"
-        >
+        <el-select v-model.trim="searchForm.sendType" placeholder="消息类型" clearable>
+          <el-option label="即时发送" value="NOW"></el-option>
+          <el-option label="定时发送" value="TIMING"> </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-select v-model.trim="searchForm.sendFlag" placeholder="状态" clearable>
           <el-option label="已发送" :value="true"></el-option>
           <el-option label="未发送" :value="false"> </el-option>
         </el-select>
       </el-form-item>
+
       <el-form-item>
         <el-button native-type="submit" type="primary">搜索</el-button>
         <el-button native-type="reset" type="danger">重置</el-button>
@@ -27,15 +31,16 @@
         :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
         :data="tableList"
       >
-        <el-table-column
-          align="center"
-          prop="sendTime"
-          label="发送时间"
-        >
-        <template slot-scope="scope">
-              {{ scope.row.sendTime | dayjsFormat }}
+        <el-table-column align="center" prop="sendTime" label="消息类型">
+          <template slot-scope="scope">
+            {{ scope.row.sendType == "NOW" ? "即时发送" : "定时发送" }}
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="sendTime" label="发送时间">
+          <template slot-scope="scope">
+            {{ scope.row.sendTime | dayjsFormat }}
             {{ scope.row.sendTime | dayjsFormatMinute }}
-        </template>
+          </template>
         </el-table-column>
         <el-table-column
           align="center"
@@ -69,13 +74,16 @@
               </auth>
               <auth
                 auths="imSendGroupMessage/update"
-                 v-if="!scope.row.sendFlag"
+                v-if="!scope.row.sendFlag"
               >
                 <el-button type="text" @click="resetGroup(scope.row)"
                   >修改</el-button
                 >
               </auth>
-              <auth auths="imSendGroupMessage/delete" v-if="!scope.row.sendFlag">
+              <auth
+                auths="imSendGroupMessage/delete"
+                v-if="!scope.row.sendFlag"
+              >
                 <el-button type="text" @click="deleteGroup(scope.row)"
                   >删除</el-button
                 >
@@ -92,8 +100,8 @@
         :page-sizes="rules.page_size"
         @pagination="getList"
       />
-      <lookGroup ref='lookGroup' />
-        <eidtPostMsg ref='eidtPostMsg' />
+      <lookGroup ref="lookGroup" />
+      <eidtPostMsg ref="eidtPostMsg" />
     </div>
   </div>
 </template>
@@ -103,15 +111,16 @@ import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
 import { getTimes } from "@/utils";
-import { getGroupMessageList,deteleGroupMessage } from "../api";
-import lookGroup from '../model/lookGroup.vue'
-import eidtPostMsg from '../model/eidtPostMsg'
+import { getGroupMessageList, deteleGroupMessage } from "../api";
+import lookGroup from "../model/lookGroup.vue";
+import eidtPostMsg from "../model/eidtPostMsg";
 export default {
-  components: { pagination ,lookGroup,eidtPostMsg},
+  components: { pagination, lookGroup, eidtPostMsg },
   data() {
     return {
       searchForm: {
         sendFlag: null,
+        sendType: "",
       },
 
       tableList: [],
@@ -163,15 +172,16 @@ export default {
     },
     onReSet() {
       this.searchForm.sendFlag = null;
-      this.search()
+      this.searchForm.sendType = "";
+      this.search();
     },
     lookGroup(row) {
-      this.$refs.lookGroup.openDioag(row)
+      this.$refs.lookGroup.openDioag(row);
     },
     resetGroup(row) {
-       this.$refs.eidtPostMsg.openResetDioag(row)
+      this.$refs.eidtPostMsg.openResetDioag(row);
     },
-      deleteGroup(row) {
+    deleteGroup(row) {
       // deteleGroupMessage
       this.$confirm("确定删除?", "提示", {
         confirmButtonText: "确定",

+ 1 - 1
src/views/groupChatManager/index.vue

@@ -4,7 +4,7 @@
   <div class="m-container">
     <h2>
       <div class="squrt"></div>
-      群管理
+      群管理
     </h2>
 
     <div class="m-core">

+ 121 - 0
src/views/groupChatManager/model/eidtCatInfo.vue

@@ -0,0 +1,121 @@
+<template>
+  <div>
+    <el-dialog
+      width="500px"
+      title="修改群聊"
+      :visible.sync="lookVisible"
+      :before-close="onClose"
+    >
+      <el-form :model="formes" label-width="120px" ref="eidtPostMsg">
+        <el-form-item
+          label="群聊名称"
+          :rules="[{ required: true, message: '请输入群聊名称' }]"
+          prop="name"
+        >
+          <el-input class="w100" v-model="formes.name"></el-input>
+        </el-form-item>
+        <el-form-item
+          label="群聊类型"
+          :rules="[{ required: true, message: '请选择群聊类型' }]"
+          prop="groupType"
+        >
+          <el-select
+          class="w100"
+            v-model.trim="formes.groupType"
+            clearable
+            filterable
+            placeholder="群聊类型"
+          >
+            <el-option
+              v-for="(item, index) in catgGoupTypeList"
+              :key="index"
+              :value="item.value"
+              :label="item.label"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="onClose">取 消</el-button>
+        <el-button type="primary" @click="submitMsg">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { updateImGroup } from "../api";
+import { catgGoupTypeList } from "@/utils/searchArray";
+export default {
+  name: "eidtPostMsg",
+  data() {
+    return {
+      formes: {
+        id: "",
+        name: "",
+        groupType: "",
+      },
+      catgGoupTypeList,
+      lookVisible: false,
+      chioseIdList: null,
+      activeRow: null,
+    };
+  },
+
+  mounted() {
+    this.init();
+  },
+  methods: {
+    init() {},
+    openDioag(chioseIdList) {
+      this.chioseIdList = chioseIdList;
+      this.lookVisible = true;
+    },
+    openResetDioag(row) {
+
+      // this.activeRow = row;
+      this.formes = { ...row};
+      this.lookVisible = true;
+    },
+    onClose() {
+      this.formes = {
+        id: "",
+        name: "",
+        groupType: "",
+      };
+      this.$refs["eidtPostMsg"].resetFields();
+      this.lookVisible = false;
+    },
+    submitMsg() {
+      this.$refs.eidtPostMsg.validate(async (flag) => {
+        if (flag) {
+          try {
+            const res = await updateImGroup({...this.formes})
+            this.$message.success('修改成功')
+            this.$emit('getList')
+            this.onClose()
+          } catch (e) {
+            console.log(e);
+          }
+        }
+      });
+    },
+    getName(val) {
+      this.formes.fileName = val.data.name;
+    },
+    payDate() {
+      let self = this;
+      return {
+        firstDayOfWeek: 1,
+        disabledDate(time) {
+          return time.getTime() + 86400000 < new Date().getTime();
+        },
+      };
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.w100 {
+  width: 100%!important;
+}
+</style>

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

@@ -150,3 +150,61 @@ export const updateLiveGoodsMapperStatus= data => {
     requestType: 'form',
   })
 }
+
+
+// 获取直播间预约人数
+export const getRoomUser= data => {
+  return request({
+    url: '/api-web/imLiveBroadcastRoom/query/roomUser',
+    method: 'post',
+    data,
+  })
+}
+
+// 获取直播间黑名单
+export const getBlackList= data => {
+  return request({
+    url: '/api-web/imLiveRoomBlack/queryBlackList',
+    method: 'post',
+    data,
+  })
+}
+
+// 获取待加入黑名单的学生名单
+export const getWaitBlackList= data => {
+  return request({
+    url: '/api-web/imLiveRoomBlack/queryStudentList',
+    method: 'post',
+    data,
+  })
+}
+
+
+// 添加黑名单
+export const addBlackList= data => {
+  return request({
+    url: '/api-web/imLiveRoomBlack/add',
+    method: 'post',
+    data,
+  })
+}
+
+
+// 删除黑名单
+export const deteleBlackList= data => {
+  return request({
+    url: '/api-web/imLiveRoomBlack/delete',
+    method: 'post',
+    data,
+  })
+}
+
+// 商品销售详情
+export const getGoodsOrderList= data => {
+  return request({
+    url: '/api-web/imLiveBroadcastRoom/queryLiveRoomGoodsOrderList',
+    method: 'get',
+    data,
+    params: data
+  })
+}

+ 68 - 24
src/views/liveClassManager/index.vue

@@ -121,6 +121,20 @@
             prop="createdByName"
             label="创建人"
           ></el-table-column>
+          <el-table-column align="center" prop="createdByName" label="预约人数">
+            <template slot-scope="scope">
+              <div>
+                <auth auths="imLiveBroadcastRoom/query/roomUser">
+                  <el-button
+                    type="text"
+                    @click="lookReservationDetail(scope.row)"
+                  >
+                    {{ scope.row.roomReservationNum }}</el-button
+                  >
+                </auth>
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column align="center" prop="studentId" label="操作">
             <template slot-scope="scope">
               <div>
@@ -148,10 +162,7 @@
                   >直播详情</el-button
                 >
                 <auth auths="liveGoodsMapper/page">
-                  <el-button
-                    type="text"
-
-                    @click="setShop(scope.row)"
+                  <el-button type="text" @click="setShop(scope.row)"
                     >商品设置</el-button
                   >
                 </auth>
@@ -177,6 +188,16 @@
                     >删除</el-button
                   >
                 </auth>
+                <auth auths="imLiveBroadcastRoom/queryLiveRoomGoodsOrderList">
+                  <el-button type="text" @click="gotoBlacklist(scope.row)"
+                    >黑名单</el-button
+                  >
+                </auth>
+                <auth auths="/liveBlackList">
+                  <el-button type="text" @click="gotoBuylist(scope.row)"
+                    >购买商品</el-button
+                  >
+                </auth>
               </div>
             </template>
           </el-table-column>
@@ -200,6 +221,9 @@
     >
       <shareDetail @close="shareVisible = false" :row="activeRow" />
     </el-dialog>
+    <popularizeRoom @getList="getList" ref="popularizeRoom" />
+    <reservationDetail ref="reservationDetail" />
+    <sellShopList ref="sellShopList" />
   </div>
 </template>
 
@@ -210,6 +234,9 @@ import { getTimes } from "@/utils";
 import pagination from "@/components/Pagination/index";
 import shareDetail from "./modals/shareDetail.vue";
 import load from "@/utils/loading";
+import popularizeRoom from "./modals/popularizeRoom.vue";
+import reservationDetail from "./modals/reservationDetail.vue";
+import sellShopList from './modals/sellShopList'
 import {
   getLiveBroadcastList,
   delLiveBroadcast,
@@ -217,7 +244,7 @@ import {
   opsPopularize,
 } from "./api";
 export default {
-  components: { pagination, shareDetail },
+  components: { pagination, shareDetail, popularizeRoom, reservationDetail,sellShopList },
   data() {
     return {
       searchForm: {
@@ -338,32 +365,49 @@ export default {
       if (row.popularize) {
         popularize = 0;
         str = "取消推广";
+
       } else {
         popularize = 1;
         str = "推广";
+        // this.$refs.popularizeRoom.openDioag(row);
       }
-      this.$confirm(`您是否${str}直播间"${row.roomTitle}"`, "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(async () => {
-          try {
-            const res = await opsPopularize({
-              popularize,
-              id: row.id,
-            });
-            this.$message.success(`${str}成功`);
-            this.getList();
-          } catch (e) {
-            console.log(e);
-          }
+       this.$confirm(`您是否${str}直播间"${row.roomTitle}"`, "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
         })
-        .catch(() => {});
+          .then(async () => {
+            try {
+              const res = await opsPopularize({
+                popularize,
+                id: row.id,
+              });
+              this.$message.success(`${str}成功`);
+              this.getList();
+            } catch (e) {
+              console.log(e);
+            }
+          })
+          .catch(() => {});
     },
-    setShop(row){
-      this.$router.push({path:'/business/liveShopControl',query:{roomUid:row.roomUid}})
+    setShop(row) {
+      this.$router.push({
+        path: "/business/liveShopControl",
+        query: { roomUid: row.roomUid },
+      });
       //
+    },
+    lookReservationDetail(row) {
+      this.$refs.reservationDetail.openDioag(row);
+    },
+    gotoBlacklist(row) {
+      this.$router.push({
+        path: "/business/liveBlackList",
+        query: { roomUid: row.roomUid, name: row.roomTitle },
+      });
+    },
+    gotoBuylist(row){
+      this.$refs.sellShopList.openDioag(row)
     }
   },
 };

+ 154 - 0
src/views/liveClassManager/modals/popularizeRoom.vue

@@ -0,0 +1,154 @@
+<template>
+  <div>
+    <el-dialog
+      width="600px"
+      title="首页推广"
+      :visible.sync="lookVisible"
+      :before-close="onClose"
+      append-to-body
+    >
+      <el-form :model="form" label-width="80px" ref="form">
+        <el-form-item
+          label="推广类型"
+          prop="type"
+          :rules="[{ required: true, message: '请选择分部' }]"
+        >
+          <el-radio-group v-model="form.type" @change="changeType">
+            <el-radio label="all">全员</el-radio>
+            <el-radio label="organ">分部</el-radio>
+            <el-radio label="school">合作单位</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item
+          v-if="form.type == 'school' || form.type == 'organ'"
+          label="分部"
+          prop="organId"
+          :rules="[{ required: true, message: '请选择分部' }]"
+        >
+          <select-all
+            v-model.trim="form.organId"
+            filterable
+            clearable
+            placeholder="请选择分部"
+            @change="changeSection"
+          >
+            <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
+          v-if="form.type == 'school'"
+          label="合作单位"
+          prop="school"
+          :rules="[{ required: true, message: '请选择合作单位' }]"
+        >
+          <select-all
+            v-model.trim="form.school"
+            :disabled="form.organId.length <= 0"
+            filterable
+            clearable
+            multiple
+          >
+            <el-option
+              v-for="(item, index) in cooperationList"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
+          </select-all>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submit">确 定</el-button>
+        <el-button type="primary" @click="onClose">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { addLiveGoodsMapper, addGroupMessageList } from "../api";
+import { queryByOrganId } from "@/api/systemManage";
+export default {
+  name: "eidtPostMsg",
+
+  data() {
+    return {
+      organList: [],
+      cooperationList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      form: {
+        type: "",
+        organId: [],
+        school: [],
+      },
+      lookVisible: false,
+    };
+  },
+
+  mounted() {
+    this.$store.dispatch("setBranchs");
+  },
+  methods: {
+    async submit() {
+      try {
+        this.$emit("getList");
+        this.onClose();
+      } catch (e) {
+        console.log(e);
+      }
+
+      // 开始  addGroupMessageList
+      /**
+       *
+
+       */
+      console.log(this.chioseIdList);
+    },
+    onClose() {
+      this.lookVisible = false;
+    },
+    openDioag(row) {
+      this.activeRow = row;
+      this.lookVisible = true;
+    },
+    changeType() {
+      this.$set(this.form, "organId", []);
+      this.$set(this.form, "school", []);
+    },
+    async changeSection(val) {
+      this.form.school = "";
+      if (this.form.type == "school" && val && val.length > 0) {
+        let organId = val.join(",");
+        try {
+          await queryByOrganId({ organId }).then((res) => {
+            if (res.code == 200) {
+              this.cooperationList = res.data;
+            }
+          });
+        } catch (e) {
+          console.log(e);
+        }
+      }
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.w100 {
+  width: 100%;
+}
+.btnWrap {
+  justify-content: flex-start;
+}
+</style>

+ 148 - 0
src/views/liveClassManager/modals/reservationDetail.vue

@@ -0,0 +1,148 @@
+<template>
+  <div>
+    <el-dialog
+      width="1000px"
+      title="预约人员"
+      :visible.sync="lookVisible"
+      :before-close="onClose"
+      append-to-body
+    >
+      <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>
+        <div class="tableWrap">
+          <el-table
+            style="width: 100%"
+            :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+            :data="tableList"
+            ref="multipleSelection"
+          >
+            <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="phone"
+              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>
+          <pagination
+            sync
+            :total.sync="rules.total"
+            :page.sync="rules.page"
+            :limit.sync="rules.limit"
+            :page-sizes="rules.page_size"
+            @pagination="getList"
+          />
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="onClose">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { getRoomUser } from "../api";
+import { getLiveGoodsMapperList } from "@/views/liveShopManger/api";
+import pagination from "@/components/Pagination/index";
+export default {
+  name: "eidtPostMsg",
+  components: { pagination },
+  data() {
+    return {
+      searchForm: {
+        search: "",
+      },
+      tableList: [],
+      organList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      addMuiscVisible: false,
+      multipleSelection: [],
+      chioseIdList: [],
+      isNewPage: false,
+      lookVisible: false,
+      activeRow: { sendFlag: false },
+    };
+  },
+
+  mounted() {},
+  methods: {
+    async getList() {
+      try {
+        const res = await getRoomUser({
+          ...this.searchForm,
+          page: this.rules.page,
+          rows: this.rules.limit,
+          roomUid: this.activeRow.roomUid,
+        });
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      this.searchForm.search = "";
+      this.search();
+    },
+    onClose() {
+      this.lookVisible = false;
+    },
+    openDioag(row) {
+      this.activeRow = row;
+      this.lookVisible = true;
+
+      this.getList();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.w100 {
+  width: 100%;
+}
+.btnWrap {
+  justify-content: flex-start;
+}
+</style>

+ 197 - 0
src/views/liveClassManager/modals/sellShopList.vue

@@ -0,0 +1,197 @@
+<template>
+  <div>
+    <el-dialog
+      width="1000px"
+      title="购买商品"
+      :visible.sync="lookVisible"
+      :before-close="onClose"
+      append-to-body
+    >
+      <div>
+        <descriptions :column="2">
+          <descriptions-item label="购买人数:">{{
+            statInfo.buyNum
+          }}人</descriptions-item>
+          <descriptions-item label="现金总额:">{{
+            statInfo.actualAmount | moneyFormat
+          }}元</descriptions-item>
+          <descriptions-item label="余额总额:">{{
+            statInfo.balance | moneyFormat
+          }}元</descriptions-item>
+          <descriptions-item label="销售总额:">{{
+            statInfo.totalAmount | moneyFormat
+          }}元</descriptions-item>
+        </descriptions>
+        <el-alert
+          title="直播商品"
+          :closable="false"
+          type="info"
+          style="margin: 20px 0"
+        ></el-alert>
+        <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>
+        <div class="tableWrap">
+          <el-table
+            style="width: 100%"
+            :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+            :data="tableList"
+            ref="multipleSelection"
+          >
+            <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="phone"
+              label="手机号"
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              prop="goodsName"
+              label="商品名称"
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              prop="payTime"
+              label="支付时间"
+            ></el-table-column>
+            <el-table-column align="center" prop="actualPrice" label="现金支付">
+              <template slot-scope="scope">
+                <div>
+                  {{ scope.row.actualPrice | moneyFormat(true) }}
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" prop="balance" label="余额支付">
+              <template slot-scope="scope">
+                <div>
+                  {{ scope.row.balance | moneyFormat(true) }}
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" prop="balance" label="支付总金额">
+              <template slot-scope="scope">
+                <div>
+                  {{ scope.row.expectPrice | moneyFormat(true) }}
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+          <pagination
+            sync
+            :total.sync="rules.total"
+            :page.sync="rules.page"
+            :limit.sync="rules.limit"
+            :page-sizes="rules.page_size"
+            @pagination="getList"
+          />
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="onClose">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { getGoodsOrderList } from "../api";
+import { getLiveGoodsMapperList } from "@/views/liveShopManger/api";
+import pagination from "@/components/Pagination/index";
+export default {
+  name: "eidtPostMsg",
+  components: { pagination },
+  data() {
+    return {
+      searchForm: {
+        search: "",
+      },
+      tableList: [],
+      organList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      addMuiscVisible: false,
+      multipleSelection: [],
+      chioseIdList: [],
+      isNewPage: false,
+      lookVisible: false,
+      activeRow: { sendFlag: false },
+      statInfo: {
+        totalAmount: 0,
+        buyNum: 0,
+        balance:0,
+        actualPrice:0
+      },
+    };
+  },
+
+  mounted() {},
+  methods: {
+    async getList() {
+      try {
+        const res = await getGoodsOrderList({
+          ...this.searchForm,
+          page: this.rules.page,
+          rows: this.rules.limit,
+          roomUid: this.activeRow.roomUid,
+        });
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+        if (res.data.statInfo) {
+          this.statInfo = { ...res.data.statInfo };
+        }
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      this.searchForm.search = "";
+      this.search();
+    },
+
+    onClose() {
+      this.lookVisible = false;
+    },
+    openDioag(row) {
+      this.activeRow = row;
+      this.lookVisible = true;
+      this.getList();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.w100 {
+  width: 100%;
+}
+.btnWrap {
+  justify-content: flex-start;
+}
+</style>

+ 227 - 0
src/views/liveClassManager/modals/setBlack.vue

@@ -0,0 +1,227 @@
+<template>
+  <div>
+    <el-dialog
+      width="1000px"
+      title="添加黑名单"
+      :visible.sync="lookVisible"
+      :before-close="onClose"
+      append-to-body
+    >
+      <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>
+        <div class="tableWrap">
+          <el-table
+            style="width: 100%"
+            :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+            :data="tableList"
+            @selection-change="handleSelectionChange"
+            @select="onTableSelect"
+            ref="multipleSelection"
+          >
+            <el-table-column type="selection" width="55"> </el-table-column>
+            <el-table-column
+              align="center"
+              prop="id"
+              label="学员编号"
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              prop="username"
+              label="学员姓名"
+            ></el-table-column>
+            <el-table-column align="center" prop="phone" label="手机号">
+            </el-table-column>
+          </el-table>
+          <pagination
+            sync
+            :total.sync="rules.total"
+            :page.sync="rules.page"
+            :limit.sync="rules.limit"
+            :page-sizes="rules.page_size"
+            @pagination="getList"
+          />
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submit">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { addBlackList, getWaitBlackList } from "../api";
+import { getLiveGoodsMapperList } from "@/views/liveShopManger/api";
+import pagination from "@/components/Pagination/index";
+export default {
+  name: "eidtPostMsg",
+  components: { pagination },
+  data() {
+    return {
+      searchForm: {
+        search: "",
+      },
+      tableList: [],
+      organList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      addMuiscVisible: false,
+      multipleSelection: [],
+      chioseIdList: [],
+      isNewPage: false,
+      lookVisible: false,
+      activeRow: { sendFlag: false },
+    };
+  },
+
+  mounted() {},
+  methods: {
+    async getList() {
+      try {
+        const res = await getWaitBlackList({
+          ...this.searchForm,
+          page: this.rules.page,
+          rows: this.rules.limit,
+          roomUid: this.activeRow.roomUid,
+        });
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+        let idList = this.chioseIdList.map((group) => {
+          return group.id;
+        });
+        this.isNewPage = true;
+        this.$nextTick(() => {
+          this.tableList.forEach((course) => {
+            if (idList.indexOf(course.id) != -1) {
+              this.$refs.multipleSelection.toggleRowSelection(course, true);
+            }
+          });
+          this.isNewPage = false;
+        });
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    search() {
+      this.rules.page = 1;
+      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.id;
+          })
+          .join(",");
+        const res = await addBlackList({
+          userIdList: idList,
+          roomUid: this.activeRow.roomUid,
+        });
+        this.$message.success("添加成功");
+        this.$emit("getList");
+        this.onClose();
+      } catch (e) {
+        console.log(e);
+      }
+
+      // 开始  addGroupMessageList
+      /**
+       *
+
+       */
+      console.log(this.chioseIdList);
+    },
+    handleSelectionChange(val) {
+      if (val.length > 0) {
+        this.chioseIdList = this.chioseIdList.concat(val);
+        this.chioseIdList = this.$helpers.lodash.uniqBy(
+          this.chioseIdList,
+          "id"
+        );
+      } else {
+        if (this.isNewPage) return;
+        let idList = this.chioseIdList.map((group) => {
+          return group.id;
+        });
+        this.$nextTick(() => {
+          let tableIdList = [];
+          this.tableList.forEach((group) => {
+            tableIdList.push(group.id);
+            if (idList.indexOf(group.id) != -1) {
+              this.$refs.multipleSelection.toggleRowSelection(group, false);
+            }
+          });
+          this.chioseIdList = this.$helpers.lodash.remove(
+            this.chioseIdList,
+            function (item) {
+              return tableIdList.indexOf(item.id) == -1;
+            }
+          );
+          if (this.chioseIdList.length <= 0) {
+            this.clearCom();
+          }
+        });
+      }
+    },
+    clearCom() {
+      this.chioseIdList = [];
+      this.$refs.multipleSelection.clearSelection();
+    },
+    onTableSelect(rows, row) {
+      let idList = this.chioseIdList.map((group) => {
+        return group.id;
+      });
+      if (idList.indexOf(row.id) != -1) {
+        this.chioseIdList.splice(idList.indexOf(row.id), 1);
+        if (this.chioseIdList.length <= 0) {
+          this.clearCom();
+        }
+      }
+    },
+    onClose() {
+      this.clearCom();
+      this.searchForm.search = ''
+      this.lookVisible = false;
+    },
+    openDioag(row) {
+      this.activeRow = row;
+      this.lookVisible = true;
+      this.getList();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.w100 {
+  width: 100%;
+}
+.btnWrap {
+  justify-content: flex-start;
+}
+</style>

+ 140 - 12
src/views/liveClassManager/newLiveClass.vue

@@ -33,7 +33,7 @@
           </el-form-item>
           <el-form-item
             label="主讲人"
-             class="nomb"
+            class="nomb"
             prop="speakerId"
             :rules="[{ required: true, message: '请输入主讲人' }]"
           >
@@ -63,7 +63,7 @@
           </el-form-item>
           <el-form-item
             label="直播开始时间"
-             class="nomb"
+            class="nomb"
             prop="liveStartTime"
             :rules="[{ required: true, message: '请选择直播开始时间' }]"
           >
@@ -75,9 +75,8 @@
               placeholder="请选择直播开始时间"
             >
             </el-date-picker>
-             <p style="color:red;">主讲人可提前30分钟进入直播间准备直播</p>
+            <p style="color: red">主讲人可提前30分钟进入直播间准备直播</p>
           </el-form-item>
-
         </el-row>
         <el-row class="row">
           <el-form-item
@@ -159,6 +158,75 @@
           </el-form-item>
         </el-row>
         <el-alert
+          title="观看权限配置"
+          type="info"
+          :closable="false"
+          style="margin-bottom: 20px"
+        ></el-alert>
+        <el-row class="row">
+          <el-form-item
+            class="mline"
+            label="观看权限"
+            prop="popularizeType"
+            label-width="120px"
+            :rules="[{ required: true, message: '请选择推广类型' }]"
+          >
+            <el-radio-group v-model="form.popularizeType" @change="changeType">
+              <el-radio label="ALL">全员</el-radio>
+              <el-radio label="ORGAN">分部</el-radio>
+              <el-radio label="SCHOOL">合作单位</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-row>
+        <el-row class="row">
+          <el-form-item
+            v-if="
+              form.popularizeType == 'SCHOOL' || form.popularizeType == 'ORGAN'
+            "
+            label="分部"
+            prop="organIds"
+            :rules="[{ required: true, message: '请选择分部' }]"
+          >
+            <select-all
+              v-model.trim="form.organIds"
+              filterable
+              clearable
+              placeholder="请选择分部"
+              @change="changeSection"
+            >
+              <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-row>
+        <el-row class="row">
+          <el-form-item
+            v-if="form.popularizeType == 'SCHOOL'"
+            label="合作单位"
+            prop="schoolIds"
+            :rules="[{ required: true, message: '请选择合作单位' }]"
+          >
+            <select-all
+              v-model.trim="form.schoolIds"
+              :disabled="form.organIds.length <= 0"
+              filterable
+              clearable
+              multiple
+            >
+              <el-option
+                v-for="(item, index) in cooperationList"
+                :key="index"
+                :label="item.name"
+                :value="item.id"
+              ></el-option>
+            </select-all>
+          </el-form-item>
+        </el-row>
+        <el-alert
           title="直播间信息"
           type="info"
           :closable="false"
@@ -206,7 +274,7 @@
             </el-radio-group>
           </el-form-item>
         </el-row>
-            <el-row class="row">
+        <el-row class="row">
           <el-form-item
             prop="roomConfig.whether_mic"
             label-width="120px"
@@ -220,6 +288,20 @@
             </el-radio-group>
           </el-form-item>
         </el-row>
+        <!-- <el-row class="row">
+          <el-form-item
+            prop="roomConfig.whether_view_shop_cart"
+            label-width="120px"
+            class="mline"
+            label="是否展示购物车"
+            :rules="[{ required: true, message: '是否展示购物车' }]"
+          >
+            <el-radio-group v-model="form.roomConfig.whether_view_shop_cart">
+              <el-radio :label="0">是</el-radio>
+              <el-radio :label="1">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-row> -->
       </el-form>
       <el-row class="row">
         <el-button type="primary" @click="preLook">预览</el-button>
@@ -243,6 +325,7 @@ import preview from "./modals/preview.vue";
 import axios from "axios";
 import { getToken, getTenantId } from "@/utils/auth";
 import { createLiveBroadcast, resetLiveBroadcastRoomList } from "./api";
+import { queryByOrganId } from "@/api/systemManage";
 export default {
   components: { preview },
   data() {
@@ -250,26 +333,46 @@ export default {
       name: "新建直播课",
       preLookVisible: false,
       form: {
+        organIds: [],
+        schoolIds: [],
         roomTitle: "",
         speakerId: "",
         liveStartTime: "",
         liveRemark: "",
         preTemplate: null,
-        roomConfig: { whether_like: 0, whether_chat: 0, whether_video: 0, whether_mic:0},
+        popularizeType: "ALL",
+        roomConfig: {
+          whether_like: 0,
+          whether_chat: 0,
+          whether_video: 0,
+          whether_mic: 0,
+          whether_view_shop_cart: 0,
+        },
         checkList: [],
       },
       remoteLoading: false,
       teacherList: [],
       checkList: [],
+      cooperationList: [],
+      isinit:true
     };
   },
   mounted() {
+    this.$store.dispatch("setBranchs");
     if (this.$route.query.id) {
       this.name = "修改直播间";
       // console.log()
-      this.form = { ...this.$route.query };
+      this.form = { ...this.$route.query, organIds: [],
+        schoolIds: [], };
       this.form.roomConfig = JSON.parse(this.$route.query.roomConfig);
-      console.log(this.form.roomConfig);
+
+      this.form.organIds =
+        this.$route.query.popularizeOrgIds.split(",").map(item=>{return item*1});
+
+      this.form.schoolIds=this.$route.query.popularizeSchoolIds.split(",").map(item=>{return item*1});
+
+      // this.form.popularizeType = "SCHOOL";
+        this.changeSection(this.form.organIds)
       this.remoteMethod(this.$route.query.speakerName);
       this.checkList.push(this.form.preTemplate * 1);
     }
@@ -287,7 +390,6 @@ export default {
       });
     },
     preLook() {
-      console.log(this.form);
       this.$refs.form.validate((flag) => {
         if (flag) {
           this.preLookVisible = true;
@@ -296,14 +398,13 @@ export default {
       });
     },
     setPreTemplate(index) {
-      console.log("调用", index);
       this.$set(this.form, "preTemplate", index);
       if (this.checkList.indexOf(index) == -1) {
         this.checkList.push(index);
       } else {
         this.checkList.splice(this.checkList.indexOf(index), 1);
       }
-      console.log("调用结束", index);
+      // console.log("调用结束", index);
       this.bindCheckBox();
     },
     remoteMethod(query) {
@@ -369,6 +470,8 @@ export default {
       this.$set(this.form, "preTemplate", this.checkList[0] || null);
     },
     async submit() {
+      this.form.popularizeOrgIds = this.form.organIds.join(",");
+      this.form.popularizeSchoolIds = this.form.schoolIds.join(",");
       if (this.$route.query.id) {
         // 修改
         try {
@@ -391,12 +494,37 @@ export default {
       }
       // createLiveBroadcast
     },
+    changeType() {
+      this.$set(this.form, "organIds", []);
+      this.$set(this.form, "schoolIds", []);
+    },
+    async changeSection(val) {
+
+      if(!this.isinit){
+         this.form.schoolIds = [];
+      }
+   console.log('进来了', this.form,(this.form.popularizeType == "SCHOOL" ) )
+      if (this.form.popularizeType == "SCHOOL" && val && val.length > 0) {
+
+        let organId = val.join(",");
+        try {
+          await queryByOrganId({ organId }).then((res) => {
+            if (res.code == 200) {
+              this.cooperationList = res.data;
+            }
+          });
+        } catch (e) {
+          console.log(e);
+        }
+      }
+     this.isinit = false
+    },
   },
 };
 </script>
 <style lang="scss" scoped>
 .nomb {
-  margin-bottom: 0px!important;
+  margin-bottom: 0px !important;
 }
 /deep/.mline {
   .el-form-item__content {

+ 311 - 0
src/views/liveClassManager/studentBlacklist.vue

@@ -0,0 +1,311 @@
+<template>
+  <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
+            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>
+      <div class="btnWrap">
+        <auth auths="imLiveRoomBlack/add">
+          <el-button
+            @click="addBlack"
+            type="primary"
+            style="margin-bottom: 10px"
+            >添加黑名单</el-button
+          >
+        </auth>
+        <auth auths="imLiveRoomBlack/delete">
+          <el-button @click="removes" type="primary" style="margin-bottom: 10px"
+            >移除黑名单</el-button
+          >
+        </auth>
+      </div>
+
+      <div class="tableWrap">
+        <el-table
+          style="width: 100%"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          :data="tableList"
+          @selection-change="handleSelectionChange"
+          @select="onTableSelect"
+          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="username"
+            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="imLiveRoomBlack/delete">
+                  <el-button type="text" @click="deteleBlack(scope.row)"
+                    >删除</el-button
+                  >
+                </auth>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          sync
+          :total.sync="rules.total"
+          :page.sync="rules.page"
+          :limit.sync="rules.limit"
+          :page-sizes="rules.page_size"
+          @pagination="getList"
+        />
+      </div>
+    </div>
+    <setBlack @getList="getList" ref="setBlack" />
+  </div>
+</template>
+<script>
+import { addLiveGoodsMapper, getBlackList, deteleBlackList } from "./api";
+import { getLiveGoodsMapperList } from "@/views/liveShopManger/api";
+import pagination from "@/components/Pagination/index";
+import setBlack from "./modals/setBlack";
+export default {
+  name: "eidtPostMsg",
+  components: { pagination, setBlack },
+  data() {
+    return {
+      searchForm: {
+        search: "",
+      },
+      tableList: [],
+      organList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      addMuiscVisible: false,
+      multipleSelection: [],
+      chioseIdList: [],
+      isNewPage: false,
+      lookVisible: false,
+      activeRow: { sendFlag: false },
+    };
+  },
+
+  mounted() {
+    this.getList();
+  },
+  methods: {
+    async getList() {
+      try {
+        const res = await getBlackList({
+          ...this.searchForm,
+          page: this.rules.page,
+          rows: this.rules.limit,
+          roomUid: this.$route.query.roomUid,
+        });
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+        let idList = this.chioseIdList.map((group) => {
+          return group.userId;
+        });
+        this.isNewPage = true;
+        this.$nextTick(() => {
+          this.tableList.forEach((course) => {
+            if (idList.indexOf(course.userId) != -1) {
+              this.$refs.multipleSelection.toggleRowSelection(course, true);
+            }
+          });
+          this.isNewPage = false;
+        });
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    search() {
+      this.rules.page = 1;
+      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.clearCom();
+      } catch (e) {
+        console.log(e);
+      }
+
+      // 开始  addGroupMessageList
+      /**
+       *
+
+       */
+
+    },
+    handleSelectionChange(val) {
+      if (val.length > 0) {
+        this.chioseIdList = this.chioseIdList.concat(val);
+        this.chioseIdList = this.$helpers.lodash.uniqBy(
+          this.chioseIdList,
+          "userId"
+        );
+      } else {
+        if (this.isNewPage) return;
+        let idList = this.chioseIdList.map((group) => {
+          return group.userId;
+        });
+        this.$nextTick(() => {
+          let tableIdList = [];
+          this.tableList.forEach((group) => {
+            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.userId) == -1;
+            }
+          );
+          if (this.chioseIdList.length <= 0) {
+            this.clearCom();
+          }
+        });
+      }
+    },
+    clearCom() {
+      this.chioseIdList = [];
+      this.$refs.multipleSelection.clearSelection();
+    },
+    onTableSelect(rows, row) {
+      let idList = this.chioseIdList.map((group) => {
+        return group.userId;
+      });
+      if (idList.indexOf(row.userId) != -1) {
+        this.chioseIdList.splice(idList.indexOf(row.userId), 1);
+        if (this.chioseIdList.length <= 0) {
+          this.clearCom();
+        }
+      }
+    },
+    onCancel() {
+      this.$router.push("/liveClassManager");
+      this.$store.dispatch("delVisitedViews", this.$route);
+    },
+    async deteleBlack(row) {
+      this.$confirm(`你确定将${row.username}移除黑名单?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          try {
+            const res = await deteleBlackList({
+              roomUid: this.$route.query.roomUid,
+              userIdList: row.userId + "",
+            });
+            this.getList();
+              this.clearCom();
+          } catch (e) {
+            console.log(e);
+          }
+        })
+        .catch();
+    },
+    addBlack() {
+      this.$refs.setBlack.openDioag({ roomUid: this.$route.query.roomUid });
+    },
+    removes() {
+      if (!this.chioseIdList || this.chioseIdList.length <= 0) {
+        this.$message.error("请至少选择一名学员");
+        return;
+      }
+      let str = this.chioseIdList
+        .map((group) => {
+          return group.username;
+        })
+        .join(",");
+      this.$confirm(`你确定将${str}移除黑名单?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          let idList = this.chioseIdList
+            .map((group) => {
+              return group.userId;
+            })
+            .join(",");
+          try {
+            const res = await deteleBlackList({
+              roomUid: this.$route.query.roomUid,
+              userIdList: idList,
+            });
+            this.$message.success("移除成功");
+            this.getList();
+              this.clearCom();
+          } catch (e) {
+            console.log(e);
+          }
+        })
+        .catch();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.w100 {
+  width: 100%;
+}
+.btnWrap {
+  justify-content: flex-start;
+}
+</style>