feat(web): 同步 web 端目录更新至 Gitea
包含加氢站站点信息、运维交车/故障、台账与数据分析等页面新增与改动。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -15,6 +15,8 @@ const Component = function() {
|
||||
var Card = antd.Card;
|
||||
var DatePicker = antd.DatePicker;
|
||||
var Popover = antd.Popover;
|
||||
var Tag = antd.Tag;
|
||||
var Avatar = antd.Avatar;
|
||||
var Dropdown = antd.Dropdown;
|
||||
var Modal = antd.Modal;
|
||||
var Upload = antd.Upload;
|
||||
@@ -258,7 +260,12 @@ const Component = function() {
|
||||
updater: '李专员',
|
||||
updateTime: '2025-02-15 16:00',
|
||||
remark: '-',
|
||||
legalStampedContractUploaded: undefined
|
||||
legalStampedContractUploaded: undefined,
|
||||
approvalFlowNodes: [
|
||||
{ nodeTitle: '业务服务主管审批', result: 'passed', operatorName: '姚守涛', operatorTime: '2026-04-29 17:57:15' },
|
||||
{ nodeTitle: '发起审批', result: 'passed', operatorName: '超级用户', operatorTime: '2026-04-28 17:44:45' },
|
||||
{ nodeTitle: '业务负责人审批', result: 'pending', pendingApprovers: ['超级用户', '金可鹏'] }
|
||||
]
|
||||
},
|
||||
// 5. 审批中 + 变更(已通过审批后做了变更并重新提交)
|
||||
{
|
||||
@@ -285,7 +292,12 @@ const Component = function() {
|
||||
updater: '李专员',
|
||||
updateTime: '2025-02-22 14:00',
|
||||
remark: '变更车辆数量',
|
||||
legalStampedContractUploaded: undefined
|
||||
legalStampedContractUploaded: undefined,
|
||||
approvalFlowNodes: [
|
||||
{ nodeTitle: '法务审核', result: 'passed', operatorName: '李法务', operatorTime: '2025-02-21 18:00:00' },
|
||||
{ nodeTitle: '发起审批', result: 'passed', operatorName: '李专员', operatorTime: '2025-02-22 10:00:00' },
|
||||
{ nodeTitle: '业务负责人审批', result: 'pending', pendingApprovers: ['张经理', '赵总监'] }
|
||||
]
|
||||
},
|
||||
// 6. 审批通过 + 合同进行中(正式合同)
|
||||
{
|
||||
@@ -664,6 +676,131 @@ const Component = function() {
|
||||
{ title: '交车人', dataIndex: 'deliveryPerson', key: 'deliveryPerson', width: 100 }
|
||||
];
|
||||
|
||||
function approvalAvatarText(name) {
|
||||
if (!name) return '?';
|
||||
var s = String(name);
|
||||
return s.length <= 2 ? s : s.slice(-2);
|
||||
}
|
||||
|
||||
function renderApprovalFlowContent(nodes) {
|
||||
var list = nodes && nodes.length ? nodes : [];
|
||||
if (!list.length) {
|
||||
return React.createElement('div', { style: { color: 'rgba(0,0,0,0.45)', fontSize: 13, padding: '4px 0' } }, '暂无审批节点明细');
|
||||
}
|
||||
return React.createElement(
|
||||
'div',
|
||||
{ style: { maxWidth: 360, paddingTop: 4 } },
|
||||
list.map(function(node, index) {
|
||||
var isLast = index === list.length - 1;
|
||||
var isPending = node.result === 'pending';
|
||||
var dot = React.createElement(
|
||||
Avatar,
|
||||
{
|
||||
size: 28,
|
||||
style: {
|
||||
backgroundColor: isPending ? '#1890ff' : '#f0f0f0',
|
||||
color: isPending ? '#fff' : 'rgba(0,0,0,0.45)',
|
||||
fontSize: 11,
|
||||
lineHeight: '28px',
|
||||
flexShrink: 0
|
||||
},
|
||||
children: isPending
|
||||
? React.createElement(
|
||||
'svg',
|
||||
{ viewBox: '0 0 24 24', width: 14, height: 14, fill: 'currentColor', style: { verticalAlign: 'middle' } },
|
||||
React.createElement('path', {
|
||||
d: 'M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4zm5-9h2v2h-2V5zm0 4h2v2h-2V9z'
|
||||
})
|
||||
)
|
||||
: approvalAvatarText(node.operatorName)
|
||||
}
|
||||
);
|
||||
var body = React.createElement(
|
||||
'div',
|
||||
{ style: { flex: 1, paddingLeft: 12, paddingBottom: isLast ? 0 : 14, minWidth: 0 } },
|
||||
React.createElement(
|
||||
'div',
|
||||
{ style: { display: 'flex', alignItems: 'center', flexWrap: 'wrap', gap: 8, marginBottom: 6 } },
|
||||
React.createElement('span', { style: { fontSize: 14, color: 'rgba(0,0,0,0.88)', fontWeight: 500 } }, node.nodeTitle || '-'),
|
||||
React.createElement(Tag, { color: isPending ? 'processing' : 'success', style: { margin: 0 } }, isPending ? '待审核' : '通过')
|
||||
),
|
||||
isPending && node.pendingApprovers && node.pendingApprovers.length
|
||||
? React.createElement(
|
||||
Space,
|
||||
{ size: [8, 8], wrap: true },
|
||||
node.pendingApprovers.map(function(apName, i) {
|
||||
return React.createElement(
|
||||
Tag,
|
||||
{
|
||||
key: i,
|
||||
style: {
|
||||
margin: 0,
|
||||
color: '#1890ff',
|
||||
background: '#e6f7ff',
|
||||
borderColor: '#91d5ff'
|
||||
}
|
||||
},
|
||||
React.createElement(
|
||||
'span',
|
||||
null,
|
||||
React.createElement(
|
||||
'svg',
|
||||
{
|
||||
viewBox: '0 0 24 24',
|
||||
width: 12,
|
||||
height: 12,
|
||||
fill: '#1890ff',
|
||||
style: { marginRight: 4, verticalAlign: '-2px' }
|
||||
},
|
||||
React.createElement('path', {
|
||||
d: 'M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'
|
||||
})
|
||||
),
|
||||
apName
|
||||
)
|
||||
);
|
||||
})
|
||||
)
|
||||
: React.createElement(
|
||||
'div',
|
||||
{ style: { fontSize: 13, color: 'rgba(0,0,0,0.45)' } },
|
||||
(node.operatorName || '') + (node.operatorTime ? ' ' + node.operatorTime : '')
|
||||
)
|
||||
);
|
||||
return React.createElement(
|
||||
'div',
|
||||
{ key: index, style: { display: 'flex', alignItems: 'stretch' } },
|
||||
React.createElement(
|
||||
'div',
|
||||
{
|
||||
style: {
|
||||
width: 36,
|
||||
flexShrink: 0,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center'
|
||||
}
|
||||
},
|
||||
React.createElement('div', { style: { lineHeight: 0 } }, dot),
|
||||
isLast
|
||||
? null
|
||||
: React.createElement('div', {
|
||||
style: {
|
||||
flex: 1,
|
||||
width: 2,
|
||||
minHeight: 12,
|
||||
marginTop: 4,
|
||||
background: '#f0f0f0',
|
||||
borderRadius: 1
|
||||
}
|
||||
})
|
||||
),
|
||||
body
|
||||
);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
function getMoreMenuItems(record) {
|
||||
var status = record.contractStatus;
|
||||
var type = record.contractType;
|
||||
@@ -818,7 +955,37 @@ const Component = function() {
|
||||
);
|
||||
}
|
||||
},
|
||||
{ title: '审批状态', dataIndex: 'approvalStatus', key: 'approvalStatus', width: 100 },
|
||||
{
|
||||
title: '审批状态',
|
||||
dataIndex: 'approvalStatus',
|
||||
key: 'approvalStatus',
|
||||
width: 100,
|
||||
render: function(text, record) {
|
||||
if (text !== '审批中') return text;
|
||||
var nodes = record.approvalFlowNodes;
|
||||
return React.createElement(
|
||||
Popover,
|
||||
{
|
||||
content: renderApprovalFlowContent(nodes),
|
||||
trigger: 'hover',
|
||||
placement: 'rightTop',
|
||||
overlayInnerStyle: { maxWidth: 400 },
|
||||
mouseEnterDelay: 0.15
|
||||
},
|
||||
React.createElement(
|
||||
'span',
|
||||
{
|
||||
style: {
|
||||
cursor: 'help',
|
||||
borderBottom: '1px dashed rgba(0,0,0,0.35)',
|
||||
color: 'rgba(0,0,0,0.88)'
|
||||
}
|
||||
},
|
||||
text
|
||||
)
|
||||
);
|
||||
}
|
||||
},
|
||||
{ title: '合同状态', dataIndex: 'contractStatus', key: 'contractStatus', width: 110 },
|
||||
{ title: '客户名称', dataIndex: 'customerName', key: 'customerName', width: 140 },
|
||||
{ title: '签约公司', dataIndex: 'signingCompany', key: 'signingCompany', width: 100 },
|
||||
|
||||
Reference in New Issue
Block a user