|
|
@@ -0,0 +1,47 @@
|
|
|
+<template>
|
|
|
+ <div class="activity-review">
|
|
|
+ <el-card>
|
|
|
+ <div slot="header"><span>活动审核</span></div>
|
|
|
+ <el-table :data="pendingActivities" v-loading="loading" border stripe>
|
|
|
+ <el-table-column prop="id" label="ID" width="80" />
|
|
|
+ <el-table-column prop="title" label="活动标题" />
|
|
|
+ <el-table-column prop="applicant" label="申请人" width="120" />
|
|
|
+ <el-table-column prop="createdAt" label="申请时间" width="180" />
|
|
|
+ <el-table-column label="操作" width="200">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <el-button size="mini" type="success" @click="approve(row)">通过</el-button>
|
|
|
+ <el-button size="mini" type="danger" @click="reject(row)">驳回</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ name: 'ActivityReview',
|
|
|
+ data() { return { loading: false, pendingActivities: [] } },
|
|
|
+ created() { this.loadPending() },
|
|
|
+ methods: {
|
|
|
+ async loadPending() {
|
|
|
+ this.loading = true
|
|
|
+ try {
|
|
|
+ const baseURL = process.env.VUE_APP_BASE_API || ''
|
|
|
+ const token = localStorage.getItem('token')
|
|
|
+ const axios = this.$axios || (await import('axios')).default
|
|
|
+ const res = await axios.post(baseURL + '/api/activity/list', { status: 'pending' }, {
|
|
|
+ headers: { Authorization: 'Bearer ' + token }
|
|
|
+ })
|
|
|
+ this.pendingActivities = res.data?.data || []
|
|
|
+ } catch (e) {
|
|
|
+ this.$message?.error?.('加载待审核活动失败')
|
|
|
+ } finally {
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ approve(row) { this.$message.info('审核通过功能待实现') },
|
|
|
+ reject(row) { this.$message.info('驳回功能待实现') }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|