fix
parent
cb9137eab3
commit
6605938618
|
|
@ -10,9 +10,9 @@ module.exports = {
|
|||
javaGitBranch: "dev",
|
||||
// 本地联调 safetyEval-service(context-path: /safetyEval,默认端口 8095)
|
||||
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095
|
||||
// API_HOST: "https://gbs-gateway.qhdsafety.com",
|
||||
API_HOST: "https://gbs-gateway.qhdsafety.com",
|
||||
|
||||
API_HOST: "http://192.168.0.134",
|
||||
// API_HOST: "http://192.168.0.134",
|
||||
//API_HOST: "http://192.168.0.150", //太浅
|
||||
// API_HOST: "http://192.168.0.152",
|
||||
//API_HOST: "http://192.168.0.103", //huwei
|
||||
|
|
|
|||
|
|
@ -16,14 +16,7 @@ function includesSeniorTitle(titleName = "") {
|
|||
return titleName === "SENIOR";
|
||||
}
|
||||
|
||||
function includesMidTitle(titleName = "") {
|
||||
return titleName === "MIDDLE" || titleName === "SENIOR";
|
||||
}
|
||||
|
||||
function isRegisterEngineer(record = {}) {
|
||||
const flag = record.registerEngineerFlag;
|
||||
return flag === 1 || flag === true || flag === "1";
|
||||
}
|
||||
|
||||
export function verifyFilingPrerequisites(detail = {}) {
|
||||
const items = [];
|
||||
|
|
@ -47,21 +40,17 @@ export function verifyFilingPrerequisites(detail = {}) {
|
|||
const personnel = detail.personnelList || [];
|
||||
|
||||
const total = personnel.length;
|
||||
const regEngineerCount = personnel.filter(isRegisterEngineer).length;
|
||||
const midTitleCount = personnel.filter((p) =>
|
||||
includesMidTitle(p.titleName),
|
||||
).length;
|
||||
const seniorTitleCount = personnel.filter((p) =>
|
||||
includesSeniorTitle(p.titleName),
|
||||
).length;
|
||||
|
||||
const businessScopeCount = Array.isArray(detail.businessScope) ? detail.businessScope.length : 0;
|
||||
const minPersonnel = 25 + Math.max(businessScopeCount - 1, 0) * 5;
|
||||
|
||||
items.push({
|
||||
key: "personnelStructure",
|
||||
label: "人员数量与结构",
|
||||
desc: "专职技术人员≥25人",
|
||||
desc: `专职技术人员≥${minPersonnel}人`,
|
||||
passed:
|
||||
SKIP_PERSONNEL_VERIFY ||
|
||||
total >= 25 ,
|
||||
total >= minPersonnel,
|
||||
});
|
||||
|
||||
const twoYearsAgo = new Date();
|
||||
|
|
@ -79,7 +68,7 @@ export function verifyFilingPrerequisites(detail = {}) {
|
|||
})
|
||||
.map((p) => p.userName || p.personName || "");
|
||||
|
||||
const personnelExpPassed = total >= 25 && ratio(withExperience, total) >= 1;
|
||||
const personnelExpPassed = ratio(withExperience, total) >= 1;
|
||||
items.push({
|
||||
key: "personnelExp",
|
||||
label: "人员资历",
|
||||
|
|
|
|||
|
|
@ -18,7 +18,11 @@ import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
|||
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
||||
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
|
||||
import { NS_SAFETY_EVAL_BUSINESS } from "~/enumerate/namespace";
|
||||
import { PROGRESS_STATUS_MAP, NODE_LABELS } from "~/enumerate/constant";
|
||||
import {
|
||||
PROGRESS_STATUS_MAP,
|
||||
NODE_LABELS,
|
||||
EVAL_TYPE_MAP,
|
||||
} from "~/enumerate/constant";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { tools } from "@cqsjjb/jjb-common-lib";
|
||||
import "./index.less";
|
||||
|
|
@ -87,17 +91,24 @@ const ProjectProgress = (props) => {
|
|||
};
|
||||
|
||||
const renderProgressDots = (nodes) => {
|
||||
if (!nodes || nodes.length === 0) return <span className="pp-progress-empty">暂无进度</span>;
|
||||
if (!nodes || nodes.length === 0)
|
||||
return <span className="pp-progress-empty">暂无进度</span>;
|
||||
const total = nodes.length;
|
||||
const done = nodes.filter((n) => n.state === 1).length;
|
||||
return (
|
||||
<div>
|
||||
<div className="pp-progress-dots">
|
||||
{nodes.map((node, idx) => {
|
||||
const dotClass = node.state === 1 ? "pp-progress-dot-done" : "pp-progress-dot-wait";
|
||||
const dotClass =
|
||||
node.state === 1
|
||||
? "pp-progress-dot-done"
|
||||
: "pp-progress-dot-wait";
|
||||
const name = NODE_LABELS[node.type] || node.type;
|
||||
return (
|
||||
<Tooltip key={node.type || idx} title={`${name}: ${node.state === 1 ? "已完成" : "未完成"}`}>
|
||||
<Tooltip
|
||||
key={node.type || idx}
|
||||
title={`${name}: ${node.state === 1 ? "已完成" : "未完成"}`}
|
||||
>
|
||||
<span className={`pp-progress-dot ${dotClass}`} />
|
||||
</Tooltip>
|
||||
);
|
||||
|
|
@ -122,8 +133,20 @@ const ProjectProgress = (props) => {
|
|||
</div>
|
||||
),
|
||||
},
|
||||
{ title: "评价类别", dataIndex: "evalTypeName", width: 110 },
|
||||
{ title: "负责人", dataIndex: "projectLeaderName", width: 100, ellipsis: true },
|
||||
{
|
||||
title: "评价类别",
|
||||
dataIndex: "evalTypeCode",
|
||||
width: 110,
|
||||
render: (_, record) => {
|
||||
return EVAL_TYPE_MAP[record.evalTypeCode];
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "负责人",
|
||||
dataIndex: "projectLeaderName",
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "项目进度",
|
||||
width: 240,
|
||||
|
|
@ -142,8 +165,15 @@ const ProjectProgress = (props) => {
|
|||
: `超期${Math.abs(record.remainingDays)}天`;
|
||||
return (
|
||||
<div>
|
||||
<div>{cfg ? <Tag color={cfg.color}>{cfg.text}-{daysText}</Tag> : <Tag>{code}</Tag>}</div>
|
||||
|
||||
<div>
|
||||
{cfg ? (
|
||||
<Tag color={cfg.color}>
|
||||
{cfg.text}-{daysText}
|
||||
</Tag>
|
||||
) : (
|
||||
<Tag>{code}</Tag>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
|
|
@ -162,14 +192,15 @@ const ProjectProgress = (props) => {
|
|||
|
||||
return (
|
||||
<PageLayout title="项目进度管理">
|
||||
|
||||
<Row gutter={16} className="pp-stat-row">
|
||||
<Col span={6}>
|
||||
<Card size="small">
|
||||
<Statistic
|
||||
title="项目总数"
|
||||
value={statData.totalCount ?? "-"}
|
||||
suffix={<span className="pp-stat-suffix">当前机构名下评价项目</span>}
|
||||
suffix={
|
||||
<span className="pp-stat-suffix">当前机构名下评价项目</span>
|
||||
}
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
|
|
@ -179,7 +210,9 @@ const ProjectProgress = (props) => {
|
|||
title="正常项目"
|
||||
value={statData.normalCount ?? "-"}
|
||||
valueStyle={{ color: "#52c41a" }}
|
||||
suffix={<span className="pp-stat-suffix">距项目结束日期超过3天</span>}
|
||||
suffix={
|
||||
<span className="pp-stat-suffix">距项目结束日期超过3天</span>
|
||||
}
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
|
|
@ -189,7 +222,9 @@ const ProjectProgress = (props) => {
|
|||
title="项目临期"
|
||||
value={statData.nearExpiryCount ?? "-"}
|
||||
valueStyle={{ color: "#faad14" }}
|
||||
suffix={<span className="pp-stat-suffix">项目结束前3天自动提醒</span>}
|
||||
suffix={
|
||||
<span className="pp-stat-suffix">项目结束前3天自动提醒</span>
|
||||
}
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
|
|
@ -199,14 +234,14 @@ const ProjectProgress = (props) => {
|
|||
title="项目延期"
|
||||
value={statData.delayedCount ?? "-"}
|
||||
valueStyle={{ color: "#ff4d4f" }}
|
||||
suffix={<span className="pp-stat-suffix">已超过项目结束日期</span>}
|
||||
suffix={
|
||||
<span className="pp-stat-suffix">已超过项目结束日期</span>
|
||||
}
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
|
||||
|
||||
<SearchForm
|
||||
form={searchForm}
|
||||
loading={false}
|
||||
|
|
@ -236,8 +271,6 @@ const ProjectProgress = (props) => {
|
|||
onReset={handleReset}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<Table
|
||||
rowKey="id"
|
||||
columns={columns}
|
||||
|
|
@ -265,27 +298,54 @@ const ProjectProgress = (props) => {
|
|||
>
|
||||
{currentRecord && (
|
||||
<>
|
||||
<Descriptions column={2} bordered size="small" className="pp-detail-desc">
|
||||
<Descriptions.Item label="项目编号">{currentRecord.projectNo}</Descriptions.Item>
|
||||
<Descriptions.Item label="项目名称">{currentRecord.projectName}</Descriptions.Item>
|
||||
<Descriptions.Item label="客户名称">{currentRecord.customerName}</Descriptions.Item>
|
||||
<Descriptions.Item label="客户负责人">{currentRecord.customerContactName}</Descriptions.Item>
|
||||
<Descriptions.Item label="评价类型">{currentRecord.evalTypeName}</Descriptions.Item>
|
||||
<Descriptions.Item label="项目负责人">{currentRecord.projectLeaderName}</Descriptions.Item>
|
||||
<Descriptions.Item label="项目结束日期">{currentRecord.planEndDate}</Descriptions.Item>
|
||||
<Descriptions
|
||||
column={2}
|
||||
bordered
|
||||
size="small"
|
||||
className="pp-detail-desc"
|
||||
>
|
||||
<Descriptions.Item label="项目编号">
|
||||
{currentRecord.projectNo}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="项目名称">
|
||||
{currentRecord.projectName}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="客户名称">
|
||||
{currentRecord.customerName}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="客户负责人">
|
||||
{currentRecord.customerContactName}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="评价类型">
|
||||
{currentRecord.evalTypeName}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="项目负责人">
|
||||
{currentRecord.projectLeaderName}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="项目结束日期">
|
||||
{currentRecord.planEndDate}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="剩余天数">
|
||||
<span
|
||||
className={`pp-remaining-days ${
|
||||
currentRecord.remainingDays < 0 ? "pp-remaining-danger" :
|
||||
currentRecord.remainingDays <= 3 ? "pp-remaining-warn" :
|
||||
"pp-remaining-normal"
|
||||
currentRecord.remainingDays < 0
|
||||
? "pp-remaining-danger"
|
||||
: currentRecord.remainingDays <= 3
|
||||
? "pp-remaining-warn"
|
||||
: "pp-remaining-normal"
|
||||
}`}
|
||||
>
|
||||
{currentRecord.remainingDays >= 0 ? `${currentRecord.remainingDays}天` : `已超期${Math.abs(currentRecord.remainingDays)}天`}
|
||||
{currentRecord.remainingDays >= 0
|
||||
? `${currentRecord.remainingDays}天`
|
||||
: `已超期${Math.abs(currentRecord.remainingDays)}天`}
|
||||
</span>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="项目状态" span={2}>
|
||||
<Tag color={PROGRESS_STATUS_MAP[currentRecord.progressStatusCode]?.color}>
|
||||
<Tag
|
||||
color={
|
||||
PROGRESS_STATUS_MAP[currentRecord.progressStatusCode]?.color
|
||||
}
|
||||
>
|
||||
{currentRecord.progressStatusName}
|
||||
</Tag>
|
||||
</Descriptions.Item>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import {
|
|||
import dayjs from "dayjs";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { NS_SAFETY_EVAL_BUSINESS } from "~/enumerate/namespace";
|
||||
import {EVAL_TYPE_OPTIONS} from '~/enumerate/constant';
|
||||
import { QUALIFICATION_INDUSTRY_OPTIONS } from "~/enumerate/enterpriseOptions";
|
||||
import { tools } from "@cqsjjb/jjb-common-lib";
|
||||
import AttachmentUpload from "~/components/AttachmentUpload";
|
||||
|
|
@ -26,11 +27,7 @@ import AttachmentUpload from "~/components/AttachmentUpload";
|
|||
const { router } = tools;
|
||||
const { TextArea } = Input;
|
||||
|
||||
const EVAL_TYPE_OPTIONS = [
|
||||
{ label: "安全预评价", value: "PRE" },
|
||||
{ label: "安全验收评价", value: "ACCEPT" },
|
||||
{ label: "安全现状评价", value: "STATUS" },
|
||||
];
|
||||
|
||||
|
||||
const RiskAnalysisContent = ({ readOnly, ...props }) => {
|
||||
const [form] = Form.useForm();
|
||||
|
|
|
|||
Loading…
Reference in New Issue