ปรับ selectorRound ยืมคืน
This commit is contained in:
parent
cc6c637538
commit
d2daffa7b2
1 changed files with 38 additions and 28 deletions
|
|
@ -46,34 +46,30 @@ const fecthRound = async () => {
|
|||
.get(config.API.noteround())
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
console.log(data);
|
||||
|
||||
selectRoundAllOption.value = [
|
||||
{
|
||||
name: "ทั้งหมด",
|
||||
id: "00000000-0000-0000-0000-000000000000",
|
||||
id: "0",
|
||||
year: 0,
|
||||
},
|
||||
];
|
||||
|
||||
data.map((e: any) => {
|
||||
selectRoundOption.value = [
|
||||
...selectRoundOption.value,
|
||||
{
|
||||
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
id: e.id,
|
||||
year: e.year,
|
||||
},
|
||||
];
|
||||
|
||||
selectRoundAllOption.value = [
|
||||
...selectRoundAllOption.value,
|
||||
{
|
||||
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
id: e.id,
|
||||
year: e.year,
|
||||
},
|
||||
];
|
||||
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,
|
||||
});
|
||||
});
|
||||
|
||||
selectRound.value = data[0].id;
|
||||
yearRound.value = data[0].year;
|
||||
roundYear.value = data[0].year;
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -302,9 +298,11 @@ const selectorInsignia = async () => {
|
|||
: dataCopy;
|
||||
};
|
||||
|
||||
// const selectorRound = (round: string) => {
|
||||
// selectRound.value = round;
|
||||
// };
|
||||
const yearRound = ref<number>();
|
||||
const selectorRound = async (round: number) => {
|
||||
roundYear.value = round;
|
||||
await fecthlistInsignia();
|
||||
};
|
||||
|
||||
const rows = ref<any[]>([]);
|
||||
const fecthlistInsignia = async () => {
|
||||
|
|
@ -383,12 +381,24 @@ const resetFilter = () => {
|
|||
>
|
||||
<div class="q-pa-md">
|
||||
<div class="row col-12 q-pb-sm q-col-gutter-x-xs">
|
||||
<!-- <div>
|
||||
<q-select v-model="selectRound" dense outlined lazy-rules hide-bottom-space
|
||||
:label="`${'รอบการเสนอขอเครื่องราชฯ'}`" emit-value map-options option-label="name"
|
||||
:options="selectRoundAllOption" option-value="id" :borderless="false"
|
||||
style="min-width: 150px" @update:emit-value="selectorRound" />
|
||||
</div> -->
|
||||
<div>
|
||||
<q-select
|
||||
v-model="yearRound"
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
:label="`${'รอบการเสนอขอเครื่องราชฯ'}`"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="selectRoundAllOption"
|
||||
option-value="year"
|
||||
:borderless="false"
|
||||
style="min-width: 150px"
|
||||
@update:model-value="selectorRound"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<q-select
|
||||
v-model="DataStore.insignia"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue