| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- // 问题来源
- export enum Source {
- ai = 1,
- manual = 2,
- }
- export const sourceNameMap = {
- [Source.ai]: 'AI检测',
- [Source.manual]: '人工上报',
- };
- // 问题来源下拉框选项
- export const sourceOptions = [
- { label: sourceNameMap[Source.ai], value: Source.ai },
- { label: sourceNameMap[Source.manual], value: Source.manual },
- ];
- // 表格数据-转换value为label
- export const getNameBySource = (source: Source) => {
- return sourceNameMap[source] || '-';
- };
- // 问题生效状态
- export const hideStateOptions = [
- { label: '已生效', value: false },
- { label: '未生效', value: true },
- ];
- // 问题状态
- export enum IssueState {
- toAuth0 = 0,
- toAuth1 = 1,
- toAuth2 = 2, // 待审核
- hasRevoke = 3, // 已撤销
- toDeal4 = 4, // 待处理
- toDeal6 = 6,
- toReview = 5, // 待复核
- hasDone7 = 7,
- hasDone8 = 8, // 已处理
- }
- export const issueStateNameMap = {
- [IssueState.toAuth0]: '待审核',
- [IssueState.toAuth1]: '待审核',
- [IssueState.toAuth2]: '待审核',
- [IssueState.hasRevoke]: '已撤销',
- [IssueState.toDeal4]: '待处理',
- [IssueState.toDeal6]: '待处理',
- [IssueState.toReview]: '待复核',
- [IssueState.hasDone7]: '已处理',
- [IssueState.hasDone8]: '已处理',
- };
- // 问题状态下拉框选项(默认数据——待审核(012) 待处理(46) 待复核(5) 已处理(78) 已撤销(3))
- export const issueStateOptions = [
- { label: issueStateNameMap[IssueState.toAuth0], value: '[0, 1, 2]' },
- { label: issueStateNameMap[IssueState.toDeal4], value: '[4, 6]' },
- { label: issueStateNameMap[IssueState.toReview], value: '[5]' },
- { label: issueStateNameMap[IssueState.hasDone7], value: '[7,8]' },
- { label: issueStateNameMap[IssueState.hasRevoke], value: '[3]' },
- ];
- export const issueStateOptionsAdd = [
- { label: issueStateNameMap[IssueState.toAuth2], value: IssueState.toAuth2 },
- { label: issueStateNameMap[IssueState.toDeal4], value: IssueState.toDeal4 },
- { label: issueStateNameMap[IssueState.toReview], value: IssueState.toReview },
- { label: issueStateNameMap[IssueState.hasDone8], value: IssueState.hasDone8 },
- ];
- // 表格数据-转换value为label
- export const getNameByState = (issueState: IssueState) => {
- return issueStateNameMap[issueState] || '-';
- };
- // 中建材 —— 待处理(0123456),已处理(78)
- export enum IssueStateZJC {
- toDeal0 = 0,
- toDeal1 = 1,
- toDeal2 = 2,
- toDeal3 = 3,
- toDeal4 = 4,
- toDeal5 = 5,
- toDeal6 = 6,
- hasDone7 = 7,
- hasDone8 = 8,
- }
- export const issueStateNameMapZJC = {
- [IssueStateZJC.toDeal0]: '待处理',
- [IssueStateZJC.toDeal1]: '待处理',
- [IssueStateZJC.toDeal2]: '待处理',
- [IssueStateZJC.toDeal3]: '待处理',
- [IssueStateZJC.toDeal4]: '待处理',
- [IssueStateZJC.toDeal5]: '待处理',
- [IssueStateZJC.toDeal6]: '待处理',
- [IssueStateZJC.hasDone7]: '已处理',
- [IssueStateZJC.hasDone8]: '已处理',
- };
- export const issueStateOptionsZJC = [
- { label: issueStateNameMapZJC[IssueStateZJC.toDeal0], value: '[0, 1, 2, 3, 4, 5, 6]' },
- { label: issueStateNameMapZJC[IssueStateZJC.hasDone7], value: '[7, 8]' },
- ];
- export const getNameByStateZJC = (issueState: IssueStateZJC) => {
- return issueStateNameMapZJC[issueState] || '-';
- };
- // 问题四大类
- export enum QUESTION_TYPE_MAIN {
- fromHuman = 1, //人的不安全行为
- fromThing = 2, //物的不安全状态
- fromEnvir = 3, //环境的不安全因素
- fromManage = 4, //管理措施的不规范
- }
- export const questionMainTypeNameMap = {
- [QUESTION_TYPE_MAIN.fromHuman]: '人的不安全行为',
- [QUESTION_TYPE_MAIN.fromThing]: '物的不安全状态',
- [QUESTION_TYPE_MAIN.fromEnvir]: '环境的不安全因素',
- [QUESTION_TYPE_MAIN.fromManage]: '管理措施的不规范',
- };
|