Browse Source

群聊管理

1
mo 3 years ago
parent
commit
5964544e30

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

@@ -15,6 +15,15 @@ export function getGroupList(data) {
     data
   })
 }
+export function getGroupList1(data) {
+  return request({
+    url: api + '/imSendGroupMessage/queryGroupPage1',
+    method: 'POST',
+    // params: data,
+    requestType: 'form',
+    data
+  })
+}
 
 // 发送群聊消息
 export function sendGroupMsg(data) {
@@ -38,3 +47,35 @@ export function getGroupMessageList(data) {
     data
   })
 }
+
+//删除未发送的群消息
+export function deteleGroupMessage(data) {
+  return request({
+    url: api + '/imSendGroupMessage/delete',
+    method: 'POST',
+    // params: data,
+    requestType: 'form',
+    data
+  })
+}
+
+//删除未发送的群消息某几条
+export function deteleGroupMessageList(data) {
+  return request({
+    url: api + '/imSendGroupMessage/deleteGroupList',
+    method: 'POST',
+    // params: data,
+    requestType: 'form',
+    data
+  })
+}
+
+// 修改消息
+export function resetGroupMessageList(data) {
+  return request({
+    url: api + '/imSendGroupMessage/update',
+    method: 'POST',
+    // params: data,
+    data
+  })
+}

+ 1 - 1
src/views/groupChatManager/component/chatList.vue

@@ -20,7 +20,7 @@
         <el-button native-type="reset" type="danger">重置</el-button>
       </el-form-item>
     </save-form>
-    <auth auths="news/add">
+    <auth auths="imSendGroupMessage/send">
       <el-button @click="postMsg" type="primary" style="margin-bottom: 20px">
         消息群发
       </el-button>

+ 43 - 16
src/views/groupChatManager/component/timingMsgList.vue

@@ -28,13 +28,18 @@
         :data="tableList"
       >
         <el-table-column
-          align="sendTime"
-          prop="id"
+          align="center"
+          prop="sendTime"
           label="发送时间"
-        ></el-table-column>
+        >
+        <template slot-scope="scope">
+              {{ scope.row.sendTime | dayjsFormat }}
+            {{ scope.row.sendTime | dayjsFormatMinute }}
+        </template>
+        </el-table-column>
         <el-table-column
           align="center"
-          prop="name"
+          prop="operator"
           label="创建人"
         ></el-table-column>
         <el-table-column
@@ -59,21 +64,18 @@
             <div>
               <auth auths="musicGroupQuestionnaire/get">
                 <el-button type="text" @click="lookGroup(scope.row)"
-                  >查看群</el-button
+                  >查看群</el-button
                 >
               </auth>
               <auth
-                :auths="[
-                  'musicGroupQuestionnaire/get',
-                  'musicGroupQuestionnaire/update',
-                ]"
-                mulit
+                auths="imSendGroupMessage/update"
+                 v-if="!scope.row.sendFlag"
               >
                 <el-button type="text" @click="resetGroup(scope.row)"
                   >修改</el-button
                 >
               </auth>
-              <auth auths="musicGroupQuestionnaire/del">
+              <auth auths="imSendGroupMessage/delete" v-if="!scope.row.sendFlag">
                 <el-button type="text" @click="deleteGroup(scope.row)"
                   >删除</el-button
                 >
@@ -90,6 +92,8 @@
         :page-sizes="rules.page_size"
         @pagination="getList"
       />
+      <lookGroup ref='lookGroup' />
+        <eidtPostMsg ref='eidtPostMsg' />
     </div>
   </div>
 </template>
@@ -99,9 +103,11 @@ import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
 import { getTimes } from "@/utils";
-import { getGroupMessageList } from "../api";
+import { getGroupMessageList,deteleGroupMessage } from "../api";
+import lookGroup from '../model/lookGroup.vue'
+import eidtPostMsg from '../model/eidtPostMsg'
 export default {
-  components: { pagination },
+  components: { pagination ,lookGroup,eidtPostMsg},
   data() {
     return {
       searchForm: {
@@ -159,9 +165,30 @@ export default {
       this.searchForm.sendFlag = null;
       this.search()
     },
-    lookGroup(row) {},
-    resetGroup(row) {},
-    deleteGroup(row) {},
+    lookGroup(row) {
+      this.$refs.lookGroup.openDioag(row)
+    },
+    resetGroup(row) {
+       this.$refs.eidtPostMsg.openResetDioag(row)
+    },
+      deleteGroup(row) {
+      // deteleGroupMessage
+      this.$confirm("确定删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          deteleGroupMessage({ id: row.id }).then((res) => {
+            if (res.code === 200) {
+              this.$message.success("删除成功");
+              this.getList();
+              // this.routeOrderStatus = false;
+            }
+          });
+        })
+        .catch();
+    },
   },
 };
 </script>

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

@@ -14,12 +14,12 @@
         @tab-click="handleClick"
       >
         <el-tab-pane label="群聊管理" lazy name="1">
-          <chatList v-if="activeIndex === '1'" />
-          <!-- <dayList v-if="activeIndex === '1'&& permission('/childrensDay')" /> -->
+          <chatList v-if="activeIndex === '1'&& permission('/chatList')" />
+
         </el-tab-pane>
         <el-tab-pane label="定时消息" lazy name="2">
-          <timingMsgList v-if="activeIndex === '2'"/>
-          <!-- <resetDays v-if="activeIndex === '2'&& permission('/resetDays')" /> -->
+          <timingMsgList v-if="activeIndex === '2'&& permission('/timingMsgList')"/>
+
         </el-tab-pane>
       </tab-router>
     </div>

+ 232 - 0
src/views/groupChatManager/model/addGroupmsg.vue

@@ -0,0 +1,232 @@
+<template>
+  <div>
+    <el-dialog
+      width="1000px"
+      title="添加群组"
+      :visible.sync="lookVisible"
+      :before-close="onClose"
+      append-to-body
+    >
+      <div class="m-container">
+        <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="name"
+              label="群组名称"
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              prop="memberNum"
+              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 { getGroupList1, deteleGroupMessage } from "../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 getGroupList1({
+          ...this.searchForm,
+          page: this.rules.page,
+          rows: this.rules.limit,
+          imSendGroupMessageId: this.activeRow.id,
+        });
+        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()
+    },
+    submit() {
+      if (!this.chioseIdList || this.chioseIdList.length <= 0) {
+        this.$message.error("请至少选择一个群组");
+        return;
+      }
+      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.lookVisible = false;
+    },
+    openDioag(row) {
+      this.activeRow = row;
+      this.lookVisible = true;
+      console.log(row);
+      this.getList();
+    },
+    deleteGroup(row) {
+      // deteleGroupMessage
+      this.$confirm("确定删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          deteleGroupMessage({ id: row.id }).then((res) => {
+            if (res.code === 200) {
+              this.$message.success("删除成功");
+              this.getList();
+              // this.routeOrderStatus = false;
+            }
+          });
+        })
+        .catch();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.w100 {
+  width: 100%;
+}
+.btnWrap {
+  justify-content: flex-start;
+}
+</style>

+ 55 - 25
src/views/groupChatManager/model/eidtPostMsg.vue

@@ -36,6 +36,7 @@
             placeholder="请选择发送时间"
             format="yyyy-MM-dd HH:mm:ss"
             value-format="yyyy-MM-dd HH:mm:ss"
+            :picker-options="payDate()"
           >
           </el-date-picker>
         </el-form-item>
@@ -51,16 +52,13 @@
             :rows="3"
           ></el-input>
         </el-form-item>
-        <el-form-item
-          label="消息类型"
-          prop="messageType"
-        >
+        <el-form-item label="消息类型" prop="messageType">
           <el-radio-group
             v-model="formes.messageType"
             @change="
               () => {
                 formes.fileUrl = '';
-                formes.fileName = ''
+                formes.fileName = '';
               }
             "
           >
@@ -72,7 +70,7 @@
           label="附件(图片)"
           prop="fileUrl"
           v-if="formes.messageType === 'IMG'"
-           :rules="[{ required: true, message: '请上传图片' }]"
+          :rules="[{ required: true, message: '请上传图片' }]"
         >
           <singe-file-upload
             tips="仅支持上传 PNG/JPG"
@@ -81,12 +79,17 @@
             @getName="getName"
           />
         </el-form-item>
-        <el-form-item label="附件(PDF)" prop="fileUrl"  v-if="formes.messageType === 'FILE'"  :rules="[{ required: true, message: '请上传文件' }]">
+        <el-form-item
+          label="附件(PDF)"
+          prop="fileUrl"
+          v-if="formes.messageType === 'FILE'"
+          :rules="[{ required: true, message: '请上传文件' }]"
+        >
           <singe-file-upload
             tips="仅支持上传PDF文件"
             accept=".pdf"
             v-model="formes.fileUrl"
-             @getName="getName"
+            @getName="getName"
           />
         </el-form-item>
       </el-form>
@@ -98,7 +101,7 @@
   </div>
 </template>
 <script>
-import { sendGroupMsg  } from '../api'
+import { sendGroupMsg,resetGroupMessageList } from "../api";
 export default {
   name: "eidtPostMsg",
   data() {
@@ -109,10 +112,11 @@ export default {
         sendTime: "",
         messageContent: "",
         messageType: "",
-        fileName:''
+        fileName: "",
       },
       lookVisible: false,
       chioseIdList: null,
+      activeRow: null,
     };
   },
 
@@ -125,6 +129,16 @@ export default {
       this.chioseIdList = chioseIdList;
       this.lookVisible = true;
     },
+    openResetDioag(row) {
+      console.log(row);
+      if (row.sendTime) {
+        row.postType = "1";
+      }
+      this.activeRow = row;
+
+      this.formes = { ...row };
+      this.lookVisible = true;
+    },
     onClose() {
       this.formes = {
         id: "",
@@ -132,7 +146,7 @@ export default {
         sendTime: "",
         messageContent: "",
         messageType: "",
-        fileName:''
+        fileName: "",
       };
       this.$refs["eidtPostMsg"].resetFields();
       this.lookVisible = false;
@@ -141,26 +155,42 @@ export default {
       this.$refs.eidtPostMsg.validate(async (flag) => {
         if (flag) {
           try {
-            let idList = this.chioseIdList
-              .map((group) => {
-                return group.id;
-              })
-              .join(",");
-            let obj = { ...this.formes, targetIds: idList };
-            const res = await sendGroupMsg({ ...obj });
-            this.$message.success('发送成功')
-            this.$emit('clear')
-            this.onClose()
+            if (this.activeRow && this.activeRow.id) {
+              let obj = { ...this.formes };
+              const res = await resetGroupMessageList({ ...obj });
+              this.$message.success("修改成功");
+              this.$emit("clear");
+              this.onClose();
+            } else {
+              let idList = this.chioseIdList
+                .map((group) => {
+                  return group.id;
+                })
+                .join(",");
+              let obj = { ...this.formes, targetIds: idList };
+              const res = await sendGroupMsg({ ...obj });
+              this.$message.success("发送成功");
+              this.$emit("clear");
+              this.onClose();
+            }
           } catch (e) {
             console.log(e);
           }
         }
       });
     },
-    getName(val){
-
-      this.formes.fileName = val.data.name
-    }
+    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>

+ 291 - 0
src/views/groupChatManager/model/lookGroup.vue

@@ -0,0 +1,291 @@
+<template>
+  <div>
+    <el-dialog
+      width="1200px"
+      title="查看群组"
+      :visible.sync="lookVisible"
+      :before-close="onClose"
+    >
+      <div class="m-container">
+        <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" v-if="!activeRow.sendFlag">
+          <auth auths="news/add">
+            <el-button
+              type="primary"
+              @click="addMsg"
+              style="margin-bottom: 20px"
+            >
+              添加
+            </el-button>
+          </auth>
+          <auth auths="imSendGroupMessage/deleteGroupList">
+            <el-button
+              type="danger"
+              style="margin-bottom: 20px"
+              @click="deleteGroups"
+            >
+              删除
+            </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="id"
+              label="群组"
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              prop="name"
+              label="群组名称"
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              prop="memberNum"
+              label="人数"
+            ></el-table-column>
+            <el-table-column align="center" prop="id" label="操作">
+              <template slot-scope="scope">
+                <div>
+                  <auth
+                    auths="imSendGroupMessage/deleteGroupList"
+                    v-if="!activeRow.sendFlag"
+                  >
+                    <el-button type="text" @click="deleteGroup(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>
+        <addGroupmsg ref="addGroupmsg" @clear="clearCom" />
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="onClose">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { getGroupList1, deteleGroupMessageList } from "../api";
+import pagination from "@/components/Pagination/index";
+import addGroupmsg from './addGroupmsg';
+export default {
+  name: "eidtPostMsg",
+  components: { pagination ,addGroupmsg},
+  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 getGroupList1({
+          ...this.searchForm,
+          page: this.rules.page,
+          rows: this.rules.limit,
+          imSendGroupMessageId: this.activeRow.id,
+        });
+        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();
+    },
+    addMsg() {
+      // if (!this.chioseIdList || this.chioseIdList.length <= 0) {
+      //   this.$message.error("请至少选择一个群组");
+      //   return;
+      // }
+      this.$refs.addGroupmsg.openDioag(this.activeRow);
+    },
+    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.lookVisible = false;
+    },
+    openDioag(row) {
+      this.activeRow = row;
+      this.lookVisible = true;
+      console.log(row);
+      this.getList();
+    },
+    deleteGroup(row) {
+      // deteleGroupMessage
+      this.$confirm("确定删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          deteleGroupMessageList({
+            groupIds: row.id,
+            imSendGroupMessageId: this.activeRow.id,
+          }).then((res) => {
+            if (res.code === 200) {
+              this.$message.success("删除成功");
+              this.getList();
+              // this.routeOrderStatus = false;
+            }
+          });
+        })
+        .catch();
+    },
+    deleteGroups() {
+      if (!this.chioseIdList || this.chioseIdList.length <= 0) {
+        this.$message.error("请至少选择一个群组");
+        return;
+      }
+      this.$confirm("确定删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          let idList = this.chioseIdList.map((group) => {
+            return group.id;
+          }).join(',');
+          deteleGroupMessageList({
+            groupIds: idList,
+            imSendGroupMessageId: this.activeRow.id,
+          }).then((res) => {
+            if (res.code === 200) {
+              this.$message.success("删除成功");
+              this.getList();
+              // this.routeOrderStatus = false;
+            }
+          });
+        })
+        .catch();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.w100 {
+  width: 100%;
+}
+.btnWrap {
+  justify-content: flex-start;
+}
+</style>

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

@@ -124,7 +124,7 @@
           <el-table-column align="center" prop="studentId" label="操作">
             <template slot-scope="scope">
               <div>
-                <auth auths="imLiveBroadcastRoom/opsPopularize">
+                <auth auths="imLiveBroadcastRoom/opsPopularize"  v-if="scope.row.liveState != 2">
                   <el-button type="text" @click="popularizeRoom(scope.row)">{{
                     scope.row.popularize == 1 ? "取消推广" : "首页推广"
                   }}</el-button>