แก้ไขคำผิด
This commit is contained in:
parent
d226498322
commit
e3365235c6
9 changed files with 68 additions and 52 deletions
|
|
@ -18,6 +18,10 @@ import type {
|
|||
} from "@/modules/06_retirement/interface/response/Main";
|
||||
import type { QTableProps } from "quasar";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
||||
|
||||
/** importComponents*/
|
||||
import CardProfile from "@/components/CardProfile.vue";
|
||||
|
||||
const avatar = ref<string>("");
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
|
|
@ -42,6 +46,8 @@ const { statusText } = RetirementData;
|
|||
|
||||
/** ตัวแปร */
|
||||
const roleUser = ref<string>("");
|
||||
const dataProfile = ref<DataProfile>();
|
||||
|
||||
const id = ref<string>(route.params.id.toString());
|
||||
const myForm = ref<QForm | null>(null);
|
||||
const myFormConfirm = ref<QForm | null>(null);
|
||||
|
|
@ -166,7 +172,7 @@ const fetchData = async (id: string) => {
|
|||
.get(config.API.resingByid(id))
|
||||
.then((res: any) => {
|
||||
const data = res.data.result;
|
||||
console.log(data);
|
||||
dataProfile.value = data as DataProfile;
|
||||
|
||||
let list: TypeFile[] = [];
|
||||
if (data.docs.length > 0) {
|
||||
|
|
@ -190,7 +196,7 @@ const fetchData = async (id: string) => {
|
|||
location.value = data.location ?? "";
|
||||
status.value = data.status ?? "";
|
||||
remarkHorizontal.value = data.remarkHorizontal ?? "-";
|
||||
getAvatar(data.profileId);
|
||||
// getAvatar(data.profileId);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -200,19 +206,19 @@ const fetchData = async (id: string) => {
|
|||
});
|
||||
};
|
||||
|
||||
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(() => {});
|
||||
}
|
||||
}
|
||||
// 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");
|
||||
|
|
@ -318,16 +324,19 @@ const saveConditions = () => {
|
|||
if (myForm.value !== null) {
|
||||
myForm.value.validate().then((success) => {
|
||||
if (success) {
|
||||
dialogMessage(
|
||||
$q,
|
||||
"ต้องการแก้ไขข้อมูลหรือไม่?",
|
||||
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย",
|
||||
"mdi-help-circle-outline",
|
||||
"ตกลง",
|
||||
"public",
|
||||
async () => await dataSave(),
|
||||
undefined
|
||||
);
|
||||
dialogConfirm($q, () => {
|
||||
dataSave();
|
||||
});
|
||||
// dialogMessage(
|
||||
// $q,
|
||||
// "ต้องการแก้ไขข้อมูลหรือไม่?",
|
||||
// "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย",
|
||||
// "mdi-help-circle-outline",
|
||||
// "ตกลง",
|
||||
// "public",
|
||||
// async () => await dataSave(),
|
||||
// undefined
|
||||
// );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -343,16 +352,19 @@ const conditionSave = () => {
|
|||
if (myForm.value !== null) {
|
||||
myForm.value.validate().then((success) => {
|
||||
if (success) {
|
||||
dialogMessage(
|
||||
$q,
|
||||
"ต้องการแก้ไขข้อมูลหรือไม่?",
|
||||
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย",
|
||||
"mdi-help-circle-outline",
|
||||
"ตกลง",
|
||||
"public",
|
||||
async () => await saveData(),
|
||||
undefined
|
||||
);
|
||||
dialogConfirm($q, () => {
|
||||
saveData();
|
||||
});
|
||||
// dialogMessage(
|
||||
// $q,
|
||||
// "ต้องการแก้ไขข้อมูลหรือไม่?",
|
||||
// "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย",
|
||||
// "mdi-help-circle-outline",
|
||||
// "ตกลง",
|
||||
// "public",
|
||||
// async () => ,
|
||||
// undefined
|
||||
// );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -448,11 +460,6 @@ const downloadFile = (response: any, filename: string) => {
|
|||
document.body.removeChild(link);
|
||||
};
|
||||
|
||||
function onclickViewinfo(id: string) {
|
||||
modalPersonal.value = true;
|
||||
personId.value = id;
|
||||
}
|
||||
|
||||
function updatemodalPersonal(modal: boolean) {
|
||||
modalPersonal.value = modal;
|
||||
}
|
||||
|
|
@ -463,7 +470,7 @@ function uploadFiles() {
|
|||
showLoader();
|
||||
http
|
||||
.put(config.API.investigateRelevantUploadFile(id.value), Data)
|
||||
.then((res) => {
|
||||
.then(() => {
|
||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -520,7 +527,10 @@ function confirmRemove(fileId: string) {
|
|||
รายละเอียดการลาออกของ
|
||||
{{ dataDetail.firstName + " " + dataDetail.lastName }}
|
||||
</div>
|
||||
<q-card bordered class="row col-12 text-dark">
|
||||
|
||||
<CardProfile :data="dataProfile as DataProfile" />
|
||||
|
||||
<!-- <q-card bordered class="row col-12 text-dark">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||
<div class="q-pl-sm text-weight-bold text-subtitle2">
|
||||
{{ dataDetail.firstName + " " + dataDetail.lastName }}
|
||||
|
|
@ -577,7 +587,7 @@ function confirmRemove(fileId: string) {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-card> -->
|
||||
|
||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||
|
|
@ -661,6 +671,7 @@ function confirmRemove(fileId: string) {
|
|||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
<q-card v-if="rows.length > 0" bordered class="row col-12 text-dark q-mt-sm">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||
<div class="q-pl-sm text-weight-bold text-dark">เอกสารเพิ่มเติม</div>
|
||||
|
|
@ -932,6 +943,7 @@ function confirmRemove(fileId: string) {
|
|||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||
<div class="q-pl-sm text-weight-bold text-dark">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue