fix(web): 车辆详情证照管理 Tab 与设计稿字段对齐(仅查看)
- 区块标题改为「行驶证信息」等;附图说明与表单一致 - 营运证/通行证去掉设计稿未展示字段;登记证仅附图 - 加氢证信息合并氢气瓶字段;压力表第三项为压力阀检测有效期 - 检验周期以「数字 + 月」只读展示 Made-with: Cursor
This commit is contained in:
@@ -80,24 +80,25 @@ const Component = function () {
|
|||||||
function certPhotoPlaceholder(captionText) {
|
function certPhotoPlaceholder(captionText) {
|
||||||
return 'data:image/svg+xml,' + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="336" height="224"><rect fill="#f5f5f5" width="100%" height="100%"/><text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" fill="#8c8c8c" font-size="13" font-family="system-ui,sans-serif">' + String(captionText || '') + '</text></svg>');
|
return 'data:image/svg+xml,' + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="336" height="224"><rect fill="#f5f5f5" width="100%" height="100%"/><text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" fill="#8c8c8c" font-size="13" font-family="system-ui,sans-serif">' + String(captionText || '') + '</text></svg>');
|
||||||
}
|
}
|
||||||
|
/** 证照管理 Tab mock:字段与录入页设计稿一致(本页仅查看) */
|
||||||
var certificateDetail = {
|
var certificateDetail = {
|
||||||
drivingLicense: { img: licensePhotoPlaceholder, regDate: '2025-07-01', scrapDate: '2038-12-31', inspectExpire: '2027-07-31' },
|
drivingLicense: { img: licensePhotoPlaceholder, regDate: '2025-07-01', scrapDate: '2038-12-31', inspectExpire: '2027-07-31' },
|
||||||
operationPermit: { img: licensePhotoPlaceholder, permitNo: '营330482001234', regDate: '2025-07-15', inspectExpire: '2026-07-14', certExpire: '2030-07-14' },
|
operationPermit: { img: licensePhotoPlaceholder, permitNo: '营330482001234', regDate: '2025-07-15', inspectExpire: '2026-07-14' },
|
||||||
passPermit: { img: licensePhotoPlaceholder, code: 'TX-ZJ-2025-0088', area: '浙江省嘉兴市平湖市行政辖区', expire: '2026-12-31' },
|
passPermit: { img: licensePhotoPlaceholder, code: 'TX-ZJ-2025-0088', area: '浙江省嘉兴市平湖市行政辖区' },
|
||||||
registrationCert: { img: licensePhotoPlaceholder },
|
registrationCert: { img: licensePhotoPlaceholder },
|
||||||
h2Permit: {
|
h2Permit: {
|
||||||
photos: [
|
photos: [
|
||||||
{ label: '特种设备使用登记证', src: certPhotoPlaceholder('特种设备使用登记证') },
|
{ label: '特种设备使用登记证', src: certPhotoPlaceholder('特种设备使用登记证') },
|
||||||
{ label: '特种设备使用标志', src: certPhotoPlaceholder('特种设备使用标志') }
|
{ label: '特种设备使用标志', src: certPhotoPlaceholder('特种设备使用标志') }
|
||||||
],
|
],
|
||||||
permitCode: 'JQZ-2025-F069001',
|
cylinderVendor: '某某高压气瓶制造有限公司',
|
||||||
cardCode: 'JK-88A901256',
|
cylinderInspectDate: '2025-04-01',
|
||||||
inspectDate: '2025-06-15'
|
cylinderCycleMonth: '36',
|
||||||
|
cylinderValidUntil: '2028-03-31'
|
||||||
},
|
},
|
||||||
h2Card: { img: licensePhotoPlaceholder, stationName: '嘉兴港区某某加氢站' },
|
h2Card: { img: licensePhotoPlaceholder, stationName: '嘉兴港区某某加氢站' },
|
||||||
safetyValve: { img: licensePhotoPlaceholder, inspectDate: '2025-05-10', cycle: '12个月', validUntil: '2026-05-09' },
|
safetyValve: { img: licensePhotoPlaceholder, inspectDate: '2025-05-10', cycleMonth: '12', validUntil: '2026-05-09' },
|
||||||
pressureGauge: { img: licensePhotoPlaceholder, inspectDate: '2025-05-10', cycle: '12个月', gaugeValidUntil: '2026-05-09' },
|
pressureGauge: { img: licensePhotoPlaceholder, inspectDate: '2025-05-10', cycleMonth: '12', valveInspectValidUntil: '2026-05-09' }
|
||||||
h2Cylinder: { img: licensePhotoPlaceholder, vendor: '某某高压气瓶制造有限公司', inspectDate: '2025-04-01', cycle: '36个月', cylinderValidUntil: '2028-03-31' }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var maintenanceList = [
|
var maintenanceList = [
|
||||||
@@ -545,7 +546,9 @@ const Component = function () {
|
|||||||
React.createElement('span', { style: { color: 'rgba(0,0,0,0.85)' } }, show ? value : '—')
|
React.createElement('span', { style: { color: 'rgba(0,0,0,0.85)' } }, show ? value : '—')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
function CertSectionCard(title, imageSrc, fieldNodes) {
|
/** photoCaption:左侧附图说明,与设计稿上「行驶证」「营运证」等一致 */
|
||||||
|
function CertSectionCard(title, imageSrc, fieldNodes, photoCaption) {
|
||||||
|
var cap = photoCaption != null && String(photoCaption).trim() !== '' ? String(photoCaption) : '证件照片';
|
||||||
var right = fieldNodes && fieldNodes.length
|
var right = fieldNodes && fieldNodes.length
|
||||||
? React.createElement('div', {
|
? React.createElement('div', {
|
||||||
style: {
|
style: {
|
||||||
@@ -560,7 +563,7 @@ const Component = function () {
|
|||||||
return React.createElement(Card, { key: title, size: 'small', style: { marginBottom: 16 }, title: title },
|
return React.createElement(Card, { key: title, size: 'small', style: { marginBottom: 16 }, title: title },
|
||||||
React.createElement('div', { style: { display: 'flex', gap: 24, flexWrap: 'wrap', alignItems: 'stretch' } },
|
React.createElement('div', { style: { display: 'flex', gap: 24, flexWrap: 'wrap', alignItems: 'stretch' } },
|
||||||
React.createElement('div', { style: { flexShrink: 0, display: 'flex', flexDirection: 'column' } },
|
React.createElement('div', { style: { flexShrink: 0, display: 'flex', flexDirection: 'column' } },
|
||||||
React.createElement('div', { style: { marginBottom: 8, color: 'rgba(0,0,0,0.45)', fontSize: 13 } }, '证件照片'),
|
React.createElement('div', { style: { marginBottom: 8, color: 'rgba(0,0,0,0.45)', fontSize: 13 } }, cap),
|
||||||
React.createElement(Image, {
|
React.createElement(Image, {
|
||||||
width: 168,
|
width: 168,
|
||||||
height: 112,
|
height: 112,
|
||||||
@@ -611,49 +614,47 @@ const Component = function () {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fmtCycleMonth(m) {
|
||||||
|
var s = m == null ? '' : String(m).trim();
|
||||||
|
return s ? s + ' 月' : '—';
|
||||||
|
}
|
||||||
|
|
||||||
var cd = certificateDetail;
|
var cd = certificateDetail;
|
||||||
var licenseManagementTabContent = React.createElement('div', { style: { padding: '0 4px' } },
|
var licenseManagementTabContent = React.createElement('div', { style: { padding: '0 4px' } },
|
||||||
CertSectionCard('行驶证', cd.drivingLicense.img, [
|
CertSectionCard('行驶证信息', cd.drivingLicense.img, [
|
||||||
CertFieldRow('注册日期', cd.drivingLicense.regDate),
|
CertFieldRow('注册日期', cd.drivingLicense.regDate),
|
||||||
CertFieldRow('强制报废日期', cd.drivingLicense.scrapDate),
|
CertFieldRow('强制报废日期', cd.drivingLicense.scrapDate),
|
||||||
CertFieldRow('审验有效期', cd.drivingLicense.inspectExpire)
|
CertFieldRow('行驶证审验有效期', cd.drivingLicense.inspectExpire)
|
||||||
]),
|
], '行驶证'),
|
||||||
CertSectionCard('营运证', cd.operationPermit.img, [
|
CertSectionCard('营运证信息', cd.operationPermit.img, [
|
||||||
CertFieldRow('营运证编号', cd.operationPermit.permitNo),
|
CertFieldRow('营运证编号', cd.operationPermit.permitNo),
|
||||||
CertFieldRow('注册日期', cd.operationPermit.regDate),
|
CertFieldRow('注册日期', cd.operationPermit.regDate),
|
||||||
CertFieldRow('审验有效期', cd.operationPermit.inspectExpire),
|
CertFieldRow('审验有效期', cd.operationPermit.inspectExpire)
|
||||||
CertFieldRow('证件有效期', cd.operationPermit.certExpire)
|
], '营运证'),
|
||||||
]),
|
CertSectionCard('通行证信息', cd.passPermit.img, [
|
||||||
CertSectionCard('通行证', cd.passPermit.img, [
|
|
||||||
CertFieldRow('通行证编码', cd.passPermit.code),
|
CertFieldRow('通行证编码', cd.passPermit.code),
|
||||||
CertFieldRow('通行区域', cd.passPermit.area),
|
CertFieldRow('通行区域', cd.passPermit.area)
|
||||||
CertFieldRow('有效期', cd.passPermit.expire)
|
], '通行证'),
|
||||||
|
CertSectionCard('登记证信息', cd.registrationCert.img, null, '登记证'),
|
||||||
|
CertSectionCardMulti('加氢证信息', cd.h2Permit.photos, [
|
||||||
|
CertFieldRow('氢气瓶厂家', cd.h2Permit.cylinderVendor),
|
||||||
|
CertFieldRow('氢气瓶检验日期', cd.h2Permit.cylinderInspectDate),
|
||||||
|
CertFieldRow('氢气瓶检验周期', fmtCycleMonth(cd.h2Permit.cylinderCycleMonth)),
|
||||||
|
CertFieldRow('氢气瓶检测有效期', cd.h2Permit.cylinderValidUntil)
|
||||||
]),
|
]),
|
||||||
CertSectionCard('登记证', cd.registrationCert.img, null),
|
CertSectionCard('加氢卡信息', cd.h2Card.img, [
|
||||||
CertSectionCardMulti('加氢证', cd.h2Permit.photos, [
|
|
||||||
CertFieldRow('加氢证编码', cd.h2Permit.permitCode),
|
|
||||||
CertFieldRow('加氢卡编码', cd.h2Permit.cardCode),
|
|
||||||
CertFieldRow('检验日期', cd.h2Permit.inspectDate)
|
|
||||||
]),
|
|
||||||
CertSectionCard('加氢卡', cd.h2Card.img, [
|
|
||||||
CertFieldRow('加氢卡对应加氢站', cd.h2Card.stationName)
|
CertFieldRow('加氢卡对应加氢站', cd.h2Card.stationName)
|
||||||
]),
|
], '加氢卡'),
|
||||||
CertSectionCard('安全阀', cd.safetyValve.img, [
|
CertSectionCard('安全阀信息', cd.safetyValve.img, [
|
||||||
CertFieldRow('检验日期', cd.safetyValve.inspectDate),
|
CertFieldRow('检验日期', cd.safetyValve.inspectDate),
|
||||||
CertFieldRow('检验周期', cd.safetyValve.cycle),
|
CertFieldRow('检验周期', fmtCycleMonth(cd.safetyValve.cycleMonth)),
|
||||||
CertFieldRow('安全阀检测有效期', cd.safetyValve.validUntil)
|
CertFieldRow('安全阀检测有效期', cd.safetyValve.validUntil)
|
||||||
]),
|
], '安全阀'),
|
||||||
CertSectionCard('压力表', cd.pressureGauge.img, [
|
CertSectionCard('压力表信息', cd.pressureGauge.img, [
|
||||||
CertFieldRow('检验日期', cd.pressureGauge.inspectDate),
|
CertFieldRow('检验日期', cd.pressureGauge.inspectDate),
|
||||||
CertFieldRow('检验周期', cd.pressureGauge.cycle),
|
CertFieldRow('检验周期', fmtCycleMonth(cd.pressureGauge.cycleMonth)),
|
||||||
CertFieldRow('压力表检测有效期', cd.pressureGauge.gaugeValidUntil)
|
CertFieldRow('压力阀检测有效期', cd.pressureGauge.valveInspectValidUntil)
|
||||||
]),
|
], '压力表')
|
||||||
CertSectionCard('氢气瓶', cd.h2Cylinder.img, [
|
|
||||||
CertFieldRow('气瓶厂家', cd.h2Cylinder.vendor),
|
|
||||||
CertFieldRow('检验日期', cd.h2Cylinder.inspectDate),
|
|
||||||
CertFieldRow('检验周期', cd.h2Cylinder.cycle),
|
|
||||||
CertFieldRow('氢瓶检测有效期', cd.h2Cylinder.cylinderValidUntil)
|
|
||||||
])
|
|
||||||
);
|
);
|
||||||
|
|
||||||
var tabItems = [
|
var tabItems = [
|
||||||
|
|||||||
Reference in New Issue
Block a user