แก้รูปไม่ขึ้น
This commit is contained in:
parent
3eb1a41bdb
commit
80b40ead85
1 changed files with 21 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ import type {
|
|||
import type { QTableProps } from "quasar";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
|
||||
const avatar = ref<string>('')
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
/** Use */
|
||||
|
|
@ -179,6 +180,7 @@ const fetchData = async (id: string) => {
|
|||
location.value = data.location ?? "";
|
||||
status.value = data.status ?? "";
|
||||
remarkHorizontal.value = data.remarkHorizontal ?? "-";
|
||||
getAvatar(data.profileId)
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -187,6 +189,23 @@ const fetchData = async (id: string) => {
|
|||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
function getAvatar(id:string){
|
||||
if(id){
|
||||
http
|
||||
.get(config.API.profileAvaId(id))
|
||||
.then((res)=>{
|
||||
console.log(res)
|
||||
const dataList = res.data.result
|
||||
avatar.value = dataList.avatar
|
||||
}).catch((e)=>{
|
||||
|
||||
}).finally(()=>{
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// const downloadFile = (response: any, filename: string) => {
|
||||
// const link = document.createElement("a");
|
||||
// var fileName = filename;
|
||||
|
|
@ -435,7 +454,8 @@ function updatemodalPersonal(modal: boolean) {
|
|||
<div class="row col-12 q-pa-md">
|
||||
<div class="col-12 row bg-white q-col-gutter-md">
|
||||
<div class="col-xs-3 col-sm-2 col-md-1 row">
|
||||
<q-img src="@/assets/avatar_user.jpg" />
|
||||
<q-img :src="avatar" v-if="avatar !== '' && avatar !== null" />
|
||||
<q-img src="@/assets/avatar_user.jpg" v-else />
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12 q-pl-md">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue