diff --git a/config/router_elecEvaluation.ts b/config/router_elecEvaluation.ts index bf8b76d..060bb68 100644 --- a/config/router_elecEvaluation.ts +++ b/config/router_elecEvaluation.ts @@ -73,6 +73,10 @@ export const elecBidEvaluation = [ {//评标场所及区域管理 path: '/ElecEvaluation/PlaceAreasManage', component: './ElecEvaluation/PlaceAreasManage', + }, + {//厂家平台管理 + path: '/ElecEvaluation/ManuPlatformManage', + component: './ElecEvaluation/ManuPlatformManage', }, ], }, diff --git a/public/bidOpening/countDown.html b/public/bidOpening/countDown.html index 7ca4073..dc8ca3c 100644 --- a/public/bidOpening/countDown.html +++ b/public/bidOpening/countDown.html @@ -324,7 +324,7 @@ "Authorization": token, "token": token }, - type: "PUT", + type: "POST", success: function (re) { //开标成功进入开标室 if (re.success) { diff --git a/src/components/ElecBidEvaluation/BidEvalAppointment.tsx b/src/components/ElecBidEvaluation/BidEvalAppointment.tsx index 338e3ff..3fc5e3f 100644 --- a/src/components/ElecBidEvaluation/BidEvalAppointment.tsx +++ b/src/components/ElecBidEvaluation/BidEvalAppointment.tsx @@ -13,6 +13,7 @@ interface BidEvalAppointmentProps { onSubmit: (value: any) => void; reload: () => void; values: any; + initValue: any;//预约时间初始值 type: string; //0-选择评标室 1-修改预约 2-重评预约评标室 } @@ -54,7 +55,7 @@ export const proviceEnum = { const modalHeight = window.innerHeight * 96 / 100; const BidEvalAppointment: React.FC = (props) => { - const { modalVisible, onCancel, onSubmit, reload, values, type } = props; + const { modalVisible, onCancel, onSubmit, reload, values, initValue, type } = props; const actionRef = useRef(); const [form] = Form.useForm(); //项目id @@ -190,6 +191,10 @@ const BidEvalAppointment: React.FC = (props) => { setDisabledMap({}); }, [values]) + useEffect(() => { + initValue && form.setFieldsValue({ ...initValue, reserveStartDate: initValue.startTime, reserveEndDate: initValue.endTime }); + }, [initValue, modalVisible]) + useEffect(() => { selectedRowKeys.length > 0 && getDisabledTime(selectedRowKeys); }, [selectedRowKeys]) @@ -301,7 +306,7 @@ const BidEvalAppointment: React.FC = (props) => { rules={[{ required: true, message: '请选择' }]} extra={预约时间范围 7:00 ~ 18:00} > - otherDisabledDateTime(current, disabledMap)} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} renderExtraFooter={() => 注:若时间被占用,则置灰不可选} /> + otherDisabledDateTime(current, disabledMap, "startTime")} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} renderExtraFooter={() => 注:若时间被占用,则置灰不可选} /> @@ -310,7 +315,7 @@ const BidEvalAppointment: React.FC = (props) => { name="reserveEndDate" rules={[{ required: true, message: '请选择' }]} > - otherDisabledDateTime(current, disabledMap)} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} renderExtraFooter={() => 注:若时间被占用,则置灰不可选} /> + otherDisabledDateTime(current, disabledMap, "endTime")} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} renderExtraFooter={() => 注:若时间被占用,则置灰不可选} /> diff --git a/src/components/ElecBidEvaluation/MeetingReservation.tsx b/src/components/ElecBidEvaluation/MeetingReservation.tsx index 2c9803b..4511b3a 100644 --- a/src/components/ElecBidEvaluation/MeetingReservation.tsx +++ b/src/components/ElecBidEvaluation/MeetingReservation.tsx @@ -37,13 +37,13 @@ export const disabledDateTime = () => ({ disabledHours: () => [...range(0, 7), ...range(19, 24)], }); //不可选小时(额外不可选) -export const otherDisabledDateTime = (current: any, disabledMap: any) => { +export const otherDisabledDateTime = (current: any, disabledMap: any, type: string) => { let otherHour: any[] = range(0, 24); if (current) { otherHour = []; if (Object.keys(disabledMap).length != 0) { const time = moment(current).format("yyyy-MM-DD"); - disabledMap[time] && (otherHour = [...disabledMap[time]]); + disabledMap[time] && (otherHour = [...disabledMap[time][type]]); } } return ({ diff --git a/src/components/GlobalHeader/services.ts b/src/components/GlobalHeader/services.ts index 3d5ccf4..05b743c 100644 --- a/src/components/GlobalHeader/services.ts +++ b/src/components/GlobalHeader/services.ts @@ -9,9 +9,9 @@ export async function getMenu(params: any) { } export async function fgetUserMsg(params: any) { - return request('/api/biz-service-ebtp-extend/v1/userinfo/get', { + return request('/api/core-service-ebtp-userinfo/v1/userinfo/get', { method: 'GET', - headers: {'Authorization': params}, + headers: { 'Authorization': params }, data: params, }); } diff --git a/src/components/Promenu/index.tsx b/src/components/Promenu/index.tsx index 199d7c1..df22467 100644 --- a/src/components/Promenu/index.tsx +++ b/src/components/Promenu/index.tsx @@ -196,24 +196,24 @@ const Promenu: React.FC<{}> = () => { setAnchorEl(null); }; const initChatUI = () => { //智慧客服 - if(MethodDict!='procurement_mode_6' && MethodDict!='procurement_mode_7' && window.location.pathname.indexOf('BidEvaluation')!=-1){ + if (MethodDict != 'procurement_mode_6' && MethodDict != 'procurement_mode_7' && window.location.pathname.indexOf('BidEvaluation') != -1) { message.warn('非谈判类项目【评标】阶段禁止沟通') - }else{ + } else { var tempForm = document.getElementById('tempForm_CustomerService') as HTMLFormElement - if(tempForm){ + if (tempForm) { var hideInput = document.getElementById('tempInput_CustomerService') as HTMLInputElement - if(hideInput){ - hideInput.value= window.location.pathname - }else{ + if (hideInput) { + hideInput.value = window.location.pathname + } else { hideInput = document.createElement("input") hideInput.id = 'tempInput_CustomerService' - hideInput.type="hidden" - hideInput.name= 'sceneUrl' - hideInput.value= window.location.pathname + hideInput.type = "hidden" + hideInput.name = 'sceneUrl' + hideInput.value = window.location.pathname tempForm.appendChild(hideInput) } tempForm.submit(); - }else{ + } else { message.warn('请先选择跟进的项目') } } @@ -236,11 +236,11 @@ const Promenu: React.FC<{}> = () => { history.push("/ProjectLayout/Archive/projectArchive") setButtonValue(stepButtonClick(data?.[data?.length - 1])) }}>项目归档 : null, - , ((randerRole == 'ebtp-agency-project-manager' || randerRole == 'ebtp-purchase' || randerRole == 'ebtp-supervision') && MethodDict != "procurement_mode_7") - ? : null, + ? : null, (randerRole == 'ebtp-supplier' && MethodDict != "procurement_mode_7") ? : null, diff --git a/src/pages/401.tsx b/src/pages/401.tsx index dd7dbb4..2666dbf 100644 --- a/src/pages/401.tsx +++ b/src/pages/401.tsx @@ -1,12 +1,14 @@ +import { logoutTokenApi } from '@/services/login'; import { getURLInformation, isNotEmpty } from '@/utils/CommonUtils'; import { getSessionRoleData } from '@/utils/session'; -import { Result, Typography } from 'antd'; +import { Button, Result, Typography } from 'antd'; import React, { useEffect, useState } from 'react'; import { history } from 'umi'; -const message = { +const messageMap = { 401: '您的用户信息有误,请联系管理员', 402: '您的用户角色信息缺失,请联系管理员', + 403: '您的用户角色信息异常,请重新登录', 90401: '您的登录已超时,请重新登录', 404: '系统错误,请联系管理员', }; @@ -16,6 +18,7 @@ const RequestTimeoutPage: React.FC<{}> = () => { const { Text } = Typography; const [time, setTime] = useState(10); const roleData = getSessionRoleData(); + const token = sessionStorage.getItem('Authorization'); useEffect(() => { let timeInteval: any @@ -44,11 +47,18 @@ const RequestTimeoutPage: React.FC<{}> = () => { }) } } + const redirectLogin = () => { + logoutTokenApi({ mall3_token: token }).then(res => { + history.replace({ + pathname: '/userformal/login', + }) + }) + } return ( {time}秒后进入默认角色} + title={messageMap[code]} + extra={isNotEmpty(roleData) && code == 402 ? {time}秒后进入默认角色 : code == 403 ? : null} /> ); }; diff --git a/src/pages/Archive/ProjectArchive/service.ts b/src/pages/Archive/ProjectArchive/service.ts index b9170ff..2774a48 100644 --- a/src/pages/Archive/ProjectArchive/service.ts +++ b/src/pages/Archive/ProjectArchive/service.ts @@ -50,8 +50,8 @@ export async function addSecondFile(param: any) { * @param param */ export async function updateSecondFile(param: any) { - return request('/api/biz-service-ebtp-archive/v1/archiveFile', { - method: 'PUT', + return request('/api/biz-service-ebtp-archive/v1/archiveFile/update', { + method: 'POST', data: param }); } @@ -61,8 +61,8 @@ export async function updateSecondFile(param: any) { * @param param */ export async function deleteSecondFile(param: any) { - return request('/api/biz-service-ebtp-archive/v1/archiveFile/' + param, { - method: 'DELETE', + return request('/api/biz-service-ebtp-archive/v1/archiveFile/delete/' + param, { + method: 'POST', }); } @@ -82,7 +82,7 @@ export async function getSecondArchiveDirectory(param: any) { */ export async function proArchive(param: any) { return request(`/api/biz-service-ebtp-archive/v1/archiveRounds/archive/` + param, { - method: 'PUT', + method: 'POST', }); } @@ -90,7 +90,7 @@ export async function proArchive(param: any) { * 异常归档-列表查询 * @param param */ - export async function getExceptionArchive(params: any) { +export async function getExceptionArchive(params: any) { return request(`/api/biz-service-ebtp-project/v1/projectSection/selectArchiveByProjectId/${params}`, { method: 'GET', }); @@ -100,7 +100,7 @@ export async function proArchive(param: any) { * 异常归档-添加到异常处理 * @param param */ - export async function addToArchiveList(params: any) { +export async function addToArchiveList(params: any) { return request(`/api/biz-service-ebtp-archive/v1/archiveRounds/initExceptionArchiveByRounds/${params}`, { method: 'GET', }); @@ -108,9 +108,9 @@ export async function proArchive(param: any) { //列表文件下载==》高海峰 export async function selectParam2(params?: any) { - return request('/api/core-service-ebtp-updownload/v1/hulk/push',{ - method:'POST', - data:{ + return request('/api/core-service-ebtp-updownload/v1/hulk/push', { + method: 'POST', + data: { ...params } }); diff --git a/src/pages/Auction/AuctionViewAuctions/service.ts b/src/pages/Auction/AuctionViewAuctions/service.ts index f4931f2..47aa76b 100644 --- a/src/pages/Auction/AuctionViewAuctions/service.ts +++ b/src/pages/Auction/AuctionViewAuctions/service.ts @@ -5,8 +5,8 @@ import request from '@/utils/request'; * 获取竞拍内容数据 * @param params */ -export async function getAuctionViewAuctions(tpid:any) { - return request('/api/biz-service-ebtp-auction/v1/auction/getAuctionViewAuctions/'+tpid,{ +export async function getAuctionViewAuctions(tpid: any) { + return request('/api/biz-service-ebtp-auction/v1/auction/getAuctionViewAuctions/' + tpid, { method: 'GET', }); } @@ -16,9 +16,9 @@ export async function getAuctionViewAuctions(tpid:any) { * 我要竞拍 * @param params */ -export async function putOrderBidPrice(tpId:any, price:number) { - return request('/api/biz-service-ebtp-auction/v1/order/bid/price/' + tpId+'/' + price,{ - method: 'PUT', +export async function putOrderBidPrice(tpId: any, price: number) { + return request('/api/biz-service-ebtp-auction/v1/order/bid/price/' + tpId + '/' + price, { + method: 'POST', }); } @@ -27,8 +27,8 @@ export async function putOrderBidPrice(tpId:any, price:number) { * 围观加一 * @param params */ -export async function updatetOnlookers(tpid:any) { - return request('/api/biz-service-ebtp-auction/v1/onlookers/updatetOnlookers/'+tpid,{ +export async function updatetOnlookers(tpid: any) { + return request('/api/biz-service-ebtp-auction/v1/onlookers/updatetOnlookers/' + tpid, { method: 'post', }); } @@ -38,8 +38,8 @@ export async function updatetOnlookers(tpid:any) { * 定时刷新数据 (时间 延时次数 价格) * @param params */ -export async function getMoneyTime(tpid:any) { - return request('/api/biz-service-ebtp-auction/v1/auction/getMoneyTime/'+tpid,{ +export async function getMoneyTime(tpid: any) { + return request('/api/biz-service-ebtp-auction/v1/auction/getMoneyTime/' + tpid, { method: 'get', }); } @@ -47,6 +47,6 @@ export async function getMoneyTime(tpid:any) { * 定时刷新 * @param tpId */ -export function getRedisBidData (tpId:any) { +export function getRedisBidData(tpId: any) { return request('/api/biz-service-ebtp-auction/v1/order/getRedisBidData/' + tpId); } diff --git a/src/pages/Bid/BiddingAnnouncement/service.ts b/src/pages/Bid/BiddingAnnouncement/service.ts index 832b6b6..ba3929d 100644 --- a/src/pages/Bid/BiddingAnnouncement/service.ts +++ b/src/pages/Bid/BiddingAnnouncement/service.ts @@ -21,11 +21,11 @@ export async function GetNoticeMsg(params?: any) { } /*创建公告*/ export async function creatNotice(type: any, params?: any) { - let method = "post"; + let url = "/api/biz-service-ebtp-bid/v1/anno"; if (type == "edit" || type == "change") - method = "put"; - return request('/api/biz-service-ebtp-bid/v1/anno', { - method: method, + url = "/api/biz-service-ebtp-bid/v1/anno/updateById"; + return request(url, { + method: "POST", data: { ...params }, @@ -33,8 +33,8 @@ export async function creatNotice(type: any, params?: any) { } /*删除公告*/ export async function removeNotice(params?: any) { - let method = "delete"; - return request('/api/biz-service-ebtp-bid/v1/anno/' + params, { method: method }) + let method = "POST"; + return request('/api/biz-service-ebtp-bid/v1/anno/delete/' + params, { method: method }) } /*发布公告 type=0 正常发布*/ export async function releaseNotice(params?: any) { @@ -92,19 +92,19 @@ export async function GetfileMsg(params?: any) { return request('/api/biz-service-ebtp-bid/v1/document/' + params) } export async function creatfile(type: any, params?: any) { - let method = "post"; + let url = "/api/biz-service-ebtp-bid/v1/document"; if (type == "edit") - method = "put"; - return request('/api/biz-service-ebtp-bid/v1/document', { - method: method, + url = "/api/biz-service-ebtp-bid/v1/document/update"; + return request(url, { + method: "POST", data: { ...params }, }) } export async function removefile(params?: any) { - let method = "delete"; - return request('/api/biz-service-ebtp-bid/v1/document/' + params, { method: method }) + let method = "POST"; + return request('/api/biz-service-ebtp-bid/v1/document/delete/' + params, { method: method }) } /*开标大厅选择*/ export async function getChooseRoom(params?: any) { @@ -133,14 +133,14 @@ export async function chooseSupplier(params: any) { } /*邀请函 删除供应商 后端付庆吉*/ export async function deleteSupplier(params?: any) { - return request('/api/biz-service-ebtp-bid/v1/resp/' + params, { - method: "delete", + return request('/api/biz-service-ebtp-bid/v1/resp/delete/' + params, { + method: "POST", }) } /*邀请函 供应商 更新联系人*/ export async function updateSupplierUser(id?: any, userId?: any, params?: any) { return request('/api/biz-service-ebtp-bid/v1/resp/' + id + "/" + userId, { - method: "put", + method: "POST", data: { ...params } diff --git a/src/pages/Bid/NoticeFileStruct/service.ts b/src/pages/Bid/NoticeFileStruct/service.ts index a2c7f2e..5fb0a15 100644 --- a/src/pages/Bid/NoticeFileStruct/service.ts +++ b/src/pages/Bid/NoticeFileStruct/service.ts @@ -6,9 +6,9 @@ export async function getProInfo(proId?: any) { }; //获取项目数据 export async function getInfo(params?: any) { - return request(`/api/biz-service-ebtp-bid/v1/annotemplate/anno/list`,{ - method:'GET', - params:params, + return request(`/api/biz-service-ebtp-bid/v1/annotemplate/anno/list`, { + method: 'GET', + params: params, }); }; //第一个节点保存时新增一条记录 @@ -21,7 +21,7 @@ export async function addOneInfo(params?: any) { //其余节点保存 修改 export async function updateOneInfo(params?: any) { return request(`/api/biz-service-ebtp-bid/v1/annotemplate/anno/update`, { - method: 'PUT', + method: 'POST', data: params, }); }; @@ -40,7 +40,7 @@ export async function getTemInfo(id?: any) { //根据id删 export async function delAll(id?: any) { return request(`/api/biz-service-ebtp-bid/v1/annotemplate/anno/delete/${id}`, { - method: 'DELETE', + method: 'POST', }); }; //=======================================================================================================模板 @@ -50,22 +50,22 @@ export async function getTemList() { return request(`/api/biz-service-ebtp-bid/v1/annotemplate/statictemplate/list`); }; //修改模板列表 -export async function upTem(data:any) { - return request(`/api/biz-service-ebtp-bid/v1/annotemplate/statictemplate`,{ - method:'PUT', - data:data, +export async function upTem(data: any) { + return request(`/api/biz-service-ebtp-bid/v1/annotemplate/statictemplate/update`, { + method: 'POST', + data: data, }); }; //修改模板列表 -export async function add(data:any) { - return request(`/api/biz-service-ebtp-bid/v1/annotemplate/statictemplate`,{ - method:'POST', - data:data, +export async function add(data: any) { + return request(`/api/biz-service-ebtp-bid/v1/annotemplate/statictemplate`, { + method: 'POST', + data: data, }); }; //删除模板列表 -export async function del(id:any) { - return request(`/api/biz-service-ebtp-bid/v1/annotemplate/statictemplate/${id}`,{ - method:'DELETE', +export async function del(id: any) { + return request(`/api/biz-service-ebtp-bid/v1/annotemplate/statictemplate/delete/${id}`, { + method: 'POST', }); }; \ No newline at end of file diff --git a/src/pages/Bid/ResponseFormat/service.ts b/src/pages/Bid/ResponseFormat/service.ts index 99e9243..4038f78 100644 --- a/src/pages/Bid/ResponseFormat/service.ts +++ b/src/pages/Bid/ResponseFormat/service.ts @@ -5,7 +5,7 @@ import { getUserToken } from '@/utils/session'; * 应答格式列表查询 * @param params */ -export async function getResponseList(params: any,page: any) { +export async function getResponseList(params: any, page: any) { return request('/api/biz-service-ebtp-resps/v1/tdoc/page', { method: 'POST', data: { @@ -63,8 +63,8 @@ export async function editSection(params: any) { * @param params */ export async function deleteProcess(params: any) { - return request(`/api/biz-service-ebtp-resps/v1/tdoc/${params.tdocId}`, { - method: 'DELETE', + return request(`/api/biz-service-ebtp-resps/v1/tdoc/delete/${params.tdocId}`, { + method: 'POST', }); } @@ -107,8 +107,8 @@ export async function toInsertOpenList(params: any) { * @param params */ export async function toUpdateOpenList(params: any) { - return request('/api/biz-service-ebtp-resps/v1/tdoccatalogcontent', { - method: 'PUT', + return request('/api/biz-service-ebtp-resps/v1/tdoccatalogcontent/update', { + method: 'POST', data: params, }); } @@ -118,8 +118,8 @@ export async function toUpdateOpenList(params: any) { * @param params */ export async function deleteItemizedQuotation(params: any) { - return request(`/api/biz-service-ebtp-resps/v1/tdoccatalogcontent/${params}`, { - method: 'DELETE', + return request(`/api/biz-service-ebtp-resps/v1/tdoccatalogcontent/delete/${params}`, { + method: 'POST', }); } @@ -150,8 +150,8 @@ export async function addMenuList(params: any) { * @param params */ export async function deleteMenuList(params: any) { - return request(`/api/biz-service-ebtp-resps/v1/tdoccatalog/${params}`, { - method: 'DELETE', + return request(`/api/biz-service-ebtp-resps/v1/tdoccatalog/delete/${params}`, { + method: 'POST', }); } @@ -160,8 +160,8 @@ export async function deleteMenuList(params: any) { * @param params */ export async function updateMenuList(params: any) { - return request('/api/biz-service-ebtp-resps/v1/tdoccatalog', { - method: 'PUT', + return request('/api/biz-service-ebtp-resps/v1/tdoccatalog/update', { + method: 'POST', data: params, }); } @@ -227,7 +227,7 @@ export async function getReferenceInfo(params: any) { * @param params */ export async function getTotalReference() { - return request('/api/api/core-service-supplierbase/outer/v1.0/coreSupplier/getLeftMenu',{method: "POST"}) + return request('/api/api/core-service-supplierbase/outer/v1.0/coreSupplier/getLeftMenu', { method: "POST" }) } /** @@ -235,7 +235,7 @@ export async function getTotalReference() { * @param params */ export async function getSampleData(params: any) { - return request('/api/api/core-service-supplierbase/outer/v1.0/coreSupplier/findSupplierDemo',{method: "POST",data: params}) + return request('/api/api/core-service-supplierbase/outer/v1.0/coreSupplier/findSupplierDemo', { method: "POST", data: params }) } /** @@ -253,7 +253,7 @@ export async function getTemplateData(params: any) { * 存成模板 * @param params */ - export async function saveTemplate(params: any) { +export async function saveTemplate(params: any) { return request('/api/biz-service-ebtp-resps/v1/tdoctemplate/insertTdocCatalogToTemplate', { method: 'POST', data: params @@ -264,7 +264,7 @@ export async function getTemplateData(params: any) { * 确认选择模板(引用模板) * @param params */ - export async function comfirmSeleTemplate(params: any) { +export async function comfirmSeleTemplate(params: any) { return request('/api/biz-service-ebtp-resps/v1/tdoccatalog/selectTemplateToCatalog', { method: 'POST', data: params @@ -275,9 +275,9 @@ export async function getTemplateData(params: any) { * 删除模板 * @param params */ - export async function deleteTemplate(params: any) { - return request(`/api/biz-service-ebtp-resps/v1/tdoctemplate/${params}`, { - method: 'DELETE', +export async function deleteTemplate(params: any) { + return request(`/api/biz-service-ebtp-resps/v1/tdoctemplate/delete/${params}`, { + method: 'POST', }); } @@ -286,7 +286,7 @@ export async function getTemplateData(params: any) { * 查询模板数据(分项报价表模板) * @param params */ - export async function getItemizedTemplateData(params: any) { +export async function getItemizedTemplateData(params: any) { return request('/api/biz-service-ebtp-resps/v1/tdoctemplate/contentpage', { method: 'POST', data: params @@ -297,7 +297,7 @@ export async function getTemplateData(params: any) { * 存成模板(分项报价表模板) * @param params */ - export async function saveItemizedTemplate(params: any) { +export async function saveItemizedTemplate(params: any) { return request('/api/biz-service-ebtp-resps/v1/tdoctemplate/insertTdocContentTableToTemplate', { method: 'POST', data: params @@ -308,7 +308,7 @@ export async function getTemplateData(params: any) { * 确认选择模板(分项报价表模板) * @param params */ - export async function comfirmItemizedSeleTemplate(params: any) { +export async function comfirmItemizedSeleTemplate(params: any) { return request('/api/biz-service-ebtp-resps/v1/tdoccontenttable/saveTemplateToContentTable', { method: 'POST', data: params @@ -319,9 +319,9 @@ export async function getTemplateData(params: any) { * 删除模板(分项报价表模板) * @param params */ - export async function deleteItemizedTemplate(params: any) { +export async function deleteItemizedTemplate(params: any) { return request(`/api/biz-service-ebtp-resps/v1/tdoctemplate/deleteContentTable/${params}`, { - method: 'DELETE', + method: 'POST', }); } diff --git a/src/pages/Bid/ReviewConfig/Config/components/service.ts b/src/pages/Bid/ReviewConfig/Config/components/service.ts index b61e5f2..9f04a38 100644 --- a/src/pages/Bid/ReviewConfig/Config/components/service.ts +++ b/src/pages/Bid/ReviewConfig/Config/components/service.ts @@ -150,7 +150,7 @@ export const saveT = async (fields: any) => { // 删除评审项接口 export async function delDetail(params?: any) { return request(`/api/biz-service-ebtp-rsms/v1/review/config/detail/${params.id}`, { - method: 'DELETE' + method: 'POST' }); }; @@ -174,8 +174,8 @@ export const delDet = async (fields: any) => { }; //删除类别接口 export async function delCategory(id?: any) { - return request(`/api/biz-service-ebtp-rsms/v1/review/config/category/${id}`, { - method: 'DELETE' + return request(`/api/biz-service-ebtp-rsms/v1/review/config/category/del/${id}`, { + method: 'POST' }); }; //删除类别方法 @@ -203,7 +203,7 @@ export async function delStandard(params?: any) { return request(`/api/biz-service-ebtp-rsms/v1/review/config/standard`, { method: 'POST', - data:params, + data: params, }); }; //删除详细评分标准方法 diff --git a/src/pages/Bid/ReviewConfig/List/services.ts b/src/pages/Bid/ReviewConfig/List/services.ts index 3b83a66..1191a7c 100644 --- a/src/pages/Bid/ReviewConfig/List/services.ts +++ b/src/pages/Bid/ReviewConfig/List/services.ts @@ -36,9 +36,9 @@ export async function useConfig(params?: any) { // }; //查询标段 export async function getSections(params?: any) { - return request(`/api/biz-service-ebtp-rsms/v1/review/config/section/findAllSection`,{ - method:'POST', - data:params, + return request(`/api/biz-service-ebtp-rsms/v1/review/config/section/findAllSection`, { + method: 'POST', + data: params, }); }; //查询已有配置标段 @@ -50,7 +50,7 @@ export async function getSections(params?: any) { // }; //删除 export async function delOne(params?: any) { - return request(`/api/biz-service-ebtp-rsms/v1/review/config/section/${params.id}`, { - method: 'DELETE' + return request(`/api/biz-service-ebtp-rsms/v1/review/config/section/del/${params.id}`, { + method: 'POST' }); }; diff --git a/src/pages/BidEvaluation/components/service.ts b/src/pages/BidEvaluation/components/service.ts index c892955..23564fc 100644 --- a/src/pages/BidEvaluation/components/service.ts +++ b/src/pages/BidEvaluation/components/service.ts @@ -27,7 +27,7 @@ export async function getJuryData(param: any) { export async function saveDevidedData(param: any) { return request(`/api/biz-service-ebtp-rsms/v1/jury/divide/save`, { method: 'POST', - data:param + data: param }); } @@ -37,7 +37,7 @@ export async function saveDevidedData(param: any) { */ export async function saveLeaderId(param: any) { return request(`/api/biz-service-ebtp-rsms/v1/jury/member/chooseLeader/?id=${param}`, { - method: 'PUT', + method: 'POST', }); } @@ -47,8 +47,8 @@ export async function saveLeaderId(param: any) { */ export async function createReviewRoom(param: any) { return request(`/api/biz-service-ebtp-process/v1/assessroom/zmmulti/create`, { - method: 'POST', - data: param + method: 'POST', + data: param }); } @@ -58,7 +58,7 @@ export async function createReviewRoom(param: any) { */ export async function getPackageList(param: any) { return request(`/api/biz-service-ebtp-process/v1/assessroom/zmmulti/query/initroom/${param}`, { - method: 'GET', + method: 'GET', }); } @@ -68,7 +68,7 @@ export async function getPackageList(param: any) { */ export async function getAnnouncementById(param: any) { return request(`/api/biz-service-ebtp-bid/v1/anno/getBySectionId/${param}`, { - method: 'POST', + method: 'POST', }); } @@ -76,8 +76,8 @@ export async function getAnnouncementById(param: any) { * 根据项目id查流程 * @param params */ - export async function getDefId(proId?: any) { - return request(`/api/biz-service-ebtp-process/v1/projectconfig/querydefid/${proId}`,{ +export async function getDefId(proId?: any) { + return request(`/api/biz-service-ebtp-process/v1/projectconfig/querydefid/${proId}`, { method: 'GET', }); } @@ -86,10 +86,10 @@ export async function getAnnouncementById(param: any) { * 关闭评审室保存原因并关闭评审室(多轮招募) * @param param */ - export async function saveClosingReason(param: any) { +export async function saveClosingReason(param: any) { return request(`/api/biz-service-ebtp-process/v1/assessroom/zmmulti/finishRoom`, { - method: 'POST', - data: param, + method: 'POST', + data: param, }); } diff --git a/src/pages/BidEvaluation/manager.js b/src/pages/BidEvaluation/manager.js index 7ca015d..214650f 100644 --- a/src/pages/BidEvaluation/manager.js +++ b/src/pages/BidEvaluation/manager.js @@ -128,7 +128,8 @@ class manager extends PureComponent { //评委会设置 onJurySet = (record) => { this.savePageAndParams(); - this.props.dispatch(routerRedux.push(`/ProjectLayout/JudgingPanel?roomId=${record.id}&secId=${record.sectionId}`)) + history.push({ pathname: '/ProjectLayout/JudgingPanel', state: { roomId: record.id, secId: record.sectionId, openTime: record.openTime } }); + // this.props.dispatch(routerRedux.push(`/ProjectLayout/JudgingPanel?roomId=${record.id}&secId=${record.sectionId}&openTime=${record.openTime}`)); } //创建评审室 onCreateClick = async () => { diff --git a/src/pages/Calibration/BidAssessmentResults/service.ts b/src/pages/Calibration/BidAssessmentResults/service.ts index 65615f5..bc7065e 100644 --- a/src/pages/Calibration/BidAssessmentResults/service.ts +++ b/src/pages/Calibration/BidAssessmentResults/service.ts @@ -1,33 +1,33 @@ import request from '@/utils/request'; // import {demo} from './data.d'; -export async function getBidAssessmentResultsList(params?:any) { - return request('/api/biz-service-ebtp-calibration/v1/bizbidreviewresult/getSectionAsseslist',{ - method:'post' , - data:{ +export async function getBidAssessmentResultsList(params?: any) { + return request('/api/biz-service-ebtp-calibration/v1/bizbidreviewresult/getSectionAsseslist', { + method: 'post', + data: { ...params } }) } -export async function pushBidAssessmentResult(params1?:any,params2?:any,assesRoomId?:any) { - return request('/api/biz-service-ebtp-calibration/v1/bizbidreviewresult/noticeEbpByAssessId?projectId='+params1+"§ionId="+params2 +"&assessRoomId="+assesRoomId,{ - method:'get' +export async function pushBidAssessmentResult(params1?: any, params2?: any, assesRoomId?: any) { + return request('/api/biz-service-ebtp-calibration/v1/bizbidreviewresult/noticeEbpByAssessId?projectId=' + params1 + "§ionId=" + params2 + "&assessRoomId=" + assesRoomId, { + method: 'get' }) } -export async function getBidAssessmentResultList(params?:any) { - return request('/api/biz-service-ebtp-calibration/v1/bizinterfacelog/getListByAssessId',{ - method:'post' , - data:{ +export async function getBidAssessmentResultList(params?: any) { + return request('/api/biz-service-ebtp-calibration/v1/bizinterfacelog/getListByAssessId', { + method: 'post', + data: { ...params } }) } //单一简化保存结果 -export async function saveResult(params?:any) { - return request('/api/biz-service-ebtp-rsms/v1/reviewresult/save',{ - method:'put' , - data:{ +export async function saveResult(params?: any) { + return request('/api/biz-service-ebtp-rsms/v1/reviewresult/save/simple', { + method: 'POST', + data: { ...params } }) diff --git a/src/pages/Calibration/BidPublicityResult/service.ts b/src/pages/Calibration/BidPublicityResult/service.ts index b64aafd..8b6b404 100644 --- a/src/pages/Calibration/BidPublicityResult/service.ts +++ b/src/pages/Calibration/BidPublicityResult/service.ts @@ -21,11 +21,11 @@ export async function GetNoticeMsg(params?: any) { } /*创建公告*/ export async function creatNotice(type: any, params?: any) { - let method = "post"; + let url = "/api/biz-service-ebtp-bid/v1/anno"; if (type == "edit") - method = "put"; - return request('/api/biz-service-ebtp-bid/v1/anno', { - method: method, + url = "/api/biz-service-ebtp-bid/v1/anno/updateById"; + return request(url, { + method: "POST", data: { ...params }, @@ -33,8 +33,8 @@ export async function creatNotice(type: any, params?: any) { } /*删除公告*/ export async function removeNotice(params?: any) { - let method = "delete"; - return request('/api/biz-service-ebtp-bid/v1/anno/' + params, { method: method }) + let method = "POST"; + return request('/api/biz-service-ebtp-bid/v1/anno/delete/' + params, { method: method }) } /*发布公告 type=0 正常发布*/ export async function releaseNotice(params?: any) { diff --git a/src/pages/CommonInfo/Supplier/CommonContact/service.ts b/src/pages/CommonInfo/Supplier/CommonContact/service.ts index c9651fb..ded80c7 100644 --- a/src/pages/CommonInfo/Supplier/CommonContact/service.ts +++ b/src/pages/CommonInfo/Supplier/CommonContact/service.ts @@ -17,7 +17,7 @@ export async function addContact(params: any) { */ export async function updateContact(params: any) { return request('/api/biz-service-ebtp-tender/v1/bizsuppliercontact/update', { - method: 'PUT', + method: 'POST', data: params, }); } @@ -27,8 +27,8 @@ export async function updateContact(params: any) { * @param params */ export async function deleteContact(params: any) { - return request(`/api/biz-service-ebtp-tender/v1/bizsuppliercontact/${params}`, { - method: 'DELETE', + return request(`/api/biz-service-ebtp-tender/v1/bizsuppliercontact/delete/${params}`, { + method: 'POST', }); } @@ -41,10 +41,10 @@ export async function getContactList(params: any) { `/api/biz-service-ebtp-tender/v1/bizsuppliercontact/getSupplierContactByParam`, { method: 'POST', - data:{ - basePageRequest:{ - pageNo:params.current, - pageSize:params.pageSize + data: { + basePageRequest: { + pageNo: params.current, + pageSize: params.pageSize } } }, diff --git a/src/pages/CommonInfo/Supplier/InvoiceInformation/service.ts b/src/pages/CommonInfo/Supplier/InvoiceInformation/service.ts index a1d90d7..03a5816 100644 --- a/src/pages/CommonInfo/Supplier/InvoiceInformation/service.ts +++ b/src/pages/CommonInfo/Supplier/InvoiceInformation/service.ts @@ -9,9 +9,9 @@ export async function getInvoiceList(params: any) { `/api/biz-service-ebtp-expenses/v1/bizbidinvoicecommon/list`, { method: 'GET', - params:{ - pageNo:params.current, - pageSize:params.pageSize + params: { + pageNo: params.current, + pageSize: params.pageSize } }, ); @@ -22,8 +22,8 @@ export async function getInvoiceList(params: any) { * @param params */ export async function addAndUpdateInvoice(params: any) { - return request('/api/biz-service-ebtp-expenses/v1/bizbidinvoicecommon', { - method: 'PUT', + return request('/api/biz-service-ebtp-expenses/v1/bizbidinvoicecommon/update', { + method: 'POST', data: params, }); } diff --git a/src/pages/CommonInfo/Supplier/MailingAddress/service.ts b/src/pages/CommonInfo/Supplier/MailingAddress/service.ts index 213cbff..12ad099 100644 --- a/src/pages/CommonInfo/Supplier/MailingAddress/service.ts +++ b/src/pages/CommonInfo/Supplier/MailingAddress/service.ts @@ -9,9 +9,9 @@ export async function getAddressList(params: any) { `/api/biz-service-ebtp-expenses/v1/bizbidinvoiceaddress/list`, { method: 'GET', - params:{ - pageNo:params.current, - pageSize:params.pageSize + params: { + pageNo: params.current, + pageSize: params.pageSize } }, ); @@ -22,8 +22,8 @@ export async function getAddressList(params: any) { * @param params */ export async function addAndUpdateAddress(params: any) { - return request('/api/biz-service-ebtp-expenses/v1/bizbidinvoiceaddress', { - method: 'PUT', + return request('/api/biz-service-ebtp-expenses/v1/bizbidinvoiceaddress/update', { + method: 'POST', data: params, }); } diff --git a/src/pages/ElecEvaluation/DeviceManage/DeviceForm.tsx b/src/pages/ElecEvaluation/DeviceManage/DeviceForm.tsx index f037276..986735f 100644 --- a/src/pages/ElecEvaluation/DeviceManage/DeviceForm.tsx +++ b/src/pages/ElecEvaluation/DeviceManage/DeviceForm.tsx @@ -1,6 +1,10 @@ -import { Form, Input, Modal, Select, Spin } from "antd" -import React, { useEffect, useState } from "react" -import { getDeviceById } from "./service"; +import { ForkOutlined } from "@ant-design/icons"; +import { Button, Form, Input, message, Modal, Select, Spin, Row, Col } from "antd" +import Password from "antd/lib/input/Password"; +import { fromPairs, values } from "lodash"; +import React, { useEffect, useRef, useState } from "react" +import SelectExternDeviceModal from "./SelectExternDeviceModal"; +import { getDeviceById, saveDevice } from "./service"; interface DeviceFormProps { @@ -11,143 +15,307 @@ interface DeviceFormProps { type: string; tpId: string; deviceId: string; + deviceRel: DeviceRel; + reload: () => void; +} +interface DeviceRel { + placeId: string, + placeName: string, + areaId: string, + areaName: string, + platformId: string, + platformName: string, } -const deviceTypeEnum = { - 'resource_door': { text: '门禁点' }, - 'resource_camera': { text: '监控点' }, - 'resource_nvr': { text: 'nvr' }, - 'resource_encodeDevice': { text: '编码设备' }, - 'resource_oneMachine': { text: '门禁一体机' }, -} + +const deviceTypeOptions = [ + { label: '门禁点', value: 'resource_door'}, + { label: '监控点', value: 'resource_camera' }, + { label: 'nvr', value: 'resource_nvr' }, + { label: '编码设备', value: 'resource_encodeDevice' }, + { label: '人脸一体机', value: 'resource_oneMachine_face' }, + { label: '人证一体机', value: 'resource_oneMachine_card' }, +]; + +const deviceVender = [ + { label: '海康平台', value: 'hik'}, + { label: '大华平台', value: 'icc' }, + { label: '山分平台', value: 'sd_access' }, +]; + +const statusOptions = [ + { label: '在用', value: 1}, + { label: '禁用', value: 0 }, +]; + const layout = { - labelCol: { span: 7 }, - wrapperCol: { span: 10 }, + labelCol: { span: 8 }, + wrapperCol: { span: 12 }, }; const DeviceForm: React.FC = (props) => { - const { titleName, modalVisible, onCancel, type, tpId, deviceId } = props; + const { titleName, modalVisible, onCancel, type, tpId, deviceId, deviceRel, reload } = props; const [spinning, setSping] = useState();//加载遮罩 const [editInformation, setEditInformation] = useState(false);//是否可编 const [form] = Form.useForm(); //窗口状态 0-新建 1-编辑 2-查看 const [modalStatus, setModalStatus] = useState(status); + // + const [deviceList, setDeviceList] = useState([]); + const {Option} = Select; + const [selectDeviceStatus, setSelectDeviceStatus] = useState(false); + + const deviceRelData = useRef(); useEffect(() => { + //清除form中数据 + form.resetFields(); Int(); - form.resetFields();//清除form中数据 }, [type, deviceId]); const Int = () => { - setSping(true); if (type == "new") {//==========================================================新建 - setSping(false); + form.setFieldsValue({ + "devicePlatform" : deviceRel.platformId, + "platformName" : deviceRel.platformName, + "placeId" : deviceRel.placeId, + "placeName" : deviceRel.placeName, + "areaId" : deviceRel.areaId, + "areaName" : deviceRel.areaName, + }) + deviceRelData.current = deviceRel; setEditInformation(false);//可编辑 - } else if (type == "edit") {//=========================================================修改 - console.log(deviceId); getDeviceById(deviceId).then(res => { - if (res.code == 200) { - const data = res.data; - - form.setFieldsValue({ - "id": data.id, - "deviceName": data.deviceName, - "deviceManagementIp": data.deviceManagementIp, - "deviceCode": data.deviceCode, - "devicePlatform": data.devicePlatform, - "placeId": data.placeId, - "areaId": data.areaId, - }); - setSping(false); - setEditInformation(false);//可编辑 - - } - }); - - + setFilesData(res.data); + deviceRelData.current = { + placeId: res.data.placeId, + placeName: res.data.placeName, + areaId: res.data.areaId, + areaName: res.data.areaName, + platformId: res.data.platform.id, + platformName: res.data.platform.platformName, + }; + setSping(false); + setEditInformation(false);//可编辑 + }); } else if (type == "read") {//=========================================================查看 getDeviceById(deviceId).then(res => { if (res.code == 200) { - const data = res.data; - - form.setFieldsValue({ - "id": data.id, - "deviceName": data.deviceName, - "deviceManagementIp": data.deviceManagementIp, - "deviceCode": data.deviceCode, - "devicePlatform": data.devicePlatform, - "placeId": data.placeId, - "areaId": data.areaId, - }) - + setFilesData(res.data); + deviceRelData.current = { + placeId: res.data.placeId, + placeName: res.data.placeName, + areaId: res.data.areaId, + areaName: res.data.areaName, + platformId: res.data.platform.id, + platformName: res.data.platform.platformName, + }; setSping(false); setEditInformation(true) - } }); } } + const setFilesData = (data:any) => { + form.setFieldsValue({ + "id": data.id, + "devicePlatform" : data.platform.id, + "platformName" : data.platform.platformName, + "placeId" : data.placeId, + "placeName" : data.placeName, + "areaId" : data.areaId, + "areaName" : data.areaName, + "deviceName": data.deviceName, + "deviceCode": data.deviceCode, + "deviceType" : data.deviceType, + "deviceVender": data.deviceVender, + "deviceAbility": data.deviceAbility, + "deviceProtocol": data.deviceProtocol, + "deviceManagementIp": data.deviceManagementIp, + "deviceManagementPort": data.deviceManagementPort, + // "deviceManagementLogin": data.deviceManagementLogin, + // "deviceManagementPassword": data.deviceManagementPassword, + // "deviceMac": data.deviceMac, + // "deviceSn": data.deviceSn, + // "deviceModel": data.deviceModel, + "status": data.status + }); + } + const handleDeviceChange = (value:any) => { + for (const item of deviceList) { + if(item.deviceCode === value){ + form.setFieldsValue({ + deviceVender: item['deviceVender'], + deviceType: item['deviceType'], + deviceCode: item['deviceCode'], + deviceAbility: item['deviceAbility'] + }) + break; + } + } + } + + /** + * 提交 + * @param values + */ + const onFinish = async (values: any) => { + setSping(true); + await saveDevice({ ...values }).then((res) => { + if (res?.success) { + message.success('保存成功'); + onCancel(); + form.resetFields(); + reload(); + } + }) + .finally(()=>{ + setSping(false); + }); + } + + const selectDevice = () => { + setSelectDeviceStatus(true); + } + + const SelectDeviceData = (value:any) => { + form.setFieldsValue({ + deviceAbility: value.deviceAbility, + deviceCode: value.deviceCode, + deviceName: value.deviceName, + devicePlatform: value.devicePlatform, + deviceProtocol: value.deviceProtocol, + deviceType: value.deviceType, + deviceVender: value.deviceVender + }) + } // @ts-ignore return ( + <> + 设备信息 + } visible={modalVisible} onCancel={() => onCancel()} + onOk={() => form.submit()} className="返回" width={"40%"} /*style={{top: "2%", height: "96%", overflowY: "auto"}} bodyStyle={{paddingTop: "16px"}}*/ centered - >
- - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + {/* + + */} + + + + + + + + + + + + + + + + + + + {/* + + + + + + + + + + + + + + */} + + +
- + setSelectDeviceStatus(false)} onSubmit = {(value: any) => SelectDeviceData(value)} values ={deviceRelData?.current}> + ) } export default DeviceForm diff --git a/src/pages/ElecEvaluation/DeviceManage/SelectExternDeviceModal.tsx b/src/pages/ElecEvaluation/DeviceManage/SelectExternDeviceModal.tsx new file mode 100644 index 0000000..0e2f88b --- /dev/null +++ b/src/pages/ElecEvaluation/DeviceManage/SelectExternDeviceModal.tsx @@ -0,0 +1,134 @@ +import React, { useEffect, useRef, useState } from 'react'; +import { Button, Form, Input, message, Modal, Spin } from 'antd'; +import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; +import { getExternDevicesAboveArea } from './service'; + +interface SelectDeviceProps { + modalVisible: boolean; + onCancel: () => void; + onSubmit: (value: any) => void; + values: any; +} + +const SelectDevice: React.FC = (props) => { + const { modalVisible, onCancel, onSubmit, values } = props; + const actionRef = useRef(); + //当前选择行areaId + const [selectedRowKeys, setSelectedRowKeys] = useState([]); + //当前选择行数据 + const selectedRecord = useRef(); + //loading + const [loading, setLoading] = useState(false); + + const columns: ProColumns[] = [ + { + valueType: 'index', + width: 48, + }, + { + title: '设备编码', + dataIndex: 'deviceCode', + ellipsis: true, + hideInSearch: true, + }, + { + title: '设备名称', + dataIndex: 'deviceName', + ellipsis: true, + hideInSearch: true, + }, + ]; + + const onOk = () => { + if (selectedRowKeys.length == 0) { + message.info("请选择设备"); + return; + } + onSubmit(selectedRecord?.current); + onCancel(); + } + + useEffect(() => { + setSelectedRowKeys([]); + selectedRecord.current = null; + }, [values]) + + const queryDeviceList = async () => { + setLoading(true); + return await getExternDevicesAboveArea({platformId: values?.platformId, areaId: values?.areaId}).then(res => { + if (res?.code == 200) { + return { + data: res?.data, + success: res?.success + } + } else { + return { + data: [], + success: false, + } + } + }).finally(()=>{ + setLoading(false); + }) + } + + return ( + onCancel()} + onOk={() => onOk()} + okText={"确认"} + okButtonProps={{ loading: loading }} + width={"40%"} + bodyStyle={{ overflowY: 'auto', }} + className="confirm table-no-alert" + centered + footer = {[ + , + , + , + ]} + > + + + columns={columns} + actionRef={actionRef} + bordered={false} + request={async (params) => { + return queryDeviceList(); + }} + rowKey="deviceCode" + search={false} + options={false} + pagination={false} + rowSelection={{ + type: "radio", + selectedRowKeys, + onChange: (selectedRowKeys, selectedRows) => { + setSelectedRowKeys(selectedRowKeys); + selectedRecord.current = selectedRows[0]; + }, + }} + dateFormatter="string" + toolBarRender={false} + /> + + + ); +}; + +export default SelectDevice; diff --git a/src/pages/ElecEvaluation/DeviceManage/index.tsx b/src/pages/ElecEvaluation/DeviceManage/index.tsx index 06115b5..2f2fc67 100644 --- a/src/pages/ElecEvaluation/DeviceManage/index.tsx +++ b/src/pages/ElecEvaluation/DeviceManage/index.tsx @@ -1,7 +1,7 @@ import React, { useState, useRef, useEffect } from 'react'; -import { Button, Spin, Tabs, Tree} from 'antd'; +import { Button, message, Popconfirm, Spin, Tabs, Tree} from 'antd'; import ProTable, { ActionType } from '@ant-design/pro-table'; -import { deviceList, getplaceareaList, roomList } from './service'; +import { deviceList, getplaceareaList, deleteDevice } from './service'; import '@/assets/ld_style.less'; import { getURLInformation, isNotEmpty } from '@/utils/CommonUtils'; import ProCard from "@ant-design/pro-card"; @@ -38,15 +38,23 @@ const DeviceManage: React.FC<{}> = () => { if (res.code == 200) { let data: any = []; if (res.data != undefined) { - res.data.map((item: any, index: any) => { - const title1 = item.placeName; - const key1 = item.id; + res.data.map((item1: any, index: any) => { + const title1 = item1.placeName; + const key1 = item1.id; let children1: any = []; - if (item.roomList != undefined) { - const children = item.roomList.map((item: any, index: any) => { + if (item1.roomList != undefined) { + const children = item1.roomList.map((item: any, index: any) => { const title2 = item.areaName; const key2 = item.id; - return { title: title2, key: key2} + const obj = { + placeId:item1.platformList[0].placeId, + placeName: item1.placeName, + areaId: item.id, + areaName: item.areaName, + platformId: item1.platformList[0].platformId, + platformName: item1.platformList[0].platformName, + }; + return { title: title2, key: key2, obj: obj} }); children1 = children; } @@ -61,10 +69,13 @@ const DeviceManage: React.FC<{}> = () => { const toAdd = async (props?: any) => { // spinSet(true); - setUpdateChange('新增设备'); - setType("new"); - setUpdateVisible(true); - + if(currentNodeRef?.current){ + setUpdateChange('新增设备'); + setType("new"); + setUpdateVisible(true); + }else{ + message.error('请在评标区域下新增设备'); + } } const toEdit = (dId: String) => { setUpdateChange('修改设备'); @@ -80,6 +91,24 @@ const DeviceManage: React.FC<{}> = () => { setType("read"); setUpdateVisible(true); } + + const toDelete = async (id: string) => { + const hide = message.loading('正在删除'); + try { + const success = await deleteDevice(id).then((res) => { + return res.success + }); + hide(); + if (success) { + message.success('删除成功'); + } + } catch (error) { + hide(); + message.error('删除失败请重试!'); + checkRelationRef.current?.reload(); + } + } + /** * 设备管理 * @param record @@ -89,10 +118,13 @@ const DeviceManage: React.FC<{}> = () => { //列表页loading const [spinLoading, setSpinLoading] = useState(false); + const currentNodeRef = useRef(); + const onSelect = (selectedKeys: any, info: any) => { selectedKeys.length == 0 ? setTreeId(null) : setTreeId(selectedKeys[0]) - - console.log(selectedKeys) + if(info.node?.obj){ + currentNodeRef.current = info.node?.obj; + } } const columns: any[] = [ //设备管理 @@ -162,9 +194,20 @@ const DeviceManage: React.FC<{}> = () => { - + { + spinSet(true) + await toDelete(record.id); + checkRelationRef.current?.reload(); + spinSet(false) + }} + okText="确定" + cancelText="取消" + > + + ); }, @@ -218,17 +261,6 @@ const DeviceManage: React.FC<{}> = () => { filterType: 'query', optionRender: (searchConfig: any, { form }) => { return [ - , , - , + , + , ]; }, }} @@ -255,7 +300,7 @@ const DeviceManage: React.FC<{}> = () => { {updateVisible ? ( setUpdateVisible(false)} + type={type} deviceId={deviceId} deviceRel={currentNodeRef?.current} reload={()=>{checkRelationRef?.current?.reload();}} status={'2'} onCancel={() => setUpdateVisible(false)} modalVisible={updateVisible} tpId={''} /> ) : null} diff --git a/src/pages/ElecEvaluation/DeviceManage/service.ts b/src/pages/ElecEvaluation/DeviceManage/service.ts index 2089c93..23b7754 100644 --- a/src/pages/ElecEvaluation/DeviceManage/service.ts +++ b/src/pages/ElecEvaluation/DeviceManage/service.ts @@ -39,3 +39,38 @@ export async function getDeviceById(id: any) { params: {} }); } +/** + * 保存/更新设备 + * @param params + * @returns + */ +export async function saveDevice(params: any) { + return request('/api/biz-service-ebtp-evaluation/v1/eval/device/create', { + method: 'POST', + data: params + }); +} +/** + * 查询区域下的设备列表 + * @param params + * @returns + */ + export async function getExternDevicesAboveArea(params: any) { + return request('/api/biz-service-ebtp-evaluation/v1/eval/platform/devices', { + method: 'GET', + params: params + }); +} + +/** + * 删除设备 + * @param id + * @returns + */ + export async function deleteDevice(id: string) { + return request('/api/biz-service-ebtp-evaluation/v1/eval/device/delete/'+id, { + method: 'GET' + }); +} + + diff --git a/src/pages/ElecEvaluation/ManuPlatformManage/index.tsx b/src/pages/ElecEvaluation/ManuPlatformManage/index.tsx new file mode 100644 index 0000000..c98620a --- /dev/null +++ b/src/pages/ElecEvaluation/ManuPlatformManage/index.tsx @@ -0,0 +1,209 @@ +import { isNotEmpty } from '@/utils/CommonUtils'; +import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; +import { Button, Spin, message, Popconfirm } from 'antd'; +import React, { useRef, useState } from 'react'; +import { useHistory } from 'umi'; +import ManuPlatformModal from './modal/ManuPlatformModal'; +import { getManuPlatformList, deleteManuPlatformInfo } from './service'; + +/** + * 厂家平台管理列表 + * @returns + */ +const ManuPlatformModalManage: React.FC<{}> = () => { + const actionRef = useRef(); + const [spin, spinSet] = useState(false); + const [visible, setVisible] = useState(false); + const manuPlatformInfo = useRef(); + const history = useHistory(); + const manuPlatformModalRef = useRef(null); + //编辑 + const editManuPlatform = (record: any) => { + manuPlatformInfo.current = record; + setVisible(true); + } + //新增 + const insertManuPlatform = () => { + manuPlatformInfo.current = null; + setVisible(true); + } + //关闭 + const closeManuPlatformModal = () => { + setVisible(false); + } + //删除场所 + const deleteManuPlatform = async (id: string) => { + const hide = message.loading('正在删除'); + try { + const success = await deleteManuPlatformInfo({'platformId':id}).then((res) => { + return res.success + }); + hide(); + if (success) { + message.success('删除成功'); + } + } catch (error) { + hide(); + message.error('删除失败请重试!'); + actionRef.current?.reload(); + } + } + const columns: ProColumns[] = [ + { + title: '序号', + valueType: 'index', + align: 'center', + width: 50, + hideInSearch: true, + }, + { + title: '平台名称', + align: 'center', + dataIndex: 'platformName', + hideInSearch: false, + }, + { + title: '平台厂家', + align: 'center', + dataIndex: 'vender', + hideInSearch: false, + valueEnum: { + 'sd_access': { text: '山分' }, + 'hik': { text: '海康' }, + 'icc': { text: '大华' }, + }, + }, + { + title: '平台类型', + align: 'center', + dataIndex: 'type', + hideInSearch: false, + valueEnum: { + 'door': { text: '门禁平台' }, + 'management': { text: '管理平台' }, + }, + }, + { + title: '合作方Key', + align: 'center', + dataIndex: 'appKey', + hideInSearch: true, + }, + { + title: '合作方Secret', + align: 'center', + dataIndex: 'appSecret', + hideInSearch: true, + }, + { + title: '操作', + align: 'center', + valueType: 'option', + width: '9%', + render: (_: any, record: any) => + ( + <> + + { + spinSet(true) + await deleteManuPlatform(record.id); + actionRef.current?.reload(); + spinSet(false) + }} + okText="确定" + cancelText="取消" + > + + + + ) + }, + ] + + return ( + +
+ { + let params = '' + for (const key in form?.getFieldsValue()) { + let element = form?.getFieldsValue()[key]; + if (element != undefined) { + params = params + '&' + key + '=' + element + } + } + return [ + , + , + + ]; + }, + }} + columns={columns} + options={false} + bordered={false} + size='small' + loading={false} + request={async (params) => { + spinSet(true); + return await getManuPlatformList({ + ...params, + }).then((res) => { + const result = { + data: res.data, + success: res.success, + } + return result; + }).finally(() => { + isNotEmpty(window.location.search) && history.push(window.location.pathname); + spinSet(false); + }) + } + } + pagination={false} + rowKey={"id"} + /> +
+ closeManuPlatformModal()} reload = {()=>{actionRef?.current?.reload();}} ref={manuPlatformModalRef} /> +
+ ) +} +export default ManuPlatformModalManage; + diff --git a/src/pages/ElecEvaluation/ManuPlatformManage/modal/ManuPlatformModal.tsx b/src/pages/ElecEvaluation/ManuPlatformManage/modal/ManuPlatformModal.tsx new file mode 100644 index 0000000..373d591 --- /dev/null +++ b/src/pages/ElecEvaluation/ManuPlatformManage/modal/ManuPlatformModal.tsx @@ -0,0 +1,225 @@ +import { Spin, Modal, message, Form, Input, Select } from 'antd'; +import Password from 'antd/lib/input/Password'; +import { isEmpty } from 'lodash'; +import React, { useState, useImperativeHandle, forwardRef, useEffect } from 'react'; +import { saveManuPlatformInfo, updateManuPlatformInfo } from '../service' + +interface PlaceModalProps { + manuPlatformInfo?:ManuPlatformInfo; + modalVisible: boolean; //开启关闭控制 + onCancel: () => void; //关闭方法传入 + reload: () => void; +} + +interface ManuPlatformInfo { + id ?: string; + platformName ?: string; + vender ?: string; + type ?: string; + appKey ?: string; + appSecret ?: string; + platformManagementIp ?: string; + platformManagementPort ?: string; + platformManagementLogin ?: string; + platformManagementPassword ?: string; + platformInfo ?: string; + serverSshPort ?: string; + serverUser ?: string; + serverPassword ?: string; + status ?: string; +} + +/** + * 新增修改弹出层 + * @returns + */ + const ManuPlatformModal: React.FC = forwardRef((props,ref) => { + const {manuPlatformInfo, modalVisible, onCancel, reload} = props; + const [saveLoading, setSaveLoading] = useState(false); + const [form] = Form.useForm(); + const { Option } = Select; + const clearForm = () => { + form.resetFields(); + } + useEffect(() => { + clearForm(); + }, [manuPlatformInfo]); + useImperativeHandle(ref, () => ({ + + })); + /** + * 提交 + */ + const onFinish = async (values: any) => { + setSaveLoading(true); + if(isEmpty(values['id'])){ + await saveManuPlatformInfo({ ...values }).then((res) => { + if (res?.success) { + message.success('保存成功'); + onCancel(); + clearForm(); + reload(); + } + }) + .finally(()=>{ + setSaveLoading(false); + }); + }else{ + await updateManuPlatformInfo({ ...values }).then((res) => { + if (res?.success) { + message.success('保存成功'); + onCancel(); + clearForm(); + reload(); + } + }) + .finally(()=>{ + setSaveLoading(false); + }); + } + } + return ( + { onCancel(); clearForm(); } } + onOk={() => { form.submit(); } } + title={
+ 厂家平台信息 +
} + // footer={renderFooter()} + width={"35%"} + > + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ ) +}) +export default ManuPlatformModal; + diff --git a/src/pages/ElecEvaluation/ManuPlatformManage/service.ts b/src/pages/ElecEvaluation/ManuPlatformManage/service.ts new file mode 100644 index 0000000..631b874 --- /dev/null +++ b/src/pages/ElecEvaluation/ManuPlatformManage/service.ts @@ -0,0 +1,46 @@ +import request from '@/utils/request'; +/** + * 查询平台数据 + * @param params + */ +export async function getManuPlatformList(params?: any) { + return request('/api/biz-service-ebtp-evaluation/v1/eval/platform/queryParam', { + method: 'POST', + data: {...params} + }); +} + +/** + * 保存平台信息 + * @param params 场所实体 + */ + export async function saveManuPlatformInfo(params?: any) { + return request('/api/biz-service-ebtp-evaluation/v1/eval/platform/insert', { + method: 'POST', + data: params, + }); +} + +/** + * 更新平台信息 + * @param params 场所实体 + */ + export async function updateManuPlatformInfo(params?: any) { + return request('/api/biz-service-ebtp-evaluation/v1/eval/platform/update', { + method: 'POST', + data: params, + }); +} + +/** + * 删除平台信息 + * @param params 场所实体 + */ + export async function deleteManuPlatformInfo(params?: any) { + return request('/api/biz-service-ebtp-evaluation/v1/eval/platform/delete', { + method: 'GET', + params:{...params} + }); +} + + diff --git a/src/pages/ElecEvaluation/MonitorScreen/MonitorRoom/index.tsx b/src/pages/ElecEvaluation/MonitorScreen/MonitorRoom/index.tsx index f8b0ab4..6353c3f 100644 --- a/src/pages/ElecEvaluation/MonitorScreen/MonitorRoom/index.tsx +++ b/src/pages/ElecEvaluation/MonitorScreen/MonitorRoom/index.tsx @@ -1,10 +1,8 @@ -import { Button, Col, Input, List, message, PaginationProps, Row, Tag, Tooltip } from "antd" -import moment from "moment"; +import { Button, Col, Input, List, message, Row, Tag, Tooltip } from "antd" import '../Home/style.less' import './style.less'; import content_title from '@/assets/screen/content_title.png' import React, { useEffect, useRef, useState } from "react" -import { LeftCircleOutlined, RightCircleOutlined } from "@ant-design/icons"; import { getMonitorList } from "./service"; import { isNotEmpty } from "@/utils/CommonUtils"; import { history } from "umi"; @@ -139,15 +137,15 @@ const provinceList = [{ "provincesRemark": "新疆", },]; -const itemRender: PaginationProps['itemRender'] = (_, type, originalElement) => { - if (type === 'prev') { - return ; - } - if (type === 'next') { - return ; - } - return originalElement; -}; +// const itemRender: PaginationProps['itemRender'] = (_, type, originalElement) => { +// if (type === 'prev') { +// return ; +// } +// if (type === 'next') { +// return ; +// } +// return originalElement; +// }; export const homeClick = () => { history.push("/ElecMonitorScreen/Home"); } @@ -332,6 +330,7 @@ export default () => { grid={{ gutter: 16, column: 3 }} pagination={{ defaultPageSize: 6, + showSizeChanger: false, onChange: onPageChange, current: pageNo.current, total: totalItem, diff --git a/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/index.tsx b/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/index.tsx index 585080d..ea9c436 100644 --- a/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/index.tsx +++ b/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/index.tsx @@ -1,4 +1,4 @@ -import { Col, Radio, Row, Table, Tag, Tooltip, Image, Drawer } from "antd" +import { Col, Radio, Row, Table, Tooltip, Image, Drawer } from "antd" import React, { useEffect, useRef, useState } from "react" import { EarlyWarn, LocalTime, onCell, onHeaderCell } from "../Home"; import '../Home/style.less' @@ -6,13 +6,13 @@ import '../MonitorRoom/style.less' import './style.less'; import warn_icon_01 from '@/assets/screen/warn_icon_01.png' import warn_icon_02 from '@/assets/screen/warn_icon_02.png' -import { getBidRoomData, getCameraList, getExpertReports, getLookBackList } from "./service"; +import { getAllStranger, getBidRoomData, getCameraList, getExpertReports, getLookBackList } from "./service"; import { bidStatusMap, homeClick, previousClick } from "../MonitorRoom"; import { getWarnData } from "../Home/service"; import ScreenVideoPlay from "@/components/ElecBidEvaluation/ScreenVideoPlay"; import { pictureDisplayPath } from "@/utils/DownloadUtils"; import { getURLInformation } from "@/utils/CommonUtils"; -import { getDicData } from "@/utils/session"; +import { getDicData, getSessionRoleData } from "@/utils/session"; const statusMap = ["未报道", "已报道"]; @@ -126,6 +126,8 @@ export default (props: any) => { const [caremaList, setCaremaList] = useState([]); //报道列表 const [expertList, setExpertList] = useState([]); + //陌生人预警-进行中 + const [strangerList, setStrangerList] = useState([]); //陌生人预警-回看 const [backStrangerList, setBackStrangerList] = useState([]); //人数预警-回看 @@ -142,6 +144,8 @@ export default (props: any) => { const zoomImg = useRef(null); //定时刷新间隔 const _time = 10000; + //当前登录人角色 + const roleCode = getSessionRoleData()?.roleCode; const onChange = (e: any) => { setBtnSelect(e.target.value); @@ -182,7 +186,7 @@ export default (props: any) => { getCaremaData(data);//获取监控点列表 if (data.status == "2") {//评标结束-回看 getBackList("2");//数量预警 - getBackList("3");//陌生人预警 + roleCode == "ebtp-watcher" && getBackList("3");//陌生人预警 } } }) @@ -193,6 +197,7 @@ export default (props: any) => { if (res?.code == 200) { const data = res?.data; setEarlyWarnData(data); + (roleCode == "ebtp-watcher" && data?.strangerDetails) && setStrangerList(data.strangerDetails.slice(0, 5)); } }) } @@ -203,10 +208,6 @@ export default (props: any) => { const data = res?.data; setCaremaList(data); if (data?.length > 0) { - //获取回看时间 - // getCaremaBackList(monitorId).then(response => { - // if (response?.code == 200) { - // const backData = response?.data; setCameraSelect(data[0].id); setCameraParams(data[0].platform); setTimeout(() => { @@ -216,8 +217,6 @@ export default (props: any) => { videoRef.current?.play(data[0].deviceCode); } }, 4000); - // } - // }) } } }) @@ -233,12 +232,24 @@ export default (props: any) => { } //获取告警-回看数据 const getBackList = (type: string) => { - getLookBackList({ reserveId: monitorId, type }).then(res => { + getLookBackList({ reserveId: monitorId, type, pageNo: 1, pageSize: type == "3" ? 1 : 5 }).then(res => { if (res?.code == 200) { const data = res?.data.records; if (type == "2") {//2-人数预警 setBackNumberList(data); } else if (type == "3") {//3-陌生人预警 + data.length > 0 && setBackStrangerList(data[0].details.slice(0, 5)); + } + } + }) + } + //获取陌生人告警-全部告警 + const getAllStrangerList = () => { + getAllStranger({ reserveId: monitorId }).then(res => { + if (res?.code == 200) { + const data = res?.data; + if (data && data.length > 0) { + setStrangerList(data); setBackStrangerList(data); } } @@ -293,6 +304,7 @@ export default (props: any) => { getRoomData(); getWarnInfo(); getExpertList(); + if (roleCode == "ebtp-site-supervision" || roleCode == "ebtp-after-supervision") { getAllStrangerList(); } }, []) //定时器 useEffect(() => { @@ -301,6 +313,7 @@ export default (props: any) => { interval = setInterval(function () { getWarnInfo(); getExpertList(); + if (roleCode == "ebtp-site-supervision" || roleCode == "ebtp-after-supervision") { getAllStrangerList(); } }, _time); } return () => { @@ -365,12 +378,16 @@ export default (props: any) => { -
- 供应商名称({basicInfo?.supplierLength}): - {basicInfo?.sectionPayerList?.map((item: any, index: any) =>

{item.sectionName}({item.payerNumber}):{item.payerNames.join("、")}

)}} visible={visible} color="rgba(4,20,47,0.85)" overlayInnerStyle={{ width: '250%' }} overlayClassName="screen-tag"> - {basicInfo?.sectionPayerList?.[0]?.payerNames.slice(0, 5).join("、")} setVisible(true)} onMouseLeave={() => setVisible(false)}>全部 -
-
+ {basicInfo?.status == "2" ? ( +
+ 供应商数量({basicInfo?.supplierLength}): + {basicInfo?.sectionPayerList?.map((item: any, index: any) =>

{item.sectionName}({item.payerNumber}):{item.payerNames.join("、")}

)}} visible={visible} color="rgba(4,20,47,0.85)" overlayInnerStyle={{ width: '250%' }} overlayClassName="screen-tag"> + {basicInfo?.sectionPayerList?.[0]?.sectionName}({basicInfo?.sectionPayerList?.[0]?.payerNumber}) setVisible(true)} onMouseLeave={() => setVisible(false)}>全部 +
+
+ ) : ( +
+ )} {/* */}
@@ -403,14 +420,14 @@ export default (props: any) => { ? backStrangerList.map((item: any, index: any) => (
-

时间:{item.createDate}

+

时间:{item.eventTime}

- drawerClick(item.details[0].filePath)} /> + drawerClick(item.filePath)} />
)) - : earlyWarnData?.strangerDetails?.map((item: any, index: any) => ( + : strangerList.map((item: any, index: any) => (

时间:{item.eventTime}

diff --git a/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/service.ts b/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/service.ts index 2b1cd8f..3a0521c 100644 --- a/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/service.ts +++ b/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/service.ts @@ -56,4 +56,16 @@ export async function getLookBackList(params: any) { // return request('/api/biz-service-ebtp-evaluation/v1/eval/room/reserve/' + id, { // method: 'GET', // }); -// } \ No newline at end of file +// } + +/** + * 陌生人预警-查询全部 + * @param params + * @returns + */ +export async function getAllStranger(params: any) { + return request('/api/biz-service-ebtp-evaluation/v1/eval/room/alarm/screamOfAlarm/strangerImg', { + method: 'GET', + params: params + }); +} \ No newline at end of file diff --git a/src/pages/ElecEvaluation/PlaceAreasManage/components/Areas.tsx b/src/pages/ElecEvaluation/PlaceAreasManage/components/Areas.tsx index 9f50a5c..e35ca8b 100644 --- a/src/pages/ElecEvaluation/PlaceAreasManage/components/Areas.tsx +++ b/src/pages/ElecEvaluation/PlaceAreasManage/components/Areas.tsx @@ -1,6 +1,6 @@ import { isNotEmpty } from '@/utils/CommonUtils'; import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; -import { Button, Spin, message } from 'antd'; +import { Button, Spin, message, Popconfirm } from 'antd'; import React, { useRef, useState } from 'react'; import { useHistory } from 'umi'; import AreasModal from './modal/AreasModal'; @@ -36,18 +36,23 @@ const AreasManage: React.FC<{}> = () => { const closeAreasModal = () => { setVisible(false); } - //删除 - const deleteAreas = async(id: string) => { - await deleteAreasInfo(id).then((res) => { - if (res?.success) { - message.success('删除成功'); - } - }) - .finally(()=>{ - actionRef?.current?.reload(); - }); + //删除区域 + const deleteAreas = async (id: string) => { + const hide = message.loading('正在删除'); + try { + const success = await deleteAreasInfo(id).then((res) => { + return res.success + }); + hide(); + if (success) { + message.success('删除成功'); + } + } catch (error) { + hide(); + message.error('删除失败请重试!'); + actionRef.current?.reload(); + } } - const columns: ProColumns[] = [ { title: '序号', @@ -57,14 +62,11 @@ const AreasManage: React.FC<{}> = () => { hideInSearch: true, }, { - title: '评标区域', + title: '评标区域编码', align: 'center', - dataIndex: 'areaRegion', + dataIndex: 'areaRegionCode', width: '10%', hideInSearch: true, - renderText(text, record, index, action) { - return record.areaRegionName + "(" + record.areaRegionCode + ") "; - }, }, { title: '评标区域名称', @@ -122,15 +124,20 @@ const AreasManage: React.FC<{}> = () => { > 编辑 - + + ) }, diff --git a/src/pages/ElecEvaluation/PlaceAreasManage/components/Place.tsx b/src/pages/ElecEvaluation/PlaceAreasManage/components/Place.tsx index b555b38..528149d 100644 --- a/src/pages/ElecEvaluation/PlaceAreasManage/components/Place.tsx +++ b/src/pages/ElecEvaluation/PlaceAreasManage/components/Place.tsx @@ -1,6 +1,6 @@ import { isNotEmpty } from '@/utils/CommonUtils'; import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; -import { Button, Spin, message } from 'antd'; +import { Button, Spin, message, Popconfirm } from 'antd'; import React, { useRef, useState } from 'react'; import { useHistory } from 'umi'; import PlaceModal from './modal/PlaceModal'; @@ -59,18 +59,22 @@ const PlaceManage: React.FC<{}> = () => { const closePlaceModal = () => { setVisible(false); } - //删除 - const deletePlace = async(id: string) => { - await deletePlaceInfo(id).then((res) => { - if (res?.success) { - message.success('删除成功'); - } - }) - .catch(e => { - message.error('删除失败'); - }).finally(()=>{ - actionRef?.current?.reload(); - }); + //删除场所 + const deletePlace = async (id: string) => { + const hide = message.loading('正在删除'); + try { + const success = await deletePlaceInfo(id).then((res) => { + return res.success + }); + hide(); + if (success) { + message.success('删除成功'); + } + } catch (error) { + hide(); + message.error('删除失败请重试!'); + actionRef.current?.reload(); + } } const columns: ProColumns[] = [ { @@ -81,14 +85,11 @@ const PlaceManage: React.FC<{}> = () => { hideInSearch: true, }, { - title: '评标场所', + title: '评标场所编码', align: 'center', - dataIndex: 'placeRegion', + dataIndex: 'placeRegionCode', width: '10%', hideInSearch: true, - renderText(text, record, index, action) { - return record.placeRegionName + "(" + record.placeRegionCode + ")"; - }, }, { title: '评标场所名称', @@ -181,15 +182,20 @@ const PlaceManage: React.FC<{}> = () => { > 编辑 - + + ) }, diff --git a/src/pages/ElecEvaluation/PlaceAreasManage/components/modal/AreasModal.tsx b/src/pages/ElecEvaluation/PlaceAreasManage/components/modal/AreasModal.tsx index 9847f64..eb5e7a1 100644 --- a/src/pages/ElecEvaluation/PlaceAreasManage/components/modal/AreasModal.tsx +++ b/src/pages/ElecEvaluation/PlaceAreasManage/components/modal/AreasModal.tsx @@ -1,7 +1,8 @@ import { ConsoleSqlOutlined } from '@ant-design/icons'; import { Spin, Modal, message, Button, Form, Input, Select, InputNumber } from 'antd'; -import React, { useState, useEffect, useImperativeHandle, forwardRef } from 'react'; +import React, { useState, useEffect, useImperativeHandle, forwardRef, useRef } from 'react'; import { saveAreasInfo, getPlaceListByPermission, getPlatAreaList } from '../../service'; +import SelectExternAreaModal from './SelectExternAreaModal'; interface AreasModalProps { areasInfo: AreasInfo; @@ -48,11 +49,13 @@ interface AreaOptions { const {areasInfo, modalVisible, onCancel, reload} = props;; const [saveLoading, setSaveLoading] = useState(false); const [placeList, setPlaceList] = useState([]); - const [areaList, setAreaList] = useState([]); + // const [areaList, setAreaList] = useState([]); + const [selectAreaStatus, setSelectAreaStatus] = useState(); + const currentPlace = useRef(); const [form] = Form.useForm(); const clearForm = () => { form.resetFields(); - setAreaList([]); + // setAreaList([]); } useEffect(() => { clearForm(); @@ -60,12 +63,8 @@ interface AreaOptions { getPlaceListByPermission().then(res => { if(res.code === 200){ setPlaceList(EnvPlaceOptions(res.data)); - if(areasInfo?.placeRegionCode){ - getPlatAreaList({placeId: areasInfo?.placeRegionCode}).then(res => { - if(res.code === 200){ - setAreaList(EnvAreaOptions(res.data)); - } - }) + if(areasInfo?.placeId){ + currentPlace.current = areasInfo?.placeId; } } }) @@ -88,16 +87,16 @@ interface AreaOptions { return value; } - const EnvAreaOptions = (data: AreaOptions[]) => { - let value = []; - for (let i = 0; i < data.length; i++) { - // if (i === 0) { - // value.push({label:'-请选择-',value:''}); - // } - value.push({label:data[i].name, value:data[i].indexCode}); - } - return value; - } + // const EnvAreaOptions = (data: AreaOptions[]) => { + // let value = []; + // for (let i = 0; i < data.length; i++) { + // // if (i === 0) { + // // value.push({label:'-请选择-',value:''}); + // // } + // value.push({label:data[i].name, value:data[i].indexCode}); + // } + // return value; + // } /** * 评标场所回调 * @param value @@ -109,19 +108,20 @@ interface AreaOptions { placeId: value['value'], }) - getPlatAreaList({placeId: value['key']}).then(res => { - if(res.code === 200){ - setAreaList(EnvAreaOptions(res.data)); - } - }) + currentPlace.current = value['value']; + // getPlatAreaList({placeId: value['key']}).then(res => { + // if(res.code === 200){ + // setAreaList(EnvAreaOptions(res.data)); + // } + // }) } - const handleAreaRegionChange = (value:any) => { - form.setFieldsValue({ - areaRegionCode: value['value'], - areaRegionName: value['label'] - }) - } + // const handleAreaRegionChange = (value:any) => { + // form.setFieldsValue({ + // areaRegionCode: value['value'], + // areaRegionName: value['label'] + // }) + // } // const renderFooter = () => { // return ( @@ -150,113 +150,130 @@ interface AreaOptions { }); } - return ( {onCancel();clearForm();}} - onOk = {() => {form.submit();}} - title={
- 评标区域信息 -
} - // footer={renderFooter()} - width={"30%"} + const ShowExternAreaModal = () => { + if(form.getFieldValue(['placeId'])){ + setSelectAreaStatus(true); + }else{ + message.error('请先选择评标场所'); + } + } + + const selectExternAreaCallBack = (value: any) => { + form.setFieldsValue({ + areaRegionName: value['name'], + areaName: value['name'], + areaRegionCode: value['indexCode'] + }) + } + + return (<> { onCancel(); clearForm(); } } + onOk={() => { form.submit(); } } + title={
+ 评标区域信息 +
} + // footer={renderFooter()} + width={"30%"} + > + +
- - - - - - - - - - - - - - - - - - - - - - - - - - -
-
) + + + + + + + + + + + + + {/* + + */} + + + + + + + + + + + + + + + + + +
setSelectAreaStatus(false)} onSubmit={(value: any) => selectExternAreaCallBack(value)} values={currentPlace?.current}> ) }) export default AreasModal; diff --git a/src/pages/ElecEvaluation/PlaceAreasManage/components/modal/PlaceModal.tsx b/src/pages/ElecEvaluation/PlaceAreasManage/components/modal/PlaceModal.tsx index a905f81..b6fd193 100644 --- a/src/pages/ElecEvaluation/PlaceAreasManage/components/modal/PlaceModal.tsx +++ b/src/pages/ElecEvaluation/PlaceAreasManage/components/modal/PlaceModal.tsx @@ -3,6 +3,7 @@ import { isEmpty } from 'lodash'; import React, { useState, useImperativeHandle, forwardRef, useEffect, useRef } from 'react'; import { savePlaceInfo, getServiceProvices, getPlatforms, getExternPlaces } from '../../service'; import { getProviceList, getCityList, getAreaList, getDictRegion } from '../PcaService' +import SelectExternPlaceModal from './SelectExternPlaceModal'; interface PcaKeyValues{ pid?:string, @@ -89,6 +90,9 @@ interface PlaceInfo { const currentCity = useRef(); //县默认值 const currentCounty = useRef(); + //当前平台 + const currentPlatform = useRef(); + const [selectPlaceStatus,setSelectPlaceStatus] = useState(); const [form] = Form.useForm(); const platformParams = useRef(); const clearForm = () => { @@ -99,17 +103,21 @@ interface PlaceInfo { currentCity.current = null; setAreaList([]); currentCounty.current = null; + currentPlatform.current = null; } useEffect(() => { clearForm(); getPlatforms(platformParams).then(res =>{ if(res.code === 200){ setPlatforms(EnvPlatformOptions(res.data)); - if(placeInfo?.platformList && placeInfo?.platformList[0]?.platformId){ - getExternPlaces(placeInfo?.platformList[0]?.platformId).then(res => { - setExternPlaces(EnvExternPlacesOptions(res.data)); - }) + if(placeInfo?.platformList){ + currentPlatform.current = placeInfo?.platformList; } + // if(placeInfo?.platformList && placeInfo?.platformList[0]?.platformId){ + // getExternPlaces(placeInfo?.platformList[0]?.platformId).then(res => { + // setExternPlaces(EnvExternPlacesOptions(res.data)); + // }) + // } } }) getServiceProvices().then(res =>{ @@ -143,26 +151,27 @@ interface PlaceInfo { } ] }); - form.resetFields(["placeRegionCode"]); - let _plaform = form.getFieldValue('platformList'); - if(_plaform && _plaform[0].platformId){ - getExternPlaces({platformId: _plaform[0].platformId}).then(res => { - if(res.code === 200){ - setExternPlaces(EnvExternPlacesOptions(res.data)); - } - }) - } - } - /** - * 平台场所回调 - * @param value - */ - const handleExternPlaceChange = (value: any) =>{ - form.setFieldsValue({ - placeRegionName:value['label'], - placeRegionCode:value['value'] - }) + currentPlatform.current = form.getFieldValue(['platformList']); + // form.resetFields(["placeRegionCode"]); + // let _plaform = form.getFieldValue('platformList'); + // if(_plaform && _plaform[0].platformId){ + // getExternPlaces({platformId: _plaform[0].platformId}).then(res => { + // if(res.code === 200){ + // setExternPlaces(EnvExternPlacesOptions(res.data)); + // } + // }) + // } } + // /** + // * 平台场所回调 + // * @param value + // */ + // const handleExternPlaceChange = (value: any) =>{ + // form.setFieldsValue({ + // placeRegionName:value['label'], + // placeRegionCode:value['value'] + // }) + // } /** * 省回调 */ @@ -373,190 +382,197 @@ interface PlaceInfo { .finally(()=>{ setSaveLoading(false); }); + } + const ShowExternPlaceModal = () => { + if(form.getFieldValue(['platformList'])){ + setSelectPlaceStatus(true); + }else{ + message.error('请先选择管理平台'); + } + } - return ( {onCancel();clearForm();}} - onOk = {() => {form.submit();}} - title={
- 评标场所信息 -
} - // footer={renderFooter()} - width={"35%"} + const selectPlaceCallBack = (value: any) => { + form.setFieldsValue({ + placeRegionName: value['name'], + placeName: value['name'], + placeRegionCode: value['indexCode'] + + }) + } + return (<> { onCancel(); clearForm(); } } + onOk={() => { form.submit(); } } + title={
+ 评标场所信息 +
} + // footer={renderFooter()} + width={"35%"} + > + +
- - - - - - - - + + + + + + + + + + + + + + + + + {/* + + */} + + + + + {/* + + */} + + + + + - + + - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
) + + + + + + + + + + + + + + +
setSelectPlaceStatus(false)} onSubmit={(value: any) => selectPlaceCallBack(value)} values={currentPlatform?.current}> + ) }) export default PlaceModal; diff --git a/src/pages/ElecEvaluation/PlaceAreasManage/components/modal/SelectExternAreaModal.tsx b/src/pages/ElecEvaluation/PlaceAreasManage/components/modal/SelectExternAreaModal.tsx new file mode 100644 index 0000000..38e33fe --- /dev/null +++ b/src/pages/ElecEvaluation/PlaceAreasManage/components/modal/SelectExternAreaModal.tsx @@ -0,0 +1,135 @@ +import React, { useEffect, useRef, useState } from 'react'; +import { Button, message, Modal, Spin } from 'antd'; +import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; +import { getPlatAreaList } from '../../service'; + +interface SelectExternAreaProps { + modalVisible: boolean; + onCancel: () => void; + onSubmit: (value: any) => void; + values: any; +} + +const SelectExternArea: React.FC = (props) => { + const { modalVisible, onCancel, onSubmit, values } = props; + const actionRef = useRef(); + //当前选择行areaId + const [selectedRowKeys, setSelectedRowKeys] = useState([]); + //当前选择行数据 + const selectedRecord = useRef(); + //loading + const [loading, setLoading] = useState(false); + + const columns: ProColumns[] = [ + { + valueType: 'index', + width: 48, + }, + { + title: '评标区域编码', + dataIndex: 'indexCode', + ellipsis: true, + hideInSearch: true, + }, + { + title: '评标区域名称', + dataIndex: 'name', + ellipsis: true, + hideInSearch: true, + }, + ]; + + const onOk = () => { + if (selectedRowKeys.length == 0) { + message.info("请选择评标区域"); + return; + } + onSubmit(selectedRecord?.current); + onCancel(); + } + + useEffect(() => { + setSelectedRowKeys([]); + selectedRecord.current = null; + }, [values]) + + const queryExternAreaList = async () => { + console.log(values); + setLoading(true); + return await getPlatAreaList({placeId: values}).then(res => { + if (res?.code == 200) { + return { + data: res?.data, + success: res?.success + } + } else { + return { + data: [], + success: false, + } + } + }).finally(()=>{ + setLoading(false); + }) + } + + return ( + onCancel()} + onOk={() => onOk()} + okText={"确认"} + okButtonProps={{ loading: loading }} + width={"40%"} + bodyStyle={{ overflowY: 'auto', }} + className="confirm table-no-alert" + centered + footer = {[ + , + , + , + ]} + > + + + columns={columns} + actionRef={actionRef} + bordered={false} + request={async (params) => { + return queryExternAreaList(); + }} + rowKey="indexCode" + search={false} + options={false} + pagination={false} + rowSelection={{ + type: "radio", + selectedRowKeys, + onChange: (selectedRowKeys, selectedRows) => { + setSelectedRowKeys(selectedRowKeys); + selectedRecord.current = selectedRows[0]; + }, + }} + dateFormatter="string" + toolBarRender={false} + /> + + + ); +}; + +export default SelectExternArea; diff --git a/src/pages/ElecEvaluation/PlaceAreasManage/components/modal/SelectExternPlaceModal.tsx b/src/pages/ElecEvaluation/PlaceAreasManage/components/modal/SelectExternPlaceModal.tsx new file mode 100644 index 0000000..340366e --- /dev/null +++ b/src/pages/ElecEvaluation/PlaceAreasManage/components/modal/SelectExternPlaceModal.tsx @@ -0,0 +1,134 @@ +import React, { useEffect, useRef, useState } from 'react'; +import { Button, message, Modal, Spin } from 'antd'; +import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; +import { getExternPlaces } from '../../service'; + +interface SelectExternPlaceProps { + modalVisible: boolean; + onCancel: () => void; + onSubmit: (value: any) => void; + values: any; +} + +const SelectExternPlace: React.FC = (props) => { + const { modalVisible, onCancel, onSubmit, values } = props; + const actionRef = useRef(); + //当前选择行areaId + const [selectedRowKeys, setSelectedRowKeys] = useState([]); + //当前选择行数据 + const selectedRecord = useRef(); + //loading + const [loading, setLoading] = useState(false); + + const columns: ProColumns[] = [ + { + valueType: 'index', + width: 48, + }, + { + title: '评标场所编码', + dataIndex: 'indexCode', + ellipsis: true, + hideInSearch: true, + }, + { + title: '评标场所名称', + dataIndex: 'name', + ellipsis: true, + hideInSearch: true, + }, + ]; + + const onOk = () => { + if (selectedRowKeys.length == 0) { + message.info("请选择评标场所"); + return; + } + onSubmit(selectedRecord?.current); + onCancel(); + } + + useEffect(() => { + setSelectedRowKeys([]); + selectedRecord.current = null; + }, [values]) + + const queryExternPlaceList = async () => { + setLoading(true); + return await getExternPlaces({platformId:values[0]?.platformId}).then(res => { + if (res?.code == 200) { + return { + data: res?.data, + success: res?.success + } + } else { + return { + data: [], + success: false, + } + } + }).finally(()=>{ + setLoading(false); + }) + } + + return ( + onCancel()} + onOk={() => onOk()} + okText={"确认"} + okButtonProps={{ loading: loading }} + width={"40%"} + bodyStyle={{ overflowY: 'auto', }} + className="confirm table-no-alert" + centered + footer = {[ + , + , + , + ]} + > + + + columns={columns} + actionRef={actionRef} + bordered={false} + request={async (params) => { + return queryExternPlaceList(); + }} + rowKey="indexCode" + search={false} + options={false} + pagination={false} + rowSelection={{ + type: "radio", + selectedRowKeys, + onChange: (selectedRowKeys, selectedRows) => { + setSelectedRowKeys(selectedRowKeys); + selectedRecord.current = selectedRows[0]; + }, + }} + dateFormatter="string" + toolBarRender={false} + /> + + + ); +}; + +export default SelectExternPlace; diff --git a/src/pages/ElecEvaluation/PlaceAreasManage/service.ts b/src/pages/ElecEvaluation/PlaceAreasManage/service.ts index cbbc767..b26dbf0 100644 --- a/src/pages/ElecEvaluation/PlaceAreasManage/service.ts +++ b/src/pages/ElecEvaluation/PlaceAreasManage/service.ts @@ -4,7 +4,7 @@ import request from '@/utils/request'; * @param params */ export async function getPlacePage(params?: any) { - return request('/api/biz-service-ebtp-evaluation/v1/elec/eval/place/page/list', { + return request('/api/biz-service-ebtp-evaluation/v1/eval/platform/queryPageByParam', { method: 'GET', params: {...params} }); diff --git a/src/pages/Evaluation/BaseInf/service.ts b/src/pages/Evaluation/BaseInf/service.ts index c3809fe..d55514c 100644 --- a/src/pages/Evaluation/BaseInf/service.ts +++ b/src/pages/Evaluation/BaseInf/service.ts @@ -28,7 +28,7 @@ export async function getInfList(data: any) { */ export async function saveLeaderId(param: any) { return request(`/api/biz-service-ebtp-rsms/v1/jury/member/chooseLeader/?id=${param}`, { - method: 'PUT', + method: 'POST', }); } @@ -46,7 +46,7 @@ export async function baseFinalSubmit(params: any) { * 通过评审室id查询评审分工 * @param param */ - export async function getDevidedData(param: any) { +export async function getDevidedData(param: any) { return request(`/api/biz-service-ebtp-rsms/v1/jury/divide/findListByRoomId/` + param, { method: 'GET', }); diff --git a/src/pages/Evaluation/BidAbnormal/service.ts b/src/pages/Evaluation/BidAbnormal/service.ts index dbe8484..70f44fd 100644 --- a/src/pages/Evaluation/BidAbnormal/service.ts +++ b/src/pages/Evaluation/BidAbnormal/service.ts @@ -38,8 +38,8 @@ export async function addQuestion(data: any) { * @param param */ export async function changeResult(data: any) { - return request('/api/biz-service-ebtp-rsms/v1/bid/eval/question', { - method: 'put', + return request('/api/biz-service-ebtp-rsms/v1/bid/eval/question/update', { + method: 'POST', data: data }); } @@ -49,8 +49,8 @@ export async function changeResult(data: any) { * @param param */ export async function dellQuestion(id: any) { - return request('/api/biz-service-ebtp-rsms/v1/bid/eval/question/'+id, { - method: 'DELETE', + return request('/api/biz-service-ebtp-rsms/v1/bid/eval/question/del/' + id, { + method: 'POST', }); } @@ -59,7 +59,7 @@ export async function dellQuestion(id: any) { * @param param */ export async function changeQuestion(id: any) { - return request('/api/biz-service-ebtp-rsms/v1/bid/eval/question/'+id, { + return request('/api/biz-service-ebtp-rsms/v1/bid/eval/question/' + id, { method: 'get', }); } diff --git a/src/pages/Evaluation/BidControl/BidControlManager/service.ts b/src/pages/Evaluation/BidControl/BidControlManager/service.ts index e2291a4..d4233ef 100644 --- a/src/pages/Evaluation/BidControl/BidControlManager/service.ts +++ b/src/pages/Evaluation/BidControl/BidControlManager/service.ts @@ -3,33 +3,33 @@ import request from '@/utils/request'; export async function getList(assessRoomId: any) { // IP MAC查看 return request('/api/biz-service-ebtp-resps/v1/tfilewarning/list', { method: 'post', - data: {"assessRoomId": assessRoomId} + data: { "assessRoomId": assessRoomId } }); } export async function getQuoteWarning(assessRoomId: any) { //报价一致预警 return request('/api/biz-service-ebtp-resps/v1/tfilecontentdata/getQuoteWarning', { method: 'post', - data: {"assessRoomId": assessRoomId} + data: { "assessRoomId": assessRoomId } }); } export async function getRRQuoteWarning(assessRoomId: any) { //报价一致预警 专家通知情况 return request('/api/biz-service-ebtp-resps/v1/riskpricewarning/list', { method: 'post', - data: {"assessRoomId": assessRoomId} + data: { "assessRoomId": assessRoomId } }); -} +} export async function quoteWarningToRR(params: any) { //报价一致预警 通知专家 return request('/api/biz-service-ebtp-resps/v1/riskpricewarning/', { method: 'post', data: params - }); -} + }); +} export async function getReviewResultList(params: any) { // 评审结果展示及预警 return request('/api/biz-service-ebtp-rsms/v1/risk/resultWarning', { method: 'post', - data: params + data: params }); } export async function getRRWarningtList(params: any) { // 评审结果展示及预警 专家提醒情况 @@ -42,21 +42,23 @@ export async function getRRWarningtList(params: any) { // 评审结果展示及 export async function warningtListToRR(assessRoomId: any) { // 评审结果展示及预警 提醒专家 return request('/api/biz-service-ebtp-rsms/v1/risk/sendJuryMemberConfirm', { method: 'post', - data: {"assessRoomId": assessRoomId,} + data: { "assessRoomId": assessRoomId, } }); } -export async function warningtListRRToYes(id: any,confirmStatus:any) { // 评审结果展示及预警 专家确认 +export async function warningtListRRToYes(id: any, confirmStatus: any) { // 评审结果展示及预警 专家确认 return request('/api/biz-service-ebtp-rsms/v1/riskresultwarning/updateResultWarning', { method: 'post', - data: {"id": id, - "confirmStatus":confirmStatus} + data: { + "id": id, + "confirmStatus": confirmStatus + } }); } -export async function getBlackList(projectId:any,assessRoomId: any) { //黑名单 - return request('/api/biz-service-ebtp-bid/v1/supplier/info/getRiskShowBlacklistByRoomId?tpId='+`${projectId}`+"&roomId="+`${assessRoomId}`, { +export async function getBlackList(projectId: any, assessRoomId: any) { //黑名单 + return request('/api/biz-service-ebtp-bid/v1/supplier/info/getRiskShowBlacklistByRoomId?tpId=' + `${projectId}` + "&roomId=" + `${assessRoomId}`, { method: 'get' }); } @@ -69,25 +71,25 @@ export async function getBidDocSmartCheckList(assessRoomId: any) { //投标文 } export async function getDeviatedWarnList(assessRoomId: any) { // 偏离度提醒 - return request('/api/biz-service-ebtp-rsms/v1/bid/deviated/warn/findBidDeviatedWarnListByRoomId/'+`${assessRoomId}`, { + return request('/api/biz-service-ebtp-rsms/v1/bid/deviated/warn/findBidDeviatedWarnListByRoomId/' + `${assessRoomId}`, { method: 'get' }); } export async function getDeviatedWarnListByJury(assessRoomId: any) { // 偏离度提醒 专家查询 - return request('/api/biz-service-ebtp-rsms/v1/bid/deviated/warn/findBidDeviatedWarnListByRoomIdAndMember/'+`${assessRoomId}`, { + return request('/api/biz-service-ebtp-rsms/v1/bid/deviated/warn/findBidDeviatedWarnListByRoomIdAndMember/' + `${assessRoomId}`, { method: 'get', }); } export async function deviatedWarnListToRR(id: any) { // 偏离度提醒 通知专家 - return request('/api/biz-service-ebtp-rsms/v1/bid/deviated/warn/send/'+`${id}`, { + return request('/api/biz-service-ebtp-rsms/v1/bid/deviated/warn/send/' + `${id}`, { method: 'get' }); } export async function deviatedWarnListJuryYes(params: any) { // 偏离度提醒 专家确认 填写说明内容上传 return request('/api/biz-service-ebtp-rsms/v1/bid/deviated/warn', { - method: 'put', + method: 'POST', data: params }); } @@ -99,25 +101,29 @@ export async function getDeviatedAnalysisList(params?: any) { // 偏离度分析 }); } -export async function deviatedAnalysisListToRR(assessRoomId: any,reviewTurnId:any,reviewTurnSort:any) { // 偏离度分析 发送专家确认 +export async function deviatedAnalysisListToRR(assessRoomId: any, reviewTurnId: any, reviewTurnSort: any) { // 偏离度分析 发送专家确认 return request('/api/biz-service-ebtp-rsms/v1/risk/sendDeviatedAnalysisConfirm', { method: 'post', - data: {"assessRoomId": assessRoomId, - "reviewTurnId": reviewTurnId, - "reviewTurnSort": reviewTurnSort} + data: { + "assessRoomId": assessRoomId, + "reviewTurnId": reviewTurnId, + "reviewTurnSort": reviewTurnSort + } }); } -export async function deviatedAnalysisRRYes(id: any,confirmStatus:any) { // 偏离度分析 发送专家确认 - return request('/api/biz-service-ebtp-rsms/v1/riskdeviatedanalysis', { - method: 'put', - data: {id: id, - confirmStatus: confirmStatus} +export async function deviatedAnalysisRRYes(id: any, confirmStatus: any) { // 偏离度分析 发送专家确认 + return request('/api/biz-service-ebtp-rsms/v1/riskdeviatedanalysis/update', { + method: 'POST', + data: { + id: id, + confirmStatus: confirmStatus + } }); } -export async function replace(a: any,b: any,c: any){ - return a.replace(b,c); +export async function replace(a: any, b: any, c: any) { + return a.replace(b, c); } //风险限定供应商 diff --git a/src/pages/Evaluation/BidControl/Jury/service.ts b/src/pages/Evaluation/BidControl/Jury/service.ts index b4f3133..7fef192 100644 --- a/src/pages/Evaluation/BidControl/Jury/service.ts +++ b/src/pages/Evaluation/BidControl/Jury/service.ts @@ -3,23 +3,23 @@ import request from '@/utils/request'; export async function getList(assessRoomId: any) { // IP MAC查看 return request('/api/biz-service-ebtp-resps/v1/tfilewarning/list', { method: 'post', - data: {"assessRoomId": assessRoomId} + data: { "assessRoomId": assessRoomId } }); } export async function getQuoteWarning(assessRoomId: any) { //报价一致预警 return request('/api/biz-service-ebtp-resps/v1/tfilecontentdata/getQuoteWarning', { method: 'post', - data: {"assessRoomId": assessRoomId} + data: { "assessRoomId": assessRoomId } }); } export async function getRRQuoteWarning(assessRoomId: any) { //报价一致预警 专家通知情况 return request('/api/biz-service-ebtp-resps/v1/riskpricewarning/list', { method: 'post', - data: {"assessRoomId": assessRoomId} + data: { "assessRoomId": assessRoomId } }); -} +} export async function quoteWarningToRR(params: any) { //报价一致预警 通知专家 return request('/api/biz-service-ebtp-resps/v1/riskpricewarning/', { method: 'post', @@ -29,7 +29,7 @@ export async function quoteWarningToRR(params: any) { //报价一致预警 通 export async function getReviewResultList(params: any) { // 评审结果展示及预警 return request('/api/biz-service-ebtp-rsms/v1/risk/resultWarning', { method: 'post', - data: params + data: params }); } export async function getRRWarningtList(params: any) { // 评审结果展示及预警 专家提醒情况 @@ -42,55 +42,61 @@ export async function getRRWarningtList(params: any) { // 评审结果展示及 export async function warningtListToRR(assessRoomId: any) { // 评审结果展示及预警 提醒专家 return request('/api/biz-service-ebtp-rsms/v1/risk/sendJuryMemberConfirm', { method: 'post', - data: {"assessRoomId": assessRoomId,} + data: { "assessRoomId": assessRoomId, } }); } -export async function warningtListRRToYes(id: any,confirmStatus:any) { // 评审结果展示及预警 专家确认 +export async function warningtListRRToYes(id: any, confirmStatus: any) { // 评审结果展示及预警 专家确认 return request('/api/biz-service-ebtp-rsms/v1/riskresultwarning/updateResultWarning', { method: 'post', - data: {"id": id, - "confirmStatus":confirmStatus} + data: { + "id": id, + "confirmStatus": confirmStatus + } }); } -export async function getBlackList(assessRoomId: any,sf:any) { //黑名单 +export async function getBlackList(assessRoomId: any, sf: any) { //黑名单 return request('/api/biz-service-ebtp-resps/v1/tfilecontentdata/getQuoteWarning', { method: 'post', - data: {"assessRoomId": assessRoomId, - "sf":sf} + data: { + "assessRoomId": assessRoomId, + "sf": sf + } }); } -export async function getBlackListOld(gysid: any,sf:any) { //黑名单历史 +export async function getBlackListOld(gysid: any, sf: any) { //黑名单历史 return request('/api/biz-service-ebtp-resps/v1/tfilecontentdata/getQuoteWarning', { method: 'post', - data: {"gysid": gysid, - "sf":sf} + data: { + "gysid": gysid, + "sf": sf + } }); } export async function getDeviatedWarnList(assessRoomId: any) { // 偏离度提醒 - return request('/api/biz-service-ebtp-rsms/v1/bid/deviated/warn/findBidDeviatedWarnListByRoomId/'+`${assessRoomId}`, { + return request('/api/biz-service-ebtp-rsms/v1/bid/deviated/warn/findBidDeviatedWarnListByRoomId/' + `${assessRoomId}`, { method: 'get' }); } export async function getDeviatedWarnListByJury(assessRoomId: any) { // 偏离度提醒 专家查询 - return request('/api/biz-service-ebtp-rsms/v1/bid/deviated/warn/findBidDeviatedWarnListByRoomIdAndMember/'+`${assessRoomId}`, { + return request('/api/biz-service-ebtp-rsms/v1/bid/deviated/warn/findBidDeviatedWarnListByRoomIdAndMember/' + `${assessRoomId}`, { method: 'get', }); } export async function deviatedWarnListToRR(id: any) { // 偏离度提醒 通知专家 - return request('/api/biz-service-ebtp-rsms/v1/bid/deviated/warn/send/'+`${id}`, { + return request('/api/biz-service-ebtp-rsms/v1/bid/deviated/warn/send/' + `${id}`, { method: 'get' }); } export async function deviatedWarnListJuryYes(params: any) { // 偏离度提醒 专家确认 填写说明内容上传 return request('/api/biz-service-ebtp-rsms/v1/bid/deviated/warn', { - method: 'put', + method: 'POST', data: params }); } @@ -102,25 +108,29 @@ export async function getDeviatedAnalysisList(params?: any) { // 偏离度分析 }); } -export async function deviatedAnalysisListToRR(assessRoomId: any,reviewTurnId:any,reviewTurnSort:any) { // 偏离度分析 发送专家确认 +export async function deviatedAnalysisListToRR(assessRoomId: any, reviewTurnId: any, reviewTurnSort: any) { // 偏离度分析 发送专家确认 return request('/api/biz-service-ebtp-rsms/v1/risk/sendDeviatedAnalysisConfirm', { method: 'post', - data: {"assessRoomId": assessRoomId, - "reviewTurnId": reviewTurnId, - "reviewTurnSort": reviewTurnSort} - }); -} - -export async function deviatedAnalysisRRYes(id: any,confirmStatus:any) { // 偏离度分析 发送专家确认 - return request('/api/biz-service-ebtp-rsms/v1/riskdeviatedanalysis', { - method: 'put', - data: {id: id, - confirmStatus: confirmStatus} + data: { + "assessRoomId": assessRoomId, + "reviewTurnId": reviewTurnId, + "reviewTurnSort": reviewTurnSort + } }); } -export async function replace(a: any,b: any,c: any){ - return a.replace(b,c); +export async function deviatedAnalysisRRYes(id: any, confirmStatus: any) { // 偏离度分析 发送专家确认 + return request('/api/biz-service-ebtp-rsms/v1/riskdeviatedanalysis/update', { + method: 'POST', + data: { + id: id, + confirmStatus: confirmStatus + } + }); +} + +export async function replace(a: any, b: any, c: any) { + return a.replace(b, c); } diff --git a/src/pages/Evaluation/BidDetailed/BidDetailedManager/service.ts b/src/pages/Evaluation/BidDetailed/BidDetailedManager/service.ts index a98cfa6..012a4e7 100644 --- a/src/pages/Evaluation/BidDetailed/BidDetailedManager/service.ts +++ b/src/pages/Evaluation/BidDetailed/BidDetailedManager/service.ts @@ -71,7 +71,7 @@ export async function getJuryDetailScoreData(params: any) { */ export function updateReviewStatus(params: any) { return request('/api/biz-service-ebtp-rsms/v1/bid/eval/updateReviewStatus', { - method: 'put', + method: 'POST', params }); } @@ -99,10 +99,10 @@ export function findPriceScoreRecord(params: any) { * 根据评审室id获取评审室信息 * @param params */ - export async function getRoomDataById(params: any) { +export async function getRoomDataById(params: any) { return request(`/api/biz-service-ebtp-process/v1/bizassessroom/${params}`, { - method: 'GET', + method: 'GET', }); - } - +} + diff --git a/src/pages/Evaluation/BidEnd/BidEndAdjust/index.tsx b/src/pages/Evaluation/BidEnd/BidEndAdjust/index.tsx index b1ad56f..0d3c781 100644 --- a/src/pages/Evaluation/BidEnd/BidEndAdjust/index.tsx +++ b/src/pages/Evaluation/BidEnd/BidEndAdjust/index.tsx @@ -3,7 +3,7 @@ import { Table, Button, Space, Form, Radio, Select, Input, InputNumber, Upload, import { TableListItem } from './data'; import ExtendUpload from "@/utils/ExtendUpload"; import '@/assets/ld_style.less'; -import {findArithmeticError, getList,getRoomType,savePrice} from './service'; +import { findArithmeticError, getList, getRoomType, savePrice } from './service'; import { getProMethod, getRoomId, getSessionRoleData, getSessionUserData } from '@/utils/session'; import ProTable from '@ant-design/pro-table'; @@ -15,36 +15,36 @@ const formItemLayout = { wrapperCol: { span: 14 }, }; -function wayValue(key:any){ +function wayValue(key: any) { let name = ""; //0-调整价 1-最终价格 - if(key==="0"){ + if (key === "0") { name = "调整价"; - }else if(key==="1"){ + } else if (key === "1") { name = "最终价格"; } return name; } -function typeValue(key:any){ +function typeValue(key: any) { let name = ""; //0-小微、1-缺项、2-单价和总价不一致、3-手动输入 - if(key===0){ + if (key === 0) { name = "小微"; - }else if(key===1){ + } else if (key === 1) { name = "缺项"; - }else if(key===2){ + } else if (key === 2) { name = "单价和总价不一致"; - }else if(key===3){ + } else if (key === 3) { name = "手动输入"; } return name; } const Index: React.FC<{}> = () => { - let roomId=getRoomId();//sessionStorage.getItem('roomId');//sessionStorage.getItem('roomId') + let roomId = getRoomId();//sessionStorage.getItem('roomId');//sessionStorage.getItem('roomId') var roleId = getSessionUserData().roleIds;//操作员角色 - const [dateList,setDateList] = useState([]); + const [dateList, setDateList] = useState([]); const [adjustForm] = Form.useForm(); const [whetherReadonly, setWhetherReadonly] = useState(false); const [editState, setEditState] = useState(false); @@ -54,116 +54,119 @@ const Index: React.FC<{}> = () => { const [spin, setSpin] = useState(true); //附件bid const [bid, setBid] = useState(''); - + var roleId = getSessionRoleData().roleCode; //采购方式 const proMethod = getProMethod(); let showNameT: any = { tbr: '', pb: '', tb: '' }//投标人供应商 if (proMethod === 'procurement_mode_1' || proMethod === 'procurement_mode_2') {//招标 - showNameT = { tbr: '投标人', pb: '评标', tb: '投标' }; + showNameT = { tbr: '投标人', pb: '评标', tb: '投标' }; } else { - showNameT = { tbr: '供应商', pb: '评审', tb: '应答' } + showNameT = { tbr: '供应商', pb: '评审', tb: '应答' } } const columns: any[] = [ // 列表数据 { title: `${showNameT.tbr}名称`, dataIndex: 'tendererName', key: 'tendererName' }, { title: '最新不含税总价', dataIndex: 'evaluatingContent', key: 'evaluatingContent' }, - { title: '调整类别', dataIndex: 'type', key: 'type' ,render: (text: any, record: any, index: any) => { - let a = ""; - if(record.tfileTendererprice!==null){ - a = typeValue(record.tfileTendererprice.type); - } - return a; + { + title: '调整类别', dataIndex: 'type', key: 'type', render: (text: any, record: any, index: any) => { + let a = ""; + if (record.tfileTendererprice !== null) { + a = typeValue(record.tfileTendererprice.type); + } + return a; } }, - { title: '调价说明', dataIndex: 'memo', key: 'memo',render: (text: any, record: any, index: any) => { - var memo = ""; - if(record.tfileTendererprice!==null){ - memo = record.tfileTendererprice.memo; + { + title: '调价说明', dataIndex: 'memo', key: 'memo', render: (text: any, record: any, index: any) => { + var memo = ""; + if (record.tfileTendererprice !== null) { + memo = record.tfileTendererprice.memo; + } + return memo; } - return memo; - } }, - { title: '调价附件', dataIndex: 'fileId', key: 'fileId' ,render: (text: any, record: any, index: any) => { - var dev = ""; - if(record.tfileTendererprice!==null){ - dev = + { + title: '调价附件', dataIndex: 'fileId', key: 'fileId', render: (text: any, record: any, index: any) => { + var dev = ""; + if (record.tfileTendererprice !== null) { + dev = + } + return dev; } - return dev; - } }, ]; useEffect(() => { getWarningList(); setSpin(false); - if(roleId!=="ebtp-expert"){ + if (roleId !== "ebtp-expert") { setEditState(false); setHaveData(false); } - },[]); + }, []); - const getWarningList = async() => { - setSaveButtonState(false); - let radioBoolean = false; - await findArithmeticError(roomId).then((res) => { - if (res.success ==true) { - if(res.data!==1){ - radioBoolean = false; - setIsRadio(false) - }else{ - radioBoolean = true; - } + const getWarningList = async () => { + setSaveButtonState(false); + let radioBoolean = false; + await findArithmeticError(roomId).then((res) => { + if (res.success == true) { + if (res.data !== 1) { + radioBoolean = false; + setIsRadio(false) + } else { + radioBoolean = true; } - }) + } + }) - await getList(roomId).then((res) => { - if (res.success ==true) { - var list = res.data; - for(var i = 0 ; i < list.length ; i++){ - list[i]["key"] = i; - } - setDateList(list); - setSelectChange(list); - if(list===null||list.length===0){// + await getList(roomId).then((res) => { + if (res.success == true) { + var list = res.data; + for (var i = 0; i < list.length; i++) { + list[i]["key"] = i; + } + setDateList(list); + setSelectChange(list); + if (list === null || list.length === 0) {// + setEditState(false); + setHaveData(false); + setIsRadio(false) + } else { + if (radioBoolean) { + setEditState(true); + setIsRadio(true) + } else { setEditState(false); - setHaveData(false); setIsRadio(false) - }else{ - if(radioBoolean){ - setEditState(true); - setIsRadio(true) - }else{ - setEditState(false); - setIsRadio(false) - } - } + } - }) + } + }) } const setSelectChange = async (list: any) => { const fieldsValue = await adjustForm.validateFields(); - if(fieldsValue!==null){ - - for(var i = 0 ; i < list.length ; i ++){ - var data = list[i]; - - if(data.id===fieldsValue.contentDataId){ + if (fieldsValue !== null) { + + for (var i = 0; i < list.length; i++) { + var data = list[i]; + + if (data.id === fieldsValue.contentDataId) { adjustForm.setFieldsValue({ - id:data.tfileTendererprice!==null - &&data.tfileTendererprice!==undefined?data.tfileTendererprice.id:null, - contentDataId:data.id, - way: data.tfileTendererprice!==null - &&data.tfileTendererprice!==undefined?parseInt(data.tfileTendererprice.way):1, - type: data.tfileTendererprice!==null - &&data.tfileTendererprice!==undefined?parseInt(data.tfileTendererprice.type):0, + id: data.tfileTendererprice !== null + && data.tfileTendererprice !== undefined ? data.tfileTendererprice.id : null, + contentDataId: data.id, + way: data.tfileTendererprice !== null + && data.tfileTendererprice !== undefined ? parseInt(data.tfileTendererprice.way) : 1, + type: data.tfileTendererprice !== null + && data.tfileTendererprice !== undefined ? parseInt(data.tfileTendererprice.type) : 0, price: data.evaluating, newPrice: '', - memo:data.tfileTendererprice!==null - &&data.tfileTendererprice!==undefined?data.tfileTendererprice.memo:null, - fileId:data.tfileTendererprice!==null - &&data.tfileTendererprice!==undefined?data.tfileTendererprice.fileId:null + memo: data.tfileTendererprice !== null + && data.tfileTendererprice !== undefined ? data.tfileTendererprice.memo : null, + fileId: data.tfileTendererprice !== null + && data.tfileTendererprice !== undefined ? data.tfileTendererprice.fileId : null }); } } @@ -174,27 +177,27 @@ const Index: React.FC<{}> = () => { setEditState(true); var data = direction[0]; //data.tfileTendererprice.id; - adjustForm.setFieldsValue({ - id:data.tfileTendererprice!==null - &&data.tfileTendererprice!==undefined?data.tfileTendererprice.id:null, - contentDataId:data.id, - way: data.tfileTendererprice!==null - &&data.tfileTendererprice!==undefined?parseInt(data.tfileTendererprice.way):1, - type: data.tfileTendererprice!==null - &&data.tfileTendererprice!==undefined?parseInt(data.tfileTendererprice.type):0, - price: data.evaluating, - newPrice: '', - memo:data.tfileTendererprice!==null - &&data.tfileTendererprice!==undefined?data.tfileTendererprice.memo:null, - fileId:data.tfileTendererprice!==null - &&data.tfileTendererprice!==undefined?data.tfileTendererprice.fileId:null - }); + adjustForm.setFieldsValue({ + id: data.tfileTendererprice !== null + && data.tfileTendererprice !== undefined ? data.tfileTendererprice.id : null, + contentDataId: data.id, + way: data.tfileTendererprice !== null + && data.tfileTendererprice !== undefined ? parseInt(data.tfileTendererprice.way) : 1, + type: data.tfileTendererprice !== null + && data.tfileTendererprice !== undefined ? parseInt(data.tfileTendererprice.type) : 0, + price: data.evaluating, + newPrice: '', + memo: data.tfileTendererprice !== null + && data.tfileTendererprice !== undefined ? data.tfileTendererprice.memo : null, + fileId: data.tfileTendererprice !== null + && data.tfileTendererprice !== undefined ? data.tfileTendererprice.fileId : null + }); + + setBid(data.tfileTendererprice !== null + && data.tfileTendererprice !== undefined + && data.tfileTendererprice.fileId !== null + ? data.tfileTendererprice.fileId : "-1"); - setBid(data.tfileTendererprice!==null - &&data.tfileTendererprice!==undefined - &&data.tfileTendererprice.fileId!==null - ?data.tfileTendererprice.fileId:"-1"); - } const formOnFinish = (data: any) => { @@ -208,23 +211,23 @@ const Index: React.FC<{}> = () => { } const saveUpdate = async () => { const fieldsValue = await adjustForm.validateFields(); - if(fieldsValue.contentDataId===null||fieldsValue.contentDataId===""||fieldsValue.contentDataId===undefined){ + if (fieldsValue.contentDataId === null || fieldsValue.contentDataId === "" || fieldsValue.contentDataId === undefined) { message.error(`请选择需要调整的供应商`); return; } var params = { - "id":fieldsValue.id, - "contentDataId":fieldsValue.contentDataId, - "newPrice":fieldsValue.newPrice, - "way":fieldsValue.way, - "type":fieldsValue.type, - "memo":fieldsValue.memo, - "fileId":fieldsValue.fileId + "id": fieldsValue.id, + "contentDataId": fieldsValue.contentDataId, + "newPrice": fieldsValue.newPrice, + "way": fieldsValue.way, + "type": fieldsValue.type, + "memo": fieldsValue.memo, + "fileId": fieldsValue.fileId } setSaveButtonState(true); //保存 savePrice(params).then((res) => { - if (res.success ==true) { + if (res.success == true) { message.success(`保存成功`); getWarningList();//刷新 } @@ -233,94 +236,94 @@ const Index: React.FC<{}> = () => { return ( <> -
- -
- {showNameT.tbr}最新报价列表 - {!haveData?(无报价数据):null} - - -
- - {isRadio? - :
} - - {editState? -
- 算数错误调整 -
:null - } - {editState? - - - - - - 最终价格 - 调整价 - - - - - - - - - - - - - -