ปรับ เครื่องราชฯ
This commit is contained in:
parent
388893395b
commit
981bab8061
4 changed files with 416 additions and 139 deletions
|
|
@ -24,6 +24,7 @@ const { messageError, dialogConfirm, showLoader, hideLoader, success } = mixin;
|
|||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
|
||||
const loading = ref<boolean>(false);
|
||||
const loadview = ref<boolean>(false);
|
||||
const round = ref<string>("");
|
||||
const roundName = ref<string>("");
|
||||
const optionRound = ref<any>([]);
|
||||
|
|
@ -39,7 +40,6 @@ const stat = ref<any>({
|
|||
onMounted(async () => {
|
||||
await checkRole();
|
||||
await fecthlistRound();
|
||||
await fecthAgency();
|
||||
});
|
||||
|
||||
const checkRole = async () => {
|
||||
|
|
@ -60,16 +60,19 @@ const checkRole = async () => {
|
|||
const fecthlistRound = async () => {
|
||||
await http
|
||||
.get(config.API.listRoundInsignia())
|
||||
.then((res: any) => {
|
||||
.then(async (res: any) => {
|
||||
optionRound.value = res.data.result.map((e: any) => ({
|
||||
id: e.period_id,
|
||||
year: e.period_year,
|
||||
name: e.period_name,
|
||||
}));
|
||||
const lastValue = optionRound.value[0];
|
||||
round.value = lastValue.id.toString();
|
||||
roundName.value = lastValue.name;
|
||||
fecthStat(round.value);
|
||||
if (optionRound.value.length !== 0) {
|
||||
const lastValue = optionRound.value[0];
|
||||
round.value = lastValue.id.toString();
|
||||
roundName.value = lastValue.name;
|
||||
await fecthStat(round.value);
|
||||
await fecthAgency();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
|
|
@ -120,6 +123,7 @@ const fecthType = async () => {
|
|||
name: e.organizationName,
|
||||
}));
|
||||
DataStore.fetchOption(optiontypeOc.value);
|
||||
loadview.value = true;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -294,7 +298,7 @@ const requestSendNote = async () => {
|
|||
<div class="toptitle text-dark col-12 row items-center">
|
||||
รายชื่อข้าราชการสามัญฯ ที่มีสิทธิ์ยื่นขอพระราชทานเครื่องราชอิสริยาภรณ์
|
||||
</div>
|
||||
<q-card bordered class="row col-12 q-mt-sm">
|
||||
<q-card bordered class="row col-12 q-mt-sm" v-if="loadview">
|
||||
<div class="row col-12 items-center bg-grey-1">
|
||||
<div class="q-pl-md q-pr-sm text-weight-medium text-grey-7">รอบ</div>
|
||||
<q-select
|
||||
|
|
@ -351,6 +355,13 @@ const requestSendNote = async () => {
|
|||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
<q-card v-else>
|
||||
<div class="q-pa-md q-gutter-sm">
|
||||
<q-banner inline-actions rounded class="bg-grey-1 text-center">
|
||||
ไม่มีข้อมูลรอบการเสนอขอพระราชทานเครื่องราชอิสริยาภรณ์
|
||||
</q-banner>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
<q-card flat bordered class="col-12 q-mt-sm" v-if="loading">
|
||||
<div
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue