ข้อความเตือน เครื่องราชฯ
This commit is contained in:
parent
3d4e47ca8c
commit
542f4d332e
3 changed files with 114 additions and 49 deletions
|
|
@ -26,42 +26,50 @@ const action = ref<string>("");
|
|||
const profileId = ref<string>("");
|
||||
const roundYear = ref<any>();
|
||||
const insigniaList = ref<any>([]);
|
||||
const loadView = ref<boolean>(false);
|
||||
|
||||
onMounted(async () => {
|
||||
await fecthRound();
|
||||
await fecthInsigniaType();
|
||||
// await fecthInsigniaType();
|
||||
});
|
||||
const fecthRound = async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.noteround())
|
||||
.then((res) => {
|
||||
.then(async (res) => {
|
||||
let data = res.data.result;
|
||||
selectRoundAllOption.value = [
|
||||
{
|
||||
name: "ทั้งหมด",
|
||||
id: "0",
|
||||
year: 0,
|
||||
},
|
||||
];
|
||||
data.map((e: any) => {
|
||||
selectRoundOption.value.push({
|
||||
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
id: e.id,
|
||||
year: e.year,
|
||||
if (data.length !== 0) {
|
||||
await fecthInsigniaType();
|
||||
selectRoundAllOption.value = [
|
||||
{
|
||||
name: "ทั้งหมด",
|
||||
id: "0",
|
||||
year: 0,
|
||||
},
|
||||
];
|
||||
data.map((e: any) => {
|
||||
selectRoundOption.value.push({
|
||||
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
id: e.id,
|
||||
year: e.year,
|
||||
});
|
||||
selectRoundAllOption.value.push({
|
||||
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
id: e.id,
|
||||
year: e.year,
|
||||
});
|
||||
});
|
||||
selectRoundAllOption.value.push({
|
||||
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
id: e.id,
|
||||
year: e.year,
|
||||
});
|
||||
});
|
||||
|
||||
selectRound.value = data[0].id;
|
||||
yearRound.value = data[0].year;
|
||||
roundYear.value = data[0].year;
|
||||
selectRound.value = data[0].id;
|
||||
yearRound.value = data[0].year;
|
||||
roundYear.value = data[0].year;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -73,7 +81,7 @@ const fecthInsignia = async () => {
|
|||
DataStore.fetchDataInsignia(data);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(async () => {
|
||||
insigniaList.value = await DataStore.insigniaOp.filter(
|
||||
|
|
@ -88,11 +96,13 @@ const fecthInsigniaType = async () => {
|
|||
let data = res.data.result;
|
||||
DataStore.fetchDatainsigniaType(data);
|
||||
tab.value = DataStore.insigniaType[0].name;
|
||||
loadView.value = true;
|
||||
await fecthInsignia();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {});
|
||||
};
|
||||
|
||||
const visibleColumns = ref<String[]>([
|
||||
|
|
@ -367,7 +377,12 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
<div class="toptitle text-dark col-12 row items-center">
|
||||
ยืม-คืนเครื่องราชฯ
|
||||
</div>
|
||||
<q-card flat bordered class="col-12 q-my-md q-mt-sm rounded-borders">
|
||||
<q-card
|
||||
flat
|
||||
bordered
|
||||
class="col-12 q-my-md q-mt-sm rounded-borders"
|
||||
v-if="loadView == tr"
|
||||
>
|
||||
<q-tabs
|
||||
dense
|
||||
v-model="tab"
|
||||
|
|
@ -553,6 +568,13 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
:type-id="tab"
|
||||
/>
|
||||
</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>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.arrow {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue