โครงสร้างอัตรากำลัง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-02-14 17:41:32 +07:00
parent addf03eaf3
commit 131583f89f
5 changed files with 82 additions and 59 deletions

View file

@ -51,9 +51,13 @@ const props = defineProps({
type: String,
required: true,
},
mainTree: {
type: Object,
required: true,
},
});
const title = ref<string>("ย้ายตำแหน่ง");
const title = ref<string>("ย้ายตำแหน่งจากหน่วยงาน/ส่วนราชการปัจจุบัน");
const filterTree = ref<string>("");
const filterRef = ref();
const selectedTree = ref<string>("");
@ -116,60 +120,11 @@ function onClickMovePos() {
}
}
/**
* function fetch อรายการตำแหน
* @param id idTree
* @param level levelTree
*/
async function fetchDataTable(id: string, level: number, action: boolean) {
// orgLevel.value = level;
// reqMaster.id = id;
// reqMaster.type = level;
// action1.value = action;
// if (action) {
// setTimeout(() => {
// action1.value = false;
// }, 1000);
// reqMaster.isAll = false;
// reqMaster.page = 1;
// reqMaster.pageSize = 10;
// reqMaster.keyword = "";
// }
// if (action === true) {
// isLoad.value = true;
// }
// await http
// .post(config.API.orgPosMasterList, reqMaster)
// .then((res) => {
// posMaster.value = [];
// const dataMain: PosMaster[] = [];
// totalPage.value = Math.ceil(res.data.result.total / reqMaster.pageSize);
// res.data.result.data.forEach((e: PosMaster) => {
// const p = e.positions;
// if (p.length !== 0) {
// const a = p.find((el: Position) => el.positionIsSelected === true);
// const { id, ...rest } = a ? a : p[0];
// const test = { ...e, ...rest };
// dataMain.push(test);
// }
// });
// posMaster.value = store.fetchPosMaster(dataMain);
// })
// .catch((err) => {
// messageError($q, err);
// posMaster.value = [];
// })
// .finally(() => {
// setTimeout(() => {
// isLoad.value = false;
// }, 500);
// });
}
watch(
() => modal.value,
() => {
reqMaster.value.page = 1;
title.value = `ย้ายตำแหน่งจากหน่วยงาน/ส่วนราชการปัจจุบัน ${props.mainTree.orgName}`;
if (modal.value && props.type === "SINGER") {
const data = rows.value.filter((e: PosMaster2) => e.id === props.rowId);
selectedFilter.value = data;