refactor: 清理废弃模块并重构管理端与全端代码

- 移除所有废弃的旧首页配置模块,包括destinationHero、demand相关、HomeExperience、vehicleService等表结构与代码,新增数据库迁移删除遗留表
- 重构管理端后台布局为标准RuoYi风格,新增Sidebar、Navbar、SettingsDrawer等组件,替换旧的过渡菜单实现
- 调整移动端响应断点为768px,更新布局相关测试用例,新增布局组件测试
- 删除OperationsTools发布/重置页面,移除/tools菜单入口,清理对应的API调用与测试代码
- 重构玩法模块编辑器:替换旧的图片手动输入框为图片上传组件,移除冗余的取消按钮
- 新增线索查询offset参数支持,完善查询参数处理逻辑
- 优化rbac菜单构建逻辑,新增可见性控制参数
- 修正管家编辑器提示文案,优化系统资源编辑器表单初始化逻辑
- 清理小程序端废弃的体验推荐组件与相关测试代码
- 更新文档与种子脚本,匹配新的API契约与使用说明
This commit is contained in:
duanshuwen committed 2026-08-26 23:24:28 +08:00
1 parent f6c5ad589f
commit fbf2c772a8
63 files changed
+2272 -1991

No files matched your search

@@ -8,9 +8,9 @@ describe("layout store", () => {
});
it.each([
[991, "mobile"],
[992, "desktop"],
[993, "desktop"],
[767, "mobile"],
[768, "desktop"],
[769, "desktop"],
] as const)("uses the strict mobile breakpoint at %spx", (width, expectedDevice) => {
setActivePinia(createPinia());
const store = useLayoutStore();
@@ -46,7 +46,7 @@ describe("layout store", () => {
expect(addEventListener).toHaveBeenCalledTimes(1);
expect(store.device).toBe("desktop");
browserWindow.innerWidth = 991;
browserWindow.innerWidth = 767;
resizeHandler();
expect(store.device).toBe("mobile");
expect(store.sidebarOpened).toBe(false);
+36 -1
View File
@@ -1,5 +1,12 @@
import { ref } from "vue";
import { defineStore } from "pinia";
import {
loadLayoutSettings,
normalizeLayoutSettings,
resetLayoutSettings,
saveLayoutSettings,
type LayoutSettings,
} from "@/lib/layout-settings";
export type DeviceType = "desktop" | "mobile";
@@ -7,7 +14,7 @@ export type SidebarToggleOptions = {
withoutAnimation?: boolean;
};
const MOBILE_BREAKPOINT = 992;
const MOBILE_BREAKPOINT = 768;
const noopUnsubscribe = () => undefined;
export const useLayoutStore = defineStore("layout", () => {
@@ -15,6 +22,9 @@ export const useLayoutStore = defineStore("layout", () => {
const sidebarOpened = ref(true);
const settingsDrawerOpen = ref(false);
const withoutAnimation = ref(false);
const sidebarCollapsed = ref(false);
const settings = ref<LayoutSettings>(loadLayoutSettings());
const refreshKey = ref(0);
let stopViewportWatcher: (() => void) | null = null;
function applyToggleOptions(options: SidebarToggleOptions = {}) {
@@ -48,6 +58,24 @@ export const useLayoutStore = defineStore("layout", () => {
sidebarOpened.value = false;
}
function toggleSidebarCollapse() {
sidebarCollapsed.value = !sidebarCollapsed.value;
}
function updateSettings(patch: Partial<LayoutSettings>) {
settings.value = normalizeLayoutSettings({ ...settings.value, ...patch });
saveLayoutSettings(settings.value);
}
function resetSettings() {
settings.value = resetLayoutSettings();
sidebarCollapsed.value = false;
}
function refreshView() {
refreshKey.value += 1;
}
function openSettings() {
settingsDrawerOpen.value = true;
}
@@ -92,12 +120,19 @@ export const useLayoutStore = defineStore("layout", () => {
sidebarOpened,
settingsDrawerOpen,
withoutAnimation,
sidebarCollapsed,
settings,
refreshKey,
syncViewport,
toggleSidebar,
openSidebar,
closeSidebar,
toggleSidebarCollapse,
openSettings,
closeSettings,
updateSettings,
resetSettings,
refreshView,
startViewportWatcher,
};
});