You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

50 lines
1.7 KiB

import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import { find } from 'lodash';
import { Tag } from 'antd';
export const severityData = [
{ value: 1, label: '导致很多人死亡' },
{ value: 2, label: '一人死亡,或多人重伤' },
{ value: 3, label: '一人重伤,或多人轻伤' },
{ value: 4, label: '一人轻伤,或较大经济损失' },
{ value: 5, label: '无人受伤,有一般经济损失' },
];
export const frequencyData = [
{ value: 1, label: '基本不可能' },
{ value: 2, label: '不太可能' },
{ value: 3, label: '有可能' },
{ value: 4, label: '非常可能' },
{ value: 5, label: '必然发生' },
];
export function getGrade(sid, fid) {
const gradeMatrix = [
[2, 3, 3, 4, 4],
[2, 2, 3, 3, 4],
[1, 2, 2, 3, 3],
[1, 1, 2, 2, 3],
[1, 1, 1, 2, 2],
];
return gradeMatrix[sid - 1][fid - 1];
}
export const riskGrade = {
1: _jsx(Tag, Object.assign({ color: "#0095e2" }, { children: "\u84DD" })),
2: _jsx(Tag, Object.assign({ color: "#ffff00" }, { children: "\u9EC4" })),
3: _jsx(Tag, Object.assign({ color: "#f8b551" }, { children: "\u6A59" })),
4: _jsx(Tag, Object.assign({ color: "#ff0000" }, { children: "\u7EA2" })),
};
export const riskStatus = {
1: '已管控',
2: '未管控',
};
export const hiddenTroubleGrade = [
{ value: 1, label: '一般隐患' },
{ value: 3, label: '重大隐患' },
];
export function getHiddenTroubleGrade(value) {
var _a;
return (_a = find(hiddenTroubleGrade, ['value', value])) === null || _a === void 0 ? void 0 : _a.label;
}
export const hiddenDangerStatus = {
1: '未整改',
2: '已整改',
};