ดึงข้อมูลเริ่มต้น
This commit is contained in:
parent
4cb827e65c
commit
e11b75baaf
2 changed files with 30 additions and 6 deletions
|
|
@ -63,6 +63,7 @@ export default {
|
||||||
dataUserOtherHistory: (id: string) => `${profileOrg}/other/history/${id}`,
|
dataUserOtherHistory: (id: string) => `${profileOrg}/other/history/${id}`,
|
||||||
|
|
||||||
orgCheckAvatar: (id: string) => `${profileOrg}/avatar/profileId/${id}`,
|
orgCheckAvatar: (id: string) => `${profileOrg}/avatar/profileId/${id}`,
|
||||||
|
orgSearchCommander: () => `${profileOrg}/search/commander`,
|
||||||
|
|
||||||
orgActive: `${org}/active`,
|
orgActive: `${org}/active`,
|
||||||
/** struct-chart*/
|
/** struct-chart*/
|
||||||
|
|
|
||||||
|
|
@ -230,6 +230,29 @@ async function onClickDowloadFile(
|
||||||
};
|
};
|
||||||
await genReport(body, fileName); //สร้างไฟล์ต้นแบบ
|
await genReport(body, fileName); //สร้างไฟล์ต้นแบบ
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getData(){
|
||||||
|
showLoader()
|
||||||
|
http
|
||||||
|
.get(config.API.orgSearchCommander())
|
||||||
|
.then((res)=>{
|
||||||
|
const data = res.data.result
|
||||||
|
formData.author = data.fullname
|
||||||
|
formData.commanderFullname = data.commanderFullname
|
||||||
|
formData.commanderPosition = data.commanderPosition
|
||||||
|
formData.commanderAboveFullname = data.commanderAboveFullname
|
||||||
|
formData.commanderAbovePosition = data.commanderAbovePosition
|
||||||
|
})
|
||||||
|
.catch((e)=>{
|
||||||
|
messageError($q,e)
|
||||||
|
}).finally(()=>{
|
||||||
|
hideLoader()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(()=>{
|
||||||
|
getData()
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -268,7 +291,7 @@ async function onClickDowloadFile(
|
||||||
<q-input
|
<q-input
|
||||||
ref="subjectRef"
|
ref="subjectRef"
|
||||||
dense
|
dense
|
||||||
class="col-xs-12 col-sm-6"
|
class="col-xs-12 col-sm-6 inputgreen"
|
||||||
outlined
|
outlined
|
||||||
label="ชื่อผลงาน"
|
label="ชื่อผลงาน"
|
||||||
v-model="formData.subject"
|
v-model="formData.subject"
|
||||||
|
|
@ -278,7 +301,7 @@ async function onClickDowloadFile(
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
ref="authorRef"
|
ref="authorRef"
|
||||||
class="col-xs-12 col-sm-6"
|
class="col-xs-12 col-sm-6 inputgreen"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="formData.author"
|
v-model="formData.author"
|
||||||
|
|
@ -311,7 +334,7 @@ async function onClickDowloadFile(
|
||||||
<q-input
|
<q-input
|
||||||
ref="commanderFullnameRef"
|
ref="commanderFullnameRef"
|
||||||
dense
|
dense
|
||||||
class="col-xs-12 col-sm-6"
|
class="col-xs-12 col-sm-6 inputgreen"
|
||||||
outlined
|
outlined
|
||||||
label="ชื่อ-นามสกุล"
|
label="ชื่อ-นามสกุล"
|
||||||
v-model="formData.commanderFullname"
|
v-model="formData.commanderFullname"
|
||||||
|
|
@ -323,7 +346,7 @@ async function onClickDowloadFile(
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
ref="commanderPositionRef"
|
ref="commanderPositionRef"
|
||||||
class="col-xs-12 col-sm-6"
|
class="col-xs-12 col-sm-6 inputgreen"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="formData.commanderPosition"
|
v-model="formData.commanderPosition"
|
||||||
|
|
@ -344,7 +367,7 @@ async function onClickDowloadFile(
|
||||||
<q-input
|
<q-input
|
||||||
ref="commanderAboveFullnameRef"
|
ref="commanderAboveFullnameRef"
|
||||||
dense
|
dense
|
||||||
class="col-xs-12 col-sm-6"
|
class="col-xs-12 col-sm-6 inputgreen"
|
||||||
outlined
|
outlined
|
||||||
v-model="formData.commanderAboveFullname"
|
v-model="formData.commanderAboveFullname"
|
||||||
label="ชื่อ-นามสกุล"
|
label="ชื่อ-นามสกุล"
|
||||||
|
|
@ -356,7 +379,7 @@ async function onClickDowloadFile(
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
ref="commanderAbovePositionRef"
|
ref="commanderAbovePositionRef"
|
||||||
class="col-xs-12 col-sm-6"
|
class="col-xs-12 col-sm-6 inputgreen"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="formData.commanderAbovePosition"
|
v-model="formData.commanderAbovePosition"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue