refactor code (ยังไม่หมด)
This commit is contained in:
parent
ab4189e6ed
commit
32d4de7075
21 changed files with 309 additions and 109 deletions
|
|
@ -7,9 +7,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
|
||||
const mixin = useCounterMixin();
|
||||
const $q = useQuasar();
|
||||
|
||||
const { dialogConfirm, dialogMessageNotify } = mixin;
|
||||
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
|
|
@ -50,18 +48,15 @@ const props = defineProps({
|
|||
});
|
||||
|
||||
const emit = defineEmits(["returnPerson"]);
|
||||
/** หัวตาราง */
|
||||
|
||||
const selected = ref<any>([]);
|
||||
const inspectionResults = ref<string>("");
|
||||
const filter = ref<string>("");
|
||||
// const inputRef = ref<any>(null);
|
||||
|
||||
const initialPagination = ref<any>({
|
||||
descending: false,
|
||||
rowsPerPage: 25,
|
||||
});
|
||||
|
||||
/** ฟังชั่นส่งคนไปออกคำสั่ง */
|
||||
function onclickSend() {
|
||||
if (selected.value.length === 0) {
|
||||
dialogMessageNotify($q, "กรุณาเลือกอย่างน้อย 1 บุคคล");
|
||||
|
|
@ -69,7 +64,6 @@ function onclickSend() {
|
|||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
// success($q, `ส่งข้อมูล${props.title}สำเร็จ`);
|
||||
await emit("returnPerson", selected.value);
|
||||
props.fetchData();
|
||||
props.close?.();
|
||||
|
|
@ -80,6 +74,7 @@ function onclickSend() {
|
|||
}
|
||||
}
|
||||
|
||||
/** ปิด pop up */
|
||||
function onClickClose() {
|
||||
props.close?.();
|
||||
}
|
||||
|
|
@ -161,12 +156,6 @@ watch([() => props.modal], () => {
|
|||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width>
|
||||
<!-- <q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="props.selected"
|
||||
/> -->
|
||||
</q-th>
|
||||
<q-th
|
||||
v-for="col in props.cols"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue