ปรับ table popup ส่งไปสืบสวน

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-11-23 10:30:55 +07:00
parent b5c021e895
commit 48f9bc77e4

View file

@ -114,9 +114,14 @@ const selected = ref<any>([]);
const inspectionResults = ref<string>(""); const inspectionResults = ref<string>("");
const inputRef = ref<any>(null); const inputRef = ref<any>(null);
const initialPagination = ref<any>({
descending: false,
rowsPerPage: 25,
});
function onclickSend() { function onclickSend() {
inputRef.value.validate(); inputRef.value.validate();
if (!inputRef.value.hasError) { if (!inputRef.value.hasError && selected.value.length > 0) {
dialogConfirm( dialogConfirm(
$q, $q,
async () => { async () => {
@ -137,6 +142,8 @@ function onClickClose() {
watch([() => props.modal], () => { watch([() => props.modal], () => {
inspectionResults.value = props.modal ? "" : ""; inspectionResults.value = props.modal ? "" : "";
selected.value = props.modal ? [] : [];
selected.value.push(complainstStore.rowsAdd); selected.value.push(complainstStore.rowsAdd);
}); });
</script> </script>
@ -164,22 +171,24 @@ watch([() => props.modal], () => {
row-key="id" row-key="id"
flat flat
bordered bordered
:paging="true" :paging="false"
dense dense
class="custom-header-table" class="custom-header-table"
:visible-columns="visibleColumns" :visible-columns="visibleColumns"
selection="multiple" selection="multiple"
v-model:selected="selected" v-model:selected="selected"
:pagination="initialPagination"
hide-bottom
> >
<template v-slot:header="props"> <template v-slot:header="props">
<q-tr :props="props"> <q-tr :props="props">
<q-th auto-width> <q-th auto-width>
<q-checkbox <!-- <q-checkbox
keep-color keep-color
color="primary" color="primary"
dense dense
v-model="props.selected" v-model="props.selected"
/> /> -->
</q-th> </q-th>
<q-th <q-th
v-for="col in props.cols" v-for="col in props.cols"