Merge branch 'develop' into devTee

This commit is contained in:
STW_TTTY\stwtt 2024-07-17 16:17:36 +07:00
commit 85998264af
16 changed files with 128 additions and 705 deletions

View file

@ -2,7 +2,7 @@ const supportMain = () => import("@/modules/00_support/views/MainPage.vue");
const supportCategory = () =>
import("@/modules/00_support/views/ManageCategory.vue");
const testView = () => import("@/views/TestManagement.vue");
// const testView = () => import("@/views/TestManagement.vue");
export default [
{
@ -26,14 +26,14 @@ export default [
},
},
{
path: "/test",
name: "testView",
component: testView,
meta: {
Auth: true,
Key: [1.1],
Role: "support",
},
},
// {
// path: "/test",
// name: "testView",
// component: testView,
// meta: {
// Auth: true,
// Key: [1.1],
// Role: "support",
// },
// },
];

View file

@ -625,11 +625,11 @@ watch([() => page.value, () => pageSize.value], () => {
/>
<div class="col-12">
<d-table
ref="table"
flat
:columns="columnsResult"
:rows="rowResult"
row-key="id"
ref="table"
flat
:columns="columnsResult"
:rows="rowResult"
row-key="id"
dense
class="custom-header-table"
:paging="true"
@ -637,6 +637,7 @@ watch([() => page.value, () => pageSize.value], () => {
@update:pagination="updatePagination"
selection="single"
v-model:selected="selectedProfile"
:visible-columns="visibleColumnsResult"
>
<template v-slot:header="props">
<q-tr :props="props">
@ -687,7 +688,7 @@ watch([() => page.value, () => pageSize.value], () => {
active-color="primary"
color="dark"
:max="totalPage"
:max-pages="5"
:max-pages="5"
size="sm"
boundary-links
direction-links

View file

@ -383,8 +383,11 @@ const clickNext = async () => {
*/
const getData = () => {
const row = rows.value[rowIndex.value];
const checkLevelEducation = OpsFilter.value.levelOptions.find(
(e) => e.id === row.educationLevelId
);
levelId.value = row.educationLevelId;
levelId.value = checkLevelEducation ? row.educationLevelId : "";
isDate.value = row.isDate;
isEducation.value = row.isEducation;
// positionPathId.value = resultPath;
@ -494,7 +497,7 @@ const saveData = async () => {
messageError($q, e);
})
.finally(async () => {
await props.fetch('Education');
await props.fetch("Education");
rows.value = props.data;
});
};
@ -503,12 +506,6 @@ const saveData = async () => {
* นทกแกไขขอม
*/
const editData = async () => {
// const filter = OpsFilter.value.levelOptions.filter(
// (r: any) => r.id == levelId.value
// );
// const filterPositionPath = OpsFilter.value.positionPathOptions.filter(
// (r: any) => r.id == positionPathId.value
// );
showLoader();
await http
.put(config.API.placementEducationId(route.params.personalId.toString()), {
@ -544,7 +541,7 @@ const editData = async () => {
messageError($q, e);
})
.finally(async () => {
await props.fetch('Education');
await props.fetch("Education");
rows.value = props.data;
});
};
@ -559,18 +556,16 @@ const deletePlacementEducation = async () => {
showLoader();
await http
.delete(config.API.placementEducationId(id.value))
.then(async(res) => {
.then(async (res) => {
success($q, "ลบข้อมูลสำเร็จ");
modal.value = false;
await props.fetch('Education');
await props.fetch("Education");
rows.value = props.data;
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
});
.finally(async () => {});
};
/**
@ -600,12 +595,17 @@ const clickClose = async () => {
* @param _props props ใน row เลอก
*/
const selectData = async (_props: DataProps) => {
const checkLevelEducation = OpsFilter.value.levelOptions.find(
(e) => e.id === _props.row.educationLevelId
);
modalEdit.value = true;
modal.value = true;
edit.value = false;
rawItem.value = _props.row;
rowIndex.value = _props.rowIndex;
levelId.value = _props.row.educationLevelId;
levelId.value = checkLevelEducation ? _props.row.educationLevelId : "";
// positionPathId.value = resultPath;
// levelId.value = _props.row.levelId;
// positionPathId.value = _props.row.positionPathId;

View file

@ -299,8 +299,6 @@ function deleteProductivitys(item: number) {
}
}
/** get ข้อมูล */
async function getUser() {
await http
@ -2341,6 +2339,7 @@ onMounted(async () => {
การเรยนรวยตนเองเพอใหความรเกยวกบกฎหมายกฎระเบยบแบบแผนของทางราชการ
</div>
<div class="col-12 text-top2 row items-center">
c
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
4.3
การอบรมสมมนารวมกนเพอปลกฝงการประพฤตปฏตนเปนขาราชการท
@ -2497,12 +2496,11 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-4">
<datepicker
menu-class-name="modalfix"
v-model="date1"
:locale="'th'"
autoApply
:readonly="isEdit != true"
borderless
:enableTimePicker="false"
week-start="0"
>
@ -2518,9 +2516,7 @@ onMounted(async () => {
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
:readonly="isEdit != true"
dense
borderless
:outlined="isEdit == true"
class="full-width datepicker"
:model-value="date1 != null ? date2Thai(date1) : null"
label="ลงวันที่"
bg-color="white"
@ -2600,11 +2596,10 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-4">
<datepicker
menu-class-name="modalfix"
v-model="date2"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
:readonly="isEdit != true"
week-start="0"
@ -2621,9 +2616,9 @@ onMounted(async () => {
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
:readonly="isEdit != true"
dense
borderless
:outlined="isEdit == true"
class="full-width datepicker"
:model-value="date2 != null ? date2Thai(date2) : null"
label="ลงวันที่"
bg-color="white"
@ -2695,11 +2690,11 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-4">
<datepicker
menu-class-name="modalfix"
v-model="date3"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
week-start="0"
:readonly="isEdit != true || !caretaker2"
@ -2721,9 +2716,9 @@ onMounted(async () => {
? [(val) => !!val || 'กรุณาเลือกวันที่']
: []
"
borderless
:outlined="isEdit == true"
class="full-width datepicker"
:model-value="
caretaker2 != null ? date2Thai(date3) : null
"
@ -2806,7 +2801,7 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-4">
<datepicker
menu-class-name="modalfix"
v-model="date4"
:locale="'th'"
autoApply
@ -2827,9 +2822,9 @@ onMounted(async () => {
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
:readonly="isEdit != true"
dense
borderless
:outlined="isEdit == true"
class="full-width datepicker"
:model-value="date4 != null ? date2Thai(date4) : null"
label="ลงวันที่"
bg-color="white"
@ -2925,6 +2920,7 @@ onMounted(async () => {
</div>
</q-form>
</template>
<style lang="scss" scoped>
.border_y {
border-left: 1px solid #d8d8d8;

View file

@ -274,11 +274,15 @@ function changtypeOc() {
/** function เพิ่มรายชื่อ*/
async function clickmodalAdd() {
await clearForm();
let ocId = DataStore.typeOc ? DataStore.typeOc : DataStore.agency;
// showLoader();
await fecthInsignia();
await fecthlistperson(ocId);
clearForm();
}
function onCloseModalAdd() {
modalAdd.value = false;
}
const maxPage = ref<number>(0);
@ -662,6 +666,9 @@ function clearForm() {
dataPerson.level = "";
reason.value = "";
insigniaType.value = "";
formFilter.page = 1;
formFilter.searchField = "citizenId";
formFilter.searchKeyword = "";
}
const insignia = ref<string>("");
@ -1227,8 +1234,9 @@ onMounted(async () => {
<!-- add -->
<q-dialog v-model="modalAdd" persistent>
<q-card style="width: 900px; max-width: 80vw">
<q-toolbar class="q-py-md">
<q-toolbar-title class="text-h6">เพมรายช </q-toolbar-title>
<DialogHeader tittle="เพิ่มรายชื่อ" :close="onCloseModalAdd" />
<!-- <q-toolbar class="q-py-md">
<q-toolbar-title class="text-h6"> </q-toolbar-title>
<q-btn
icon="close"
@ -1244,7 +1252,7 @@ onMounted(async () => {
"
style="color: #ff8080; background-color: #ffdede"
/>
</q-toolbar>
</q-toolbar> -->
<q-separator />
<q-card-section class="q-pa-sm bg-grey-1">
<div class="row col-12 q-col-gutter-sm">
@ -1423,7 +1431,7 @@ onMounted(async () => {
</q-card-section>
<q-separator />
<q-card-actions align="right">
<q-btn dense unelevated label="บันทึก" color="public" @click="clickAdd">
<q-btn unelevated label="บันทึก" color="public" @click="clickAdd">
<q-tooltip>นท</q-tooltip>
</q-btn>
</q-card-actions>

View file

@ -53,7 +53,6 @@ const nextPage = ref<number>(1);
/**function เรียกข้อมูลรอบการขึ้นค่าจ้าง*/
function getRound() {
roundOptions.value = [];
isDisable.value = false;
showLoader();
http
@ -62,11 +61,13 @@ function getRound() {
`?page=${page.value}&pageSize=${pageSize.value}&keyword=&year=0`
)
.then(async (res) => {
roundOptions.value = [];
roundFilter.value = [];
const data = res.data.result.data;
if (data.length !== 0) {
isDisable.value = true;
lastPage.value = Math.ceil(res.data.result.total / pageSize.value);
const optionMain = await data.map((x: DataRound) => ({
roundOptions.value = await data.map((x: DataRound) => ({
id: x.id,
revisionId: x.revisionId,
shortCode: x.period,
@ -79,9 +80,7 @@ function getRound() {
? "รอบพิเศษ "
: "รอบเมษายน ",
}));
roundOptions.value.push(...optionMain);
roundFilter.value = await [];
roundFilter.value = await (roundOptions.value
? roundOptions.value[0]
: "");

View file

@ -52,7 +52,6 @@ const nextPage = ref<number>(1);
/**function เรียกข้อมูลรอบการขึ้นเงินเดือน*/
function getRound() {
roundOptions.value = [];
showLoader();
isDisable.value = false;
http
@ -61,11 +60,13 @@ function getRound() {
`?page=${page.value}&pageSize=${pageSize.value}&keyword=&year=0`
)
.then(async (res) => {
roundOptions.value = [];
roundFilter.value = [];
const data = res.data.result.data;
if (data.length !== 0) {
isDisable.value = true;
lastPage.value = Math.ceil(res.data.result.total / pageSize.value);
const optionMain = await data.map((x: DataRound) => ({
roundOptions.value = await data.map((x: DataRound) => ({
id: x.id,
revisionId: x.revisionId,
shortCode: x.period,
@ -78,9 +79,7 @@ function getRound() {
? "รอบพิเศษ "
: "รอบเมษายน ",
}));
roundOptions.value.push(...optionMain);
roundFilter.value = await [];
roundFilter.value = await (roundOptions.value
? roundOptions.value[0]
: "");
@ -348,14 +347,13 @@ onMounted(() => {
</div>
<q-space />
<datepicker
menu-class-name="modalfix"
v-model="year"
:locale="'th'"
autoApply
year-picker
:enableTimePicker="false"
style="width: 150px"
@update:model-value="getRound"
@update:model-value="getRound()"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{

View file

@ -216,7 +216,7 @@ onMounted(() => {
]).finally(() => {
setTimeout(() => {
hideLoader();
}, 2000);
}, 2500);
});
});
</script>

View file

@ -198,8 +198,12 @@ function getData() {
}
onMounted(() => {
getData();
fetchEvaluation();
showLoader();
Promise.all([fetchEvaluation(), getData()]).finally(() => {
setTimeout(() => {
hideLoader();
}, 3000);
});
});
</script>

View file

@ -62,7 +62,14 @@ const isReadonly = <boolean>(route.name === "KPIEditEvaluator" ? true : false);
const store = useKpiDataStore();
const $q = useQuasar();
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, dialogConfirm, success ,findOrgName} = mixin;
const {
showLoader,
hideLoader,
messageError,
dialogConfirm,
success,
findOrgName,
} = mixin;
const evaluatorIdOp = ref<DataOption[]>([]);
const commanderIdOp = ref<DataOption[]>([]);
@ -95,25 +102,15 @@ async function fetchEvaluation() {
.then(async (res) => {
const data = res.data.result;
store.dataEvaluation = await data;
// store.dataProfile = await data;
formProfile.status = store.convertStatus(data.evaluationStatus);
formProfile.result = store.convertResults(data.evaluationResults);
store.checkCompetency();
store.checkCompetencyDefaultCompetencyLevel();
fetchProfile(data.profileId);
// plannedPoint.value = data.plannedPoint == null ? "" : data.plannedPoint;
// rolePoint.value = data.rolePoint == null ? "" : data.rolePoint;
// specialPoint.value = data.specialPoint == null ? "" : data.specialPoint;
// capacityPoint.value =
// data.capacityPoint == null ? "" : data.capacityPoint;
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
@ -173,7 +170,7 @@ function onSubmit() {
}
async function getOrgOp() {
http
.get(config.API.Kpiorg+`/${store.dataProfile.profileId}`)
.get(config.API.Kpiorg + `/${store.dataProfile.profileId}`)
.then((res) => {
const data = res.data.result;
evaluatorIdMainOp.value = data.caregiver.map((i: any) => ({
@ -242,50 +239,19 @@ function filterOption(val: any, update: Function, refData: string) {
}
}
// function onSubmitScore() {
// showLoader();
// http
// .put(config.API.kpiScoreTotal() + `/${id.value}`, {
// plannedPoint: plannedPoint.value,
// rolePoint: rolePoint.value,
// specialPoint: specialPoint.value,
// capacityPoint: capacityPoint.value,
// })
// .then(async (res) => {
// await fetchEvaluation();
// success($q, "");
// modalScore.value = false;
// })
// .catch((e) => {
// messageError($q, e);
// })
// .finally(() => {
// hideLoader();
// });
// }
// async function clearScore() {
// modalScore.value = false;
// plannedPoint.value = "";
// rolePoint.value = "";
// specialPoint.value = "";
// capacityPoint.value = "";
// getAll();
// }
async function getProfile() {
await http
.get(config.API.profilePosition + `/${store.dataEvaluation.profileId}`)
.then(async (res) => {
const data = await res.data.result;
store.dataProfile = await data;
await store.checkStep();
await setTimeout(() => {
store.checkStep();
}, 800);
})
.catch((e) => {
messageError($q, e);
});
// .finally(() => {
// hideLoader();
// });
}
async function getAll() {
await fetchEvaluation();
@ -345,31 +311,7 @@ function sendToEvaluateEvaluatore() {
"ต้องการยืนยันส่งให้ผู้ประเมินรายงานผลสำเร็จของงานใช่หรือไม่?"
);
}
// function sendToSummary(status: string) {
// dialogConfirm(
// $q,
// () => {
// if (id.value) {
// showLoader();
// http
// .get(config.API.kpiSendToSummary(id.value))
// .then((res) => {
// success($q, "");
// getAll();
// store.tabMain = "4";
// })
// .catch((e) => {
// messageError($q, e);
// })
// .finally(() => {
// hideLoader();
// });
// }
// },
// "",
// "?"
// );
// }
function requireEdit() {
dialogConfirm(
$q,
@ -494,7 +436,6 @@ async function fetchProfileEvaluator(id: string) {
}
onMounted(async () => {
store.isUpdate = await false;
await getAll();
});
@ -526,9 +467,6 @@ onMounted(async () => {
<q-img src="@/assets/avatar_user.jpg" v-else />
</q-avatar>
</div>
<!-- <div class="row text-center">
</div> -->
<div
v-if="$q.screen.gt.xs"
@ -696,7 +634,7 @@ onMounted(async () => {
color="grey-2"
text-color="edit"
size="md"
@click="modalEdit = true,getOrgOp()"
@click="(modalEdit = true), getOrgOp()"
>
<q-tooltip>{{
store.dataEvaluation.evaluationStatus === "NEW" &&
@ -1232,7 +1170,6 @@ onMounted(async () => {
</q-dialog> -->
<DialogGovernment v-model:modal="modalGovernment" />
<!-- <DialogStatus
v-model:modal="modalStatus"
v-model:is-probation="store.dataProfile.isProbation"

View file

@ -231,9 +231,9 @@ onMounted(async () => {
dense
outlined
hide-bottom-space
:model-value="!!year ? year + 543 : null"
:model-value="year === null ? 'ทั้งหมด' : Number(year) + 543"
:label="`${'ปีงบประมาณ'}`"
clearable
:clearable="year !== null"
@clear="clearYear"
>
<template v-slot:prepend>
@ -260,6 +260,7 @@ onMounted(async () => {
emit-value
map-options
@update:model-value="changRound"
:disable="year === null"
/>
<q-btn round color="primary" flat icon="add" @click="onDialog()">
<q-tooltip>เพมผประเม</q-tooltip>

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, reactive, onMounted, watch } from "vue";
import { ref, reactive, onMounted, watch, nextTick } from "vue";
import { useQuasar, type QTableProps } from "quasar";
import { useRouter } from "vue-router";
import http from "@/plugins/http";
@ -352,6 +352,12 @@ watch(
}
);
async function handleUpdateYear() {
await nextTick();
formQuery.page = 1;
fetchList();
}
onMounted(() => {
fetchList();
});
@ -371,7 +377,7 @@ onMounted(() => {
autoApply
year-picker
:enableTimePicker="false"
@update:model-value="(formQuery.page = 1), fetchList()"
@update:model-value="handleUpdateYear"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{

View file

@ -290,7 +290,7 @@ onMounted(() => {
<q-space />
<div class="row q-gutter-sm">
<q-btn
<!-- <q-btn
flat
round
dense
@ -299,7 +299,7 @@ onMounted(() => {
@click="onDownload"
>
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
</q-btn> -->
<q-input
standout

View file

@ -603,6 +603,7 @@ watch([() => page.value, () => pageSize.value], () => {
@update:pagination="updatePagination"
selection="single"
v-model:selected="selectedProfile"
:visible-columns="visibleColumnsResult"
>
<template v-slot:header="props">
<q-tr :props="props">