feat(config): 新增配置回收站与还原功能

- 配置列表支持 deleted=1 查询已删除配置
- 新增 POST /admin/config/restore/:id,还原配置并写入 restore 历史
- 前端新增回收站页面,配置列表「新建配置」右侧增加红色入口按钮
This commit is contained in:
2026-09-23 21:13:30 +08:00
parent 185e458b45
commit bb90f9cf79
7 changed files with 190 additions and 1 deletions
+2
View File
@@ -17,6 +17,7 @@
<el-card>
<div slot="header" style="display: flex; justify-content: flex-end">
<el-button type="primary" @click="$router.push('/config/add')">新建配置</el-button>
<el-button type="danger" style="margin-left: 10px" @click="$router.push('/config/recycle')">回收站</el-button>
</div>
<el-table :data="list" v-loading="loading" border stripe>
<el-table-column prop="id" label="ID" width="60"></el-table-column>
@@ -65,6 +66,7 @@
<span v-if="scope.row.operate === 'delete'" style="color: #F56C6C">删除</span>
<span v-else-if="scope.row.operate === 'rollback'">回滚</span>
<span v-else-if="scope.row.operate === 'update'">更新</span>
<span v-else-if="scope.row.operate === 'restore'">还原</span>
<span v-else>-</span>
</template>
</el-table-column>