update style card / ปรับ offset / limit
All checks were successful
frontend-action / build-image (push) Successful in 1m3s
All checks were successful
frontend-action / build-image (push) Successful in 1m3s
This commit is contained in:
@@ -15,10 +15,10 @@
|
|||||||
v-for="(item, i) in dataProfile"
|
v-for="(item, i) in dataProfile"
|
||||||
:key="i"
|
:key="i"
|
||||||
cols="12"
|
cols="12"
|
||||||
md="6"
|
md="12"
|
||||||
lg="6"
|
lg="12"
|
||||||
>
|
>
|
||||||
<v-card elevation="5" class="text-sub2 mx-auto pb-5 card-user">
|
<v-card elevation="5" class="text-sub2 mx-auto pb-8 card-user" maxWidth="900" rounded="xl">
|
||||||
<div
|
<div
|
||||||
style="background: #37332f; color: white; width: 100%"
|
style="background: #37332f; color: white; width: 100%"
|
||||||
class="font-weight-bold pa-2 w-100 text-center"
|
class="font-weight-bold pa-2 w-100 text-center"
|
||||||
|
|||||||
@@ -12,6 +12,9 @@
|
|||||||
สามารถค้นหาผู้แสดงตนเป็นผู้สมัคร สว. ใน จังหวัด/เขต
|
สามารถค้นหาผู้แสดงตนเป็นผู้สมัคร สว. ใน จังหวัด/เขต
|
||||||
ที่ตัวเองเป็นผู้แสดงตน
|
ที่ตัวเองเป็นผู้แสดงตน
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text-small text-red-darken-3">
|
||||||
|
* การแสดงผลเป็นแบบสุ่มไม่เรียงลำดับ
|
||||||
|
</div>
|
||||||
<v-container>
|
<v-container>
|
||||||
<!-- {{ checkdata }} -->
|
<!-- {{ checkdata }} -->
|
||||||
<v-row>
|
<v-row>
|
||||||
@@ -69,7 +72,7 @@
|
|||||||
:items="items"
|
:items="items"
|
||||||
variant="solo"
|
variant="solo"
|
||||||
item-title="name"
|
item-title="name"
|
||||||
item-value="id"
|
return-object
|
||||||
placeholder="กลุ่มอาชีพ"
|
placeholder="กลุ่มอาชีพ"
|
||||||
hide-details
|
hide-details
|
||||||
v-model="group"
|
v-model="group"
|
||||||
@@ -94,9 +97,9 @@
|
|||||||
<span class="text-sub">ค้นหา</span>
|
<span class="text-sub">ค้นหา</span>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-container>
|
</v-container>
|
||||||
<!-- {{result}} -->
|
|
||||||
<CardUser :dataProfile="result" v-if="result.length" />
|
<CardUser :dataProfile="result" v-if="result.length" class="mt-2"/>
|
||||||
<!-- {{ show }} -->
|
|
||||||
<div
|
<div
|
||||||
v-if="result.length == 0 && this.show"
|
v-if="result.length == 0 && this.show"
|
||||||
class="my-10 text-sub2 txt-black"
|
class="my-10 text-sub2 txt-black"
|
||||||
@@ -106,13 +109,16 @@
|
|||||||
<!-- {{ count }}
|
<!-- {{ count }}
|
||||||
{{ Number(result.length)/ 2 }} -->
|
{{ Number(result.length)/ 2 }} -->
|
||||||
|
|
||||||
<div class="text-center">
|
<div class="text-center mt-2">
|
||||||
<v-pagination
|
<v-pagination
|
||||||
v-if="count > 0"
|
elevation="3"
|
||||||
|
v-if="count > 1"
|
||||||
v-model="page"
|
v-model="page"
|
||||||
:length="Math.ceil(count / 10)"
|
:length="Math.ceil(count / 1)"
|
||||||
rounded="circle"
|
rounded="circle"
|
||||||
@click="searchUser((this.page - 1) * 2)"
|
@click="searchUser(this.page - 1)"
|
||||||
|
next-icon="mdi-menu-right"
|
||||||
|
prev-icon="mdi-menu-left"
|
||||||
></v-pagination>
|
></v-pagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -154,7 +160,7 @@ export default {
|
|||||||
}
|
}
|
||||||
let data = {
|
let data = {
|
||||||
offset: offset,
|
offset: offset,
|
||||||
limit: 10,
|
limit: 1,
|
||||||
};
|
};
|
||||||
if (this.province) {
|
if (this.province) {
|
||||||
data.province = this.province.id;
|
data.province = this.province.id;
|
||||||
@@ -196,14 +202,14 @@ export default {
|
|||||||
// this.offset = (this.page - 1) * 10;
|
// this.offset = (this.page - 1) * 10;
|
||||||
let data = {
|
let data = {
|
||||||
offset: offset,
|
offset: offset,
|
||||||
limit: 10,
|
limit: 1,
|
||||||
};
|
};
|
||||||
if (this.province) {
|
if (this.province) {
|
||||||
data.province = this.province.id;
|
data.province = this.province.id;
|
||||||
// data.province = this.province;
|
// data.province = this.province;
|
||||||
}
|
}
|
||||||
if (this.group) {
|
if (this.group) {
|
||||||
data.group = this.group;
|
data.group = this.group.id;
|
||||||
}
|
}
|
||||||
if (this.district) {
|
if (this.district) {
|
||||||
data.zone = this.district.id;
|
data.zone = this.district.id;
|
||||||
@@ -259,9 +265,11 @@ export default {
|
|||||||
.mutate({})
|
.mutate({})
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
let province = datap.filter((x) => x.id === data.zone.province);
|
let province = datap.filter((x) => x.id === data.zone.province);
|
||||||
|
// let g =[...this.items].filter((x) => x.id === data.group);
|
||||||
this.province = province[0];
|
this.province = province[0];
|
||||||
this.district = data.zone;
|
this.district = data.zone;
|
||||||
this.checkdata = { ...data };
|
this.checkdata = { ...data };
|
||||||
|
this.group = data.group;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
alert("ไม่สามารถโหลดข้อมูลได้");
|
alert("ไม่สามารถโหลดข้อมูลได้");
|
||||||
@@ -293,4 +301,25 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style></style>
|
<style>
|
||||||
|
.v-pagination .v-btn {
|
||||||
|
font-size: 50px;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
background-color: rgb(221, 108, 49);
|
||||||
|
}
|
||||||
|
/* #app > div > div > main > div:nth-child(2) > div > div > div.text-center > nav > ul > li> button{
|
||||||
|
display: none;
|
||||||
|
} */
|
||||||
|
.v-pagination .v-pagination__item .v-btn {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.v-pagination .v-btn .pagination__prev {
|
||||||
|
font-size: 80px;
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
.v-pagination .v-btn .pagination__next {
|
||||||
|
display: block !important;
|
||||||
|
font-size: 80px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user