ประกาศผล
This commit is contained in:
parent
f6cb4d2454
commit
749933a68f
5 changed files with 134 additions and 0 deletions
|
|
@ -83,4 +83,10 @@ export default {
|
||||||
|
|
||||||
kpiSendToGet: (id: string) => `${kpiEvaluationUser}/reason/${id}`,
|
kpiSendToGet: (id: string) => `${kpiEvaluationUser}/reason/${id}`,
|
||||||
openPoint: (id: string) => `${kpiEvaluationUser}/open/${id}`,
|
openPoint: (id: string) => `${kpiEvaluationUser}/open/${id}`,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ประกาศผล
|
||||||
|
*/
|
||||||
|
evaluationUser: `${KpiUser}/evaluation/list`,
|
||||||
|
evaluationUserDone: `${KpiUser}/evaluation/done/kp7`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -567,6 +567,11 @@ const menuList = readonly<any[]>([
|
||||||
path: "KPIList",
|
path: "KPIList",
|
||||||
role: "evaluateKPI",
|
role: "evaluateKPI",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "ประกาศผล",
|
||||||
|
path: "KPIResults",
|
||||||
|
role: "evaluateKPI",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "รายงาน",
|
label: "รายงาน",
|
||||||
path: "KPIReport",
|
path: "KPIReport",
|
||||||
|
|
|
||||||
12
src/modules/14_KPI/components/results/tableResults.vue
Normal file
12
src/modules/14_KPI/components/results/tableResults.vue
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
/**
|
||||||
|
* props
|
||||||
|
*/
|
||||||
|
const tab = defineModel<string>("tab", { required: true });
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
{{ tab }}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
|
|
@ -14,6 +14,7 @@ const listPage = () => import("@/modules/14_KPI/views/list.vue");
|
||||||
const detailPage = () => import("@/modules/14_KPI/views/detail.vue");
|
const detailPage = () => import("@/modules/14_KPI/views/detail.vue");
|
||||||
const reportPage = () => import("@/modules/14_KPI/views/report.vue");
|
const reportPage = () => import("@/modules/14_KPI/views/report.vue");
|
||||||
const detailView = () => import("@/modules/14_KPI/views/detailView.vue");
|
const detailView = () => import("@/modules/14_KPI/views/detailView.vue");
|
||||||
|
const ResultsView = () => import("@/modules/14_KPI/views/resultsMain.vue");
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
|
|
@ -68,4 +69,15 @@ export default [
|
||||||
Role: "evaluateKPI",
|
Role: "evaluateKPI",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
path: "/KPI/results",
|
||||||
|
name: "KPIResults",
|
||||||
|
component: ResultsView,
|
||||||
|
meta: {
|
||||||
|
Auth: true,
|
||||||
|
Key: [1.1],
|
||||||
|
Role: "evaluateKPI",
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
99
src/modules/14_KPI/views/resultsMain.vue
Normal file
99
src/modules/14_KPI/views/resultsMain.vue
Normal file
|
|
@ -0,0 +1,99 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted, watch } from "vue";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* import type
|
||||||
|
*/
|
||||||
|
import type { ItemsTab } from "@/modules/14_KPI/interface/index/Main";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* import components
|
||||||
|
*/
|
||||||
|
import TableResults from "@/modules/14_KPI/components/results/tableResults.vue";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* importStore
|
||||||
|
*/
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* use
|
||||||
|
*/
|
||||||
|
const $q = useQuasar();
|
||||||
|
const { dialogRemove, messageError, showLoader, hideLoader, success } =
|
||||||
|
useCounterMixin();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ตัวแปร
|
||||||
|
*/
|
||||||
|
const tab = ref<string>("COMPLETE");
|
||||||
|
const tabItems = ref<ItemsTab[]>([
|
||||||
|
{ name: "COMPLETE", label: " รอประกาศผล" },
|
||||||
|
{ name: "KP7", label: "ประกาศผลแล้ว" },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const page = ref<number>(1);
|
||||||
|
const pageSize = ref<number>(10);
|
||||||
|
|
||||||
|
function fetcDatahList() {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.post(config.API.evaluationUser, {
|
||||||
|
status: tab.value,
|
||||||
|
page: page.value,
|
||||||
|
pageSize: pageSize.value,
|
||||||
|
})
|
||||||
|
.then((res) => {})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(tab, () => {
|
||||||
|
page.value = 1;
|
||||||
|
pageSize.value = 10;
|
||||||
|
fetcDatahList();
|
||||||
|
});
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
fetcDatahList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="toptitle text-dark col-12 row items-center">ประกาศผล</div>
|
||||||
|
|
||||||
|
<q-card flast bordered>
|
||||||
|
<q-tabs
|
||||||
|
v-model="tab"
|
||||||
|
dense
|
||||||
|
align="left"
|
||||||
|
inline-label
|
||||||
|
class="bg-white text-grey"
|
||||||
|
active-color="primary"
|
||||||
|
indicator-color="primary"
|
||||||
|
>
|
||||||
|
<div v-for="item in tabItems">
|
||||||
|
<q-tab :name="item.name" :label="item.label" />
|
||||||
|
</div>
|
||||||
|
</q-tabs>
|
||||||
|
<q-separator />
|
||||||
|
<q-tab-panels v-model="tab" animated class="shadow-2 rounded-borders">
|
||||||
|
<q-tab-panel name="COMPLETE">
|
||||||
|
<TableResults :tab="tab" />
|
||||||
|
</q-tab-panel>
|
||||||
|
|
||||||
|
<q-tab-panel name="KP7">
|
||||||
|
<TableResults :tab="tab" />
|
||||||
|
</q-tab-panel>
|
||||||
|
</q-tab-panels>
|
||||||
|
</q-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue