diff --git a/src/pages/SupplierRelation/index.tsx b/src/pages/SupplierRelation/index.tsx index f82248c..90a2e74 100644 --- a/src/pages/SupplierRelation/index.tsx +++ b/src/pages/SupplierRelation/index.tsx @@ -25,6 +25,7 @@ const SupplierRelation: React.FC<{}> = () => { const tpId = getURLInformation("tpId"); const sectionId = getURLInformation("sectionId"); const roomId = getURLInformation("roomId"); + const readingCode = getURLInformation("readingCode"); const readOnlyColumns: ProColumns[] = [ { title: 供应商A, @@ -72,7 +73,7 @@ const SupplierRelation: React.FC<{}> = () => { "assessRoomId": roomId, } // let params = { "tpId": "1626032810108956672", "sectionId": "1626032810125733888", "assessRoomId": "1626032965674401792" }; - if (tpId && sectionId && roomId) { + if (tpId && sectionId && roomId && readingCode) { setLoading(true); const riskResponse = await getSuspectedViolation(params);//获取风险数据 const projectResponse = await getProjectDataById(params.tpId);//获取项目数据 @@ -80,7 +81,6 @@ const SupplierRelation: React.FC<{}> = () => { if (riskResponse && riskResponse.success) { setSupplierTableData(riskResponse?.data?.riskSupplier != null ? riskResponse?.data?.riskSupplier?.map((item: any) => { item.riskFlag = String(item.riskFlag); item.relationFlag = String(item.relationFlag); return item }) : []); setWarningsData(riskResponse?.data); - updateRead(roomId, riskResponse?.data.readingCode); } if (projectResponse && projectResponse.success) { setProjectData(projectResponse?.data); @@ -89,6 +89,7 @@ const SupplierRelation: React.FC<{}> = () => { setSectionData(sectionResponse?.data); } setLoading(false); + updateRead({ assessRoomId: roomId, readingCode }); } } diff --git a/src/pages/SupplierRelation/service.ts b/src/pages/SupplierRelation/service.ts index 386fbd6..47ed55f 100644 --- a/src/pages/SupplierRelation/service.ts +++ b/src/pages/SupplierRelation/service.ts @@ -4,6 +4,9 @@ import request from '@/utils/request'; * @param params * @returns */ -export async function updateRead(roomId: any, readingCode: any) { - return request(`/api/biz-service-ebtp-resps/v1/risktendererwarning/updateReaded?assessRoomId=${roomId}&readingCode=${readingCode}`); +export async function updateRead(data: any) { + return request(`/api/biz-service-ebtp-resps/v1/risktendererwarning/updateReaded`, { + method: "POST", + data: { ...data } + }); } \ No newline at end of file