diff --git a/src/views/hr/company/companyduty copy.vue b/src/views/hr/company/companyduty copy.vue index 14a5a36..be6cd7e 100644 --- a/src/views/hr/company/companyduty copy.vue +++ b/src/views/hr/company/companyduty copy.vue @@ -36,10 +36,19 @@ 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({ diff --git a/src/views/hr/company/companyduty.vue b/src/views/hr/company/companyduty.vue index 51dc090..500f338 100644 --- a/src/views/hr/company/companyduty.vue +++ b/src/views/hr/company/companyduty.vue @@ -29,6 +29,8 @@ const saveInfo = reactive({ night: [], years: 2025, isCompany: 0, + morning: [], + afternoon: [], }); const initInfo = () => { 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 +};