feat(manager): 专家审核页修改按钮跳转独立编辑页

参考 /admin/experts/new 模式:
- 新建 ry-vue3/src/views/manager/ExpertNew.vue (15 字段, 1:1 抄 admin 版, 仅 goBack 跳 /manager/experts)
- router 加 /manager/experts/new 和 /manager/experts/edit/:id 两条路由, 复用 ExpertNew 组件
- manager/Experts.vue 操作列 "修改" 按钮 → router.push('/manager/experts/edit/:id')
- 加 route watcher, 从编辑页返回时自动重载列表
- 新建专家按钮保留原 dialog (按用户当前只要求改修改按钮)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
郭庆泰
2026-08-17 00:40:45 +08:00
co-authored by Claude
parent e099211cbd
commit 15fd26af30
3 changed files with 350 additions and 9 deletions
+13 -9
View File
@@ -74,7 +74,7 @@
<el-table-column label="操作" width="280" fixed="right">
<template #default="{ row }">
<el-button link type="primary" @click="onAudit(row)">审核</el-button>
<el-button link type="primary" @click="onEdit(row)">修改</el-button>
<el-button link type="primary" @click="goEdit(row)">修改</el-button>
<el-button link type="primary" @click="onView(row)">查看</el-button>
<el-button link :type="row.status === 'N' ? 'success' : 'danger'" @click="row.status === 'N' ? onEnable(row) : onDisable(row)">
{{ row.status === 'N' ? '恢复' : '禁用' }}
@@ -207,11 +207,15 @@
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'
import { ref, reactive, onMounted, watch } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { bizList, bizAdd, bizUpdate } from '@/api/public'
import AuditStatusTag from '@/components/AuditStatusTag.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
const router = useRouter()
const route = useRoute()
const q = ref({ name: '', phone: '', workUnit: '', auditStatus: '' })
const rows = ref([])
const selection = ref([])
@@ -261,13 +265,9 @@ function openAdd() {
Object.assign(editForm, { expertId: '', name: '', phone: '', workUnit: '', department: '', title: '', practiceCertUrl: '', titleCertUrl: '' })
editOpen.value = true
}
function onEdit(row) {
Object.assign(editForm, {
expertId: row.expertId, name: row.name, phone: row.phone, workUnit: row.workUnit,
department: row.department, title: row.title,
practiceCertUrl: row.practiceCertUrl || '', titleCertUrl: row.titleCertUrl || ''
})
editOpen.value = true
// 修改按钮: 跳转独立页 /manager/experts/edit/:id (参考 /admin/experts/new)
function goEdit(row) {
router.push(`/manager/experts/edit/${row.expertId}`)
}
async function submitEdit() {
await editFormRef.value.validate()
@@ -424,6 +424,10 @@ async function submitImportTitleCert() {
}
onMounted(load)
// 从 ExpertNew 跳转回来时刷新列表
watch(() => route.fullPath, (newPath) => {
if (newPath === '/manager/experts') load()
})
</script>
<style scoped>