แก้ไข table หน้า รายการคำขอประเมิน
This commit is contained in:
parent
e8b98709bf
commit
4d5d2c92dd
1 changed files with 40 additions and 16 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { onMounted, ref, watch, useAttrs } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter } from "vue-router";
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -16,7 +16,7 @@ const router = useRouter();
|
|||
const mixin = useCounterMixin();
|
||||
const store = useEvalutuonStore();
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
const attrs = ref<any>(useAttrs());
|
||||
const initialPagination = ref<Pagination>({
|
||||
rowsPerPage: 0,
|
||||
});
|
||||
|
|
@ -93,23 +93,47 @@ onMounted(async () => {
|
|||
</div>
|
||||
<q-card flat bordered class="col-12 q-mt-sm q-pt-sm q-pa-md">
|
||||
<div>
|
||||
<Table
|
||||
style="max-height: 80vh"
|
||||
:rows="store.rows"
|
||||
<d-table
|
||||
ref="table"
|
||||
:columns="store.columns"
|
||||
:visible-columns="store.visibleColumns"
|
||||
v-model:inputfilter="filter"
|
||||
v-model:inputvisible="store.visibleColumns"
|
||||
:pagination="initialPagination"
|
||||
:nornmalData="true"
|
||||
:rows="store.rows"
|
||||
:filter="filter"
|
||||
row-key="interrogated"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
:titleText="''"
|
||||
:page="page"
|
||||
:pageSize="pageSize"
|
||||
:maxPage="maxPage"
|
||||
dense
|
||||
class="custom-header-table"
|
||||
v-bind="attrs"
|
||||
:visible-columns="store.visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template #columns="props">
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width></q-th>
|
||||
<q-th
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
style="color: #000000; font-weight: 500"
|
||||
>
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
<q-th auto-width></q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td auto-width>
|
||||
<q-icon
|
||||
v-if="props.row.isDefault === true"
|
||||
name="mdi-bookmark"
|
||||
size="xs"
|
||||
color="primary"
|
||||
>
|
||||
<q-tooltip>เวลา Default</q-tooltip>
|
||||
</q-icon>
|
||||
</q-td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
|
|
@ -125,7 +149,7 @@ onMounted(async () => {
|
|||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</Table>
|
||||
</d-table>
|
||||
</div>
|
||||
</q-card>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue