|
|
@@ -267,7 +267,7 @@ export default function MyTask() {
|
|
|
switch (field.type) {
|
|
|
case 'textarea':
|
|
|
return (
|
|
|
- <div key={field.id} style={spanStyle}>
|
|
|
+ <div key={field.id} style={{ ...spanStyle, backgroundColor: '#f5f5f5', padding: '12px', borderRadius: '12px', marginBottom: '12px', border: '1px solid #e0e0e0' }}>
|
|
|
<AntdForm.Item
|
|
|
label={(field.label || field.title || '') + (formConfig.labelSuffix || '')}
|
|
|
name={field.name || field.field}
|
|
|
@@ -289,7 +289,7 @@ export default function MyTask() {
|
|
|
);
|
|
|
case 'password':
|
|
|
return (
|
|
|
- <div key={field.id} style={spanStyle}>
|
|
|
+ <div key={field.id} style={{ ...spanStyle, backgroundColor: '#f5f5f5', padding: '12px', borderRadius: '12px', marginBottom: '12px', border: '1px solid #e0e0e0' }}>
|
|
|
<AntdForm.Item
|
|
|
label={(field.label || field.title || '') + (formConfig.labelSuffix || '')}
|
|
|
name={field.name || field.field}
|
|
|
@@ -310,7 +310,7 @@ export default function MyTask() {
|
|
|
);
|
|
|
case 'number':
|
|
|
return (
|
|
|
- <div key={field.id} style={spanStyle}>
|
|
|
+ <div key={field.id} style={{ ...spanStyle, backgroundColor: '#f5f5f5', padding: '12px', borderRadius: '12px', marginBottom: '12px', border: '1px solid #e0e0e0' }}>
|
|
|
<AntdForm.Item
|
|
|
label={(field.label || field.title || '') + (formConfig.labelSuffix || '')}
|
|
|
name={field.name || field.field}
|
|
|
@@ -331,7 +331,7 @@ export default function MyTask() {
|
|
|
);
|
|
|
case 'select':
|
|
|
return (
|
|
|
- <div key={field.id} style={spanStyle}>
|
|
|
+ <div key={field.id} style={{ ...spanStyle, backgroundColor: '#f5f5f5', padding: '12px', borderRadius: '12px', marginBottom: '12px', border: '1px solid #e0e0e0' }}>
|
|
|
<AntdForm.Item
|
|
|
label={(field.label || field.title || '') + (formConfig.labelSuffix || '')}
|
|
|
name={field.name || field.field}
|
|
|
@@ -354,7 +354,7 @@ export default function MyTask() {
|
|
|
);
|
|
|
case 'date':
|
|
|
return (
|
|
|
- <div key={field.id} style={spanStyle}>
|
|
|
+ <div key={field.id} style={{ ...spanStyle, backgroundColor: '#f5f5f5', padding: '12px', borderRadius: '12px', marginBottom: '12px', border: '1px solid #e0e0e0' }}>
|
|
|
<AntdForm.Item
|
|
|
label={(field.label || field.title || '') + (formConfig.labelSuffix || '')}
|
|
|
name={field.name || field.field}
|
|
|
@@ -374,7 +374,7 @@ export default function MyTask() {
|
|
|
);
|
|
|
case 'daterange':
|
|
|
return (
|
|
|
- <div key={field.id} style={spanStyle}>
|
|
|
+ <div key={field.id} style={{ ...spanStyle, backgroundColor: '#f5f5f5', padding: '12px', borderRadius: '12px', marginBottom: '12px', border: '1px solid #e0e0e0' }}>
|
|
|
<AntdForm.Item
|
|
|
label={(field.label || field.title || '') + (formConfig.labelSuffix || '')}
|
|
|
name={field.name || field.field}
|
|
|
@@ -394,7 +394,7 @@ export default function MyTask() {
|
|
|
);
|
|
|
case 'datetime':
|
|
|
return (
|
|
|
- <div key={field.id} style={spanStyle}>
|
|
|
+ <div key={field.id} style={{ ...spanStyle, backgroundColor: '#f5f5f5', padding: '12px', borderRadius: '12px', marginBottom: '12px', border: '1px solid #e0e0e0' }}>
|
|
|
<AntdForm.Item
|
|
|
label={(field.label || field.title || '') + (formConfig.labelSuffix || '')}
|
|
|
name={field.name || field.field}
|
|
|
@@ -416,7 +416,7 @@ export default function MyTask() {
|
|
|
);
|
|
|
case 'switch':
|
|
|
return (
|
|
|
- <div key={field.id} style={spanStyle}>
|
|
|
+ <div key={field.id} style={{ ...spanStyle, backgroundColor: '#f5f5f5', padding: '12px', borderRadius: '12px', marginBottom: '12px', border: '1px solid #e0e0e0' }}>
|
|
|
<AntdForm.Item
|
|
|
label={(field.label || field.title || '') + (formConfig.labelSuffix || '')}
|
|
|
name={field.name || field.field}
|
|
|
@@ -431,7 +431,7 @@ export default function MyTask() {
|
|
|
);
|
|
|
case 'radio':
|
|
|
return (
|
|
|
- <div key={field.id} style={spanStyle}>
|
|
|
+ <div key={field.id} style={{ ...spanStyle, backgroundColor: '#f5f5f5', padding: '12px', borderRadius: '12px', marginBottom: '12px', border: '1px solid #e0e0e0' }}>
|
|
|
<AntdForm.Item
|
|
|
label={(field.label || field.title || '') + (formConfig.labelSuffix || '')}
|
|
|
name={field.name || field.field}
|
|
|
@@ -449,7 +449,7 @@ export default function MyTask() {
|
|
|
);
|
|
|
case 'checkbox':
|
|
|
return (
|
|
|
- <div key={field.id} style={spanStyle}>
|
|
|
+ <div key={field.id} style={{ ...spanStyle, backgroundColor: '#f5f5f5', padding: '12px', borderRadius: '12px', marginBottom: '12px', border: '1px solid #e0e0e0' }}>
|
|
|
<AntdForm.Item
|
|
|
label={(field.label || field.title || '') + (formConfig.labelSuffix || '')}
|
|
|
name={field.name || field.field}
|
|
|
@@ -467,7 +467,7 @@ export default function MyTask() {
|
|
|
);
|
|
|
case 'cascader':
|
|
|
return (
|
|
|
- <div key={field.id} style={spanStyle}>
|
|
|
+ <div key={field.id} style={{ ...spanStyle, backgroundColor: '#f5f5f5', padding: '12px', borderRadius: '12px', marginBottom: '12px', border: '1px solid #e0e0e0' }}>
|
|
|
<AntdForm.Item
|
|
|
label={(field.label || field.title || '') + (formConfig.labelSuffix || '')}
|
|
|
name={field.name || field.field}
|
|
|
@@ -488,7 +488,7 @@ export default function MyTask() {
|
|
|
);
|
|
|
case 'upload':
|
|
|
return (
|
|
|
- <div key={field.id} style={spanStyle}>
|
|
|
+ <div key={field.id} style={{ ...spanStyle, backgroundColor: '#f5f5f5', padding: '12px', borderRadius: '12px', marginBottom: '12px', border: '1px solid #e0e0e0' }}>
|
|
|
<AntdForm.Item
|
|
|
label={(field.label || field.title || '') + (formConfig.labelSuffix || '')}
|
|
|
name={field.name || field.field}
|
|
|
@@ -517,7 +517,7 @@ export default function MyTask() {
|
|
|
);
|
|
|
default:
|
|
|
return (
|
|
|
- <div key={field.id} style={spanStyle}>
|
|
|
+ <div key={field.id} style={{ ...spanStyle, backgroundColor: '#f5f5f5', padding: '12px', borderRadius: '12px', marginBottom: '12px', border: '1px solid #e0e0e0' }}>
|
|
|
<AntdForm.Item
|
|
|
label={(field.label || field.title || '') + (formConfig.labelSuffix || '')}
|
|
|
name={field.name || field.field}
|
|
|
@@ -899,7 +899,7 @@ export default function MyTask() {
|
|
|
nodeType,
|
|
|
'detailDataWithWorkInfo': detailDataWithWorkInfo
|
|
|
});
|
|
|
- message.warning(`节点类型 ${nodeType} 缺少表单ID,无法加载表单`);
|
|
|
+ // 不显示提示,静默处理
|
|
|
} else {
|
|
|
console.warn('MyTask: ⚠️ 未知原因未获取表单', {
|
|
|
nodeType,
|
|
|
@@ -1187,10 +1187,19 @@ export default function MyTask() {
|
|
|
}}>
|
|
|
{/* 标题区域 */}
|
|
|
<div className="mb-4" style={{ padding: '20px 24px 0' }}>
|
|
|
- <h2 className="text-xl font-semibold text-gray-900 mb-2">
|
|
|
- {detailData.workName || detailData.name || '作业详情'}
|
|
|
- </h2>
|
|
|
- <div className="text-sm flex gap-4" style={{ color: '#898f9a' }}>
|
|
|
+ <div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
|
|
|
+ <div style={{
|
|
|
+ width: '3px',
|
|
|
+ height: '24px',
|
|
|
+ backgroundColor: '#025fff',
|
|
|
+ borderRadius: '2px',
|
|
|
+ flexShrink: 0
|
|
|
+ }}></div>
|
|
|
+ <h2 className="text-xl font-semibold mb-2" style={{ color: '#025fff', marginBottom: 0 }}>
|
|
|
+ {detailData.workName || detailData.name || '作业详情'}
|
|
|
+ </h2>
|
|
|
+ </div>
|
|
|
+ <div className="text-sm flex gap-4" style={{ color: '#898f9a', marginTop: '12px' }}>
|
|
|
<span>作业编号:{detailData.orderNo || '-'}</span>
|
|
|
<span>负责人:{detailData.workerUserName || '-'}</span>
|
|
|
<span>时间:{detailData.workTime ? dateFormatter(detailData.workTime) : '-'}</span>
|
|
|
@@ -1650,7 +1659,11 @@ export default function MyTask() {
|
|
|
|
|
|
console.log('MyTask: 调用提交接口', params);
|
|
|
await myTaskApi.updateNodeApproval(params);
|
|
|
- message.success('提交成功');
|
|
|
+
|
|
|
+ // 根据节点类型显示不同的成功消息
|
|
|
+ const nodeType = String(detailData?.type || detailData?.nodeType || '').trim();
|
|
|
+ const isComplete = nodeType === 'complete';
|
|
|
+ message.success(isComplete ? '完成成功' : '提交成功');
|
|
|
|
|
|
// 关闭弹框
|
|
|
setDetailVisible(false);
|
|
|
@@ -1676,7 +1689,12 @@ export default function MyTask() {
|
|
|
}
|
|
|
}}
|
|
|
>
|
|
|
- 提交
|
|
|
+ {(() => {
|
|
|
+ // 从 detailData.type 或 detailData.nodeType 获取节点类型
|
|
|
+ const nodeType = String(detailData?.type || detailData?.nodeType || '').trim();
|
|
|
+ const isComplete = nodeType === 'complete';
|
|
|
+ return isComplete ? '完成' : '提交';
|
|
|
+ })()}
|
|
|
</Button>
|
|
|
</div>
|
|
|
</div>
|