This commit is contained in:
@@ -373,7 +373,7 @@ export default {
|
|||||||
},
|
},
|
||||||
searchUser() {
|
searchUser() {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
this.load = true;
|
// this.load = true;
|
||||||
// ตัวอย่างการดึงข้อมูลจาก API หรือแหล่งข้อมูลอื่น ๆ ตามหน้าปัจจุบันที่เลือก
|
// ตัวอย่างการดึงข้อมูลจาก API หรือแหล่งข้อมูลอื่น ๆ ตามหน้าปัจจุบันที่เลือก
|
||||||
const startIndex = (this.page - 1) * 10;
|
const startIndex = (this.page - 1) * 10;
|
||||||
const endIndex = startIndex + 10;
|
const endIndex = startIndex + 10;
|
||||||
@@ -415,7 +415,7 @@ export default {
|
|||||||
// console.error("เกิดข้อผิดพลาดในการโหลดข้อมูล:", error);
|
// console.error("เกิดข้อผิดพลาดในการโหลดข้อมูล:", error);
|
||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
searchUserApi(offset, checkg) {
|
searchUserApi(checkg) {
|
||||||
this.allg = checkg;
|
this.allg = checkg;
|
||||||
this.searchGroup = this.group
|
this.searchGroup = this.group
|
||||||
this.show = false;
|
this.show = false;
|
||||||
@@ -425,7 +425,6 @@ export default {
|
|||||||
}
|
}
|
||||||
// this.offset = (this.page - 1) * 10;
|
// this.offset = (this.page - 1) * 10;
|
||||||
let data = {
|
let data = {
|
||||||
offset: offset,
|
|
||||||
limit: 90,
|
limit: 90,
|
||||||
};
|
};
|
||||||
// if (this.province) {
|
// if (this.province) {
|
||||||
@@ -460,8 +459,8 @@ export default {
|
|||||||
console.error("เกิดข้อผิดพลาดในการโหลดข้อมูล:", error);
|
console.error("เกิดข้อผิดพลาดในการโหลดข้อมูล:", error);
|
||||||
});
|
});
|
||||||
|
|
||||||
const startIndex = (this.page - 1) * 10;
|
const startIndex = (this.page - 1) * 10;
|
||||||
const endIndex = startIndex + 10;
|
const endIndex = startIndex + 10;
|
||||||
client.user.getAllUser
|
client.user.getAllUser
|
||||||
.query(data)
|
.query(data)
|
||||||
.then((rs) => {
|
.then((rs) => {
|
||||||
@@ -470,6 +469,9 @@ export default {
|
|||||||
this.load = false;
|
this.load = false;
|
||||||
if (rs.length == 0) {
|
if (rs.length == 0) {
|
||||||
this.show = true;
|
this.show = true;
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.result = [...rs].slice(startIndex, endIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
@@ -480,8 +482,7 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// ในตัวอย่างนี้ จะใช้ items ของ this.items เป็นตัวอย่าง โดยใช้ฟังก์ชัน slice หรือการดึงข้อมูลจากแหล่งข้อมูล
|
// ในตัวอย่างนี้ จะใช้ items ของ this.items เป็นตัวอย่าง โดยใช้ฟังก์ชัน slice หรือการดึงข้อมูลจากแหล่งข้อมูล
|
||||||
if(this.count>0){
|
|
||||||
this.result = [...this.resultdata].slice(startIndex, endIndex); }
|
|
||||||
|
|
||||||
},
|
},
|
||||||
filterData() {
|
filterData() {
|
||||||
|
|||||||
Reference in New Issue
Block a user