feat: 会议ID应用赋值 + 会议表单/详情优化 + admin工作台统计与用户管理
- meetingId 由 DB 自增改为应用赋值 10 位数字 (yyMMdd + 4 位序列, Redis 按日期计数) - 会议开始时间不能晚于结束时间校验; 参会人表单身份证附件/角色单独一行 - 会议详情左右列比例 7:3 -> 8:2 (材料审核列收窄) - admin/workbench 用户总数/角色类型数/各角色分布统计修复 (改用 listByRole 按 role_type 过滤) - 新增 admin 用户管理接口 + 门户页脚 + H5 签到/上传优化
This commit is contained in:
@@ -66,10 +66,12 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间" width="170" />
|
||||
<el-table-column label="操作" width="240" fixed="right">
|
||||
<el-table-column label="操作" width="320" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button link type="primary" @click="onView(row)">查看</el-button>
|
||||
<el-button link type="primary" @click="onEdit(row)">编辑</el-button>
|
||||
<!-- 重置密码: 重置为默认 123456 (与新建人员默认密码一致) -->
|
||||
<el-button v-if="row.userId" link type="primary" @click="onResetPwd(row)">重置密码</el-button>
|
||||
<!-- 本人不显示禁用/恢复按钮 (避免主账号把自己禁用导致登录不上) -->
|
||||
<el-button v-if="row.userId !== store.user?.userId" link :type="row.status === '0' ? 'warning' : 'success'" @click="onToggleStatus(row)">
|
||||
{{ row.status === '0' ? '禁用' : '恢复' }}
|
||||
@@ -137,7 +139,7 @@
|
||||
import { reactive, ref, computed } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { bizUpdate, bizDelete } from '@/api/public'
|
||||
import { bizUpdate, bizDelete, resetPersonPassword } from '@/api/public'
|
||||
import { listSponsorPerson } from '@/api/business/person'
|
||||
import { useUserStore } from '@/store/user'
|
||||
import { accountTypeRoleLabel, accountTypeRoleTagType } from '@/utils/roleMap'
|
||||
@@ -193,6 +195,22 @@ function onEdit(row) {
|
||||
router.push({ path: `/sponsor/people/edit/${row.personId}` })
|
||||
}
|
||||
|
||||
async function onResetPwd(row) {
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`确定重置「${row.name}」的登录密码为默认 123456 吗?`,
|
||||
'重置密码',
|
||||
{ type: 'warning' }
|
||||
)
|
||||
} catch { return }
|
||||
try {
|
||||
await resetPersonPassword(row.personId)
|
||||
ElMessage.success('已重置为 123456')
|
||||
} catch (e) {
|
||||
ElMessage.error(e?.msg || e?.message || '重置失败')
|
||||
}
|
||||
}
|
||||
|
||||
async function onToggleStatus(row) {
|
||||
const newStatus = row.status === '0' ? '1' : '0'
|
||||
const label = newStatus === '0' ? '恢复' : '禁用'
|
||||
|
||||
Reference in New Issue
Block a user