- 同步版本号:VERSION / backend pom / admin-web / miniapp 均升至 1.1.0 - 合并本轮代码审查修复(详见 docs/CODE-REVIEW-2026-09-24.md): - 后端:微信登录真实实现 RealWechatLoginProvider、实名核验真实实现 RealIdentityVerificationProvider(本地强校验 + 可配置第三方 + fail-closed/fail-fast) - 照片直传落库端点 POST /me/photos/confirm(fileKey 归属校验 + 对象存在性校验后 savePhoto) - 刷新 Token Redis TTL 修正(getExpirationMs()*2 的 4h → refreshExpirationMs 的 14 天) - 管理端 token 改为 HttpOnly Cookie + silent-refresh,移除 localStorage 明文存储与 30+ 处手工注入 - 小程序:红娘接单鉴权头错位修复、serviceType 中文映射、生产域名可配置 - 隔离本地产物(.workbuddy/、*.bundle、*.dump、secrets、application-dev.yml 等已被 .gitignore 覆盖) 未验证项(打标签 ≠ 生产发布): - 后端编译 / 单测未在本环境执行(Maven 慢、Docker DNS 受限) - 管理端 登录→刷新→登出 端到端、小程序真机走查待人工验收 - 生产部署需注入 WECHAT_APP_ID / WECHAT_APP_SECRET、VERIFICATION_API_URL / VERIFICATION_API_KEY 与小程序生产域名
178 lines
7.6 KiB
Vue
178 lines
7.6 KiB
Vue
<template>
|
|
<div class="page-container">
|
|
<el-row :gutter="16">
|
|
<el-col :span="4" v-for="s in stats" :key="s.key">
|
|
<el-card shadow="hover" class="stat-card">
|
|
<div class="stat-value">{{ s.value }}</div>
|
|
<div class="stat-label">{{ s.label }}</div>
|
|
</el-card>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
<el-card shadow="never" style="margin-top:16px">
|
|
<template #header>
|
|
<div class="card-header">
|
|
<span>申诉管理</span>
|
|
<el-tag type="warning" v-if="stats.find(s=>s.key==='pending')?.value">待处理 {{ stats.find(s=>s.key==='pending')?.value }}</el-tag>
|
|
</div>
|
|
</template>
|
|
|
|
<el-table :data="tableData" v-loading="loading" border stripe>
|
|
<el-table-column prop="userName" label="用户" width="120" />
|
|
<el-table-column prop="appealTypeText" label="申诉类型" width="120" />
|
|
<el-table-column prop="reason" label="申诉原因" min-width="220" show-overflow-tooltip />
|
|
<el-table-column prop="contactMethod" label="联系方式" width="140" />
|
|
<el-table-column prop="status" label="状态" width="100">
|
|
<template #default="{row}">
|
|
<el-tag :type="statusTagType(row.status)">{{ statusText(row.status) }}</el-tag>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="createdAt" label="提交时间" width="180">
|
|
<template #default="{row}">{{ formatTime(row.createdAt) }}</template>
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="120">
|
|
<template #default="{row}">
|
|
<el-button v-if="row.status==='pending'||row.status==='escalated'" type="primary" size="small" @click="openDetail(row.id)">处理</el-button>
|
|
<el-button size="small" @click="openDetail(row.id)">查看</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-card>
|
|
|
|
<!-- 申诉详情抽屉 -->
|
|
<el-drawer v-model="drawerVisible" title="申诉详情" size="520px">
|
|
<div v-if="detail">
|
|
<el-descriptions :column="2" border>
|
|
<el-descriptions-item label="用户">{{ detail.userName }}</el-descriptions-item>
|
|
<el-descriptions-item label="申诉类型">{{ detail.appealTypeText }}</el-descriptions-item>
|
|
<el-descriptions-item label="状态">
|
|
<el-tag :type="statusTagType(detail.status)">{{ statusText(detail.status) }}</el-tag>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="联系方式">{{ detail.contactMethod || '无' }}</el-descriptions-item>
|
|
<el-descriptions-item label="申诉原因" :span="2">{{ detail.reason }}</el-descriptions-item>
|
|
<el-descriptions-item label="证据" :span="2">
|
|
<span v-if="detail.evidence">见原始证据文件</span>
|
|
<span v-else class="text-muted">未上传</span>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="处置备注" :span="2" v-if="detail.decisionNote">
|
|
{{ detail.decisionNote }}
|
|
</el-descriptions-item>
|
|
</el-descriptions>
|
|
|
|
<template v-if="detail.status==='pending'||detail.status==='reviewing'||detail.status==='escalated'">
|
|
<h4 style="margin:20px 0 12px;color:var(--admin-coral-strong)">审核决策</h4>
|
|
<el-form label-width="100px">
|
|
<el-form-item label="处理结果">
|
|
<el-select v-model="decision" style="width:100%">
|
|
<el-option label="通过申诉,解除限制" value="approve" />
|
|
<el-option label="驳回申诉,维持原处置" value="reject" />
|
|
<el-option label="升级人工进一步调查" value="escalate" />
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="审核说明">
|
|
<el-input v-model="decisionNote" type="textarea" :rows="3" placeholder="请输入审核意见" />
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-button type="primary" :loading="processing" @click="handleProcess">确认提交</el-button>
|
|
<el-button @click="drawerVisible=false">取消</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
</template>
|
|
</div>
|
|
</el-drawer>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { getAccessToken } from '@/utils/token'
|
|
import { ref, onMounted } from 'vue'
|
|
import { get, post } from '@/api/client'
|
|
import { token as tokenColor } from '@/theme/tokens'
|
|
|
|
const loading = ref(false)
|
|
const processing = ref(false)
|
|
const tableData = ref<any[]>([])
|
|
const stats = ref<any[]>([])
|
|
const drawerVisible = ref(false)
|
|
const currentId = ref('')
|
|
const detail = ref<any>(null)
|
|
const decision = ref('approve')
|
|
const decisionNote = ref('')
|
|
|
|
const STATUS_MAP: Record<string, { text: string; type: string }> = {
|
|
pending: { text: '待审核', type: 'warning' },
|
|
reviewing: { text: '审核中', type: 'info' },
|
|
approved: { text: '已通过', type: 'success' },
|
|
rejected: { text: '已驳回', type: 'danger' },
|
|
escalated: { text: '已升级', type: 'warning' }
|
|
}
|
|
|
|
async function loadData() {
|
|
loading.value = true
|
|
try {
|
|
const token = getAccessToken()
|
|
const res: any = await get('/operator/appeals/pending', {}, { Authorization: `Bearer ${token}` })
|
|
tableData.value = res.data || []
|
|
loadStats()
|
|
} catch (e) { console.error(e) }
|
|
finally { loading.value = false }
|
|
}
|
|
|
|
async function loadStats() {
|
|
try {
|
|
const token = getAccessToken()
|
|
const res: any = await get('/operator/appeals/stats', {}, { Authorization: `Bearer ${token}` })
|
|
const data = res.data || {}
|
|
stats.value = [
|
|
{ key: 'pending', label: '待审核', value: data.pendingCount || 0, color: tokenColor('--color-primary') },
|
|
{ key: 'reviewing', label: '审核中', value: data.reviewingCount || 0, color: tokenColor('--color-warning') },
|
|
{ key: 'approved', label: '已通过', value: data.approvedCount || 0, color: tokenColor('--color-success') },
|
|
{ key: 'rejected', label: '已驳回', value: data.rejectedCount || 0, color: tokenColor('--color-neutral') },
|
|
{ key: 'escalated', label: '已升级', value: data.escalatedCount || 0, color: tokenColor('--color-danger') }
|
|
]
|
|
} catch {}
|
|
}
|
|
|
|
async function openDetail(id: string) {
|
|
currentId.value = id
|
|
drawerVisible.value = true
|
|
decision.value = 'approve'
|
|
decisionNote.value = ''
|
|
try {
|
|
const token = getAccessToken()
|
|
const res: any = await get(`/operator/appeals/${id}`, {}, { Authorization: `Bearer ${token}` })
|
|
detail.value = res.data
|
|
} catch (e) { console.error(e) }
|
|
}
|
|
|
|
async function handleProcess() {
|
|
if (!decision.value) return
|
|
processing.value = true
|
|
try {
|
|
const token = getAccessToken()
|
|
await post(`/operator/appeals/${currentId.value}/process`,
|
|
{ decision: decision.value, decisionNote: decisionNote.value },
|
|
{ Authorization: `Bearer ${token}` })
|
|
drawerVisible.value = false
|
|
detail.value = null
|
|
loadData()
|
|
} catch (e) { console.error(e) }
|
|
finally { processing.value = false }
|
|
}
|
|
|
|
function statusTagType(s: string) { return STATUS_MAP[s]?.type || 'info' }
|
|
function statusText(s: string) { return STATUS_MAP[s]?.text || s }
|
|
function formatTime(t?: string) { return t ? new Date(t).toLocaleString('zh-CN') : '-' }
|
|
|
|
onMounted(loadData)
|
|
</script>
|
|
|
|
<style scoped>
|
|
.page-container { padding: 24px; }
|
|
.stat-card { text-align: center; }
|
|
.stat-value { font-size: var(--font-size-5xl); font-weight: var(--font-weight-bold); color: var(--admin-coral-strong); }
|
|
.stat-label { font-size: var(--font-size-sm); color: var(--color-text-tertiary); margin-top: 6px; }
|
|
.card-header { display: flex; justify-content: space-between; align-items: center; }
|
|
.text-muted { color: var(--color-text-disabled); font-size: var(--font-size-sm); }
|
|
</style>
|