2023-11-14 17:47:43 +07:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import type { QTableProps } from 'quasar'
|
2023-11-15 11:04:14 +07:00
|
|
|
import { ref, watch } from 'vue'
|
2023-11-14 17:47:43 +07:00
|
|
|
|
|
|
|
|
// importStores
|
|
|
|
|
import { useChekIn } from '@/stores/chekin'
|
|
|
|
|
|
|
|
|
|
// importComponent
|
|
|
|
|
import Popup from '@/components/PopUp.vue'
|
|
|
|
|
|
|
|
|
|
const stores = useChekIn()
|
2023-11-22 11:40:21 +07:00
|
|
|
const selected = ref<string[]>([])
|
2023-11-21 10:56:37 +07:00
|
|
|
|
|
|
|
|
/** props from page */
|
2023-11-15 11:04:14 +07:00
|
|
|
const props = defineProps({
|
|
|
|
|
paging: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
defualt: false,
|
|
|
|
|
},
|
2023-11-27 12:16:25 +07:00
|
|
|
// selected: {
|
|
|
|
|
// type: Array,
|
|
|
|
|
// defualt: [],
|
|
|
|
|
// },
|
2023-11-15 11:04:14 +07:00
|
|
|
pageSize: {
|
|
|
|
|
type: Number,
|
2023-11-21 10:56:37 +07:00
|
|
|
defualt: 10,
|
2023-11-15 11:04:14 +07:00
|
|
|
},
|
|
|
|
|
page: {
|
|
|
|
|
type: Number,
|
|
|
|
|
defualt: 1,
|
|
|
|
|
},
|
|
|
|
|
maxPage: {
|
|
|
|
|
type: Number,
|
|
|
|
|
defualt: 1,
|
|
|
|
|
},
|
|
|
|
|
total: {
|
|
|
|
|
type: Number,
|
|
|
|
|
defualt: 0,
|
|
|
|
|
},
|
|
|
|
|
nornmalData: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
defualt: false,
|
|
|
|
|
},
|
|
|
|
|
nextPageVisible: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
defualt: false,
|
|
|
|
|
},
|
|
|
|
|
publicData: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
defualt: true,
|
|
|
|
|
required: false,
|
|
|
|
|
},
|
|
|
|
|
updateData: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
defualt: true,
|
|
|
|
|
required: false,
|
|
|
|
|
},
|
|
|
|
|
statusPayment: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
required: false,
|
|
|
|
|
},
|
|
|
|
|
setSeat: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
required: false,
|
|
|
|
|
},
|
|
|
|
|
publicNoBtn: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
defualt: false,
|
|
|
|
|
},
|
|
|
|
|
fetchData: {
|
|
|
|
|
type: Function,
|
|
|
|
|
default: () => console.log('not function'),
|
|
|
|
|
},
|
|
|
|
|
changePage: {
|
|
|
|
|
type: Function,
|
|
|
|
|
default: () => console.log('not function'),
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
|
2023-11-24 18:12:56 +07:00
|
|
|
const keyword = ref<string>()
|
|
|
|
|
|
2023-11-22 16:15:12 +07:00
|
|
|
const emit = defineEmits(['update:change-page'])
|
2023-11-14 17:47:43 +07:00
|
|
|
|
2023-11-15 11:04:14 +07:00
|
|
|
// Pagination - initial pagination
|
|
|
|
|
const initialPagination = ref<any>({
|
|
|
|
|
sortBy: null,
|
|
|
|
|
descending: false,
|
|
|
|
|
page: 1,
|
2023-11-22 16:15:12 +07:00
|
|
|
rowsPerPage: props.pageSize, // set ตาม page หลักส่งมา
|
2023-11-15 11:04:14 +07:00
|
|
|
})
|
|
|
|
|
|
2023-11-22 16:15:12 +07:00
|
|
|
// Pagination - page & change page & get new data
|
|
|
|
|
const currentPage = ref<number>(1)
|
|
|
|
|
watch(
|
|
|
|
|
[() => currentPage.value, () => initialPagination.value.rowsPerPage],
|
|
|
|
|
() => {
|
|
|
|
|
emit(
|
|
|
|
|
'update:change-page',
|
|
|
|
|
currentPage.value,
|
|
|
|
|
initialPagination.value.rowsPerPage,
|
2023-11-24 18:12:56 +07:00
|
|
|
true,
|
|
|
|
|
keyword.value
|
2023-11-22 16:15:12 +07:00
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
2023-11-15 11:04:14 +07:00
|
|
|
// Pagination - update rowsPerPage
|
|
|
|
|
async function updatePagination(newPagination: any) {
|
|
|
|
|
initialPagination.value = newPagination
|
2023-11-22 16:15:12 +07:00
|
|
|
currentPage.value = 1 // set current page เป็น 1 เสมอเมื่อเปลี่ยน per row
|
2023-11-15 11:04:14 +07:00
|
|
|
}
|
2023-11-21 10:56:37 +07:00
|
|
|
|
2023-11-24 18:12:56 +07:00
|
|
|
async function filterFn() {
|
|
|
|
|
emit(
|
|
|
|
|
'update:change-page',
|
|
|
|
|
1,
|
|
|
|
|
initialPagination.value.rowsPerPage,
|
|
|
|
|
true,
|
|
|
|
|
keyword.value
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-21 10:56:37 +07:00
|
|
|
/** column history table */
|
2023-11-14 17:47:43 +07:00
|
|
|
const columns = ref<QTableProps['columns']>([
|
|
|
|
|
{
|
2023-11-21 10:56:37 +07:00
|
|
|
name: 'checkInDate',
|
2023-11-14 17:47:43 +07:00
|
|
|
align: 'left',
|
|
|
|
|
label: 'วัน/เดือน/ปี',
|
|
|
|
|
sortable: true,
|
2023-11-21 10:56:37 +07:00
|
|
|
field: 'checkInDate',
|
2023-11-14 17:47:43 +07:00
|
|
|
headerStyle: 'font-size: 14px',
|
|
|
|
|
style: 'font-size: 14px; width:15%;',
|
|
|
|
|
},
|
|
|
|
|
{
|
2023-11-21 10:56:37 +07:00
|
|
|
name: 'checkInTime',
|
2023-11-14 17:47:43 +07:00
|
|
|
align: 'left',
|
|
|
|
|
label: 'เวลาเข้างาน',
|
|
|
|
|
sortable: true,
|
2023-11-21 10:56:37 +07:00
|
|
|
field: 'checkInTime',
|
2023-11-14 17:47:43 +07:00
|
|
|
headerStyle: 'font-size: 14px',
|
|
|
|
|
style: 'font-size: 14px; width:15%;',
|
|
|
|
|
},
|
2023-11-21 00:24:26 +07:00
|
|
|
{
|
2023-11-21 10:56:37 +07:00
|
|
|
name: 'checkInLocation',
|
2023-11-21 00:24:26 +07:00
|
|
|
align: 'left',
|
|
|
|
|
label: 'พิกัด',
|
|
|
|
|
sortable: true,
|
2023-11-21 10:56:37 +07:00
|
|
|
field: 'checkInLocation',
|
2023-11-21 00:24:26 +07:00
|
|
|
headerStyle: 'font-size: 14px',
|
|
|
|
|
style: 'font-size: 14px',
|
|
|
|
|
},
|
2023-11-14 17:47:43 +07:00
|
|
|
{
|
2023-11-21 10:56:37 +07:00
|
|
|
name: 'checkInStatus',
|
2023-11-14 17:47:43 +07:00
|
|
|
align: 'left',
|
2023-11-21 10:56:37 +07:00
|
|
|
label: 'สถานะช่วงเช้า',
|
2023-11-14 17:47:43 +07:00
|
|
|
sortable: true,
|
2023-11-21 10:56:37 +07:00
|
|
|
field: 'checkInStatus',
|
2023-11-14 17:47:43 +07:00
|
|
|
headerStyle: 'font-size: 14px',
|
|
|
|
|
style: 'font-size: 14px; width:15%;',
|
|
|
|
|
},
|
2023-11-21 00:24:26 +07:00
|
|
|
{
|
2023-11-21 10:56:37 +07:00
|
|
|
name: 'checkOutTime',
|
2023-11-21 00:24:26 +07:00
|
|
|
align: 'left',
|
2023-11-21 10:56:37 +07:00
|
|
|
label: 'เวลาออกงาน',
|
2023-11-21 00:24:26 +07:00
|
|
|
sortable: true,
|
2023-11-21 10:56:37 +07:00
|
|
|
field: 'checkOutTime',
|
2023-11-21 00:24:26 +07:00
|
|
|
headerStyle: 'font-size: 14px',
|
2023-11-21 10:56:37 +07:00
|
|
|
style: 'font-size: 14px; width:15%;',
|
2023-11-21 00:24:26 +07:00
|
|
|
},
|
2023-11-14 17:47:43 +07:00
|
|
|
{
|
2023-11-21 10:56:37 +07:00
|
|
|
name: 'checkOutLocation',
|
2023-11-14 17:47:43 +07:00
|
|
|
align: 'left',
|
2023-11-21 10:56:37 +07:00
|
|
|
label: 'พิกัด',
|
2023-11-14 17:47:43 +07:00
|
|
|
sortable: true,
|
2023-11-21 10:56:37 +07:00
|
|
|
field: 'checkOutLocation',
|
2023-11-14 17:47:43 +07:00
|
|
|
headerStyle: 'font-size: 14px',
|
2023-11-21 10:56:37 +07:00
|
|
|
style: 'font-size: 14px',
|
2023-11-14 17:47:43 +07:00
|
|
|
},
|
|
|
|
|
{
|
2023-11-21 10:56:37 +07:00
|
|
|
name: 'checkOutStatus',
|
2023-11-14 17:47:43 +07:00
|
|
|
align: 'left',
|
|
|
|
|
label: 'สถานะช่วงบ่าย',
|
|
|
|
|
sortable: true,
|
2023-11-21 10:56:37 +07:00
|
|
|
field: 'checkOutStatus',
|
2023-11-14 17:47:43 +07:00
|
|
|
headerStyle: 'font-size: 14px',
|
|
|
|
|
style: 'font-size: 14px; width:15%;',
|
2023-11-22 11:40:21 +07:00
|
|
|
},
|
2023-11-14 17:47:43 +07:00
|
|
|
])
|
2023-11-24 18:12:56 +07:00
|
|
|
const visibleColumns = ref<string[]>([
|
|
|
|
|
'checkInDate',
|
|
|
|
|
'checkInTime',
|
|
|
|
|
'checkInLocation',
|
|
|
|
|
'checkInStatus',
|
|
|
|
|
'checkOutTime',
|
|
|
|
|
'checkOutLocation',
|
|
|
|
|
'checkOutStatus',
|
|
|
|
|
])
|
2023-11-14 17:47:43 +07:00
|
|
|
// popup
|
|
|
|
|
const modalPopup = ref<boolean>(false)
|
|
|
|
|
const titlePopup = ref<string>('')
|
|
|
|
|
const dataRow = ref<any>()
|
|
|
|
|
function openPopup(data: any) {
|
|
|
|
|
const title = 'แก้ไขลงเวลา'
|
|
|
|
|
modalPopup.value = true
|
|
|
|
|
titlePopup.value = title
|
|
|
|
|
dataRow.value = data
|
|
|
|
|
}
|
2023-11-21 10:56:37 +07:00
|
|
|
|
2023-11-14 17:47:43 +07:00
|
|
|
function closePopup() {
|
|
|
|
|
modalPopup.value = false
|
|
|
|
|
}
|
2023-11-21 10:56:37 +07:00
|
|
|
|
2023-11-14 17:47:43 +07:00
|
|
|
function classStatus(status: string) {
|
|
|
|
|
switch (status) {
|
|
|
|
|
case 'ขาดราชการ':
|
|
|
|
|
return 'text-red'
|
|
|
|
|
case 'ปกติ':
|
|
|
|
|
return 'text-blue'
|
|
|
|
|
case 'สาย':
|
|
|
|
|
return 'text-yellow-8'
|
|
|
|
|
default:
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-11-21 10:56:37 +07:00
|
|
|
|
|
|
|
|
const checkRequestEdit = (checkInStatus: string, checkOutStatus: string) => {
|
|
|
|
|
if (
|
|
|
|
|
checkInStatus === 'ขาด' ||
|
|
|
|
|
checkInStatus === 'สาย' ||
|
|
|
|
|
checkOutStatus === 'ขาด' ||
|
|
|
|
|
checkOutStatus === 'สาย'
|
|
|
|
|
)
|
|
|
|
|
return true
|
|
|
|
|
else false
|
|
|
|
|
}
|
2023-11-14 17:47:43 +07:00
|
|
|
</script>
|
2023-11-21 10:56:37 +07:00
|
|
|
|
2023-11-14 17:47:43 +07:00
|
|
|
<template>
|
2023-11-24 18:12:56 +07:00
|
|
|
<div class="row col-12 q-col-gutter-sm q-mb-sm">
|
|
|
|
|
<q-space />
|
|
|
|
|
<div class="col-xs-12 col-sm-3 col-md-2">
|
|
|
|
|
<q-input
|
|
|
|
|
for="filterTable"
|
|
|
|
|
dense
|
|
|
|
|
outlined
|
|
|
|
|
v-model="keyword"
|
|
|
|
|
label="ค้นหา"
|
|
|
|
|
debounce="300"
|
|
|
|
|
@keydown.enter.prevent="filterFn"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:append>
|
|
|
|
|
<q-icon name="search" />
|
|
|
|
|
</template>
|
|
|
|
|
</q-input>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-xs-12 col-sm-3 col-md-2">
|
|
|
|
|
<q-select
|
|
|
|
|
for="visibleColumns"
|
|
|
|
|
v-model="visibleColumns"
|
|
|
|
|
multiple
|
|
|
|
|
outlined
|
|
|
|
|
dense
|
|
|
|
|
options-dense
|
|
|
|
|
:display-value="$q.lang.table.columns"
|
|
|
|
|
emit-value
|
|
|
|
|
map-options
|
|
|
|
|
:options="columns"
|
|
|
|
|
option-value="name"
|
|
|
|
|
options-cover
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-11-14 17:47:43 +07:00
|
|
|
<q-table
|
|
|
|
|
flat
|
|
|
|
|
bordered
|
|
|
|
|
class="custom-table2"
|
|
|
|
|
:columns="columns"
|
|
|
|
|
:rows="stores.rows"
|
2023-11-24 18:12:56 +07:00
|
|
|
:visible-columns="visibleColumns"
|
2023-11-14 17:47:43 +07:00
|
|
|
virtual-scroll
|
2023-11-22 11:40:21 +07:00
|
|
|
v-model:selected="selected"
|
2023-11-14 17:47:43 +07:00
|
|
|
:virtual-scroll-sticky-size-start="48"
|
|
|
|
|
:style="$q.screen.gt.xs ? 'max-height: 64vh' : ''"
|
2023-11-27 12:16:25 +07:00
|
|
|
:rows-per-page-options="[10, 25, 50, 100]"
|
2023-11-14 17:47:43 +07:00
|
|
|
:grid="$q.screen.gt.xs ? false : true"
|
2023-11-22 11:40:21 +07:00
|
|
|
:pagination="initialPagination"
|
2023-11-15 11:04:14 +07:00
|
|
|
@update:pagination="updatePagination"
|
2023-11-14 17:47:43 +07:00
|
|
|
>
|
|
|
|
|
<template v-slot:header="props">
|
|
|
|
|
<q-tr :props="props">
|
|
|
|
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
|
|
|
|
<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 v-for="col in props.cols" :key="col.name" :props="props">
|
|
|
|
|
<div
|
2023-11-21 10:56:37 +07:00
|
|
|
v-if="col.name === 'checkInStatus'"
|
|
|
|
|
:class="classStatus(props.row.checkInStatus)"
|
2023-11-14 17:47:43 +07:00
|
|
|
>
|
2023-11-21 10:56:37 +07:00
|
|
|
{{ props.row.checkInStatus }}
|
2023-11-14 17:47:43 +07:00
|
|
|
</div>
|
|
|
|
|
<div
|
2023-11-21 10:56:37 +07:00
|
|
|
v-else-if="col.name === 'checkOutStatus'"
|
|
|
|
|
:class="classStatus(props.row.checkOutStatus)"
|
2023-11-14 17:47:43 +07:00
|
|
|
>
|
2023-11-21 10:56:37 +07:00
|
|
|
{{ props.row.checkOutStatus }}
|
2023-11-14 17:47:43 +07:00
|
|
|
</div>
|
|
|
|
|
<div v-else>
|
|
|
|
|
{{ col.value }}
|
|
|
|
|
</div>
|
|
|
|
|
</q-td>
|
|
|
|
|
<q-td>
|
|
|
|
|
<q-btn
|
2023-11-21 10:56:37 +07:00
|
|
|
v-if="
|
|
|
|
|
checkRequestEdit(
|
|
|
|
|
props.row.checkInStatus,
|
|
|
|
|
props.row.checkOutStatus
|
|
|
|
|
)
|
|
|
|
|
"
|
|
|
|
|
style="min-width: 110px"
|
2023-11-14 17:47:43 +07:00
|
|
|
outline
|
|
|
|
|
icon="edit"
|
|
|
|
|
size="12px"
|
|
|
|
|
label="ขอแก้ไข"
|
|
|
|
|
color="cyan-6"
|
|
|
|
|
@click="openPopup(props.row)"
|
|
|
|
|
/>
|
2023-11-24 18:12:56 +07:00
|
|
|
<!-- <q-chip
|
2023-11-14 17:47:43 +07:00
|
|
|
v-else
|
|
|
|
|
:color="`${stores.classColorStatus(props.row.statusEdit)}-1`"
|
|
|
|
|
:text-color="`${stores.classColorStatus(props.row.statusEdit)}-7`"
|
2023-11-21 10:56:37 +07:00
|
|
|
>{{ props.row.statusEdit }}</q-chip
|
2023-11-24 18:12:56 +07:00
|
|
|
> -->
|
2023-11-14 17:47:43 +07:00
|
|
|
</q-td>
|
|
|
|
|
</q-tr>
|
|
|
|
|
</template>
|
2023-11-21 10:56:37 +07:00
|
|
|
|
|
|
|
|
<!-- กรณีแสดงผลบน mobile -->
|
2023-11-14 17:47:43 +07:00
|
|
|
<template #item="props">
|
|
|
|
|
<div
|
|
|
|
|
class="q-pa-xs col-xs-12 col-sm-6 col-md-4 col-lg-3 grid-style-transition"
|
|
|
|
|
>
|
|
|
|
|
<q-card bordered flat class="q-py-sm shadow-0">
|
|
|
|
|
<q-list dense>
|
|
|
|
|
<q-item v-for="col in props.cols" :key="col.name" :props="props">
|
|
|
|
|
<q-item-section>
|
|
|
|
|
<q-item-label caption>{{ col.label }}</q-item-label>
|
|
|
|
|
</q-item-section>
|
|
|
|
|
<q-item-section side>
|
|
|
|
|
<q-item-label>
|
|
|
|
|
<span
|
2023-11-21 10:56:37 +07:00
|
|
|
v-if="col.name == 'checkInStatus'"
|
|
|
|
|
:class="classStatus(props.row.checkInStatus)"
|
2023-11-14 17:47:43 +07:00
|
|
|
>{{ col.value }}</span
|
|
|
|
|
>
|
|
|
|
|
<span
|
2023-11-21 10:56:37 +07:00
|
|
|
v-else-if="col.name == 'checkOutStatus'"
|
|
|
|
|
:class="classStatus(props.row.checkOutStatus)"
|
2023-11-14 17:47:43 +07:00
|
|
|
>{{ col.value }}</span
|
|
|
|
|
>
|
|
|
|
|
<span v-else class="text-black">{{ col.value }} </span>
|
|
|
|
|
</q-item-label>
|
|
|
|
|
</q-item-section>
|
|
|
|
|
<q-separator />
|
|
|
|
|
</q-item>
|
|
|
|
|
</q-list>
|
|
|
|
|
<q-card-section>
|
|
|
|
|
<div class="row">
|
2023-11-21 10:56:37 +07:00
|
|
|
<div
|
|
|
|
|
class="col"
|
|
|
|
|
v-if="
|
|
|
|
|
checkRequestEdit(
|
|
|
|
|
props.row.checkInStatus,
|
|
|
|
|
props.row.checkOutStatus
|
|
|
|
|
)
|
|
|
|
|
"
|
|
|
|
|
>
|
2023-11-14 17:47:43 +07:00
|
|
|
<q-btn
|
|
|
|
|
class="full-width text-cen"
|
|
|
|
|
outline
|
|
|
|
|
icon="edit"
|
|
|
|
|
label="ขอแก้ไข"
|
|
|
|
|
color="info"
|
|
|
|
|
size="sm"
|
|
|
|
|
@click="openPopup(props.row)"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col" v-else>
|
|
|
|
|
<q-chip
|
|
|
|
|
:color="`${stores.classColorStatus(props.row.statusEdit)}-1`"
|
|
|
|
|
:text-color="`${stores.classColorStatus(
|
|
|
|
|
props.row.statusEdit
|
|
|
|
|
)}-7`"
|
|
|
|
|
>
|
2023-11-21 10:56:37 +07:00
|
|
|
{{ props.row.statusEdit }}
|
2023-11-14 17:47:43 +07:00
|
|
|
</q-chip>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</q-card-section>
|
|
|
|
|
</q-card>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
2023-11-22 11:40:21 +07:00
|
|
|
<!-- <template v-slot:pagination="scope">
|
2023-11-14 17:47:43 +07:00
|
|
|
<q-pagination
|
2023-11-22 11:40:21 +07:00
|
|
|
v-model="currentPage"
|
2023-11-14 17:47:43 +07:00
|
|
|
active-color="primary"
|
|
|
|
|
color="dark"
|
|
|
|
|
:max="scope.pagesNumber"
|
|
|
|
|
:max-pages="5"
|
|
|
|
|
size="sm"
|
|
|
|
|
boundary-links
|
|
|
|
|
direction-links
|
|
|
|
|
></q-pagination>
|
2023-11-22 11:40:21 +07:00
|
|
|
</template> -->
|
|
|
|
|
<template v-slot:pagination="scope">
|
|
|
|
|
ทั้งหมด {{ props.total }} รายการ
|
|
|
|
|
<q-pagination
|
|
|
|
|
v-model="currentPage"
|
|
|
|
|
active-color="primary"
|
|
|
|
|
color="dark"
|
|
|
|
|
:max-pages="5"
|
|
|
|
|
size="sm"
|
|
|
|
|
boundary-links
|
|
|
|
|
direction-links
|
|
|
|
|
:max="Number(props.maxPage)"
|
|
|
|
|
></q-pagination>
|
2023-11-14 17:47:43 +07:00
|
|
|
</template>
|
|
|
|
|
</q-table>
|
|
|
|
|
|
|
|
|
|
<Popup
|
2023-11-27 09:23:43 +07:00
|
|
|
:fetchData="props.fetchData"
|
2023-11-14 17:47:43 +07:00
|
|
|
:modal="modalPopup"
|
|
|
|
|
:clickClose="closePopup"
|
|
|
|
|
:title="titlePopup"
|
|
|
|
|
:dataById="dataRow"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.icon-color {
|
|
|
|
|
color: #4154b3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.items-center {
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.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;
|
|
|
|
|
}
|
|
|
|
|
.text-caption {
|
|
|
|
|
text-align: left;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.q-card-section-last {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
}
|
|
|
|
|
</style>
|