src/vendor 语义是'第三方/参考',却装着线上氢能看板并反向 import
src/modules,依赖方向倒挂。本次把生产代码归位并建立氢能分层:
src/modules/energy/hydrogen/
index.tsx 导航入口(原 HydrogenModule.tsx)
api.ts types.ts HTTP 与 DTO
dev-mock-api.ts 仅 dev 的 vite 插件(仍由 vite.config.ts 引用)
model/ 纯逻辑(format / bearing-labels / daily-detail-format)
board/ 经营看板 UI(原 vendor energy-h2-bi-board)
station-daily/ 单站日报 UI(原 vendor energy-h2-station-daily)
drill/ 下钻弹层 UI(原 hydrogen-bi-v2 的 UI 部分)
common/ 工具与共享组件(原 vendor common + prototype-download)
fonts/ JetBrains Mono(原 vendor resources/design-system)
- UI 与 CSS 逐字节保留,仅移动位置与改写相对 import。
- 删除自挂载原型入口后遗留的 2 个 annotation-source.json。
- vite.config.ts 与 tsconfig 的路径/exclude 同步清理。
- independent-entry.test.ts 不再硬编码路径,改为断言'两个入口解析到同一文件'。
导入改写用一次性 codemod 完成(按旧位置解析、按新位置重写),
lint / test(131) / build 全绿,可达性分析仍为 0 未引用文件。
386 lines
11 KiB
CSS
386 lines
11 KiB
CSS
.mobile-list-fullscreen-trigger {
|
|
display: none;
|
|
}
|
|
|
|
@media (max-width: 767px) {
|
|
[data-mobile-fullscreen-list] {
|
|
position: relative;
|
|
}
|
|
|
|
.mobile-list-fullscreen-trigger {
|
|
position: absolute;
|
|
z-index: 4;
|
|
top: 10px;
|
|
right: 10px;
|
|
display: inline-flex;
|
|
width: auto;
|
|
min-width: 124px;
|
|
height: 32px;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
padding: 0 10px;
|
|
border: 1px solid #dbe4f1;
|
|
border-radius: 9px;
|
|
background: #fff;
|
|
color: #fff;
|
|
background: #2563eb;
|
|
border-color: #2563eb;
|
|
box-shadow: 0 5px 14px rgb(37 99 235 / 20%);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.mobile-list-fullscreen-trigger.is-inline {
|
|
position: relative;
|
|
inset: auto;
|
|
z-index: auto;
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
.mobile-list-fullscreen-trigger__label {
|
|
font-size: 12px;
|
|
font-weight: 700;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.mobile-list-fullscreen-trigger::before {
|
|
position: absolute;
|
|
inset: -6px;
|
|
content: '';
|
|
}
|
|
|
|
[data-mobile-fullscreen-list] > h2,
|
|
[data-mobile-fullscreen-list] > .sd-section-head,
|
|
[data-mobile-fullscreen-list] > .sd-panel__head-row,
|
|
[data-mobile-fullscreen-list] > .ehb-sum-table-card__head,
|
|
[data-mobile-fullscreen-list] > .ehb-mobile-detail-tabs-head,
|
|
[data-mobile-fullscreen-list] > .ehb-daily-table-head {
|
|
box-sizing: border-box;
|
|
padding-inline-end: 112px !important;
|
|
}
|
|
|
|
/* 复合标题区的 Tab 在第二行,只让第一行标题避让横屏按钮。 */
|
|
[data-mobile-fullscreen-list] > .ehb-mobile-detail-tabs-head {
|
|
padding-inline-end: 14px !important;
|
|
}
|
|
|
|
[data-mobile-fullscreen-list] > .ehb-sum-table-card__head .ehb-sum-table-card__meta,
|
|
[data-mobile-fullscreen-list] > .sd-section-head .sd-panel__meta,
|
|
[data-mobile-fullscreen-list] > .sd-panel__head-row .sd-panel__meta {
|
|
max-width: 100%;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
[data-mobile-fullscreen-list]:fullscreen,
|
|
[data-mobile-fullscreen-list].is-mobile-list-fullscreen,
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] {
|
|
box-sizing: border-box;
|
|
z-index: 200;
|
|
overflow: auto;
|
|
padding: 14px;
|
|
border-radius: 0;
|
|
background: #f4f7fb;
|
|
}
|
|
|
|
[data-mobile-fullscreen-list].is-mobile-list-fullscreen,
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] {
|
|
position: fixed;
|
|
inset: 0;
|
|
}
|
|
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] > .mobile-list-fullscreen-trigger,
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] > * > .mobile-list-fullscreen-trigger {
|
|
position: fixed !important;
|
|
top: 10px !important;
|
|
right: 10px !important;
|
|
z-index: 260 !important;
|
|
}
|
|
|
|
[data-mobile-fullscreen-list]:fullscreen .ehb-sum-table-wrap,
|
|
[data-mobile-fullscreen-list]:fullscreen .ehb-table-wrap,
|
|
[data-mobile-fullscreen-list]:fullscreen .sd-table-scroll,
|
|
[data-mobile-fullscreen-list].is-mobile-list-fullscreen .ehb-sum-table-wrap,
|
|
[data-mobile-fullscreen-list].is-mobile-list-fullscreen .ehb-table-wrap,
|
|
[data-mobile-fullscreen-list].is-mobile-list-fullscreen .sd-table-scroll,
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] .ehb-sum-table-wrap,
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] .ehb-table-wrap,
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] .sd-table-scroll {
|
|
max-height: none;
|
|
overflow: auto;
|
|
background: #fff;
|
|
}
|
|
}
|
|
|
|
/* 宽表只切换阅读布局:竖屏保持原方向并由表格横向滚动。 */
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] {
|
|
box-sizing: border-box;
|
|
position: fixed !important;
|
|
z-index: 200 !important;
|
|
inset: 0 !important;
|
|
overflow: auto !important;
|
|
padding: 10px !important;
|
|
border-radius: 0 !important;
|
|
background: #f4f7fb !important;
|
|
}
|
|
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] .mobile-list-fullscreen-trigger {
|
|
position: fixed !important;
|
|
z-index: 260 !important;
|
|
top: 10px !important;
|
|
right: 10px !important;
|
|
display: inline-flex !important;
|
|
width: auto;
|
|
min-width: 92px;
|
|
height: 32px;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
padding: 0 10px;
|
|
border: 1px solid #dbe4f1;
|
|
border-radius: 9px;
|
|
background: #fff;
|
|
color: #4f6f9f;
|
|
}
|
|
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] .ehb-sum-table-wrap,
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] .ehb-table-wrap,
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] .sd-table-scroll {
|
|
max-height: none !important;
|
|
overflow: auto !important;
|
|
background: #fff;
|
|
}
|
|
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] table {
|
|
width: max-content !important;
|
|
min-width: 100% !important;
|
|
}
|
|
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] table thead th {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 4;
|
|
}
|
|
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] table th:first-child,
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] table td:first-child {
|
|
position: sticky;
|
|
left: 0;
|
|
z-index: 5;
|
|
background: #fff;
|
|
box-shadow: 5px 0 9px -9px #0f172a;
|
|
}
|
|
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] table thead th:first-child {
|
|
z-index: 7;
|
|
background: #f7f9fc;
|
|
}
|
|
|
|
/* 汇总表的第一列只是序号;继续冻结第二列站点名称,横向滚动时保留行身份。 */
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] .ehb-sum-table th:first-child,
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] .ehb-sum-table td:first-child {
|
|
width: 42px;
|
|
min-width: 42px;
|
|
max-width: 42px;
|
|
}
|
|
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] .ehb-sum-table th:nth-child(2),
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] .ehb-sum-table td:nth-child(2) {
|
|
position: sticky;
|
|
left: 42px;
|
|
z-index: 5;
|
|
min-width: 190px;
|
|
background: #fff;
|
|
box-shadow: 7px 0 10px -10px #0f172a;
|
|
}
|
|
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"] .ehb-sum-table thead th:nth-child(2) {
|
|
z-index: 7;
|
|
background: #f7f9fc;
|
|
}
|
|
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"]::after {
|
|
position: fixed;
|
|
right: 10px;
|
|
bottom: 10px;
|
|
z-index: 250;
|
|
padding: 5px 9px;
|
|
border: 1px solid #dbe4f1;
|
|
border-radius: 999px;
|
|
background: rgb(255 255 255 / 92%);
|
|
color: #64748b;
|
|
content: '左右滑动查看更多列';
|
|
font-size: 11px;
|
|
pointer-events: none;
|
|
box-shadow: 0 4px 12px rgb(15 23 42 / 8%);
|
|
}
|
|
|
|
@media (max-width: 767px) and (orientation: portrait) {
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"],
|
|
[data-mobile-fullscreen-list][data-mobile-fullscreen-active="true"].is-mobile-list-fallback {
|
|
transform: none !important;
|
|
transform-origin: initial !important;
|
|
}
|
|
}
|
|
|
|
/* 下钻弹层最终移动端约束:本文件最后加载,避免旧版宽表规则反向撑开页面。 */
|
|
@media (max-width: 767px) {
|
|
.ehb-drill-modal--unified .ehb-modal-body {
|
|
display: flex !important;
|
|
flex-direction: column !important;
|
|
width: 100% !important;
|
|
min-width: 0 !important;
|
|
padding: 12px !important;
|
|
gap: 10px !important;
|
|
overflow: hidden !important;
|
|
}
|
|
|
|
.ehb-drill-modal--unified .ehb-modal-meta-bar {
|
|
flex: 0 0 auto !important;
|
|
width: 100% !important;
|
|
min-width: 0 !important;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
|
|
gap: 6px !important;
|
|
overflow: visible !important;
|
|
}
|
|
|
|
.ehb-drill-modal--unified .ehb-modal-meta-item {
|
|
min-width: 0 !important;
|
|
padding: 10px !important;
|
|
}
|
|
|
|
.ehb-drill-modal--unified .ehb-real-drill-filter-summary,
|
|
.ehb-drill-modal--unified .ehb-drill-filter-summary-row {
|
|
display: flex !important;
|
|
flex: 0 0 auto !important;
|
|
width: 100% !important;
|
|
min-width: 0 !important;
|
|
}
|
|
|
|
.ehb-real-drill-primary-actions {
|
|
display: grid !important;
|
|
flex: 0 0 auto;
|
|
grid-template-columns: minmax(0, 1fr) 132px;
|
|
width: 100%;
|
|
min-width: 0;
|
|
gap: 8px;
|
|
}
|
|
|
|
.ehb-real-drill-primary-actions .ehb-real-drill-filter-summary,
|
|
.ehb-real-drill-primary-actions .mobile-list-fullscreen-trigger {
|
|
position: static !important;
|
|
width: 100% !important;
|
|
min-width: 0 !important;
|
|
height: 48px !important;
|
|
border-radius: 12px !important;
|
|
}
|
|
|
|
.ehb-real-drill-primary-actions .ehb-real-drill-filter-summary {
|
|
display: grid !important;
|
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
gap: 7px;
|
|
}
|
|
|
|
.ehb-real-drill-primary-actions .ehb-real-drill-filter-summary strong {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.ehb-drill-modal--unified .ehb-real-drill-filter-summary {
|
|
min-height: 48px !important;
|
|
padding: 0 14px !important;
|
|
border: 1px solid #d9e3f0 !important;
|
|
border-radius: 12px !important;
|
|
background: #fff !important;
|
|
}
|
|
|
|
.ehb-drill-modal--unified .ehb-modal-table-wrap {
|
|
flex: 1 1 auto !important;
|
|
width: 100% !important;
|
|
min-width: 0 !important;
|
|
min-height: 0 !important;
|
|
overflow: auto !important;
|
|
overscroll-behavior: contain;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
.ehb-drill-modal--unified .ehb-drill-filter-summary-row {
|
|
display: grid !important;
|
|
grid-template-columns: minmax(0, 1fr) auto !important;
|
|
align-items: stretch !important;
|
|
gap: 8px !important;
|
|
}
|
|
|
|
.ehb-drill-modal--unified .ehb-drill-filter-summary-row .mobile-list-fullscreen-trigger {
|
|
position: static !important;
|
|
min-width: 124px !important;
|
|
height: 48px !important;
|
|
border-radius: 12px !important;
|
|
}
|
|
|
|
.ehb-drill-usage-guide {
|
|
display: grid !important;
|
|
flex: 0 0 auto;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
width: 100%;
|
|
gap: 6px;
|
|
}
|
|
|
|
.ehb-drill-usage-guide > span {
|
|
min-width: 0;
|
|
padding: 7px 8px;
|
|
border-radius: 8px;
|
|
background: #eaf2ff;
|
|
color: #52637b;
|
|
font-size: 10px;
|
|
line-height: 1.35;
|
|
text-align: center;
|
|
}
|
|
|
|
.ehb-drill-usage-guide strong { color: #1f5fe0; }
|
|
|
|
.ehb-drill-modal--unified .ehb-modal-table tr[aria-expanded] > td:first-child {
|
|
position: sticky !important;
|
|
}
|
|
|
|
.ehb-drill-modal--unified .ehb-modal-table tr[aria-expanded] > td:first-child::after {
|
|
display: inline-flex;
|
|
margin-left: 8px;
|
|
padding: 2px 6px;
|
|
border-radius: 999px;
|
|
background: #e8f1ff;
|
|
color: #2563eb;
|
|
content: '展开';
|
|
font-size: 9px;
|
|
font-weight: 700;
|
|
white-space: nowrap;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.ehb-drill-modal--unified .ehb-modal-table tr[aria-expanded="true"] > td:first-child::after {
|
|
background: #e7f8f1;
|
|
color: #07875f;
|
|
content: '收起';
|
|
}
|
|
}
|
|
|
|
html.ehb-landscape-session .ehb-drill-modal--unified .ehb-modal-body {
|
|
width: 100% !important;
|
|
min-width: 0 !important;
|
|
overflow: hidden !important;
|
|
}
|
|
|
|
html.ehb-landscape-session .ehb-drill-modal--unified .ehb-modal-meta-bar {
|
|
width: 100% !important;
|
|
min-width: 0 !important;
|
|
grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
|
|
}
|
|
|
|
html.ehb-landscape-session .ehb-drill-modal--unified .ehb-modal-table-wrap {
|
|
flex: 1 1 auto !important;
|
|
width: 100% !important;
|
|
min-width: 0 !important;
|
|
min-height: 0 !important;
|
|
overflow: auto !important;
|
|
}
|