From 833cf9f65567e61d4e58f2a7e0937e076f7b1182 Mon Sep 17 00:00:00 2001 From: herenshan112 Date: Wed, 20 Aug 2025 09:10:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=AF=BC=E5=85=A5=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/hr/paiban/index.ts | 21 ++ src/views/hr/company/companyduty.vue | 129 ++++++- src/views/hr/company/orgPeopleNew.vue | 2 +- src/views/hr/company/uploadDownloadPage.vue | 366 ++++++++++++++++++++ 4 files changed, 509 insertions(+), 9 deletions(-) create mode 100644 src/views/hr/company/uploadDownloadPage.vue diff --git a/src/api/hr/paiban/index.ts b/src/api/hr/paiban/index.ts index c0c3d4a..c1f3a4e 100644 --- a/src/api/hr/paiban/index.ts +++ b/src/api/hr/paiban/index.ts @@ -95,3 +95,24 @@ export function getOrgPeopleList(data?:any){ data:data }) } + +/** + * 日历表单一删除值班人 + */ +export function delMonthOneus(data?:any){ + return request({ + url:'/systemapi/app/delMonthOneus', + method:'post', + data:data + }) +} +/** + * 将排班信息解写入数据库 + */ +export function analysisDutyData(data?:any){ + return request({ + url:'/systemapi/app/analysisDutyData', + method:'post', + data:data + }) +} diff --git a/src/views/hr/company/companyduty.vue b/src/views/hr/company/companyduty.vue index 1d36e65..60f095b 100644 --- a/src/views/hr/company/companyduty.vue +++ b/src/views/hr/company/companyduty.vue @@ -8,10 +8,13 @@ import { companyDutyInit, getYearMonthWorkMan, delOneDayDuty, + delMonthOneus, } from "@/api/hr/paiban/index"; import { get_org } from "@/api/opk/zxy/news/api"; import SavePage from "@/views/hr/company/savePageNew.vue"; +import UploadDownloadPage from "@/views/hr/company/uploadDownloadPage.vue"; +const currentTime = ref(0); const currOrgManList = ref([]); const currOrgCont = ref(309); const currOrgContName = ref("山东恒信高科能源有限公司"); @@ -47,6 +50,7 @@ const initInfo = () => { initConter.value = res.data; currOrgCont.value = res.data.currentOrg; currOrgContName.value = res.data.currentOrgName; + currentTime.value = res.data.currentTime; getOrgList(res.data.currentOrg, res.data.year, res.data.month); // get_org({ // id: res.data.currentOrg.toString(), @@ -78,8 +82,93 @@ onMounted(() => { initInfo(); }); //删除一设定人员 -const delTag = () => { - console.log("删除一设定人员"); +const delTag = (val: any, allVal: any, typeClass: number) => { + console.log("删除一设定人员", typeClass, val); + console.log("删除一设定人员allVal", allVal); + switch (typeClass) { + case 1: + if (allVal.baiTian && Array.isArray(allVal.baiTian) && allVal.baiTian.length > 0) { + let usAry = []; + let usKeyAry = []; + allVal.baiTian.forEach((item: any) => { + if (val.userKey != item.userKey) { + usAry.push(item); + usKeyAry.push(item.userKey); + } + }); + allVal.baiTian = usAry; + delMonthOneus({ id: allVal.id, types: typeClass, userAry: usKeyAry }); + } + + break; + case 2: + if (allVal.night && Array.isArray(allVal.night) && allVal.night.length > 0) { + let usAry = []; + let usKeyAry = []; + allVal.night.forEach((item: any) => { + if (val.userKey != item.userKey) { + usAry.push(item); + usKeyAry.push(item.userKey); + } + }); + allVal.night = usAry; + delMonthOneus({ id: allVal.id, types: typeClass, userAry: usKeyAry }); + } + + break; + case 3: + if (allVal.allDay && Array.isArray(allVal.allDay) && allVal.allDay.length > 0) { + let usAry = []; + let usKeyAry = []; + allVal.allDay.forEach((item: any) => { + if (val.userKey != item.userKey) { + usAry.push(item); + usKeyAry.push(item.userKey); + } + }); + allVal.allDay = usAry; + delMonthOneus({ id: allVal.id, types: typeClass, userAry: usKeyAry }); + } + + break; + case 4: + if (allVal.morning && Array.isArray(allVal.morning) && allVal.morning.length > 0) { + let usAry = []; + let usKeyAry = []; + allVal.morning.forEach((item: any) => { + if (val.userKey != item.userKey) { + usAry.push(item); + usKeyAry.push(item.userKey); + } + }); + allVal.morning = usAry; + delMonthOneus({ id: allVal.id, types: typeClass, userAry: usKeyAry }); + } + + break; + case 5: + if ( + allVal.afternoon && + Array.isArray(allVal.afternoon) && + allVal.afternoon.length > 0 + ) { + let usAry = []; + let usKeyAry = []; + allVal.afternoon.forEach((item: any) => { + if (val.userKey != item.userKey) { + usAry.push(item); + usKeyAry.push(item.userKey); + } + }); + allVal.afternoon = usAry; + delMonthOneus({ id: allVal.id, types: typeClass, userAry: usKeyAry }); + } + + break; + default: + break; + } + console.log("删除一设定人员--123->", allVal); }; //选中行政组织 const pickOrg = (val: any) => { @@ -166,6 +255,11 @@ const isShowOrg = (item: any) => { // deep: true, // } // ); +//上传下载 +const upDwOpen = ref(false); +const upLoadOrDowan = () => { + upDwOpen.value = true; +}; @@ -232,7 +330,7 @@ const isShowOrg = (item: any) => { {{ mItem.name }} @@ -241,7 +339,7 @@ const isShowOrg = (item: any) => { {{ mItem.name }} @@ -250,7 +348,7 @@ const isShowOrg = (item: any) => { {{ mItem.name }} @@ -261,7 +359,7 @@ const isShowOrg = (item: any) => { {{ mItem.name }} @@ -272,7 +370,7 @@ const isShowOrg = (item: any) => { {{ mItem.name }} @@ -282,7 +380,7 @@ const isShowOrg = (item: any) => { {{ mItem.name }} @@ -320,6 +418,15 @@ const isShowOrg = (item: any) => { :curr-org-cont-name="currOrgContName" @pickRefresh="pickRefresh" /> + diff --git a/src/views/hr/company/orgPeopleNew.vue b/src/views/hr/company/orgPeopleNew.vue index 617cf14..491394e 100644 --- a/src/views/hr/company/orgPeopleNew.vue +++ b/src/views/hr/company/orgPeopleNew.vue @@ -203,7 +203,7 @@ onMounted(() => {