ปรับระบบทดลองงานใหม่
This commit is contained in:
parent
c8b3863b84
commit
85c755f359
11 changed files with 852 additions and 500 deletions
|
|
@ -7,8 +7,8 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import { useQuasar } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
const router = useRouter();
|
||||
|
|
@ -22,7 +22,7 @@ const attrs = ref<any>(useAttrs());
|
|||
const paging = ref<boolean>(true);
|
||||
const filterRef = ref<any>(null);
|
||||
const organization = ref<string>("");
|
||||
const avatarprofile = ref<string>("");
|
||||
const avatarProfile = ref<string>("");
|
||||
const filterKeyword = ref<string>("");
|
||||
const position_line = ref<string>("");
|
||||
const position_level = ref<string>("");
|
||||
|
|
@ -178,7 +178,6 @@ async function getpersonalList() {
|
|||
organization.value = data.organization;
|
||||
probation_status.value = data.probation_status;
|
||||
probation_statusold.value = data.probation_status;
|
||||
avatarprofile.value = data.avatar;
|
||||
})
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
|
|
@ -230,10 +229,10 @@ function resetFilter() {
|
|||
filterRef.value.focus();
|
||||
}
|
||||
|
||||
function paginationLabel(start: string, end: string, total: string){
|
||||
function paginationLabel(start: string, end: string, total: string) {
|
||||
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||
else return start + "-" + end + " ใน " + total;
|
||||
};
|
||||
}
|
||||
|
||||
function onclickViewinfo(id: string) {
|
||||
modalPersonal.value = true;
|
||||
|
|
@ -244,10 +243,26 @@ function updatemodalPersonal(modal: boolean) {
|
|||
modalPersonal.value = modal;
|
||||
}
|
||||
|
||||
async function fetchProfilePhoto() {
|
||||
await http
|
||||
.get(
|
||||
config.API.fileByFile(
|
||||
"ทะเบียนประวัติ",
|
||||
"โปรไฟล์",
|
||||
personalId.value,
|
||||
`profile-${personalId.value}`
|
||||
)
|
||||
)
|
||||
.then(async (res) => {
|
||||
avatarProfile.value = res.data.downloadUrl;
|
||||
});
|
||||
}
|
||||
|
||||
/** get ค่า เมื่อโหลดหน้า */
|
||||
onMounted(async () => {
|
||||
await getpersonalList();
|
||||
await getAssignList();
|
||||
fetchProfilePhoto();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -283,7 +298,7 @@ onMounted(async () => {
|
|||
<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="avatarprofile" v-if="avatarprofile !== null" />
|
||||
<q-img :src="avatarProfile" v-if="avatarProfile !== ''" />
|
||||
<q-img src="@/assets/avatar_user.jpg" v-else />
|
||||
</div>
|
||||
|
||||
|
|
@ -349,7 +364,6 @@ onMounted(async () => {
|
|||
>
|
||||
<q-tooltip>เพิ่มงานที่ได้รับมอบหมาย</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
</div>
|
||||
<q-space />
|
||||
<q-input
|
||||
|
|
@ -448,7 +462,6 @@ onMounted(async () => {
|
|||
</div>
|
||||
</q-card>
|
||||
|
||||
|
||||
<PopupPersonal
|
||||
:modal="modalPersonal"
|
||||
:id="personId"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue