|
|
@@ -3045,6 +3045,7 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
|
|
|
{
|
|
|
title: t('table.processDesignId'),
|
|
|
width: '5%',
|
|
|
+ align: 'center',
|
|
|
render: (_: any, __: WorkflowDesignVO, index: number) =>
|
|
|
(processDesignPagination.pageNo - 1) * processDesignPagination.pageSize + index + 1,
|
|
|
},
|
|
|
@@ -3052,11 +3053,13 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
|
|
|
title: t('table.name') || '名称',
|
|
|
dataIndex: 'name',
|
|
|
width: '15%',
|
|
|
+ align: 'center',
|
|
|
},
|
|
|
{
|
|
|
title: t('table.nodeCount'),
|
|
|
dataIndex: 'nodeCount',
|
|
|
width: '10%',
|
|
|
+ align: 'center',
|
|
|
render: (count: number) => count ?? 0,
|
|
|
},
|
|
|
{
|
|
|
@@ -3068,23 +3071,25 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
|
|
|
const isChecked = status === 1;
|
|
|
const isUpdating = processDesignStatusUpdating[record.id!] || false;
|
|
|
return (
|
|
|
- <AntdSwitch
|
|
|
- checked={isChecked}
|
|
|
- onChange={(checked) => {
|
|
|
- if (!isUpdating) {
|
|
|
- const newStatus = checked ? 1 : 0;
|
|
|
- handleProcessDesignStatusChanged(record, newStatus);
|
|
|
- }
|
|
|
- }}
|
|
|
- disabled={isUpdating}
|
|
|
- loading={isUpdating}
|
|
|
- style={{
|
|
|
- ...(isChecked ? {
|
|
|
- backgroundColor: '#52c41a',
|
|
|
- } : {})
|
|
|
- }}
|
|
|
- className={isChecked ? 'ant-switch-checked-green' : ''}
|
|
|
- />
|
|
|
+ <div className="flex items-center justify-center">
|
|
|
+ <AntdSwitch
|
|
|
+ checked={isChecked}
|
|
|
+ onChange={(checked) => {
|
|
|
+ if (!isUpdating) {
|
|
|
+ const newStatus = checked ? 1 : 0;
|
|
|
+ handleProcessDesignStatusChanged(record, newStatus);
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ disabled={isUpdating}
|
|
|
+ loading={isUpdating}
|
|
|
+ style={{
|
|
|
+ ...(isChecked ? {
|
|
|
+ backgroundColor: '#52c41a',
|
|
|
+ } : {})
|
|
|
+ }}
|
|
|
+ className={isChecked ? 'ant-switch-checked-green' : ''}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
);
|
|
|
},
|
|
|
},
|
|
|
@@ -3092,6 +3097,7 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
|
|
|
title: t('table.createTime'),
|
|
|
dataIndex: 'createTime',
|
|
|
width: '15%',
|
|
|
+ align: 'center',
|
|
|
render: (time: string | Date | number) => {
|
|
|
if (!time) return '-';
|
|
|
let date: Date;
|
|
|
@@ -3116,6 +3122,7 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
|
|
|
title: t('table.updateTime'),
|
|
|
dataIndex: 'updateTime',
|
|
|
width: '15%',
|
|
|
+ align: 'center',
|
|
|
render: (time: string | Date | number) => {
|
|
|
if (!time) return '-';
|
|
|
let date: Date;
|
|
|
@@ -3140,6 +3147,7 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
|
|
|
title: t('table.description'),
|
|
|
dataIndex: 'description',
|
|
|
width: '18%',
|
|
|
+ align: 'center',
|
|
|
render: (desc: string) => {
|
|
|
const text = desc || '-';
|
|
|
const maxLength = 20;
|
|
|
@@ -3362,24 +3370,28 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
|
|
|
title: t('table.workOrderNo'),
|
|
|
dataIndex: 'orderNo',
|
|
|
width: '12%',
|
|
|
+ align: 'center',
|
|
|
render: (orderNo: string, record: WorkJobVO) => orderNo || record.code || '-',
|
|
|
},
|
|
|
{
|
|
|
title: t('table.workName'),
|
|
|
dataIndex: 'name',
|
|
|
width: '18%',
|
|
|
+ align: 'center',
|
|
|
render: (name: string, record: WorkJobVO) => {
|
|
|
if (!name || name === '-') return <span>{name || '-'}</span>;
|
|
|
return (
|
|
|
- <span
|
|
|
- className="text-blue-600 cursor-pointer hover:text-blue-800 hover:underline"
|
|
|
- onClick={(e) => {
|
|
|
- e.stopPropagation();
|
|
|
- handleWorkJobView(record);
|
|
|
- }}
|
|
|
- >
|
|
|
- {name}
|
|
|
- </span>
|
|
|
+ <div className="flex items-center justify-center">
|
|
|
+ <span
|
|
|
+ className="text-blue-600 cursor-pointer hover:text-blue-800 hover:underline"
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ handleWorkJobView(record);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {name}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
);
|
|
|
},
|
|
|
},
|
|
|
@@ -3387,16 +3399,19 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
|
|
|
title: t('table.workStatus'),
|
|
|
dataIndex: 'status',
|
|
|
width: '10%',
|
|
|
+ align: 'center',
|
|
|
render: (status: string | number) => {
|
|
|
const statusItem = jobStatusDictList.find(item => String(item.value) === String(status));
|
|
|
const statusText = statusItem ? (statusItem.label || '') : String(status || '-');
|
|
|
return (
|
|
|
- <span
|
|
|
- className="inline-flex px-3 py-1 rounded-lg text-xs"
|
|
|
- style={getWorkJobStatusStyle(status)}
|
|
|
- >
|
|
|
- {statusText}
|
|
|
- </span>
|
|
|
+ <div className="flex items-center justify-center">
|
|
|
+ <span
|
|
|
+ className="inline-flex px-3 py-1 rounded-lg text-xs"
|
|
|
+ style={getWorkJobStatusStyle(status)}
|
|
|
+ >
|
|
|
+ {statusText}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
);
|
|
|
},
|
|
|
},
|
|
|
@@ -3404,12 +3419,14 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
|
|
|
title: t('table.currentTask'),
|
|
|
dataIndex: 'currentNodeName',
|
|
|
width: '12%',
|
|
|
+ align: 'center',
|
|
|
render: (currentNodeName: string, record: WorkJobVO) => currentNodeName || record.currentNode || '-',
|
|
|
},
|
|
|
{
|
|
|
title: t('table.workContent'),
|
|
|
dataIndex: 'description',
|
|
|
width: '20%',
|
|
|
+ align: 'center',
|
|
|
render: (description: string, record: WorkJobVO) => {
|
|
|
const content = description || record.content || '-';
|
|
|
if (content === '-') return content;
|
|
|
@@ -3429,12 +3446,14 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
|
|
|
title: t('table.initiator'),
|
|
|
dataIndex: 'initiatorName',
|
|
|
width: '10%',
|
|
|
+ align: 'center',
|
|
|
render: (initiatorName: string, record: WorkJobVO) => initiatorName || record.initiator || '-',
|
|
|
},
|
|
|
{
|
|
|
title: t('table.initiationTime'),
|
|
|
dataIndex: 'initiationTime',
|
|
|
width: '16%',
|
|
|
+ align: 'center',
|
|
|
render: (time: string | Date | number, record: WorkJobVO) => {
|
|
|
const actualTime = time || record.initiateTime;
|
|
|
if (!actualTime) return '-';
|
|
|
@@ -3467,18 +3486,20 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
|
|
|
const urgencyText = urgencyItem ? (urgencyItem.label || '') : (urgencyValue ? String(urgencyValue) : '-');
|
|
|
|
|
|
if (!urgencyValue || urgencyValue === null || urgencyValue === undefined || urgencyValue === '') {
|
|
|
- return <span>-</span>;
|
|
|
+ return <div className="flex items-center justify-center"><span>-</span></div>;
|
|
|
}
|
|
|
|
|
|
const { icon, style } = getUrgencyLevelIconAndStyle(urgencyValue);
|
|
|
|
|
|
return (
|
|
|
- <span
|
|
|
- className="inline-flex items-center justify-center gap-1.5"
|
|
|
- >
|
|
|
- {icon}
|
|
|
- <span style={style}>{urgencyText}</span>
|
|
|
- </span>
|
|
|
+ <div className="flex items-center justify-center">
|
|
|
+ <span
|
|
|
+ className="inline-flex items-center justify-center gap-1.5"
|
|
|
+ >
|
|
|
+ {icon}
|
|
|
+ <span style={style}>{urgencyText}</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
);
|
|
|
},
|
|
|
},
|