风险点展示-评标现场异常情况
This commit is contained in:
@ -0,0 +1,158 @@
|
||||
import React, { useEffect,useState } from 'react';
|
||||
import { Tabs,Collapse,Form, Input, Modal,Col,Row,Divider, Table, Button, Empty ,message,Spin,Card,} from 'antd';
|
||||
import {saveUpdateEvalRoom} from '../service';
|
||||
import {} from '@/utils/CommonUtils'
|
||||
import ProTable, { ProColumns } from "@ant-design/pro-table";
|
||||
import { getProMethod, getRoomId, getSessionRoleData } from '@/utils/session';
|
||||
import ExtendUpload from "@/utils/ExtendUpload";
|
||||
|
||||
interface alarmDataObj {
|
||||
tilte:string;//标题
|
||||
id:string;//告警id
|
||||
reserveId:string;//预约id
|
||||
tpName:string;//项目名称
|
||||
tpNumber:string;//项目编号
|
||||
bsName:string;//标段名称
|
||||
placeName:string; //评标室名称
|
||||
startDate:string; //开始时间
|
||||
endDate:string; //结束时间
|
||||
status:string;//处理状态:0未处理;1已处理',
|
||||
roomStatus:string;//评标室状态 0-未开启 1-进行中 2-已结束
|
||||
pNumber:string;//人数信息
|
||||
remark:string;//处理说明
|
||||
attachment:string;//附件id
|
||||
}
|
||||
|
||||
interface ViewEvalAlarmUpdateModalProps {
|
||||
alarmData: alarmDataObj;
|
||||
detail:boolean;
|
||||
isLookType:boolean;
|
||||
onCancel:any;
|
||||
onOk:any;
|
||||
}
|
||||
|
||||
|
||||
const ViewEvalAlarmUpdateModal: React.FC<ViewEvalAlarmUpdateModalProps> = (props) => {
|
||||
|
||||
const {alarmData,detail,isLookType,onCancel,onOk}= props;
|
||||
|
||||
const { TextArea } = Input;//文本域
|
||||
const [orderSpin, orderSpinSet] = useState<boolean>(false);//订单页加载中
|
||||
const [uploadProps, setUploadProps] = useState<any>(false);
|
||||
const [form] = Form.useForm();
|
||||
var roleId = getSessionRoleData().roleCode;
|
||||
|
||||
useEffect(() => {
|
||||
setUploadProps(alarmData.status=="1"||isLookType);
|
||||
},[])
|
||||
|
||||
const saveUpdate = async () =>{
|
||||
orderSpinSet(true);
|
||||
form.validateFields().then(res => {
|
||||
console.log( form.getFieldValue("remark"));
|
||||
const fromData = {
|
||||
id: alarmData.id,
|
||||
remark: form.getFieldValue("remark"),
|
||||
attachment: form.getFieldValue("attachment"),
|
||||
};
|
||||
|
||||
console.log(fromData);
|
||||
saveUpdateEvalRoom(fromData).then((res) => {
|
||||
if (res.success == true) {
|
||||
onOk();
|
||||
} else {
|
||||
message.error('系统异常:获取告警数据失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
orderSpinSet(false);
|
||||
|
||||
}
|
||||
|
||||
//0-未开启 1-进行中 2-已结束
|
||||
function getStautsValue(key:any){
|
||||
let val = "";
|
||||
//setUploadProps(false);
|
||||
if(key=="0"){
|
||||
val = "未开启"
|
||||
}else if(key=="1"){
|
||||
val = "正在评标"
|
||||
//setUploadProps(true);
|
||||
}else if(key=="2"){
|
||||
val = "已结束"
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
return (
|
||||
<>(
|
||||
<Modal
|
||||
visible={detail}
|
||||
width={"1000px"}
|
||||
centered
|
||||
title={"异常信息:"+alarmData.tilte}//+alarmData.tilte
|
||||
onCancel={() => { onCancel(); }}
|
||||
onOk={() => {onOk();}}
|
||||
bodyStyle={{ maxHeight: "500px", overflow: "auto", zIndex: 1 }}
|
||||
footer={[
|
||||
<Button key="back" onClick={() => {
|
||||
onCancel();
|
||||
}}>取消</Button>,
|
||||
<Button
|
||||
key="submit"
|
||||
type="primary"
|
||||
onClick={() => saveUpdate()}
|
||||
loading={orderSpin}
|
||||
hidden={isLookType}
|
||||
>提交</Button>
|
||||
]}
|
||||
>
|
||||
<Spin spinning={orderSpin}>
|
||||
<Card>
|
||||
<Form labelCol={{ span: 8 }} wrapperCol={{ span: 16 }} form={form}>
|
||||
<Row>
|
||||
<Col span={12}><Form.Item label="项目名称">{alarmData.tpName}</Form.Item></Col>
|
||||
<Col span={12}><Form.Item label="项目编号">{alarmData.tpNumber}</Form.Item></Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col span={12}><Form.Item label="标段名称">{alarmData.bsName}</Form.Item></Col>
|
||||
<Col span={12}><Form.Item label="评标室名称">{alarmData.placeName}</Form.Item></Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col span={12}><Form.Item label="评标开始时间">{alarmData.startDate}</Form.Item></Col>
|
||||
<Col span={12}><Form.Item label="评标结束时间">{alarmData.endDate}</Form.Item></Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col span={12}><Form.Item label="评标状态">{getStautsValue(alarmData.roomStatus)}</Form.Item></Col>
|
||||
<Col span={12}></Col>
|
||||
</Row>
|
||||
<Row hidden={alarmData.pNumber==null||alarmData.pNumber==""}>
|
||||
<Col span={2}></Col>
|
||||
<Col span={16}>{(alarmData.pNumber)}</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col span={12}><Form.Item label="告警详情"><a>详情</a></Form.Item></Col>
|
||||
<Col span={12}></Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col span={12}><Form.Item label="处理说明" name="remark">{isLookType?alarmData.remark:
|
||||
<TextArea rows={4} style={{ resize: 'vertical' }} placeholder="请填写备注" value={alarmData.remark} />}</Form.Item></Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col span={12}><Form.Item label="附件" name="attachment">
|
||||
<ExtendUpload bid={alarmData.attachment} uploadProps={{ disabled: uploadProps }}>
|
||||
</ExtendUpload>
|
||||
</Form.Item></Col>
|
||||
<Col span={12}></Col>
|
||||
</Row>
|
||||
</Form>
|
||||
</Card>
|
||||
|
||||
</Spin>
|
||||
</Modal>
|
||||
)
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default ViewEvalAlarmUpdateModal;
|
@ -0,0 +1,232 @@
|
||||
import React, { useEffect,useState } from 'react';
|
||||
import { Tabs,Collapse,Form, Input, Modal,Col,Row,Divider, Table, Button, Empty ,message} from 'antd';
|
||||
import { getEvalRoomByAssessId, getEvalRoomPage, saveUpdateEvalRoom} from '../service';
|
||||
import {} from '@/utils/CommonUtils'
|
||||
import ProTable, { ProColumns } from "@ant-design/pro-table";
|
||||
import { getProMethod, getRoomId, getSessionRoleData } from '@/utils/session';
|
||||
import ViewEvalAlarmUpdateModal from './ViewEvalAlarmUpdateModal';
|
||||
|
||||
interface ViewEvalFormModalProps {
|
||||
modalVisible: boolean;
|
||||
values: any;
|
||||
onCancel:any;
|
||||
}
|
||||
interface alarmData {
|
||||
tilte:string;//标题
|
||||
id:string;//告警id
|
||||
reserveId:string;//预约id
|
||||
tpName:string;//项目名称
|
||||
tpNumber:string;//项目编号
|
||||
bsName:string;//标段名称
|
||||
placeName:string; //评标室名称
|
||||
startDate:string; //开始时间
|
||||
endDate:string; //结束时间
|
||||
status:string;//处理状态:0未处理;1已处理',
|
||||
roomStatus:string;//评标室状态 0-未开启 1-进行中 2-已结束
|
||||
pNumber:string;//人数信息
|
||||
remark:string;//处理说明
|
||||
attachment:string;//附件id
|
||||
}
|
||||
|
||||
const ViewEvalFormModal: React.FC<ViewEvalFormModalProps> = (props) => {
|
||||
|
||||
const alarm:alarmData ={
|
||||
tilte: "测试",
|
||||
id: '',
|
||||
reserveId: '',
|
||||
tpName: '',
|
||||
tpNumber: '',
|
||||
bsName: '',
|
||||
placeName: '',
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
status: '',
|
||||
roomStatus: '',
|
||||
pNumber: '',
|
||||
remark: '',
|
||||
attachment: ''
|
||||
}
|
||||
|
||||
const [alarmData, setAlarmData] = useState<alarmData>(alarm);
|
||||
const [alarmList, setAlarmList] = useState([]);
|
||||
const [juryTableShow, setJuryTableShow] = useState<boolean>(true);//
|
||||
const [alarmNumber, setAlarmNumber] = useState<any>({});
|
||||
const [evalAlarmUpdateDetail, setEvalAlarmUpdateDetail] = useState<boolean>(false);
|
||||
const [isLookType, setIsLookType] = useState<boolean>(false);
|
||||
var roleId = getSessionRoleData().roleCode;
|
||||
let roomId=getRoomId();//getRoomId();//sessionStorage.getItem('roomId');//sessionStorage.getItem('roomId')
|
||||
|
||||
useEffect(() => {
|
||||
// if(roleId==="ebtp-expert"){
|
||||
// setJuryTableShow(false);
|
||||
// }
|
||||
setAlarmNumber("0");
|
||||
getReserveIdFunction();
|
||||
},[])
|
||||
|
||||
const columns: any[] =[
|
||||
{ title: '序号', dataIndex: 'num', width: 60, render: (text: any, record: any, index: any) => `${index + 1}` },
|
||||
{
|
||||
title: '告警设备类型',
|
||||
dataIndex: 'deviceType',
|
||||
render: (_: any, record: any) => {
|
||||
let a;
|
||||
if (record.deviceType === "door") {
|
||||
a = "门禁点";
|
||||
}else if(record.deviceType === "camera"){
|
||||
a = "监控点";
|
||||
}else if(record.deviceType === "nvr"){
|
||||
a = "nvr";
|
||||
}else if(record.deviceType === "encodeDevice"){
|
||||
a = "编码设备";
|
||||
}else if(record.deviceType === "oneMachine"){
|
||||
a = "一体机";
|
||||
}
|
||||
return a;
|
||||
}
|
||||
}, {
|
||||
title: '告警设备编号',
|
||||
dataIndex: 'deviceCode',
|
||||
}, {
|
||||
title: '告警信息',
|
||||
dataIndex: 'type',
|
||||
render: (_: any, record: any) => {
|
||||
|
||||
return getTypeValue(record.type);
|
||||
}
|
||||
}, {
|
||||
title: '处理状态',
|
||||
dataIndex: 'status',
|
||||
render: (_: any, record: any) => {
|
||||
let a;
|
||||
if (record.status === "0") {
|
||||
a = <p style={{color:'red'}}>{"未处理"}</p>;
|
||||
}else if(record.status === "1"){
|
||||
a = "已处理";
|
||||
}
|
||||
return a;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'operation',
|
||||
render: (_: any, record: any) => {
|
||||
return <>
|
||||
|
||||
{record.status === "0"?<a key="1" onClick={() => toUpdate(record)} >
|
||||
去处理
|
||||
</a>:<a key="1" onClick={() => toLook(record)} >
|
||||
查看
|
||||
</a>}
|
||||
</>
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
function getTypeValue(key:any){
|
||||
let val = "";
|
||||
if (key === "2") {
|
||||
val = "人员数量异常";
|
||||
}else if(key === "3"){
|
||||
val = "陌生人告警";
|
||||
}else{
|
||||
val = key;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
const getDate = (record: any) => {
|
||||
alarm.tilte=getTypeValue(record.type);
|
||||
alarm.tpName=record.projectName;
|
||||
alarm.tpNumber=record.projectNum;
|
||||
alarm.bsName=record.sectionName;
|
||||
alarm.id=record.id;
|
||||
alarm.reserveId=record.reserveId;
|
||||
alarm.placeName=record.areaName;
|
||||
alarm.startDate=record.startDate;
|
||||
alarm.endDate=record.endDate;
|
||||
alarm.pNumber=record.pnumber;
|
||||
alarm.status=record.status;
|
||||
alarm.remark=record.remark;
|
||||
alarm.attachment=record.attachment;
|
||||
|
||||
setAlarmData(alarm);
|
||||
}
|
||||
|
||||
const toUpdate = (record: any) => { // 去处理
|
||||
setIsLookType(false);
|
||||
getDate(record);
|
||||
setEvalAlarmUpdateDetail(true)
|
||||
}
|
||||
|
||||
const toLook = (record: any) => { // 去处理
|
||||
setIsLookType(true);
|
||||
getDate(record);
|
||||
setEvalAlarmUpdateDetail(true)
|
||||
}
|
||||
|
||||
|
||||
|
||||
const getReserveIdFunction = async () => {
|
||||
await getEvalRoomByAssessId(roomId).then((res) => {
|
||||
if (res.success == true) {
|
||||
getEvalRoomPageFunction(res.data);
|
||||
} else {
|
||||
message.error('获取评标室预约id失败:显示测试数据-uat专用')
|
||||
getEvalRoomPageFunction("1523557937760681984");
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const getEvalRoomPageFunction = async (reserveId:any) => {
|
||||
var params={};
|
||||
params["reserveId"]= reserveId;
|
||||
params["types"]= [2,3];
|
||||
params["pageNo"]=1;
|
||||
params["pageSize"]=999;
|
||||
await getEvalRoomPage(params).then((res) => {
|
||||
if (res.success == true) {
|
||||
//setAlarmNumber(res.data.length);
|
||||
setAlarmList(res.data.records);
|
||||
} else {
|
||||
message.error('系统异常:获取告警数据失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function callback(key: any) {
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{juryTableShow?
|
||||
<Collapse onChange={callback}>
|
||||
<Collapse.Panel header={"评标现场异常情况"} key="2">
|
||||
<Table
|
||||
columns={columns}
|
||||
dataSource={alarmList}
|
||||
//pagination={false}//分页
|
||||
>
|
||||
</Table>
|
||||
</Collapse.Panel>
|
||||
</Collapse>:null}
|
||||
|
||||
{evalAlarmUpdateDetail ? (
|
||||
<ViewEvalAlarmUpdateModal
|
||||
alarmData={alarmData}
|
||||
detail={evalAlarmUpdateDetail}
|
||||
isLookType={isLookType}
|
||||
onCancel={() => setEvalAlarmUpdateDetail(false)}
|
||||
onOk={() => {
|
||||
getReserveIdFunction();
|
||||
setEvalAlarmUpdateDetail(false);
|
||||
}}
|
||||
>
|
||||
</ViewEvalAlarmUpdateModal>
|
||||
) : null
|
||||
}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default ViewEvalFormModal;
|
@ -7,7 +7,7 @@ import ViewJuryScoringRemindFormModal from './components/ViewJuryScoringRemindFo
|
||||
import ViewJuryScoringAnalysisFormModal from './components/ViewJuryScoringAnalysisFormModal';
|
||||
import ViewRiskSupplierModal from './components/ViewRiskSupplierModal';
|
||||
import BidDocSmartCheckFormModal from './components/BidDocSmartCheckFormModal';
|
||||
|
||||
import ViewEvalFormModal from './components/ViewEvalFormModal';
|
||||
|
||||
const Sing: React.FC<{}> = () => {
|
||||
//ip mac
|
||||
@ -48,6 +48,11 @@ const Sing: React.FC<{}> = () => {
|
||||
const [BidDocSmartCheckFormVisible, setBidDocSmartCheckFormVisible] = useState<any>(false);
|
||||
//查看详情窗口record
|
||||
const [BidDocSmartCheckValues, setBidDocSmartCheckValues] = useState<any>({});
|
||||
|
||||
//投标文件智能审查
|
||||
const [ViewEvalFormVisible, setViewEvalFormVisible] = useState<any>(false);
|
||||
//查看详情窗口record
|
||||
const [ViewEvalCheckValues, setViewEvalCheckValues] = useState<any>({});
|
||||
return (
|
||||
<>
|
||||
{
|
||||
@ -154,7 +159,20 @@ const Sing: React.FC<{}> = () => {
|
||||
>
|
||||
</ViewRiskSupplierModal>
|
||||
) : null
|
||||
}
|
||||
}
|
||||
{
|
||||
ViewEvalFormModal ? (
|
||||
<ViewEvalFormModal
|
||||
modalVisible={ViewEvalFormVisible}
|
||||
values={ViewEvalCheckValues}
|
||||
onCancel={() => {
|
||||
setViewEvalFormVisible(!ViewEvalFormVisible);
|
||||
setViewEvalCheckValues({});
|
||||
}}
|
||||
>
|
||||
</ViewEvalFormModal>
|
||||
) : null
|
||||
}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
@ -131,5 +131,24 @@ export async function getRiskSupplierList(projectId: any, assessRoomId: any) {
|
||||
});
|
||||
}
|
||||
|
||||
export async function getEvalRoomByAssessId(id: any) { // 评标室告警信息-查询评标室id
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/screen/getEvalRoomByAssessId/?assessId='+`${id}`, {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export async function getEvalRoomPage(params: any) { // 评标室告警信息-查询告警
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/alarm/getRiskPointPage', {
|
||||
method: 'post',
|
||||
data: {...params}
|
||||
});
|
||||
}
|
||||
|
||||
export async function saveUpdateEvalRoom(params: any) { // 评标室告警信息-处理告警
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/alarm/update/status', {
|
||||
method: 'post',
|
||||
data: {...params}
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user