feat(运维-车辆): 异动管理查看/结束异动/编辑、备件与需求说明更新
Made-with: Cursor
This commit is contained in:
@@ -80,12 +80,23 @@ const Component = function () {
|
||||
|
||||
// 证照管理 Tab:证件照片占位(可替换为真实 URL,支持 Image 预览)
|
||||
var licensePhotoPlaceholder = '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="14" font-family="system-ui,sans-serif">行驶证/证照示意图</text></svg>');
|
||||
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>');
|
||||
}
|
||||
var certificateDetail = {
|
||||
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' },
|
||||
passPermit: { img: licensePhotoPlaceholder, code: 'TX-ZJ-2025-0088', area: '浙江省嘉兴市平湖市行政辖区', expire: '2026-12-31' },
|
||||
registrationCert: { img: licensePhotoPlaceholder },
|
||||
h2Permit: { img: licensePhotoPlaceholder, permitCode: 'JQZ-2025-F069001', cardCode: 'JK-88A901256', inspectDate: '2025-06-15' },
|
||||
h2Permit: {
|
||||
photos: [
|
||||
{ label: '特种设备使用登记证', src: certPhotoPlaceholder('特种设备使用登记证') },
|
||||
{ label: '特种设备使用标志', src: certPhotoPlaceholder('特种设备使用标志') }
|
||||
],
|
||||
permitCode: 'JQZ-2025-F069001',
|
||||
cardCode: 'JK-88A901256',
|
||||
inspectDate: '2025-06-15'
|
||||
},
|
||||
h2Card: { img: licensePhotoPlaceholder, stationName: '嘉兴港区某某加氢站' },
|
||||
safetyValve: { img: licensePhotoPlaceholder, inspectDate: '2025-05-10', cycle: '12个月', validUntil: '2026-05-09' },
|
||||
pressureGauge: { img: licensePhotoPlaceholder, inspectDate: '2025-05-10', cycle: '12个月', gaugeValidUntil: '2026-05-09' },
|
||||
@@ -545,6 +556,42 @@ const Component = function () {
|
||||
)
|
||||
);
|
||||
}
|
||||
/** 证照多图:每项 { label, src },如加氢证下登记证 + 使用标志 */
|
||||
function CertSectionCardMulti(title, photoSlots, fieldNodes) {
|
||||
var right = fieldNodes && fieldNodes.length
|
||||
? React.createElement('div', {
|
||||
style: {
|
||||
flex: 1,
|
||||
minWidth: 260,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
alignSelf: 'stretch'
|
||||
}
|
||||
}, React.createElement('div', { style: { width: '100%' } }, fieldNodes))
|
||||
: null;
|
||||
var slots = photoSlots || [];
|
||||
var photosRow = React.createElement('div', { style: { display: 'flex', gap: 16, flexWrap: 'wrap', flexShrink: 0, alignItems: 'flex-start' } },
|
||||
slots.map(function (slot, idx) {
|
||||
return React.createElement('div', { key: idx, style: { display: 'flex', flexDirection: 'column' } },
|
||||
React.createElement('div', { style: { marginBottom: 8, color: 'rgba(0,0,0,0.45)', fontSize: 13 } }, slot.label || '证件照片'),
|
||||
React.createElement(Image, {
|
||||
width: 168,
|
||||
height: 112,
|
||||
style: { objectFit: 'cover', borderRadius: 4, border: '1px solid #f0f0f0', background: '#fafafa' },
|
||||
src: slot.src,
|
||||
alt: (slot.label || title) + '',
|
||||
preview: true
|
||||
})
|
||||
);
|
||||
})
|
||||
);
|
||||
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' } },
|
||||
photosRow,
|
||||
right
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
var cd = certificateDetail;
|
||||
var licenseManagementTabContent = React.createElement('div', { style: { padding: '0 4px' } },
|
||||
@@ -565,7 +612,7 @@ const Component = function () {
|
||||
CertFieldRow('有效期', cd.passPermit.expire)
|
||||
]),
|
||||
CertSectionCard('登记证', cd.registrationCert.img, null),
|
||||
CertSectionCard('加氢证', cd.h2Permit.img, [
|
||||
CertSectionCardMulti('加氢证', cd.h2Permit.photos, [
|
||||
CertFieldRow('加氢证编码', cd.h2Permit.permitCode),
|
||||
CertFieldRow('加氢卡编码', cd.h2Permit.cardCode),
|
||||
CertFieldRow('检验日期', cd.h2Permit.inspectDate)
|
||||
|
||||
Reference in New Issue
Block a user