fix(admin): 菜单管理去掉上移/下移,排序改由 sort_order 维护(产品已淘汰即时应序)

This commit is contained in:
2026-09-05 21:36:26 +08:00
parent 0248c8737d
commit 6a0eb8cf63
3 changed files with 10 additions and 27 deletions
+5 -3
View File
@@ -62,9 +62,11 @@ test('test_task_252_menus_list_invalid_input_rejected', () => {
})
test('test_task_252_menus_list_dependency_failure_returns_actionable_message', () => {
// 依赖:排序提交走 /column/reorder,失败有「排序保存失败」提示
// 依赖:排序能力收敛到 sort_order 字段(列表/编辑弹窗维护),页面不再提供上移/下移即时排序
const api = readSource('src/pages/account/menu-manage-api.ts')
assert.match(api, /column\/reorder/, '排序走 column/reorder')
assert.match(api, /column\/reorder/, 'adapter 仍支持 column/reorder')
const page = readSource('src/pages/account/MenusPage.vue')
assert.match(page, /排序保存失败/, '排序失败提示“排序保存失败”')
assert.equal(/上移|下移/.test(page), false, '页面无上移/下移')
assert.match(page, /menuForm\.sortOrder/, '编辑弹窗维护 sort_order')
assert.equal(/moveMenuRow/.test(page), false, '无 moveMenuRow 残码')
})
+4 -2
View File
@@ -45,12 +45,14 @@ test('test_task_058_menu_sort_invalid_input_rejected', () => {
})
test('test_task_058_menu_sort_dependency_failure_returns_actionable_message', () => {
// 依赖失败/排序走 adapterPOST /column/reorder 提交 ordered_ids,页面不内联请求
// 依赖失败排序走 adapterPOST /column/reorder 提交 ordered_ids,页面不内联请求
// 页面上移/下移已按产品决策移除,排序改由 sort_order 字段维护。
const api = readSource('src/pages/account/menu-manage-api.ts')
assert.match(api, /reorderMenus|reorderColumns/)
assert.match(api, /column\/reorder/)
assert.match(api, /ordered_ids|orderedIds/)
const page = readSource('src/pages/account/MenusPage.vue')
assert.match(page, /siblingOrderAfterMove|reorderMenus|reorderColumns/)
assert.equal(/上移|下移/.test(page), false, '菜单页不再提供上移/下移按钮')
assert.equal(/http\.post/.test(page), false, '页面不内联排序请求')
assert.match(page, /sortOrder/, '排序通过 sort_order 字段维护')
})