forked from integrated_whb/integrated_whb_vue
用户管理和企业管理修改
parent
3db91701d0
commit
f570e9dcc6
|
@ -205,13 +205,7 @@ export const layoutFnGetProfessionalTitle = async () => {
|
||||||
});
|
});
|
||||||
return ref(resData.list);
|
return ref(resData.list);
|
||||||
};
|
};
|
||||||
// 工种
|
|
||||||
export const layoutFnGetJobType = async () => {
|
|
||||||
const resData = await getLevelsCorp({
|
|
||||||
DICTIONARIES_ID: "55484e491a5e442d839c4595380713ec",
|
|
||||||
});
|
|
||||||
return ref(resData.list);
|
|
||||||
};
|
|
||||||
// 在职情况
|
// 在职情况
|
||||||
export const layoutFnGetEmploymentSituation = async () => {
|
export const layoutFnGetEmploymentSituation = async () => {
|
||||||
const resData = await getLevels({
|
const resData = await getLevels({
|
||||||
|
|
|
@ -256,7 +256,7 @@
|
||||||
</layout-upload>
|
</layout-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="营业执照" prop="bus_images">
|
<el-form-item label="营业执照" prop="bus_images">
|
||||||
<layout-upload
|
<layout-upload
|
||||||
v-model:file-list="data.form.bus_images"
|
v-model:file-list="data.form.bus_images"
|
||||||
|
@ -267,6 +267,17 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="公章" prop="official_seal_file">
|
||||||
|
<layout-upload
|
||||||
|
v-model:file-list="data.form.official_seal_file"
|
||||||
|
accept=".jpg,.jpeg,.png"
|
||||||
|
list-type="picture-card"
|
||||||
|
:limit="1"
|
||||||
|
delete-to-server
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-divider content-position="left">安全负责人信息</el-divider>
|
<el-divider content-position="left">安全负责人信息</el-divider>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -459,6 +470,8 @@ import {
|
||||||
import { addingPrefixToFile } from "@/assets/js/utils.js";
|
import { addingPrefixToFile } from "@/assets/js/utils.js";
|
||||||
import MapDialog from "./components/map.vue";
|
import MapDialog from "./components/map.vue";
|
||||||
|
|
||||||
|
const FILE_URL = import.meta.env.VITE_FILE_URL;
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const formRef = ref(null);
|
const formRef = ref(null);
|
||||||
const territoryCascaderRef = ref(null);
|
const territoryCascaderRef = ref(null);
|
||||||
|
@ -510,6 +523,9 @@ const rules = {
|
||||||
bus_images: [
|
bus_images: [
|
||||||
{ required: true, message: "营业执照不能为空", trigger: "blur" },
|
{ required: true, message: "营业执照不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
|
official_seal_file: [
|
||||||
|
{ required: true, message: "公章不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
LR_MOBILE: [
|
LR_MOBILE: [
|
||||||
{ min: 11, max: 11, message: "请输入11位手机号码", trigger: "blur" },
|
{ min: 11, max: 11, message: "请输入11位手机号码", trigger: "blur" },
|
||||||
{
|
{
|
||||||
|
@ -572,6 +588,7 @@ const data = reactive({
|
||||||
FOURTYPE: "",
|
FOURTYPE: "",
|
||||||
four_images: [],
|
four_images: [],
|
||||||
bus_images: [],
|
bus_images: [],
|
||||||
|
official_seal_file: [],
|
||||||
SAFETY_NAME: "",
|
SAFETY_NAME: "",
|
||||||
SAFETY_POST: "",
|
SAFETY_POST: "",
|
||||||
SAFETY_NUMBER: "",
|
SAFETY_NUMBER: "",
|
||||||
|
@ -597,6 +614,11 @@ const fnGetData = async () => {
|
||||||
const resData = await getEnterpriseInfo();
|
const resData = await getEnterpriseInfo();
|
||||||
data.form = resData.pd;
|
data.form = resData.pd;
|
||||||
data.form.bus_images = addingPrefixToFile(resData.busImgs);
|
data.form.bus_images = addingPrefixToFile(resData.busImgs);
|
||||||
|
data.form.official_seal_file = [
|
||||||
|
{
|
||||||
|
url: FILE_URL + resData.pd.OFFICIAL_SEAL_PATH,
|
||||||
|
},
|
||||||
|
];
|
||||||
data.form.four_images = addingPrefixToFile(resData.fourImgs);
|
data.form.four_images = addingPrefixToFile(resData.fourImgs);
|
||||||
data.form.OLDFOURTYPE = resData.pd.FOURTYPE;
|
data.form.OLDFOURTYPE = resData.pd.FOURTYPE;
|
||||||
data.form.FOURTYPE = resData.pd.FOURTYPE || 1;
|
data.form.FOURTYPE = resData.pd.FOURTYPE || 1;
|
||||||
|
@ -639,6 +661,12 @@ const fnSubmit = debounce(
|
||||||
data.form.bus_images[i].raw &&
|
data.form.bus_images[i].raw &&
|
||||||
formData.append("imgFiles", data.form.bus_images[i].raw);
|
formData.append("imgFiles", data.form.bus_images[i].raw);
|
||||||
}
|
}
|
||||||
|
if (data.form.official_seal_file[0].raw) {
|
||||||
|
formData.append(
|
||||||
|
"OFFICIAL_SEAL_PATH",
|
||||||
|
data.form.official_seal_file[0].raw
|
||||||
|
);
|
||||||
|
}
|
||||||
for (let i = 0; i < data.form.four_images.length; i++) {
|
for (let i = 0; i < data.form.four_images.length; i++) {
|
||||||
data.form.four_images[i].raw &&
|
data.form.four_images[i].raw &&
|
||||||
formData.append("fourFiles", data.form.four_images[i].raw);
|
formData.append("fourFiles", data.form.four_images[i].raw);
|
||||||
|
|
|
@ -107,6 +107,17 @@
|
||||||
class="ml-10"
|
class="ml-10"
|
||||||
/>
|
/>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="公章" :span="2">
|
||||||
|
<img
|
||||||
|
v-for="item in data.official_seal_file"
|
||||||
|
:key="item.IMGFILES_ID"
|
||||||
|
v-viewer
|
||||||
|
:src="item.url"
|
||||||
|
width="100"
|
||||||
|
height="100"
|
||||||
|
class="ml-10"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-divider content-position="left">安全负责人信息</el-divider>
|
<el-divider content-position="left">安全负责人信息</el-divider>
|
||||||
<el-descriptions :column="2" border>
|
<el-descriptions :column="2" border>
|
||||||
|
@ -203,11 +214,12 @@ import { addingPrefixToFile } from "@/assets/js/utils.js";
|
||||||
import { reactive } from "vue";
|
import { reactive } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import QrCode from "./components/qr_code.vue";
|
import QrCode from "./components/qr_code.vue";
|
||||||
|
const FILE_URL = import.meta.env.VITE_FILE_URL;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
info: {},
|
info: {},
|
||||||
bus_images: [],
|
bus_images: [],
|
||||||
|
official_seal_file: [],
|
||||||
four_images: [],
|
four_images: [],
|
||||||
qrCodeDialogVisible: false,
|
qrCodeDialogVisible: false,
|
||||||
});
|
});
|
||||||
|
@ -216,6 +228,11 @@ const fnGetData = async () => {
|
||||||
data.info = resData.pd;
|
data.info = resData.pd;
|
||||||
data.bus_images = addingPrefixToFile(resData.busImgs);
|
data.bus_images = addingPrefixToFile(resData.busImgs);
|
||||||
data.four_images = addingPrefixToFile(resData.fourImgs);
|
data.four_images = addingPrefixToFile(resData.fourImgs);
|
||||||
|
data.official_seal_file = [
|
||||||
|
{
|
||||||
|
url: FILE_URL + resData.pd.OFFICIAL_SEAL_PATH,
|
||||||
|
},
|
||||||
|
];
|
||||||
};
|
};
|
||||||
fnGetData();
|
fnGetData();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -235,21 +235,6 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="性别" prop="SEX">
|
|
||||||
<el-select v-model="data.form.SEX">
|
|
||||||
<el-option
|
|
||||||
v-for="item in [
|
|
||||||
{ NAME: '男', DICTIONARIES_ID: '1' },
|
|
||||||
{ NAME: '女', DICTIONARIES_ID: '0' },
|
|
||||||
]"
|
|
||||||
:key="item.DICTIONARIES_ID"
|
|
||||||
:label="item.NAME"
|
|
||||||
:value="item.DICTIONARIES_ID"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="政治面貌" prop="POLITICAL_OUTLOOK">
|
<el-form-item label="政治面貌" prop="POLITICAL_OUTLOOK">
|
||||||
<el-select v-model="data.form.POLITICAL_OUTLOOK">
|
<el-select v-model="data.form.POLITICAL_OUTLOOK">
|
||||||
|
@ -315,15 +300,6 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工种" prop="TYPE_OF_WORK">
|
|
||||||
<layout-select-create
|
|
||||||
v-model="data.form.TYPE_OF_WORK"
|
|
||||||
:list="data.jobTypeList"
|
|
||||||
@delete-option="fnDictionaryDelete($event, 'WORK_TYPE')"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="入职日期" prop="ENTRY_DATE">
|
<el-form-item label="入职日期" prop="ENTRY_DATE">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
@ -438,7 +414,6 @@ import {
|
||||||
layoutFnGetDegreeOfEducation,
|
layoutFnGetDegreeOfEducation,
|
||||||
layoutFnGetDuties,
|
layoutFnGetDuties,
|
||||||
layoutFnGetEmploymentSituation,
|
layoutFnGetEmploymentSituation,
|
||||||
layoutFnGetJobType,
|
|
||||||
layoutFnGetNation,
|
layoutFnGetNation,
|
||||||
layoutFnGetPersonnelType,
|
layoutFnGetPersonnelType,
|
||||||
layoutFnGetPoliticalLandscape,
|
layoutFnGetPoliticalLandscape,
|
||||||
|
@ -505,7 +480,7 @@ const rules = {
|
||||||
],
|
],
|
||||||
ROLE_ID: [{ required: true, message: "请选择角色", trigger: "change" }],
|
ROLE_ID: [{ required: true, message: "请选择角色", trigger: "change" }],
|
||||||
DEPARTMENT_ID: [{ required: true, message: "请选择部门", trigger: "change" }],
|
DEPARTMENT_ID: [{ required: true, message: "请选择部门", trigger: "change" }],
|
||||||
DUTIES_ID: [{ required: true, message: "请选择岗位", trigger: "change" }],
|
POST_ID: [{ required: true, message: "请选择岗位", trigger: "change" }],
|
||||||
SORT: [
|
SORT: [
|
||||||
{ required: true, message: "请输入排序", trigger: "blur" },
|
{ required: true, message: "请输入排序", trigger: "blur" },
|
||||||
{ type: "number", message: "请输入数字类型", trigger: "blur" },
|
{ type: "number", message: "请输入数字类型", trigger: "blur" },
|
||||||
|
@ -521,10 +496,10 @@ const rules = {
|
||||||
DEGREE_OF_EDUCATION: [
|
DEGREE_OF_EDUCATION: [
|
||||||
{ required: true, message: "文化程度不能为空", trigger: "change" },
|
{ required: true, message: "文化程度不能为空", trigger: "change" },
|
||||||
],
|
],
|
||||||
POST: [{ required: true, message: "职务不能为空", trigger: "change" }],
|
PERSONNEL_TYPE: [
|
||||||
TYPE_OF_WORK: [
|
{ required: true, message: "人员类型不能为空", trigger: "change" },
|
||||||
{ required: true, message: "工种不能为空", trigger: "change" },
|
|
||||||
],
|
],
|
||||||
|
POST: [{ required: true, message: "职务不能为空", trigger: "change" }],
|
||||||
ENTRY_DATE: [
|
ENTRY_DATE: [
|
||||||
{ required: true, message: "请选择入职日期", trigger: "change" },
|
{ required: true, message: "请选择入职日期", trigger: "change" },
|
||||||
],
|
],
|
||||||
|
@ -604,7 +579,6 @@ const data = reactive({
|
||||||
PERSONNEL_TYPE: "",
|
PERSONNEL_TYPE: "",
|
||||||
DUTIES: "",
|
DUTIES: "",
|
||||||
TITLE: "",
|
TITLE: "",
|
||||||
TYPE_OF_WORK: "",
|
|
||||||
ENTRY_DATE: "",
|
ENTRY_DATE: "",
|
||||||
WORKING_DATE: "",
|
WORKING_DATE: "",
|
||||||
INCUMBENCY: "",
|
INCUMBENCY: "",
|
||||||
|
@ -701,8 +675,6 @@ const fnGetLevels = async () => {
|
||||||
data.dutiesList = dutiesList;
|
data.dutiesList = dutiesList;
|
||||||
const { value: professionalTitleList } = await layoutFnGetProfessionalTitle();
|
const { value: professionalTitleList } = await layoutFnGetProfessionalTitle();
|
||||||
data.professionalTitleList = professionalTitleList;
|
data.professionalTitleList = professionalTitleList;
|
||||||
const { value: jobTypeList } = await layoutFnGetJobType();
|
|
||||||
data.jobTypeList = jobTypeList;
|
|
||||||
const { value: employmentSituationList } =
|
const { value: employmentSituationList } =
|
||||||
await layoutFnGetEmploymentSituation();
|
await layoutFnGetEmploymentSituation();
|
||||||
data.employmentSituationList = employmentSituationList;
|
data.employmentSituationList = employmentSituationList;
|
||||||
|
@ -718,9 +690,6 @@ const fnDictionaryDelete = debounce(
|
||||||
} else if (DICTTYPE === "JOB_TITLE") {
|
} else if (DICTTYPE === "JOB_TITLE") {
|
||||||
DICTIONARIES_ID = data.professionalTitleList[index].DICTIONARIES_ID;
|
DICTIONARIES_ID = data.professionalTitleList[index].DICTIONARIES_ID;
|
||||||
msgTitle = "职称:" + data.professionalTitleList[index].NAME;
|
msgTitle = "职称:" + data.professionalTitleList[index].NAME;
|
||||||
} else if (DICTTYPE === "WORK_TYPE") {
|
|
||||||
DICTIONARIES_ID = data.jobTypeList[index].DICTIONARIES_ID;
|
|
||||||
msgTitle = "工种:" + data.jobTypeList[index].NAME;
|
|
||||||
}
|
}
|
||||||
await ElMessageBox.confirm(
|
await ElMessageBox.confirm(
|
||||||
"删除此分类会同时删除其他相关已编辑过的人员信息中的分类设置,确定要删除(" +
|
"删除此分类会同时删除其他相关已编辑过的人员信息中的分类设置,确定要删除(" +
|
||||||
|
@ -733,8 +702,6 @@ const fnDictionaryDelete = debounce(
|
||||||
data.dutiesList.splice(index, 1);
|
data.dutiesList.splice(index, 1);
|
||||||
} else if (DICTTYPE === "JOB_TITLE") {
|
} else if (DICTTYPE === "JOB_TITLE") {
|
||||||
data.professionalTitleList.splice(index, 1);
|
data.professionalTitleList.splice(index, 1);
|
||||||
} else if (DICTTYPE === "WORK_TYPE") {
|
|
||||||
data.jobTypeList.splice(index, 1);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -778,13 +745,6 @@ const fnSubmit = debounce(
|
||||||
form.letTitleType = "value";
|
form.letTitleType = "value";
|
||||||
form.letTitleValue = form.TITLE;
|
form.letTitleValue = form.TITLE;
|
||||||
}
|
}
|
||||||
if (fnFindValueInList("jobTypeList", form.TYPE_OF_WORK)) {
|
|
||||||
form.letTypeOfWorkType = "select";
|
|
||||||
form.letTypeOfWorkValue = "";
|
|
||||||
} else {
|
|
||||||
form.letTypeOfWorkType = "value";
|
|
||||||
form.letTypeOfWorkValue = form.TYPE_OF_WORK;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (data.form.faceFile?.[0]?.raw) {
|
if (data.form.faceFile?.[0]?.raw) {
|
||||||
const resData = await image2Base64(data.form.faceFile[0].url);
|
const resData = await image2Base64(data.form.faceFile[0].url);
|
||||||
|
|
Loading…
Reference in New Issue