ประเมิน

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-05-27 11:59:26 +07:00
parent 6b1a397ac6
commit 8d0ac4eb7c
4 changed files with 18 additions and 50 deletions

View file

@ -275,7 +275,7 @@ const isEditStep3 = computed(() => {
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-section class="q-pa-sm"> <q-card-section class="q-pa-sm">
<q-table <d-table
ref="table" ref="table"
:columns="columns" :columns="columns"
:rows="rows" :rows="rows"
@ -431,7 +431,7 @@ const isEditStep3 = computed(() => {
</td> </td>
</q-tr> </q-tr>
</template> </template>
</q-table> </d-table>
</q-card-section> </q-card-section>
</q-card> </q-card>

View file

@ -129,11 +129,9 @@ export const useKpiDataStore = defineStore("KPIDate", () => {
} }
} }
function checkCompetency() { async function checkCompetency() {
const position = dataEvaluation.value.position; const position = await dataEvaluation.value.position;
const posTypeName = dataEvaluation.value.posTypeName; const executiveName = await dataEvaluation.value.posExecutiveName;
const posLevelName = dataEvaluation.value.posLevelName;
const executiveName = dataEvaluation.value.posExecutiveName;
if ( if (
position == "ผู้ตรวจราชการกรุงเทพมหานคร" || position == "ผู้ตรวจราชการกรุงเทพมหานคร" ||
@ -156,33 +154,6 @@ export const useKpiDataStore = defineStore("KPIDate", () => {
(x: DataOptions) => x.id == "HEAD" || x.id == "EXECUTIVE" (x: DataOptions) => x.id == "HEAD" || x.id == "EXECUTIVE"
); );
} }
// switch (posTypeName + " " + posLevelName) {
// // case "ทั่วไป ปฏิบัติงาน":
// // case "ทั่วไป ชำนาญงาน":
// // case "ทั่วไป อาวุโส":
// // case "วิชาการ ปฏิบัติการ":
// // case "วิชาการ ชำนาญการ":
// // case "วิชาการ ชำนาญการพิเศษ":
// // case "วิชาการ เชี่ยวชาญ":
// // case "วิชาการ ทรงคุณวุฒิ":
// // competencyType.value = competencyType.value.filter(
// // (x: DataOptions) => x.id == "HEAD" || x.id == "GROUP"
// // );
// // break;
// case "อำนวยการ ต้น":
// case "อำนวยการ สูง":
// case "บริหาร ต้น":
// case "บริหาร สูง":
// competencyType.value = competencyType.value.filter(
// (x: DataOptions) => x.id == "HEAD" || x.id == "EXECUTIVE"
// );
// break;
// default:
// competencyType.value = competencyType.value.filter(
// (x: DataOptions) => x.id == "HEAD" || x.id == "GROUP"
// );
// break;
// }
} }
} }

View file

@ -130,7 +130,7 @@ function onSubmit() {
? commanderHighId.value.id ? commanderHighId.value.id
: null, : null,
}) })
.then((res) => { .then(() => {
success($q, "บันทึกสำเร็จ"); success($q, "บันทึกสำเร็จ");
close(); close();
}) })
@ -246,13 +246,11 @@ function filterOption(val: any, update: Function, refData: string) {
// getAll(); // getAll();
// } // }
async function getAll() { function getAll() {
await getProfile(); getProfile();
await fetchEvaluation(); fetchEvaluation();
store.checkStep();
await store.checkStep(); getOrgOp();
await getOrgOp();
} }
function sendToEvaluatore(status: string) { function sendToEvaluatore(status: string) {
@ -265,7 +263,7 @@ function sendToEvaluatore(status: string) {
.put(config.API.kpiSendToStatus(id.value), { .put(config.API.kpiSendToStatus(id.value), {
status: status, status: status,
}) })
.then((res) => { .then(() => {
success($q, "ส่งข้อตกลงให้ผู้ประเมินอนุมัติสำเร็จ"); success($q, "ส่งข้อตกลงให้ผู้ประเมินอนุมัติสำเร็จ");
close(); close();
}) })
@ -292,7 +290,7 @@ function requireEdit() {
.put(config.API.kpiReqEdit(id.value), { .put(config.API.kpiReqEdit(id.value), {
status: "EVALUATOR", status: "EVALUATOR",
}) })
.then((res) => { .then(() => {
success($q, "ขอแก้ไขสำเร็จ"); success($q, "ขอแก้ไขสำเร็จ");
close(); close();
}) })
@ -309,10 +307,9 @@ function requireEdit() {
); );
} }
onMounted(async () => { onMounted(() => {
showLoader(); showLoader();
await getAll(); getAll();
console.log(store.dataEvaluation.avartar);
}); });
</script> </script>

View file

@ -272,11 +272,11 @@ function onSubmit() {
function getProfile() { function getProfile() {
http http
.get(config.API.profilePosition()) .get(config.API.profilePosition())
.then((res) => { .then(async (res) => {
const data = res.data.result; const data = res.data.result;
store.dataProfile = data; store.dataProfile = data;
store.checkCompetency(); await store.checkCompetency();
store.checkCompetencyDefaultCompetencyLevel(); await store.checkCompetencyDefaultCompetencyLevel();
formRound.profileId = data.profileId; formRound.profileId = data.profileId;
formRound.prefix = data.prefix; formRound.prefix = data.prefix;