|
@@ -12,13 +12,13 @@
|
|
|
<el-input
|
|
|
v-model.trim="searchForm.search"
|
|
|
clearable
|
|
|
- @keyup.enter.native="
|
|
|
- (e) => {
|
|
|
- e.target.blur();
|
|
|
- $refs.searchForm.save();
|
|
|
- search();
|
|
|
- }
|
|
|
- "
|
|
|
+ @keyup.enter.native="
|
|
|
+ e => {
|
|
|
+ e.target.blur();
|
|
|
+ $refs.searchForm.save();
|
|
|
+ search();
|
|
|
+ }
|
|
|
+ "
|
|
|
placeholder="群聊名称"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
@@ -147,7 +147,7 @@ export default {
|
|
|
return {
|
|
|
searchForm: {
|
|
|
search: null,
|
|
|
- groupType: "",
|
|
|
+ groupType: ""
|
|
|
},
|
|
|
catgGoupTypeList,
|
|
|
tableList: [],
|
|
@@ -157,12 +157,12 @@ export default {
|
|
|
limit: 10, // 限制显示条数
|
|
|
page: 1, // 当前页
|
|
|
total: 0, // 总条数
|
|
|
- page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
+ page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
|
},
|
|
|
addMuiscVisible: false,
|
|
|
multipleSelection: [],
|
|
|
chioseIdList: [],
|
|
|
- isNewPage: false,
|
|
|
+ isNewPage: false
|
|
|
};
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
@@ -189,16 +189,16 @@ export default {
|
|
|
const res = await getSysGroupList({
|
|
|
...this.searchForm,
|
|
|
page: this.rules.page,
|
|
|
- rows: this.rules.limit,
|
|
|
+ rows: this.rules.limit
|
|
|
});
|
|
|
this.tableList = res.data.rows;
|
|
|
this.rules.total = res.data.total;
|
|
|
- let idList = this.chioseIdList.map((group) => {
|
|
|
+ let idList = this.chioseIdList.map(group => {
|
|
|
return group.id;
|
|
|
});
|
|
|
this.isNewPage = true;
|
|
|
this.$nextTick(() => {
|
|
|
- this.tableList.forEach((course) => {
|
|
|
+ this.tableList.forEach(course => {
|
|
|
if (idList.indexOf(course.id) != -1) {
|
|
|
this.$refs.multipleSelection.toggleRowSelection(course, true);
|
|
|
}
|
|
@@ -235,12 +235,12 @@ export default {
|
|
|
);
|
|
|
} else {
|
|
|
if (this.isNewPage) return;
|
|
|
- let idList = this.chioseIdList.map((group) => {
|
|
|
+ let idList = this.chioseIdList.map(group => {
|
|
|
return group.id;
|
|
|
});
|
|
|
this.$nextTick(() => {
|
|
|
let tableIdList = [];
|
|
|
- this.tableList.forEach((group) => {
|
|
|
+ this.tableList.forEach(group => {
|
|
|
tableIdList.push(group.id);
|
|
|
if (idList.indexOf(group.id) != -1) {
|
|
|
this.$refs.multipleSelection.toggleRowSelection(group, false);
|
|
@@ -248,7 +248,7 @@ export default {
|
|
|
});
|
|
|
this.chioseIdList = this.$helpers.lodash.remove(
|
|
|
this.chioseIdList,
|
|
|
- function (item) {
|
|
|
+ function(item) {
|
|
|
return tableIdList.indexOf(item.id) == -1;
|
|
|
}
|
|
|
);
|
|
@@ -263,7 +263,7 @@ export default {
|
|
|
this.$refs.multipleSelection.clearSelection();
|
|
|
},
|
|
|
onTableSelect(rows, row) {
|
|
|
- let idList = this.chioseIdList.map((group) => {
|
|
|
+ let idList = this.chioseIdList.map(group => {
|
|
|
return group.id;
|
|
|
});
|
|
|
if (idList.indexOf(row.id) != -1) {
|
|
@@ -279,15 +279,14 @@ export default {
|
|
|
gotoCatDetail(row) {
|
|
|
this.$router.push({
|
|
|
path: "/operateManager/chatDetail",
|
|
|
- query: { imGroupId: row.id, name: row.name },
|
|
|
+ query: { imGroupId: row.id, name: row.name }
|
|
|
});
|
|
|
console.log(row);
|
|
|
},
|
|
|
addChat() {
|
|
|
this.$refs.addChatForm.openDioag();
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
-<style lang='scss' scoped>
|
|
|
-</style>
|
|
|
+<style lang="scss" scoped></style>
|