用户管理、从业人员

dev
277151821@qq.com 2024-04-29 09:23:04 +08:00
parent 77c6a36092
commit db6c4bfaea
4 changed files with 23 additions and 41 deletions

View File

@ -30,7 +30,7 @@ export const setUserResetPassword = (params) =>
post("/corpinfo/resetPwd", params); // 用户管理重置密码
export const getUserScheduling = (params) =>
post("/shiftworkrules/listAll", params); // 用户管理获取排班
export const setUserImport = (params) => upload("/user/readExcel2", params); // 用户管理导入
export const setUserImport = (params) => upload("/user/readExcel4", params); // 用户管理导入
export const setUserLearnersImport = (params) =>
upload("/user/readExcel3", params); // 用户管理在线学习人员导入
export const getUserInfo = (params) => post("/user/goAddUser", params); // 用户管理添加获取信息

View File

@ -79,9 +79,6 @@
<el-button @click="fnImportDialogChangeShow">
导入
</el-button>
<el-button @click="fnImportLearnersDialogChangeShow">
在线学习人员导入
</el-button>
</el-form-item>
</el-col>
</el-row>
@ -191,15 +188,9 @@
</layout-card>
<layout-import-file
v-model:visible="data.importDialogVisible"
template-url="template/userExcelTemplate.xls"
template-url="template/userExcelTemplateTraffic.xls"
@submit="fnSubmitImport"
/>
<layout-import-file
v-model:visible="data.importLearnersDialogVisible"
template-url="template/userstudyExcelTemplate.xls"
title="在线学习人员导入"
@submit="fnSubmitLearnersImport"
/>
<scheduling
:id="data.scheduleDialog.id"
v-model:visible="data.scheduleDialog.visible"
@ -216,7 +207,6 @@ import {
getUserScheduling,
setUserDelete,
setUserImport,
setUserLearnersImport,
setUserResetPassword,
} from "@/request/enterprise_management.js";
import { reactive, ref } from "vue";
@ -242,7 +232,6 @@ const data = reactive({
schedulingList: [],
schedulingList1: [],
importDialogVisible: false,
importLearnersDialogVisible: false,
scheduleDialog: {
visible: false,
info: {},
@ -302,15 +291,6 @@ const fnSubmitImport = async (formData) => {
fnImportDialogChangeShow();
fnResetPaginationTransfer();
};
const fnImportLearnersDialogChangeShow = () => {
data.importLearnersDialogVisible = !data.importLearnersDialogVisible;
};
const fnSubmitLearnersImport = async (formData) => {
const resData = await setUserLearnersImport(formData);
ElMessage.success(resData.msg);
fnImportLearnersDialogChangeShow();
fnResetPaginationTransfer();
};
const fnSchedule = (row) => {
data.scheduleDialog.visible = true;
data.scheduleDialog.info = row;

View File

@ -12,7 +12,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="人员类型" prop="PERSONNEL_TYPE">
<el-select v-model="data.form.PERSONNEL_TYPE">
<el-select v-model="data.form.PERSONNEL_TYPE" multiple>
<el-option
v-for="item in data.personnelTypeList"
:key="item.DICTIONARIES_ID"
@ -392,7 +392,7 @@
<el-col :span="9">
<el-row>
<el-col>
<el-form-item label="驾驶证" prop="DRIVER_LICENSE">
<el-form-item label="驾驶证" :prop="data.form.PERSONNEL_TYPE.join()!=='23e18d4618ea44fea78bfe7021d4b5f1'?'DRIVER_LICENSE':''">
<layout-upload
v-model:file-list="data.form.DRIVER_LICENSE"
accept=".jpg,.jpeg,.png"
@ -406,7 +406,7 @@
<el-col :span="15">
<el-row>
<el-col :span="24">
<el-form-item label="证号" prop="DRIVER_LICENSE_NO">
<el-form-item label="证号" :prop="data.form.PERSONNEL_TYPE.join()!=='23e18d4618ea44fea78bfe7021d4b5f1'?'DRIVER_LICENSE_NO':''">
<el-input
v-model="data.form.DRIVER_LICENSE_NO"
placeholder="请输入"
@ -414,7 +414,7 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="准驾车型" prop="DRIVING_MODEL_ARR">
<el-form-item label="准驾车型" :prop="data.form.PERSONNEL_TYPE.join()!=='23e18d4618ea44fea78bfe7021d4b5f1'?'DRIVING_MODEL_ARR':''">
<el-select v-model="data.form.DRIVING_MODEL_ARR" multiple>
<el-option
v-for="item in data.drivingModelList"
@ -426,7 +426,7 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="国籍" prop="DRIVING_NATIONALITY">
<el-form-item label="国籍" :prop="data.form.PERSONNEL_TYPE.join()!=='23e18d4618ea44fea78bfe7021d4b5f1'?'DRIVING_NATIONALITY':''">
<el-select v-model="data.form.DRIVING_NATIONALITY">
<el-option
v-for="item in data.nationalityList"
@ -441,7 +441,7 @@
<el-col :span="24">
<el-form-item
label="初次领证日期"
prop="DRIVER_LICENSE_ISSUE_DATE"
:prop="data.form.PERSONNEL_TYPE.join()!=='23e18d4618ea44fea78bfe7021d4b5f1'?'DRIVER_LICENSE_ISSUE_DATE':''"
>
<el-date-picker
v-model="data.form.DRIVER_LICENSE_ISSUE_DATE"
@ -453,7 +453,7 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="有效期限" prop="DRIVER_LICENSE_VALIDITY">
<el-form-item label="有效期限" :prop="data.form.PERSONNEL_TYPE.join()!=='23e18d4618ea44fea78bfe7021d4b5f1'?'DRIVER_LICENSE_VALIDITY':''">
<el-date-picker
v-model="data.form.DRIVER_LICENSE_VALIDITY"
type="daterange"
@ -464,7 +464,7 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="签发机关" prop="DRIVER_LICENSE_ORGAN">
<el-form-item label="签发机关" :prop="data.form.PERSONNEL_TYPE.join()!=='23e18d4618ea44fea78bfe7021d4b5f1'?'DRIVER_LICENSE_ORGAN':''">
<el-input
v-model="data.form.DRIVER_LICENSE_ORGAN"
placeholder="请输入"
@ -960,7 +960,7 @@ const data = reactive({
POLITICAL_OUTLOOK: "",
DATE_OF_BIRTH: "",
DEGREE_OF_EDUCATION: "",
PERSONNEL_TYPE: "",
PERSONNEL_TYPE: [],
DUTIES: "",
TITLE: "",
ENTRY_DATE: "",
@ -1228,6 +1228,7 @@ const fnSubmit = debounce(
Object.keys(data.form).forEach((key) => {
formData.append(key, data.form[key]);
});
formData.PERSONNEL_TYPE = data.form.PERSONNEL_TYPE.join(",")
formData.delete("ID_CARD_VALIDITY");
formData.delete("DRIVING_MODEL_ARR");
formData.delete("DRIVER_LICENSE_VALIDITY");

View File

@ -12,7 +12,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="人员类型" prop="PERSONNEL_TYPE">
<el-select v-model="data.form.PERSONNEL_TYPE">
<el-select v-model="data.form.PERSONNEL_TYPE" multiple>
<el-option
v-for="item in data.personnelTypeList"
:key="item.DICTIONARIES_ID"
@ -386,7 +386,7 @@
<el-col :span="9">
<el-row>
<el-col>
<el-form-item label="驾驶证" prop="DRIVER_LICENSE">
<el-form-item label="驾驶证" :prop="data.form.PERSONNEL_TYPE.join()!=='23e18d4618ea44fea78bfe7021d4b5f1'?'DRIVER_LICENSE':''">
<layout-upload
v-model:file-list="data.fileForm.DRIVER_LICENSE"
accept=".jpg,.jpeg,.png"
@ -400,7 +400,7 @@
<el-col :span="15">
<el-row>
<el-col :span="24">
<el-form-item label="证号" prop="DRIVER_LICENSE_NO">
<el-form-item label="证号" :prop="data.form.PERSONNEL_TYPE.join()!=='23e18d4618ea44fea78bfe7021d4b5f1'?'DRIVER_LICENSE_NO':''">
<el-input
v-model="data.form.DRIVER_LICENSE_NO"
placeholder="请输入"
@ -408,7 +408,7 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="准驾车型" prop="DRIVING_MODEL_ARR">
<el-form-item label="准驾车型" :prop="data.form.PERSONNEL_TYPE.join()!=='23e18d4618ea44fea78bfe7021d4b5f1'?'DRIVING_MODEL_ARR':''">
<el-select v-model="data.form.DRIVING_MODEL_ARR" multiple>
<el-option
v-for="item in data.drivingModelList"
@ -420,7 +420,7 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="国籍" prop="DRIVING_NATIONALITY">
<el-form-item label="国籍" :prop="data.form.PERSONNEL_TYPE.join()!=='23e18d4618ea44fea78bfe7021d4b5f1'?'DRIVING_NATIONALITY':''">
<el-select v-model="data.form.DRIVING_NATIONALITY">
<el-option
v-for="item in data.nationalityList"
@ -435,7 +435,7 @@
<el-col :span="24">
<el-form-item
label="初次领证日期"
prop="DRIVER_LICENSE_ISSUE_DATE"
:prop="data.form.PERSONNEL_TYPE.join()!=='23e18d4618ea44fea78bfe7021d4b5f1'?'DRIVER_LICENSE_ISSUE_DATE':''"
>
<el-date-picker
v-model="data.form.DRIVER_LICENSE_ISSUE_DATE"
@ -447,7 +447,7 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="有效期限" prop="dates">
<el-form-item label="有效期限" :prop="data.form.PERSONNEL_TYPE.join()!=='23e18d4618ea44fea78bfe7021d4b5f1'?'dates':''">
<el-date-picker
v-model="data.form.DRIVER_LICENSE_VALIDITY"
type="daterange"
@ -458,7 +458,7 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="签发机关" prop="DRIVER_LICENSE_ORGAN">
<el-form-item label="签发机关" :prop="data.form.PERSONNEL_TYPE.join()!=='23e18d4618ea44fea78bfe7021d4b5f1'?'DRIVER_LICENSE_ORGAN':''">
<el-input
v-model="data.form.DRIVER_LICENSE_ORGAN"
placeholder="请输入"
@ -834,7 +834,7 @@ const data = reactive({
POLITICAL_OUTLOOK: "",
DATE_OF_BIRTH: "",
DEGREE_OF_EDUCATION: "",
PERSONNEL_TYPE: "",
PERSONNEL_TYPE: [],
DUTIES: "",
TITLE: "",
ENTRY_DATE: "",
@ -917,7 +917,7 @@ const fnGetData = async () => {
data.oldPostId = form.POST_ID;
data.oldDepartId = form.DEPARTMENT_ID;
form.userCerFile = addingPrefixToFile(resData.userCerList);
form.PERSONNEL_TYPE = form.PERSONNEL_TYPE.split(",")
resData.certificateList.forEach((item) => {
if (item.CERTIFICATE_CATEGORY === "1") {
data.fileForm.ID_CARD_FRONT = addingPrefixFile(item.ID_PHOTO_FRONT);
@ -1153,6 +1153,7 @@ const fnSubmit = debounce(
Object.keys(data.form).forEach((key) => {
formData.append(key, data.form[key]);
});
formData.PERSONNEL_TYPE = data.form.PERSONNEL_TYPE.join(",")
formData.delete("ID_CARD_VALIDITY");
formData.delete("DRIVING_MODEL_ARR");
formData.delete("DRIVER_LICENSE_VALIDITY");