ประเมินบุคคล
This commit is contained in:
parent
aa23748eb2
commit
e33d5eed1b
13 changed files with 757 additions and 164 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { reactive, onMounted, ref } from "vue";
|
||||
import { reactive, onMounted, ref, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -18,12 +18,12 @@ const store = useEvaluateStore();
|
|||
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
/** props ID จาก Tab1.vue*/
|
||||
/** props จาก Tab1.vue*/
|
||||
const props = defineProps({
|
||||
evaluateId: {
|
||||
type: String,
|
||||
},
|
||||
educations: Array,
|
||||
data: {
|
||||
type: Array,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(["update:spec"]);
|
||||
|
|
@ -50,26 +50,26 @@ async function updateValue() {
|
|||
* function fetchData ตรวจสอบคุณสมบัติ
|
||||
* @param id ประเมิน
|
||||
*/
|
||||
async function fetchCheckSpec(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.evaluationCheckspecByid(id))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
formData.isEducationalQft = data.isEducationalQft;
|
||||
formData.isGovermantServiceHtr = data.isGovermantServiceHtr;
|
||||
formData.isOperatingExp = data.isOperatingExp;
|
||||
formData.isMinPeriodOfTenure = data.isMinPeriodOfTenure;
|
||||
formData.isHaveSpecificQft = data.isHaveSpecificQft;
|
||||
formData.isHaveProLicense = data.isHaveProLicense;
|
||||
formData.isHaveMinPeriodOrHoldPos = data.isHaveMinPeriodOrHoldPos;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
async function fetchCheckSpec(data: any) {
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.evaluationCheckspecByid(id))
|
||||
// .then((res) => {
|
||||
// const data = res.data.result;
|
||||
formData.isEducationalQft = data.isEducationalQft;
|
||||
formData.isGovermantServiceHtr = data.isGovermantServiceHtr;
|
||||
formData.isOperatingExp = data.isOperatingExp;
|
||||
formData.isMinPeriodOfTenure = data.isMinPeriodOfTenure;
|
||||
formData.isHaveSpecificQft = data.isHaveSpecificQft;
|
||||
formData.isHaveProLicense = data.isHaveProLicense;
|
||||
formData.isHaveMinPeriodOrHoldPos = data.isHaveMinPeriodOrHoldPos;
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// messageError($q, err);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -88,7 +88,9 @@ function closeModal() {
|
|||
|
||||
/**hook lifecycle*/
|
||||
onMounted(() => {
|
||||
props.evaluateId && fetchCheckSpec(props.evaluateId);
|
||||
// setTimeout(() => {
|
||||
// }, 1000);
|
||||
props.data && fetchCheckSpec(props.data);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue