From 3213c25bc1c4d6d2d0c90fe1c199a513ede44f47 Mon Sep 17 00:00:00 2001 From: wangpeng Date: Fri, 22 Mar 2024 14:59:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=8E=E4=B8=9A=E4=BA=BA=E5=91=98=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/js/data_dictionary.js | 40 +- src/assets/js/utils.js | 14 + src/request/data_dictionary.js | 12 + src/request/safety_production_related.js | 9 +- src/request/user_practitioner.js | 27 + .../employee_management/add.vue | 422 ------ .../employee_management/details.vue | 155 --- .../employee_management/edit.vue | 422 ------ .../employee_management/index.vue | 181 --- .../information/edit.vue | 8 +- src/views/enterprise_management/user/add.vue | 125 +- .../enterprise_management/user/index.vue | 22 +- .../user_practitioner/add.vue | 1145 ++++++++++++++++ .../user_practitioner/details.vue | 153 +++ .../user_practitioner/edit.vue | 1198 +++++++++++++++++ .../user_practitioner/index.vue | 265 ++++ .../user_practitioner/review.vue | 377 ++++++ 17 files changed, 3324 insertions(+), 1251 deletions(-) create mode 100644 src/request/user_practitioner.js delete mode 100644 src/views/enterprise_management/employee_management/add.vue delete mode 100644 src/views/enterprise_management/employee_management/details.vue delete mode 100644 src/views/enterprise_management/employee_management/edit.vue delete mode 100644 src/views/enterprise_management/employee_management/index.vue create mode 100644 src/views/enterprise_management/user_practitioner/add.vue create mode 100644 src/views/enterprise_management/user_practitioner/details.vue create mode 100644 src/views/enterprise_management/user_practitioner/edit.vue create mode 100644 src/views/enterprise_management/user_practitioner/index.vue create mode 100644 src/views/enterprise_management/user_practitioner/review.vue diff --git a/src/assets/js/data_dictionary.js b/src/assets/js/data_dictionary.js index f0960b7..ec2a9de 100644 --- a/src/assets/js/data_dictionary.js +++ b/src/assets/js/data_dictionary.js @@ -11,6 +11,8 @@ import { getIndustryType, getPostType, getTrainingLevel, + getLevelsByObject, + getLevelCustom, } from "@/request/data_dictionary.js"; import { ref } from "vue"; @@ -83,10 +85,15 @@ export const layoutFnGetDegreeOfEducation = async () => { return ref(resData.list); }; // 人员类型 -export const layoutFnGetPersonnelType = async () => { - const resData = await getLevels({ - DICTIONARIES_ID: "0b62f92b0b624aab8e89a77304a64d5e", - }); +// export const layoutFnGetPersonnelType = async () => { +// const resData = await getLevels({ +// DICTIONARIES_ID: "0b62f92b0b624aab8e89a77304a64d5e", +// }); +// return ref(resData.list); +// }; +// 人员类型(交通版) +export const layoutFnGetPersonnelTypeTraffic = async (params) => { + const resData = await getLevelsByObject(params); return ref(resData.list); }; // 签字人员类型 @@ -262,3 +269,28 @@ export const layoutFnGetTestQuestionLabels = async () => { }); return ref(resData.list); }; + +// 准驾车型 +export const layoutFnGetDrivingModel = async () => { + const resData = await getLevels({ + DICTIONARIES_ID: "b41e247057334789b60bdf3fe6d8d6ba", + }); + return ref(resData.list); +}; + +// 国籍 +export const layoutFnGetNationality = async () => { + const resData = await getLevels({ + DICTIONARIES_ID: "3b614b43e8814f51a3492f2fdbc9a415", + }); + return ref(resData.list); +}; + +// 从业资格类别 +export const layoutFnGetQualificationCertificateCategory = async () => { + const resData = await getLevelCustom({ + DICTIONARIES_ID: "ed38fa5f78c64e6d906d2bad0d72bd63", + LEVEL: 3, + }); + return ref(resData.list); +}; diff --git a/src/assets/js/utils.js b/src/assets/js/utils.js index 9159770..5b6acdb 100644 --- a/src/assets/js/utils.js +++ b/src/assets/js/utils.js @@ -280,6 +280,20 @@ export function addingPrefixToFile(list) { } return list; } +/** + * @description 附件添加前缀 + * @param {string} filepath 附件地址 + * @return {Array} 添加完的数组 + **/ +export function addingPrefixFile(filepath) { + const list = []; + const FILE_URL = import.meta.env.VITE_FILE_URL; + const file = {}; + file.url = FILE_URL + filepath; + file.name = getFileName(filepath); + list.push(file); + return list; +} /** * @description 验证重复选择 diff --git a/src/request/data_dictionary.js b/src/request/data_dictionary.js index 5183dba..e92921f 100644 --- a/src/request/data_dictionary.js +++ b/src/request/data_dictionary.js @@ -10,6 +10,18 @@ export const getLevels = (params) => ...params, }); // 获取数据字典 +export const getLevelsByObject = (params) => + post("/dictionaries/getDictList", { + loading: false, + ...params, + }); +// 获取数据字典 +export const getLevelCustom = (params) => + post("/dictionaries/getLevelCustom", { + loading: false, + ...params, + }); +// 获取数据字典 export const getLevelsCorp = (params) => post("/dictionariesCorp/getLevels", { loading: false, diff --git a/src/request/safety_production_related.js b/src/request/safety_production_related.js index 1cb0c68..8cce186 100644 --- a/src/request/safety_production_related.js +++ b/src/request/safety_production_related.js @@ -1,5 +1,5 @@ import { post, upload } from "@/request/axios.js"; -import { getLevelsByParentId } from "@/request/data_dictionary.js"; +import { getLevelsByObject, getLevelsByParentId } from "@/request/data_dictionary.js"; import { ref } from "vue"; export const getSecurityNoticeList = (params) => @@ -16,6 +16,7 @@ export const addSecurityNotice = (params) => upload("/securitynotice/add", params); // 添加安全通知 export const getUserListAll = (params) => post("/user/listSelect", params); +// 通知等级 export const layoutFnGetNotificationsClassification = async () => { const resData = await getLevelsByParentId({ parentId: "aaecb47d95524b84904809671e48a777", @@ -23,9 +24,11 @@ export const layoutFnGetNotificationsClassification = async () => { return ref(resData); }; +// 从业类型(人员类型) export const layoutFnGetSIGNEDSTATUSClassification = async () => { - const resData = await getLevelsByParentId({ - parentId: "bbecb47d95524b84904809671e48a777", + const resData = await getLevelsByObject({ + DICTIONARIES_ID: '0b62f92b0b624aab8e89a77304a64d5e', + BIANMA: 'TRAFFIC_EMPLOYMENT' }); return ref(resData); }; diff --git a/src/request/user_practitioner.js b/src/request/user_practitioner.js new file mode 100644 index 0000000..809c630 --- /dev/null +++ b/src/request/user_practitioner.js @@ -0,0 +1,27 @@ +import { post, upload } from "@/request/axios.js"; + +// 从业人员管理列表 +export const getPractitionerList = (params) => + post("/user/getPractitionerPage", params); + +// 从业人员审核 +export const setPractitionerReview = (params) => + post("/user/setPractitionerReview", params); + +// 从业人员信息 +export const getPractitionerInfo = (params) => + post("/user/getPractitionerInfo", params); + +export const getPractitionerForEdit = (params) => post("/user/getPractitionerForEdit", params); // 用户管理查看 + +// 从业人员添加(需从业人员确认) +export const setPractitionerAdd = (params) => + upload("/user/setPractitionerAdd", params); + +// 从业人员修改(需从业人员确认) +export const setPractitionerEdit = (params) => + upload("/user/setPractitionerEdit", params); + +// 从业人员解聘 +export const setPractitionerDismissal = (params) => + post("/user/setPractitionerDismissal", params); diff --git a/src/views/enterprise_management/employee_management/add.vue b/src/views/enterprise_management/employee_management/add.vue deleted file mode 100644 index 17168b0..0000000 --- a/src/views/enterprise_management/employee_management/add.vue +++ /dev/null @@ -1,422 +0,0 @@ - - - - - diff --git a/src/views/enterprise_management/employee_management/details.vue b/src/views/enterprise_management/employee_management/details.vue deleted file mode 100644 index ed26911..0000000 --- a/src/views/enterprise_management/employee_management/details.vue +++ /dev/null @@ -1,155 +0,0 @@ - - - - - diff --git a/src/views/enterprise_management/employee_management/edit.vue b/src/views/enterprise_management/employee_management/edit.vue deleted file mode 100644 index 17168b0..0000000 --- a/src/views/enterprise_management/employee_management/edit.vue +++ /dev/null @@ -1,422 +0,0 @@ - - - - - diff --git a/src/views/enterprise_management/employee_management/index.vue b/src/views/enterprise_management/employee_management/index.vue deleted file mode 100644 index cfcc416..0000000 --- a/src/views/enterprise_management/employee_management/index.vue +++ /dev/null @@ -1,181 +0,0 @@ - - - - - diff --git a/src/views/enterprise_management/information/edit.vue b/src/views/enterprise_management/information/edit.vue index b04ce0b..6e10da1 100644 --- a/src/views/enterprise_management/information/edit.vue +++ b/src/views/enterprise_management/information/edit.vue @@ -29,7 +29,7 @@ - + - + - + - + + + + + + + + + + + + + - + + + + + + @@ -214,15 +232,6 @@ - - - - - @@ -270,18 +279,6 @@ - - - - - - - { callback(); } }; -const fnHasUser = async (rule, value, callback) => { +/* const fnHasUser = async (rule, value, callback) => { if (value) { const resData = await getVerifyDeduplicationUser({ USERNAME: value, @@ -458,7 +454,7 @@ const fnHasUser = async (rule, value, callback) => { } else { callback(); } -}; +}; */ const fnHasUserIdCard = async (rule, value, callback) => { if (value) { const resData = await getVerifyDeduplicationUserIdCard({ @@ -472,8 +468,18 @@ const fnHasUserIdCard = async (rule, value, callback) => { } }; const rules = { + USER_ID_CARD: [ + { required: true, message: "身份证号不能为空", trigger: "blur" }, + { + 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: "请输入正确的身份证号", + trigger: "blur", + }, + { validator: fnHasUserIdCard, trigger: "blur" }, + ], NAME: [{ required: true, message: "姓名不能为空", trigger: "blur" }], - USERNAME: [ + /* USERNAME: [ { required: true, message: "请输入手机号码", trigger: "blur" }, { min: 11, max: 11, message: "请输入11位手机号码", trigger: "blur" }, { @@ -482,6 +488,15 @@ const rules = { message: "请输入正确的手机号码", }, { validator: fnHasUser, trigger: "blur" }, + ], */ + PHONE: [ + { required: true, message: "请输入手机号码", trigger: "blur" }, + { min: 11, max: 11, message: "请输入11位手机号码", trigger: "blur" }, + { + pattern: + /^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/, + message: "请输入正确的手机号码", + }, ], EMAIL: [ { required: false, message: "请输入邮箱", trigger: "blur" }, @@ -516,14 +531,14 @@ const rules = { ENTRY_DATE: [ { required: true, message: "请选择入职日期", trigger: "change" }, ], - CARDNO: [ - { required: false, message: "请输入定位卡号", trigger: "blur" }, - { - pattern: /^-?[0-9]\d*$/, - message: "请输入正确的定位卡号", - trigger: "blur", - }, - ], + // CARDNO: [ + // { required: false, message: "请输入定位卡号", trigger: "blur" }, + // { + // pattern: /^-?[0-9]\d*$/, + // message: "请输入正确的定位卡号", + // trigger: "blur", + // }, + // ], WORKING_DATE: [ { required: true, message: "请选择参加工作日期", trigger: "change" }, ], @@ -532,16 +547,6 @@ const rules = { ], TITLE: [{ required: true, message: "职称不能为空", trigger: "change" }], DUTIES: [{ required: true, message: "职务不能为空", trigger: "change" }], - USER_ID_CARD: [ - { required: true, message: "身份证号不能为空", trigger: "blur" }, - { - 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: "请输入正确的身份证号", - trigger: "blur", - }, - { validator: fnHasUserIdCard, trigger: "blur" }, - ], SHIFTDUTYONE: [{ required: true, message: "请选择排班", trigger: "change" }], SHIFTDUTYTWO: [{ required: true, message: "请选择排班", trigger: "change" }], periodStr: [ @@ -610,7 +615,7 @@ const fnGetData = async () => { if (!USER_ID) return; const resData = await getUserView({ USER_ID }); const form = resData.pd; - form.PASSWORD = "666666"; + form.PASSWORD = "Aa@123456"; form.periodStr = resData.periodStr; form.ISSTUDENT = resData.pd.ISSTUDENT.toString(); if (form.USERAVATARURL_CONVERT) @@ -640,6 +645,12 @@ const fnGetUserScheduling = async (PARENTID, list) => { data[list] = resData.varList; }; fnGetUserScheduling("0", "schedulingList"); + +const { value: personnelTypeList } = await layoutFnGetPersonnelTypeTraffic({ + DICTIONARIES_ID: "0b62f92b0b624aab8e89a77304a64d5e", + BIANMA: "TRAFFIC_EMPLOYMENT_MANAGE", +}); +data.personnelTypeList = personnelTypeList; const fnChangeSchedulingOne = () => { data.form.SHIFTDUTYTWO = ""; data.periodList = []; @@ -674,6 +685,8 @@ const fnChangeIdCard = () => { const { sex, date } = idCardGetDateAndGender(data.form.USER_ID_CARD); data.form.SEX = sex; data.form.DATE_OF_BIRTH = date; + data.form.USERNAME = data.form.USER_ID_CARD; + console.log(data.form.USERNAME); }; const fnGetLevels = async () => { const { value: nationList } = await layoutFnGetNation(); @@ -683,8 +696,6 @@ const fnGetLevels = async () => { data.politicalLandscapeList = politicalLandscapeList; const { value: degreeOfEducationList } = await layoutFnGetDegreeOfEducation(); data.degreeOfEducationList = degreeOfEducationList; - const { value: personnelTypeList } = await layoutFnGetPersonnelType(); - data.personnelTypeList = personnelTypeList; const { value: dutiesList } = await layoutFnGetDuties(); data.dutiesList = dutiesList; const { value: professionalTitleList } = await layoutFnGetProfessionalTitle(); diff --git a/src/views/enterprise_management/user/index.vue b/src/views/enterprise_management/user/index.vue index 08118ba..c0476a3 100644 --- a/src/views/enterprise_management/user/index.vue +++ b/src/views/enterprise_management/user/index.vue @@ -96,8 +96,9 @@ {{ serialNumber(pagination, $index) }} - + + { const fnResetPassword = debounce( 1000, async (USER_ID, NAME) => { - await ElMessageBox.confirm(`是否将【${NAME}】重置密码为666666?`, { + await ElMessageBox.confirm(`是否将【${NAME}】重置密码为Aa@123456?`, { type: "warning", }); await setUserResetPassword({ USER_ID }); diff --git a/src/views/enterprise_management/user_practitioner/add.vue b/src/views/enterprise_management/user_practitioner/add.vue new file mode 100644 index 0000000..a6361f6 --- /dev/null +++ b/src/views/enterprise_management/user_practitioner/add.vue @@ -0,0 +1,1145 @@ + + + + + diff --git a/src/views/enterprise_management/user_practitioner/details.vue b/src/views/enterprise_management/user_practitioner/details.vue new file mode 100644 index 0000000..3293e5d --- /dev/null +++ b/src/views/enterprise_management/user_practitioner/details.vue @@ -0,0 +1,153 @@ + + + + + diff --git a/src/views/enterprise_management/user_practitioner/edit.vue b/src/views/enterprise_management/user_practitioner/edit.vue new file mode 100644 index 0000000..452f5fc --- /dev/null +++ b/src/views/enterprise_management/user_practitioner/edit.vue @@ -0,0 +1,1198 @@ + + + + + diff --git a/src/views/enterprise_management/user_practitioner/index.vue b/src/views/enterprise_management/user_practitioner/index.vue new file mode 100644 index 0000000..58bfbff --- /dev/null +++ b/src/views/enterprise_management/user_practitioner/index.vue @@ -0,0 +1,265 @@ + + + + + diff --git a/src/views/enterprise_management/user_practitioner/review.vue b/src/views/enterprise_management/user_practitioner/review.vue new file mode 100644 index 0000000..60c7a04 --- /dev/null +++ b/src/views/enterprise_management/user_practitioner/review.vue @@ -0,0 +1,377 @@ + + + + +