safety-eval-service-frontend/src/enumerate/constant/index.js

381 lines
10 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/**
* 全局常量定义
*/
/** 证书状态 */
export const CERT_STATUS_MAP = {
normal: { label: "正常", color: "success" },
expiring: { label: "即将到期", color: "warning" },
expired: { label: "已过期", color: "error" },
};
/** 核验状态 */
export const VERIFY_STATUS_MAP = {
pending: { label: "待确认", color: "warning" },
passed: { label: "确认通过", color: "success" },
rejected: { label: "打回", color: "error" },
};
/** 审核状态 */
export const REVIEW_STATUS_MAP = {
1: { label: "已审核", color: "success" },
2: { label: "审核中", color: "processing" },
3: { label: "打回", color: "error" },
};
/** 专家核验状态 */
export const EXPERT_STATUS_MAP = {
pending: { label: "待核验", color: "blue" },
arranging: { label: "待安排", color: "warning" },
passed: { label: "已核验", color: "success" },
};
/** 公示状态 */
export const PUBLICITY_STATUS_MAP = {
pending: { label: "待公示", color: "warning" },
published: { label: "已公示", color: "success" },
};
/** 备案状态(通用,含变更审核中、暂存) */
export const FILING_STATUS_MAP = {
1: { label: "已备案", color: "success" },
2: { label: "审核中", color: "processing" },
3: { label: "已打回", color: "error" },
4: { label: "变更审核中", color: "processing" },
5: { label: "暂存", color: "default" },
};
export const FILING_STATUS_MAP_CHANGE = {
1: { label: "已备案", color: "success" },
3: { label: "已打回", color: "error" },
4: { label: "变更审核中", color: "processing" },
};
/** 变更状态 */
export const CHANGE_STATUS_MAP = {
stuck: { label: "停滞中", color: "error" },
pending: { label: "待审核", color: "warning" },
approved: { label: "已审核", color: "success" },
};
/** 资质保持监控状态 */
export const QUAL_MONITOR_STATUS_MAP = {
normal: { label: "正常", color: "success" },
person_rate: { label: "人员比例预警", color: "warning" },
};
/** 资质现场核查状态 */
export const ON_SITE_REVIEW_STATUS_MAP = {
AGENCY_PENDING_CONFIRMATION: { label: "机构待确认", color: "processing" },
AGENCY_CONFIRMED: { label: "机构已确认", color: "blue" },
REVIEW_PASSED: { label: "核查通过", color: "success" },
REVIEW_FAILED: { label: "核查不通过", color: "error" },
};
/** 性别 */
export const GENDER_OPTIONS = [
{ label: "男", value: 1 },
{ label: "女", value: 2 },
];
/** 性别编码(1男2女) → 名称 */
export const GENDER_MAP = {
1: "男",
2: "女",
};
/** 审核结果 */
export const REVIEW_RESULT_OPTIONS = [
{ label: "通过", value: 1 },
{ label: "不通过", value: 3 },
];
/** 专家等级 */
export const EXPERT_LEVEL_MAP = {
1: "一级",
2: "二级",
3: "三级",
};
export const LEGAL_STATUS_STYLE = {
PASS: { icon: "✅", borderColor: "#059669", bg: "#f0fdf4" },
WARN: { icon: "⚠️", borderColor: "#d97706", bg: "#fffbeb" },
NOT_PASS: { icon: "❌", borderColor: "#dc2626", bg: "#fef2f2" },
};
/** 资质保持监控-条件检查项模板 */
export const QUAL_MONITOR_CONDITION_ITEMS = [
{ key: "legalPerson", label: "独立法人资格" },
{ key: "fixedAsset", label: "固定资产" },
{ key: "workplace", label: "工作场所" },
{ key: "equipment", label: "设施设备软件" },
{ key: "staffCount", label: "专职技术人员数量" },
{ key: "staffRatio", label: "人员比例" },
{ key: "leader", label: "负责人配备" },
{ key: "system", label: "制度与过程控制体系" },
{ key: "website", label: "承诺书/网站/报告查询" },
{ key: "credit", label: "三年重大违法失信记录" },
{ key: "area", label: "属地满足情况" },
];
/** 资质保持监控-预警状态筛选选项 */
export const QUAL_MONITOR_STATUS_OPTIONS = [
{ value: "normal", label: "正常" },
{ value: "person_rate", label: "人员比例预警" },
];
/** 证书类型选项 */
export const CERT_TYPE_OPTIONS = [
{ value: "registered_safety_engineer", label: "注册安全工程师" },
{ value: "evaluator", label: "评价师" },
];
/** 证书类型 value → label 映射 */
export const CERT_TYPE_MAP = {
registered_safety_engineer: "注册安全工程师",
evaluator: "评价师",
};
/** 风险预警中心 — 预警大类映射 */
export const RISK_TYPE_MAP = {
资质预警: { label: "资质预警", color: "error" },
项目预警: { label: "项目预警", color: "warning" },
};
/** 风险预警中心 — 处理阶段映射 */
export const STAGE_MAP = {
未处理: { label: "未处理", color: "error" },
已发机构: { label: "已发机构", color: "warning" },
待复核: { label: "待复核", color: "processing" },
已闭环: { label: "已闭环", color: "success" },
};
/** 风险预警中心 — 机构端状态映射 */
export const ORG_STATUS_MAP = {
未发送: { label: "未发送", color: "error" },
机构未读: { label: "机构未读", color: "warning" },
已提交材料: { label: "已提交材料", color: "processing" },
处理中: { label: "处理中", color: "processing" },
已提交说明: { label: "已提交说明", color: "processing" },
整改完成: { label: "整改完成", color: "success" },
};
/** 风险预警中心 — 预警子类选项 */
export const RISK_SUBTYPE_OPTIONS = [
{ label: "资质条件保持异常", value: "资质条件保持异常" },
{ label: "人员比例异常", value: "人员比例异常" },
{ label: "属地材料待核验", value: "属地材料待核验" },
{ label: "项目启动超期", value: "项目启动超期" },
{ label: "关键节点超期", value: "关键节点超期" },
{ label: "项目人员异常", value: "项目人员异常" },
{ label: "从业告知异常", value: "从业告知异常" },
{ label: "现场勘查异常", value: "现场勘查异常" },
{ label: "过程控制/归档异常", value: "过程控制/归档异常" },
];
export const district = [
{
code: "500101",
name: "万州区",
},
{
code: "500102",
name: "涪陵区",
},
{
code: "500103",
name: "渝中区",
},
{
code: "500104",
name: "大渡口区",
},
{
code: "500105",
name: "江北区",
},
{
code: "500106",
name: "沙坪坝区",
},
{
code: "500107",
name: "九龙坡区",
},
{
code: "500108",
name: "南岸区",
},
{
code: "500109",
name: "北碚区",
},
{
code: "500110",
name: "綦江区",
},
{
code: "500111",
name: "大足区",
},
{
code: "500112",
name: "渝北区",
},
{
code: "500113",
name: "巴南区",
},
{
code: "500114",
name: "黔江区",
},
{
code: "500115",
name: "长寿区",
},
{
code: "500116",
name: "江津区",
},
{
code: "500117",
name: "合川区",
},
{
code: "500118",
name: "永川区",
},
{
code: "500119",
name: "南川区",
},
{
code: "500120",
name: "璧山区",
},
{
code: "500151",
name: "铜梁区",
},
{
code: "500152",
name: "潼南区",
},
{
code: "500153",
name: "荣昌区",
},
{
code: "500154",
name: "开州区",
},
{
code: "500155",
name: "梁平区",
},
{
code: "500156",
name: "武隆区",
},
];
/** 企业状态1正常经营 2停产整改 3停业 4注销 */
export const ENTERPRISE_STATUS_OPTIONS = [
{ label: "正常经营", value: 1 },
{ label: "停产整改", value: 2 },
{ label: "停业", value: 3 },
{ label: "注销", value: 4 },
];
/** 企业规模LARGE 大型 MEDIUM 中型 SMALL 小型 MICRO 微型 */
export const ENTERPRISE_SCALE_OPTIONS = [
{ label: "大型", value: "LARGE" },
{ label: "中型", value: "MEDIUM" },
{ label: "小型", value: "SMALL" },
{ label: "微型", value: "MICRO" },
];
/** 评价类型选项 */
export const EVAL_TYPE_OPTIONS = [
{ label: "安全预评价", value: "PRE" },
{ label: "安全设施竣工验收评价", value: "ACCEPT" },
{ label: "安全现状评价", value: "STATUS" },
];
export const EVAL_TYPE_MAP = EVAL_TYPE_OPTIONS.reduce((acc, cur) => {
acc[cur.value] = cur.label;
return acc;
}, {});
/** 登记半径选项 */
export const CHECKIN_RADIUS_OPTIONS = [
{ label: "100 米", value: 100 },
{ label: "200 米", value: 200 },
{ label: "300 米", value: 300 },
{ label: "500 米", value: 500 },
];
/** 项目规则 — 资料类别枚举 */
export const MATERIAL_TYPE_OPTIONS = [
{ label: "现场踏勘资料", value: "SITE_SURVEY" },
{ label: "报告资料", value: "REPORT" },
{ label: "整改资料", value: "RECTIFICATION" },
{ label: "其他项目资料", value: "OTHER" },
];
export const MATERIAL_TYPE_MAP = MATERIAL_TYPE_OPTIONS.reduce((acc, cur) => {
acc[cur.value] = cur.label;
return acc;
}, {});
/** 风险预警 — 风险等级映射 */
export const RISK_LEVEL_MAP = {
HIGH: { color: "error", text: "高风险" },
MIDDLE: { color: "warning", text: "中风险" },
LOW: { color: "default", text: "低风险" },
};
/** 风险预警 — 处理状态映射 */
export const RISK_STATUS_MAP = {
UNHANDLED: { color: "error", text: "未处理" },
PROCESSING: { color: "warning", text: "处理中" },
};
/** 项目进度 — 进度状态映射 */
export const PROGRESS_STATUS_MAP = {
NORMAL: { color: "success", text: "正常" },
NEAR: { color: "warning", text: "项目临期" },
DELAY: { color: "error", text: "项目延期" },
};
/** 安评业务提醒 — 提醒等级映射 */
export const WARING_STATUS_MAP = {
first: { color: "success", text: "首次预警" },
second: { color: "warning", text: "二次提醒" },
urgent: { color: "error", text: "紧急预警" },
overdue: { color: "default", text: "已逾期" },
normal: { color: "default", text: "正常" },
};
/** 安评业务提醒 — 提醒等级筛选选项 */
export const WARING_STATUS_OPTIONS = [
{ label: "首次预警6个月", value: "first" },
{ label: "二次提醒3个月", value: "second" },
{ label: "紧急预警1个月", value: "urgent" },
{ label: "已逾期", value: "overdue" },
{ label: "正常", value: "normal" },
];
export const NODE_LABELS = {
RISK_ANALYSIS: "风险分析",
BUSINESS_CONTRACT: "商务合同",
PROJECT_GROUP: "项目组",
SITE_SURVEY: "现场勘查",
REPORT_PREPARATION: "报告编制",
INTERNAL_REVIEW: "内审",
TECHNICAL_REVIEW: "技术审核",
PROCESS_CONTROL: "过程控制",
};