Browse Source

Merge branch 'feat/v20241212-人脉银行' into dev

GuYun-D 3 months ago
parent
commit
8344279588

+ 1 - 1
src/api/freeQueuing.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // api docs: https://www.showdoc.com.cn/2275703555064913/11558417901706052
 
 // 查询免单列表
-export function getFreeQueuingListApi(params) {
+export function bagetFreeQueuingListApi(params) {
   return request({
     url: '/platform-participation-free/getAll',
     method: 'get',

+ 85 - 0
src/api/rm-bank/index.js

@@ -0,0 +1,85 @@
+import request from '@/utils/request'
+
+// api docs: https://www.showdoc.com.cn/2598833910230611/11558452686114862
+
+// 查询俱乐部列表
+export function getClubListApi(params) {
+  return request({
+    url: '/people-bank-club/getClubAll',
+    method: 'get',
+    params
+  })
+}
+
+// 新增俱乐部
+export function addClubApi(data) {
+  return request({
+    url: '/people-bank-club/postClub',
+    method: 'post',
+    data
+  })
+}
+
+// 编辑俱乐部
+export function editClubApi(data) {
+  return request({
+    url: '/people-bank-club/patchClub',
+    method: 'patch',
+    data
+  })
+}
+
+// 删除俱乐部
+export function deleteClubApi(params) {
+  return request({
+    url: '/people-bank-club/deleteClubById',
+    method: 'delete',
+    params
+  })
+}
+
+// 获取俱乐部详情
+export function getClubDetailApi(params){
+  return request({
+    url: '/people-bank-club/getClubById',
+    method: "GET",
+    params
+  })
+}
+
+// 设置会员为管理
+export function patchClubMemberIsAdminApi(params){
+  return request({
+    url: '/people-bank-club-member/patchClubMemberIsAdmin',
+    method: "PATCH",
+    params
+  })
+}
+
+// 获取会员列表
+export function getClubMemberApi(params){
+  return request({
+    url: '/people-bank-member/getMemberAll',
+    method: "GET",
+    params
+  })
+}
+
+// 获取活动列表   
+// 获取会员列表
+export function getActivitiesAllApi(params){
+  return request({
+    url: '/people-bank-activities/getActivitiesAll',
+    method: "GET",
+    params
+  })
+}
+
+// 获取活动详情
+export function getActivityDetailApi(params){
+  return request({
+    url: '/people-bank-activities/getActivitiesById',
+    method: "GET",
+    params
+  })
+}

+ 199 - 0
src/views/rm-bank/activity/components/DetailModal.vue

@@ -0,0 +1,199 @@
+<template>
+  <el-dialog :close-on-click-modal="false" title="提示" :visible.sync="activityVisible" width="50%">
+    <div v-loading="isLoading">
+      <el-descriptions title="活动信息" :column="2" border>
+        <el-descriptions-item>
+          <template slot="label">所属俱乐部ID</template>
+          {{ activityInfo.clubId || '--' }}
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label">活动类型</template>
+          <el-tag type="primary" size="mini" v-if="activityInfo.type == 1">公益活动</el-tag>
+          <el-tag type="warning" size="mini" v-if="activityInfo.type == 2">会议</el-tag>
+          <el-tag type="success" size="mini" v-if="activityInfo.type == 3">爱心传递</el-tag>
+          <el-tag type="info" size="mini" v-if="activityInfo.type == 4">公告</el-tag>
+          <el-tag type="danger" size="mini" v-if="activityInfo.type == 5">商机</el-tag>
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label">活动标题</template>
+          {{ activityInfo.title || '--' }}
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label">活动封面</template>
+          <el-image style="height: 50px" :src="activityInfo.cover" :preview-src-list="[activityInfo.cover]" fit="cover" />
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label">活动内容</template>
+          {{ activityInfo.content || '--' }}
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label">状态</template>
+          <el-tag type="primary" size="mini" v-if="activityInfo.state == 2">已开始</el-tag>
+          <el-tag type="warning" size="mini" v-if="activityInfo.state == 4">已结束</el-tag>
+          <el-tag type="success" size="mini" v-if="activityInfo.state == 4">已结束</el-tag>
+          <el-tag type="info" size="mini" v-if="activityInfo.state == 5">已撤销</el-tag>
+          <el-tag type="danger" size="mini" v-if="activityInfo.state == 1">草稿</el-tag>
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label">报名范围</template>
+          <el-tag type="primary" size="mini" v-if="activityInfo.state == 1">所有用户</el-tag>
+          <el-tag type="success" size="mini" v-if="activityInfo.state == 2">仅限俱乐部会员</el-tag>
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label">宣传视频</template>
+          <video style="width: 100px; height: 50px" :src="activityInfo.promotionalVideo"></video>
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label">开始时间</template>
+          {{ activityInfo.startTime || '--' }}
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label">结束时间</template>
+          {{ activityInfo.endTime || '--' }}
+        </el-descriptions-item>
+
+        <el-descriptions-item :span="1">
+          <template slot="label">活动地址</template>
+          {{ activityInfo.activitiesAddress || '--' }}
+        </el-descriptions-item>
+
+        <el-descriptions-item :span="1">
+          <template slot="label">参与方式</template>
+          {{ activityInfo.participationMethod || '--' }}
+        </el-descriptions-item>
+
+        <el-descriptions-item :span="1">
+          <template slot="label">注意事项</template>
+          {{ activityInfo.precautions || '--' }}
+        </el-descriptions-item>
+      </el-descriptions>
+
+      <!-- 发布信息 -->
+      <el-descriptions class="margin-top" title="发布信息" :column="2" border>
+        <el-descriptions-item>
+          <template slot="label">发布人会员ID</template>
+          {{ activityInfo.publishMemberId || '--' }}
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label">发布人昵称</template>
+          {{ activityInfo.publishMemberName || '--' }}
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label">发布人头像</template>
+          <el-image style="height: 50px" :src="activityInfo.publishMemberAvatar" :preview-src-list="[activityInfo.publishMemberAvatar]" fit="cover" />
+        </el-descriptions-item>
+      </el-descriptions>
+
+      <!-- 商机信息 -->
+      <el-descriptions class="margin-top" title="商机信息" :column="2" border v-if="activityInfo.type == 5">
+        <el-descriptions-item>
+          <template slot="label">商机类型</template>
+          <el-tag type="primary" size="mini" v-if="activityInfo.opportunityType == 1">寻求合作</el-tag>
+          <el-tag type="warning" size="mini" v-if="activityInfo.opportunityType == 2">寻求采购</el-tag>
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label">商机联系方式</template>
+          {{ activityInfo.opportunityContactNumber || '--' }}
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label">商机联系邮箱</template>
+          {{ activityInfo.opportunityContactEmail || '--' }}
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label">商机方法链接</template>
+          <a v-if="activityInfo.opportunityAuthorityUrl" :href="activityInfo.opportunityAuthorityUrl" target="_blank"></a>
+          <span v-on:select="">--</span>
+        </el-descriptions-item>
+      </el-descriptions>
+
+      <!-- 参与会员 -->
+      <el-descriptions class="margin-top" title="参与会员列表" :column="2" border>
+        <el-descriptions-item>
+          <el-table :data="tableData" :style="{ width: '100%' }">
+            <el-table-column prop="memberId" label="会员ID" width="180" />
+            <el-table-column prop="memberName" label="会员昵称" width="180" />
+            <el-table-column prop="memberAvatar" label="会员头像" align="center" width="120">
+              <template slot-scope="scope">
+                <el-image :src="scope.row.memberAvatar" style="width: 40px; height: 40px; border-radius: 50%" :preview-src-list="[scope.row.memberAvatar]" fit="cover" />
+              </template>
+            </el-table-column>
+            <el-table-column prop="memberMobile" label="会员手机号" />
+            <el-table-column prop="state" label="报名状态" align="center" width="120">
+              <template slot-scope="scope">
+                <el-tag type="primary" size="mini" v-if="activityInfo.state == 1">已报名</el-tag>
+                <el-tag type="success" size="mini" v-if="activityInfo.state == 2">已确认</el-tag>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-descriptions-item>
+      </el-descriptions>
+    </div>
+    <template #footer>
+      <span class="dialog-footer">
+        <el-button size="mini" @click="close">取消</el-button>
+      </span>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import { getActivityDetailApi } from '@/api/rm-bank/index'
+
+export default {
+  data() {
+    return {
+      isLoading: false,
+      activityVisible: false,
+      activityInfo: {},
+      members: []
+    }
+  },
+
+  methods: {
+    async show(activityId) {
+      if (!activityId) {
+        return this.$message.error('活动id不能为空')
+      }
+      this.activityVisible = true
+
+      try {
+        this.isLoading = true
+        const res = await getActivityDetailApi({ id: activityId })
+        this.activityInfo = res.data.activities
+        this.members = res.data.activitiesMembers
+      } finally {
+        this.isLoading = false
+      }
+    },
+
+    close() {
+      this.activityVisible = false
+    },
+
+    reset() {
+      this.activityInfo = {}
+      this.members = []
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.margin-top {
+  margin-top: 20px;
+}
+</style>

+ 185 - 0
src/views/rm-bank/activity/index.vue

@@ -0,0 +1,185 @@
+<template>
+  <div class="payreturnPage">
+    <!-- 搜索 -->
+    <div class="formSearch">
+      <!-- 搜索条件 -->
+      <el-form :inline="true" :model="query" class="demo-form-inline">
+        <el-form-item label="搜索">
+          <el-input clearable v-model="query.search" placeholder="标题/内容/活动地址" />
+        </el-form-item>
+
+        <el-form-item label="活动类型">
+          <el-select clearable @change="query.opportunityType = ''" v-model="query.typeEnum" placeholder="请选择">
+            <el-option label="公益活动" value="PUBLIC" />
+            <el-option label="会议" value="MEETING" />
+            <el-option label="爱心传递" value="LOVE" />
+            <el-option label="公告" value="NOTICE" />
+            <el-option label="商机" value="BUSINESS" />
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="商机" v-if="query.typeEnum === 'BUSINESS'">
+          <el-select clearable v-model="query.opportunityType" placeholder="请选择">
+            <el-option label="寻求合作" value="BUSINESS_TYPE" />
+            <el-option label="寻求采购" value="BUSINESS_TYPE2" />
+          </el-select>
+        </el-form-item>
+
+        <el-form-item>
+          <el-button type="primary" plain @click="search">查询</el-button>
+          <el-button plain @click="clear">重置</el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <!-- 表格 -->
+    <div class="tableBox">
+      <el-table ref="multipleTable" :data="tableData" border :header-cell-style="{ background: '#EEF3FF', color: '#333333' }" tooltip-effect="dark" style="width: 100%">
+        <el-table-column align="center" type="index" label="#" width="55"></el-table-column>
+        <!-- <el-table-column prop="id" label="会员ID" align="center" width="220" /> -->
+        <el-table-column prop="clubId" label="俱乐部ID" align="center" width="80" />
+        <el-table-column prop="type" label="活动类型" align="center" width="90">
+          <template slot-scope="scope">
+            <el-tag type="primary" size="mini" v-if="scope.row.type == 1">公益活动</el-tag>
+            <el-tag type="warning" size="mini" v-if="scope.row.type == 2">会议</el-tag>
+            <el-tag type="success" size="mini" v-if="scope.row.type == 3">爱心传递</el-tag>
+            <el-tag type="info" size="mini" v-if="scope.row.type == 4">公告</el-tag>
+            <el-tag type="danger" size="mini" v-if="scope.row.type == 5">商机</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column prop="title" label="标题" align="center" width="220" />
+        <el-table-column prop="avatar" label="封面" align="center" width="70">
+          <template slot-scope="scope">
+            <el-image :src="scope.row.cover" style="width: 40px; height: 40px; border-radius: 50%" :preview-src-list="[scope.row.cover]" fit="cover" />
+          </template>
+        </el-table-column>
+
+        <el-table-column show-overflow-tooltip prop="content" label="活动内容" align="center" width="220" />
+        <el-table-column prop="publishMemberId" label="发布人会员ID" align="center" width="120" />
+        <el-table-column prop="publishMemberName" label="发布人昵称" align="center" width="100" />
+
+        <el-table-column prop="avatar" label="发布人头像" align="center" width="120">
+          <template slot-scope="scope">
+            <el-image :src="scope.row.publishMemberAvatar" style="width: 40px; height: 40px; border-radius: 50%" :preview-src-list="[scope.row.publishMemberAvatar]" fit="cover" />
+          </template>
+        </el-table-column>
+        <el-table-column prop="state" label="状态" align="center" width="120">
+          <template slot-scope="scope">
+            <el-tag type="primary" size="mini" v-if="scope.row.state == 2">已开始</el-tag>
+            <el-tag type="warning" size="mini" v-if="scope.row.state == 4">已结束</el-tag>
+            <el-tag type="success" size="mini" v-if="scope.row.state == 4">已结束</el-tag>
+            <el-tag type="info" size="mini" v-if="scope.row.state == 5">已撤销</el-tag>
+            <el-tag type="danger" size="mini" v-if="scope.row.state == 1">草稿</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column prop="avatar" label="宣传视频" align="center" width="130">
+          <template slot-scope="scope">
+            <video style="width: 100px; height: 50px" :src="scope.row.promotionalVideo"></video>
+          </template>
+        </el-table-column>
+        <el-table-column prop="startTime" label="开始时间" align="center" width="160" />
+        <el-table-column prop="endTime" label="结束时间" align="center" width="160" />
+        <el-table-column prop="activitiesAddress" label="活动地址" align="center" width="180" />
+        <el-table-column show-overflow-tooltip prop="participationMethod" label="参与方式" align="center" width="220" />
+        <el-table-column show-overflow-tooltip prop="precautions" label="注意事项" align="center" width="220" />
+
+        <el-table-column prop="opportunityType" label="商机类型" align="center" width="100">
+          <template slot-scope="scope">
+            <el-tag type="primary" size="mini" v-if="scope.row.state == 1">寻求合作</el-tag>
+            <el-tag type="warning" size="mini" v-if="scope.row.state == 2">寻求采购</el-tag>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="opportunityContactNumber" label="商机联系电话" align="center" width="220" />
+        <el-table-column prop="opportunityContactEmail" label="商机联系邮箱" align="center" width="220" />
+        <el-table-column prop="opportunityAuthorityUrl" label="商机官方链接" align="center" width="220" />
+
+        <el-table-column width="100" label="操作" align="center" fixed="right" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <div class="btnList">
+               <el-button type="info" size="mini" @click="$refs.detailModalRef && $refs.detailModalRef.show(scope.row.id)">详情</el-button> 
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="fenye">
+        <el-pagination
+          :current-page="query.page"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="total"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+        />
+      </div>
+    </div>
+
+    <DetailModal ref="detailModalRef"></DetailModal>
+  </div>
+</template>
+
+<script>
+import { getActivitiesAllApi } from '@/api/rm-bank'
+import DetailModal from './components/DetailModal.vue'
+
+export default {
+  components: {DetailModal},
+  data() {
+    return {
+      query: {
+        page: 1,
+        pageSize: 10,
+        search: '',
+        typeEnum: '',
+        opportunityType: ''
+      },
+      total: 1,
+      tableData: []
+    }
+  },
+  created() {
+    this.getAll()
+  },
+  methods: {
+    async getAll() {
+      const res = await getActivitiesAllApi(this.query)
+      this.tableData = res.data.list
+      this.total = res.data.total
+    },
+    handleSizeChange(val) {
+      this.query.pageSize = val
+      this.getAll()
+    },
+    handleCurrentChange(val) {
+      this.query.page = val
+      this.getAll()
+    },
+    search() {
+      this.total = 1
+      this.query.page = 1
+      this.getAll()
+    },
+    clear() {
+      this.query = {
+        page: 1,
+        pageSize: 10,
+        name: '',
+        areaCode: []
+      }
+      this.getAll()
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.payreturnPage {
+  padding: 30px;
+
+  .tableBox {
+    .fenye {
+      margin: 20px;
+    }
+  }
+}
+</style>

+ 123 - 0
src/views/rm-bank/club/components/ClubModal.vue

@@ -0,0 +1,123 @@
+<template>
+  <el-dialog :close-on-click-modal="false" title="提示" :visible.sync="clubVisible" width="40%">
+    <el-form label-width="140px" ref="clubFormRef" :rules="clubRules" :model="clubForm">
+      <el-form-item label="俱乐部名称" prop="name">
+        <el-input placeholder="请输入俱乐部名称" v-model.trim="clubForm.name"></el-input>
+      </el-form-item>
+      <el-form-item label="俱乐部区域" prop="areaCode">
+        <el-cascader clearable style="width: 100%" v-model="clubForm.areaCode" :props="regionProps" size="large" placeholder="请选择区域"></el-cascader>
+        <div v-if="String(clubForm.areaCode)">已选ID:{{ clubForm.areaCode[clubForm.areaCode.length - 1] }}</div>
+      </el-form-item>
+      <el-form-item label="俱乐部最大人数" prop="maxNumber">
+        <el-input-number :step="1" step-strictly v-model.number="clubForm.maxNumber" :min="1"></el-input-number>
+        <div style="color: red; font-size: 12px; line-height: 1.5; margin-top: 10px" v-if="clubForm.id">
+          <div>当前人数:{{ currentNumber }}</div>
+          <div>修改的俱乐部最大数量不能低于当前人数</div>
+        </div>
+      </el-form-item>
+    </el-form>
+    <template #footer>
+      <span class="dialog-footer">
+        <el-button size="mini" @click="close">取消</el-button>
+        <el-button size="mini" type="primary" :loading="isLoading" @click="handleConfirm">{{ clubForm.id ? '确认编辑' : '确认创建' }}</el-button>
+      </span>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import { addClubApi, editClubApi } from '@/api/rm-bank'
+import { getProvinceList, getChildAreaList } from '@/api/address'
+
+export default {
+  data() {
+    return {
+      clubVisible: false,
+      isLoading: false,
+      clubForm: {
+        id: undefined,
+        name: '俱乐部名称22', // 俱乐部名称
+        areaCode: [], // 俱乐部区域编码
+        maxNumber: 100 // 俱乐部最大人数
+      },
+      currentNumber: 0,
+      clubRules: {
+        name: [{ required: true, message: '请输入俱乐部名称', trigger: 'blur' }],
+        areaCode: [{ required: true, message: '请选择俱乐部区域', trigger: 'change' }],
+        maxNumber: [
+          { required: true, message: '请填写俱乐部最大人数', trigger: 'blur' },
+          { type: 'number', min: 1, message: '请输入数字', trigger: 'blur' }
+        ]
+      },
+      regionProps: {
+        checkStrictly: true,
+        lazy: true,
+        label: 'name',
+        value: 'id',
+        lazyLoad(node, resolve) {
+          const { level, value } = node
+          if (level === 0) {
+            resolve([{ id: 0, parentId: 0, name: '全中国', shortName: '全国', longitude: '108.55', latitude: '34.32', level: 1, sort: 1, status: true }])
+          } else if (level === 1) {
+            getProvinceList().then((res) => {
+              resolve(res.data)
+            })
+          } else if (level != 0 && level != 1) {
+            getChildAreaList(value).then((res) => {
+              resolve(
+                res.data.map((item) => {
+                  item.leaf = level === 4
+                  return item
+                })
+              )
+            })
+          }
+        }
+      }
+    }
+  },
+
+  methods: {
+    show(row) {
+      this.reset()
+      if (row) {
+        this.clubForm.id = row.id
+        this.clubForm.name = row.name
+        this.clubForm.maxNumber = row.maxNumber
+        this.clubForm.areaCode = [row.areaCode]
+        this.currentNumber = row.currentNumber
+      }
+      this.clubVisible = true
+    },
+    close() {
+      this.reset()
+      this.clubVisible = false
+    },
+
+    async handleConfirm() {
+      try {
+        this.isLoading = true
+        await this.$refs.clubFormRef.validate()
+        const data = JSON.parse(JSON.stringify(this.clubForm))
+        data.areaCode = data.areaCode[data.areaCode.length - 1]
+        const api = this.clubForm.id ? editClubApi : addClubApi
+
+        await api({ club: data })
+        this.$message.success(this.clubForm.id ? '编辑成功' : '创建成功')
+        this.$emit('success')
+        this.close()
+      } catch (error) {
+      } finally {
+        this.isLoading = false
+      }
+    },
+
+    reset() {
+      this.clubForm = { id: undefined, name: '', areaCode: [], maxNumber: 1 }
+      this.currentNumber = 0
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 125 - 0
src/views/rm-bank/club/components/DetailModal.vue

@@ -0,0 +1,125 @@
+<template>
+  <el-dialog :close-on-click-modal="false" title="提示" :visible.sync="clubDetailModalVisible" width="50%">
+    <div v-loading="isLoading">
+      <el-descriptions class="margin-top" title="俱乐部信息" :column="2" border>
+        <el-descriptions-item>
+          <template slot="label">俱乐部名称</template>
+          {{ clubInfo.name || '--' }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">俱乐部创建时间</template>
+          {{ clubInfo.createTime || '--' }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">俱乐部最大人数</template>
+          <el-tag size="mini" type="danger">{{ clubInfo.maxNumber || 0 }} 人</el-tag>
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">当前人数</template>
+          <el-tag size="mini" type="success">{{ clubInfo.currentNumber || 0 }} 人</el-tag>
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            <i class="el-icon-office-building"></i>
+            俱乐部区域code
+          </template>
+          {{ clubInfo.areaCode || '--' }}
+        </el-descriptions-item>
+      </el-descriptions>
+
+      <!-- 会员信息 -->
+      <el-descriptions style="margin-top: 20px" title="俱乐部信息" :column="1" border>
+        <el-descriptions-item>
+          <el-table height="250" :data="members" :style="{ width: '100%' }">
+            <el-table-column align="center" type="index" label="#"></el-table-column>
+            <el-table-column prop="avatar" label="会员头像">
+              <template slot-scope="scope">
+                <el-image :src="scope.row.avatar" style="width: 40px; height: 40px; border-radius: 50%" :preview-src-list="[scope.row.avatar]" fit="cover" />
+              </template>
+            </el-table-column>
+            <el-table-column prop="nickName" label="会员昵称" />
+            <el-table-column prop="mobile" label="会员手机号" />
+            <el-table-column width="100" label="操作" align="center">
+              <template slot-scope="scope">
+                <div class="btnList">
+                  <el-button :type="scope.row.admin ? 'danger' : 'primary'" size="mini" @click="handleSet(scope.row)">{{ scope.row.admin ? '取消管理' : '设置管理' }}</el-button>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-descriptions-item>
+      </el-descriptions>
+    </div>
+    <template #footer>
+      <span class="dialog-footer">
+        <el-button size="mini" @click="close">取消</el-button>
+      </span>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import { getClubDetailApi, patchClubMemberIsAdminApi } from '@/api/rm-bank/index'
+
+export default {
+  data() {
+    return {
+      isLoading: false,
+      clubDetailModalVisible: false,
+      clubInfo: {},
+      members: []
+    }
+  },
+
+  methods: {
+    async show(clubId) {
+      if (!clubId) {
+        return this.$message.error('俱乐部id不能为空')
+      }
+      this.clubDetailModalVisible = true
+      this.getInfo(clubId)
+    },
+
+    async getInfo(clubId) {
+      try {
+        this.isLoading = true
+        const res = await getClubDetailApi({ 'club.id': clubId })
+        this.clubInfo = res.data.club
+        this.members = res.data.members
+      } finally {
+        this.isLoading = false
+      }
+    },
+
+    close() {
+      this.clubDetailModalVisible = false
+    },
+
+    reset() {
+      this.clubInfo = {}
+      this.members = []
+    },
+
+    // 设置管理
+    handleSet(row) {
+      const { admin, nickName } = row
+      const tip = `确定要${admin ? '取消' : '设置'}【${nickName}】${admin ? '的' : '为'}管理?`
+      this.$confirm(tip, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(async () => {
+          const res = await patchClubMemberIsAdminApi({ clubId: this.clubInfo.id, memberId: row.id, admin: !admin })
+          if (res.code == '200') {
+            this.$message.success('操作成功')
+            this.getInfo(this.clubInfo.id)
+          }
+        })
+        .catch(() => {})
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 198 - 0
src/views/rm-bank/club/index.vue

@@ -0,0 +1,198 @@
+<template>
+  <div class="payreturnPage">
+    <!-- 搜索 -->
+    <div class="formSearch">
+      <!-- 搜索条件 -->
+      <el-form :inline="true" :model="query" class="demo-form-inline">
+        <el-form-item label="俱乐部名称">
+          <el-input clearable v-model="query.name" placeholder="请输入活动名称" />
+        </el-form-item>
+
+        <el-form-item label="俱乐部区域编码">
+          <el-cascader clearable style="width: 100%" v-model="query.areaCode" :props="regionProps" placeholder="请选择区域"></el-cascader>
+        </el-form-item>
+
+        <el-form-item>
+          <el-button type="primary" plain @click="search">查询</el-button>
+          <el-button plain @click="clear">重置</el-button>
+          <el-button type="primary" plain @click="$refs.clubModalRef && $refs.clubModalRef.show()">新增俱乐部</el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <!-- 表格 -->
+    <div class="tableBox">
+      <el-table ref="multipleTable" :data="tableData" border :header-cell-style="{ background: '#EEF3FF', color: '#333333' }" tooltip-effect="dark" style="width: 100%">
+        <el-table-column align="center" type="index" label="#" width="55"></el-table-column>
+        <el-table-column prop="name" label="俱乐部名称" align="center" width="220" />
+
+        <el-table-column prop="maxNumber" label="最大人数" align="center">
+          <template slot-scope="scope">
+            <el-tag size="mini">{{ scope.row.maxNumber || '未设置' }} 人</el-tag>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="currentNumber" label="当前人数" align="center">
+          <template slot-scope="scope">
+            <el-tag type="success" size="mini">{{ scope.row.currentNumber || '0' }} 人</el-tag>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="areaCode" label="俱乐部区域编码" align="center">
+          <template slot-scope="scope">
+            <span v-if="!scope.row.areaCode">---</span>
+            <el-tag type="info" size="mini">{{ scope.row.areaCode == 0 ? '全国' : scope.row.areaCode }}</el-tag>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="createTime" label="俱乐部创建时间" align="center" width="220" />
+        <el-table-column width="280" label="操作" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <div class="btnList">
+              <el-button type="text" @click="$refs.clubModalRef && $refs.clubModalRef.show(scope.row)">编辑</el-button>
+              <el-button type="text" @click="$refs.detailModalRef && $refs.detailModalRef.show(scope.row.id)">详情</el-button>
+              <el-button type="text" style="color: #f56c6c" @click="handleDelete(scope.row)">删除</el-button>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="fenye">
+        <el-pagination
+          :current-page="query.page"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="total"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+        />
+      </div>
+    </div>
+
+    <DetailModal ref="detailModalRef"></DetailModal>
+    <ClubModal @success="getAll" ref="clubModalRef"></ClubModal>
+  </div>
+</template>
+
+<script>
+import { getClubListApi, deleteClubApi } from '@/api/rm-bank'
+import ClubModal from './components/ClubModal.vue'
+import DetailModal from './components/DetailModal.vue'
+import { getProvinceList, getChildAreaList } from '@/api/address'
+
+export default {
+  components: {
+    DetailModal,
+    ClubModal
+  },
+  data() {
+    return {
+      query: {
+        page: 1,
+        pageSize: 10,
+        name: undefined,
+        areaCode: []
+      },
+      total: 1,
+      tableData: [],
+      regionProps: {
+        checkStrictly: true,
+        lazy: true,
+        label: 'name',
+        value: 'id',
+        lazyLoad(node, resolve) {
+          const { level, value } = node
+          if (level === 0) {
+            resolve([{ id: 0, parentId: 0, name: '全中国', shortName: '全国', longitude: '108.55', latitude: '34.32', level: 1, sort: 1, status: true }])
+          } else if (level === 1) {
+            getProvinceList().then((res) => {
+              resolve(res.data)
+            })
+          } else if (level != 0 && level != 1) {
+            getChildAreaList(value).then((res) => {
+              resolve(
+                res.data.map((item) => {
+                  item.leaf = level === 4
+                  return item
+                })
+              )
+            })
+          }
+        }
+      }
+    }
+  },
+  created() {
+    this.getAll()
+  },
+  methods: {
+    async getAll() {
+      const queryParams = JSON.parse(JSON.stringify(this.query))
+      const { name, areaCode } = queryParams
+      if (name) {
+        queryParams['club.name'] = name
+      }
+      if (areaCode.length) {
+        queryParams['club.areaCode'] = areaCode[areaCode.length - 1]
+      }
+
+      delete queryParams.name
+      delete queryParams.areaCode
+
+      const res = await getClubListApi(queryParams)
+      this.tableData = res.data.list
+      this.total = res.data.total
+    },
+    handleSizeChange(val) {
+      this.query.pageSize = val
+      this.getAll()
+    },
+    handleCurrentChange(val) {
+      this.query.page = val
+      this.getAll()
+    },
+    search() {
+      this.total = 1
+      this.query.page = 1
+      this.getAll()
+    },
+    clear() {
+      this.query = {
+        page: 1,
+        pageSize: 10,
+        name: '',
+        areaCode: []
+      }
+      this.getAll()
+    },
+
+    // 删除
+    async handleDelete(row) {
+      this.$confirm(`是否删除【${row.name}】这个俱乐部?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(async () => {
+          const res = await deleteClubApi({ id: row.id })
+          if (res.code == '200') {
+            this.$message.success('删除成功')
+            this.getAll()
+          }
+        })
+        .catch(() => {})
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.payreturnPage {
+  padding: 30px;
+
+  .tableBox {
+    .fenye {
+      margin: 20px;
+    }
+  }
+}
+</style>

+ 117 - 0
src/views/rm-bank/member/index.vue

@@ -0,0 +1,117 @@
+<template>
+  <div class="payreturnPage">
+    <!-- 搜索 -->
+    <div class="formSearch">
+      <!-- 搜索条件 -->
+      <el-form :inline="true" :model="query" class="demo-form-inline">
+        <el-form-item label="查询">
+          <el-input clearable v-model="query.search" placeholder="昵称/手机/公司名称" />
+        </el-form-item>
+
+        <el-form-item>
+          <el-button type="primary" plain @click="search">查询</el-button>
+          <el-button plain @click="clear">重置</el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <!-- 表格 -->
+    <div class="tableBox">
+      <el-table ref="multipleTable" :data="tableData" border :header-cell-style="{ background: '#EEF3FF', color: '#333333' }" tooltip-effect="dark" style="width: 100%">
+        <el-table-column align="center" type="index" label="#" width="55"></el-table-column>
+        <!-- <el-table-column prop="id" label="会员ID" align="center" width="220" /> -->
+        <el-table-column prop="buyerUserId" label="团蜂negID" align="center" width="100" />
+        <el-table-column prop="nickName" label="昵称" align="center" width="220" />
+        <el-table-column prop="avatar" label="头像" align="center" width="70">
+          <template slot-scope="scope">
+            <el-image :src="scope.row.avatar" style="width: 40px; height: 40px; border-radius: 50%" :preview-src-list="[scope.row.avatar]" fit="cover" />
+          </template>
+        </el-table-column>
+        <el-table-column prop="mobile" label="手机号" align="center" width="180" />
+        <el-table-column show-overflow-tooltip prop="profile" label="个人简介" align="center" width="220" />
+        <el-table-column show-overflow-tooltip prop="companyName" label="公司名称" align="center" width="220" />
+        <el-table-column prop="positions" label="职位" align="center" width="220" />
+        <el-table-column show-overflow-tooltip prop="companyAddress" label="公司地址" align="center" width="220" />
+        <el-table-column show-overflow-tooltip prop="companyProfile" label="公司简介" align="center" width="220" />
+        <el-table-column prop="businessCardStyle" label="名片风格" align="center" width="220">
+          <template slot-scope="scope">
+            <el-tag type="primary" size="mini" v-if="scope.row.businessCardStyle === 1">蓝色</el-tag>
+            <el-tag type="warning" size="mini" v-if="scope.row.businessCardStyle === 2">橙色</el-tag>
+            <el-tag type="success" size="mini" v-if="scope.row.businessCardStyle === 3">黄色</el-tag>
+          </template>
+        </el-table-column>
+
+        <!-- <el-table-column width="280" label="操作" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <div class="btnList">
+               <el-button type="text" @click="$refs.clubModalRef && $refs.clubModalRef.show(scope.row)">编辑</el-button> 
+            </div>
+          </template>
+        </el-table-column> -->
+      </el-table>
+      <div class="fenye">
+        <el-pagination
+          :current-page="query.page"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="total"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getClubMemberApi } from '@/api/rm-bank'
+
+export default {
+  data() {
+    return {
+      query: { page: 1, pageSize: 10, search: '' },
+      total: 1,
+      tableData: []
+    }
+  },
+  created() {
+    this.getAll()
+  },
+  methods: {
+    async getAll() {
+      const res = await getClubMemberApi(this.query)
+      this.tableData = res.data.list
+      this.total = res.data.total
+    },
+    handleSizeChange(val) {
+      this.query.pageSize = val
+      this.getAll()
+    },
+    handleCurrentChange(val) {
+      this.query.page = val
+      this.getAll()
+    },
+    search() {
+      this.total = 1
+      this.query.page = 1
+      this.getAll()
+    },
+    clear() {
+      this.query = { page: 1, pageSize: 10, name: '', areaCode: [] }
+      this.getAll()
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.payreturnPage {
+  padding: 30px;
+
+  .tableBox {
+    .fenye {
+      margin: 20px;
+    }
+  }
+}
+</style>