refine: 删除按钮移到编辑弹窗 — 统一操作入口

- 表格行内只保留「编辑」按钮
- 编辑弹窗左下角红色「删除用户」按钮(仅支局长可见)
- 避免表格行内误删

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-06-27 11:56:03 +08:00
parent 04aaff8851
commit 7e31606b45
+6 -2
View File
@@ -98,10 +98,9 @@ async function handleDelete(row: any) {
<span v-else style="color:var(--c-text-muted);font-size:12px">未绑定</span>
</template>
</el-table-column>
<el-table-column label="操作" width="130" fixed="right">
<el-table-column label="操作" width="80" fixed="right">
<template #default="{ row }">
<el-button text size="small" type="primary" @click="openEdit(row)">编辑</el-button>
<el-button v-if="auth.isDirector" text size="small" type="danger" @click="handleDelete(row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -128,8 +127,13 @@ async function handleDelete(row: any) {
</el-form>
</template>
<template #footer>
<div style="display:flex;justify-content:space-between;width:100%">
<el-button v-if="auth.isDirector" type="danger" @click="handleDelete(editUser)">删除用户</el-button>
<div>
<el-button @click="editDialogVisible = false">取消</el-button>
<el-button type="primary" @click="handleSave">保存</el-button>
</div>
</div>
</template>
</el-dialog>
</div>