统一后台状态列顺序、详情布局与测量计费展示

This commit is contained in:
2026-10-28 10:32:33 +08:00
parent 8e97fd6a9f
commit e41e9e6d3f
120 changed files with 436 additions and 238 deletions
+22 -13
View File
@@ -269,7 +269,7 @@ describe('approved Admin density ownership', () => {
expect(editor).toContain('overseas-transport-editor')
expect(editor).toContain('transport-customer-section density-form-section')
expect(layout).toMatch(/\.admin-density\.overseas-business-editor\s*\{\s*width: 100%;\s*\}/)
expect(layout).toMatch(/:not\(\.overseas-transport-editor\)\s*\{\s*max-width: 1120px;/)
expect(layout).not.toContain('max-width: 1120px')
expect(demand.template!.content).toContain('admin-density admin-workbench density-form')
expect(demand.template!.content.match(/<FormSection class="density-form-section"/g)).toHaveLength(3)
expect(css).not.toMatch(/max-width|--el-component-size|font-size|el-form-item__label|margin-bottom/)
@@ -726,7 +726,7 @@ describe('approved Admin density ownership', () => {
for (const source of [role, permission]) {
expect(source).toContain('fullscreenable :confirm-loading="saving"')
expect(source).toContain('density-table--editable')
expect(source).toContain('data-tone="work"')
expect(source).toContain('density-dialog-section')
expect(source).not.toContain('<FormSection')
expect(source).not.toContain('label-position="top"')
const css = parse(source).descriptor.styles.map(style => style.content).join('')
@@ -735,15 +735,15 @@ describe('approved Admin density ownership', () => {
}
expect(role).toContain('data-tone="source"')
expect(role).not.toContain('max-height: 380px')
expect(role).toContain('align-items: start')
expect(role).toContain('.role-editor-layout { grid-template-columns: minmax(0, 1fr); }')
expect(permission).not.toContain('class="form-callout"')
})
it('keeps internal user forms on shared cells and native fullscreen with original geometry', () => {
const source = read('modules/iam/pages/InternalUsersView.vue')
expect(source).toContain('class="density-form density-dialog-sections"')
expect(source).toContain('class="density-form density-form--outlined density-dialog-sections"')
expect(source).toContain('class="density-table density-table--editable user-editor-table"')
expect(source).toContain('data-tone="work"')
expect(source).toContain('class="density-dialog-section workbench-evidence"')
expect(source).toContain('fullscreenable destroy-on-close')
expect(source).toContain('width="min(650px, calc(100vw - 28px))"')
expect(source).not.toContain('<FormSection')
@@ -899,7 +899,7 @@ describe('approved Admin density ownership', () => {
expect(truckDetail).toContain(className)
}
expect(truckDetail).toContain('density-detail-layout')
expect(truckDetail).toContain('density-descriptions')
expect(truckDetail).toContain('class="truck-detail-grid"')
expect(domestic).toContain('<DetailPageLayout')
expect(domestic).toContain('order-info-grid density-fields')
expect(read('modules/overseas-warehouse/pages/LastMileOrderDetailView.vue')).toContain('density-detail-overview')
@@ -929,12 +929,15 @@ describe('approved Admin density ownership', () => {
const source = read('modules/overseas-warehouse/pages/' + file + '.vue')
const ast = parse(source).descriptor.template!.ast!
let panes = 0
const hasPaneBody = (nodes: typeof ast.children): boolean => nodes.some(child => child.type === 1 && (
child.tag !== 'template' || !child.props.some(prop => prop.type === 7 && prop.name === 'slot' && prop.arg?.type === 4 && prop.arg.content === 'label') && hasPaneBody(child.children)
))
const visit = (nodes: typeof ast.children) => { for (const node of nodes) {
if (node.type !== 1) continue
if (node.tag === 'el-tabs') expect(classesOf(node)).toContain('density-contained-tabs')
if (node.tag === 'el-tab-pane') {
panes++
expect(node.children.some(child => child.type === 1 && child.tag !== 'template'), file + ': pane retains body').toBe(true)
expect(hasPaneBody(node.children), file + ': pane retains body').toBe(true)
expect(node.loc.source).toContain('density-tab-icon')
}
visit(node.children)
@@ -1119,7 +1122,7 @@ describe('approved Admin density ownership', () => {
expect(read('modules/customers/pages/CustomerDetailView.vue')).toContain('class="back-button density-back"')
})
it('uses shared outlined actions across domestic tables and explicit classes on teleported dialogs', () => {
it('uses shared actions across domestic tables and explicit classes on teleported dialogs', () => {
for (const file of [...new Set([...densityPages, ...consumers])]) {
const template = parse(read(`modules/${file}`)).descriptor.template!.ast!
const visit = (nodes: typeof template.children, actionSlot = false, parentTag = '') => {
@@ -1492,7 +1495,13 @@ describe('approved Admin density ownership', () => {
expect(evidence).toContain('<LineClampText')
for (const source of [workflow, evidence]) {
const styles = parse(source).descriptor.styles.map(style => style.content).join('\n')
expect(styles).not.toMatch(/background:|border-left:|font-size:/)
expect(styles).not.toMatch(/border-left:|font-size:/)
cssRoot(styles).walkRules(rule => rule.walkDecls(decl => {
if (decl.prop !== 'background') return
expect(source).toBe(evidence)
expect(rule.selector).toMatch(/^\.evidence-photo-(?:preview|empty)$/)
expect(decl.value).toBe('var(--el-fill-color-lighter)')
}))
}
})
it('keeps outbound creation modes compact with one body scroll and complete candidate controls', () => {
@@ -1802,10 +1811,10 @@ describe('approved Admin density ownership', () => {
it('keeps wallet dialogs compact while preserving financial warnings and preview space', () => {
const content = read('modules/finance/pages/FinanceCustomerAccountsView.vue')
const popups = content.slice(content.indexOf('<AppDialog'))
expect(popups.match(/fullscreenable/g)).toHaveLength(4)
expect(popups.match(/class="density-table density-table--editable/g)).toHaveLength(3)
expect(popups.match(/label-position="left" label-width="100px"/g)).toHaveLength(3)
for (const flag of ['adjustmentSaving', 'creditLimitSaving', 'reviewSaving']) expect(popups).toContain(`:disabled="${flag}"`)
expect(popups.match(/fullscreenable/g)).toHaveLength(5)
expect(popups.match(/class="density-table density-table--editable/g)).toHaveLength(4)
expect(popups.match(/label-position="left" label-width="100px"/g)).toHaveLength(4)
for (const flag of ['refundSaving', 'adjustmentSaving', 'creditLimitSaving', 'reviewSaving']) expect(popups).toContain(`:disabled="${flag}"`)
expect(popups).toContain('data-tone="summary"')
expect(popups).toContain('data-tone="source"')
expect(popups).toContain('data-tone="work"')