diff --git a/src/api/common/api.ts b/src/api/common/api.ts index aabce4b..afa63e9 100644 --- a/src/api/common/api.ts +++ b/src/api/common/api.ts @@ -21,7 +21,7 @@ enum Api { deletePendingTask = '/tasktask/taskTask/deletePendingTask', updateTitleAndDeadline = '/tasktask/taskTask/updateTitleAndDeadline', currentNodeInfo = '/act/task/currentNodeInfo', - getBusinessStatus = '/tasktask/taskTask/getBusinessStatus', + } /** @@ -210,11 +210,6 @@ export const updateTitleAndDeadline = (params) => { */ export const queryCurrentNodeInfo = (params) => defHttp.get({ url: Api.currentNodeInfo, params }); -/** - * 查询业务状态(单条) - * @param params { businessId: string } - */ -export const getBusinessStatus = (params) => defHttp.get({ url: Api.getBusinessStatus, params }); /** * 【用于评论功能】自定义文件上传-方法 diff --git a/src/views/bg/xispeak/BgXiSpeakList.vue b/src/views/bg/xispeak/BgXiSpeakList.vue index ed86884..aad54e9 100644 --- a/src/views/bg/xispeak/BgXiSpeakList.vue +++ b/src/views/bg/xispeak/BgXiSpeakList.vue @@ -118,7 +118,7 @@ import { defHttp } from '/@/utils/http/axios'; import { useMessage } from '/@/hooks/web/useMessage'; import { showImportValidationErrors } from '/@/utils/helper/importError'; - import { startProcessSchedules, getBusinessStatus } from '/@/api/common/api'; + import { startProcessSchedules } from '/@/api/common/api'; import { dateUtil } from '/@/utils/dateUtil'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; @@ -360,7 +360,6 @@ import { defHttp } from '/@/utils/http/axios'; if (result && result.length > 0) { record.children = getDataByResult(result); await refreshFeedbackCounts(record.children); - await refreshBusinessStatus(record.children); // 触发表格重新渲染 updateTableDataRecord(record.id, { ...record }); } else { @@ -443,40 +442,6 @@ import { defHttp } from '/@/utils/http/axios'; } } - /** - * 批量查询业务状态并更新到 records 中 - */ - async function refreshBusinessStatus(records) { - const ids = collectAllIds(records); - if (ids.length === 0) return; - try { - const results = await Promise.all( - ids.map((id) => - getBusinessStatus({ businessId: id }).catch(() => null) - ) - ); - const statusMap: Record = {}; - for (const item of results) { - if (item?.businessId) { - statusMap[item.businessId] = item.status_dictText || ''; - } - } - const updateFn = (list) => { - if (!list) return; - for (const item of list) { - const status = statusMap[item.id]; - if (status !== undefined) { - item.status_dictText = status; - } - if (item.children) updateFn(item.children); - } - }; - updateFn(records); - } catch (e) { - // 静默处理查询异常 - } - } - /** * 接口请求成功后回调 */ @@ -484,8 +449,7 @@ import { defHttp } from '/@/utils/http/axios'; getDataByResult(result.items) && loadDataByExpandedRows(); if (result.items && result.items.length > 0) { await refreshFeedbackCounts(result.items); - await refreshBusinessStatus(result.items); - // 触发表格重新渲染以显示更新后的 implCount / closedCount / businessStatus + // 触发表格重新渲染以显示更新后的 implCount / closedCount setTableData([...getDataSource()]); } } diff --git a/src/views/dq/inspectTask/DqInspectTaskList.vue b/src/views/dq/inspectTask/DqInspectTaskList.vue index 5f00320..9f804a5 100644 --- a/src/views/dq/inspectTask/DqInspectTaskList.vue +++ b/src/views/dq/inspectTask/DqInspectTaskList.vue @@ -157,7 +157,7 @@ import Icon from '/@/components/Icon/index'; import SzSelectDept from '/@/components/Form/src/jeecg/components/SzSelectDept.vue'; import SzDeptUserModal from '/@/components/semri/deptUserComponent/SzDeptUserModal.vue'; - import { startProcessSchedules, getBusinessStatus } from '/@/api/common/api'; + import { startProcessSchedules } from '/@/api/common/api'; import { dateUtil } from '/@/utils/dateUtil'; import FlowScheduleStartModal from './components/DqInspectTaskFlowScheduleStartModal.vue'; import BusinessProcessListModal from '/src/components/semri/process/BusinessProcessListModal.vue'; @@ -610,30 +610,8 @@ reload(); } - async function refreshBusinessStatus(records) { - if (!records || records.length === 0) return; - try { - const results = await Promise.all(records.map((item) => getBusinessStatus({ businessId: item.id }).catch(() => null))); - const statusMap: Record = {}; - for (const item of results) { - if (item?.businessId) { - statusMap[item.businessId] = item.status_dictText || ''; - } - } - for (const item of records) { - const status = statusMap[item.id]; - if (status !== undefined) { - item.status_dictText = status; - } - } - } catch (e) { - // 静默处理查询异常 - } - } - async function onFetchSuccess(result) { if (result?.items?.length > 0) { - await refreshBusinessStatus(result.items); setTableData([...getDataSource()]); } }