Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
A
audit_project_manager
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
David Yang
audit_project_manager
Commits
d5f7b4dd
Commit
d5f7b4dd
authored
Sep 01, 2026
by
drigle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: hide record title for short title views
parent
6001bdb3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
12 deletions
+18
-12
DynamicRecordDialog.jsx
src/components/DynamicRecordDialog.jsx
+12
-8
SubjectRecordWorkbench.jsx
src/components/SubjectRecordWorkbench.jsx
+1
-0
project-management.business-flow.md
...es/project_manager_xy/project-management.business-flow.md
+5
-4
No files found.
src/components/DynamicRecordDialog.jsx
View file @
d5f7b4dd
...
@@ -424,12 +424,14 @@ export default function DynamicRecordDialog({
...
@@ -424,12 +424,14 @@ export default function DynamicRecordDialog({
subject
,
subject
,
subjectName
,
subjectName
,
record
,
record
,
view
,
})
{
})
{
const
[
title
,
setTitle
]
=
useState
(
''
);
const
[
title
,
setTitle
]
=
useState
(
''
);
const
[
values
,
setValues
]
=
useState
({});
const
[
values
,
setValues
]
=
useState
({});
const
[
saving
,
setSaving
]
=
useState
(
false
);
const
[
saving
,
setSaving
]
=
useState
(
false
);
const
[
error
,
setError
]
=
useState
(
''
);
const
[
error
,
setError
]
=
useState
(
''
);
const
editing
=
Boolean
(
record
);
const
editing
=
Boolean
(
record
);
const
showTitle
=
view
?.
settings
?.
shortTitle
!==
true
;
const
initialValues
=
useMemo
(()
=>
{
const
initialValues
=
useMemo
(()
=>
{
return
(
subject
?.
fields
||
[]).
reduce
((
result
,
field
)
=>
{
return
(
subject
?.
fields
||
[]).
reduce
((
result
,
field
)
=>
{
...
@@ -453,7 +455,7 @@ export default function DynamicRecordDialog({
...
@@ -453,7 +455,7 @@ export default function DynamicRecordDialog({
try
{
try
{
const
prepared
=
await
prepareValuesForSubmit
(
subject
,
values
);
const
prepared
=
await
prepareValuesForSubmit
(
subject
,
values
);
const
validationErrors
=
prepared
.
errors
;
const
validationErrors
=
prepared
.
errors
;
if
(
!
title
.
trim
())
{
if
(
showTitle
&&
!
title
.
trim
())
{
validationErrors
.
unshift
(
'记录标题为必填项'
);
validationErrors
.
unshift
(
'记录标题为必填项'
);
}
}
if
(
validationErrors
.
length
>
0
)
{
if
(
validationErrors
.
length
>
0
)
{
...
@@ -461,16 +463,16 @@ export default function DynamicRecordDialog({
...
@@ -461,16 +463,16 @@ export default function DynamicRecordDialog({
return
;
return
;
}
}
if
(
editing
)
{
if
(
editing
)
{
await
updateRecord
(
record
.
name
||
record
.
_id
,
{
const
payload
=
{
metadata
:
prepared
.
metadata
};
title
:
title
.
trim
(),
if
(
showTitle
)
payload
.
title
=
title
.
trim
();
metadata
:
prepared
.
metadata
,
await
updateRecord
(
record
.
name
||
record
.
_id
,
payload
);
});
}
else
{
}
else
{
await
createRecord
(
{
const
payload
=
{
subject
:
subjectName
,
subject
:
subjectName
,
title
:
title
.
trim
(),
metadata
:
prepared
.
metadata
,
metadata
:
prepared
.
metadata
,
});
};
if
(
showTitle
)
payload
.
title
=
title
.
trim
();
await
createRecord
(
payload
);
}
}
await
onSaved
?.();
await
onSaved
?.();
onClose
?.();
onClose
?.();
...
@@ -489,10 +491,12 @@ export default function DynamicRecordDialog({
...
@@ -489,10 +491,12 @@ export default function DynamicRecordDialog({
</
DialogDescription
>
</
DialogDescription
>
<
DialogBody
>
<
DialogBody
>
<
div
className=
"max-h-[65vh] space-y-5 overflow-y-auto pr-1"
>
<
div
className=
"max-h-[65vh] space-y-5 overflow-y-auto pr-1"
>
{
showTitle
?
(
<
Field
>
<
Field
>
<
Label
>
记录标题
<
span
className=
"ml-1 text-red-600"
>
*
</
span
></
Label
>
<
Label
>
记录标题
<
span
className=
"ml-1 text-red-600"
>
*
</
span
></
Label
>
<
Input
value=
{
title
}
onChange=
{
(
event
)
=>
setTitle
(
event
.
target
.
value
)
}
disabled=
{
saving
}
/>
<
Input
value=
{
title
}
onChange=
{
(
event
)
=>
setTitle
(
event
.
target
.
value
)
}
disabled=
{
saving
}
/>
</
Field
>
</
Field
>
)
:
null
}
{
(
subject
?.
fields
||
[]).
map
((
field
)
=>
(
{
(
subject
?.
fields
||
[]).
map
((
field
)
=>
(
<
DynamicField
<
DynamicField
key=
{
field
.
name
}
key=
{
field
.
name
}
...
...
src/components/SubjectRecordWorkbench.jsx
View file @
d5f7b4dd
...
@@ -382,6 +382,7 @@ export default function SubjectRecordWorkbench({
...
@@ -382,6 +382,7 @@ export default function SubjectRecordWorkbench({
subject=
{
subject
}
subject=
{
subject
}
subjectName=
{
subjectName
}
subjectName=
{
subjectName
}
record=
{
editingRecord
}
record=
{
editingRecord
}
view=
{
activeView
}
/>
/>
<
Dialog
open=
{
deleteTargets
.
length
>
0
}
onClose=
{
deleting
?
()
=>
{}
:
()
=>
setDeleteTargets
([])
}
size=
"sm"
>
<
Dialog
open=
{
deleteTargets
.
length
>
0
}
onClose=
{
deleting
?
()
=>
{}
:
()
=>
setDeleteTargets
([])
}
size=
"sm"
>
...
...
src/pages/project_manager_xy/project-management.business-flow.md
View file @
d5f7b4dd
...
@@ -24,10 +24,11 @@
...
@@ -24,10 +24,11 @@
2.
表格列、视图限制、排序、选择字段选项和字段分组来自服务端配置;字段分组读取当前 Grid View 的
`settings.groups`
,按配置展示分组表头并支持展开或收起。审计项目管理列表不展示通用
`title`
列,项目名称及其他业务字段仍按 View 配置展示。
2.
表格列、视图限制、排序、选择字段选项和字段分组来自服务端配置;字段分组读取当前 Grid View 的
`settings.groups`
,按配置展示分组表头并支持展开或收起。审计项目管理列表不展示通用
`title`
列,项目名称及其他业务字段仍按 View 配置展示。
3.
新建和编辑时业务字段统一写入
`metadata`
;引用和用户字段只提交 ID,日期提交 ISO 8601。
3.
新建和编辑时业务字段统一写入
`metadata`
;引用和用户字段只提交 ID,日期提交 ISO 8601。
4.
编辑模式下主键字段禁用;必填字段按 Subject 配置校验。
4.
编辑模式下主键字段禁用;必填字段按 Subject 配置校验。
5.
删除调用
`POST /record/batch/remove`
,默认软删除;列表行内不提供编辑、复制或归档按钮,字段维护统一从详情侧栏进入。
5.
新建和编辑弹窗接收当前 Grid View 配置;当
`settings.shortTitle === true`
时隐藏记录标题,不校验或提交根级
`title`
字段,否则显示并要求填写记录标题。
6.
详情抽屉按可访问的 detail 视图显示字段,并支持字段内联维护。
6.
删除调用
`POST /record/batch/remove`
,默认软删除;列表行内不提供编辑、复制或归档按钮,字段维护统一从详情侧栏进入。
7.
列表页不展示前端写死的项目总数、完成率等摘要卡片,仅展示由服务端 Subject/View 配置驱动的视图、筛选和表格内容;项目统计统一在驾驶舱查看。
7.
详情抽屉按可访问的 detail 视图显示字段,并支持字段内联维护。
8.
列表中的
`long_text`
和
`rich_text`
字段最多展示三行,超出内容省略;完整内容通过悬浮提示或项目详情查看,避免单条长文本拉高整行表格。
8.
列表页不展示前端写死的项目总数、完成率等摘要卡片,仅展示由服务端 Subject/View 配置驱动的视图、筛选和表格内容;项目统计统一在驾驶舱查看。
9.
列表中的
`long_text`
和
`rich_text`
字段最多展示三行,超出内容省略;完整内容通过悬浮提示或项目详情查看,避免单条长文本拉高整行表格。
## 3. 状态流转
## 3. 状态流转
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment