This commit is contained in:
zlwu committed 2026-08-12 21:40:55 +08:00
1 parent d00f5f6da3
commit 3f21007c18
16 files changed
+223729 -1343

No files matched your search

@@ -1013,6 +1013,7 @@ async function handleConfirmApprove() {
}
dialogs.approve = false
dialogs.viewDetail = false
await refreshPending()
await refreshMenuBadges(menuStore.menuList)
} finally {
@@ -27,7 +27,7 @@
>
<!-- 合同基础信息(一行 4 列) -->
<div class="contract-basic-info">
<el-form-item v-if="isEditMode" label="合同编号" prop="contractNo">
<el-form-item label="合同编号" prop="contractNo">
<el-input v-model="form.contractNo" placeholder="系统自动生成,格式:SX/X-JT20250926002" maxlength="50" />
</el-form-item>
<el-form-item label="合同名称" prop="contractName">
@@ -854,9 +854,6 @@ const formTitle = computed(() => {
return form.value.id ? '编辑合同' : '新增合同'
})
/** 编辑模式(有 editId);新增时隐藏合同编号 */
const isEditMode = computed(() => !!props.editId)
// 合同期限日期范围
const contractDateRange = ref<[string, string]>([])
+16 -86
View File
@@ -58,12 +58,11 @@
>
{{ formatPendingCount(pendingCountFor(card)) }}
</span>
<span class="portal-home-card__badge portal-home-card__badge--fav" aria-hidden="true">
<span class="portal-home-card__badge" aria-hidden="true">
{{ titleAbbr(card.title) }}
</span>
<span class="portal-home-card__body">
<span class="portal-home-card__title">{{ card.title }}</span>
<span class="portal-home-card__sub">{{ favSubTitle(card.path) }}</span>
</span>
<button
type="button"
@@ -104,18 +103,11 @@
>
{{ formatPendingCount(pendingCountFor(card)) }}
</span>
<span
class="portal-home-card__badge"
:data-tone="toneIndex(group.groupPath || activeModule)"
aria-hidden="true"
>
<span class="portal-home-card__badge" aria-hidden="true">
{{ titleAbbr(card.title) }}
</span>
<span class="portal-home-card__body">
<span class="portal-home-card__title">{{ card.title }}</span>
<span class="portal-home-card__sub">{{
group.hideTitle || !group.groupTitle ? panelTitle : group.groupTitle
}}</span>
</span>
<button
type="button"
@@ -231,26 +223,6 @@
return t.slice(0, 1)
}
const favSubTitle = (path: string) => {
for (const sec of modules.value) {
for (const group of sec.groups || []) {
if (!group.cards.some((c) => c.path === path)) continue
if (group.hideTitle || !group.groupTitle) return sec.moduleTitle
return `${sec.moduleTitle} / ${group.groupTitle}`
}
if (sec.cards.some((c) => c.path === path)) return sec.moduleTitle
}
return '收藏入口'
}
/** 同模块稳定色相,便于扫读区分(低饱和薄荷绿系) */
const toneIndex = (modulePath: string) => {
const s = String(modulePath || '')
let h = 0
for (let i = 0; i < s.length; i++) h = (h * 31 + s.charCodeAt(i)) >>> 0
return String(h % 5)
}
const ensureActiveModule = () => {
if (activeModule.value === FAV_KEY) return
const list = modules.value
@@ -581,7 +553,7 @@
display: flex;
gap: 10px;
align-items: center;
min-height: 64px;
min-height: 56px;
padding: 12px 34px 28px 12px;
text-align: left;
cursor: pointer;
@@ -598,15 +570,11 @@
&:hover {
background: #fff;
border-color: #6ee7b7;
box-shadow: 0 6px 16px rgba(16, 185, 129, 0.12);
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
transform: translateY(-1px);
.portal-home-card__badge {
transform: scale(1.04);
}
.portal-home-card__title {
color: var(--mint-primary-dark, #059669);
color: var(--mint-primary, #10b981);
}
}
@@ -637,48 +605,19 @@
box-shadow: 0 6px 16px rgba(16, 185, 129, 0.16);
}
/* 徽标仅作弱辅助,不抢菜单名扫读 */
.portal-home-card__badge {
display: grid;
flex-shrink: 0;
place-items: center;
width: 36px;
height: 36px;
font-size: 14px;
font-weight: 700;
border-radius: 9px;
transition: transform 0.15s ease;
&[data-tone='0'] {
color: #047857;
background: #d1fae5;
}
&[data-tone='1'] {
color: #0f766e;
background: #ccfbf1;
}
&[data-tone='2'] {
color: #065f46;
background: #ecfdf5;
box-shadow: inset 0 0 0 1px #a7f3d0;
}
&[data-tone='3'] {
color: #334155;
background: #e2e8f0;
}
&[data-tone='4'] {
color: #115e59;
background: #f0fdfa;
box-shadow: inset 0 0 0 1px #99f6e4;
}
&--fav {
color: #b45309;
background: #fef3c7;
}
width: 28px;
height: 28px;
font-size: 12px;
font-weight: 600;
color: var(--mint-text-muted, #94a3b8);
background: #f8fafc;
border: 1px solid #eef2f7;
border-radius: 6px;
}
.portal-home-card__body {
@@ -692,25 +631,16 @@
.portal-home-card__title {
display: -webkit-box;
overflow: hidden;
font-size: 13px;
font-size: 14px;
font-weight: 600;
line-height: 1.35;
color: var(--mint-text, #1e293b);
color: var(--mint-primary-dark, #059669);
word-break: break-all;
transition: color 0.15s ease;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.portal-home-card__sub {
overflow: hidden;
font-size: 11px;
line-height: 1.3;
color: var(--mint-text-muted, #94a3b8);
text-overflow: ellipsis;
white-space: nowrap;
}
.portal-home-card__pending {
position: absolute;
top: 6px;