From f570e9dcc6d8253f8d14ca35c465b45dd9a27736 Mon Sep 17 00:00:00 2001 From: zhangyanli Date: Tue, 12 Mar 2024 09:15:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86=E5=92=8C?= =?UTF-8?q?=E4=BC=81=E4=B8=9A=E7=AE=A1=E7=90=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/js/data_dictionary.js | 26 ++++------ .../information/edit.vue | 30 +++++++++++- .../information/info.vue | 19 +++++++- src/views/enterprise_management/user/add.vue | 48 ++----------------- 4 files changed, 61 insertions(+), 62 deletions(-) diff --git a/src/assets/js/data_dictionary.js b/src/assets/js/data_dictionary.js index abd7240..542ceff 100644 --- a/src/assets/js/data_dictionary.js +++ b/src/assets/js/data_dictionary.js @@ -205,13 +205,7 @@ export const layoutFnGetProfessionalTitle = async () => { }); return ref(resData.list); }; -// 工种 -export const layoutFnGetJobType = async () => { - const resData = await getLevelsCorp({ - DICTIONARIES_ID: "55484e491a5e442d839c4595380713ec", - }); - return ref(resData.list); -}; + // 在职情况 export const layoutFnGetEmploymentSituation = async () => { const resData = await getLevels({ @@ -423,16 +417,16 @@ export const layoutFnGetPersonnelManagementJobType = async () => { // 年检周期 export const layoutFnGetAnnualInspectionCycle = async () => { - const resData = await getLevels({ - DICTIONARIES_ID: "8b7dea3977fd4360a3cc8112368b90ff", - }); - return ref(resData.list); + const resData = await getLevels({ + DICTIONARIES_ID: "8b7dea3977fd4360a3cc8112368b90ff", + }); + return ref(resData.list); }; // 保险公司 export const layoutFnGetInsuranceCompany = async () => { - const resData = await getLevels({ - DICTIONARIES_ID: "660812ce620f433a815b129d65f26101", - }); - return ref(resData.list); -}; \ No newline at end of file + const resData = await getLevels({ + DICTIONARIES_ID: "660812ce620f433a815b129d65f26101", + }); + return ref(resData.list); +}; diff --git a/src/views/enterprise_management/information/edit.vue b/src/views/enterprise_management/information/edit.vue index 8945a22..ad86a48 100644 --- a/src/views/enterprise_management/information/edit.vue +++ b/src/views/enterprise_management/information/edit.vue @@ -256,7 +256,7 @@ - + + + + + + 安全负责人信息 @@ -459,6 +470,8 @@ import { import { addingPrefixToFile } from "@/assets/js/utils.js"; import MapDialog from "./components/map.vue"; +const FILE_URL = import.meta.env.VITE_FILE_URL; + const router = useRouter(); const formRef = ref(null); const territoryCascaderRef = ref(null); @@ -510,6 +523,9 @@ const rules = { bus_images: [ { required: true, message: "营业执照不能为空", trigger: "blur" }, ], + official_seal_file: [ + { required: true, message: "公章不能为空", trigger: "blur" }, + ], LR_MOBILE: [ { min: 11, max: 11, message: "请输入11位手机号码", trigger: "blur" }, { @@ -572,6 +588,7 @@ const data = reactive({ FOURTYPE: "", four_images: [], bus_images: [], + official_seal_file: [], SAFETY_NAME: "", SAFETY_POST: "", SAFETY_NUMBER: "", @@ -597,6 +614,11 @@ const fnGetData = async () => { const resData = await getEnterpriseInfo(); data.form = resData.pd; 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.OLDFOURTYPE = resData.pd.FOURTYPE; data.form.FOURTYPE = resData.pd.FOURTYPE || 1; @@ -639,6 +661,12 @@ const fnSubmit = debounce( 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++) { data.form.four_images[i].raw && formData.append("fourFiles", data.form.four_images[i].raw); diff --git a/src/views/enterprise_management/information/info.vue b/src/views/enterprise_management/information/info.vue index 24abff1..9c544f3 100644 --- a/src/views/enterprise_management/information/info.vue +++ b/src/views/enterprise_management/information/info.vue @@ -107,6 +107,17 @@ class="ml-10" /> + + + 安全负责人信息 @@ -203,11 +214,12 @@ import { addingPrefixToFile } from "@/assets/js/utils.js"; import { reactive } from "vue"; import { useRouter } from "vue-router"; import QrCode from "./components/qr_code.vue"; - +const FILE_URL = import.meta.env.VITE_FILE_URL; const router = useRouter(); const data = reactive({ info: {}, bus_images: [], + official_seal_file: [], four_images: [], qrCodeDialogVisible: false, }); @@ -216,6 +228,11 @@ const fnGetData = async () => { data.info = resData.pd; data.bus_images = addingPrefixToFile(resData.busImgs); data.four_images = addingPrefixToFile(resData.fourImgs); + data.official_seal_file = [ + { + url: FILE_URL + resData.pd.OFFICIAL_SEAL_PATH, + }, + ]; }; fnGetData(); diff --git a/src/views/enterprise_management/user/add.vue b/src/views/enterprise_management/user/add.vue index 046c5a5..52cba5e 100644 --- a/src/views/enterprise_management/user/add.vue +++ b/src/views/enterprise_management/user/add.vue @@ -235,21 +235,6 @@ - - - - - - - @@ -315,15 +300,6 @@ /> - - - - - { data.dutiesList = dutiesList; const { value: professionalTitleList } = await layoutFnGetProfessionalTitle(); data.professionalTitleList = professionalTitleList; - const { value: jobTypeList } = await layoutFnGetJobType(); - data.jobTypeList = jobTypeList; const { value: employmentSituationList } = await layoutFnGetEmploymentSituation(); data.employmentSituationList = employmentSituationList; @@ -718,9 +690,6 @@ const fnDictionaryDelete = debounce( } else if (DICTTYPE === "JOB_TITLE") { DICTIONARIES_ID = data.professionalTitleList[index].DICTIONARIES_ID; 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( "删除此分类会同时删除其他相关已编辑过的人员信息中的分类设置,确定要删除(" + @@ -733,8 +702,6 @@ const fnDictionaryDelete = debounce( data.dutiesList.splice(index, 1); } else if (DICTTYPE === "JOB_TITLE") { 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.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) { const resData = await image2Base64(data.form.faceFile[0].url);