From b4725b231cfe2a710288e8bd0b1b9d990989f90c Mon Sep 17 00:00:00 2001
From: xusd <330628789@qq.com>
Date: Tue, 24 Jun 2025 17:30:20 +0800
Subject: [PATCH] Merge branch 'feature/gzdyh_city_bugfix' of http://120.79.193.119:9090/r/gzdyh/front into feature/gzdyh_city_bugfix

---
 src/views/workEfficiency/index.jsx |   66 +++++++++++++++++++++++++++++----
 1 files changed, 58 insertions(+), 8 deletions(-)

diff --git a/src/views/workEfficiency/index.jsx b/src/views/workEfficiency/index.jsx
index 4e32ec0..253b429 100644
--- a/src/views/workEfficiency/index.jsx
+++ b/src/views/workEfficiency/index.jsx
@@ -295,13 +295,38 @@
 	// 超时办件列表
 	async function pageQuantity(search, values = {}) {
 		global.setSpinning(true);
-		const res = await pageQuantityApi({ ...search, ...values });
-		global.setSpinning(false);
-		if (res.type) {
-			let data = res.data.content || [];
-			let total = res?.data?.totalElements || 0;
-			setTableData({ list: data, total });
-			setTimeoutSearch(search);
+		try {
+			const res = await pageQuantityApi({ ...search, ...values });
+			if (res.type) {
+				let data = res.data.content || [];
+				let total = res?.data?.totalElements || 0;
+				setTableData({ 
+					list: data, 
+					total,
+					page: search.page || 1,
+					size: search.size || 10
+				});
+				setTimeoutSearch(search);
+			} else {
+				// API调用失败时,确保数据状态正确
+				setTableData({ 
+					list: [], 
+					total: 0,
+					page: search.page || 1,
+					size: search.size || 10
+				});
+			}
+		} catch (error) {
+			console.error('获取超时办件列表失败:', error);
+			// 异常时,确保数据状态正确
+			setTableData({ 
+				list: [], 
+				total: 0,
+				page: search.page || 1,
+				size: search.size || 10
+			});
+		} finally {
+			global.setSpinning(false);
 		}
 	}
 
@@ -525,6 +550,13 @@
 			},
 		},
 		{
+			title: '任务节点',
+			dataIndex: 'nodeName',
+			width: 150,
+			sorter: true,
+			sortNumber: 1, //设置这个传给后端的
+		},
+		{
 			title: '处理时限',
 			dataIndex: 'timeLimit',
 			defaultSortOrder: 'descend',
@@ -537,6 +569,14 @@
 						{`超${$$.formatHoursToDaysAndHours(text)}`}
 					</div>
 				);
+			},
+		},
+		{
+			title: '是否处理',
+			dataIndex: 'taskStatus',
+			width: 80,
+			render: (text) => {
+				return <span>{text === 1 ? '是' : '否'}</span>;
 			},
 		},
 		{
@@ -753,6 +793,7 @@
 									treedata: $$.caseTypeSelect.caseTypeSelect,
 								},
 								{ type: 'Select', name: 'canal', label: '事项来源', placeholder: '请选择', span: 8, selectdata: $$.options.caseCanal },
+								{ type: 'Select', name: 'taskStatus', label: '任务是否处理', placeholder: '请选择', span: 8, selectdata: $$.options.isOrNot },
 							]}
 							handleReset={() => {
 								form.resetFields();
@@ -1112,7 +1153,15 @@
 									activeKey={radioData.tab2}
 									onChange={(v) => {
 										setRadioData({ ...radioData, tab2: v });
-										pageQuantity({ ...timeoutSearch, queryType: v }, search);
+										// 立即清空数据,确保TableView显示清空状态
+										setTableData({ list: [], total: 0, page: 1, size: 10 });
+										// 重置分页状态,避免列表内容重复
+										const resetSearch = { 
+											...timeoutSearch, 
+											queryType: v, 
+											page: 1 
+										};
+										pageQuantity(resetSearch, search);
 										listTimeOutTaskGroup({ queryType: v }, search);
 									}}
 								/>
@@ -1132,6 +1181,7 @@
 							<div>
 								{radioData.radio2 === '1' && (
 									<TableView
+										key={`timeout-table-${radioData.tab2}`} // 添加key强制重新渲染
 										columns={fxColumns}
 										dataSource={tableData.list}
 										size="small"

--
Gitblit v1.8.0