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
d369a505
Commit
d369a505
authored
Sep 01, 2026
by
drigle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix remove inline reference editing
parent
febb9274
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
35 deletions
+13
-35
ReferenceRecordsTable.jsx
...s/RecordDetailDrawer/components/ReferenceRecordsTable.jsx
+7
-14
TailwindEditableField.jsx
...s/RecordDetailDrawer/components/TailwindEditableField.jsx
+2
-17
project-management.business-flow.md
...es/project_manager_xy/project-management.business-flow.md
+4
-4
No files found.
src/pages/RecordDetailDrawer/components/ReferenceRecordsTable.jsx
View file @
d369a505
...
@@ -149,19 +149,16 @@ function getReferenceColumnWidth(column, index) {
...
@@ -149,19 +149,16 @@ function getReferenceColumnWidth(column, index) {
return
180
;
return
180
;
}
}
function
ReferenceRecordsFrame
({
action
,
count
,
children
})
{
function
ReferenceRecordsFrame
({
count
,
children
})
{
return
(
return
(
<
div
className=
"w-full min-w-0 space-y-2"
>
<
div
className=
"w-full min-w-0 space-y-2"
>
<
div
className=
"flex items-center justify-between gap-3 text-xs text-muted"
>
<
div
className=
"text-xs text-muted"
>
共
{
count
}
条关联记录
</
div
>
<
span
>
共
{
count
}
条关联记录
</
span
>
{
action
}
</
div
>
{
children
}
{
children
}
</
div
>
</
div
>
);
);
}
}
export
default
function
ReferenceRecordsTable
({
fieldDef
,
value
,
pageSize
=
1000
,
action
=
null
})
{
export
default
function
ReferenceRecordsTable
({
fieldDef
,
value
,
pageSize
=
1000
})
{
const
subjectName
=
getReferenceSubjectName
(
fieldDef
);
const
subjectName
=
getReferenceSubjectName
(
fieldDef
);
const
referenceIds
=
useMemo
(()
=>
getReferenceIds
(
value
),
[
value
]);
const
referenceIds
=
useMemo
(()
=>
getReferenceIds
(
value
),
[
value
]);
const
populatedRecords
=
useMemo
(
const
populatedRecords
=
useMemo
(
...
@@ -240,16 +237,12 @@ export default function ReferenceRecordsTable({ fieldDef, value, pageSize = 1000
...
@@ -240,16 +237,12 @@ export default function ReferenceRecordsTable({ fieldDef, value, pageSize = 1000
},
[
pageSize
,
populatedRecords
,
referenceIds
,
subjectName
]);
},
[
pageSize
,
populatedRecords
,
referenceIds
,
subjectName
]);
if
(
referenceIds
.
length
===
0
)
{
if
(
referenceIds
.
length
===
0
)
{
return
(
return
<
ReferenceRecordsFrame
count=
{
0
}
><
DataTableEmptyState
title=
"暂无关联记录"
/></
ReferenceRecordsFrame
>;
<
ReferenceRecordsFrame
action=
{
action
}
count=
{
0
}
>
<
DataTableEmptyState
title=
"暂无关联记录"
/>
</
ReferenceRecordsFrame
>
);
}
}
if
(
!
subjectName
&&
populatedRecords
.
length
===
0
)
{
if
(
!
subjectName
&&
populatedRecords
.
length
===
0
)
{
return
(
return
(
<
ReferenceRecordsFrame
action=
{
action
}
count=
{
referenceIds
.
length
}
>
<
ReferenceRecordsFrame
count=
{
referenceIds
.
length
}
>
<
Alert
status=
"warning"
>
<
Alert
status=
"warning"
>
<
Alert
.
Content
>
<
Alert
.
Content
>
<
Alert
.
Description
>
引用字段缺少目标 Subject 配置,暂不能加载关联明细。
</
Alert
.
Description
>
<
Alert
.
Description
>
引用字段缺少目标 Subject 配置,暂不能加载关联明细。
</
Alert
.
Description
>
...
@@ -261,7 +254,7 @@ export default function ReferenceRecordsTable({ fieldDef, value, pageSize = 1000
...
@@ -261,7 +254,7 @@ export default function ReferenceRecordsTable({ fieldDef, value, pageSize = 1000
if
(
loading
)
{
if
(
loading
)
{
return
(
return
(
<
ReferenceRecordsFrame
action=
{
action
}
count=
{
referenceIds
.
length
}
>
<
ReferenceRecordsFrame
count=
{
referenceIds
.
length
}
>
<
div
className=
"flex min-h-32 items-center justify-center"
role=
"status"
aria
-
label=
"正在加载关联明细"
>
<
div
className=
"flex min-h-32 items-center justify-center"
role=
"status"
aria
-
label=
"正在加载关联明细"
>
<
Spinner
size=
"sm"
/>
<
Spinner
size=
"sm"
/>
</
div
>
</
div
>
...
@@ -280,7 +273,7 @@ export default function ReferenceRecordsTable({ fieldDef, value, pageSize = 1000
...
@@ -280,7 +273,7 @@ export default function ReferenceRecordsTable({ fieldDef, value, pageSize = 1000
</
Alert
.
Content
>
</
Alert
.
Content
>
</
Alert
>
</
Alert
>
)
:
null
}
)
:
null
}
<
ReferenceRecordsFrame
action=
{
action
}
count=
{
referenceIds
.
length
}
>
<
ReferenceRecordsFrame
count=
{
referenceIds
.
length
}
>
{
records
.
length
===
0
?
(
{
records
.
length
===
0
?
(
<
Alert
status=
"warning"
>
<
Alert
status=
"warning"
>
<
Alert
.
Content
>
<
Alert
.
Content
>
...
...
src/pages/RecordDetailDrawer/components/TailwindEditableField.jsx
View file @
d369a505
...
@@ -589,14 +589,9 @@ export default function TailwindEditableField({
...
@@ -589,14 +589,9 @@ export default function TailwindEditableField({
const
textPlaceholder
=
getTextPlaceholder
(
placeholder
,
fieldDef
);
const
textPlaceholder
=
getTextPlaceholder
(
placeholder
,
fieldDef
);
const
fieldLabel
=
String
(
fieldDef
?.
label
||
fieldDef
?.
name
||
'字段'
).
trim
();
const
fieldLabel
=
String
(
fieldDef
?.
label
||
fieldDef
?.
name
||
'字段'
).
trim
();
const
selectPlaceholder
=
`请选择
${
fieldLabel
}
`
;
const
selectPlaceholder
=
`请选择
${
fieldLabel
}
`
;
const
canInlineEditReference
=
mode
===
'view'
&&
isReferenceFieldType
(
fieldType
)
&&
canEdit
&&
typeof
onSave
===
'function'
;
if
(
if
(
(
mode
===
'view'
&&
!
canInlineEditReference
)
||
mode
===
'view'
||
(
mode
===
'edit'
&&
(
readonly
||
disabled
))
(
mode
===
'edit'
&&
(
readonly
||
disabled
))
)
{
)
{
return
<
ReadonlyFieldValue
value=
{
value
}
fieldDef=
{
fieldDef
}
/>;
return
<
ReadonlyFieldValue
value=
{
value
}
fieldDef=
{
fieldDef
}
/>;
...
@@ -697,17 +692,7 @@ export default function TailwindEditableField({
...
@@ -697,17 +692,7 @@ export default function TailwindEditableField({
if
(
isReferenceFieldType
(
fieldType
))
{
if
(
isReferenceFieldType
(
fieldType
))
{
return
(
return
(
<
div
>
<
div
>
<
ReferenceRecordsTable
<
ReferenceRecordsTable
value=
{
value
}
fieldDef=
{
fieldDef
}
/>
value=
{
value
}
fieldDef=
{
fieldDef
}
action=
{
canEdit
?
(
<
Button
size=
"sm"
variant=
"secondary"
onPress=
{
()
=>
setEditing
(
true
)
}
>
编辑关联记录
</
Button
>
)
:
null
}
/>
{
disabled
?
<
div
className=
"mt-2 text-xs text-warning"
>
当前视图无编辑权限
</
div
>
:
null
}
{
disabled
?
<
div
className=
"mt-2 text-xs text-warning"
>
当前视图无编辑权限
</
div
>
:
null
}
</
div
>
</
div
>
);
);
...
...
src/pages/project_manager_xy/project-management.business-flow.md
View file @
d369a505
...
@@ -41,10 +41,10 @@
...
@@ -41,10 +41,10 @@
`settings.shortTitle === true`
时隐藏记录标题和
`title`
字段,但始终保留“记录详情”功能标题和
`settings.shortTitle === true`
时隐藏记录标题和
`title`
字段,但始终保留“记录详情”功能标题和
Modal 可访问名称。标题、阶段 Tabs 和顶部业务操作固定在 Header,字段内容只在 Body 内纵向
Modal 可访问名称。标题、阶段 Tabs 和顶部业务操作固定在 Header,字段内容只在 Body 内纵向
滚动,滚动内容不得穿过或遮挡阶段 Tabs。查看态的
`reference`
、
`document`
、
`view`
、
滚动,滚动内容不得穿过或遮挡阶段 Tabs。查看态的
`reference`
、
`document`
、
`view`
、
`template`
、
`task`
、
`tag`
、
`group`
、
`category`
字段
显示关联记录表,并在字段具备编辑权限时
`template`
、
`task`
、
`tag`
、
`group`
、
`category`
字段
只显示关联记录表;所有字段统一通过详情
提供“编辑关联记录”入口;引用选择器的输入摘要、列表勾选和当前草稿始终由同一组归一化记录
底部“编辑”进入整体编辑态,引用选择器的输入摘要、列表勾选和当前草稿始终由同一组归一化
`_id`
驱动,多值选择支持逐项追加、取消和清空;保存时只向
`metadata`
写入目标记录
`_id`
记录
`_id`
驱动,多值选择支持逐项追加、取消和清空;保存时只向
`metadata`
写入目标记录
(多值字段写入
`_id[]`
)。
`_id`
(多值字段写入
`_id[]`
)。
引用目标缺少 Subject、加载失败或保存失败时在字段附近保留可读错误反馈,不丢失当前编辑值。
引用目标缺少 Subject、加载失败或保存失败时在字段附近保留可读错误反馈,不丢失当前编辑值。
8.
列表页不展示前端写死的项目总数、完成率等摘要卡片,仅展示由服务端 Subject/View 配置驱动的视图、筛选和表格内容;项目统计统一在驾驶舱查看。
8.
列表页不展示前端写死的项目总数、完成率等摘要卡片,仅展示由服务端 Subject/View 配置驱动的视图、筛选和表格内容;项目统计统一在驾驶舱查看。
9.
业务列表、动态表单数据表和关联记录表中的长文本最多展示两行,内容始终限制在所属列内;超出内容通过 HeroUI Tooltip 或项目详情查看,避免遮挡相邻列或由单条长文本过度拉高整行。弹窗内只读关联记录表按实际数据行高度收缩,不提供无业务价值的列宽拖拽。
9.
业务列表、动态表单数据表和关联记录表中的长文本最多展示两行,内容始终限制在所属列内;超出内容通过 HeroUI Tooltip 或项目详情查看,避免遮挡相邻列或由单条长文本过度拉高整行。弹窗内只读关联记录表按实际数据行高度收缩,不提供无业务价值的列宽拖拽。
...
...
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