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
+};
@@ -167,7 +180,7 @@ watch(
style="vertical-align: bottom"
>
- 白天
+ 长白
+ 值班
+
+ 上午
+
+ {{ mItem.name }}
+
+ 下午
+
+ {{ mItem.name }}
+
+
{
saveInfo.value.allDay = res.data.allDayAry;
saveInfo.value.baiTian = res.data.baiTianAry;
saveInfo.value.night = res.data.nightAry;
+ saveInfo.value.morning = res.data.morningAry;
+ saveInfo.value.afternoon = res.data.afternoonAry;
saveInfo.value.isCompany = 1;
})
.finally(() => {
@@ -98,6 +100,7 @@ const getOrgPeople = () => {
}
});
};
+
//提交数据
const saveCenter = () => {
console.log("提交数据", saveInfo.value);
@@ -139,9 +142,10 @@ const orgTreeProps = {
inactive-value="2"
active-text="是"
inactive-text="否"
+ v-loading="loading"
/>
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+