updated layout บรรจุแต่งตั้ง
This commit is contained in:
parent
c19d37bcc6
commit
ec04e7febf
1 changed files with 32 additions and 30 deletions
|
|
@ -10,9 +10,9 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
interface ArrayFileList {
|
||||
id:string
|
||||
pathName:string
|
||||
fileName:string
|
||||
id: string;
|
||||
pathName: string;
|
||||
fileName: string;
|
||||
}
|
||||
|
||||
const props = defineProps({
|
||||
|
|
@ -40,7 +40,14 @@ const fileList = ref<ArrayFileList[]>([]);
|
|||
const $q = useQuasar(); // show dialog
|
||||
const mixin = useCounterMixin();
|
||||
const route = useRoute();
|
||||
const { success, messageError, showLoader, dialogConfirm, hideLoader,dialogRemove } = mixin;
|
||||
const {
|
||||
success,
|
||||
messageError,
|
||||
showLoader,
|
||||
dialogConfirm,
|
||||
hideLoader,
|
||||
dialogRemove,
|
||||
} = mixin;
|
||||
const profileId = ref<string>(
|
||||
route.params.personalId ? route.params.personalId.toString() : ""
|
||||
);
|
||||
|
|
@ -51,30 +58,28 @@ const file = ref<any>([]);
|
|||
const name = ref<string>("");
|
||||
const dataMain = ref<any>([]);
|
||||
|
||||
|
||||
|
||||
// const getData = async () => {
|
||||
// if (props.datainformation) {
|
||||
// dataMain.value = props.datainformation;
|
||||
// files.value = dataMain.value.docs;
|
||||
// }
|
||||
|
||||
// โค้ดเก่ายังไม่ได้ใช้
|
||||
// if (profileId.value) {
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.profilePaperId(profileId.value))
|
||||
// .then((res) => {
|
||||
// const data = res.data.result;
|
||||
// files.value = data;
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
// }
|
||||
// โค้ดเก่ายังไม่ได้ใช้
|
||||
// if (profileId.value) {
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.profilePaperId(profileId.value))
|
||||
// .then((res) => {
|
||||
// const data = res.data.result;
|
||||
// files.value = data;
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
// }
|
||||
// };
|
||||
|
||||
const deleteData = async (id: string) => {
|
||||
|
|
@ -229,7 +234,7 @@ async function uploadFileDoc(uploadUrl: string, file: any) {
|
|||
* ดาวน์โหลดลิงค์ไฟล์
|
||||
* @param fileName file name
|
||||
*/
|
||||
function downloadFile(fileName: string) {
|
||||
function downloadFile(fileName: string) {
|
||||
showLoader();
|
||||
http
|
||||
.get(
|
||||
|
|
@ -269,7 +274,6 @@ function deleteFile(fileName: string) {
|
|||
)
|
||||
)
|
||||
.then((res) => {
|
||||
|
||||
setTimeout(() => {
|
||||
getData();
|
||||
success($q, `ลบไฟล์สำเร็จ`);
|
||||
|
|
@ -286,7 +290,7 @@ function deleteFile(fileName: string) {
|
|||
}
|
||||
|
||||
async function getData() {
|
||||
showLoader()
|
||||
showLoader();
|
||||
await http
|
||||
.get(
|
||||
config.API.file("ระบบบรรจุ แต่งตั้ง", "เอกสารหลักฐาน", profileId.value)
|
||||
|
|
@ -298,17 +302,16 @@ async function getData() {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader()
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await getData();
|
||||
});
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<q-card flat bordered class="col-12 row q-px-lg q-py-md">
|
||||
<q-card flat bordered class="col-12 q-px-lg q-py-md q-mt-md no-border">
|
||||
<HeaderTop
|
||||
v-model:edit="edit"
|
||||
header="เอกสารหลักฐาน"
|
||||
|
|
@ -318,8 +321,7 @@ onMounted(async () => {
|
|||
:disable="statusEdit"
|
||||
:save="uploadData"
|
||||
/>
|
||||
<q-card class="row col-12">
|
||||
|
||||
<q-card class="row col-12">
|
||||
<div class="row col-12 q-col-gutter-y-sm q-pa-sm">
|
||||
<div class="col-12 row">
|
||||
<q-file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue