updated
This commit is contained in:
parent
11d7f20691
commit
1dbc40ddfb
6 changed files with 674 additions and 8 deletions
|
|
@ -14,15 +14,17 @@ import type { ResResults } from "@/modules/14_KPI/interface/response/Main";
|
|||
* import components
|
||||
*/
|
||||
import TableResults from "@/modules/14_KPI/components/results/tableResults.vue";
|
||||
|
||||
import TableIndividual from "@/modules/14_KPI/components/results/tableIndividual.vue";
|
||||
/**
|
||||
* importStore
|
||||
*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useKpiDataStore } from "@/modules/14_KPI/store";
|
||||
|
||||
/**
|
||||
* use
|
||||
*/
|
||||
const store = useKpiDataStore();
|
||||
const $q = useQuasar();
|
||||
const { messageError, showLoader, hideLoader } = useCounterMixin();
|
||||
|
||||
|
|
@ -33,6 +35,7 @@ const tab = ref<string>("COMPLETE");
|
|||
const tabItems = ref<ItemsTab[]>([
|
||||
{ name: "COMPLETE", label: " รอประกาศผล" },
|
||||
{ name: "KP7", label: "ประกาศผลแล้ว" },
|
||||
{ name: "IDP", label: "แผนพัฒนาการปฏิบัติราชการรายบุคคล" },
|
||||
]);
|
||||
const dataList = ref<ResResults[]>([]); // ข่อมูลรายการ
|
||||
const page = ref<number>(1);
|
||||
|
|
@ -52,10 +55,27 @@ function fetcDataList() {
|
|||
page: page.value,
|
||||
pageSize: pageSize.value,
|
||||
keyword: keyword.value,
|
||||
kpiPeriodId: store.formQuery.round ? store.formQuery.round : "",
|
||||
})
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
dataList.value = data.data;
|
||||
const data = res.data.result.data;
|
||||
for (let index = 0; index < data.length; index++) {
|
||||
const element = data[index];
|
||||
dataList.value.push({
|
||||
...element,
|
||||
root: "สำนักงานเขตพระนคร",
|
||||
rootId: "e8493cd1-d371-402e-add6-566e68d5d1b3",
|
||||
rootShortName: "ขพน.",
|
||||
position: "นักวิเคราะห์นโยบายและแผน",
|
||||
posTypeId: "1526d9d3-d8b1-43ab-81b5-a84dfbe08071",
|
||||
posTypeName: "วิชาการ",
|
||||
posLevelId: "1526d9d3-d8b1-43ab-81b5-a84dfbe08562",
|
||||
posLevelName: "ปฏิบัติการ",
|
||||
organization: "ฝ่ายทะเบียน สำนักงานเขตพระนคร",
|
||||
});
|
||||
}
|
||||
// dataList.value = data.data;
|
||||
|
||||
total.value = data.total;
|
||||
maxPage.value = Math.ceil(total.value / pageSize.value);
|
||||
})
|
||||
|
|
@ -70,10 +90,10 @@ function fetcDataList() {
|
|||
/**
|
||||
* ทำงานเมื่อมีการเปลี่ยน Tab
|
||||
*/
|
||||
watch(tab, () => {
|
||||
watch(tab, (t) => {
|
||||
page.value = 1;
|
||||
keyword.value = "";
|
||||
fetcDataList();
|
||||
t == "KP7" || t == "COMPLETE" ? fetcDataList() : "";
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
@ -135,6 +155,9 @@ onMounted(() => {
|
|||
:fetchData="fetcDataList"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="IDP" style="padding: 0px">
|
||||
<TableIndividual :tab="tab" />
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</q-card>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue