流程卡与活动卡按管理系统风重做:着色图标 · 状态胶囊 · 计量块
上一稿的两段式卡(头行 + 竖线分格)信息没错,视觉是素坯 —— 没有身份色、
没有状态语义色、数字排一排像表格,整片看过去是灰的。按管理后台的规格重做:
· **头行**:40px 着色图标定身份(流程靛 · 活动青 · 审批琥珀)+ 名/标识 +
**状态胶囊**(圆点 + 词:生效/上架走绿,下线/停用是灰,下线的图标同步转灰);
· **计量块**:浅底圆角小块、数上名下 —— 边闭合不全那格整块点红,不只字红;
· 活动卡的业务分类并进副标行(`rfq-intake · 统一报价`)—— 分类是唯一的一维,
不值一枚独立签;
· 卡 12px 圆角软影,悬停抬升;幽灵卡同尺寸虚线位。
· 计量字号 14px、卡最小宽 288 —— 「14/14」实测不再截断(scrollWidth 核过)。
中途试过一版「图纸风」(流程画几何缩略、活动画芯片、审批画比较器),
用户明确不要:**这是管理系统,不做电路隐喻** —— 图形三件连同珊格纸整体撤除,
只留这一套管理系统语言。
交互不变:整卡可点、⋯ 菜单(编辑/删除)、就地改名、幽灵卡新建/装入,全部复核过。
五闸绿。
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
@@ -246,7 +246,7 @@
|
||||
.g-load b { font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
|
||||
|
||||
/* ============ 货架:卡片墙 ============ */
|
||||
.g-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 12px; }
|
||||
.g-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 14px; }
|
||||
.g-tile { display: flex; flex-direction: column; gap: 10px; min-height: 158px; padding: 14px 15px; background: var(--card); border: 1px solid var(--cline); border-radius: 13px; box-shadow: var(--cshadow); cursor: pointer; text-align: left; font: inherit; transition: box-shadow var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
|
||||
.g-tile:hover { border-color: #c9d6e6; box-shadow: 0 5px 14px -5px rgba(19, 28, 38, .22); transform: translateY(-1px); }
|
||||
.g-tile-h { display: flex; align-items: center; gap: 9px; }
|
||||
@@ -260,51 +260,59 @@
|
||||
.g-tile-f > .g-btn { margin-left: auto; height: 24px; padding: 0 9px; font-size: 11px; }
|
||||
.g-tile-f .r { margin-left: auto; font-family: var(--mono); color: var(--ink-4); }
|
||||
|
||||
/* ── 流程卡(货架)—— 两段:头(身份 · 状态 · ⋯)+ 数据板(四格计量) ──────
|
||||
从前是「头 + 芯片行 + 一大片空 + 脚注」,卡撑到 158 高全靠留白;
|
||||
现在段段有内容、段间有线,高矮由内容说了算。 */
|
||||
.g-fcard { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--cline); border-radius: 12px; box-shadow: var(--cshadow); overflow: hidden; transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); }
|
||||
.g-fcard:hover { border-color: #c9d6e6; box-shadow: 0 5px 14px -5px rgba(19, 28, 38, .22); transform: translateY(-1px); }
|
||||
/* 整面一枚透明按钮 = 进这条流;字面不吃点击,直接穿到它身上(卡里还住着 ⋯ 与输入框) */
|
||||
/* ── 流程卡 / 活动卡(2026-07-30 定稿,管理系统风):白卡圆角软影 ——
|
||||
头行 = 着色图标 + 名/标识 + 状态胶囊 + 动作;下行 = 计量块(浅底圆角、数上名下)。
|
||||
层次靠色块与字阶,不靠留白;整卡可点,动作钮各自吃自己的点击。 */
|
||||
.g-fcard { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 13px; background: var(--card); border: 1px solid #e2e8ef; border-radius: 12px; box-shadow: 0 1px 2px rgba(19, 28, 38, .04); transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); }
|
||||
.g-fcard:hover { border-color: #c2cfde; box-shadow: 0 8px 22px -10px rgba(19, 28, 38, .18); transform: translateY(-1px); }
|
||||
.g-fcard.off { background: #fbfcfd; }
|
||||
/* 整面一枚透明按钮 = 打开;字面不吃点击,直接穿到它身上(卡里还住着钮与输入框) */
|
||||
.g-fcard > .hit { position: absolute; inset: 0; z-index: 0; border: 0; background: transparent; cursor: pointer; }
|
||||
.g-fcard > .hit:focus-visible { outline: 2px solid var(--brand); outline-offset: -3px; border-radius: 12px; }
|
||||
.g-fcard > .hd, .g-fcard > .plate { position: relative; z-index: 1; pointer-events: none; }
|
||||
.g-fcard button, .g-fcard input { pointer-events: auto; }
|
||||
.g-fcard > .hd { display: flex; align-items: center; gap: 9px; padding: 13px 12px 12px 13px; }
|
||||
.g-fcard .ico { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--brand-deep); background: var(--brand-wash); }
|
||||
.g-fcard.off .ico { color: var(--ink-4); background: #eef1f5; }
|
||||
.g-fcard .ttl { flex: 1; min-width: 0; line-height: 1.3; }
|
||||
.g-fcard .ttl b { display: block; font-size: 14px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.g-fcard .ttl em { display: block; font-style: normal; font-size: 10.5px; font-family: var(--mono); color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.g-fcard .ttl .g-input { width: 100%; height: 25px; padding: 0 7px; font-size: 13px; }
|
||||
.g-fcard .stx { flex: none; font: 600 10.5px/1 var(--mono); color: var(--ink-4); }
|
||||
.g-fcard .stx.on { color: var(--ok); }
|
||||
.g-fcard .mbtn { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ink-4); cursor: pointer; }
|
||||
|
||||
/* 头行:着色图标定身份(流程靛 · 活动青 · 审批琥珀),下线/停用整体转灰 */
|
||||
.g-fcard > .hd { display: flex; align-items: flex-start; gap: 10px; }
|
||||
.g-fcard .ico { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #4954e6; background: #eef0fe; }
|
||||
.g-fcard .ico.teal { color: #0a8f84; background: #e5f6f4; }
|
||||
.g-fcard .ico.amber { color: #b0822d; background: #fdf3e3; }
|
||||
.g-fcard.off .ico { color: #7c8797; background: #f0f3f7; }
|
||||
.g-fcard .ttl { flex: 1; min-width: 0; line-height: 1.35; padding-top: 1px; }
|
||||
.g-fcard .ttl b { display: block; font-size: 14.5px; font-weight: 700; letter-spacing: .01em; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.g-fcard .ttl em { display: block; margin-top: 2px; font-style: normal; font-size: 10.5px; font-family: var(--mono); color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.g-fcard .ttl .g-input { width: 100%; height: 26px; padding: 0 7px; font-size: 13px; }
|
||||
/* 状态胶囊:圆点 + 词 —— 生效/上架走绿,下线/停用是灰 */
|
||||
.g-fcard .pill { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; background: #f1f4f8; font: 600 11px/1 var(--sans); color: #5b6572; }
|
||||
.g-fcard .pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #98a4b3; }
|
||||
.g-fcard .pill.on { background: #e6f6ee; color: #0c8154; }
|
||||
.g-fcard .pill.on::before { background: #18a568; }
|
||||
.g-fcard .mbtn { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ink-4); cursor: pointer; }
|
||||
.g-fcard .mbtn:hover, .g-fcard .mbtn.on { border-color: var(--cline); background: #f3f6fa; color: var(--ink); }
|
||||
/* 数据板:四格等宽、竖线分隔 —— 数字在上、名目在下,一行说完这条流有多大 */
|
||||
.g-fcard .plate { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-soft); background: #fafbfd; }
|
||||
.g-fcard .plate > span { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px 10px; border-left: 1px solid var(--line-soft); }
|
||||
.g-fcard .plate > span:first-child { border-left: 0; }
|
||||
.g-fcard .plate b { font: 700 15px/1 var(--mono); letter-spacing: -.02em; color: var(--ink); }
|
||||
.g-fcard .plate i { font-style: normal; font-size: 10px; color: var(--ink-4); }
|
||||
.g-fcard .mbtn.bad:hover { border-color: #e6c4c4; background: #fdf2f2; color: var(--danger); }
|
||||
|
||||
/* 计量块:浅底圆角、数上名下 —— 格数随卡自适应;闭合不全那格点红 */
|
||||
.g-fcard > .plate { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 7px; }
|
||||
.g-fcard .plate > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 8px 8px 9px; border-radius: 9px; background: #f6f8fb; }
|
||||
.g-fcard .plate b { font: 700 14px/1 var(--mono); letter-spacing: -.03em; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.g-fcard .plate i { font-style: normal; font-size: 10px; color: var(--ink-4); white-space: nowrap; }
|
||||
.g-fcard .plate > span.bad { background: #fdf3f3; }
|
||||
.g-fcard .plate > span.bad b { color: var(--danger); }
|
||||
/* ⋯ 菜单:压在卡内右上角(卡是 overflow:hidden,菜单只在卡里活动) */
|
||||
.g-fcard .menu { position: absolute; right: 10px; top: 41px; z-index: 3; width: 138px; display: flex; flex-direction: column; gap: 2px; padding: 5px; border: 1px solid var(--cline); border-radius: 9px; background: #fff; box-shadow: 0 10px 22px -8px rgba(19, 28, 38, .3); }
|
||||
|
||||
/* ⋯ 菜单:从头行那枚钮下弹出 */
|
||||
.g-fcard .menu { position: absolute; right: 12px; top: 46px; z-index: 3; width: 148px; display: flex; flex-direction: column; gap: 2px; padding: 5px; border: 1px solid var(--cline); border-radius: 9px; background: #fff; box-shadow: 0 10px 22px -8px rgba(19, 28, 38, .3); }
|
||||
.g-fcard .menu button { display: flex; align-items: center; gap: 6px; width: 100%; height: 27px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; font: 500 12px/1 var(--sans); color: var(--ink); text-align: left; cursor: pointer; }
|
||||
.g-fcard .menu button:hover { background: #f2f5f9; }
|
||||
.g-fcard .menu button.bad { color: var(--danger); }
|
||||
.g-fcard .menu button.bad:hover { background: #fdf2f2; }
|
||||
.g-fcard .menu .q { padding: 3px 8px 5px; font-size: 11px; line-height: 1.5; color: var(--ink-3); }
|
||||
/* 活动卡的分类签:压在卡右下角的一枚小字 —— 业务分类是活动库唯一的一维 */
|
||||
/* 分类签:业务分类是活动库唯一的一维 —— 一枚行内小字,不另占一行 */
|
||||
.g-fcard .tag { flex: none; padding: 2px 6px; border: 1px solid var(--line-soft); border-radius: 5px; font: 500 10px/1.4 var(--sans); color: var(--ink-4); }
|
||||
.g-fcard .ico.apr { color: var(--warn); background: #fdf3e3; }
|
||||
.g-fcard .mbtn.bad:hover { border-color: #e6c4c4; background: #fdf2f2; color: var(--danger); }
|
||||
|
||||
/* 审批依据:一行两格 + 删 */
|
||||
.g-basis { display: flex; flex-direction: column; gap: 6px; }
|
||||
.g-basis-r { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; }
|
||||
/* 幽灵卡:新建住在货架里 —— 与真卡同宽同高,一眼看出「这儿还能再添一条」 */
|
||||
.g-fcard.ghost { flex-direction: row; align-items: center; justify-content: center; gap: 7px; min-height: 102px; border-style: dashed; border-color: #c6d1de; background: transparent; box-shadow: none; color: var(--ink-4); font: 600 12.5px/1 var(--sans); cursor: pointer; }
|
||||
|
||||
/* 幽灵卡:同尺寸的虚线位 —— 一眼看出「这儿还能再添一条」 */
|
||||
.g-fcard.ghost { flex-direction: row; justify-content: center; align-items: center; gap: 7px; min-height: 122px; border-style: dashed; border-color: #c0cbd8; background: #fcfdfe; box-shadow: none; color: var(--ink-4); font: 600 12.5px/1 var(--sans); cursor: pointer; }
|
||||
.g-fcard.ghost:hover { border-color: var(--brand); background: var(--brand-wash); color: var(--brand-deep); box-shadow: none; transform: none; }
|
||||
|
||||
/* ============ 规则清单(触发器):整行可下钻 ============ */
|
||||
|
||||
@@ -65,15 +65,17 @@ export function LibraryHome({ nav }: HomeProps) {
|
||||
<div key={a.activityId} className={'g-fcard' + (a.enabled ? '' : ' off')}>
|
||||
<button className="hit" aria-label={`打开 ${a.name}`} onClick={() => nav.push({ k: 'act', id: a.activityId })} />
|
||||
<div className="hd">
|
||||
<span className="ico">
|
||||
<Ico name="boxes" s={15} />
|
||||
<span className="ico teal">
|
||||
<Ico name="boxes" s={17} />
|
||||
</span>
|
||||
<div className="ttl">
|
||||
<b>{a.name}</b>
|
||||
<em>{a.activityId}</em>
|
||||
{/* 标识与业务分类同一行副标 —— 分类是活动库唯一的一维,不值一枚独立签 */}
|
||||
<em>
|
||||
{a.activityId} · {a.category}
|
||||
</em>
|
||||
</div>
|
||||
<span className="tag">{a.category}</span>
|
||||
<span className={'stx' + (a.enabled ? ' on' : '')}>{a.enabled ? '已上架' : '已停用'}</span>
|
||||
<span className={'pill' + (a.enabled ? ' on' : '')}>{a.enabled ? '已上架' : '已停用'}</span>
|
||||
</div>
|
||||
<div className="plate">
|
||||
<span>
|
||||
@@ -164,8 +166,8 @@ function ApprovalTemplates({ data }: { data: GovApprovalTemplates['templates'] }
|
||||
{data.map((t) => (
|
||||
<div key={t.id} className="g-fcard">
|
||||
<div className="hd">
|
||||
<span className="ico apr">
|
||||
<Ico name="shield-check" s={15} />
|
||||
<span className="ico amber">
|
||||
<Ico name="shield-check" s={17} />
|
||||
</span>
|
||||
<div className="ttl">
|
||||
<b>{t.name}</b>
|
||||
|
||||
@@ -268,7 +268,7 @@ function FlowShelf({ nav }: { nav: Nav }) {
|
||||
<button className="hit" aria-label={`打开 ${shown.name}`} onClick={() => nav.push({ k: 'pkg', id: f.id })} />
|
||||
<div className="hd">
|
||||
<span className="ico">
|
||||
<Ico name="workflow" s={15} />
|
||||
<Ico name="workflow" s={17} />
|
||||
</span>
|
||||
<div className="ttl">
|
||||
{renaming === f.id ? (
|
||||
@@ -291,7 +291,7 @@ function FlowShelf({ nav }: { nav: Nav }) {
|
||||
)}
|
||||
<em>{f.id}</em>
|
||||
</div>
|
||||
<span className={'stx' + (f.active === undefined ? '' : ' on')}>
|
||||
<span className={'pill' + (f.active === undefined ? '' : ' on')}>
|
||||
{f.active === undefined ? '已下线' : `生效 v${f.active.version}`}
|
||||
</span>
|
||||
<button
|
||||
@@ -306,7 +306,7 @@ function FlowShelf({ nav }: { nav: Nav }) {
|
||||
<Ico name="more-horizontal" s={14} />
|
||||
</button>
|
||||
</div>
|
||||
{/* 数据板:四格等宽、竖线分隔 —— 一行说完这条流有多大、闭合没有 */}
|
||||
{/* 计量块:一排说完这条流有多大、闭合没有 */}
|
||||
<div className="plate">
|
||||
<span>
|
||||
<b>{c.activity}</b>
|
||||
|
||||
Reference in New Issue
Block a user