บรรจุ => fix bug

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-06-27 11:53:53 +07:00
parent caaabc808d
commit b707a44734

View file

@ -287,12 +287,13 @@ async function getTable() {
.get(config.API.personalList(examIdString)) .get(config.API.personalList(examIdString))
.then(async (res: any) => { .then(async (res: any) => {
dataRes.value = res.data.result; dataRes.value = res.data.result;
rowsAll.value = []; rowsAll.value = [];
(rowsFilter.value = []), (rowsFilter.value = []),
res.data.result.map((data: any) => { res.data.result.map((data: any) => {
const rowData = { const rowData = {
personalId: data.personalId, personalId: data.personalId,
avatar: data.avatar, avatar: avatar,
name: data.fullName, name: data.fullName,
fullName: data.fullName + " " + data.idCard, fullName: data.fullName + " " + data.idCard,
idCard: data.idCard, idCard: data.idCard,
@ -372,7 +373,7 @@ async function getTable() {
e.reportingDate !== null e.reportingDate !== null
); );
insertAvatar(rows.value); // insertAvatar(rows.value);
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);
@ -382,31 +383,31 @@ async function getTable() {
}); });
} }
function insertAvatar(items: any) { // function insertAvatar(items: any) {
items.map((x: any, index: number) => { // items.map((x: any, index: number) => {
http // http
.get( // .get(
config.API.fileByFile( // config.API.fileByFile(
"ทะเบียนประวัติ", // "",
"โปรไฟล์", // "",
x.personalId, // x.personalId,
"profile-" + x.personalId // "profile-" + x.personalId
) // )
) // )
.then((img) => { // .then((img) => {
rows.value[index] = { // rows.value[index] = {
...x, // ...x,
avatar: img.data.downloadUrl, // avatar: img.data.downloadUrl,
}; // };
}) // })
.catch(() => { // .catch(() => {
rows.value[index] = { // rows.value[index] = {
...x, // ...x,
avatar: avatar, // avatar: avatar,
}; // };
}); // });
}); // });
} // }
/**ยืนยันการผ่อนผัน */ /**ยืนยันการผ่อนผัน */
async function saveDeferment() { async function saveDeferment() {