lex 2 年 前
コミット
f70ad7b97b
2 ファイル変更24 行追加76 行削除
  1. 2 1
      src/constant/index.js
  2. 22 75
      src/views/groupChatManager/component/chatList.vue

+ 2 - 1
src/constant/index.js

@@ -512,7 +512,8 @@ export const catType = {
   CLASS: "班级群",
   REPERTOIRE_PLAY: "曲目演奏课",
   TRAINING: "训练营",
-  VIP: "VIP课群"
+  VIP: "VIP课群",
+  LIVE: "直播课群"
 };
 export const catDotType = {
   MUSIC: "乐团",

+ 22 - 75
src/views/groupChatManager/component/chatList.vue

@@ -1,40 +1,19 @@
 <!--  -->
 <template>
   <div class="m-container">
-    <save-form
-      :inline="true"
-      :model="searchForm"
-      @submit="search"
-      @reset="onReSet"
-      ref="searchForm"
-    >
+    <save-form :inline="true" :model="searchForm" @submit="search" @reset="onReSet" ref="searchForm">
       <el-form-item>
-        <el-input
-          v-model.trim="searchForm.search"
-          clearable
-          @keyup.enter.native="
-            e => {
-              e.target.blur();
-              $refs.searchForm.save();
-              search();
-            }
-          "
-          placeholder="群聊名称"
-        ></el-input>
+        <el-input v-model.trim="searchForm.search" clearable @keyup.enter.native="e => {
+            e.target.blur();
+            $refs.searchForm.save();
+            search();
+          }
+          " 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 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>
@@ -56,30 +35,12 @@
     </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 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="name"
-          label="群聊名称"
-        ></el-table-column>
-        <el-table-column
-          align="center"
-          prop="memo"
-          label="群备注"
-        ></el-table-column>
+        <el-table-column align="center" prop="id" label="群聊"></el-table-column>
+        <el-table-column align="center" prop="name" label="群聊名称"></el-table-column>
+        <el-table-column align="center" prop="memo" label="群备注"></el-table-column>
         <el-table-column align="center" prop="groupType" label="群聊类型">
           <template slot-scope="scope">
             <div>
@@ -94,36 +55,22 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column
-          align="center"
-          prop="memberNum"
-          label="人数"
-        ></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="/chatDetail">
-                <el-button type="text" @click="gotoCatDetail(scope.row)"
-                  >详情</el-button
-                >
+                <el-button type="text" @click="gotoCatDetail(scope.row)">详情</el-button>
               </auth>
               <auth auths="imGroup/updateImGroup">
-                <el-button type="text" @click="cancelCat(scope.row)"
-                  >解散</el-button
-                >
+                <el-button type="text" @click="cancelCat(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"
-      />
+      <pagination sync :total.sync="rules.total" :page.sync="rules.page" :limit.sync="rules.limit"
+        :page-sizes="rules.page_size" @pagination="getList" />
     </div>
     <eidtPostMsg ref="eidtPostMsg" @clear="clearCom" />
     <eidtCatInfo ref="eidtCatInfo" @getList="getList" />
@@ -166,7 +113,7 @@ export default {
     };
   },
   //生命周期 - 创建完成(可以访问当前this实例)
-  created() {},
+  created() { },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     // 获取分部
@@ -248,7 +195,7 @@ export default {
           });
           this.chioseIdList = this.$helpers.lodash.remove(
             this.chioseIdList,
-            function(item) {
+            function (item) {
               return tableIdList.indexOf(item.id) == -1;
             }
           );