diff --git a/src/api/14_KPI/api.KPI.ts b/src/api/14_KPI/api.KPI.ts index 5149ddd7c..7132bd98b 100644 --- a/src/api/14_KPI/api.KPI.ts +++ b/src/api/14_KPI/api.KPI.ts @@ -9,12 +9,14 @@ const kpiPlan = `${env.API_URI}/kpi/plan`; const kpiCapacity = `${env.API_URI}/kpi/capacity`; const kpiLink = `${env.API_URI}/kpi/link`; const KpiUser = `${env.API_URI}/kpi/user`; +const KpiFile = `${env.API_URI}/salary/file`; export default { KPI, /** รอบการประเมินผล*/ kpiPeriod, kpiPeriodById: (id: string) => `${kpiPeriod}/${id}`, kpiEvaluation, + kpiFile: KpiFile, /** role */ kpiRoleMainList: `${KPI}/role`, diff --git a/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue b/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue index f4fd913bb..ecac1ec10 100644 --- a/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue +++ b/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue @@ -46,6 +46,10 @@ const props = defineProps({ require: true, }, fetchStatCard: { type: Function, require: true }, + typeCommand: { + type: String, + require: true, + }, }); /** Tree*/ @@ -137,6 +141,7 @@ async function fetchDataTable(id: string, level: number = 0) { node: level, nodeId: id, position: props?.dataRow?.positionCandidate, + typeCommand: props.typeCommand, }; await http .post(config.API.orgPosPlacement, body) @@ -217,6 +222,7 @@ async function onClickSubmit() { orgTreeShortName: dataNode.orgTreeShortName, //ชื่อย่อ posPath: selectedPos.value[0].positionName, //ชื่อตำแหน่ง posNumber: dataPosMaster.posMasterNo, //เลขที่ตำแหน่ง(เลขอย่่างเดียว) + typeCommand: props.typeCommand, }; await http diff --git a/src/modules/05_placement/components/PersonalList/Table.vue b/src/modules/05_placement/components/PersonalList/Table.vue index 18e29592c..94bc6472b 100644 --- a/src/modules/05_placement/components/PersonalList/Table.vue +++ b/src/modules/05_placement/components/PersonalList/Table.vue @@ -262,7 +262,7 @@ function convertDraft(val: boolean) { } } -/**เรียกข้อมูลรายชื่อผู้สอบผ่าย */ +/**เรียกข้อมูลรายชื่อผู้สอบผ่าน */ async function getTable() { showLoader(); await http @@ -493,8 +493,13 @@ const editDetail = ( * @param pid id personal */ const modalDialogSelectOrg = ref(false); +const typeCommand = ref(""); const dataRow = ref(); -function openAppointModal(pid: string, data: DataList) { +function openAppointModal( + pid: string, + data: DataList, + typeCommandVal: "APPOINTED" | "APPOINT" | "SLIP" | "MOVE" +) { // appointModal.value = true; // personalId.value = pid; // personal.value = dataRes.value.filter( @@ -503,6 +508,7 @@ function openAppointModal(pid: string, data: DataList) { // console.log(personal.value); dataRow.value = data; + typeCommand.value = typeCommandVal; modalDialogSelectOrg.value = !modalDialogSelectOrg.value; } @@ -623,6 +629,7 @@ onMounted(async () => { await getTable(); }); + diff --git a/src/modules/14_KPI/components/competency/01ListCompetency.vue b/src/modules/14_KPI/components/competency/01ListCompetency.vue index 10fdfdad7..d0a3f563b 100644 --- a/src/modules/14_KPI/components/competency/01ListCompetency.vue +++ b/src/modules/14_KPI/components/competency/01ListCompetency.vue @@ -1,5 +1,5 @@ + + diff --git a/src/modules/14_KPI/components/detailList/05_File.vue b/src/modules/14_KPI/components/detailList/05_File.vue index cf76d7ddc..3136506a1 100644 --- a/src/modules/14_KPI/components/detailList/05_File.vue +++ b/src/modules/14_KPI/components/detailList/05_File.vue @@ -19,6 +19,7 @@ const { messageError, dialogRemove, } = useCounterMixin(); + interface ArrayFileList { id: string; pathName: string; @@ -31,18 +32,20 @@ const documentFile = ref(null); const fileList = ref([]); async function getData() { - // showLoader(); - // await http - // .get(config.API.file + `/KPI/ไฟล์เอกสาร/${id.value}`) - // .then((res) => { - // fileList.value = res.data; - // }) - // .catch((e) => { - // messageError($q, e); - // }) - // .finally(() => { - // hideLoader(); - // }); + console.log(config.API.kpiFile); + + showLoader(); + await http + .get(config.API.kpiFile + `/KPI/ไฟล์เอกสาร/${id.value}`) + .then((res) => { + fileList.value = res.data; + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); } async function uploadFileDoc(uploadUrl: string, file: any) { @@ -69,7 +72,6 @@ async function uploadFileDoc(uploadUrl: string, file: any) { } async function clickUpload(file: any) { // const fileName = { fileName: file.name }; - // dialogConfirm( // $q, // async () => { @@ -106,7 +108,7 @@ async function clickUpload(file: any) { function downloadFile(fileName: string) { showLoader(); http - .get(config.API.file + `/KPI/ไฟล์เอกสาร/${id.value}/${fileName}`) + .get(config.API.kpiFile + `/KPI/ไฟล์เอกสาร/${id.value}/${fileName}`) .then((res) => { const data = res.data.downloadUrl; window.open(data, "_blank"); @@ -127,7 +129,7 @@ function deleteFile(fileName: string) { dialogRemove($q, async () => { showLoader(); http - .delete(config.API.file + `/KPI/ไฟล์เอกสาร/${id.value}/${fileName}`) + .delete(config.API.kpiFile + `/KPI/ไฟล์เอกสาร/${id.value}/${fileName}`) .then((res) => { success($q, `ลบไฟล์สำเร็จ`); @@ -215,6 +217,7 @@ onMounted(() => { > + diff --git a/src/modules/14_KPI/components/detailList/TabMain.vue b/src/modules/14_KPI/components/detailList/TabMain.vue index feab75fde..9fa876e73 100644 --- a/src/modules/14_KPI/components/detailList/TabMain.vue +++ b/src/modules/14_KPI/components/detailList/TabMain.vue @@ -77,9 +77,9 @@ const splitterModel = ref(12); class="q-pa-none" > - - - + + + diff --git a/src/modules/14_KPI/interface/response/Main.ts b/src/modules/14_KPI/interface/response/Main.ts index 1fdf8ce0e..2d8cea4d2 100644 --- a/src/modules/14_KPI/interface/response/Main.ts +++ b/src/modules/14_KPI/interface/response/Main.ts @@ -26,4 +26,18 @@ interface capacityDetails { level: string; } -export type { ResRound, ResDataCapacity }; +interface ResEvaluator { + createdAt: string; + createdFullName: string; + createdUserId: string; + id: string; + kpiUserEvaluationId: string; + lastUpdateFullName: string; + lastUpdateUserId: string; + lastUpdatedAt: string; + reason: string; + topic: string; + type: string; +} + +export type { ResRound, ResDataCapacity, ResEvaluator }; diff --git a/src/modules/14_KPI/store/KPIStore.ts b/src/modules/14_KPI/store/KPIStore.ts index 2cdd7f3dd..b53e5cbfd 100644 --- a/src/modules/14_KPI/store/KPIStore.ts +++ b/src/modules/14_KPI/store/KPIStore.ts @@ -4,7 +4,7 @@ import type { DataOption } from "@/modules/14_KPI/interface/index/Main"; // store export const useKPIDataStore = defineStore("KPIDataStore", () => { - // const competencyType = ref("HEAD"); + const competencyTypeVal = ref("HEAD"); const tabMain = ref("1"); const dataProfile = ref(); @@ -175,6 +175,7 @@ export const useKPIDataStore = defineStore("KPIDataStore", () => { } return { + competencyTypeVal, competencyType, convertStatus, convertResults, diff --git a/src/modules/14_KPI/views/list.vue b/src/modules/14_KPI/views/list.vue index 335aaa731..1d6872e28 100644 --- a/src/modules/14_KPI/views/list.vue +++ b/src/modules/14_KPI/views/list.vue @@ -20,7 +20,7 @@ const { showLoader, hideLoader, messageError, date2Thai, dialogConfirm } = const filterKeyword = ref(""); -const rows = ref(); +const rows = ref([]); const year = ref(new Date().getFullYear()); @@ -125,7 +125,7 @@ function fetchList() { http .get( config.API.kpiUserEvaluation + - `/admin?page=${formQuery.page}&pageSize=${formQuery.pageSize}&kpiPeriodId=${round.value}` + `/admin?page=${formQuery.page}&pageSize=${formQuery.pageSize}&kpiPeriodId=${round.value}&keyword=${filterKeyword.value}` ) .then((res) => { const data = res.data.result; @@ -243,7 +243,7 @@ onMounted(async () => { outlined dense v-model="filterKeyword" - label="ค้นหา" + label="ค้นหาชื่อผู้ขอรับการประเมิน" @keydown.enter.prevent="changRound" >