feat(web-admin): make nested relatedApproval count jump to first instance
Uses relatedIds from enrichment so screen stays count-only without nested cards. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
03b47fb266
commit
6bb8621578
2 files changed
+45
-5
No files matched your search
@@ -34,14 +34,15 @@
|
||||
</template>
|
||||
</button>
|
||||
<div class="oa-related-approval__actions">
|
||||
<el-button
|
||||
<!-- 原生 button:避免 form.disabled 时 el-button 继承禁用 -->
|
||||
<button
|
||||
v-if="!item.unavailable && (item.fields?.length || 0) > COLLAPSE_FIELD_COUNT"
|
||||
link
|
||||
type="primary"
|
||||
@click="toggleExpand(item.id)"
|
||||
type="button"
|
||||
class="oa-related-approval__toggle"
|
||||
@click.stop="toggleExpand(item.id)"
|
||||
>
|
||||
{{ expanded.has(item.id) ? '收起' : '展开' }}
|
||||
</el-button>
|
||||
</button>
|
||||
<el-button
|
||||
v-if="!disabled"
|
||||
link
|
||||
@@ -77,6 +78,15 @@
|
||||
{{ displayUrlLabel(u, ui, splitUrls(f.value).length) }}
|
||||
</a>
|
||||
</template>
|
||||
<template v-else-if="(f.relatedIds?.length || 0) > 0">
|
||||
<button
|
||||
type="button"
|
||||
class="oa-related-approval__link-btn"
|
||||
@click.stop="goDetail(f.relatedIds![0])"
|
||||
>
|
||||
{{ f.value }}
|
||||
</button>
|
||||
</template>
|
||||
<template v-else>{{ f.value }}</template>
|
||||
</span>
|
||||
</span>
|
||||
@@ -453,6 +463,20 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.oa-related-approval__toggle {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--primary, #10b981);
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.oa-related-approval__toggle:hover {
|
||||
color: var(--primary-dark, #059669);
|
||||
}
|
||||
|
||||
.oa-related-approval__fields {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -493,6 +517,20 @@
|
||||
color: var(--primary-dark, #059669);
|
||||
}
|
||||
|
||||
.oa-related-approval__link-btn {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--primary, #10b981);
|
||||
font: inherit;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.oa-related-approval__link-btn:hover {
|
||||
color: var(--primary-dark, #059669);
|
||||
}
|
||||
|
||||
.oa-related-approval--stack .oa-related-approval__fields {
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
|
||||
Reference in new issue
Block a user