Просмотр исходного кода

style(web): 重设计我的待办空状态

sy 3 дней назад
Родитель
Сommit
7695eec533

+ 7 - 4
web-scaffold/src/pages/WorkOrderMinePage.tsx

@@ -129,10 +129,13 @@ function WorkOrderMineInner() {
       {list.loading ? <div className="order-empty work-order-mine-empty" role="status">
         <LoaderCircle size={23} className="work-order-mine-loading" aria-hidden="true" />正在读取待办…
       </div> : fail ? <TicketState fail={fail} onRetry={list.reload} />
-        : !displayedGroups.length ? <div className="order-empty work-order-mine-empty">
-          <ClipboardCheck size={27} aria-hidden="true" />
-          <h3>{rows.length ? "这一组暂无工单" : "暂无待办工单"}</h3>
-          {!rows.length && <p>分派给你的工单会出现在这里。</p>}
+        : !displayedGroups.length ? <div className="work-order-mine-blank">
+          <span className="work-order-mine-blank-icon"><ClipboardCheck size={28} aria-hidden="true" /></span>
+          <div>
+            <h2>{rows.length ? "当前分组暂无工单" : "暂无待办工单"}</h2>
+            {!rows.length && <p>有工单分派给你时,会显示在这里。</p>}
+          </div>
+          {rows.length > 0 && <Link className="ops-table-action" to={queueUrl("all")} replace state={location.state}>查看全部待办<ArrowRight size={14} aria-hidden="true" /></Link>}
         </div> : <div className="ops-table-wrap work-order-mine-scroll" role="region" aria-label="待办工单清单" tabIndex={0}>
           <table className="ops-table work-order-mine-table" aria-label="我的待办工单">
             <OpsTableColumns widths={[330, 190, 150, 190, 140]} />

+ 23 - 1
web-scaffold/src/styles/work-order-mine.css

@@ -108,7 +108,29 @@
 .work-order-mine-row:focus-within:not([data-selected]) td { background: var(--surface-subtle); }
 
 .work-order-mine-empty { gap: 8px; padding-block: 54px; }
-.work-order-mine-empty h3, .work-order-mine-empty p { margin: 0; }
+.work-order-mine-blank {
+  display: flex;
+  flex: 1;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  gap: 14px;
+  min-height: 240px;
+  padding: 32px 20px;
+  text-align: center;
+}
+.work-order-mine-blank-icon {
+  display: grid;
+  place-items: center;
+  width: 58px;
+  height: 58px;
+  border: 1px solid var(--primary-border);
+  border-radius: 16px;
+  background: var(--primary-soft);
+  color: var(--primary-soft-foreground);
+}
+.work-order-mine-blank h2 { margin: 0; color: var(--foreground); font-size: var(--type-section); font-weight: 600; }
+.work-order-mine-blank p { margin: 5px 0 0; color: var(--muted-foreground); font-size: var(--type-support); }
 .work-order-mine-empty[role="status"] { color: var(--muted-foreground); font-size: var(--type-body); }
 .work-order-mine-footer { display: flex; flex: none; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 9px 16px; border-top: 1px solid var(--border-subtle); color: var(--muted-foreground); font-size: var(--type-support); }