9.26 偏离度提醒颜色错误
This commit is contained in:
@ -1,13 +1,13 @@
|
|||||||
import React, { useEffect,useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { Tabs,Collapse,Form, Input, Modal,Col,Row,Divider, Table, message, Button, Empty } from 'antd';
|
import { Tabs, Collapse, Form, Input, Modal, Col, Row, Divider, Table, message, Button, Empty } from 'antd';
|
||||||
import ProTable, { ProColumns } from "@ant-design/pro-table";
|
import ProTable, { ProColumns } from "@ant-design/pro-table";
|
||||||
import { deviatedAnalysisListToRR, deviatedAnalysisRRYes, getDeviatedAnalysisList, getList} from '../service';
|
import { deviatedAnalysisListToRR, deviatedAnalysisRRYes, getDeviatedAnalysisList, getList } from '../service';
|
||||||
import { getProMethod, getRoomId, getSessionRoleData, getSessionUserData } from '@/utils/session';
|
import { getProMethod, getRoomId, getSessionRoleData, getSessionUserData } from '@/utils/session';
|
||||||
|
|
||||||
interface ViewJuryScoringAnalysisFormModalProps {
|
interface ViewJuryScoringAnalysisFormModalProps {
|
||||||
modalVisible: boolean;
|
modalVisible: boolean;
|
||||||
values: any;
|
values: any;
|
||||||
onCancel:any;
|
onCancel: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -18,10 +18,10 @@ const ViewJuryScoringAnalysisFormModal: React.FC<ViewJuryScoringAnalysisFormModa
|
|||||||
const [juryYesVis, setJuryYesVisSet] = useState<boolean>(false);//专家确认页面
|
const [juryYesVis, setJuryYesVisSet] = useState<boolean>(false);//专家确认页面
|
||||||
const [juryTableShow, setJuryTableShow] = useState<boolean>(false);//
|
const [juryTableShow, setJuryTableShow] = useState<boolean>(false);//
|
||||||
var roleId = getSessionRoleData().roleCode;
|
var roleId = getSessionRoleData().roleCode;
|
||||||
let roomId=getRoomId();//sessionStorage.getItem('roomId');//sessionStorage.getItem('roomId')
|
let roomId = getRoomId();//sessionStorage.getItem('roomId');//sessionStorage.getItem('roomId')
|
||||||
|
|
||||||
var params={};
|
var params = {};
|
||||||
params["assessRoomId"]=roomId;
|
params["assessRoomId"] = roomId;
|
||||||
|
|
||||||
let name1 = "投标人";
|
let name1 = "投标人";
|
||||||
let proDict = getProMethod();
|
let proDict = getProMethod();
|
||||||
@ -33,65 +33,67 @@ const ViewJuryScoringAnalysisFormModal: React.FC<ViewJuryScoringAnalysisFormModa
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getWarningList();
|
getWarningList();
|
||||||
if(roleId==="ebtp-expert"){
|
if (roleId === "ebtp-expert") {
|
||||||
params["createBy"]= getSessionUserData().userId;
|
params["createBy"] = getSessionUserData().userId;
|
||||||
setJuryTableShow(false);
|
setJuryTableShow(false);
|
||||||
}else{
|
} else {
|
||||||
setJuryTableShow(true);
|
setJuryTableShow(true);
|
||||||
}
|
}
|
||||||
},[])
|
}, [])
|
||||||
|
|
||||||
function callback(list: any) {
|
function callback(list: any) {
|
||||||
//getSessionUserData.roleIds;
|
//getSessionUserData.roleIds;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function categoryValue(key:any){
|
function categoryValue(key: any) {
|
||||||
let name = "";
|
let name = "";
|
||||||
//0:报价;1:商务;2:技术;5:服务
|
//0:报价;1:商务;2:技术;5:服务
|
||||||
if(key==="0"){
|
if (key === "0") {
|
||||||
name = "报价";
|
name = "报价";
|
||||||
}else if(key==="1"){
|
} else if (key === "1") {
|
||||||
name = "商务";
|
name = "商务";
|
||||||
}else if(key==="2"){
|
} else if (key === "2") {
|
||||||
name = "技术";
|
name = "技术";
|
||||||
}else if(key==="5"){
|
} else if (key === "5") {
|
||||||
name = "服务";
|
name = "服务";
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
const juryColumns: ProColumns<any>[] = [
|
const juryColumns: ProColumns<any>[] = [
|
||||||
{ title: '序号',render: (text: any, record: any, index: any) => `${index + 1}`},
|
{ title: '序号', render: (text: any, record: any, index: any) => `${index + 1}` },
|
||||||
{ title: '专家名称', dataIndex:"memberName"},
|
{ title: '专家名称', dataIndex: "memberName" },
|
||||||
{ title: '确认时间',dataIndex:"updateDate"}
|
{ title: '确认时间', dataIndex: "updateDate" }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function setDatZjList(dataZjList:any,
|
function setDatZjList(dataZjList: any,
|
||||||
length:any,
|
length: any,
|
||||||
confirmList:any,
|
confirmList: any,
|
||||||
reviewTurnId: any,
|
reviewTurnId: any,
|
||||||
turnSort: any,
|
turnSort: any,
|
||||||
buttonStatus: undefined,
|
buttonStatus: undefined,
|
||||||
num:any){
|
num: any) {
|
||||||
const juryTitle: { title: any; dataIndex: string; key: string; children: never[]; }[] = [];
|
const juryTitle: { title: any; dataIndex: string; key: string; children: never[]; }[] = [];
|
||||||
dataZjList.map((item: any, index: any) => {
|
dataZjList.map((item: any, index: any) => {
|
||||||
const tbpldzt = {title:item.name,dataIndex:'title',key:'title',children:[]};
|
const tbpldzt = { title: item.name, dataIndex: 'title', key: 'title', children: [] };
|
||||||
|
|
||||||
item.categoryList.map((dfpld: any, index: any) => {
|
item.categoryList.map((dfpld: any, index: any) => {
|
||||||
let value = categoryValue(dfpld);
|
let value = categoryValue(dfpld);
|
||||||
tbpldzt.children.push({title:value,dataIndex:dfpld+item.userId,key:dfpld+item.userId,render: (text: any, record: any, index: any) => {
|
tbpldzt.children.push({
|
||||||
|
title: value, dataIndex: dfpld + item.userId, key: dfpld + item.userId, render: (text: any, record: any, index: any) => {
|
||||||
let a = "";
|
let a = "";
|
||||||
|
if (text > -10 && text < 10) {
|
||||||
if(text>-30&&text<30){
|
a = <p>{text}</p>
|
||||||
a = <p style={{color:'blue'}}>{text}</p>
|
} else if (text > -30 && text < 30) {
|
||||||
}else if(text>-50&&text<50){
|
a = <p style={{ color: 'blue' }}>{text}</p>
|
||||||
a = <p style={{color:'#ff9900'}}>{text}</p>
|
} else if (text > -50 && text < 50) {
|
||||||
}else if(text<=-50||text>=50){
|
a = <p style={{ color: '#ff9900' }}>{text}</p>
|
||||||
a = <p style={{color:'red'}}>{text}</p>
|
} else if (text <= -50 || text >= 50) {
|
||||||
}else{
|
a = <p style={{ color: 'red' }}>{text}</p>
|
||||||
|
} else {
|
||||||
a = text;
|
a = text;
|
||||||
}
|
}
|
||||||
return a;
|
return a;
|
||||||
@ -101,32 +103,34 @@ const ViewJuryScoringAnalysisFormModal: React.FC<ViewJuryScoringAnalysisFormModa
|
|||||||
juryTitle.push(tbpldzt);
|
juryTitle.push(tbpldzt);
|
||||||
})
|
})
|
||||||
const columns: ProColumns<any>[] = [
|
const columns: ProColumns<any>[] = [
|
||||||
{ title: name1, dataIndex: 'name', key:'name',className: 'column-money'},
|
{ title: name1, dataIndex: 'name', key: 'name', className: 'column-money' },
|
||||||
{ title: '打分偏离度(%)', children:juryTitle,className: 'column-money'
|
{
|
||||||
|
title: '打分偏离度(%)', children: juryTitle, className: 'column-money'
|
||||||
},
|
},
|
||||||
{ title: '操作',render: (text: any, record: any, index: any) => {
|
{
|
||||||
|
title: '操作', render: (text: any, record: any, index: any) => {
|
||||||
const obj = {
|
const obj = {
|
||||||
children: '',
|
children: '',
|
||||||
props: {},
|
props: {},
|
||||||
};
|
};
|
||||||
if(index===0){
|
if (index === 0) {
|
||||||
let a = "";
|
let a = "";
|
||||||
if(!buttonStatus){
|
if (!buttonStatus) {
|
||||||
a = <Button type="primary" onClick={async () => {warningToRR(roomId,reviewTurnId,turnSort)}}>发送专家确认</Button>
|
a = <Button type="primary" onClick={async () => { warningToRR(roomId, reviewTurnId, turnSort) }}>发送专家确认</Button>
|
||||||
}else if(buttonStatus){
|
} else if (buttonStatus) {
|
||||||
if(roleId==="ebtp-agency-project-manager"||roleId==="ebtp-purchase"){
|
if (roleId === "ebtp-agency-project-manager" || roleId === "ebtp-purchase") {
|
||||||
a = <Button type="primary" onClick={ () => {setJuryYesVisSet(true);selectJuryYes(num)}}>查看专家确认信息</Button>
|
a = <Button type="primary" onClick={() => { setJuryYesVisSet(true); selectJuryYes(num) }}>查看专家确认信息</Button>
|
||||||
}else if(roleId==="ebtp-expert"){
|
} else if (roleId === "ebtp-expert") {
|
||||||
if(confirmList[0].confirmStatus===0){
|
if (confirmList[0].confirmStatus === 0) {
|
||||||
a = <Button type="primary" onClick={ () => {deviatedRRYes(confirmList[0].id,1);}}>确认</Button>
|
a = <Button type="primary" onClick={() => { deviatedRRYes(confirmList[0].id, 1); }}>确认</Button>
|
||||||
}else{
|
} else {
|
||||||
a = "已确认";
|
a = "已确认";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.children=a;
|
obj.children = a;
|
||||||
obj.props.rowSpan = length;
|
obj.props.rowSpan = length;
|
||||||
}
|
}
|
||||||
return obj
|
return obj
|
||||||
@ -137,25 +141,25 @@ const ViewJuryScoringAnalysisFormModal: React.FC<ViewJuryScoringAnalysisFormModa
|
|||||||
//setJuryScoringAnalysisColumns(columns);
|
//setJuryScoringAnalysisColumns(columns);
|
||||||
}
|
}
|
||||||
|
|
||||||
const getWarningList = async() => {
|
const getWarningList = async () => {
|
||||||
await getDeviatedAnalysisList(params).then((res) => {
|
await getDeviatedAnalysisList(params).then((res) => {
|
||||||
if (res.success ==true) {
|
if (res.success == true) {
|
||||||
if(res.data!==null&&res.data.length>0){
|
if (res.data !== null && res.data.length > 0) {
|
||||||
|
|
||||||
var list = res.data;
|
var list = res.data;
|
||||||
for(var i = 0 ; i < list.length ; i++){
|
for (var i = 0; i < list.length; i++) {
|
||||||
//获取表头
|
//获取表头
|
||||||
var zList = list[i].supplierlist;
|
var zList = list[i].supplierlist;
|
||||||
var columnsZ = setDatZjList(list[i].title,
|
var columnsZ = setDatZjList(list[i].title,
|
||||||
zList.length,
|
zList.length,
|
||||||
list[i].confirmList,
|
list[i].confirmList,
|
||||||
list[i].reviewTurnId,
|
list[i].reviewTurnId,
|
||||||
list[i].turnSort,list[i].buttonStatus,i);
|
list[i].turnSort, list[i].buttonStatus, i);
|
||||||
list[i]["columns"]=columnsZ;
|
list[i]["columns"] = columnsZ;
|
||||||
list[i]["zjShow"] = true;
|
list[i]["zjShow"] = true;
|
||||||
if(roleId==="ebtp-expert"&&!list[i].buttonStatus){
|
if (roleId === "ebtp-expert" && !list[i].buttonStatus) {
|
||||||
list[i]["zjShow"] = false;
|
list[i]["zjShow"] = false;
|
||||||
}else if(roleId==="ebtp-expert"&&list[i].buttonStatus){
|
} else if (roleId === "ebtp-expert" && list[i].buttonStatus) {
|
||||||
setJuryTableShow(true);
|
setJuryTableShow(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -165,26 +169,26 @@ const ViewJuryScoringAnalysisFormModal: React.FC<ViewJuryScoringAnalysisFormModa
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const warningToRR = async(assessRoomId: any,reviewTurnId:any,reviewTurnSort:any) => {
|
const warningToRR = async (assessRoomId: any, reviewTurnId: any, reviewTurnSort: any) => {
|
||||||
await deviatedAnalysisListToRR(assessRoomId,reviewTurnId,reviewTurnSort).then((res) => {
|
await deviatedAnalysisListToRR(assessRoomId, reviewTurnId, reviewTurnSort).then((res) => {
|
||||||
if (res.success ==true) {
|
if (res.success == true) {
|
||||||
getWarningList();
|
getWarningList();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const deviatedRRYes = async(id: any,confirmStatus:any) => {
|
const deviatedRRYes = async (id: any, confirmStatus: any) => {
|
||||||
await deviatedAnalysisRRYes(id,confirmStatus).then((res) => {
|
await deviatedAnalysisRRYes(id, confirmStatus).then((res) => {
|
||||||
if (res.success ==true) {
|
if (res.success == true) {
|
||||||
getWarningList();
|
getWarningList();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectJuryYes = async(num: any) => {
|
const selectJuryYes = async (num: any) => {
|
||||||
await getDeviatedAnalysisList(params).then((res) => {
|
await getDeviatedAnalysisList(params).then((res) => {
|
||||||
if (res.success ==true) {
|
if (res.success == true) {
|
||||||
if(res.data!==null&&res.data.length>0){
|
if (res.data !== null && res.data.length > 0) {
|
||||||
var juryYesList = res.data[num].confirmList;
|
var juryYesList = res.data[num].confirmList;
|
||||||
setJuryYesList(juryYesList);
|
setJuryYesList(juryYesList);
|
||||||
}
|
}
|
||||||
@ -195,7 +199,7 @@ const ViewJuryScoringAnalysisFormModal: React.FC<ViewJuryScoringAnalysisFormModa
|
|||||||
const selectjuryYesButton = () => {//返回成员modal foot
|
const selectjuryYesButton = () => {//返回成员modal foot
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Button type="primary" onClick={()=>setJuryYesVisSet(false)}>确定</Button>
|
<Button type="primary" onClick={() => setJuryYesVisSet(false)}>确定</Button>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -211,7 +215,7 @@ const ViewJuryScoringAnalysisFormModal: React.FC<ViewJuryScoringAnalysisFormModa
|
|||||||
centered
|
centered
|
||||||
bodyStyle={{ overflowY: 'auto' }}
|
bodyStyle={{ overflowY: 'auto' }}
|
||||||
visible={juryYesVis}
|
visible={juryYesVis}
|
||||||
onCancel={()=>setJuryYesVisSet(false)}
|
onCancel={() => setJuryYesVisSet(false)}
|
||||||
footer={selectjuryYesButton()}
|
footer={selectjuryYesButton()}
|
||||||
>
|
>
|
||||||
<Table
|
<Table
|
||||||
@ -233,11 +237,11 @@ const ViewJuryScoringAnalysisFormModal: React.FC<ViewJuryScoringAnalysisFormModa
|
|||||||
<Collapse.Panel header="专家打分偏离度分析" key="6">
|
<Collapse.Panel header="专家打分偏离度分析" key="6">
|
||||||
{juryScoringAnalysisList?.length == 0
|
{juryScoringAnalysisList?.length == 0
|
||||||
? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
|
? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
|
||||||
: (proDict == "procurement_mode_5" || proDict == "procurement_mode_6") ? juryScoringAnalysisList?.map((item: any, index: any)=>{
|
: (proDict == "procurement_mode_5" || proDict == "procurement_mode_6") ? juryScoringAnalysisList?.map((item: any, index: any) => {
|
||||||
if(item.zjShow){
|
if (item.zjShow) {
|
||||||
return (
|
return (
|
||||||
<Collapse onChange={callback(item)} >
|
<Collapse onChange={callback(item)} >
|
||||||
<Collapse.Panel header={item.turnName} key={"6"+index}>
|
<Collapse.Panel header={item.turnName} key={"6" + index}>
|
||||||
<p>{item.turnName}表格主要展示各专家对{name1}打分与所有专家对该{name1}打分平均值的差值百分比,无-表示该专家未参与此部分评分,该表信息仅供参考</p>
|
<p>{item.turnName}表格主要展示各专家对{name1}打分与所有专家对该{name1}打分平均值的差值百分比,无-表示该专家未参与此部分评分,该表信息仅供参考</p>
|
||||||
<Table
|
<Table
|
||||||
columns={item.columns}
|
columns={item.columns}
|
||||||
@ -264,7 +268,7 @@ const ViewJuryScoringAnalysisFormModal: React.FC<ViewJuryScoringAnalysisFormModa
|
|||||||
{selectjuryYes()}
|
{selectjuryYes()}
|
||||||
</Collapse.Panel>
|
</Collapse.Panel>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
:null}
|
: null}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user