forked from integrated_whb/integrated_whb_vue
init
parent
11d8a5f2e6
commit
9169935d67
|
@ -2505,4 +2505,257 @@ export default [
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/equipment_facility_management",
|
||||||
|
redirect: "/equipment_facility_management/device_management",
|
||||||
|
meta: { title: "设备设施管理", model: MODEL["5"] },
|
||||||
|
component: "children",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "/equipment_facility_management/device_management",
|
||||||
|
meta: { title: "设备管理", isSubMenu: false },
|
||||||
|
component: "children",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "",
|
||||||
|
component: "equipment_facility_management/device_management/index",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/equipment_facility_management/device_management/view",
|
||||||
|
meta: {
|
||||||
|
title: "查看",
|
||||||
|
activeMenu: "/equipment_facility_management/device_management",
|
||||||
|
},
|
||||||
|
component: "equipment_facility_management/device_management/view",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/equipment_facility_management/device_management/add",
|
||||||
|
meta: {
|
||||||
|
title: "新增",
|
||||||
|
activeMenu: "/equipment_facility_management/device_management",
|
||||||
|
},
|
||||||
|
component: "equipment_facility_management/device_management/add",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/equipment_facility_management/device_management/edit",
|
||||||
|
meta: {
|
||||||
|
title: "修改",
|
||||||
|
activeMenu: "/equipment_facility_management/device_management",
|
||||||
|
},
|
||||||
|
component: "equipment_facility_management/device_management/add",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/equipment_facility_management/safety_inspection",
|
||||||
|
meta: { title: "安全巡检", isSubMenu: false },
|
||||||
|
component: "children",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "",
|
||||||
|
component: "equipment_facility_management/safety_inspection/index",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/equipment_facility_management/safety_inspection/inspection_records",
|
||||||
|
meta: {
|
||||||
|
title: "巡检记录",
|
||||||
|
activeMenu: "/equipment_facility_management/safety_inspection",
|
||||||
|
},
|
||||||
|
component:
|
||||||
|
"equipment_facility_management/safety_inspection/inspection_records",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/equipment_facility_management/equipment_change_record",
|
||||||
|
meta: { title: "设备变更记录", isSubMenu: false },
|
||||||
|
component:
|
||||||
|
"equipment_facility_management/equipment_change_record/index",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/accident_management",
|
||||||
|
redirect: "/accident_management/accident_information",
|
||||||
|
meta: { title: "事故管理", model: MODEL["5"] },
|
||||||
|
component: "children",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "/accident_management/accident_information",
|
||||||
|
meta: { title: "事故信息", isSubMenu: false },
|
||||||
|
component: "children",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "",
|
||||||
|
component: "accident_management/accident_information/index",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/accident_management/accident_information/view",
|
||||||
|
meta: {
|
||||||
|
title: "查看",
|
||||||
|
activeMenu: "/accident_management/accident_information",
|
||||||
|
},
|
||||||
|
component: "accident_management/accident_information/view",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/accident_management/accident_information/add",
|
||||||
|
meta: {
|
||||||
|
title: "新增",
|
||||||
|
activeMenu: "/accident_management/accident_information",
|
||||||
|
},
|
||||||
|
component: "accident_management/accident_information/add",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/accident_management/accident_information/edit",
|
||||||
|
meta: {
|
||||||
|
title: "修改",
|
||||||
|
activeMenu: "/accident_management/accident_information",
|
||||||
|
},
|
||||||
|
component: "accident_management/accident_information/add",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/occupational_health_management",
|
||||||
|
redirect: "/occupational_health_management/enterprises_occupational_health",
|
||||||
|
meta: { title: "职业健康管理", model: MODEL["5"] },
|
||||||
|
component: "children",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "/occupational_health_management/enterprises_occupational_health",
|
||||||
|
meta: { title: "企业职业健康", isSubMenu: false },
|
||||||
|
component:
|
||||||
|
"occupational_health_management/enterprises_occupational_health/index",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/occupational_health_management/occupational_hazard_factors",
|
||||||
|
meta: { title: "职业病危害因素", isSubMenu: false },
|
||||||
|
component:
|
||||||
|
"occupational_health_management/occupational_hazard_factors/index",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/occupational_health_management/occupational_health_training",
|
||||||
|
meta: { title: "职业健康培训", isSubMenu: false },
|
||||||
|
component:
|
||||||
|
"occupational_health_management/occupational_health_training/index",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/occupational_health_management/occupational_health_records",
|
||||||
|
meta: { title: "职业卫生档案", isSubMenu: false },
|
||||||
|
component: "children",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "",
|
||||||
|
component:
|
||||||
|
"occupational_health_management/occupational_health_records/index",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/occupational_health_management/occupational_health_records/add",
|
||||||
|
meta: {
|
||||||
|
title: "新增",
|
||||||
|
activeMenu:
|
||||||
|
"/occupational_health_management/occupational_health_records",
|
||||||
|
},
|
||||||
|
component:
|
||||||
|
"occupational_health_management/occupational_health_records/add",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/occupational_health_management/occupational_health_records/edit",
|
||||||
|
meta: {
|
||||||
|
title: "修改",
|
||||||
|
activeMenu:
|
||||||
|
"/occupational_health_management/occupational_health_records",
|
||||||
|
},
|
||||||
|
component:
|
||||||
|
"occupational_health_management/occupational_health_records/add",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/stakeholder_management",
|
||||||
|
redirect: "/stakeholder_management/related_parties_management",
|
||||||
|
meta: { title: "相关方管理", model: MODEL["5"] },
|
||||||
|
component: "children",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "/stakeholder_management/related_parties_management",
|
||||||
|
meta: { title: "相关方单位管理", isSubMenu: false },
|
||||||
|
component: "children",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "",
|
||||||
|
component:
|
||||||
|
"stakeholder_management/related_parties_management/index",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/stakeholder_management/related_parties_management/add",
|
||||||
|
meta: {
|
||||||
|
title: "新增",
|
||||||
|
activeMenu: "/stakeholder_management/related_parties_management",
|
||||||
|
},
|
||||||
|
component: "stakeholder_management/related_parties_management/add",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/stakeholder_management/related_parties_management/edit",
|
||||||
|
meta: {
|
||||||
|
title: "修改",
|
||||||
|
activeMenu: "/stakeholder_management/related_parties_management",
|
||||||
|
},
|
||||||
|
component: "stakeholder_management/related_parties_management/add",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/stakeholder_management/outsourcing_project_management",
|
||||||
|
meta: { title: "外包工程管理", isSubMenu: false },
|
||||||
|
component: "children",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "",
|
||||||
|
component:
|
||||||
|
"stakeholder_management/outsourcing_project_management/index",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/special_operations",
|
||||||
|
redirect: "/special_operations/personnel_management",
|
||||||
|
meta: { title: "特种作业", model: MODEL["5"] },
|
||||||
|
component: "children",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "/special_operations/personnel_management",
|
||||||
|
meta: { title: "特种作业人员管理", isSubMenu: false },
|
||||||
|
component: "children",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "",
|
||||||
|
component: "special_operations/personnel_management/index",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/special_operations/personnel_management/add",
|
||||||
|
meta: {
|
||||||
|
title: "新增",
|
||||||
|
activeMenu: "/special_operations/personnel_management",
|
||||||
|
},
|
||||||
|
component: "special_operations/personnel_management/add",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/special_operations/personnel_management/edit",
|
||||||
|
meta: {
|
||||||
|
title: "修改",
|
||||||
|
activeMenu: "/special_operations/personnel_management",
|
||||||
|
},
|
||||||
|
component: "special_operations/personnel_management/add",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -224,6 +224,13 @@ export const layoutFnGetAccidentType = async () => {
|
||||||
});
|
});
|
||||||
return ref(resData.list);
|
return ref(resData.list);
|
||||||
};
|
};
|
||||||
|
// 事故级别
|
||||||
|
export const layoutFnGetAccidentLevel = async () => {
|
||||||
|
const resData = await getLevels({
|
||||||
|
DICTIONARIES_ID: "9a77f67eff4c49b19454bf3e40e2ae57",
|
||||||
|
});
|
||||||
|
return ref(resData.list);
|
||||||
|
};
|
||||||
// 风险分级
|
// 风险分级
|
||||||
export const layoutFnGetRiskClassification = async () => {
|
export const layoutFnGetRiskClassification = async () => {
|
||||||
const resData = await getLevels({
|
const resData = await getLevels({
|
||||||
|
@ -350,6 +357,27 @@ export const layoutFnGetTeamLevel = async () => {
|
||||||
});
|
});
|
||||||
return ref(resData.list);
|
return ref(resData.list);
|
||||||
};
|
};
|
||||||
|
// 特种设备类型
|
||||||
|
export const layoutFnGetSpecialEquipmentType = async () => {
|
||||||
|
const resData = await getLevels({
|
||||||
|
DICTIONARIES_ID: "cffb3d28d48548328ddd78976610b05d",
|
||||||
|
});
|
||||||
|
return ref(resData.list);
|
||||||
|
};
|
||||||
|
// 特种设备状态
|
||||||
|
export const layoutFnGetSpecialEquipmentState = async () => {
|
||||||
|
const resData = await getLevels({
|
||||||
|
DICTIONARIES_ID: "0feb448f975e422fafbf5db20c0b85c9",
|
||||||
|
});
|
||||||
|
return ref(resData.list);
|
||||||
|
};
|
||||||
|
// 巡检周期
|
||||||
|
export const layoutFnGetInspectionCycle = async () => {
|
||||||
|
const resData = await getLevels({
|
||||||
|
DICTIONARIES_ID: "3017f7f6f6794f23bf15d026a1e55426",
|
||||||
|
});
|
||||||
|
return ref(resData.list);
|
||||||
|
};
|
||||||
// 部门树
|
// 部门树
|
||||||
export const layoutFnGetDepartmentTree = async (params) => {
|
export const layoutFnGetDepartmentTree = async (params) => {
|
||||||
const resData = await getDepartmentTree(params);
|
const resData = await getDepartmentTree(params);
|
||||||
|
@ -372,7 +400,7 @@ export const layoutFnGetLevelsAndChildrenNumber = async (DICTIONARIES_ID) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// 相关方作业类别
|
// 相关方作业类别
|
||||||
export const layoutFnGetPersonnelmanagementJobType = async () => {
|
export const layoutFnGetPersonnelManagementJobType = async () => {
|
||||||
const resData = await getLevels({
|
const resData = await getLevels({
|
||||||
DICTIONARIES_ID: "a8bfd4554af54ee2b816f3007d8baea6",
|
DICTIONARIES_ID: "a8bfd4554af54ee2b816f3007d8baea6",
|
||||||
});
|
});
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
import { post } from "@/request/axios.js";
|
||||||
|
|
||||||
|
export const getAccidentInformationList = (params) =>
|
||||||
|
post("/accident/list", params); // 事故信息列表
|
||||||
|
export const getAccidentInformationView = (params) =>
|
||||||
|
post("/accident/goEdit", params); // 事故信息查看
|
||||||
|
export const setAccidentInformationDelete = (params) =>
|
||||||
|
post("/accident/delete", params); // 事故信息删除
|
||||||
|
export const setAccidentInformationDeleteMultiple = (params) =>
|
||||||
|
post("/accident/deleteAll", params); // 事故信息批量删除
|
||||||
|
export const setAccidentInformationAdd = (params) =>
|
||||||
|
post("/accident/add", params); // 事故信息新增
|
||||||
|
export const setAccidentInformationEdit = (params) =>
|
||||||
|
post("/accident/edit", params); // 事故信息编辑
|
|
@ -0,0 +1,28 @@
|
||||||
|
import { post, upload } from "@/request/axios.js";
|
||||||
|
|
||||||
|
export const getDeviceManagementList = (params) =>
|
||||||
|
post("/specialequipment/list", params); // 设备管理列表
|
||||||
|
export const getDeviceManagementView = (params) =>
|
||||||
|
post("/specialequipment/goEdit", params); // 设备管理查看
|
||||||
|
export const setDeviceManagementDelete = (params) =>
|
||||||
|
post("/specialequipment/delete", params); // 设备管理删除
|
||||||
|
export const setDeviceManagementDeleteMultiple = (params) =>
|
||||||
|
post("/specialequipment/deleteAll", params); // 设备管理删除多选
|
||||||
|
export const setDeviceManagementAdd = (params) =>
|
||||||
|
upload("/specialequipment/add", params); // 设备管理添加
|
||||||
|
export const setDeviceManagementEdit = (params) =>
|
||||||
|
upload("/specialequipment/edit", params); // 设备管理修改
|
||||||
|
export const getEquipmentManagerList = (params) =>
|
||||||
|
post("/user/listSelect", params); // 设备负责人列表
|
||||||
|
export const getSafetyInspectionList = (params) =>
|
||||||
|
post("/specialequipmentaqxj/list", params); // 安全巡检列表
|
||||||
|
export const getSafetyInspectionInspection = (params) =>
|
||||||
|
upload("/specialequipmentaqxj/add", params); // 安全巡检巡检
|
||||||
|
export const getSafetyInspectionInspectionRecordsList = (params) =>
|
||||||
|
post("/specialequipmentaqxj/listByEquipment", params); // 安全巡检巡检记录列表
|
||||||
|
export const getSafetyInspectionInspectionRecordsView = (params) =>
|
||||||
|
post("/specialequipmentaqxj/goEdit", params); // 安全巡检巡检记录查看
|
||||||
|
export const getEquipmentChangeRecordList = (params) =>
|
||||||
|
post("/specialequipmentchange/list", params); // 设备变更记录列表
|
||||||
|
export const getEquipmentChangeRecordView = (params) =>
|
||||||
|
post("/specialequipmentchange/goEdit", params); // 设备变更记录查看
|
|
@ -0,0 +1,50 @@
|
||||||
|
import { post } from "@/request/axios.js";
|
||||||
|
|
||||||
|
export const getEnterprisesOccupationalHealthList = (params) =>
|
||||||
|
post("/occupationalhealth/list", params); // 企业职业健康列表
|
||||||
|
export const getEnterprisesOccupationalHealthView = (params) =>
|
||||||
|
post("/occupationalhealth/goEdit", params); // 企业职业健康查看
|
||||||
|
export const setEnterprisesOccupationalHealthDelete = (params) =>
|
||||||
|
post("/occupationalhealth/delete", params); // 企业职业健康删除
|
||||||
|
export const setEnterprisesOccupationalHealthDeleteMultiple = (params) =>
|
||||||
|
post("/occupationalhealth/deleteAll", params); // 企业职业健康批量删除
|
||||||
|
export const setEnterprisesOccupationalHealthAdd = (params) =>
|
||||||
|
post("/occupationalhealth/add", params); // 企业职业健康新增
|
||||||
|
export const setEnterprisesOccupationalHealthEdit = (params) =>
|
||||||
|
post("/occupationalhealth/edit", params); // 企业职业健康编辑
|
||||||
|
export const getOccupationalHazardFactorsList = (params) =>
|
||||||
|
post("/occupationalhazard/list", params); // 职业病危害因素列表
|
||||||
|
export const getOccupationalHazardFactorsView = (params) =>
|
||||||
|
post("/occupationalhazard/goEdit", params); // 职业病危害因素查看
|
||||||
|
export const setOccupationalHazardFactorsDelete = (params) =>
|
||||||
|
post("/occupationalhazard/delete", params); // 职业病危害因素删除
|
||||||
|
export const setOccupationalHazardFactorsDeleteMultiple = (params) =>
|
||||||
|
post("/occupationalhazard/deleteAll", params); // 职业病危害因素批量删除
|
||||||
|
export const setOccupationalHazardFactorsAdd = (params) =>
|
||||||
|
post("/occupationalhazard/add", params); // 职业病危害因素新增
|
||||||
|
export const setOccupationalHazardFactorsEdit = (params) =>
|
||||||
|
post("/occupationalhazard/edit", params); // 职业病危害因素编辑
|
||||||
|
export const getOccupationalHealthTrainingList = (params) =>
|
||||||
|
post("/healthtraining/list", params); // 职业健康培训列表
|
||||||
|
export const getOccupationalHealthTrainingView = (params) =>
|
||||||
|
post("/healthtraining/goEdit", params); // 职业健康培训查看
|
||||||
|
export const setOccupationalHealthTrainingDelete = (params) =>
|
||||||
|
post("/healthtraining/delete", params); // 职业健康培训删除
|
||||||
|
export const setOccupationalHealthTrainingDeleteMultiple = (params) =>
|
||||||
|
post("/healthtraining/deleteAll", params); // 职业健康培训批量删除
|
||||||
|
export const setOccupationalHealthTrainingAdd = (params) =>
|
||||||
|
post("/healthtraining/add", params); // 职业健康培训新增
|
||||||
|
export const setOccupationalHealthTrainingEdit = (params) =>
|
||||||
|
post("/healthtraining/edit", params); // 职业健康培训编辑
|
||||||
|
export const getOccupationalHealthRecordsList = (params) =>
|
||||||
|
post("/healthrecords/list", params); // 职业卫生档案列表
|
||||||
|
export const getOccupationalHealthRecordsView = (params) =>
|
||||||
|
post("/healthrecords/goEdit", params); // 职业卫生档案查看
|
||||||
|
export const setOccupationalHealthRecordsDelete = (params) =>
|
||||||
|
post("/healthrecords/delete", params); // 职业卫生档案删除
|
||||||
|
export const setOccupationalHealthRecordsDeleteMultiple = (params) =>
|
||||||
|
post("/healthrecords/deleteAll", params); // 职业卫生档案批量删除
|
||||||
|
export const setOccupationalHealthRecordsAdd = (params) =>
|
||||||
|
post("/healthrecords/add", params); // 职业卫生档案新增
|
||||||
|
export const setOccupationalHealthRecordsEdit = (params) =>
|
||||||
|
post("/healthrecords/edit", params); // 职业卫生档案编辑
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { post } from "@/request/axios.js";
|
||||||
|
|
||||||
|
export const getPersonnelManagementList = (params) =>
|
||||||
|
post("/personnelmanagement/list", params); // 特种作业人员管理列表
|
||||||
|
export const getPersonnelManagementView = (params) =>
|
||||||
|
post("/personnelmanagement/goEdit", params); // 特种作业人员管理查看
|
||||||
|
export const setPersonnelManagementDelete = (params) =>
|
||||||
|
post("/personnelmanagement/delete", params); // 特种作业人员管理删除
|
||||||
|
export const setPersonnelManagementDeleteBatch = (params) =>
|
||||||
|
post("/personnelmanagement/deleteAll", params); // 特种作业人员管理批量删除
|
||||||
|
export const setPersonnelManagementAdd = (params) =>
|
||||||
|
post("/personnelmanagement/add", params); // 特种作业人员管理批量添加
|
||||||
|
export const setPersonnelManagementEdit = (params) =>
|
||||||
|
post("/personnelmanagement/edit", params); // 特种作业人员管理批量修改
|
||||||
|
export const getVerifyDeduplicationCertificateNum = (params) =>
|
||||||
|
post("/personnelmanagement/hasCertificate", params); // 特种作业证书编号验证
|
|
@ -0,0 +1,24 @@
|
||||||
|
import { post, upload } from "@/request/axios.js";
|
||||||
|
|
||||||
|
export const getRelatedPartiesManagementList = (params) =>
|
||||||
|
post("/units/list", params); // 相关方单位管理列表
|
||||||
|
export const getRelatedPartiesManagementView = (params) =>
|
||||||
|
post("/units/goEdit", params); // 相关方单位管理查看
|
||||||
|
export const setRelatedPartiesManagementDelete = (params) =>
|
||||||
|
post("/units/delete", params); // 相关方单位管理删除
|
||||||
|
export const setRelatedPartiesManagementDeleteMultiple = (params) =>
|
||||||
|
post("/units/deleteAll", params); // 相关方单位管理批量删除
|
||||||
|
export const setRelatedPartiesManagementAdd = (params) =>
|
||||||
|
upload("/units/add", params); // 相关方单位管理新增
|
||||||
|
export const setRelatedPartiesManagementEdit = (params) =>
|
||||||
|
upload("/units/edit", params); // 相关方单位管理编辑
|
||||||
|
export const getVerifyDeduplicationUser = (params) =>
|
||||||
|
post("/units/hasName", params); // 相关方单位名称验证
|
||||||
|
export const getVerifyDeduplicationCode = (params) =>
|
||||||
|
post("/units/hasCode", params); // 统一社会信用代码验证
|
||||||
|
export const getOutsourcingProjectManagementList = (params) =>
|
||||||
|
post("/outsourced/list", params); // 外包工程管理列表
|
||||||
|
export const setOutsourcingProjectManagementDelete = (params) =>
|
||||||
|
post("/outsourced/delete", params); // 外包工程管理删除
|
||||||
|
export const setOutsourcingProjectManagementDeleteMultiple = (params) =>
|
||||||
|
post("/outsourced/deleteAll", params); // 外包工程管理批量删除
|
|
@ -160,22 +160,23 @@ const getPersonnelData = async () => {
|
||||||
const getAlarmTypeData = async () => {
|
const getAlarmTypeData = async () => {
|
||||||
const resData = await getAlarmTypeCount();
|
const resData = await getAlarmTypeCount();
|
||||||
const dataList = resData.data.data.data;
|
const dataList = resData.data.data.data;
|
||||||
// (1=滞留报警,2=串岗报警,3=超员报警,4=缺员报警,5=静止报警,6=一键报警,7=越界报警,8=聚集告警 )
|
const typeList = {
|
||||||
|
1: "滞留报警",
|
||||||
|
2: "串岗报警",
|
||||||
|
3: "超员报警",
|
||||||
|
4: "缺员报警",
|
||||||
|
5: "静止报警",
|
||||||
|
6: "一键报警",
|
||||||
|
7: "越界报警",
|
||||||
|
8: "聚集告警",
|
||||||
|
};
|
||||||
dataList.forEach((item) => {
|
dataList.forEach((item) => {
|
||||||
if (item.type === "1") item.label = "滞留报警";
|
item.label = typeList[item.type];
|
||||||
if (item.type === "2") item.label = "串岗报警";
|
|
||||||
if (item.type === "3") item.label = "超员报警";
|
|
||||||
if (item.type === "4") item.label = "缺员报警";
|
|
||||||
if (item.type === "5") item.label = "静止报警";
|
|
||||||
if (item.type === "6") item.label = "一键报警";
|
|
||||||
if (item.type === "7") item.label = "越界报警";
|
|
||||||
if (item.type === "8") item.label = "聚集告警";
|
|
||||||
});
|
});
|
||||||
data.block2OptionsList = dataList;
|
data.block2OptionsList = dataList;
|
||||||
};
|
};
|
||||||
const getPositionData = async () => {
|
const getPositionData = async () => {
|
||||||
const resData = await getPersonnelPositioningCount();
|
const resData = await getPersonnelPositioningCount();
|
||||||
console.log(resData.data.rows);
|
|
||||||
data.block3List = resData.data.rows;
|
data.block3List = resData.data.rows;
|
||||||
};
|
};
|
||||||
getPersonnelData();
|
getPersonnelData();
|
||||||
|
|
|
@ -0,0 +1,240 @@
|
||||||
|
<template>
|
||||||
|
<layout-card>
|
||||||
|
<el-form ref="formRef" :rules="rules" :model="form" label-width="110px">
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="事故编号" prop="ACCIDENT_NUM">
|
||||||
|
<el-input v-model="form.ACCIDENT_NUM" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="事故名称" prop="ACCIDENT_NAME">
|
||||||
|
<el-input v-model="form.ACCIDENT_NAME" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="事故单位" prop="ACCIDENT_DEPT">
|
||||||
|
<layout-department v-model="form.ACCIDENT_DEPT" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="事故涉及单位" prop="INVOLVING_DEPTS">
|
||||||
|
<layout-department
|
||||||
|
v-model="form.INVOLVING_DEPTS"
|
||||||
|
show-checkbox
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
root-disabled="Y"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="事故级别" prop="ACCIDENT_LEVEL">
|
||||||
|
<el-select v-model="form.ACCIDENT_LEVEL">
|
||||||
|
<el-option
|
||||||
|
v-for="item in accidentLevelList"
|
||||||
|
:key="item.BIANMA"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.BIANMA"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="事故类型" prop="ACCIDENT_TYPE">
|
||||||
|
<el-select v-model="form.ACCIDENT_TYPE" multiple>
|
||||||
|
<el-option
|
||||||
|
v-for="item in accidentTypeList"
|
||||||
|
:key="item.BIANMA"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.BIANMA"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="事故发生地点" prop="ACCIDENT_PLACE">
|
||||||
|
<el-input v-model="form.ACCIDENT_PLACE" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="事故发生时间" prop="ACCIDENT_TIME">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.ACCIDENT_TIME"
|
||||||
|
type="date"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="直接经济损失" prop="ECONOMIC_LOSSES">
|
||||||
|
<el-input v-model.number="form.ECONOMIC_LOSSES">
|
||||||
|
<template v-slot:append>元</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="受伤人数" prop="INJURED_NUM">
|
||||||
|
<el-input v-model.number="form.INJURED_NUM">
|
||||||
|
<template v-slot:append>人</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="死亡人数" prop="DEAD_NUM">
|
||||||
|
<el-input v-model.number="form.DEAD_NUM">
|
||||||
|
<template v-slot:append>人</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="重伤人数" prop="SERIOUSLY_INJURED_NUM">
|
||||||
|
<el-input v-model.number="form.SERIOUSLY_INJURED_NUM">
|
||||||
|
<template v-slot:append>人</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="起因物" prop="ACCIDENT_BECAUSE">
|
||||||
|
<el-input v-model="form.ACCIDENT_BECAUSE" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="是否被处罚" prop="IS_PUNISHMENT">
|
||||||
|
<el-select v-model="form.IS_PUNISHMENT">
|
||||||
|
<el-option :value="1" label="是" />
|
||||||
|
<el-option :value="0" label="否" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" v-if="form.IS_PUNISHMENT === 1">
|
||||||
|
<el-form-item label="处罚金额" prop="PUNISHMENT_AMOUNT">
|
||||||
|
<el-input v-model.number="form.PUNISHMENT_AMOUNT">
|
||||||
|
<template v-slot:append>元</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="直接原因" prop="IMMEDIATE_CAUSE">
|
||||||
|
<el-input v-model="form.IMMEDIATE_CAUSE" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="间接原因" prop="REMOTE_CAUSE">
|
||||||
|
<el-input v-model="form.REMOTE_CAUSE" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="事故概述" prop="ACCIDENT_DESCR">
|
||||||
|
<el-input
|
||||||
|
v-model="form.ACCIDENT_DESCR"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 3 }"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div class="mt-10 tc">
|
||||||
|
<el-button type="primary" @click="fnSubmit"> 提交 </el-button>
|
||||||
|
</div>
|
||||||
|
</layout-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import LayoutDepartment from "@/components/department/index.vue";
|
||||||
|
import {
|
||||||
|
layoutFnGetAccidentLevel,
|
||||||
|
layoutFnGetAccidentType,
|
||||||
|
} from "@/assets/js/data_dictionary.js";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { useRoute, useRouter } from "vue-router";
|
||||||
|
import {
|
||||||
|
getAccidentInformationView,
|
||||||
|
setAccidentInformationAdd,
|
||||||
|
setAccidentInformationEdit,
|
||||||
|
} from "@/request/accident_management.js";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
|
const { ACCIDENT_ID } = route.query;
|
||||||
|
const rules = {
|
||||||
|
ACCIDENT_DEPT: [
|
||||||
|
{ required: true, message: "事故单位不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
INVOLVING_DEPTS: [
|
||||||
|
{ required: true, message: "事故涉及单位不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
ACCIDENT_LEVEL: [
|
||||||
|
{ required: true, message: "事故级别不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
ACCIDENT_TYPE: [
|
||||||
|
{ required: true, message: "事故类型不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
ECONOMIC_LOSSES: [{ type: "number", message: "直接经济损失必须为数字" }],
|
||||||
|
INJURED_NUM: [{ type: "number", message: "受伤人数必须为数字" }],
|
||||||
|
DEAD_NUM: [{ type: "number", message: "死亡人数必须为数字" }],
|
||||||
|
SERIOUSLY_INJURED_NUM: [{ type: "number", message: "重伤人数必须为数字" }],
|
||||||
|
IS_PUNISHMENT: [
|
||||||
|
{ required: true, message: "是否被处罚不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
PUNISHMENT_AMOUNT: [
|
||||||
|
{ required: true, message: "处罚金额不能为空", trigger: "change" },
|
||||||
|
{ type: "number", message: "处罚金额必须为数字" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const form = ref({
|
||||||
|
ACCIDENT_NUM: "",
|
||||||
|
ACCIDENT_NAME: "",
|
||||||
|
ACCIDENT_DEPT: "",
|
||||||
|
INVOLVING_DEPTS: [],
|
||||||
|
ACCIDENT_LEVEL: "",
|
||||||
|
ACCIDENT_TYPE: [],
|
||||||
|
ACCIDENT_PLACE: "",
|
||||||
|
ACCIDENT_TIME: "",
|
||||||
|
ECONOMIC_LOSSES: 0,
|
||||||
|
INJURED_NUM: 0,
|
||||||
|
DEAD_NUM: 0,
|
||||||
|
SERIOUSLY_INJURED_NUM: 0,
|
||||||
|
ACCIDENT_BECAUSE: "",
|
||||||
|
IS_PUNISHMENT: 0,
|
||||||
|
PUNISHMENT_AMOUNT: 0,
|
||||||
|
IMMEDIATE_CAUSE: "",
|
||||||
|
REMOTE_CAUSE: "",
|
||||||
|
ACCIDENT_DESCR: "",
|
||||||
|
});
|
||||||
|
const formRef = ref(null);
|
||||||
|
const fnGetData = async () => {
|
||||||
|
if (!ACCIDENT_ID) return;
|
||||||
|
const resData = await getAccidentInformationView({ ACCIDENT_ID });
|
||||||
|
form.value = resData.pd;
|
||||||
|
form.value.ACCIDENT_TYPE = resData.pd.ACCIDENT_TYPE.split(",");
|
||||||
|
form.value.INVOLVING_DEPTS = resData.pd.INVOLVING_DEPTS.split(",");
|
||||||
|
};
|
||||||
|
fnGetData();
|
||||||
|
const accidentLevelList = await layoutFnGetAccidentLevel();
|
||||||
|
const accidentTypeList = await layoutFnGetAccidentType();
|
||||||
|
const fnSubmit = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
await useFormValidate(formRef);
|
||||||
|
const params = {
|
||||||
|
...form.value,
|
||||||
|
ACCIDENT_TYPE: form.value.ACCIDENT_TYPE.join(","),
|
||||||
|
INVOLVING_DEPTS: form.value.INVOLVING_DEPTS.join(","),
|
||||||
|
};
|
||||||
|
!ACCIDENT_ID
|
||||||
|
? await setAccidentInformationAdd(params)
|
||||||
|
: await setAccidentInformationEdit(params);
|
||||||
|
ElMessage.success("提交成功");
|
||||||
|
router.back();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,210 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="80px"
|
||||||
|
@submit.prevent="fnResetPagination"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="5">
|
||||||
|
<el-form-item label="关键字" prop="KEYWORDS">
|
||||||
|
<el-input v-model="searchForm.KEYWORDS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="5">
|
||||||
|
<el-form-item label="事故级别" prop="ACCIDENT_LEVEL">
|
||||||
|
<el-select v-model="searchForm.ACCIDENT_LEVEL">
|
||||||
|
<el-option
|
||||||
|
v-for="item in accidentLevelList"
|
||||||
|
:key="item.BIANMA"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.BIANMA"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="5">
|
||||||
|
<el-form-item label="事故单位" prop="ACCIDENT_DEPT">
|
||||||
|
<layout-department v-model="searchForm.ACCIDENT_DEPT" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="5">
|
||||||
|
<el-form-item label="事故类型" prop="ACCIDENT_TYPE">
|
||||||
|
<el-select v-model="searchForm.ACCIDENT_TYPE">
|
||||||
|
<el-option
|
||||||
|
v-for="item in accidentTypeList"
|
||||||
|
:key="item.BIANMA"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.BIANMA"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPagination">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
ref="tableRef"
|
||||||
|
row-key="ACCIDENT_ID"
|
||||||
|
:data="list"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
@get-data="fnGetData"
|
||||||
|
>
|
||||||
|
<el-table-column reserve-selection type="selection" width="55" />
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="ACCIDENT_NAME"
|
||||||
|
label="事故名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="ACCIDENT_PLACE"
|
||||||
|
label="事故发生地点"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="ACCIDENT_TIME"
|
||||||
|
label="事故发生时间"
|
||||||
|
width="130"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="ACCIDENT_LEVEL_NAME"
|
||||||
|
label="事故级别"
|
||||||
|
width="100"
|
||||||
|
/>
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/accident_management/accident_information/view',
|
||||||
|
query: {
|
||||||
|
ACCIDENT_ID: row.ACCIDENT_ID,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.edit"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/accident_management/accident_information/edit',
|
||||||
|
query: {
|
||||||
|
ACCIDENT_ID: row.ACCIDENT_ID,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnDelete(row.ACCIDENT_ID)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template #button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.add"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/accident_management/accident_information/add',
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="danger"
|
||||||
|
@click="fnDeleteAll"
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||||
|
import {
|
||||||
|
layoutFnGetAccidentLevel,
|
||||||
|
layoutFnGetAccidentType,
|
||||||
|
} from "@/assets/js/data_dictionary.js";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import LayoutDepartment from "@/components/department/index.vue";
|
||||||
|
import {
|
||||||
|
getAccidentInformationList,
|
||||||
|
setAccidentInformationDelete,
|
||||||
|
setAccidentInformationDeleteMultiple,
|
||||||
|
} from "@/request/accident_management.js";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { list, pagination, searchForm, fnResetPagination, fnGetData, tableRef } =
|
||||||
|
useListData(getAccidentInformationList);
|
||||||
|
const accidentLevelList = await layoutFnGetAccidentLevel();
|
||||||
|
const accidentTypeList = await layoutFnGetAccidentType();
|
||||||
|
const buttonJurisdiction = await useButtonJurisdiction("accident");
|
||||||
|
const fnDelete = debounce(
|
||||||
|
1000,
|
||||||
|
async (ACCIDENT_ID) => {
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setAccidentInformationDelete({ ACCIDENT_ID });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPagination();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
const fnDeleteAll = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
|
if (selectionData.length === 0) {
|
||||||
|
ElMessage.warning("请选择要删除的数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const DATA_IDS = selectionData.map((item) => item.ACCIDENT_ID).join(",");
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setAccidentInformationDeleteMultiple({ DATA_IDS });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPagination();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -0,0 +1,77 @@
|
||||||
|
<template>
|
||||||
|
<layout-card>
|
||||||
|
<el-descriptions :column="2" border>
|
||||||
|
<el-descriptions-item label="事故编号">
|
||||||
|
{{ info.ACCIDENT_NUM }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="事故名称">
|
||||||
|
{{ info.ACCIDENT_NAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="事故单位">
|
||||||
|
{{ info.ACCIDENT_DEPT_NAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="事故涉及单位">
|
||||||
|
{{ info.INVOLVING_DEPTS_NAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="事故级别">
|
||||||
|
{{ info.ACCIDENT_LEVEL_NAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="事故类型">
|
||||||
|
{{ info.ACCIDENT_TYPE_NAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="事故发生地点">
|
||||||
|
{{ info.ACCIDENT_PLACE }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="事故发生时间">
|
||||||
|
{{ info.ACCIDENT_TIME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="直接经济损失">
|
||||||
|
{{ info.ECONOMIC_LOSSES || 0 }}元
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="受伤人数">
|
||||||
|
{{ info.INJURED_NUM }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="死亡人数">
|
||||||
|
{{ info.DEAD_NUM }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="重伤人数">
|
||||||
|
{{ info.SERIOUSLY_INJURED_NUM }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="起因物" :span="2">
|
||||||
|
{{ info.ACCIDENT_BECAUSE }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="是否被处罚">
|
||||||
|
{{ info.IS_PUNISHMENT === 1 ? "是" : "否" }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="处罚金额" v-if="info.IS_PUNISHMENT === 1">
|
||||||
|
{{ info.SERIOUSLY_INJURED_NUM || 0 }}元
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="直接原因">
|
||||||
|
{{ info.IMMEDIATE_CAUSE }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="间接原因">
|
||||||
|
{{ info.REMOTE_CAUSE }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="事故概述">
|
||||||
|
{{ info.ACCIDENT_DESCR }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</layout-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { getAccidentInformationView } from "@/request/accident_management.js";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const { ACCIDENT_ID } = route.query;
|
||||||
|
const info = ref({});
|
||||||
|
const fnGetData = async () => {
|
||||||
|
const resData = await getAccidentInformationView({ ACCIDENT_ID });
|
||||||
|
info.value = resData.pd;
|
||||||
|
};
|
||||||
|
fnGetData();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -71,7 +71,7 @@
|
||||||
<el-button type="primary" @click="fnAddOrEdit('', 'add')">
|
<el-button type="primary" @click="fnAddOrEdit('', 'add')">
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" @click="fnDeleteAll"> 删除 </el-button>
|
<el-button type="danger" @click="fnDeleteAll"> 批量删除 </el-button>
|
||||||
</template>
|
</template>
|
||||||
</layout-table>
|
</layout-table>
|
||||||
<add
|
<add
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
<el-button type="primary" @click="fnAddOrEdit('', 'add')">
|
<el-button type="primary" @click="fnAddOrEdit('', 'add')">
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" @click="fnDeleteAll"> 删除 </el-button>
|
<el-button type="danger" @click="fnDeleteAll"> 批量删除 </el-button>
|
||||||
</template>
|
</template>
|
||||||
</layout-table>
|
</layout-table>
|
||||||
<add
|
<add
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
<el-button type="primary" @click="fnAddOrEdit('', 'add')">
|
<el-button type="primary" @click="fnAddOrEdit('', 'add')">
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" @click="fnDeleteAll"> 删除</el-button>
|
<el-button type="danger" @click="fnDeleteAll"> 批量删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</layout-table>
|
</layout-table>
|
||||||
<add
|
<add
|
||||||
|
|
|
@ -58,8 +58,8 @@ const formRef = ref(null);
|
||||||
const form = ref({
|
const form = ref({
|
||||||
file: [],
|
file: [],
|
||||||
});
|
});
|
||||||
|
let requestType = "add";
|
||||||
const fnGetData = async () => {
|
const fnGetData = async () => {
|
||||||
if (!props.emergencyDrillBasicId) return;
|
|
||||||
const resData = await getEmergencyDrillManagementViewSchemeText({
|
const resData = await getEmergencyDrillManagementViewSchemeText({
|
||||||
EMERGENCYDRILLBASIC_ID: props.emergencyDrillBasicId,
|
EMERGENCYDRILLBASIC_ID: props.emergencyDrillBasicId,
|
||||||
});
|
});
|
||||||
|
@ -71,6 +71,7 @@ const fnGetData = async () => {
|
||||||
name: resData.pd.DRILL_ATTACHMENT_FILE_NAME,
|
name: resData.pd.DRILL_ATTACHMENT_FILE_NAME,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
requestType = "edit";
|
||||||
};
|
};
|
||||||
fnGetData();
|
fnGetData();
|
||||||
const fnSubmit = debounce(
|
const fnSubmit = debounce(
|
||||||
|
@ -85,7 +86,7 @@ const fnSubmit = debounce(
|
||||||
formData.append("file", form.value.file[0].raw);
|
formData.append("file", form.value.file[0].raw);
|
||||||
formData.append("DRILL_REPORT_FILE_NAME", form.value.file[0].name);
|
formData.append("DRILL_REPORT_FILE_NAME", form.value.file[0].name);
|
||||||
formData.append("EMERGENCYDRILLBASIC_ID", props.emergencyDrillBasicId);
|
formData.append("EMERGENCYDRILLBASIC_ID", props.emergencyDrillBasicId);
|
||||||
!props.emergencyDrillBasicId
|
requestType === "add"
|
||||||
? await setEmergencyDrillManagementViewSchemeTextAdd(formData)
|
? await setEmergencyDrillManagementViewSchemeTextAdd(formData)
|
||||||
: await setEmergencyDrillManagementViewSchemeTextEdit(formData);
|
: await setEmergencyDrillManagementViewSchemeTextEdit(formData);
|
||||||
ElMessage.success("操作成功");
|
ElMessage.success("操作成功");
|
||||||
|
|
|
@ -70,8 +70,8 @@ const form = ref({
|
||||||
DRILL_REPORT: "",
|
DRILL_REPORT: "",
|
||||||
file: [],
|
file: [],
|
||||||
});
|
});
|
||||||
|
let requestType = "add";
|
||||||
const fnGetData = async () => {
|
const fnGetData = async () => {
|
||||||
if (!props.emergencyDrillBasicId) return;
|
|
||||||
const resData = await getEmergencyDrillManagementViewSummaryEvaluation({
|
const resData = await getEmergencyDrillManagementViewSummaryEvaluation({
|
||||||
EMERGENCYDRILLBASIC_ID: props.emergencyDrillBasicId,
|
EMERGENCYDRILLBASIC_ID: props.emergencyDrillBasicId,
|
||||||
});
|
});
|
||||||
|
@ -83,6 +83,7 @@ const fnGetData = async () => {
|
||||||
name: resData.pd.DRILL_REPORT_FILE_NAME,
|
name: resData.pd.DRILL_REPORT_FILE_NAME,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
requestType = "edit";
|
||||||
};
|
};
|
||||||
fnGetData();
|
fnGetData();
|
||||||
const fnSubmit = debounce(
|
const fnSubmit = debounce(
|
||||||
|
@ -97,7 +98,7 @@ const fnSubmit = debounce(
|
||||||
formData.append("file", form.value.file[0].raw);
|
formData.append("file", form.value.file[0].raw);
|
||||||
formData.append("DRILL_REPORT_FILE_NAME", form.value.file[0].name);
|
formData.append("DRILL_REPORT_FILE_NAME", form.value.file[0].name);
|
||||||
formData.append("EMERGENCYDRILLBASIC_ID", props.emergencyDrillBasicId);
|
formData.append("EMERGENCYDRILLBASIC_ID", props.emergencyDrillBasicId);
|
||||||
!props.emergencyDrillBasicId
|
requestType === "add"
|
||||||
? await setEmergencyDrillManagementViewSummaryEvaluationAdd(formData)
|
? await setEmergencyDrillManagementViewSummaryEvaluationAdd(formData)
|
||||||
: await setEmergencyDrillManagementViewSummaryEvaluationEdit(formData);
|
: await setEmergencyDrillManagementViewSummaryEvaluationEdit(formData);
|
||||||
ElMessage.success("操作成功");
|
ElMessage.success("操作成功");
|
||||||
|
|
|
@ -620,13 +620,12 @@ const fnSubmit = debounce(
|
||||||
data.form.SMALL = "2";
|
data.form.SMALL = "2";
|
||||||
data.form.ECO_TYPE = data.form.ECO_TYPEALL[0] || "";
|
data.form.ECO_TYPE = data.form.ECO_TYPEALL[0] || "";
|
||||||
data.form.ECO_TYPE2 = data.form.ECO_TYPEALL[1] || "";
|
data.form.ECO_TYPE2 = data.form.ECO_TYPEALL[1] || "";
|
||||||
data.form.ECO_TYPE_NAME =
|
data.form.ECO_TYPE_NAME = economicTypeCascaderRef.value.getCheckedNodes();
|
||||||
economicTypeCascaderRef.value.getCheckedNodes()[0];
|
|
||||||
data.form.CORP_TYPE = data.form.INDUSTRYALL[0] || "";
|
data.form.CORP_TYPE = data.form.INDUSTRYALL[0] || "";
|
||||||
data.form.CORP_TYPE2 = data.form.INDUSTRYALL[1] || "";
|
data.form.CORP_TYPE2 = data.form.INDUSTRYALL[1] || "";
|
||||||
data.form.CORP_TYPE3 = data.form.INDUSTRYALL[2] || "";
|
data.form.CORP_TYPE3 = data.form.INDUSTRYALL[2] || "";
|
||||||
data.form.CORP_TYPE4 = data.form.INDUSTRYALL[3] || "";
|
data.form.CORP_TYPE4 = data.form.INDUSTRYALL[3] || "";
|
||||||
data.form.CORP_TYPE_NAME = industryCascaderRef.value.getCheckedNodes()[0];
|
data.form.CORP_TYPE_NAME = industryCascaderRef.value.getCheckedNodes();
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
Object.keys(data.form).forEach((key) => {
|
Object.keys(data.form).forEach((key) => {
|
||||||
formData.append(key, data.form[key]);
|
formData.append(key, data.form[key]);
|
||||||
|
|
|
@ -0,0 +1,249 @@
|
||||||
|
<template>
|
||||||
|
<layout-card>
|
||||||
|
<el-form ref="formRef" :rules="rules" :model="form" label-width="160px">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="设备名称" prop="EQUIPMENTNAME">
|
||||||
|
<el-input v-model="form.EQUIPMENTNAME" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="设备型号" prop="EQUIPMENTMODEL">
|
||||||
|
<el-input v-model="form.EQUIPMENTMODEL" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="设备代码" prop="EQUIPMENTCODE">
|
||||||
|
<el-input v-model="form.EQUIPMENTCODE" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="出厂编号" prop="FACTORYCODE">
|
||||||
|
<el-input v-model="form.FACTORYCODE" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="设备类型" prop="EQUIPMENTTYPE">
|
||||||
|
<el-select v-model="form.EQUIPMENTTYPE">
|
||||||
|
<el-option
|
||||||
|
v-for="item in specialEquipmentTypeList"
|
||||||
|
:key="item.BIANMA"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.BIANMA"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="设备状态" prop="EQUIPMENTSTATE">
|
||||||
|
<el-select v-model="form.EQUIPMENTSTATE">
|
||||||
|
<el-option
|
||||||
|
v-for="item in specialEquipmentStateList"
|
||||||
|
:key="item.BIANMA"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.BIANMA"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="设备使用地点" prop="EQUIPMENTUSEPLACE">
|
||||||
|
<el-input v-model="form.EQUIPMENTUSEPLACE" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="设备责任机构" prop="RESPONSIBLEUNIT">
|
||||||
|
<layout-department
|
||||||
|
v-model="form.RESPONSIBLEUNIT"
|
||||||
|
@update:model-value="fnResponsibleUnitChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="设备负责人" prop="PERSONCHARGE">
|
||||||
|
<el-select v-model="form.PERSONCHARGE">
|
||||||
|
<el-option
|
||||||
|
v-for="item in equipmentResponsiblePersonList"
|
||||||
|
:key="item.USER_ID"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.USER_ID"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="负责人联系电话" prop="PERSONCHARGEPHONE">
|
||||||
|
<el-input v-model="form.PERSONCHARGEPHONE" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="巡检周期" prop="PERIOD">
|
||||||
|
<el-select v-model="form.PERIOD">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inspectionCycleList"
|
||||||
|
:key="item.BIANMA"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.BIANMA"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="设备技术档案(附件)" prop="file">
|
||||||
|
<layout-upload v-model:file-list="form.file" accept=".pdf" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="备注" prop="REMARKS">
|
||||||
|
<el-input
|
||||||
|
v-model="form.REMARKS"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 3 }"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div class="mt-10 tc">
|
||||||
|
<el-button type="primary" @click="fnSubmit">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</layout-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import LayoutUpload from "@/components/upload/index.vue";
|
||||||
|
import LayoutDepartment from "@/components/department/index.vue";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
|
import {
|
||||||
|
getDeviceManagementView,
|
||||||
|
getEquipmentManagerList,
|
||||||
|
setDeviceManagementAdd,
|
||||||
|
setDeviceManagementEdit,
|
||||||
|
} from "@/request/equipment_facility_management.js";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import { useRoute, useRouter } from "vue-router";
|
||||||
|
import { ref, watchEffect } from "vue";
|
||||||
|
import {
|
||||||
|
layoutFnGetInspectionCycle,
|
||||||
|
layoutFnGetSpecialEquipmentState,
|
||||||
|
layoutFnGetSpecialEquipmentType,
|
||||||
|
} from "@/assets/js/data_dictionary.js";
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
|
const { SPECIALEQUIPMENT_ID } = route.query;
|
||||||
|
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
|
||||||
|
const rules = {
|
||||||
|
EQUIPMENTNAME: [
|
||||||
|
{ required: true, message: "设备名称不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
EQUIPMENTMODEL: [
|
||||||
|
{ required: true, message: "设备型号不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
EQUIPMENTCODE: [
|
||||||
|
{ required: true, message: "设备代码不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
FACTORYCODE: [
|
||||||
|
{ required: true, message: "出厂编号不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
EQUIPMENTTYPE: [
|
||||||
|
{ required: true, message: "请选择设备类型", trigger: "change" },
|
||||||
|
],
|
||||||
|
EQUIPMENTSTATE: [
|
||||||
|
{ required: true, message: "请选择设备状态", trigger: "change" },
|
||||||
|
],
|
||||||
|
EQUIPMENTUSEPLACE: [
|
||||||
|
{ required: true, message: "设备使用地点不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
RESPONSIBLEUNIT: [
|
||||||
|
{ required: true, message: "设备责任机构不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
PERSONCHARGE: [
|
||||||
|
{ required: true, message: "设备负责人不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
PERSONCHARGEPHONE: [
|
||||||
|
{ required: true, message: "请输入手机号码", trigger: "blur" },
|
||||||
|
{
|
||||||
|
pattern:
|
||||||
|
/^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[189])\d{8}$/,
|
||||||
|
message: "请输入正确的手机号码",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
PERIOD: [{ required: true, message: "请选择巡检周期", trigger: "change" }],
|
||||||
|
};
|
||||||
|
const form = ref({
|
||||||
|
EQUIPMENTNAME: "",
|
||||||
|
EQUIPMENTMODEL: "",
|
||||||
|
EQUIPMENTCODE: "",
|
||||||
|
FACTORYCODE: "",
|
||||||
|
EQUIPMENTTYPE: "",
|
||||||
|
EQUIPMENTSTATE: "",
|
||||||
|
EQUIPMENTUSEPLACE: "",
|
||||||
|
RESPONSIBLEUNIT: "",
|
||||||
|
PERSONCHARGE: "",
|
||||||
|
PERSONCHARGEPHONE: "",
|
||||||
|
PERIOD: "",
|
||||||
|
REMARKS: "",
|
||||||
|
file: [],
|
||||||
|
});
|
||||||
|
const formRef = ref(null);
|
||||||
|
const equipmentResponsiblePersonList = ref([]);
|
||||||
|
const fnGetData = async () => {
|
||||||
|
if (!SPECIALEQUIPMENT_ID) return;
|
||||||
|
const resData = await getDeviceManagementView({ SPECIALEQUIPMENT_ID });
|
||||||
|
form.value = resData.pd;
|
||||||
|
if (resData.pd.TECHNICALFILEPATH) {
|
||||||
|
form.value.file = [
|
||||||
|
{
|
||||||
|
url: VITE_FILE_URL + resData.pd.TECHNICALFILEPATH,
|
||||||
|
name: resData.pd.TECHNICALFILENAME,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
fnGetData();
|
||||||
|
const specialEquipmentTypeList = await layoutFnGetSpecialEquipmentType();
|
||||||
|
const specialEquipmentStateList = await layoutFnGetSpecialEquipmentState();
|
||||||
|
const inspectionCycleList = await layoutFnGetInspectionCycle();
|
||||||
|
const fnResponsibleUnitChange = () => {
|
||||||
|
equipmentResponsiblePersonList.value = [];
|
||||||
|
form.value.PERSONCHARGE = "";
|
||||||
|
};
|
||||||
|
const fnGetEquipmentResponsiblePerson = async (DEPARTMENT_ID) => {
|
||||||
|
const resData = await getEquipmentManagerList({
|
||||||
|
currentPage: 1,
|
||||||
|
showCount: 100000,
|
||||||
|
DEPARTMENT_ID,
|
||||||
|
});
|
||||||
|
equipmentResponsiblePersonList.value = resData.userList;
|
||||||
|
};
|
||||||
|
watchEffect(() => {
|
||||||
|
if (form.value.RESPONSIBLEUNIT) {
|
||||||
|
fnGetEquipmentResponsiblePerson(form.value.RESPONSIBLEUNIT);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const fnSubmit = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
await useFormValidate(formRef);
|
||||||
|
const formData = new FormData();
|
||||||
|
Object.keys(form.value).forEach((key) => {
|
||||||
|
formData.append(key, form.value[key]);
|
||||||
|
});
|
||||||
|
formData.delete("file");
|
||||||
|
if (form.value.file?.[0]?.raw) {
|
||||||
|
formData.append("file", form.value.file[0].raw);
|
||||||
|
formData.append("TECHNICALFILENAME", form.value.file[0].name);
|
||||||
|
}
|
||||||
|
!SPECIALEQUIPMENT_ID
|
||||||
|
? await setDeviceManagementAdd(formData)
|
||||||
|
: await setDeviceManagementEdit(formData);
|
||||||
|
ElMessage.success("保存成功");
|
||||||
|
router.back();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,187 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="80px"
|
||||||
|
@submit.prevent="fnResetPagination"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="设备名称" prop="KEYWORDS">
|
||||||
|
<el-input v-model="searchForm.KEYWORDS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="设备类型" prop="EQUIPMENTTYPE">
|
||||||
|
<el-select v-model="searchForm.EQUIPMENTTYPE">
|
||||||
|
<el-option
|
||||||
|
v-for="item in specialEquipmentTypeList"
|
||||||
|
:key="item.BIANMA"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.BIANMA"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPagination">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
ref="tableRef"
|
||||||
|
row-key="SPECIALEQUIPMENT_ID"
|
||||||
|
:data="list"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
@get-data="fnGetData"
|
||||||
|
>
|
||||||
|
<el-table-column reserve-selection type="selection" width="55" />
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="EQUIPMENTNAME"
|
||||||
|
label="设备名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="EQUIPMENTTYPENAME"
|
||||||
|
label="设备类型"
|
||||||
|
width="200"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="PERSONCHARGENAME"
|
||||||
|
label="设备负责人"
|
||||||
|
width="150"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="PERIOD_NAME" label="巡检周期" width="260" />
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/equipment_facility_management/device_management/view',
|
||||||
|
query: {
|
||||||
|
SPECIALEQUIPMENT_ID: row.SPECIALEQUIPMENT_ID,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.edit"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/equipment_facility_management/device_management/edit',
|
||||||
|
query: {
|
||||||
|
SPECIALEQUIPMENT_ID: row.SPECIALEQUIPMENT_ID,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnDelete(row.SPECIALEQUIPMENT_ID)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template #button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.add"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/equipment_facility_management/device_management/add',
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="danger"
|
||||||
|
@click="fnDeleteAll"
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||||
|
import { layoutFnGetSpecialEquipmentType } from "@/assets/js/data_dictionary.js";
|
||||||
|
import {
|
||||||
|
getDeviceManagementList,
|
||||||
|
setDeviceManagementDelete,
|
||||||
|
setDeviceManagementDeleteMultiple,
|
||||||
|
} from "@/request/equipment_facility_management.js";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { list, pagination, searchForm, fnResetPagination, fnGetData, tableRef } =
|
||||||
|
useListData(getDeviceManagementList);
|
||||||
|
const specialEquipmentTypeList = await layoutFnGetSpecialEquipmentType();
|
||||||
|
const buttonJurisdiction = await useButtonJurisdiction("specialequipment");
|
||||||
|
const fnDelete = debounce(
|
||||||
|
1000,
|
||||||
|
async (SPECIALEQUIPMENT_ID) => {
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setDeviceManagementDelete({ SPECIALEQUIPMENT_ID });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPagination();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
const fnDeleteAll = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
|
if (selectionData.length === 0) {
|
||||||
|
ElMessage.warning("请选择要删除的数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const DATA_IDS = selectionData
|
||||||
|
.map((item) => item.SPECIALEQUIPMENT_ID)
|
||||||
|
.join(",");
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setDeviceManagementDeleteMultiple({ DATA_IDS });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPagination();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -0,0 +1,72 @@
|
||||||
|
<template>
|
||||||
|
<layout-card>
|
||||||
|
<el-descriptions :column="2" border>
|
||||||
|
<el-descriptions-item label="设备名称">
|
||||||
|
{{ info.EQUIPMENTNAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="设备型号">
|
||||||
|
{{ info.EQUIPMENTMODEL }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="设备代码">
|
||||||
|
{{ info.EQUIPMENTCODE }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="出厂编号">
|
||||||
|
{{ info.FACTORYCODE }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="设备类型">
|
||||||
|
{{ info.EQUIPMENTTYPENAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="设备状态">
|
||||||
|
{{ info.EQUIPMENTSTATENAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="设备使用地点">
|
||||||
|
{{ info.EQUIPMENTUSEPLACE }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="设备责任机构">
|
||||||
|
{{ info.RESPONSIBLEUNITNAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="设备负责人">
|
||||||
|
{{ info.PERSONCHARGENAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="负责人联系电话">
|
||||||
|
{{ info.PERSONCHARGEPHONE }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="巡检周期">
|
||||||
|
{{ info.PERIOD_NAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="备注">
|
||||||
|
{{ info.REMARKS }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="设备技术档案" v-if="info.TECHNICALFILENAME">
|
||||||
|
{{ info.TECHNICALFILENAME }}
|
||||||
|
<el-button
|
||||||
|
class="ml"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
useDownloadFile(info.TECHNICALFILEPATH, info.TECHNICALFILENAME)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
下载
|
||||||
|
</el-button>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</layout-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import useDownloadFile from "@/assets/js/useDownloadFile.js";
|
||||||
|
import { getDeviceManagementView } from "@/request/equipment_facility_management.js";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const { SPECIALEQUIPMENT_ID } = route.query;
|
||||||
|
const info = ref({});
|
||||||
|
const fnGetData = async () => {
|
||||||
|
const resData = await getDeviceManagementView({ SPECIALEQUIPMENT_ID });
|
||||||
|
info.value = resData.pd;
|
||||||
|
};
|
||||||
|
fnGetData();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,350 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog v-model="visible" title="查看">
|
||||||
|
<div class="top">
|
||||||
|
<span class="title">操作类型</span>
|
||||||
|
<span>{{ info.OPERATETYPE }}</span>
|
||||||
|
<span class="title">操作人</span>
|
||||||
|
<span>{{ info.OPERATOR }}</span>
|
||||||
|
<span class="title">操作时间</span>
|
||||||
|
<span>{{ info.OPERATTIME }}</span>
|
||||||
|
</div>
|
||||||
|
<table class="mt-10">
|
||||||
|
<tr>
|
||||||
|
<td class="title" />
|
||||||
|
<td
|
||||||
|
class="title"
|
||||||
|
style="text-align: center; background-color: #4581e9; color: #fff"
|
||||||
|
>
|
||||||
|
变更前
|
||||||
|
</td>
|
||||||
|
<td
|
||||||
|
class="title"
|
||||||
|
style="text-align: center; background-color: #4db555; color: #fff"
|
||||||
|
>
|
||||||
|
变更后
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<template v-if="info.OPERATETYPE === '删除'">
|
||||||
|
<td class="title">设备名称</td>
|
||||||
|
<td>{{ info.EQUIPMENTNAME_AFTER }}</td>
|
||||||
|
<td />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<td class="title">设备名称</td>
|
||||||
|
<td>{{ info.EQUIPMENTNAME_BEFORE }}</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
info.EQUIPMENTNAME_BEFORE !== info.EQUIPMENTNAME_AFTER
|
||||||
|
? info.EQUIPMENTNAME_AFTER
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</template>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<template v-if="info.OPERATETYPE === '删除'">
|
||||||
|
<td class="title">设备型号</td>
|
||||||
|
<td>{{ info.EQUIPMENTMODEL_AFTER }}</td>
|
||||||
|
<td />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<td class="title">设备型号</td>
|
||||||
|
<td>{{ info.EQUIPMENTMODEL_BEFORE }}</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
info.EQUIPMENTMODEL_BEFORE !== info.EQUIPMENTMODEL_AFTER
|
||||||
|
? info.EQUIPMENTMODEL_AFTER
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</template>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<template v-if="info.OPERATETYPE === '删除'">
|
||||||
|
<td class="title">设备代码</td>
|
||||||
|
<td>{{ info.EQUIPMENTCODE_AFTER }}</td>
|
||||||
|
<td />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<td class="title">设备代码</td>
|
||||||
|
<td>{{ info.EQUIPMENTCODE_BEFORE }}</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
info.EQUIPMENTCODE_BEFORE !== info.EQUIPMENTCODE_AFTER
|
||||||
|
? info.EQUIPMENTCODE_AFTER
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</template>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<template v-if="info.OPERATETYPE === '删除'">
|
||||||
|
<td class="title">出厂编号</td>
|
||||||
|
<td>{{ info.FACTORYCODE_AFTER }}</td>
|
||||||
|
<td />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<td class="title">出厂编号</td>
|
||||||
|
<td>{{ info.FACTORYCODE_BEFORE }}</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
info.FACTORYCODE_BEFORE !== info.FACTORYCODE_AFTER
|
||||||
|
? info.FACTORYCODE_AFTER
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</template>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<template v-if="info.OPERATETYPE === '删除'">
|
||||||
|
<td class="title">设备类型</td>
|
||||||
|
<td>{{ info.EQUIPMENTTYPE_AFTER }}</td>
|
||||||
|
<td />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<td class="title">设备类型</td>
|
||||||
|
<td>{{ info.EQUIPMENTTYPE_BEFORE }}</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
info.EQUIPMENTTYPE_BEFORE !== info.EQUIPMENTTYPE_AFTER
|
||||||
|
? info.EQUIPMENTTYPE_AFTER
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</template>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<template v-if="info.OPERATETYPE === '删除'">
|
||||||
|
<td class="title">设备状态</td>
|
||||||
|
<td>{{ info.EQUIPMENTSTATE_AFTER }}</td>
|
||||||
|
<td />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<td class="title">设备状态</td>
|
||||||
|
<td>{{ info.EQUIPMENTSTATE_BEFORE }}</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
info.EQUIPMENTSTATE_BEFORE !== info.EQUIPMENTSTATE_AFTER
|
||||||
|
? info.EQUIPMENTSTATE_AFTER
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</template>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<template v-if="info.OPERATETYPE === '删除'">
|
||||||
|
<td class="title">设备使用地点</td>
|
||||||
|
<td>{{ info.EQUIPMENTUSEPLACE_AFTER }}</td>
|
||||||
|
<td />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<td class="title">设备使用地点</td>
|
||||||
|
<td>{{ info.EQUIPMENTUSEPLACE_BEFORE }}</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
info.EQUIPMENTUSEPLACE_BEFORE !== info.EQUIPMENTUSEPLACE_AFTER
|
||||||
|
? info.EQUIPMENTUSEPLACE_AFTER
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</template>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<template v-if="info.OPERATETYPE === '删除'">
|
||||||
|
<td class="title">设备责任单位</td>
|
||||||
|
<td>{{ info.RESPONSIBLEUNIT_AFTER }}</td>
|
||||||
|
<td />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<td class="title">设备责任单位</td>
|
||||||
|
<td>{{ info.RESPONSIBLEUNIT_BEFORE }}</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
info.RESPONSIBLEUNIT_BEFORE !== info.RESPONSIBLEUNIT_AFTER
|
||||||
|
? info.RESPONSIBLEUNIT_AFTER
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</template>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<template v-if="info.OPERATETYPE === '删除'">
|
||||||
|
<td class="title">设备负责人</td>
|
||||||
|
<td>{{ info.PERSONCHARGE_AFTER }}</td>
|
||||||
|
<td />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<td class="title">设备负责人</td>
|
||||||
|
<td>{{ info.PERSONCHARGE_BEFORE }}</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
info.PERSONCHARGE_BEFORE !== info.PERSONCHARGE_AFTER
|
||||||
|
? info.PERSONCHARGE_AFTER
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</template>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<template v-if="info.OPERATETYPE === '删除'">
|
||||||
|
<td class="title">负责人联系电话</td>
|
||||||
|
<td>{{ info.PERSONCHARGEPHONE_AFTER }}</td>
|
||||||
|
<td />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<td class="title">负责人联系电话</td>
|
||||||
|
<td>{{ info.PERSONCHARGEPHONE_BEFORE }}</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
info.PERSONCHARGEPHONE_BEFORE !== info.PERSONCHARGEPHONE_AFTER
|
||||||
|
? info.PERSONCHARGEPHONE_AFTER
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</template>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<template v-if="info.OPERATETYPE === '删除'">
|
||||||
|
<td class="title">设备技术档案(附件)</td>
|
||||||
|
<td>
|
||||||
|
<span class="line-2">{{ info.TECHNICALFILEPATH_AFTER }}</span>
|
||||||
|
<el-button
|
||||||
|
v-if="info.TECHNICALFILEPATH_AFTER"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
useDownloadFile(
|
||||||
|
info.TECHNICALFILEPATH_AFTER,
|
||||||
|
info.TECHNICALFILENAME_AFTER
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
下载
|
||||||
|
</el-button>
|
||||||
|
</td>
|
||||||
|
<td />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<td class="title">设备技术档案(附件)</td>
|
||||||
|
<td>
|
||||||
|
<span class="line-2">{{ info.TECHNICALFILENAME_BEFORE }}</span>
|
||||||
|
<el-button
|
||||||
|
v-if="info.TECHNICALFILENAME_BEFORE"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
useDownloadFile(
|
||||||
|
info.TECHNICALFILEPATH_BEFORE,
|
||||||
|
info.TECHNICALFILENAME_BEFORE
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
下载
|
||||||
|
</el-button>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<template
|
||||||
|
v-if="
|
||||||
|
info.TECHNICALFILEPATH_BEFORE !== info.TECHNICALFILEPATH_AFTER
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<span class="line-2">{{ info.TECHNICALFILENAME_AFTER }}</span>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
useDownloadFile(
|
||||||
|
info.TECHNICALFILEPATH_AFTER,
|
||||||
|
info.TECHNICALFILENAME_AFTER
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
下载
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</td>
|
||||||
|
</template>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<template v-if="info.OPERATETYPE === '删除'">
|
||||||
|
<td class="title">备注</td>
|
||||||
|
<td>{{ info.REMARKS_AFTER }}</td>
|
||||||
|
<td />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<td class="title">备注</td>
|
||||||
|
<td>{{ info.REMARKS_BEFORE }}</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
info.REMARKS_BEFORE !== info.REMARKS_AFTER
|
||||||
|
? info.REMARKS_AFTER
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</template>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="visible = false">关闭</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import useDownloadFile from "@/assets/js/useDownloadFile.js";
|
||||||
|
import { useVModel } from "@vueuse/core";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
info: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible"]);
|
||||||
|
const visible = useVModel(props, "visible", emits);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.top {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
background: var(--el-fill-color-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
border: 1px solid var(--el-border-color);
|
||||||
|
padding: 8px 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.6;
|
||||||
|
display: block;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
td,
|
||||||
|
th {
|
||||||
|
border: 1px solid var(--el-border-color);
|
||||||
|
padding: 8px 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
td:not(.title) {
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
background: var(--el-fill-color-light);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,110 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="80px"
|
||||||
|
@submit.prevent="fnResetPagination"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="设备名称" prop="KEYWORDS">
|
||||||
|
<el-input v-model="searchForm.KEYWORDS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item
|
||||||
|
label="设备使用地点"
|
||||||
|
prop="EQUIPMENTUSEPLACE"
|
||||||
|
label-width="120px"
|
||||||
|
>
|
||||||
|
<el-input v-model="searchForm.EQUIPMENTUSEPLACE" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="操作类型" prop="OPERATETYPE">
|
||||||
|
<el-select v-model="searchForm.OPERATETYPE">
|
||||||
|
<el-option label="新增" value="新增" />
|
||||||
|
<el-option label="修改" value="修改" />
|
||||||
|
<el-option label="删除" value="删除" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPagination">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
:data="list"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
@get-data="fnGetData"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="EQUIPMENTNAME_AFTER" label="设备名称" />
|
||||||
|
<el-table-column prop="EQUIPMENTUSEPLACE_AFTER" label="设备使用地点" />
|
||||||
|
<el-table-column prop="EQUIPMENTMODEL_AFTER" label="设备型号" />
|
||||||
|
<el-table-column prop="EQUIPMENTCODE_AFTER" label="设备代码" />
|
||||||
|
<el-table-column prop="OPERATETYPE" label="操作类型" width="100" />
|
||||||
|
<el-table-column prop="OPERATOR" label="操作人" />
|
||||||
|
<el-table-column prop="OPERATTIME" label="操作时间" width="150" />
|
||||||
|
<el-table-column label="操作" width="80">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnView(row.SPECIALEQUIPMENTCHANGE_ID)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
<view-info
|
||||||
|
v-model:visible="data.viewDialog.visible"
|
||||||
|
:info="data.viewDialog.info"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive } from "vue";
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import {
|
||||||
|
getEquipmentChangeRecordList,
|
||||||
|
getEquipmentChangeRecordView,
|
||||||
|
} from "@/request/equipment_facility_management.js";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import ViewInfo from "./components/view.vue";
|
||||||
|
|
||||||
|
const { list, searchForm, pagination, fnGetData, fnResetPagination } =
|
||||||
|
useListData(getEquipmentChangeRecordList);
|
||||||
|
const data = reactive({
|
||||||
|
viewDialog: {
|
||||||
|
visible: false,
|
||||||
|
info: {},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const fnView = async (SPECIALEQUIPMENTCHANGE_ID) => {
|
||||||
|
data.viewDialog.visible = true;
|
||||||
|
const resData = await getEquipmentChangeRecordView({
|
||||||
|
SPECIALEQUIPMENTCHANGE_ID,
|
||||||
|
});
|
||||||
|
data.viewDialog.info = resData.pd;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
|
@ -0,0 +1,149 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog v-model="visible" title="巡检" :on-close="fnClose">
|
||||||
|
<el-form ref="formRef" :rules="rules" :model="form" label-width="130px">
|
||||||
|
<el-form-item label="巡检人" prop="INSPECTOR">
|
||||||
|
<el-input v-model="form.INSPECTOR" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="巡检时间" prop="INSPECTIONTIME">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.INSPECTIONTIME"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="巡检内容" prop="INSPECTIONCONTENT">
|
||||||
|
<el-input v-model="form.INSPECTIONCONTENT" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否有故障" prop="ISFAULT">
|
||||||
|
<el-select v-model="form.ISFAULT">
|
||||||
|
<el-option label="否" value="否" />
|
||||||
|
<el-option label="是" value="是" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="巡检照片" prop="inspectionPhotos">
|
||||||
|
<layout-upload
|
||||||
|
v-model:file-list="form.inspectionPhotos"
|
||||||
|
accept=".jpg,.jpeg,.png"
|
||||||
|
list-type="picture-card"
|
||||||
|
:limit="99"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<template v-if="form.ISFAULT === '是'">
|
||||||
|
<el-form-item label="故障照片" prop="faultPhotos">
|
||||||
|
<layout-upload
|
||||||
|
v-model:file-list="form.faultPhotos"
|
||||||
|
accept=".jpg,.jpeg,.png"
|
||||||
|
list-type="picture-card"
|
||||||
|
:limit="99"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="故障处理后照片" prop="faultAfterProcessingPhotos">
|
||||||
|
<layout-upload
|
||||||
|
v-model:file-list="form.faultAfterProcessingPhotos"
|
||||||
|
accept=".jpg,.jpeg,.png"
|
||||||
|
list-type="picture-card"
|
||||||
|
:limit="99"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="fnClose">取消</el-button>
|
||||||
|
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import LayoutUpload from "@/components/upload/index.vue";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
|
import { getSafetyInspectionInspection } from "@/request/equipment_facility_management.js";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import { useVModel } from "@vueuse/core";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible", "get-data"]);
|
||||||
|
const visible = useVModel(props, "visible", emits);
|
||||||
|
const rules = {
|
||||||
|
INSPECTOR: [{ required: true, message: "巡检人不能为空", trigger: "blur" }],
|
||||||
|
INSPECTIONTIME: [
|
||||||
|
{ required: true, message: "巡检时间不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
INSPECTIONCONTENT: [
|
||||||
|
{ required: true, message: "巡检内容不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
ISFAULT: [{ required: true, message: "是否有故障不能为空", trigger: "blur" }],
|
||||||
|
inspectionPhotos: [
|
||||||
|
{ required: true, message: "巡检照片不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
faultPhotos: [
|
||||||
|
{ required: true, message: "故障照片不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
faultAfterProcessingPhotos: [
|
||||||
|
{ required: true, message: "故障处理后照片不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const form = ref({
|
||||||
|
INSPECTOR: "",
|
||||||
|
INSPECTIONTIME: "",
|
||||||
|
INSPECTIONCONTENT: "",
|
||||||
|
ISFAULT: "",
|
||||||
|
inspectionPhotos: [],
|
||||||
|
faultPhotos: [],
|
||||||
|
faultAfterProcessingPhotos: [],
|
||||||
|
});
|
||||||
|
const formRef = ref(null);
|
||||||
|
const fnClose = () => {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
const fnSubmit = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
await useFormValidate(formRef);
|
||||||
|
const formData = new FormData();
|
||||||
|
Object.keys(form.value).forEach((key) => {
|
||||||
|
formData.append(key, form.value[key]);
|
||||||
|
});
|
||||||
|
formData.delete("inspectionPhotos");
|
||||||
|
formData.delete("faultPhotos");
|
||||||
|
formData.delete("faultAfterProcessingPhotos");
|
||||||
|
formData.append("SPECIALEQUIPMENT_ID", props.id);
|
||||||
|
for (let i = 0; i < form.value.inspectionPhotos.length; i++) {
|
||||||
|
formData.append("FFILE", form.value.inspectionPhotos[i].raw);
|
||||||
|
formData.append("TYPE", "26");
|
||||||
|
}
|
||||||
|
for (let i = 0; i < form.value.faultPhotos.length; i++) {
|
||||||
|
formData.append("FFILE", form.value.faultPhotos[i].raw);
|
||||||
|
formData.append("TYPE", "24");
|
||||||
|
}
|
||||||
|
for (let i = 0; i < form.value.faultAfterProcessingPhotos.length; i++) {
|
||||||
|
formData.append("FFILE", form.value.faultAfterProcessingPhotos[i].raw);
|
||||||
|
formData.append("TYPE", "25");
|
||||||
|
}
|
||||||
|
await getSafetyInspectionInspection(formData);
|
||||||
|
fnClose();
|
||||||
|
ElMessage.success("巡检成功");
|
||||||
|
emits("get-data");
|
||||||
|
},
|
||||||
|
{
|
||||||
|
atBegin: true,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,77 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog v-model="visible" title="查看">
|
||||||
|
<el-descriptions :column="1" border>
|
||||||
|
<el-descriptions-item label="巡检人">
|
||||||
|
{{ info.INSPECTOR }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="巡检时间">
|
||||||
|
{{ info.INSPECTIONTIME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="巡检内容">
|
||||||
|
{{ info.INSPECTIONCONTENT }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="是否有故障">
|
||||||
|
{{ info.ISFAULT }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="故障照片">
|
||||||
|
<img
|
||||||
|
v-viewer
|
||||||
|
v-for="item in info.faultPhotos"
|
||||||
|
:key="item.url"
|
||||||
|
:src="item.url"
|
||||||
|
alt=""
|
||||||
|
class="ml-10"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="故障处理后照片">
|
||||||
|
<img
|
||||||
|
v-viewer
|
||||||
|
v-for="item in info.faultAfterProcessingPhotos"
|
||||||
|
:key="item.url"
|
||||||
|
:src="item.url"
|
||||||
|
alt=""
|
||||||
|
class="ml-10"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="巡检照片">
|
||||||
|
<img
|
||||||
|
v-viewer
|
||||||
|
v-for="item in info.inspectionPhotos"
|
||||||
|
:key="item.url"
|
||||||
|
:src="item.url"
|
||||||
|
alt=""
|
||||||
|
class="ml-10"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="visible = false">关闭</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { useVModel } from "@vueuse/core";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
info: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible"]);
|
||||||
|
const visible = useVModel(props, "visible", emits);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
img {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,115 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="80px"
|
||||||
|
@submit.prevent="fnResetPagination"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="设备名称" prop="KEYWORDS">
|
||||||
|
<el-input v-model="searchForm.KEYWORDS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="设备类型" prop="EQUIPMENTTYPE">
|
||||||
|
<el-select v-model="searchForm.EQUIPMENTTYPE">
|
||||||
|
<el-option
|
||||||
|
v-for="item in specialEquipmentTypeList"
|
||||||
|
:key="item.BIANMA"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.BIANMA"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPagination">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
:data="list"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
@get-data="fnGetData"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="EQUIPMENTNAME" label="设备名称" />
|
||||||
|
<el-table-column prop="EQUIPMENTTYPENAME" label="设备类型" />
|
||||||
|
<el-table-column prop="XJCOUNT" label="巡检次数" />
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnInspection(row.SPECIALEQUIPMENT_ID)"
|
||||||
|
>
|
||||||
|
巡检
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.edit"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/equipment_facility_management/safety_inspection/inspection_records',
|
||||||
|
query: { SPECIALEQUIPMENT_ID: row.SPECIALEQUIPMENT_ID },
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
巡检记录
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
<inspection
|
||||||
|
v-model:visible="data.inspectionDialog.visible"
|
||||||
|
:id="data.inspectionDialog.SPECIALEQUIPMENT_ID"
|
||||||
|
@get-data="fnResetPagination"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive } from "vue";
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||||
|
import { layoutFnGetSpecialEquipmentType } from "@/assets/js/data_dictionary.js";
|
||||||
|
import { getSafetyInspectionList } from "@/request/equipment_facility_management.js";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import Inspection from "./components/inspection.vue";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const data = reactive({
|
||||||
|
inspectionDialog: {
|
||||||
|
visible: false,
|
||||||
|
SPECIALEQUIPMENT_ID: "",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||||
|
useListData(getSafetyInspectionList);
|
||||||
|
const specialEquipmentTypeList = await layoutFnGetSpecialEquipmentType();
|
||||||
|
const buttonJurisdiction = await useButtonJurisdiction("specialequipmentaqxj");
|
||||||
|
const fnInspection = async (SPECIALEQUIPMENT_ID) => {
|
||||||
|
data.inspectionDialog.visible = true;
|
||||||
|
data.inspectionDialog.SPECIALEQUIPMENT_ID = SPECIALEQUIPMENT_ID;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -0,0 +1,130 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="80px"
|
||||||
|
@submit.prevent="fnResetPaginationTransfer"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="巡检时间" prop="dates">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.dates"
|
||||||
|
type="daterange"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="状态">
|
||||||
|
<el-select v-model="searchForm.IS_CHECKED">
|
||||||
|
<el-option :value="0" label="已检查" />
|
||||||
|
<el-option :value="1" label="未检查" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
:data="list"
|
||||||
|
v-model:pagination="data.pagination"
|
||||||
|
@get-data="fnGetDataTransfer"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="INSPECTIONTIME" label="巡检时间" />
|
||||||
|
<el-table-column prop="INSPECTOR" label="巡检人" />
|
||||||
|
<el-table-column prop="ISFAULT" label="是否有故障" />
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.edit"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnView(row.SPECIALEQUIPMENTAQXJ_ID)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
<inspection-records-view
|
||||||
|
v-model:visible="data.viewDialog.visible"
|
||||||
|
:info="data.viewDialog.info"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive } from "vue";
|
||||||
|
import { addingPrefixToFile, serialNumber } from "@/assets/js/utils";
|
||||||
|
import {
|
||||||
|
getSafetyInspectionInspectionRecordsList,
|
||||||
|
getSafetyInspectionInspectionRecordsView,
|
||||||
|
} from "@/request/equipment_facility_management.js";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import InspectionRecordsView from "./components/inspection_records_view.vue";
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const { SPECIALEQUIPMENT_ID } = route.query;
|
||||||
|
const { list, pagination, searchForm, fnResetPagination, fnGetData } =
|
||||||
|
useListData(getSafetyInspectionInspectionRecordsList, {
|
||||||
|
otherParams: { SPECIALEQUIPMENT_ID },
|
||||||
|
defaultSearchForm: { IS_CHECKED: 0 },
|
||||||
|
});
|
||||||
|
const data = reactive({
|
||||||
|
viewDialog: {
|
||||||
|
visible: false,
|
||||||
|
info: {},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const fnGetDataTransfer = async () => {
|
||||||
|
fnGetData({
|
||||||
|
STARTTIME: searchForm.value.dates?.[0],
|
||||||
|
ENDTIME: searchForm.value.dates?.[1],
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const fnResetPaginationTransfer = async () => {
|
||||||
|
fnResetPagination({
|
||||||
|
STARTTIME: searchForm.value.dates?.[0],
|
||||||
|
ENDTIME: searchForm.value.dates?.[1],
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const buttonJurisdiction = await useButtonJurisdiction("specialequipmentaqxj");
|
||||||
|
const fnView = async (SPECIALEQUIPMENTAQXJ_ID) => {
|
||||||
|
data.viewDialog.visible = true;
|
||||||
|
const resData = await getSafetyInspectionInspectionRecordsView({
|
||||||
|
SPECIALEQUIPMENTAQXJ_ID,
|
||||||
|
});
|
||||||
|
data.viewDialog.info = resData.pd;
|
||||||
|
data.viewDialog.info.inspectionPhotos = addingPrefixToFile(
|
||||||
|
resData.inspectionImgs
|
||||||
|
);
|
||||||
|
data.viewDialog.info.faultPhotos = addingPrefixToFile(resData.faultImgs);
|
||||||
|
data.viewDialog.info.faultAfterProcessingPhotos = addingPrefixToFile(
|
||||||
|
resData.handleImgs
|
||||||
|
);
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -86,7 +86,7 @@ import { reactive, ref } from "vue";
|
||||||
import { debounce } from "throttle-debounce";
|
import { debounce } from "throttle-debounce";
|
||||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { layoutFnGetPersonnelmanagementJobType } from "@/assets/js/data_dictionary";
|
import { layoutFnGetPersonnelManagementJobType } from "@/assets/js/data_dictionary";
|
||||||
import {
|
import {
|
||||||
getUnitsListAll,
|
getUnitsListAll,
|
||||||
setPersonnelmanagementAdd,
|
setPersonnelmanagementAdd,
|
||||||
|
@ -161,7 +161,7 @@ const fnSubmit = debounce(
|
||||||
{ atBegin: true }
|
{ atBegin: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
const jobtypeList = await layoutFnGetPersonnelmanagementJobType();
|
const jobtypeList = await layoutFnGetPersonnelManagementJobType();
|
||||||
const fnUnitsListAll = async () => {
|
const fnUnitsListAll = async () => {
|
||||||
const resData = await getUnitsListAll();
|
const resData = await getUnitsListAll();
|
||||||
data.unitsnameList = resData.varList;
|
data.unitsnameList = resData.varList;
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { layoutFnGetPersonnelmanagementJobType } from "@/assets/js/data_dictionary";
|
import { layoutFnGetPersonnelManagementJobType } from "@/assets/js/data_dictionary";
|
||||||
import useListData from "@/assets/js/useListData";
|
import useListData from "@/assets/js/useListData";
|
||||||
import { serialNumber } from "@/assets/js/utils";
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
import {
|
import {
|
||||||
|
@ -131,7 +131,7 @@ import Edit from "./components/edit.vue";
|
||||||
|
|
||||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||||
useListData(getPersonnelmanagementList);
|
useListData(getPersonnelmanagementList);
|
||||||
const jobtypeList = await layoutFnGetPersonnelmanagementJobType();
|
const jobtypeList = await layoutFnGetPersonnelManagementJobType();
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
type: "",
|
type: "",
|
||||||
title: "",
|
title: "",
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="fnDeleteAll"
|
@click="fnDeleteAll"
|
||||||
>
|
>
|
||||||
删除
|
批量删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</layout-table>
|
</layout-table>
|
||||||
|
|
|
@ -201,11 +201,10 @@
|
||||||
data.oldInfo.BRANCHEMERGENCYPLAN_FILEPATH
|
data.oldInfo.BRANCHEMERGENCYPLAN_FILEPATH
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<span>
|
<span class="line-2">
|
||||||
{{ data.info.BRANCHEMERGENCYPLAN_NAME }}
|
{{ data.info.BRANCHEMERGENCYPLAN_NAME }}
|
||||||
</span>
|
</span>
|
||||||
<el-button
|
<el-button
|
||||||
class="ml-10"
|
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="
|
@click="
|
||||||
useDownloadFile(
|
useDownloadFile(
|
||||||
|
@ -219,9 +218,10 @@
|
||||||
</template>
|
</template>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span>{{ data.oldInfo.BRANCHEMERGENCYPLAN_NAME }}</span>
|
<span class="line-2">
|
||||||
|
{{ data.oldInfo.BRANCHEMERGENCYPLAN_NAME }}
|
||||||
|
</span>
|
||||||
<el-button
|
<el-button
|
||||||
class="ml-10"
|
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="
|
@click="
|
||||||
useDownloadFile(
|
useDownloadFile(
|
||||||
|
|
|
@ -127,7 +127,7 @@
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="fnDeleteAll"
|
@click="fnDeleteAll"
|
||||||
>
|
>
|
||||||
删除
|
批量删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</layout-table>
|
</layout-table>
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="fnDeleteAll"
|
@click="fnDeleteAll"
|
||||||
>
|
>
|
||||||
删除
|
批量删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</layout-table>
|
</layout-table>
|
||||||
|
|
|
@ -0,0 +1,101 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-model="visible"
|
||||||
|
:title="type === 'add' ? '新增' : '修改'"
|
||||||
|
:on-close="fnClose"
|
||||||
|
>
|
||||||
|
<el-form ref="formRef" :model="form" :rules="rules" label-width="110px">
|
||||||
|
<el-form-item label="检查时间" prop="CHECKTIME">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.CHECKTIME"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="检查人员数量" prop="CHECKNUM">
|
||||||
|
<el-input v-model.number="form.CHECKNUM" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="检查机构" prop="CHECKAGENCY">
|
||||||
|
<el-input v-model="form.CHECKAGENCY" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="检查情况" prop="CHECKOUT">
|
||||||
|
<el-input v-model="form.CHECKOUT" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="REMARKS">
|
||||||
|
<el-input
|
||||||
|
v-model="form.REMARKS"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 3 }"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="fnClose">取消</el-button>
|
||||||
|
<el-button type="primary" @click="fnSubmit">确定</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { useVModels } from "@vueuse/core";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import {
|
||||||
|
setEnterprisesOccupationalHealthAdd,
|
||||||
|
setEnterprisesOccupationalHealthEdit,
|
||||||
|
} from "@/request/occupational_health_management.js";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||||
|
const { visible, form } = useVModels(props, emits);
|
||||||
|
const rules = {
|
||||||
|
CHECKTIME: [{ required: true, message: "请选择检查时间", trigger: "change" }],
|
||||||
|
CHECKNUM: [
|
||||||
|
{ required: true, message: "检查人员数量不能为空", trigger: "blur" },
|
||||||
|
{ type: "number", message: "检查人员数量必须为数字" },
|
||||||
|
],
|
||||||
|
CHECKAGENCY: [
|
||||||
|
{ required: true, message: "检查机构不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
CHECKOUT: [{ required: true, message: "检查情况不能为空", trigger: "blur" }],
|
||||||
|
};
|
||||||
|
const formRef = ref(null);
|
||||||
|
const fnClose = () => {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
const fnSubmit = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
await useFormValidate(formRef);
|
||||||
|
props.type === "add"
|
||||||
|
? await setEnterprisesOccupationalHealthAdd({ ...form.value })
|
||||||
|
: await setEnterprisesOccupationalHealthEdit({ ...form.value });
|
||||||
|
ElMessage.success("提交成功");
|
||||||
|
fnClose();
|
||||||
|
emits("get-data");
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,219 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="80px"
|
||||||
|
@submit.prevent="fnResetPagination"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="关键字" prop="KEYWORDS">
|
||||||
|
<el-input v-model="searchForm.KEYWORDS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="事故级别" prop="CHECKTIME">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.CHECKTIME"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item
|
||||||
|
label="检查人员数量"
|
||||||
|
prop="CHECKNUM"
|
||||||
|
label-width="120"
|
||||||
|
>
|
||||||
|
<el-input v-model="searchForm.CHECKNUM" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPagination">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-form-item label-width="10px" class="end">
|
||||||
|
<el-button @click="fnExport"> 导出 </el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
ref="tableRef"
|
||||||
|
row-key="OCCUPATIONALHEALTH_ID"
|
||||||
|
:data="list"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
@get-data="fnGetData"
|
||||||
|
>
|
||||||
|
<el-table-column reserve-selection type="selection" width="55" />
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="CHECKTIME" label="检查时间" width="120" />
|
||||||
|
<el-table-column prop="CHECKNUM" label="检查人员数量" width="120" />
|
||||||
|
<el-table-column
|
||||||
|
prop="CHECKAGENCY"
|
||||||
|
label="检查机构"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="CHECKOUT"
|
||||||
|
label="检查情况"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column prop="REMARKS" label="备注" show-overflow-tooltip />
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.edit"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnAddOrEdit(row.OCCUPATIONALHEALTH_ID, 'edit')"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnDelete(row.OCCUPATIONALHEALTH_ID)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template #button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.add"
|
||||||
|
type="primary"
|
||||||
|
@click="fnAddOrEdit('', 'add')"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="danger"
|
||||||
|
@click="fnDeleteAll"
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
<add
|
||||||
|
v-model:visible="data.addOrEditDialog.visible"
|
||||||
|
v-model:form="data.addOrEditDialog.form"
|
||||||
|
:type="data.addOrEditDialog.type"
|
||||||
|
@get-data="fnResetPagination"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import {
|
||||||
|
getEnterprisesOccupationalHealthList,
|
||||||
|
getEnterprisesOccupationalHealthView,
|
||||||
|
setEnterprisesOccupationalHealthDelete,
|
||||||
|
setEnterprisesOccupationalHealthDeleteMultiple,
|
||||||
|
} from "@/request/occupational_health_management.js";
|
||||||
|
import { reactive } from "vue";
|
||||||
|
import Add from "./components/add.vue";
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
addOrEditDialog: {
|
||||||
|
visible: false,
|
||||||
|
type: "",
|
||||||
|
form: {
|
||||||
|
CHECKTIME: "",
|
||||||
|
CHECKNUM: "",
|
||||||
|
CHECKAGENCY: "",
|
||||||
|
CHECKOUT: "",
|
||||||
|
REMARKS: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const { list, pagination, searchForm, fnResetPagination, fnGetData, tableRef } =
|
||||||
|
useListData(getEnterprisesOccupationalHealthList);
|
||||||
|
const buttonJurisdiction = await useButtonJurisdiction("occupationalhealth");
|
||||||
|
const fnDelete = debounce(
|
||||||
|
1000,
|
||||||
|
async (OCCUPATIONALHEALTH_ID) => {
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setEnterprisesOccupationalHealthDelete({ OCCUPATIONALHEALTH_ID });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPagination();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
const fnDeleteAll = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
|
if (selectionData.length === 0) {
|
||||||
|
ElMessage.warning("请选择要删除的数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const DATA_IDS = selectionData
|
||||||
|
.map((item) => item.OCCUPATIONALHEALTH_ID)
|
||||||
|
.join(",");
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setEnterprisesOccupationalHealthDeleteMultiple({ DATA_IDS });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPagination();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
const fnAddOrEdit = async (OCCUPATIONALHEALTH_ID, type) => {
|
||||||
|
data.addOrEditDialog.visible = true;
|
||||||
|
data.addOrEditDialog.type = type;
|
||||||
|
if (type === "edit") {
|
||||||
|
const resData = await getEnterprisesOccupationalHealthView({
|
||||||
|
OCCUPATIONALHEALTH_ID,
|
||||||
|
});
|
||||||
|
data.addOrEditDialog.form = resData.pd;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const fnExport = async () => {
|
||||||
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
|
if (selectionData.length === 0) {
|
||||||
|
ElMessage.warning("请选择需要导出至excel报表的记录信息");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await ElMessageBox.confirm("确定要导出到excel吗?", { type: "warning" });
|
||||||
|
const DATA_IDS = selectionData
|
||||||
|
.map((item) => item.OCCUPATIONALHEALTH_ID)
|
||||||
|
.join(",");
|
||||||
|
window.location.href =
|
||||||
|
import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] +
|
||||||
|
"/occupationalhealth/excel?" +
|
||||||
|
"&KEYWORDS=" +
|
||||||
|
(searchForm.value.KEYWORDS || "") +
|
||||||
|
"&CHECKTIME=" +
|
||||||
|
(searchForm.value.CHECKTIME || "") +
|
||||||
|
"&CHECKNUM=" +
|
||||||
|
(searchForm.value.CHECKNUM || "") +
|
||||||
|
"&DATA_IDS=" +
|
||||||
|
DATA_IDS;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -0,0 +1,120 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-model="visible"
|
||||||
|
:title="type === 'add' ? '新增' : '修改'"
|
||||||
|
:on-close="fnClose"
|
||||||
|
>
|
||||||
|
<el-form ref="formRef" :model="form" :rules="rules" label-width="150px">
|
||||||
|
<el-form-item label="职业病危害因素名称" prop="NAME">
|
||||||
|
<el-input v-model="form.NAME" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="检测时间" prop="DETECTIONTIME">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.DETECTIONTIME"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="检测机构" prop="MECHANISM">
|
||||||
|
<el-input v-model="form.MECHANISM" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="地点" prop="LOCATION">
|
||||||
|
<el-input v-model="form.LOCATION" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否超标" prop="EXCESSIVE">
|
||||||
|
<el-select v-model="form.EXCESSIVE">
|
||||||
|
<el-option
|
||||||
|
v-for="item in excessiveList"
|
||||||
|
:key="item.ID"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.NAME"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="检测情况" prop="DETECTION">
|
||||||
|
<el-input v-model="form.DETECTION" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="预防措施" prop="PRECAUTIONARY">
|
||||||
|
<el-input v-model="form.PRECAUTIONARY" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="fnClose">取消</el-button>
|
||||||
|
<el-button type="primary" @click="fnSubmit">确定</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { useVModels } from "@vueuse/core";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import {
|
||||||
|
setOccupationalHazardFactorsAdd,
|
||||||
|
setOccupationalHazardFactorsEdit,
|
||||||
|
} from "@/request/occupational_health_management.js";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||||
|
const { visible, form } = useVModels(props, emits);
|
||||||
|
const excessiveList = [
|
||||||
|
{ ID: "0", NAME: "否" },
|
||||||
|
{ ID: "1", NAME: "是" },
|
||||||
|
];
|
||||||
|
const rules = {
|
||||||
|
NAME: [
|
||||||
|
{ required: true, message: "职业病危害因素名称不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
DETECTIONTIME: [
|
||||||
|
{ required: true, message: "请选择检测时间", trigger: "change" },
|
||||||
|
],
|
||||||
|
MECHANISM: [{ required: true, message: "检测机构不能为空", trigger: "blur" }],
|
||||||
|
LOCATION: [{ required: true, message: "地点不能为空", trigger: "blur" }],
|
||||||
|
EXCESSIVE: [
|
||||||
|
{ required: true, message: "是否超标不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
DETECTION: [{ required: true, message: "检测情况不能为空", trigger: "blur" }],
|
||||||
|
PRECAUTIONARY: [
|
||||||
|
{ required: true, message: "预防措施不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const formRef = ref(null);
|
||||||
|
const fnClose = () => {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
const fnSubmit = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
await useFormValidate(formRef);
|
||||||
|
props.type === "add"
|
||||||
|
? await setOccupationalHazardFactorsAdd({ ...form.value })
|
||||||
|
: await setOccupationalHazardFactorsEdit({ ...form.value });
|
||||||
|
ElMessage.success("提交成功");
|
||||||
|
fnClose();
|
||||||
|
emits("get-data");
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,228 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="80px"
|
||||||
|
@submit.prevent="fnResetPagination"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="关键字" prop="KEYWORDS">
|
||||||
|
<el-input v-model="searchForm.KEYWORDS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="检测时间" prop="DETECTIONTIME">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.DETECTIONTIME"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="是否超标" prop="EXCESSIVE">
|
||||||
|
<el-select v-model="searchForm.EXCESSIVE">
|
||||||
|
<el-option
|
||||||
|
v-for="item in excessiveList"
|
||||||
|
:key="item.ID"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.NAME"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPagination">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-form-item label-width="10px" class="end">
|
||||||
|
<el-button @click="fnExport"> 导出 </el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
ref="tableRef"
|
||||||
|
row-key="OCCUPATIONALHAZARD_ID"
|
||||||
|
:data="list"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
@get-data="fnGetData"
|
||||||
|
>
|
||||||
|
<el-table-column reserve-selection type="selection" width="55" />
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="NAME"
|
||||||
|
label="职业病危害因素名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column prop="DETECTIONTIME" label="检测时间" width="120" />
|
||||||
|
<el-table-column
|
||||||
|
prop="MECHANISM"
|
||||||
|
label="检测机构"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column prop="LOCATION" label="地点" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="EXCESSIVE" label="是否超标" width="100" />
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.edit"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnAddOrEdit(row.OCCUPATIONALHAZARD_ID, 'edit')"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnDelete(row.OCCUPATIONALHAZARD_ID)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template #button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.add"
|
||||||
|
type="primary"
|
||||||
|
@click="fnAddOrEdit('', 'add')"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="danger"
|
||||||
|
@click="fnDeleteAll"
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
<add
|
||||||
|
v-model:visible="data.addOrEditDialog.visible"
|
||||||
|
v-model:form="data.addOrEditDialog.form"
|
||||||
|
:type="data.addOrEditDialog.type"
|
||||||
|
@get-data="fnResetPagination"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import {
|
||||||
|
getOccupationalHazardFactorsList,
|
||||||
|
getOccupationalHazardFactorsView,
|
||||||
|
setOccupationalHazardFactorsDelete,
|
||||||
|
setOccupationalHazardFactorsDeleteMultiple,
|
||||||
|
} from "@/request/occupational_health_management.js";
|
||||||
|
import { reactive } from "vue";
|
||||||
|
import Add from "./components/add.vue";
|
||||||
|
|
||||||
|
const excessiveList = [
|
||||||
|
{ ID: "0", NAME: "否" },
|
||||||
|
{ ID: "1", NAME: "是" },
|
||||||
|
];
|
||||||
|
const data = reactive({
|
||||||
|
addOrEditDialog: {
|
||||||
|
visible: false,
|
||||||
|
type: "",
|
||||||
|
form: {
|
||||||
|
NAME: "",
|
||||||
|
DETECTIONTIME: "",
|
||||||
|
MECHANISM: "",
|
||||||
|
LOCATION: "",
|
||||||
|
EXCESSIVE: "",
|
||||||
|
DETECTION: "",
|
||||||
|
PRECAUTIONARY: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const { list, pagination, searchForm, fnResetPagination, fnGetData, tableRef } =
|
||||||
|
useListData(getOccupationalHazardFactorsList);
|
||||||
|
const buttonJurisdiction = await useButtonJurisdiction("occupationalhazard");
|
||||||
|
const fnDelete = debounce(
|
||||||
|
1000,
|
||||||
|
async (OCCUPATIONALHAZARD_ID) => {
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setOccupationalHazardFactorsDelete({ OCCUPATIONALHAZARD_ID });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPagination();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
const fnDeleteAll = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
|
if (selectionData.length === 0) {
|
||||||
|
ElMessage.warning("请选择要删除的数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const DATA_IDS = selectionData
|
||||||
|
.map((item) => item.OCCUPATIONALHAZARD_ID)
|
||||||
|
.join(",");
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setOccupationalHazardFactorsDeleteMultiple({ DATA_IDS });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPagination();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
const fnAddOrEdit = async (OCCUPATIONALHAZARD_ID, type) => {
|
||||||
|
data.addOrEditDialog.visible = true;
|
||||||
|
data.addOrEditDialog.type = type;
|
||||||
|
if (type === "edit") {
|
||||||
|
const resData = await getOccupationalHazardFactorsView({
|
||||||
|
OCCUPATIONALHAZARD_ID,
|
||||||
|
});
|
||||||
|
data.addOrEditDialog.form = resData.pd;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const fnExport = async () => {
|
||||||
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
|
if (selectionData.length === 0) {
|
||||||
|
ElMessage.warning("请选择需要导出至excel报表的记录信息");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await ElMessageBox.confirm("确定要导出到excel吗?", { type: "warning" });
|
||||||
|
const DATA_IDS = selectionData
|
||||||
|
.map((item) => item.OCCUPATIONALHAZARD_ID)
|
||||||
|
.join(",");
|
||||||
|
window.location.href =
|
||||||
|
import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] +
|
||||||
|
"/occupationalhazard/excel?" +
|
||||||
|
"&KEYWORDS=" +
|
||||||
|
(searchForm.value.KEYWORDS || "") +
|
||||||
|
"&DETECTIONTIME=" +
|
||||||
|
(searchForm.value.DETECTIONTIME || "") +
|
||||||
|
"&EXCESSIVE=" +
|
||||||
|
(searchForm.value.EXCESSIVE || "") +
|
||||||
|
"&DATA_IDS=" +
|
||||||
|
DATA_IDS;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -0,0 +1,260 @@
|
||||||
|
<template>
|
||||||
|
<layout-card>
|
||||||
|
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-divider content-position="left">劳动者基本情况</el-divider>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="姓名" prop="NAME">
|
||||||
|
<el-input v-model="form.NAME" placeholder="请输入姓名" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="所属部门" prop="DEPARTMENT_ID">
|
||||||
|
<layout-department v-model="form.DEPARTMENT_ID" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="检查时间:" prop="CHECKTIME">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.CHECKTIME"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="检查机构:" prop="CHECKAGENT">
|
||||||
|
<el-input v-model="form.CHECKAGENT" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="检查情况:" prop="CHECKOUT">
|
||||||
|
<el-input v-model="form.CHECKOUT" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="在岗情况:" prop="ONSITUATION">
|
||||||
|
<el-select v-model="form.ONSITUATION">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dutySituationList"
|
||||||
|
:key="item.ID"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.NAME"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="备注:" prop="REMARKS">
|
||||||
|
<el-input
|
||||||
|
v-model="form.REMARKS"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 3 }"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-divider content-position="left">职业健康检查</el-divider>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="上岗时间:" prop="STARTINGTIME">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.STARTINGTIME"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="离岗时间:" prop="OUTTIME">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.OUTTIME"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="岗位检查情况:" prop="POSTINSPECTION">
|
||||||
|
<el-input v-model="form.POSTINSPECTION" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="在岗检查情况:" prop="ONINSPECTION">
|
||||||
|
<el-input v-model="form.ONINSPECTION" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="离岗检查情况:" prop="OUTINSPECTION">
|
||||||
|
<el-input v-model="form.OUTINSPECTION" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="备注:" prop="REMARK">
|
||||||
|
<el-input
|
||||||
|
v-model="form.REMARKS2"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 3 }"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-divider content-position="left">职业病诊疗情况</el-divider>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="确认日期:" prop="CONFIRMATIONTIME">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.CONFIRMATIONTIME"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="诊断疾病名称:" prop="DISEASENAME">
|
||||||
|
<el-input v-model="form.DISEASENAME" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="治疗情况:" prop="TREATMENT">
|
||||||
|
<el-input v-model="form.TREATMENT" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="备注:" prop="REMARK">
|
||||||
|
<el-input
|
||||||
|
v-model="form.REMARKS3"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 3 }"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-divider content-position="left">职业禁忌证</el-divider>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="职业禁忌证:" prop="CONTRAINDICATION">
|
||||||
|
<el-select v-model="form.CONTRAINDICATION">
|
||||||
|
<el-option
|
||||||
|
v-for="item in contraindicationList"
|
||||||
|
:key="item.ID"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.NAME"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="作业性质:" prop="NATURE">
|
||||||
|
<el-input v-model="form.NATURE" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="检查时间:" prop="CHECKTIME2">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.CHECKTIME2"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="检查机构:" prop="CHECKAGENT2">
|
||||||
|
<el-input v-model="form.CHECKAGENT2" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div class="mt-10 tc">
|
||||||
|
<el-button type="primary" @click="fnSubmit">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</layout-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import LayoutDepartment from "@/components/department/index.vue";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import { useRoute, useRouter } from "vue-router";
|
||||||
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import {
|
||||||
|
getOccupationalHealthRecordsView,
|
||||||
|
setOccupationalHealthRecordsAdd,
|
||||||
|
setOccupationalHealthRecordsEdit,
|
||||||
|
} from "@/request/occupational_health_management.js";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const { HEALTHRECORDS_ID } = route.query;
|
||||||
|
const dutySituationList = [
|
||||||
|
{ ID: "0", NAME: "在岗" },
|
||||||
|
{ ID: "1", NAME: "离岗" },
|
||||||
|
];
|
||||||
|
const contraindicationList = [
|
||||||
|
{ ID: "0", NAME: "尘肺病" },
|
||||||
|
{ ID: "1", NAME: "棉尘病" },
|
||||||
|
{ ID: "2", NAME: "恐高症" },
|
||||||
|
{ ID: "3", NAME: "肺结核" },
|
||||||
|
];
|
||||||
|
const rules = {
|
||||||
|
NAME: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
|
||||||
|
DEPARTMENT_ID: [
|
||||||
|
{ required: true, message: "所属部门不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
ONSITUATION: [
|
||||||
|
{ required: true, message: "在岗情况不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const form = ref({
|
||||||
|
NAME: "",
|
||||||
|
DEPARTMENT_ID: "",
|
||||||
|
CHECKTIME: "",
|
||||||
|
CHECKAGENT: "",
|
||||||
|
CHECKOUT: "",
|
||||||
|
ONSITUATION: "",
|
||||||
|
REMARKS: "",
|
||||||
|
STARTINGTIME: "",
|
||||||
|
OUTTIME: "",
|
||||||
|
POSTINSPECTION: "",
|
||||||
|
ONINSPECTION: "",
|
||||||
|
OUTINSPECTION: "",
|
||||||
|
REMARKS2: "",
|
||||||
|
CONFIRMATIONTIME: "",
|
||||||
|
DISEASENAME: "",
|
||||||
|
TREATMENT: "",
|
||||||
|
REMARKS3: "",
|
||||||
|
CONTRAINDICATION: "",
|
||||||
|
NATURE: "",
|
||||||
|
CHECKTIME2: "",
|
||||||
|
CHECKAGENT2: "",
|
||||||
|
});
|
||||||
|
const formRef = ref(null);
|
||||||
|
const fnGetData = async () => {
|
||||||
|
if (!HEALTHRECORDS_ID) return;
|
||||||
|
const resData = await getOccupationalHealthRecordsView({ HEALTHRECORDS_ID });
|
||||||
|
form.value = resData.pd;
|
||||||
|
};
|
||||||
|
fnGetData();
|
||||||
|
const fnSubmit = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
await useFormValidate(formRef);
|
||||||
|
!HEALTHRECORDS_ID
|
||||||
|
? await setOccupationalHealthRecordsAdd({ ...form.value })
|
||||||
|
: await setOccupationalHealthRecordsEdit({ ...form.value });
|
||||||
|
ElMessage.success("提交成功");
|
||||||
|
router.back();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,236 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="80px"
|
||||||
|
@submit.prevent="fnResetPaginationTransfer"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="关键字" prop="KEYWORDS">
|
||||||
|
<el-input v-model="searchForm.KEYWORDS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="检查时间" prop="CHECKTIME">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.CHECKTIME"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="在岗情况" prop="ONSITUATION">
|
||||||
|
<el-select v-model="searchForm.ONSITUATION">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dutySituationList"
|
||||||
|
:key="item.ID"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.NAME"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="所属部门" prop="DEPARTMENT_ID">
|
||||||
|
<layout-department
|
||||||
|
v-model="searchForm.DEPARTMENT_ID"
|
||||||
|
show-checkbox
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label-width="10px" class="end">
|
||||||
|
<el-button @click="fnExport"> 导出 </el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
ref="tableRef"
|
||||||
|
row-key="HEALTHRECORDS_ID"
|
||||||
|
:data="list"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
@get-data="fnGetDataTransfer"
|
||||||
|
>
|
||||||
|
<el-table-column reserve-selection type="selection" width="55" />
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="NAME"
|
||||||
|
label="姓名"
|
||||||
|
width="100"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="DEPT_NAME_ALL"
|
||||||
|
label="所属部门"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column prop="CHECKTIME" label="检查时间" width="120" />
|
||||||
|
<el-table-column
|
||||||
|
prop="CHECKAGENT"
|
||||||
|
label="检查机构"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="CHECKOUT"
|
||||||
|
label="检查情况"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column prop="ONSITUATION" label="在岗情况" width="100" />
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.edit"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/occupational_health_management/occupational_health_records/edit',
|
||||||
|
query: { HEALTHRECORDS_ID: row.HEALTHRECORDS_ID },
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnDelete(row.HEALTHRECORDS_ID)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template #button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.add"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/occupational_health_management/occupational_health_records/add',
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="danger"
|
||||||
|
@click="fnDeleteAll"
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import {
|
||||||
|
getOccupationalHealthRecordsList,
|
||||||
|
setOccupationalHealthRecordsDelete,
|
||||||
|
setOccupationalHealthRecordsDeleteMultiple,
|
||||||
|
} from "@/request/occupational_health_management.js";
|
||||||
|
import LayoutDepartment from "@/components/department/index.vue";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const dutySituationList = [
|
||||||
|
{ ID: "0", NAME: "在岗" },
|
||||||
|
{ ID: "1", NAME: "离岗" },
|
||||||
|
];
|
||||||
|
const { list, pagination, searchForm, fnResetPagination, fnGetData, tableRef } =
|
||||||
|
useListData(getOccupationalHealthRecordsList);
|
||||||
|
const fnGetDataTransfer = () => {
|
||||||
|
fnGetData({
|
||||||
|
DEPARTMENT_ID: searchForm.value.DEPARTMENT_ID?.join(","),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const fnResetPaginationTransfer = () => {
|
||||||
|
fnResetPagination({
|
||||||
|
DEPARTMENT_ID: searchForm.value.DEPARTMENT_ID?.join(","),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const buttonJurisdiction = await useButtonJurisdiction("healthrecords");
|
||||||
|
const fnDelete = debounce(
|
||||||
|
1000,
|
||||||
|
async (HEALTHRECORDS_ID) => {
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setOccupationalHealthRecordsDelete({ HEALTHRECORDS_ID });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPaginationTransfer();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
const fnDeleteAll = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
|
if (selectionData.length === 0) {
|
||||||
|
ElMessage.warning("请选择要删除的数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const DATA_IDS = selectionData
|
||||||
|
.map((item) => item.HEALTHRECORDS_ID)
|
||||||
|
.join(",");
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setOccupationalHealthRecordsDeleteMultiple({ DATA_IDS });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPaginationTransfer();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
const fnExport = async () => {
|
||||||
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
|
if (selectionData.length === 0) {
|
||||||
|
ElMessage.warning("请选择需要导出至excel报表的记录信息");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await ElMessageBox.confirm("确定要导出到excel吗?", { type: "warning" });
|
||||||
|
const DATA_IDS = selectionData.map((item) => item.HEALTHRECORDS_ID).join(",");
|
||||||
|
window.location.href =
|
||||||
|
import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] +
|
||||||
|
"/healthrecords/excel?" +
|
||||||
|
"&KEYWORDS=" +
|
||||||
|
(searchForm.value.KEYWORDS || "") +
|
||||||
|
"&CHECKTIME=" +
|
||||||
|
(searchForm.value.CHECKTIME || "") +
|
||||||
|
"&ONSITUATION=" +
|
||||||
|
(searchForm.value.ONSITUATION || "") +
|
||||||
|
"&DEPARTMENT_ID=" +
|
||||||
|
(searchForm.value.DEPARTMENT_ID?.join(",") || "") +
|
||||||
|
"&DATA_IDS=" +
|
||||||
|
DATA_IDS;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -0,0 +1,124 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-model="visible"
|
||||||
|
:title="type === 'add' ? '新增' : '修改'"
|
||||||
|
:on-close="fnClose"
|
||||||
|
>
|
||||||
|
<el-form ref="formRef" :model="form" :rules="rules" label-width="150px">
|
||||||
|
<el-form-item label="职业卫生培训名称" prop="TRAININGNAME">
|
||||||
|
<el-input v-model="form.TRAININGNAME" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="参加培训部门" prop="DEPARTMENT_ID">
|
||||||
|
<layout-department v-model="form.DEPARTMENT_ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="培训人数" prop="TRAININGNUM">
|
||||||
|
<el-input v-model.number="form.TRAININGNUM" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="培训日期" prop="TRAININGTIME">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.TRAININGTIME"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="培训情况 " prop="SITUATION">
|
||||||
|
<el-input v-model="form.SITUATION" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="培训计划名称" prop="PROJECTNAME">
|
||||||
|
<el-select v-model="form.PROJECTNAME">
|
||||||
|
<el-option
|
||||||
|
v-for="item in projectNameList"
|
||||||
|
:key="item.ID"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.NAME"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="REMARKS">
|
||||||
|
<el-input v-model="form.REMARKS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="fnClose">取消</el-button>
|
||||||
|
<el-button type="primary" @click="fnSubmit">确定</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { useVModels } from "@vueuse/core";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import {
|
||||||
|
setOccupationalHealthTrainingAdd,
|
||||||
|
setOccupationalHealthTrainingEdit,
|
||||||
|
} from "@/request/occupational_health_management.js";
|
||||||
|
import LayoutDepartment from "@/components/department/index.vue";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||||
|
const { visible, form } = useVModels(props, emits);
|
||||||
|
const projectNameList = [
|
||||||
|
{ ID: "0", NAME: "开会" },
|
||||||
|
{ ID: "1", NAME: "锻炼" },
|
||||||
|
{ ID: "2", NAME: "休息" },
|
||||||
|
];
|
||||||
|
const rules = {
|
||||||
|
TRAININGNAME: [
|
||||||
|
{ required: true, message: "职业卫生培训名称不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
DEPARTMENT_ID: [
|
||||||
|
{ required: true, message: "参加培训部门不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
TRAININGNUM: [
|
||||||
|
{ required: true, message: "培训人数不能为空", trigger: "change" },
|
||||||
|
{ type: "number", message: "培训人数必须为数字" },
|
||||||
|
],
|
||||||
|
TRAININGTIME: [
|
||||||
|
{ required: true, message: "请选择培训日期", trigger: "change" },
|
||||||
|
],
|
||||||
|
SITUATION: [{ required: true, message: "培训情况不能为空", trigger: "blur" }],
|
||||||
|
PROJECTNAME: [
|
||||||
|
{ required: true, message: "培训计划名称不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const formRef = ref(null);
|
||||||
|
const fnClose = () => {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
const fnSubmit = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
await useFormValidate(formRef);
|
||||||
|
props.type === "add"
|
||||||
|
? await setOccupationalHealthTrainingAdd({ ...form.value })
|
||||||
|
: await setOccupationalHealthTrainingEdit({ ...form.value });
|
||||||
|
ElMessage.success("提交成功");
|
||||||
|
fnClose();
|
||||||
|
emits("get-data");
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,248 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="80px"
|
||||||
|
@submit.prevent="fnResetPaginationTransfer"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="关键字" prop="KEYWORDS">
|
||||||
|
<el-input v-model="searchForm.KEYWORDS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="培训日期" prop="TRAININGTIME">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.TRAININGTIME"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="培训人数" prop="TRAININGNUM">
|
||||||
|
<el-input v-model="searchForm.TRAININGNUM" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item
|
||||||
|
label="参加培训部门"
|
||||||
|
prop="DEPARTMENT_ID"
|
||||||
|
label-width="110"
|
||||||
|
>
|
||||||
|
<layout-department
|
||||||
|
v-model="searchForm.DEPARTMENT_ID"
|
||||||
|
show-checkbox
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label-width="10px" class="end">
|
||||||
|
<el-button @click="fnExport"> 导出 </el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
ref="tableRef"
|
||||||
|
row-key="HEALTHTRAINING_ID"
|
||||||
|
:data="list"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
@get-data="fnGetDataTransfer"
|
||||||
|
>
|
||||||
|
<el-table-column reserve-selection type="selection" width="55" />
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="TRAININGNAME"
|
||||||
|
label="职业卫生培训名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="DEPT_NAME_ALL"
|
||||||
|
label="参加培训部门"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column prop="TRAININGNUM" label="培训人数" width="120" />
|
||||||
|
<el-table-column prop="TRAININGTIME" label="培训日期" width="120" />
|
||||||
|
<el-table-column
|
||||||
|
prop="SITUATION"
|
||||||
|
label="培训情况"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.edit"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnAddOrEdit(row.HEALTHTRAINING_ID, 'edit')"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnDelete(row.HEALTHTRAINING_ID)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template #button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.add"
|
||||||
|
type="primary"
|
||||||
|
@click="fnAddOrEdit('', 'add')"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="danger"
|
||||||
|
@click="fnDeleteAll"
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
<add
|
||||||
|
v-model:visible="data.addOrEditDialog.visible"
|
||||||
|
v-model:form="data.addOrEditDialog.form"
|
||||||
|
:type="data.addOrEditDialog.type"
|
||||||
|
@get-data="fnResetPaginationTransfer"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import {
|
||||||
|
getOccupationalHealthTrainingList,
|
||||||
|
getOccupationalHealthTrainingView,
|
||||||
|
setOccupationalHealthTrainingDelete,
|
||||||
|
setOccupationalHealthTrainingDeleteMultiple,
|
||||||
|
} from "@/request/occupational_health_management.js";
|
||||||
|
import { reactive } from "vue";
|
||||||
|
import Add from "./components/add.vue";
|
||||||
|
import LayoutDepartment from "@/components/department/index.vue";
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
addOrEditDialog: {
|
||||||
|
visible: false,
|
||||||
|
type: "",
|
||||||
|
form: {
|
||||||
|
TRAININGNAME: "",
|
||||||
|
DEPARTMENT_ID: "",
|
||||||
|
TRAININGNUM: "",
|
||||||
|
TRAININGTIME: "",
|
||||||
|
SITUATION: "",
|
||||||
|
PROJECTNAME: "",
|
||||||
|
REMARKS: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const { list, pagination, searchForm, fnResetPagination, fnGetData, tableRef } =
|
||||||
|
useListData(getOccupationalHealthTrainingList);
|
||||||
|
const fnGetDataTransfer = () => {
|
||||||
|
fnGetData({
|
||||||
|
DEPARTMENT_ID: searchForm.value.DEPARTMENT_ID?.join(","),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const fnResetPaginationTransfer = () => {
|
||||||
|
fnResetPagination({
|
||||||
|
DEPARTMENT_ID: searchForm.value.DEPARTMENT_ID?.join(","),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const buttonJurisdiction = await useButtonJurisdiction("healthtraining");
|
||||||
|
const fnDelete = debounce(
|
||||||
|
1000,
|
||||||
|
async (HEALTHTRAINING_ID) => {
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setOccupationalHealthTrainingDelete({ HEALTHTRAINING_ID });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPaginationTransfer();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
const fnDeleteAll = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
|
if (selectionData.length === 0) {
|
||||||
|
ElMessage.warning("请选择要删除的数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const DATA_IDS = selectionData
|
||||||
|
.map((item) => item.HEALTHTRAINING_ID)
|
||||||
|
.join(",");
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setOccupationalHealthTrainingDeleteMultiple({ DATA_IDS });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPaginationTransfer();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
const fnAddOrEdit = async (HEALTHTRAINING_ID, type) => {
|
||||||
|
data.addOrEditDialog.visible = true;
|
||||||
|
data.addOrEditDialog.type = type;
|
||||||
|
if (type === "edit") {
|
||||||
|
const resData = await getOccupationalHealthTrainingView({
|
||||||
|
HEALTHTRAINING_ID,
|
||||||
|
});
|
||||||
|
data.addOrEditDialog.form = resData.pd;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const fnExport = async () => {
|
||||||
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
|
if (selectionData.length === 0) {
|
||||||
|
ElMessage.warning("请选择需要导出至excel报表的记录信息");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await ElMessageBox.confirm("确定要导出到excel吗?", { type: "warning" });
|
||||||
|
const DATA_IDS = selectionData
|
||||||
|
.map((item) => item.HEALTHTRAINING_ID)
|
||||||
|
.join(",");
|
||||||
|
window.location.href =
|
||||||
|
import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] +
|
||||||
|
"/healthtraining/excel?" +
|
||||||
|
"&KEYWORDS=" +
|
||||||
|
(searchForm.value.KEYWORDS || "") +
|
||||||
|
"&TRAININGTIME=" +
|
||||||
|
(searchForm.value.TRAININGTIME || "") +
|
||||||
|
"&TRAININGNUM=" +
|
||||||
|
(searchForm.value.TRAININGNUM || "") +
|
||||||
|
"&DEPARTMENT_ID=" +
|
||||||
|
(searchForm.value.DEPARTMENT_ID?.join(",") || "") +
|
||||||
|
"&DATA_IDS=" +
|
||||||
|
DATA_IDS;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -212,7 +212,7 @@ const fnExport = async () => {
|
||||||
import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] +
|
import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] +
|
||||||
"identificationparts/excel?" +
|
"identificationparts/excel?" +
|
||||||
"&KEYWORDS=" +
|
"&KEYWORDS=" +
|
||||||
searchForm.value.KEYWORDS +
|
(searchForm.value.KEYWORDS || "") +
|
||||||
"&DATA_IDS=" +
|
"&DATA_IDS=" +
|
||||||
DATA_IDS;
|
DATA_IDS;
|
||||||
};
|
};
|
||||||
|
|
|
@ -280,7 +280,7 @@ const fnExport = async () => {
|
||||||
import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] +
|
import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] +
|
||||||
"riskpoint/excel?" +
|
"riskpoint/excel?" +
|
||||||
"&KEYWORDS=" +
|
"&KEYWORDS=" +
|
||||||
searchForm.value.KEYWORDS +
|
(searchForm.value.KEYWORDS || "") +
|
||||||
"&DATA_IDS=" +
|
"&DATA_IDS=" +
|
||||||
DATA_IDS;
|
DATA_IDS;
|
||||||
};
|
};
|
||||||
|
|
|
@ -228,7 +228,7 @@ const fnExport = async () => {
|
||||||
import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] +
|
import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] +
|
||||||
"/riskunit/excel?" +
|
"/riskunit/excel?" +
|
||||||
"&KEYWORDS=" +
|
"&KEYWORDS=" +
|
||||||
searchForm.value.KEYWORDS +
|
(searchForm.value.KEYWORDS || "") +
|
||||||
"&DATA_IDS=" +
|
"&DATA_IDS=" +
|
||||||
DATA_IDS;
|
DATA_IDS;
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,238 @@
|
||||||
|
<template>
|
||||||
|
<layout-card>
|
||||||
|
<el-form ref="formRef" :rules="rules" :model="form" label-width="160px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="人员类型" prop="PTYPE">
|
||||||
|
<el-select v-model="form.PTYPE" @change="changeName">
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeList"
|
||||||
|
:key="item.ID"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.NAME"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" v-if="form.PTYPE === '相关方人员'">
|
||||||
|
<el-form-item label="单位名称" prop="UNITS_ID">
|
||||||
|
<el-select v-model="form.UNITS_ID" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in unitsNameList"
|
||||||
|
:key="item.UNITS_ID"
|
||||||
|
:label="item.UNITS_NAME"
|
||||||
|
:value="item.UNITS_ID"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" v-if="form.PTYPE !== '相关方人员'">
|
||||||
|
<el-form-item label="单位名称">
|
||||||
|
<el-input :model-value="CORP_NAME" readonly />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="作业类别" prop="JOB_TYPE">
|
||||||
|
<el-select v-model="form.JOB_TYPE">
|
||||||
|
<el-option
|
||||||
|
v-for="item in personnelManagementJobTypeList"
|
||||||
|
:key="item.DICTIONARIES_ID"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.DICTIONARIES_ID"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="特种作业证书编号" prop="CERTIFICATE_NUM">
|
||||||
|
<el-input v-model="form.CERTIFICATE_NUM" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="姓名" prop="NAME">
|
||||||
|
<el-input v-model="form.NAME" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="性别" prop="SEX">
|
||||||
|
<el-select v-model="form.SEX">
|
||||||
|
<el-option
|
||||||
|
v-for="item in sexList"
|
||||||
|
:key="item.ID"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.NAME"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="复审时间" prop="REVIEWTIME">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.REVIEWTIME"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="手机号码" prop="PHONENUM">
|
||||||
|
<el-input v-model="form.PHONENUM" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="身份证号码" prop="IDENTITYCARD">
|
||||||
|
<el-input v-model="form.IDENTITYCARD" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="发证机关" prop="LICENSING">
|
||||||
|
<el-input v-model="form.LICENSING" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="特种作业证书有效期" prop="VALID_TIME">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.VALID_TIME"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div class="mt-10 tc">
|
||||||
|
<el-button type="primary" @click="fnSubmit">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</layout-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { layoutFnGetPersonnelManagementJobType } from "@/assets/js/data_dictionary.js";
|
||||||
|
import { getRelatedPartiesManagementList } from "@/request/stakeholder_management.js";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import {
|
||||||
|
getPersonnelManagementView,
|
||||||
|
getVerifyDeduplicationCertificateNum,
|
||||||
|
setPersonnelManagementAdd,
|
||||||
|
setPersonnelManagementEdit,
|
||||||
|
} from "@/request/special_operations.js";
|
||||||
|
import { useRoute, useRouter } from "vue-router";
|
||||||
|
import { useUserStore } from "@/pinia/user.js";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
|
const { PERSONNELMANAGEMENT_ID } = route.query;
|
||||||
|
const CORP_NAME = userStore.getUserInfo.CORP_NAME;
|
||||||
|
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||||
|
const typeList = [
|
||||||
|
{ ID: "0", NAME: "公司员工" },
|
||||||
|
{ ID: "1", NAME: "相关方人员" },
|
||||||
|
];
|
||||||
|
const sexList = [
|
||||||
|
{ ID: "0", NAME: "男" },
|
||||||
|
{ ID: "1", NAME: "女" },
|
||||||
|
];
|
||||||
|
const personnelManagementJobTypeList =
|
||||||
|
await layoutFnGetPersonnelManagementJobType();
|
||||||
|
const { list: unitsNameList } = useListData(getRelatedPartiesManagementList, {
|
||||||
|
otherParams: {
|
||||||
|
showCount: 99999,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const fnHasCertificate = async (rule, value, callback) => {
|
||||||
|
if (value) {
|
||||||
|
const resData = await getVerifyDeduplicationCertificateNum({
|
||||||
|
CERTIFICATE_NUM: value,
|
||||||
|
PERSONNELMANAGEMENT_ID,
|
||||||
|
});
|
||||||
|
if (resData.msg) callback(new Error(resData.msg));
|
||||||
|
else callback();
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const rules = {
|
||||||
|
UNITS_ID: [
|
||||||
|
{ required: true, message: "单位名称不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
PTYPE: [{ required: true, message: "人员类型不能为空", trigger: "change" }],
|
||||||
|
JOB_TYPE: [
|
||||||
|
{ required: true, message: "作业类别不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
NAME: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
|
||||||
|
SEX: [{ required: true, message: "性别不能为空", trigger: "change" }],
|
||||||
|
CERTIFICATE_NUM: [
|
||||||
|
{ required: true, message: "特种作业证书编号不能为空", trigger: "blur" },
|
||||||
|
{ validator: fnHasCertificate, trigger: "blur" },
|
||||||
|
],
|
||||||
|
PHONENUM: [
|
||||||
|
{ min: 11, max: 11, message: "请输入11位手机号码", trigger: "blur" },
|
||||||
|
{
|
||||||
|
pattern:
|
||||||
|
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
|
||||||
|
message: "请输入正确的手机号码",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
IDENTITYCARD: [
|
||||||
|
{
|
||||||
|
pattern:
|
||||||
|
/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(([0-2][1-9])|10|20|30|31)\d{3}(\d|X|x)$/,
|
||||||
|
message: "请输入正确的身份证号",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const form = ref({
|
||||||
|
PTYPE: "",
|
||||||
|
UNITS_ID: "",
|
||||||
|
JOB_TYPE: "",
|
||||||
|
CERTIFICATE_NUM: "",
|
||||||
|
NAME: "",
|
||||||
|
SEX: "",
|
||||||
|
REVIEWTIME: "",
|
||||||
|
PHONENUM: "",
|
||||||
|
IDENTITYCARD: "",
|
||||||
|
LICENSING: "",
|
||||||
|
VALID_TIME: [],
|
||||||
|
});
|
||||||
|
const formRef = ref(null);
|
||||||
|
const fnGetData = async () => {
|
||||||
|
if (!PERSONNELMANAGEMENT_ID) return;
|
||||||
|
const resData = await getPersonnelManagementView({
|
||||||
|
PERSONNELMANAGEMENT_ID,
|
||||||
|
});
|
||||||
|
form.value = resData.pd;
|
||||||
|
form.value.VALID_TIME = [resData.pd.VALID_STIME, resData.pd.VALID_ETIME];
|
||||||
|
};
|
||||||
|
fnGetData();
|
||||||
|
const fnSubmit = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
await useFormValidate(formRef);
|
||||||
|
const params = {
|
||||||
|
...form.value,
|
||||||
|
UNITS_ID:
|
||||||
|
form.value.PTYPE === "公司员工" ? CORPINFO_ID : form.value.UNITS_ID,
|
||||||
|
VALID_STIME: form.value.VALID_TIME[0],
|
||||||
|
VALID_ETIME: form.value.VALID_TIME[1],
|
||||||
|
};
|
||||||
|
!PERSONNELMANAGEMENT_ID
|
||||||
|
? await setPersonnelManagementAdd(params)
|
||||||
|
: await setPersonnelManagementEdit(params);
|
||||||
|
ElMessage.success("提交成功");
|
||||||
|
router.back();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,189 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="80px"
|
||||||
|
@submit.prevent="fnResetPagination"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="关键字" prop="KEYWORDS">
|
||||||
|
<el-input v-model="searchForm.KEYWORDS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="人员类型" prop="PTYPE">
|
||||||
|
<el-select v-model="searchForm.PTYPE">
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeList"
|
||||||
|
:key="item.ID"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.NAME"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="作业类别" prop="JOB_TYPE">
|
||||||
|
<el-select v-model="searchForm.JOB_TYPE">
|
||||||
|
<el-option
|
||||||
|
v-for="item in personnelManagementJobTypeList"
|
||||||
|
:key="item.ID"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.NAME"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPagination">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
ref="tableRef"
|
||||||
|
row-key="PERSONNELMANAGEMENT_ID"
|
||||||
|
:data="list"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
@get-data="fnGetData"
|
||||||
|
>
|
||||||
|
<el-table-column reserve-selection type="selection" width="55" />
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="CREATOR" label="添加人" />
|
||||||
|
<el-table-column label="单位名称">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
{{
|
||||||
|
row.PERSONNELMANAGEMENT_ID === CORPINFO_ID
|
||||||
|
? CORP_NAME
|
||||||
|
: row.UNITS_NAME
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="PTYPE" label="人员类型" width="100" />
|
||||||
|
<el-table-column prop="JOBTYPE" label="作业类别" />
|
||||||
|
<el-table-column prop="NAME" label="姓名" width="100" />
|
||||||
|
<el-table-column prop="SEX" label="性别" width="50" />
|
||||||
|
<el-table-column prop="CERTIFICATE_NUM" label="特种作业证书编号" />
|
||||||
|
<el-table-column prop="REVIEWTIME" label="复审时间" width="120" />
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.edit"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/special_operations/personnel_management/edit',
|
||||||
|
query: { PERSONNELMANAGEMENT_ID: row.PERSONNELMANAGEMENT_ID },
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnDelete(row.PERSONNELMANAGEMENT_ID)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template #button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.add"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/special_operations/personnel_management/add',
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="danger"
|
||||||
|
@click="fnDeleteAll"
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import { layoutFnGetPersonnelManagementJobType } from "@/assets/js/data_dictionary.js";
|
||||||
|
import { useUserStore } from "@/pinia/user.js";
|
||||||
|
import {
|
||||||
|
getPersonnelManagementList,
|
||||||
|
setPersonnelManagementDelete,
|
||||||
|
setPersonnelManagementDeleteBatch,
|
||||||
|
} from "@/request/special_operations.js";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||||
|
const typeList = [
|
||||||
|
{ ID: "0", NAME: "公司员工" },
|
||||||
|
{ ID: "1", NAME: "相关方人员" },
|
||||||
|
];
|
||||||
|
const { list, pagination, searchForm, fnResetPagination, fnGetData, tableRef } =
|
||||||
|
useListData(getPersonnelManagementList);
|
||||||
|
const buttonJurisdiction = await useButtonJurisdiction("personnelmanagement");
|
||||||
|
const personnelManagementJobTypeList =
|
||||||
|
await layoutFnGetPersonnelManagementJobType();
|
||||||
|
const fnDelete = debounce(
|
||||||
|
1000,
|
||||||
|
async (PERSONNELMANAGEMENT_ID) => {
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setPersonnelManagementDelete({ PERSONNELMANAGEMENT_ID });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPagination();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
const fnDeleteAll = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
|
if (selectionData.length === 0) {
|
||||||
|
ElMessage.warning("请选择要删除的数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const DATA_IDS = selectionData
|
||||||
|
.map((item) => item.PERSONNELMANAGEMENT_ID)
|
||||||
|
.join(",");
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setPersonnelManagementDeleteBatch({ DATA_IDS });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPagination();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -0,0 +1,205 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="80px"
|
||||||
|
@submit.prevent="fnResetPaginationTransfer"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="关键字" prop="KEYWORDS">
|
||||||
|
<el-input v-model="searchForm.KEYWORDS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item
|
||||||
|
label="合同起止时间"
|
||||||
|
prop="CONTRACTTIME"
|
||||||
|
label-width="120"
|
||||||
|
>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.CONTRACTTIME"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
ref="tableRef"
|
||||||
|
row-key="OUTSOURCED_ID"
|
||||||
|
:data="list"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
@get-data="fnGetDataTransfer"
|
||||||
|
>
|
||||||
|
<el-table-column reserve-selection type="selection" width="55" />
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="OUTSOURCED_NAME"
|
||||||
|
label="外包工程名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column label="合同起止时间" width="180">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<template v-if="row.CONTRACT_STIME && row.CONTRACT_ETIME">
|
||||||
|
{{ row.CONTRACT_STIME }} - {{ row.CONTRACT_ETIME }}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="UNITS_NAME"
|
||||||
|
label="相关方单位名称"
|
||||||
|
width="250"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="UNITS_PIC"
|
||||||
|
label="相关方单位本项目负责人"
|
||||||
|
width="160"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column prop="APPLICANT" label="申请人" width="150" />
|
||||||
|
<el-table-column prop="STATE" label="状态" width="100" />
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/stakeholder_management/related_parties_management/edit',
|
||||||
|
query: { OUTSOURCED_ID: row.OUTSOURCED_ID },
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.edit"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/stakeholder_management/related_parties_management/edit',
|
||||||
|
query: { OUTSOURCED_ID: row.OUTSOURCED_ID },
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnDelete(row.OUTSOURCED_ID)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template #button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.add"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/stakeholder_management/related_parties_management/add',
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="danger"
|
||||||
|
@click="fnDeleteAll"
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import {
|
||||||
|
getOutsourcingProjectManagementList,
|
||||||
|
setOutsourcingProjectManagementDelete,
|
||||||
|
setOutsourcingProjectManagementDeleteMultiple,
|
||||||
|
} from "@/request/stakeholder_management.js";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { list, pagination, searchForm, fnResetPagination, fnGetData, tableRef } =
|
||||||
|
useListData(getOutsourcingProjectManagementList);
|
||||||
|
const fnGetDataTransfer = () => {
|
||||||
|
fnGetData({
|
||||||
|
CONTRACT_STIME: searchForm.value.CONTRACTTIME?.[0],
|
||||||
|
CONTRACT_ETIME: searchForm.value.CONTRACTTIME?.[1],
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const fnResetPaginationTransfer = () => {
|
||||||
|
fnResetPagination({
|
||||||
|
CONTRACT_STIME: searchForm.value.CONTRACTTIME?.[0],
|
||||||
|
CONTRACT_ETIME: searchForm.value.CONTRACTTIME?.[1],
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const buttonJurisdiction = await useButtonJurisdiction("outsourced");
|
||||||
|
const fnDelete = debounce(
|
||||||
|
1000,
|
||||||
|
async (OUTSOURCED_ID) => {
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setOutsourcingProjectManagementDelete({ OUTSOURCED_ID });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPaginationTransfer();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
const fnDeleteAll = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
|
if (selectionData.length === 0) {
|
||||||
|
ElMessage.warning("请选择要删除的数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const DATA_IDS = selectionData.map((item) => item.OUTSOURCED_ID).join(",");
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setOutsourcingProjectManagementDeleteMultiple({ DATA_IDS });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPaginationTransfer();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -0,0 +1,260 @@
|
||||||
|
<template>
|
||||||
|
<layout-card>
|
||||||
|
<el-form ref="formRef" :model="form" :rules="rules" label-width="170px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="相关方单位名称" prop="UNITS_NAME">
|
||||||
|
<el-input v-model="form.UNITS_NAME" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="统一社会信用代码" prop="CODE">
|
||||||
|
<el-input v-model="form.CODE" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="属地" prop="POSSESSION">
|
||||||
|
<layout-territory
|
||||||
|
ref="territoryCascaderRef"
|
||||||
|
v-model="form.POSSESSION"
|
||||||
|
:level="4"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="企事业单位经营地址" prop="ADDRESS">
|
||||||
|
<el-input v-model="form.ADDRESS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="主要负责人" prop="CONTACTS">
|
||||||
|
<el-input v-model="form.CONTACTS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="主要负责人电话" prop="CONTACTS_PHONE">
|
||||||
|
<el-input v-model="form.CONTACTS_PHONE" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="法人手机号" prop="LR_MOBILE">
|
||||||
|
<el-input v-model="form.LR_MOBILE" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="职工人数(人)" prop="EMPLOYEES">
|
||||||
|
<el-input-number
|
||||||
|
:min="0"
|
||||||
|
v-model="form.EMPLOYEES"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="成立时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.CREATE_DATE"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="注册资金(万元)">
|
||||||
|
<el-input-number
|
||||||
|
:min="0"
|
||||||
|
v-model="form.REGCAPITAL"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="资产总额(万元)">
|
||||||
|
<el-input-number
|
||||||
|
:min="0"
|
||||||
|
v-model="form.TOTALASSETS"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="类型" prop="UNITS_TYPE">
|
||||||
|
<el-select v-model="form.UNITS_TYPE">
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeList"
|
||||||
|
:key="item.ID"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.NAME"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="营业执照" prop="file">
|
||||||
|
<layout-upload
|
||||||
|
v-model:file-list="form.file"
|
||||||
|
accept=".jpg,.jpeg,.png"
|
||||||
|
list-type="picture-card"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div class="mt-10 tc">
|
||||||
|
<el-button type="primary" @click="fnSubmit">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</layout-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import LayoutUpload from "@/components/upload/index.vue";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import LayoutTerritory from "@/components/territory/index.vue";
|
||||||
|
import {
|
||||||
|
getRelatedPartiesManagementView,
|
||||||
|
getVerifyDeduplicationCode,
|
||||||
|
getVerifyDeduplicationUser,
|
||||||
|
setRelatedPartiesManagementAdd,
|
||||||
|
setRelatedPartiesManagementEdit,
|
||||||
|
} from "@/request/stakeholder_management.js";
|
||||||
|
import { useRoute, useRouter } from "vue-router";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import { addingPrefixToFile } from "@/assets/js/utils.js";
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
|
const { UNITS_ID } = route.query;
|
||||||
|
const typeList = [
|
||||||
|
{ ID: "0", NAME: "常驻" },
|
||||||
|
{ ID: "1", NAME: "临时" },
|
||||||
|
];
|
||||||
|
const fnHasUser = async (rule, value, callback) => {
|
||||||
|
if (value) {
|
||||||
|
try {
|
||||||
|
await getVerifyDeduplicationUser({
|
||||||
|
UNITS_NAME: value,
|
||||||
|
UNITS_ID,
|
||||||
|
});
|
||||||
|
callback();
|
||||||
|
} catch (err) {
|
||||||
|
callback(new Error(err.msg));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const fnHasCode = async (rule, value, callback) => {
|
||||||
|
if (value) {
|
||||||
|
try {
|
||||||
|
await getVerifyDeduplicationCode({
|
||||||
|
CODE: value,
|
||||||
|
UNITS_ID,
|
||||||
|
});
|
||||||
|
callback();
|
||||||
|
} catch (err) {
|
||||||
|
callback(new Error(err.msg));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const rules = {
|
||||||
|
UNITS_NAME: [
|
||||||
|
{ required: true, message: "相关方单位名称不能为空", trigger: "blur" },
|
||||||
|
{ validator: fnHasUser, trigger: "blur" },
|
||||||
|
],
|
||||||
|
CODE: [
|
||||||
|
{ required: true, message: "统一社会信用代码不能为空", trigger: "blur" },
|
||||||
|
{
|
||||||
|
pattern: /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/,
|
||||||
|
message: "请输入正确的统一社会信用代码",
|
||||||
|
},
|
||||||
|
{ validator: fnHasCode, trigger: "blur" },
|
||||||
|
],
|
||||||
|
POSSESSION: [{ required: true, message: "属地不能为空", trigger: "change" }],
|
||||||
|
ADDRESS: [
|
||||||
|
{ required: true, message: "企事业单位经营地址不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
CONTACTS: [
|
||||||
|
{ required: true, message: "主要负责人不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
CONTACTS_PHONE: [
|
||||||
|
{ required: true, message: "主要负责人电话不能为空", trigger: "blur" },
|
||||||
|
{ min: 11, max: 11, message: "请输入11位手机号码", trigger: "blur" },
|
||||||
|
{
|
||||||
|
pattern:
|
||||||
|
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
|
||||||
|
message: "请输入正确的手机号码",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
LR_MOBILE: [
|
||||||
|
{ min: 11, max: 11, message: "请输入11位手机号码", trigger: "blur" },
|
||||||
|
{
|
||||||
|
pattern:
|
||||||
|
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
|
||||||
|
message: "请输入正确的手机号码",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
UNITS_TYPE: [{ required: true, message: "类型不能为空", trigger: "change" }],
|
||||||
|
file: [{ required: true, message: "营业执照不能为空", trigger: "change" }],
|
||||||
|
};
|
||||||
|
const form = ref({
|
||||||
|
UNITS_NAME: "",
|
||||||
|
CODE: "",
|
||||||
|
POSSESSION: [],
|
||||||
|
ADDRESS: "",
|
||||||
|
CONTACTS: "",
|
||||||
|
CONTACTS_PHONE: "",
|
||||||
|
LR_MOBILE: "",
|
||||||
|
EMPLOYEES: "",
|
||||||
|
CREATE_DATE: "",
|
||||||
|
REGCAPITAL: "",
|
||||||
|
TOTALASSETS: "",
|
||||||
|
UNITS_TYPE: "",
|
||||||
|
file: [],
|
||||||
|
});
|
||||||
|
const formRef = ref(null);
|
||||||
|
const territoryCascaderRef = ref(null);
|
||||||
|
const fnGetData = async () => {
|
||||||
|
if (!UNITS_ID) return;
|
||||||
|
const resData = await getRelatedPartiesManagementView({ UNITS_ID });
|
||||||
|
console.log(resData.pd);
|
||||||
|
form.value = resData.pd;
|
||||||
|
form.value.file = addingPrefixToFile([{ FILEPATH: resData.pd.FILEPATH }]);
|
||||||
|
};
|
||||||
|
fnGetData();
|
||||||
|
const fnSubmit = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
useFormValidate(formRef);
|
||||||
|
const formData = new FormData();
|
||||||
|
Object.keys(form.value).forEach((key) => {
|
||||||
|
formData.append(key, form.value[key]);
|
||||||
|
});
|
||||||
|
formData.delete("file");
|
||||||
|
for (let i = 0; i < form.value.file.length; i++) {
|
||||||
|
form.value.file[i].raw && formData.append("file", form.value.file[i].raw);
|
||||||
|
}
|
||||||
|
formData.append("PROVINCE", form.value.POSSESSION[0]);
|
||||||
|
formData.append("CITY", form.value.POSSESSION[1]);
|
||||||
|
formData.append("COUNTY", form.value.POSSESSION[2]);
|
||||||
|
formData.append("VILLAGE", form.value.POSSESSION[3]);
|
||||||
|
formData.append("STREET", form.value.POSSESSION[4]);
|
||||||
|
formData.append(
|
||||||
|
"COMPANY_AREA",
|
||||||
|
territoryCascaderRef.value.getCheckedNodes()
|
||||||
|
);
|
||||||
|
!UNITS_ID
|
||||||
|
? await setRelatedPartiesManagementAdd(formData)
|
||||||
|
: await setRelatedPartiesManagementEdit(formData);
|
||||||
|
ElMessage.success("提交成功");
|
||||||
|
router.back();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,166 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="80px"
|
||||||
|
@submit.prevent="fnResetPagination"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="关键字" prop="KEYWORDS">
|
||||||
|
<el-input v-model="searchForm.KEYWORDS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="类型" prop="UNITS_TYPE">
|
||||||
|
<el-select v-model="searchForm.UNITS_TYPE">
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeList"
|
||||||
|
:key="item.ID"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.NAME"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPagination">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
ref="tableRef"
|
||||||
|
row-key="UNITS_ID"
|
||||||
|
:data="list"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
@get-data="fnGetData"
|
||||||
|
>
|
||||||
|
<el-table-column reserve-selection type="selection" width="55" />
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="UNITS_NAME"
|
||||||
|
label="相关方单位名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column prop="CODE" label="统一社会信用代码" width="160" />
|
||||||
|
<el-table-column
|
||||||
|
prop="CONTACTS"
|
||||||
|
label="主要负责人"
|
||||||
|
width="150"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column prop="UNITS_TYPE" label="类型" width="100" />
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.edit"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/stakeholder_management/related_parties_management/edit',
|
||||||
|
query: { UNITS_ID: row.UNITS_ID },
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnDelete(row.UNITS_ID)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template #button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.add"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/stakeholder_management/related_parties_management/add',
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="danger"
|
||||||
|
@click="fnDeleteAll"
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import {
|
||||||
|
getRelatedPartiesManagementList,
|
||||||
|
setRelatedPartiesManagementDelete,
|
||||||
|
setRelatedPartiesManagementDeleteMultiple,
|
||||||
|
} from "@/request/stakeholder_management.js";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const typeList = [
|
||||||
|
{ ID: "0", NAME: "常驻" },
|
||||||
|
{ ID: "1", NAME: "临时" },
|
||||||
|
];
|
||||||
|
const { list, pagination, searchForm, fnResetPagination, fnGetData, tableRef } =
|
||||||
|
useListData(getRelatedPartiesManagementList);
|
||||||
|
const buttonJurisdiction = await useButtonJurisdiction("units");
|
||||||
|
const fnDelete = debounce(
|
||||||
|
1000,
|
||||||
|
async (UNITS_ID) => {
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setRelatedPartiesManagementDelete({ UNITS_ID });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPagination();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
const fnDeleteAll = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
|
if (selectionData.length === 0) {
|
||||||
|
ElMessage.warning("请选择要删除的数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const DATA_IDS = selectionData.map((item) => item.UNITS_ID).join(",");
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setRelatedPartiesManagementDeleteMultiple({ DATA_IDS });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPagination();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
Loading…
Reference in New Issue