เพิ่ม load props
This commit is contained in:
parent
2ad74a38fc
commit
64c49a5d01
4 changed files with 48 additions and 24 deletions
|
|
@ -113,6 +113,7 @@ const guidCheck = (id: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
|
storePersonal.loading = false;
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.placementPersonalId(examId.value))
|
.get(config.API.placementPersonalId(examId.value))
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ const emit = defineEmits(["update:statusEdit"]);
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { success, messageError, showLoader, hideLoader } = mixin;
|
const { success, messageError, showLoader, dialogConfirm } = mixin;
|
||||||
const profileId = ref<string>(
|
const profileId = ref<string>(
|
||||||
route.params.personalId ? route.params.personalId.toString() : ""
|
route.params.personalId ? route.params.personalId.toString() : ""
|
||||||
);
|
);
|
||||||
|
|
@ -206,20 +206,25 @@ const getData = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteData = async (id: string) => {
|
const deleteData = async (id: string) => {
|
||||||
console.log(id);
|
dialogConfirm(
|
||||||
|
$q,
|
||||||
showLoader();
|
async () => {
|
||||||
await http
|
showLoader();
|
||||||
.delete(config.API.documentDelid(profileId.value, id))
|
await http
|
||||||
.then(() => {
|
.delete(config.API.documentDelid(profileId.value, id))
|
||||||
success($q, "ลบไฟล์เอกสารสำเร็จ");
|
.then(() => {
|
||||||
})
|
success($q, "ลบไฟล์เอกสารสำเร็จ");
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(async () => {
|
})
|
||||||
await props.fetch();
|
.finally(async () => {
|
||||||
});
|
await props.fetch();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
"ยืนยันการลบเอกสารหลักฐาน",
|
||||||
|
"ต้องการยืนยันการลบเอกสารหลักฐานนี้หรือไม่ ?"
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const uploadData = async () => {
|
const uploadData = async () => {
|
||||||
|
|
@ -242,11 +247,11 @@ const uploadData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
|
await props.fetch();
|
||||||
uploader.value.reset();
|
uploader.value.reset();
|
||||||
name.value = "";
|
name.value = "";
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
emit("update:statusEdit", false);
|
emit("update:statusEdit", false);
|
||||||
await props.fetch();
|
|
||||||
});
|
});
|
||||||
// } else {
|
// } else {
|
||||||
// // modalError(
|
// // modalError(
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,11 @@ import { useQuasar } from "quasar";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
import type {
|
||||||
|
OptionQuestions,
|
||||||
|
OptionQuestions2,
|
||||||
|
} from "@/modules/06_retirement/interface/request/Main";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import keycloak from "@/plugins/keycloak";
|
import keycloak from "@/plugins/keycloak";
|
||||||
|
|
@ -188,13 +193,13 @@ const questionDesc = reactive<any>([
|
||||||
question10Desc: "",
|
question10Desc: "",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const question1Answer = ref<any>([]);
|
const question1Answer = ref<OptionQuestions[]>([]);
|
||||||
const question2Answer = ref<any>([]);
|
const question2Answer = ref<OptionQuestions[]>([]);
|
||||||
const question3Answer = ref<any>([]);
|
const question3Answer = ref<OptionQuestions[]>([]);
|
||||||
const question4Answer = ref<any>([]);
|
const question4Answer = ref<OptionQuestions[]>([]);
|
||||||
const question7Answer = ref<any>([]);
|
const question7Answer = ref<OptionQuestions2[]>([]);
|
||||||
const question8Answer = ref<any>([]);
|
const question8Answer = ref<OptionQuestions2[]>([]);
|
||||||
const question9Answer = ref<any>([]);
|
const question9Answer = ref<OptionQuestions2[]>([]);
|
||||||
async function fecthquestion() {
|
async function fecthquestion() {
|
||||||
await http
|
await http
|
||||||
.get(config.API.questionnaireList())
|
.get(config.API.questionnaireList())
|
||||||
|
|
|
||||||
|
|
@ -1 +1,14 @@
|
||||||
export type {};
|
interface OptionQuestions {
|
||||||
|
label: string;
|
||||||
|
value: number;
|
||||||
|
}
|
||||||
|
interface OptionQuestions2 {
|
||||||
|
label: string;
|
||||||
|
value: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export type {
|
||||||
|
OptionQuestions,
|
||||||
|
OptionQuestions2
|
||||||
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue