|
@@ -10,6 +10,7 @@
|
|
@click="setGroupEvent(item)"
|
|
@click="setGroupEvent(item)"
|
|
/>
|
|
/>
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
|
|
+ <Empty v-if="groupList.length === 0" />
|
|
</div>
|
|
</div>
|
|
<div class="j-footer">
|
|
<div class="j-footer">
|
|
<div class="j-button-group">
|
|
<div class="j-button-group">
|
|
@@ -36,7 +37,7 @@
|
|
@input="setGroupingName"
|
|
@input="setGroupingName"
|
|
/>
|
|
/>
|
|
<div class="dialog-footer">
|
|
<div class="dialog-footer">
|
|
- <van-button type="default" @click="showAddGroupingDialog = false">
|
|
|
|
|
|
+ <van-button type="default" @click="cancelAddGrouping">
|
|
取消
|
|
取消
|
|
</van-button>
|
|
</van-button>
|
|
<van-button
|
|
<van-button
|
|
@@ -56,6 +57,7 @@
|
|
import { Button, Cell, CellGroup, Dialog, Field, Icon } from 'vant'
|
|
import { Button, Cell, CellGroup, Dialog, Field, Icon } from 'vant'
|
|
import { mapActions } from 'vuex'
|
|
import { mapActions } from 'vuex'
|
|
import { getGroupList } from '@/api/modules/'
|
|
import { getGroupList } from '@/api/modules/'
|
|
|
|
+import Empty from '@/components/common/Empty'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'EntGroupIndex',
|
|
name: 'EntGroupIndex',
|
|
@@ -65,7 +67,8 @@ export default {
|
|
[Dialog.name]: Dialog,
|
|
[Dialog.name]: Dialog,
|
|
[Button.name]: Button,
|
|
[Button.name]: Button,
|
|
[Icon.name]: Icon,
|
|
[Icon.name]: Icon,
|
|
- [Field.name]: Field
|
|
|
|
|
|
+ [Field.name]: Field,
|
|
|
|
+ Empty
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -82,11 +85,17 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
...mapActions('group', ['setEntGroupList']),
|
|
...mapActions('group', ['setEntGroupList']),
|
|
async getMyFollowList() {
|
|
async getMyFollowList() {
|
|
|
|
+ const loading = this.$toast.loading()
|
|
const { error_code: code, data } = await this.setEntGroupList()
|
|
const { error_code: code, data } = await this.setEntGroupList()
|
|
console.log(data)
|
|
console.log(data)
|
|
if (code === 0) {
|
|
if (code === 0) {
|
|
|
|
+ loading.clear()
|
|
this.groupList = data?.groupUserArr || []
|
|
this.groupList = data?.groupUserArr || []
|
|
}
|
|
}
|
|
|
|
+ else {
|
|
|
|
+ loading.clear()
|
|
|
|
+ this.$toast('获取分组列表失败')
|
|
|
|
+ }
|
|
},
|
|
},
|
|
setGroupEvent(data) {
|
|
setGroupEvent(data) {
|
|
if (data.name === '默认分组')
|
|
if (data.name === '默认分组')
|
|
@@ -132,6 +141,10 @@ export default {
|
|
else {
|
|
else {
|
|
this.$toast('新增分组失败')
|
|
this.$toast('新增分组失败')
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ cancelAddGrouping() {
|
|
|
|
+ this.groupingName = ''
|
|
|
|
+ this.showAddGroupingDialog = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -156,6 +169,9 @@ export default {
|
|
.van-dialog__header {
|
|
.van-dialog__header {
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
}
|
|
}
|
|
|
|
+ .van-field__control {
|
|
|
|
+ padding-right: 3.32rem;
|
|
|
|
+ }
|
|
.dialog-footer {
|
|
.dialog-footer {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|