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