浏览代码

提交一下

1
mo 3 年之前
父节点
当前提交
66bfa3bb84

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

@@ -79,3 +79,15 @@ export function resetGroupMessageList(data) {
     data
   })
 }
+
+
+//添加未发送消息的群列表
+export function addGroupMessageList(data) {
+  return request({
+    url: api + '/imSendGroupMessage/addGroupList',
+    method: 'POST',
+    // params: data,
+    requestType: 'form',
+    data
+  })
+}

+ 27 - 32
src/views/groupChatManager/model/addGroupmsg.vue

@@ -8,11 +8,7 @@
       append-to-body
     >
       <div class="m-container">
-        <el-form
-          :inline="true"
-          :model="searchForm"
-
-        >
+        <el-form :inline="true" :model="searchForm">
           <el-form-item>
             <el-input
               v-model.trim="searchForm.search"
@@ -61,7 +57,6 @@
             @pagination="getList"
           />
         </div>
-
       </div>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submit">确 定</el-button>
@@ -70,7 +65,7 @@
   </div>
 </template>
 <script>
-import { getGroupList1, deteleGroupMessage } from "../api";
+import { getGroupList, addGroupMessageList } from "../api";
 import pagination from "@/components/Pagination/index";
 export default {
   name: "eidtPostMsg",
@@ -94,16 +89,15 @@ export default {
       chioseIdList: [],
       isNewPage: false,
       lookVisible: false,
-      activeRow: {sendFlag:false},
+      activeRow: { sendFlag: false },
     };
   },
 
-  mounted() {
-  },
+  mounted() {},
   methods: {
     async getList() {
       try {
-        const res = await getGroupList1({
+        const res = await getGroupList({
           ...this.searchForm,
           page: this.rules.page,
           rows: this.rules.limit,
@@ -134,15 +128,34 @@ export default {
     onReSet() {
       this.searchForm.search = "";
       this.clearCom();
-      this.search()
+      this.search();
     },
-    submit() {
+    async submit() {
+      console.log('添加')
       if (!this.chioseIdList || this.chioseIdList.length <= 0) {
         this.$message.error("请至少选择一个群组");
         return;
       }
-      console.log(this.chioseIdList)
+      try {
+        let idList = this.chioseIdList
+          .map((group) => {
+            return group.id;
+          })
+          .join(",");
+          const res = await addGroupMessageList({ groupIds: idList,imSendGroupMessageId: this.activeRow.id,})
+          this.$message.success('添加成功')
+          this.$emit('getList')
+          this.onClose()
+      } catch (e) {
+        console.log(e);
+      }
+
+      // 开始  addGroupMessageList
+      /**
+       *
 
+       */
+      console.log(this.chioseIdList);
     },
     handleSelectionChange(val) {
       if (val.length > 0) {
@@ -201,24 +214,6 @@ export default {
       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>

+ 2 - 2
src/views/groupChatManager/model/lookGroup.vue

@@ -22,7 +22,7 @@
           </el-form-item>
         </el-form>
         <div class="btnWrap" v-if="!activeRow.sendFlag">
-          <auth auths="news/add">
+          <auth auths="imSendGroupMessage/queryGroupPage">
             <el-button
               type="primary"
               @click="addMsg"
@@ -91,7 +91,7 @@
             @pagination="getList"
           />
         </div>
-        <addGroupmsg ref="addGroupmsg" @clear="clearCom" />
+        <addGroupmsg ref="addGroupmsg" @clear="clearCom" @getList='getList'/>
       </div>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="onClose">确 定</el-button>

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

@@ -40,7 +40,6 @@ export const closeLiveBroadcast = data => {
 }
 
 //查询房间信息 getLiveBroadcastRoomList
-// imLiveBroadcastRoom/queryRoom
 export const getLiveBroadcastRoomDetail= data => {
   return request({
     url: '/api-web/imLiveBroadcastRoomMember/queryRoomDetail',