|
@@ -0,0 +1,80 @@
|
|
|
+<template>
|
|
|
+ <div class="ent-group-index">
|
|
|
+ <div class="j-main">
|
|
|
+ <van-cell-group>
|
|
|
+ <van-cell
|
|
|
+ v-for="item in groupList"
|
|
|
+ :key="item.id"
|
|
|
+ :title="item.s_name"
|
|
|
+ :is-link="item.isPut !== 0"
|
|
|
+ @click="setGroupEvent(item)"
|
|
|
+ />
|
|
|
+ </van-cell-group>
|
|
|
+ </div>
|
|
|
+ <div class="j-footer">
|
|
|
+ <div class="j-button-group">
|
|
|
+ <div class="j-button-confirm">
|
|
|
+ <van-icon name="plus" />
|
|
|
+ <span style="margin-left: 8px">新增分组</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { Cell, CellGroup, Icon } from 'vant'
|
|
|
+import { getGroupList } from '@/api/modules/'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'EntGroupIndex',
|
|
|
+ components: {
|
|
|
+ [Cell.name]: Cell,
|
|
|
+ [CellGroup.name]: CellGroup,
|
|
|
+ [Icon.name]: Icon
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ groupList: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getMyFollowList()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async getMyFollowList() {
|
|
|
+ const { error_code: code, data } = await getGroupList({
|
|
|
+ type: 'get'
|
|
|
+ })
|
|
|
+ if (code === 0) {
|
|
|
+ this.groupList = data
|
|
|
+ }
|
|
|
+ },
|
|
|
+ setGroupEvent(data) {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/entgroup/detail',
|
|
|
+ query: {
|
|
|
+ id: data.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.ent-group-index {
|
|
|
+ .van-cell {
|
|
|
+ padding: 15px 16px;
|
|
|
+ &::after {
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ }
|
|
|
+ .van-cell__title {
|
|
|
+ font-size: 16px;
|
|
|
+ color: #171826;
|
|
|
+ line-height: 24px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|