API ประเมินบุคคล
This commit is contained in:
parent
fbcd0b8ec0
commit
0e033bffd3
11 changed files with 835 additions and 631 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -123,7 +123,7 @@ onMounted(async () => {
|
|||
icon="mdi-clipboard-outline"
|
||||
@click="onClickfetchDocument(item.fileName, 'COPPY')"
|
||||
>
|
||||
<q-tooltip>คัดลอกลิงค์</q-tooltip>
|
||||
<q-tooltip>คัดลอกลิงก์</q-tooltip>
|
||||
</q-btn>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
|
@ -160,7 +160,7 @@ onMounted(async () => {
|
|||
)
|
||||
"
|
||||
>
|
||||
<q-tooltip>คัดลอกลิงค์</q-tooltip>
|
||||
<q-tooltip>คัดลอกลิงก์</q-tooltip>
|
||||
</q-btn>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
|
|
|||
|
|
@ -31,15 +31,14 @@ const performance = ref<string>("");
|
|||
const performanceOwner = ref<string>("");
|
||||
const position = ref<string>("");
|
||||
|
||||
const performanceRef = ref<object | null>(null);
|
||||
const performanceOwnerRef = ref<object | null>(null);
|
||||
const positionRef = ref<object | null>(null);
|
||||
|
||||
const formCommand = reactive<FormCommand>({
|
||||
commanderFullname: "",
|
||||
commanderPosition: "",
|
||||
commanderAboveFullname: "",
|
||||
commanderAbovePosition: "",
|
||||
author: "",
|
||||
subject: "",
|
||||
assignedPosition: "",
|
||||
});
|
||||
|
||||
const commanderFullnameRef = ref<object | null>(null);
|
||||
|
|
@ -47,6 +46,9 @@ const commanderPositionRef = ref<object | null>(null);
|
|||
const commanderAboveFullnameRef = ref<object | null>(null);
|
||||
const commanderAbovePositionRef = ref<object | null>(null);
|
||||
const fileEvaluation1Ref = ref<object | null>(null);
|
||||
const performanceRef = ref<object | null>(null);
|
||||
const performanceOwnerRef = ref<object | null>(null);
|
||||
const assignedPositionRef = ref<object | null>(null);
|
||||
|
||||
const modalView = ref<boolean>(false);
|
||||
function onClickViewPDF(file: any) {
|
||||
|
|
@ -62,6 +64,9 @@ const updateInput = (value: any) => {
|
|||
commanderAbovePositionRef: commanderAbovePositionRef.value,
|
||||
fileEvaluation1Ref: fileEvaluation1Ref.value,
|
||||
downloadFile: [downloadUrl.value],
|
||||
performance: performanceRef.value,
|
||||
performanceOwner: performanceOwnerRef.value,
|
||||
assignedPosition: assignedPositionRef.value,
|
||||
};
|
||||
emit("update:form", value, ref);
|
||||
};
|
||||
|
|
@ -78,7 +83,7 @@ async function fetchPathUpload(
|
|||
metadata: {
|
||||
subject: performance.value,
|
||||
author: performanceOwner.value,
|
||||
position: position.value
|
||||
position: position.value,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
@ -104,7 +109,6 @@ async function fetchPathUpload(
|
|||
}
|
||||
|
||||
async function uploadfile(uploadUrl: string, file: any) {
|
||||
console.log(uploadUrl);
|
||||
await axios
|
||||
.put(uploadUrl, file, {
|
||||
headers: {
|
||||
|
|
@ -130,10 +134,15 @@ async function fetcheSigner(id: string) {
|
|||
formCommand.commanderPosition = data.commanderPositionDoc2;
|
||||
formCommand.commanderAboveFullname = data.commanderAboveFullnameDoc2;
|
||||
formCommand.commanderAbovePosition = data.commanderAbovePositionDoc2;
|
||||
formCommand.author = data.authorDoc2;
|
||||
formCommand.subject = data.subjectDoc2;
|
||||
formCommand.assignedPosition = data.assignedPosition;
|
||||
|
||||
store.statusUpload = true;
|
||||
})
|
||||
.catch(() => {
|
||||
store.statusUpload = false;
|
||||
})
|
||||
// .catch((err) => {
|
||||
// messageError($q, err);
|
||||
// })
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
|
|
@ -159,19 +168,6 @@ async function fetchCheckDate() {
|
|||
.catch((err) => {}));
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
if (keycloak.tokenParsed != null) {
|
||||
performanceOwner.value = keycloak.tokenParsed.name;
|
||||
}
|
||||
checkDoc();
|
||||
if (store.currentStep > 2) {
|
||||
fetcheSigner(evaluateId.value);
|
||||
}
|
||||
await fetchCheckDate();
|
||||
|
||||
// props.evaluateId && (await fetchPathUpload("เล่ม 2", props.evaluateId));
|
||||
});
|
||||
|
||||
const downloadUrl = ref<string>("");
|
||||
function checkDoc() {
|
||||
showLoader();
|
||||
|
|
@ -194,12 +190,28 @@ function checkDoc() {
|
|||
commanderAbovePositionRef: commanderAbovePositionRef.value,
|
||||
fileEvaluation1Ref: fileEvaluation1Ref.value,
|
||||
downloadFile: [downloadUrl.value],
|
||||
performance: performanceRef.value,
|
||||
performanceOwner: performanceOwnerRef.value,
|
||||
assignedPosition: assignedPositionRef.value,
|
||||
};
|
||||
|
||||
emit("update:form", formCommand, ref);
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
if (keycloak.tokenParsed != null) {
|
||||
formCommand.author = keycloak.tokenParsed.name;
|
||||
}
|
||||
checkDoc();
|
||||
if (store.currentStep > 2) {
|
||||
fetcheSigner(evaluateId.value);
|
||||
}
|
||||
await fetchCheckDate();
|
||||
|
||||
// props.evaluateId && (await fetchPathUpload("เล่ม 2", props.evaluateId));
|
||||
});
|
||||
|
||||
watch(
|
||||
() => store.checkFileupload,
|
||||
() => {
|
||||
|
|
@ -208,8 +220,14 @@ watch(
|
|||
: fileEvaluation1.value;
|
||||
}
|
||||
);
|
||||
|
||||
// onMounted(() => {});
|
||||
watch(
|
||||
() => store.statusUpload,
|
||||
() => {
|
||||
setTimeout(() => {
|
||||
store.statusUpload && updateInput(formCommand);
|
||||
}, 200);
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -242,7 +260,7 @@ watch(
|
|||
class="col-xs-12 col-sm-6"
|
||||
outlined
|
||||
label="ชื่อผลงาน"
|
||||
v-model="performance"
|
||||
v-model="formCommand.subject"
|
||||
@update:model-value="updateInput(formCommand)"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อผลงาน'}`]"
|
||||
lazy-rules
|
||||
|
|
@ -253,7 +271,7 @@ watch(
|
|||
class="col-xs-12 col-sm-6"
|
||||
dense
|
||||
outlined
|
||||
v-model="performanceOwner"
|
||||
v-model="formCommand.author"
|
||||
@update:model-value="updateInput(formCommand)"
|
||||
label="เจ้าของผลงาน"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`]"
|
||||
|
|
@ -261,11 +279,11 @@ watch(
|
|||
/>
|
||||
<q-input
|
||||
:readonly="store.currentStep != 6"
|
||||
ref="positionRef"
|
||||
ref="assignedPositionRef"
|
||||
class="col-xs-12 col-sm-6"
|
||||
dense
|
||||
outlined
|
||||
v-model="position"
|
||||
v-model="formCommand.assignedPosition"
|
||||
@update:model-value="updateInput(formCommand)"
|
||||
label="ตำแหน่งที่ได้รับ"
|
||||
:rules="[
|
||||
|
|
@ -281,7 +299,7 @@ watch(
|
|||
</q-card>
|
||||
</div>
|
||||
|
||||
<div class="col-6" v-if="store.currentStep === 6">
|
||||
<div class="col-6" v-if="store.statusUpload && store.currentStep === 6">
|
||||
<q-card bordered style="border: 1px solid #d6dee1">
|
||||
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||
เอกสารเล่ม 2
|
||||
|
|
|
|||
|
|
@ -41,11 +41,11 @@ function copyLink() {
|
|||
class="q-mt-md"
|
||||
outline
|
||||
icon="mdi-clipboard-outline"
|
||||
label="คัดลอกลิงค์"
|
||||
label="คัดลอกลิงก์"
|
||||
color="primary"
|
||||
@click="copyLink"
|
||||
>
|
||||
<q-tooltip> คัดลอกลิงค์ </q-tooltip></q-btn
|
||||
<q-tooltip> คัดลอกลิงก์ </q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue