diff --git a/src/modules/14_KPI/components/indicatorByPlan/IndicatorByPlan.vue b/src/modules/14_KPI/components/indicatorByPlan/IndicatorByPlan.vue index ba8d2222f..eff09a1f2 100644 --- a/src/modules/14_KPI/components/indicatorByPlan/IndicatorByPlan.vue +++ b/src/modules/14_KPI/components/indicatorByPlan/IndicatorByPlan.vue @@ -121,7 +121,7 @@ function fetchDataById(id: string) { .get(config.API.kpiPlanById(id)) .then((res) => { const data = res.data.result; - year.value = data.year; + year.value = Number(data.year); planData.period = data.round; planData.including = data.including; planData.includingName = data.includingName; @@ -140,6 +140,7 @@ function fetchDataById(id: string) { planData.orgRevisionId = data.orgRevisionId; planData.strategy = data.strategy; planData.strategyId = data.strategyId; + planData.documentInfoEvidence = data.documentInfoEvidence; // หน่วยงาน/ส่วนราชการ const arrayexpandedAgency = [ diff --git a/src/modules/14_KPI/views/indicatorByPlan.vue b/src/modules/14_KPI/views/indicatorByPlan.vue index 3bfc6252b..5041d8666 100644 --- a/src/modules/14_KPI/views/indicatorByPlan.vue +++ b/src/modules/14_KPI/views/indicatorByPlan.vue @@ -4,7 +4,7 @@ import { useQuasar, type QTableProps } from "quasar"; import { useRouter } from "vue-router"; import type { DataOption } from "@/modules/14_KPI/interface/index/Main"; -import DialogHistory from '@/modules/14_KPI/components/DialogHistory.vue' +import DialogHistory from "@/modules/14_KPI/components/DialogHistory.vue"; /** importStore*/ import { useCounterMixin } from "@/stores/mixin"; @@ -12,7 +12,7 @@ import http from "@/plugins/http"; import config from "@/app.config"; /** use*/ -const modalHistory = ref(false) +const modalHistory = ref(false); const isAll = ref(false); const $q = useQuasar(); const router = useRouter(); @@ -53,7 +53,7 @@ const roundOp = ref([ const totalList = ref(1); -const year = ref(new Date().getFullYear()); +const year = ref(new Date().getFullYear()); const nodeData = reactive({ page: 1, pageSize: 10, @@ -66,10 +66,16 @@ const nodeData = reactive({ function fetchList() { showLoader(); http - .get( - config.API.kpiPlan + - `?page=${nodeData.page}&pageSize=${nodeData.pageSize}&period=${nodeData.round}&nodeId=${nodeData.nodeId}&node=${nodeData.node}&keyword=${nodeData.keyword}&year=${year.value}&isAll=${isAll.value}` - ) + .post(config.API.kpiPlan + `/search`, { + isAll: isAll.value, + keyword: nodeData.keyword, + node: nodeData.node ? nodeData.node : 0, + nodeId: nodeData.nodeId, + period: nodeData.round, + year: year.value?.toString(), + pageSize: nodeData.pageSize, + page: nodeData.page, + }) .then((res) => { const data = res.data.result.data; totalList.value = Math.ceil(res.data.result.total / nodeData.pageSize); @@ -160,10 +166,10 @@ function clearFilter() { /** * เปิด dialog history - * @param id + * @param id */ -function onClickHistory(id:string){ - modalHistory.value = true +function onClickHistory(id: string) { + modalHistory.value = true; } onMounted(async () => { @@ -245,8 +251,24 @@ onMounted(async () => {
- -
+
+
+ + เพิ่ม + + { @@ -294,6 +318,7 @@ onMounted(async () => { dense outlined v-model="nodeData.round" + :model-value="nodeData.round === '' ? 'ทั้งหมด' : nodeData.round" :options="roundOp" label="รอบการประเมิน" option-label="name" @@ -301,27 +326,42 @@ onMounted(async () => { emit-value map-options @update:model-value="fetchListProjectNew" - style="min-width: 150px" - /> - - - เพิ่ม - - -
- + style="min-width: 120px" + > + + -
+ + เพิ่ม + +
+ + +
{ >แสดงตำแหน่งทั้งหมดภายใต้หน่วยงาน/ส่วนราชการที่เลือก - + { v-model="nodeData.keyword" ref="filterRef" outlined + style="width:150px" placeholder="ค้นหา" @keydown.enter.prevent="fetchListProjectNew" > @@ -364,10 +405,11 @@ onMounted(async () => { :options="columns" option-value="name" options-cover - style="min-width: 150px" + style="min-width: 120px" />
- +
+
{ class="q-py-sm" > แก้ไขข้อมูล - + แก้ไขข้อมูล @@ -456,7 +502,6 @@ onMounted(async () => { - @@ -466,10 +511,7 @@ onMounted(async () => {
- - +