get commander
This commit is contained in:
parent
3887cdaed1
commit
759a7c556d
3 changed files with 35 additions and 0 deletions
|
|
@ -294,6 +294,7 @@ async function fetcheSigner(id: string) {
|
|||
})
|
||||
.catch(() => {
|
||||
store.statusUpload = false;
|
||||
getCommander();
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -410,6 +411,21 @@ onMounted(async () => {
|
|||
downloadFile("6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)");
|
||||
});
|
||||
|
||||
function getCommander() {
|
||||
http
|
||||
.get(config.API.searchCommander)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
formCommand.commanderFullname = data.commanderFullname;
|
||||
formCommand.commanderPosition = data.commanderPosition;
|
||||
formCommand.commanderAboveFullname = data.commanderAboveFullname;
|
||||
formCommand.commanderAbovePosition = data.commanderAbovePosition;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {});
|
||||
}
|
||||
/** callback function */
|
||||
watch(
|
||||
() => store.checkFileupload,
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@ async function fetcheSigner(id: string) {
|
|||
})
|
||||
.catch(() => {
|
||||
store.statusUpload = false;
|
||||
getCommander();
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -222,6 +223,22 @@ onMounted(async () => {
|
|||
await fetchCheckDate();
|
||||
});
|
||||
|
||||
function getCommander() {
|
||||
http
|
||||
.get(config.API.searchCommander)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
formCommand.commanderFullname = data.commanderFullname;
|
||||
formCommand.commanderPosition = data.commanderPosition;
|
||||
formCommand.commanderAboveFullname = data.commanderAboveFullname;
|
||||
formCommand.commanderAbovePosition = data.commanderAbovePosition;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {});
|
||||
}
|
||||
|
||||
watch(
|
||||
() => store.checkFileupload,
|
||||
() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue