切换演示数据到 demo 目录
- 默认演示视频和 DICOM 路径改为 demo/演视LC视频序列.mp4 与 demo/演视DICOM序列/。 - 演示 DICOM 项目名统一为“演视DICOM序列”,并兼容迁移旧“演示DICOM序列”名称。 - 恢复演示出厂设置测试改为验证新文件名上传路径和新项目名。 - 同步更新用户管理提示、API 契约、安装文档、实现地图和项目指南。 - 本地与 ../Seg_Server_Docker 已实际放入 demo 演示视频和 DICOM 测试影像;数据文件受 .gitignore 保护不进入提交。
This commit is contained in:
@@ -103,7 +103,7 @@ describe('UserAdmin', () => {
|
||||
admin_user: { id: 1, username: 'admin', role: 'admin', is_active: 1 },
|
||||
project: {
|
||||
id: '8',
|
||||
name: '演示DICOM序列',
|
||||
name: '演视DICOM序列',
|
||||
status: 'ready',
|
||||
frames: 300,
|
||||
fps: '30FPS',
|
||||
@@ -118,11 +118,11 @@ describe('UserAdmin', () => {
|
||||
frames: 0,
|
||||
fps: '30FPS',
|
||||
source_type: 'video',
|
||||
video_path: 'uploads/7/Data_MyVideo_1.mp4',
|
||||
video_path: 'uploads/7/演视LC视频序列.mp4',
|
||||
},
|
||||
{
|
||||
id: '8',
|
||||
name: '演示DICOM序列',
|
||||
name: '演视DICOM序列',
|
||||
status: 'ready',
|
||||
frames: 300,
|
||||
fps: '30FPS',
|
||||
@@ -157,7 +157,7 @@ describe('UserAdmin', () => {
|
||||
expect(await screen.findByText('演示环境已恢复出厂设置')).toBeInTheDocument();
|
||||
expect(useStore.getState().projects).toEqual([
|
||||
expect.objectContaining({ name: '演视LC视频序列', source_type: 'video' }),
|
||||
expect.objectContaining({ name: '演示DICOM序列', source_type: 'dicom' }),
|
||||
expect.objectContaining({ name: '演视DICOM序列', source_type: 'dicom' }),
|
||||
]);
|
||||
expect(useStore.getState().frames).toEqual([]);
|
||||
expect(useStore.getState().masks).toEqual([]);
|
||||
|
||||
@@ -337,7 +337,7 @@ export function UserAdmin() {
|
||||
<div>
|
||||
<div className="text-sm font-semibold text-red-100">演示环境出厂设置</div>
|
||||
<p className="mt-1 text-xs leading-relaxed text-red-200/70">
|
||||
清空演示过程产生的用户、项目帧、标注、任务和私有模板,只保留默认 admin、演示视频项目和一个已按文件名顺序生成帧的演示 DICOM 项目。
|
||||
清空演示过程产生的用户、项目帧、标注、任务和私有模板,只保留默认 admin、“演视LC视频序列”和已按文件名顺序生成帧的“演视DICOM序列”。
|
||||
</p>
|
||||
</div>
|
||||
<button
|
||||
@@ -432,7 +432,7 @@ export function UserAdmin() {
|
||||
<div className="w-full max-w-lg rounded-lg border border-red-400/25 bg-[#151515] p-5 shadow-2xl">
|
||||
<h2 className="text-lg font-semibold text-white">恢复演示出厂设置</h2>
|
||||
<p className="mt-2 text-sm leading-relaxed text-red-100/80">
|
||||
该操作会删除除默认 admin 外的所有用户、项目帧、标注、任务和私有模板,只保留演示视频项目和已按文件名顺序生成帧的演示 DICOM 项目。
|
||||
该操作会删除除默认 admin 外的所有用户、项目帧、标注、任务和私有模板,只保留“演视LC视频序列”和已按文件名顺序生成帧的“演视DICOM序列”。
|
||||
</p>
|
||||
<label className="mt-4 block text-xs text-gray-400" htmlFor="factory-reset-confirm">
|
||||
输入 RESET_DEMO_FACTORY 确认
|
||||
|
||||
@@ -203,10 +203,10 @@ describe('api client contracts', () => {
|
||||
axiosMock.client.post.mockResolvedValueOnce({
|
||||
data: {
|
||||
admin_user: { id: 1, username: 'admin', role: 'admin', is_active: 1 },
|
||||
project: { id: 8, name: '演示DICOM序列', status: 'ready', source_type: 'dicom', frame_count: 300, video_path: 'uploads/8/dicom' },
|
||||
project: { id: 8, name: '演视DICOM序列', status: 'ready', source_type: 'dicom', frame_count: 300, video_path: 'uploads/8/dicom' },
|
||||
projects: [
|
||||
{ id: 7, name: '演视LC视频序列', status: 'pending', source_type: 'video', frame_count: 0, video_path: 'uploads/7/Data_MyVideo_1.mp4' },
|
||||
{ id: 8, name: '演示DICOM序列', status: 'ready', source_type: 'dicom', frame_count: 300, video_path: 'uploads/8/dicom' },
|
||||
{ id: 7, name: '演视LC视频序列', status: 'pending', source_type: 'video', frame_count: 0, video_path: 'uploads/7/演视LC视频序列.mp4' },
|
||||
{ id: 8, name: '演视DICOM序列', status: 'ready', source_type: 'dicom', frame_count: 300, video_path: 'uploads/8/dicom' },
|
||||
],
|
||||
deleted_counts: { users: 1 },
|
||||
message: '演示环境已恢复出厂设置',
|
||||
@@ -214,10 +214,10 @@ describe('api client contracts', () => {
|
||||
});
|
||||
await expect(resetDemoFactory('RESET_DEMO_FACTORY')).resolves.toEqual(expect.objectContaining({
|
||||
admin_user: expect.objectContaining({ username: 'admin' }),
|
||||
project: expect.objectContaining({ id: '8', name: '演示DICOM序列', frames: 300, source_type: 'dicom' }),
|
||||
project: expect.objectContaining({ id: '8', name: '演视DICOM序列', frames: 300, source_type: 'dicom' }),
|
||||
projects: [
|
||||
expect.objectContaining({ id: '7', name: '演视LC视频序列', frames: 0, source_type: 'video' }),
|
||||
expect.objectContaining({ id: '8', name: '演示DICOM序列', frames: 300, source_type: 'dicom' }),
|
||||
expect.objectContaining({ id: '8', name: '演视DICOM序列', frames: 300, source_type: 'dicom' }),
|
||||
],
|
||||
}));
|
||||
expect(axiosMock.client.post).toHaveBeenLastCalledWith('/api/admin/demo-factory-reset', {
|
||||
|
||||
Reference in New Issue
Block a user