integrated_traffic_vue/src/assets/js/data_dictionary.js

297 lines
8.5 KiB
JavaScript

import {
getLevelsByParentId,
getLevels,
getLevelsAndChildrenNumber,
getRegulatoryType,
getDepartmentTree,
getLevelsCorp,
getElectronicFenceTree,
getDepartmentzTree,
getTrainingType,
getIndustryType,
getPostType,
getTrainingLevel,
getLevelsByObject,
getLevelCustom,
} from "@/request/data_dictionary.js";
import { ref } from "vue";
// 监管类型
export const layoutFnGetRegulatoryType = async (params) => {
const resData = await getRegulatoryType(params);
return ref(JSON.parse(resData.varOList.zTreeNodes));
};
// 企业状态
export const layoutFnGetEnterpriseStatus = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "4d4862f9863b4b0da67f754c49e67ea3",
});
return ref(resData.list);
};
// 隶属关系
export const layoutFnGetSubordination = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "1a13f574d4c44cd2ac2034f8e3259f9b",
});
return ref(resData.list);
};
// 企业规模
export const layoutFnGetEnterpriseScale = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "37b045e160c04ddba851073b4e510cc9",
});
return ref(resData.list);
};
// 管控措施分类1
export const layoutFnGetControlMeasures1 = async () => {
const resData = await getLevelsByParentId({
parentId: "c61ff12d2e6e4040ad0dfd58d75275ae",
});
return ref(JSON.parse(resData.zTreeNodes));
};
// 管控措施分类2
export const layoutFnGetControlMeasures2 = async () => {
const resData = await getLevelsByParentId({
parentId: "1ca0ce441f8342cca57fd09079ad59b0",
});
return ref(JSON.parse(resData.zTreeNodes));
};
// 民族
export const layoutFnGetNation = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "0a0e406f27f74ee698fe9979d25f62dd",
});
return ref(resData.list);
};
// 性别
export const layoutFnGetSex = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "21501808bbc344d593fbf9ccfe6c4531",
});
return ref(resData.list);
};
// 政治面貌
export const layoutFnGetPoliticalLandscape = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "6351efdd12dc4730952e5d195718e252",
});
return ref(resData.list);
};
// 文化程度
export const layoutFnGetDegreeOfEducation = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "d7d80f08d73a4accbccf4fd3d8d1d867",
});
return ref(resData.list);
};
// 人员类型
// export const layoutFnGetPersonnelType = async () => {
// const resData = await getLevels({
// DICTIONARIES_ID: "0b62f92b0b624aab8e89a77304a64d5e",
// });
// return ref(resData.list);
// };
// 人员类型(交通版)
export const layoutFnGetPersonnelTypeTraffic = async (params) => {
const resData = await getLevelsByObject(params);
return ref(resData.list);
};
// 签字人员类型
export const layoutFnGetSignUserType = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "e0309e3085f04aa9b0e6a56e88ee8c2f",
});
return ref(resData.list);
};
// 清单类型
export const layoutFnGetInventoryType = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "4a3d0d99b0ea4e268c11dd0b18866917",
});
return ref(resData.list);
};
// 排查类型
export const layoutFnGetTroubleshootingType = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "dc92de8a375c4b638b1b9f8d374e6426",
});
return ref(resData.list);
};
// 隐患级别
export const layoutFnGetHazardLevel = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "5e7cf8620ba54ad89719d0be62133c7a",
});
return ref(resData.list);
};
// 隐患类别
export const layoutFnGetHazardCategories = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "ec1d6dcfd0f2438a88968feea542eab0",
});
return ref(resData.list);
};
// 各省隐患类型
export const layoutFnGetEveryProvinceHiddenDangerType = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "3babc15144444bdc8d763d0af2bdfff8",
});
return ref(resData.list);
};
// 排查周期
export const layoutFnGetTroubleshootingCycle = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "f60cf0e8315b4993b6d6049dd29f2ba5",
});
return ref(resData.list);
};
// 清单级别
export const layoutFnGetInventoryLevel = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "4a661fa8aedc4d158c9cddaa9d2ec47e",
});
return ref(resData.list);
};
// 任务类型
export const layoutFnGetTaskType = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "7a1afe8a5e594b6a9e0cef42bd00f352",
});
return ref(resData.list);
};
// 职务
export const layoutFnGetDuties = async () => {
const resData = await getLevelsCorp({
DICTIONARIES_ID: "09e36ac01e9540f8bc84eab1c1a78754",
});
return ref(resData.list);
};
// 职称
export const layoutFnGetProfessionalTitle = async () => {
const resData = await getLevelsCorp({
DICTIONARIES_ID: "945a6b10e59946078b500f0fbafa8679",
});
return ref(resData.list);
};
// 在职情况
export const layoutFnGetEmploymentSituation = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "548764b5d4bf4bd7a18ef88274ef49e4",
});
return ref(resData.list);
};
// 事故类型
export const layoutFnGetAccidentType = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "cee1190ea96a4ca9b7bca81e11f0d0f8",
});
return ref(resData.list);
};
// 风险分级
export const layoutFnGetRiskClassification = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "5a81e63ec0e94d919b3138bc01dbef6b",
});
return ref(resData.list);
};
// 排查项类型
export const layoutFnGetDrivingType = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "5ef3a19edcb2435f8db94487834bbae3",
});
return ref(resData.list);
};
// 部门树
export const layoutFnGetDepartmentTree = async (params) => {
const resData = await getDepartmentTree(params);
return ref(JSON.parse(resData.zTreeNodes));
};
// 部门树2
export const layoutFnGetDepartmentzTree = async (params) => {
const resData = await getDepartmentzTree(params);
return ref(JSON.parse(resData.zTreeNodes));
};
// 电子围栏树
export const layoutFnGetElectronicFenceTree = async (params) => {
const resData = await getElectronicFenceTree(params);
return ref(JSON.parse(resData.zTreeNodes));
};
// 无法确定DICTIONARIES_ID的数据字典
export const layoutFnGetLevels = async (DICTIONARIES_ID) => {
const resData = await getLevels({ DICTIONARIES_ID });
return ref(resData.list);
};
// 无法确定DICTIONARIES_ID的数据字典包括子级数量
export const layoutFnGetLevelsAndChildrenNumber = async (DICTIONARIES_ID) => {
const resData = await getLevelsAndChildrenNumber({ DICTIONARIES_ID });
return ref(resData.list);
};
// 年检周期
export const layoutFnGetAnnualInspectionCycle = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "8b7dea3977fd4360a3cc8112368b90ff",
});
return ref(resData.list);
};
// 保险公司
export const layoutFnGetInsuranceCompany = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "660812ce620f433a815b129d65f26101",
});
return ref(resData.list);
};
// 培训类型
export const layoutFnGetTrainingType = async (params) => {
const resData = await getTrainingType(params);
return ref(resData.varList);
};
// 行业类型
export const layoutFnGetIndustryType = async (params) => {
const resData = await getIndustryType(params);
return ref(resData.zTreeNodes);
};
// 岗位类型
export const layoutFnGetPostType = async (params) => {
const resData = await getPostType(params);
return ref(resData.varList);
};
// 培训级别
export const layoutFnGetTrainingLevel = async (params) => {
const resData = await getTrainingLevel(params);
return ref(resData.varList);
};
// 试题标签
export const layoutFnGetTestQuestionLabels = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "a60ebc858e2c46108bf82bbd8acc8f50",
});
return ref(resData.list);
};
// 准驾车型
export const layoutFnGetDrivingModel = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "b41e247057334789b60bdf3fe6d8d6ba",
});
return ref(resData.list);
};
// 国籍
export const layoutFnGetNationality = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "3b614b43e8814f51a3492f2fdbc9a415",
});
return ref(resData.list);
};
// 从业资格类别
export const layoutFnGetQualificationCertificateCategory = async () => {
const resData = await getLevelCustom({
DICTIONARIES_ID: "ed38fa5f78c64e6d906d2bad0d72bd63",
LEVEL: 3,
});
return ref(resData.list);
};