diff --git a/src/modules/08_KPI/components/Tab/Dialog/04_FormCompetency.vue b/src/modules/08_KPI/components/Tab/Dialog/04_FormCompetency.vue index 8fcd607..78ddf55 100644 --- a/src/modules/08_KPI/components/Tab/Dialog/04_FormCompetency.vue +++ b/src/modules/08_KPI/components/Tab/Dialog/04_FormCompetency.vue @@ -9,7 +9,7 @@ import { useCounterMixin } from "@/stores/mixin"; import http from "@/plugins/http"; import config from "@/app.config"; -import { useQuasar } from "quasar"; +import { useQuasar, type QTableProps } from "quasar"; import { useRoute } from "vue-router"; const dataListCapacityDetails = ref([]); @@ -23,7 +23,12 @@ const props = defineProps({ const $q = useQuasar(); const store = useKpiDataStore(); const expectedLevel = ref(); - +const pagination = ref({ + sortBy: "desc", + descending: false, + page: 1, + rowsPerPage: 20, +}); const weight = ref(null); const mixin = useCounterMixin(); const { @@ -79,6 +84,28 @@ const fieldLabels = { const competencyTypeOp = ref(store.competencyType); +const visibleColumns = ref(["level", "description"]); +const columns = ref([ + { + name: "level", + align: "center", + label: "ระดับสมรรถนะ", + sortable: true, + field: "level", + headerStyle: "font-size: 14px", + style: "font-size: 14px; width:5px;", + }, + { + name: "description", + align: "left", + label: "พฤติกรรมที่คาดหวัง/พฤติกรรมย่อย", + sortable: true, + field: "description", + headerStyle: "font-size: 14px", + style: "font-size: 14px; width:15%;", + }, +]); + function clickList(index: string, data: any) { const dataCapacityDetails = data.capacityDetails.sort( (a: any, b: any) => a.level - b.level @@ -417,19 +444,64 @@ watch(
- + + + + + +
@@ -483,4 +557,42 @@ watch( border: 1px solid #ededed !important; border-radius: 8px; } +.custom-table2 { + .q-table tr:nth-child(odd) td { + background: white; + } + + .q-table tr:nth-child(even) td { + background: #f8f8f8; + } + + .q-table thead tr { + background: #ecebeb; + } + + .q-table thead tr th { + position: sticky; + } + + .q-table td:nth-of-type(2) { + z-index: 3 !important; + } + + .q-table th:nth-of-type(2), + .q-table td:nth-of-type(2) { + position: sticky; + left: 0; + z-index: 1; + } + + /* this will be the loading indicator */ + .q-table thead tr:last-child th { + /* height of all previous header rows */ + top: 48px; + } + + .q-table thead tr:first-child th { + top: 0; + } +}