Browse Source

修复作业管理的紧急程度列的列宽问题并且调整了其他列

pm 2 months ago
parent
commit
1b6ae37620
1 changed files with 19 additions and 9 deletions
  1. 19 9
      src/components/IsolationWork.tsx

+ 19 - 9
src/components/IsolationWork.tsx

@@ -3368,7 +3368,7 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
     {
       title: t('table.workOrderNo'),
       dataIndex: 'orderNo',
-      width: '12%',
+      width: '9%',
       align: 'center',
       render: (orderNo: string, record: WorkJobVO) => orderNo || record.code || '-',
     },
@@ -3397,7 +3397,7 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
     {
       title: t('table.workStatus'),
       dataIndex: 'status',
-      width: '10%',
+      width: '9%',
       align: 'center',
       render: (status: string | number) => {
         const statusItem = jobStatusDictList.find(item => String(item.value) === String(status));
@@ -3417,14 +3417,24 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
     {
       title: t('table.currentTask'),
       dataIndex: 'currentNodeName',
-      width: '12%',
+      width: '10%',
       align: 'center',
-      render: (currentNodeName: string, record: WorkJobVO) => currentNodeName || record.currentNode || '-',
+      render: (currentNodeName: string, record: WorkJobVO) => {
+        const text = currentNodeName || record.currentNode || '-';
+        if (!text || text === '-') return text;
+        return (
+          <Tooltip title={text}>
+            <span className="inline-block max-w-[140px] truncate align-middle">
+              {text}
+            </span>
+          </Tooltip>
+        );
+      },
     },
     {
       title: t('table.workContent'),
       dataIndex: 'description',
-      width: '20%',
+      width: '15%',
       align: 'center',
       render: (description: string, record: WorkJobVO) => {
         const content = description || record.content || '-';
@@ -3444,14 +3454,14 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
     {
       title: t('table.initiator'),
       dataIndex: 'initiatorName',
-      width: '10%',
+      width: '8%',
       align: 'center',
       render: (initiatorName: string, record: WorkJobVO) => initiatorName || record.initiator || '-',
     },
     {
       title: t('table.initiationTime'),
       dataIndex: 'initiationTime',
-      width: '16%',
+      width: '13%',
       align: 'center',
       render: (time: string | Date | number, record: WorkJobVO) => {
         const actualTime = time || record.initiateTime;
@@ -3477,8 +3487,8 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
     {
       title: t('table.urgencyLevel'),
       dataIndex: 'urgencyLevel',
-       minWidth: '150px', 
-       width: '150px',    
+      
+       width: '9%',    
       align: 'center',
       render: (urgencyLevel: string | number | undefined, record: WorkJobVO) => {
         const urgencyValue = urgencyLevel || record.urgency || record.urgencyLevel;