diff --git a/src/api/hr/org/type.ts b/src/api/hr/org/type.ts index 5c34dbb..01dec8a 100644 --- a/src/api/hr/org/type.ts +++ b/src/api/hr/org/type.ts @@ -100,6 +100,7 @@ export interface addOrgInfo{ abbreviation?: string, //简称 wechatid?: string //企业微信对照吗 kingdeeid?: string //金蝶对照码 + sort?:number //排序 } /** * 删除行政组织 diff --git a/src/views/hr/company/companyduty.vue b/src/views/hr/company/companyduty.vue index 500f338..bc1c7d9 100644 --- a/src/views/hr/company/companyduty.vue +++ b/src/views/hr/company/companyduty.vue @@ -9,9 +9,11 @@ import { getYearMonthWorkMan, delOneDayDuty, } from "@/api/hr/paiban/index"; - +import { get_org } from "@/api/opk/zxy/news/api"; import SavePage from "@/views/hr/company/savePage.vue"; +const currOrgManList = ref([]); +const currOrgCont = ref(309); const pickMonth = ref(""); const initConter = ref(""); const isSelect = ref(false); @@ -36,12 +38,21 @@ const initInfo = () => { companyDutyInit().then((res: any) => { console.log("初始化数据:", res.data); initConter.value = res.data; + currOrgCont.value = res.data.currentOrg; getOrgList(res.data.currentOrg, res.data.year, res.data.month); + get_org({ + id: res.data.currentOrg.toString(), + all: 1, + }).then((res: any) => { + console.log("获取行政组织人员信息get_org", res); + currOrgManList.value = res.data; + }); }); }; //获取行政组织列表 const getOrgList = (orgid: any, years: any, months: any) => { + currOrgCont.value = orgid; getYearMonthWorkMan({ orgId: orgid, years: years, @@ -62,7 +73,15 @@ const delTag = () => { }; //选中行政组织 const pickOrg = (val: any) => { + currOrgCont.value = val; getOrgList(val, initConter.value.year, initConter.value.month); + get_org({ + id: val.toString(), + all: 1, + }).then((res: any) => { + console.log("获取行政组织人员信息get_org", res); + currOrgManList.value = res.data; + }); }; //编辑数据 const saveData = (ord: any, val: any) => { @@ -119,6 +138,24 @@ const isShowOrg = (item: any) => { } // return true }; +//监听改变行政组织 +// watch( +// () => currOrgCont.value, +// (val: any) => { +// get_org({ +// id: val.toString(), +// all: 1, +// }) +// .then((res: any) => { +// console.log("获取行政组织人员信息get_org", res); +// orgPeopleList.value = res.data; + +// }) +// }, +// { +// deep: true, +// } +// );