From c0f6ba38c7a266e4c6e5ae04bfc3b0d925e3defe Mon Sep 17 00:00:00 2001 From: herenshan112 Date: Fri, 15 Aug 2025 11:01:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=80=BC=E7=8F=AD=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/hr/company/companyduty copy.vue | 34 +++++++++++- src/views/hr/company/companyduty.vue | 36 +++++++++++- src/views/hr/company/savePage.vue | 67 ++++++++++++++++++++++- 3 files changed, 132 insertions(+), 5 deletions(-) diff --git a/src/views/hr/company/companyduty copy.vue b/src/views/hr/company/companyduty copy.vue index 0f5d0ff..be6cd7e 100644 --- a/src/views/hr/company/companyduty copy.vue +++ b/src/views/hr/company/companyduty copy.vue @@ -29,15 +29,26 @@ const saveInfo = reactive({ night: [], years: 2025, isCompany: 0, + morning: [], + afternoon: [], }); const initInfo = () => { companyDutyInit().then((res: any) => { console.log("初始化数据:", res.data); initConter.value = res.data; + getOrgList(res.data.currentOrg, res.data.year, res.data.month); }); }; - +//判读那是否显示 +const isShowOrg = (item: any) => { + let showOrg = [296, 389, 401, 309]; + console.log("判读那是否显示", item); + if (item && showOrg.includes(item.id)) { + return true; + } + // return true +}; //获取行政组织列表 const getOrgList = (orgid: any, years: any, months: any) => { getYearMonthWorkMan({ @@ -76,6 +87,8 @@ const saveData = (ord: any, val: any) => { saveInfo.night = val.night ? val.night : []; saveInfo.years = val.years ? val.years : 2025; saveInfo.isCompany = ord.isCompany ? ord.isCompany : 0; + saveInfo.morning = val.morning ? val.morning : []; + saveInfo.afternoon = val.afternoon ? val.afternoon : []; saveOpen.value = true; console.log("编辑数据", saveInfo); }; @@ -186,6 +199,25 @@ watch( +
+ 上午 + + {{ + mItem.name + }} + + + 下午 + + {{ mItem.name }} + +
+
{ companyDutyInit().then((res: any) => { @@ -76,6 +78,8 @@ const saveData = (ord: any, val: any) => { saveInfo.night = val.night ? val.night : []; saveInfo.years = val.years ? val.years : 2025; saveInfo.isCompany = ord.isCompany ? ord.isCompany : 0; + saveInfo.morning = val.morning ? val.morning : []; + saveInfo.afternoon = val.afternoon ? val.afternoon : []; saveOpen.value = true; console.log("编辑数据", saveInfo); }; @@ -106,6 +110,15 @@ watch( deep: true, } ); +//判读那是否显示 +const isShowOrg = (item: any) => { + let showOrg = [296, 389, 401, 309]; + console.log("判读那是否显示", item); + if (item && showOrg.includes(item.id)) { + return true; + } + // return true +};