ปรับเเสดงรูป
This commit is contained in:
parent
85677820e4
commit
ad2ea934d5
2 changed files with 42 additions and 21 deletions
|
|
@ -490,7 +490,6 @@ const evaluator = ref<any>({
|
||||||
posTypeName: "",
|
posTypeName: "",
|
||||||
posLevelName: "",
|
posLevelName: "",
|
||||||
org: "",
|
org: "",
|
||||||
posmasterAct: "",
|
|
||||||
isPosmasterAct: false,
|
isPosmasterAct: false,
|
||||||
posmasterAct: [],
|
posmasterAct: [],
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,12 @@ import { useQuasar } from "quasar";
|
||||||
import keycloak, { kcLogout } from "@/plugins/keycloak";
|
import keycloak, { kcLogout } from "@/plugins/keycloak";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import CustomComponent from "@/components/CustomDialog.vue";
|
import CustomComponent from "@/components/CustomDialog.vue";
|
||||||
|
import avatar from "@/assets/avatar_user.jpg";
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const profileImg = ref<string>("");
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
|
|
@ -42,24 +42,46 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
async function checkUser() {
|
async function checkUser() {
|
||||||
http.get(config.API.profilePosition()).catch((err) => {
|
http
|
||||||
$q.dialog({
|
.get(config.API.profilePosition())
|
||||||
component: CustomComponent,
|
.then(async (res) => {
|
||||||
componentProps: {
|
const data = res.data.result;
|
||||||
title: "ข้อความแจ้งเตือน",
|
if (data.avatarName) {
|
||||||
message: err.response.data.message,
|
await getImg(data.profileId, data.avatarName);
|
||||||
icon: "warning",
|
} else {
|
||||||
color: "red",
|
profileImg.value = avatar;
|
||||||
onlycancel: true,
|
}
|
||||||
},
|
})
|
||||||
}).onCancel(async () => {
|
.catch((err) => {
|
||||||
showLoader();
|
$q.dialog({
|
||||||
await kcLogout();
|
component: CustomComponent,
|
||||||
setTimeout(() => {
|
componentProps: {
|
||||||
hideLoader();
|
title: "ข้อความแจ้งเตือน",
|
||||||
}, 1000);
|
message: err.response.data.message,
|
||||||
|
icon: "warning",
|
||||||
|
color: "red",
|
||||||
|
onlycancel: true,
|
||||||
|
},
|
||||||
|
}).onCancel(async () => {
|
||||||
|
showLoader();
|
||||||
|
await kcLogout();
|
||||||
|
setTimeout(() => {
|
||||||
|
hideLoader();
|
||||||
|
}, 1000);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
|
function getImg(id: string, pathName: string) {
|
||||||
|
http
|
||||||
|
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, pathName))
|
||||||
|
.then((res) => {
|
||||||
|
profileImg.value = res.data.downloadUrl;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
const totalNoti = ref<number>(0);
|
const totalNoti = ref<number>(0);
|
||||||
|
|
@ -406,7 +428,7 @@ function onInfo() {
|
||||||
<q-item dense v-close-popup class="q-pa-none q-pl-xs">
|
<q-item dense v-close-popup class="q-pa-none q-pl-xs">
|
||||||
<q-item-section avatar class="q-pa-none" style="min-width: 30px">
|
<q-item-section avatar class="q-pa-none" style="min-width: 30px">
|
||||||
<q-img
|
<q-img
|
||||||
src="@/assets/avatar_user.jpg"
|
:src="profileImg"
|
||||||
class="border-100"
|
class="border-100"
|
||||||
spinner-color="white"
|
spinner-color="white"
|
||||||
style="height: 30px; max-width: 30px"
|
style="height: 30px; max-width: 30px"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue