api โครงสร้างกำลัง
This commit is contained in:
parent
3cb654bf17
commit
88041a1974
1 changed files with 20 additions and 30 deletions
|
|
@ -33,56 +33,46 @@ const itemStructure = ref<any>([
|
||||||
name: "สร้างใหม่",
|
name: "สร้างใหม่",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
val: "STRUCTURE",
|
val: "ORG",
|
||||||
name: "ทำสำเนาเฉพาะโครงสร้าง",
|
name: "ทำสำเนาเฉพาะโครงสร้าง",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
val: "STRUCTUREANDPOSITION",
|
val: "ORG_POSITION",
|
||||||
name: "ทำสำเนาโครงสร้างและตำแหน่ง",
|
name: "ทำสำเนาโครงสร้างและตำแหน่ง",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
val: "STRUCTUREANDPOSITION",
|
val: "ORG_POSITION_PERSON",
|
||||||
name: "ทำสำเนาโครงสร้าง ตำแหน่งและคนครอง",
|
name: "ทำสำเนาโครงสร้าง ตำแหน่งและคนครอง",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const dataActive = ref<DataActive>();
|
const dataActive = ref<DataActive>();
|
||||||
|
|
||||||
async function fetchOrganizationActive() {
|
async function fetchOrganizationActive() {
|
||||||
const data = {
|
|
||||||
activeId: null,
|
|
||||||
activeName: "null",
|
|
||||||
draftId: null,
|
|
||||||
draftName: null,
|
|
||||||
};
|
|
||||||
|
|
||||||
// dataActive.value = data;
|
|
||||||
|
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.activeOrganization)
|
.get(config.API.activeOrganization)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// if (data) {
|
const data = res.data.result;
|
||||||
// if (data.activeName === null && data.draftName === null) {
|
if (data) {
|
||||||
// isStatusData.value = false;
|
if (data.activeName === null && data.draftName === null) {
|
||||||
// } else {
|
isStatusData.value = false;
|
||||||
// isStatusData.value = true;
|
} else {
|
||||||
// }
|
isStatusData.value = true;
|
||||||
// if (isStatusData.value) {
|
if (isStatusData.value) {
|
||||||
// if (data.activeName === null) {
|
if (data.activeName === null) {
|
||||||
// ishasActive.value = true;
|
ishasActive.value = true;
|
||||||
// stroe.typeOrganizational = "draft";
|
stroe.typeOrganizational = "draft";
|
||||||
// } else if (data.draftName === null) {
|
} else if (data.draftName === null) {
|
||||||
// ishasDraft.value = true;
|
ishasDraft.value = true;
|
||||||
// stroe.typeOrganizational = "current";
|
stroe.typeOrganizational = "current";
|
||||||
// }
|
}
|
||||||
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
console.log(err);
|
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue