4.20
This commit is contained in:
@ -25,6 +25,7 @@ const SupplierRelation: React.FC<{}> = () => {
|
|||||||
const tpId = getURLInformation("tpId");
|
const tpId = getURLInformation("tpId");
|
||||||
const sectionId = getURLInformation("sectionId");
|
const sectionId = getURLInformation("sectionId");
|
||||||
const roomId = getURLInformation("roomId");
|
const roomId = getURLInformation("roomId");
|
||||||
|
const readingCode = getURLInformation("readingCode");
|
||||||
const readOnlyColumns: ProColumns<any>[] = [
|
const readOnlyColumns: ProColumns<any>[] = [
|
||||||
{
|
{
|
||||||
title: <Text strong>供应商A</Text>,
|
title: <Text strong>供应商A</Text>,
|
||||||
@ -72,7 +73,7 @@ const SupplierRelation: React.FC<{}> = () => {
|
|||||||
"assessRoomId": roomId,
|
"assessRoomId": roomId,
|
||||||
}
|
}
|
||||||
// let params = { "tpId": "1626032810108956672", "sectionId": "1626032810125733888", "assessRoomId": "1626032965674401792" };
|
// let params = { "tpId": "1626032810108956672", "sectionId": "1626032810125733888", "assessRoomId": "1626032965674401792" };
|
||||||
if (tpId && sectionId && roomId) {
|
if (tpId && sectionId && roomId && readingCode) {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const riskResponse = await getSuspectedViolation(params);//获取风险数据
|
const riskResponse = await getSuspectedViolation(params);//获取风险数据
|
||||||
const projectResponse = await getProjectDataById(params.tpId);//获取项目数据
|
const projectResponse = await getProjectDataById(params.tpId);//获取项目数据
|
||||||
@ -80,7 +81,6 @@ const SupplierRelation: React.FC<{}> = () => {
|
|||||||
if (riskResponse && riskResponse.success) {
|
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 }) : []);
|
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);
|
setWarningsData(riskResponse?.data);
|
||||||
updateRead(roomId, riskResponse?.data.readingCode);
|
|
||||||
}
|
}
|
||||||
if (projectResponse && projectResponse.success) {
|
if (projectResponse && projectResponse.success) {
|
||||||
setProjectData(projectResponse?.data);
|
setProjectData(projectResponse?.data);
|
||||||
@ -89,6 +89,7 @@ const SupplierRelation: React.FC<{}> = () => {
|
|||||||
setSectionData(sectionResponse?.data);
|
setSectionData(sectionResponse?.data);
|
||||||
}
|
}
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
updateRead({ assessRoomId: roomId, readingCode });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,9 @@ import request from '@/utils/request';
|
|||||||
* @param params
|
* @param params
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export async function updateRead(roomId: any, readingCode: any) {
|
export async function updateRead(data: any) {
|
||||||
return request(`/api/biz-service-ebtp-resps/v1/risktendererwarning/updateReaded?assessRoomId=${roomId}&readingCode=${readingCode}`);
|
return request(`/api/biz-service-ebtp-resps/v1/risktendererwarning/updateReaded`, {
|
||||||
|
method: "POST",
|
||||||
|
data: { ...data }
|
||||||
|
});
|
||||||
}
|
}
|
Reference in New Issue
Block a user