diff --git a/src/project/qianxinan/AppGroupTags/AppGroupTags.vue b/src/project/qianxinan/AppGroupTags/AppGroupTags.vue
index a0a35fb9..95a5066c 100644
--- a/src/project/qianxinan/AppGroupTags/AppGroupTags.vue
+++ b/src/project/qianxinan/AppGroupTags/AppGroupTags.vue
@@ -3,11 +3,11 @@
@@ -18,7 +18,7 @@
-
+
{{item.name}}
@@ -29,11 +29,12 @@
{{row.name}}
-
50
+
{{row.groupCount}}
+
@@ -44,10 +45,9 @@
data() {
return {
deptList: [],
- current: 1,
- pages: 2,
list: [],
- activeIndex: null
+ activeIndex: null,
+ totalInfo: {}
}
},
computed: {
@@ -56,27 +56,36 @@
onLoad() {
this.deptList = [{name: this.user.departName, id: this.user.departId}]
this.getList()
+ this.getTotal()
+ uni.$on('updateGroup', () => {
+ this.getList()
+ this.getTotal()
+ })
},
onShow() {
document.title = '群标签'
},
methods: {
getListInit() {
- this.current = 1
- this.pages = 2
this.getList()
+ this.getTotal()
},
getList() {
- if(this.current > this.pages) return
- this.$http.post(`/app/wxcp/wxgroupchattag/listAll?current=${this.current}`).then(res=> {
+ this.$http.post(`/app/wxcp/wxgroupchattag/listAllByDeptId?departId=${this.deptList[0].id}`).then(res=> {
if(res?.data) {
- this.list = this.current == 1? res.data.records : [...this.list,...res.data.records]
- this.pages = res.data.pages
+ this.list = res.data
+ }
+ })
+ },
+ getTotal() {
+ this.$http.post(`/app/wxcp/wxgroupchattag/simpleStatistics?departId=${this.deptList[0].id}`).then(res=> {
+ if(res?.data) {
+ this.totalInfo = res.data
}
})
},
toGrouping(row) {
- uni.navigateTo({url: `./groupGrouping?name=${row.name}&id=${row.taggroupId}`})
+ uni.navigateTo({url: `./groupGrouping?name=${row.name}&tagId=${row.id}&departId=${this.deptList[0].id}`})
},
viewList(index) {
if(this.activeIndex == index) {
@@ -85,10 +94,6 @@
this.activeIndex = index
}
},
- onReachBottom() {
- this.current ++
- this.getList()
- }
}
diff --git a/src/project/qianxinan/AppGroupTags/groupGrouping.vue b/src/project/qianxinan/AppGroupTags/groupGrouping.vue
index 030ab69f..8ddb9f1f 100644
--- a/src/project/qianxinan/AppGroupTags/groupGrouping.vue
+++ b/src/project/qianxinan/AppGroupTags/groupGrouping.vue
@@ -5,7 +5,7 @@
search-icon-color="#999" color="#333" height="58" @search="getListInit" @clear="getListInit">
-
+
@@ -17,6 +17,7 @@
+
@@ -30,9 +31,10 @@
keyword: '',
titleName: '',
tagId: '',
+ departId: '',
current: 1,
pages: 2,
- list: []
+ list: [],
}
},
computed: {
@@ -40,8 +42,12 @@
},
onLoad(option) {
this.titleName = option.name
- this.tagId = option.id
- this.getListInit()
+ this.tagId = option.tagId
+ this.departId = option.departId
+ this.getList()
+ uni.$on('updateGroup', () => {
+ this.getListInit()
+ })
},
onShow() {
document.title = this.titleName
@@ -54,10 +60,10 @@
},
getList() {
if(this.current > this.pages) return
- this.$http.post(`/app/wxcp/wxgroup/list?current=${this.current}&groupName=${this.keyword}&size=10`).then(res=> {
+ this.$http.post(`/app/wxcp/wxgroupchattag/queryGroupByTagId?tagId=${this.tagId}&departId=${this.departId}&name=${this.keyword}¤t=${this.current}`).then(res=> {
if(res?.data) {
- this.list = this.current == 1? res.data.records : [...this.list,...res.data.records]
- this.pages = res.data.pages
+ this.list = this.current == 1 ? res.data.records : [...this.list, ...rs,data.records]
+ this.pages = res.data.total
}
})
},
@@ -72,8 +78,8 @@
})
},
add() {
- uni.navigateTo({url: `./groupList`})
- }
+ uni.navigateTo({url: `./groupList?tagId=${this.tagId}&departId=${this.departId}`})
+ },
},
onReachBottom() {
this.current ++
diff --git a/src/project/qianxinan/AppGroupTags/groupList.vue b/src/project/qianxinan/AppGroupTags/groupList.vue
index 8f793e26..d8314d5e 100644
--- a/src/project/qianxinan/AppGroupTags/groupList.vue
+++ b/src/project/qianxinan/AppGroupTags/groupList.vue
@@ -5,16 +5,18 @@
search-icon-color="#999" color="#333" height="58" @search="getListInit" @clear="getListInit">
-
-
-

+
+
+

+

-
222222{{index}}
+
{{item.name}}
-
@@ -26,27 +28,76 @@
appName: '群列表',
data() {
return {
-
+ tagId: '',
+ departId: '',
+ current: 1,
+ pages: 2,
+ list: [],
+ keyword: ''
}
},
computed: {
...mapState(['user']),
},
+ onLoad(option) {
+ this.tagId = option.tagId
+ this.departId = option.departId
+ this.getList()
+ },
onShow() {
document.title = '群列表'
},
methods: {
- getTotal() {
- this.$http.post(`/app/appwxuserfamiliarityrate/wxTopStatistics`).then(res=> {
+ getListInit() {
+ this.current = 1
+ this.pages = 2
+ this.getList()
+ },
+ getList() {
+ if(this.current > this.pages) return
+ this.$http.post(`/app/wxcp/wxgroupchattag/queryGroupByDeptId?tagId=${this.tagId}&departId=${this.departId}&name=${this.keyword}`).then(res=> {
if(res?.data) {
- this.form = {...res.data}
+ res.data.records.map((item) => {
+ item.isCheck = false
+ })
+ this.list = this.current == 1 ? res.data.records : [...this.list, ...rs,data.records]
+ this.pages = res.data.total
}
})
},
checkClick(index) {
-
+ this.list[index].isCheck = !this.list[index].isCheck
+ },
+ confirm() {
+ var ids = []
+ this.list.map((item) => {
+ if(item.isCheck) {
+ ids.push(item.id)
+ }
+ })
+ if(!ids.length) {
+ return this.$u.toast('请选择群')
+ }
+ var tagIds = [this.tagId]
+ this.$http.post(`/app/wxcp/wxgroupchattag/markTagForWeb`, {
+ tagIds: tagIds,
+ groupIds: ids,
+ type: 0
+ }).then(res=> {
+ if(res.code == 0) {
+ uni.$emit('updateGroup')
+ this.$u.toast('提交成功')
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 1000)
+ }
+ })
}
},
+ onReachBottom() {
+ this.current++
+ this.getList()
+ }
}