fix:bug showload profile

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-02-06 10:07:32 +07:00
parent 91c870955b
commit b0b16131ab
4 changed files with 51 additions and 2 deletions

View file

@ -26,6 +26,7 @@ export default {
placementPass: () => `${placement}/pass`,
placementDefermentInfo: (id: string) => `${placement}/pass/deferment/${id}`,
placementDisclaimInfo: (id: string) => `${placement}/pass/disclaim/${id}`,
placementUpdatePass: `${placement}/pass/update-status`,
//personal
placementPersonalId: (personalId: string) =>

View file

@ -553,7 +553,6 @@ onMounted(async () => {
</q-form>
<div class="col-12">
{{ typeEmp }}
<!-- v-if="typeEmp != 'employee'" -->
<Workflow
v-model:is-check-data="isCheckData"

View file

@ -22,6 +22,7 @@ import type {
DataOptionSys,
} from "@/modules/04_registryPerson/interface/index/Main";
import type { ResponseObject } from "@/modules/04_registryPerson/interface/response/Profile";
import { s } from "@fullcalendar/core/internal-common";
/** importComponents*/
const CardNotPermission = defineAsyncComponent(
@ -178,6 +179,9 @@ function imageActive(n: any) {
* @param file ไฟล
*/
function resizeImage(file: File): Promise<File> {
if (!file) {
return Promise.reject("No file provided");
}
return new Promise((resolve, reject) => {
const img = new Image();
const reader = new FileReader();
@ -240,9 +244,9 @@ const newProfileFile = ref<any>(null);
/** ฟังก์ชันอัปโหลด*/
async function uploadImg() {
showLoader();
newProfileFile.value = await resizeImage(profileFile.value);
closeImage();
showLoader();
await http
.post(config.API.orgProfileAvatarbyType(empType.value), {
profileId: empType.value == "" ? profileId.value : undefined,

View file

@ -920,6 +920,28 @@ function onRefCommand(data: any) {
// commandId.value = 'bdf9da91-ba45-497a-a2b7-cc49e2446d97'; //
}
function onUpdateStatus(id: string) {
dialogConfirm(
$q,
async () => {
showLoader();
try {
await http.post(config.API.placementUpdatePass, {
personalId: id,
});
await success($q, "บันทึกสำเร็จ");
await getTable();
} catch (error) {
messageError($q, error);
} finally {
hideLoader();
}
},
"ยืนยันการส่งบรรจุ",
"ต้องการยืนยันการส่งบรรจุนี้ใช่หรือไม่ ?"
);
}
onMounted(async () => {
await getWorkFlow();
await getTable();
@ -982,6 +1004,7 @@ onMounted(async () => {
</q-item-section>
<q-item-section>รายละเอยด</q-item-section>
</q-item>
<q-item
v-if="
props.row.nodeName !== null &&
@ -1011,6 +1034,7 @@ onMounted(async () => {
</q-item-section>
<q-item-section>เลอกวนรายงานต</q-item-section>
</q-item>
<q-item
v-if="
roleAdmin &&
@ -1035,6 +1059,7 @@ onMounted(async () => {
</q-item-section>
<q-item-section>นตำแหน</q-item-section>
</q-item>
<q-item
v-if="
props.row.bmaOfficer !== 'บุคคลภายนอก' &&
@ -1087,6 +1112,26 @@ onMounted(async () => {
<q-item-section>เลอกหนวยงานทบการบรรจ</q-item-section>
</q-item>
<q-item
v-if="checkPermission($route)?.attrOwnership == 'OWNER'"
clickable
v-close-popup
@click="onUpdateStatus(props.row.personalId)"
>
<q-item-section
style="min-width: 0px"
avatar
class="q-py-sm"
>
<q-icon
color="primary"
size="xs"
name="mdi-account-arrow-right-outline"
/>
</q-item-section>
<q-item-section>บรรจแล</q-item-section>
</q-item>
<!-- <q-item
v-if="
props.row.bmaOfficer !== 'บุคคลภายนอก' &&