|
@@ -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>
|