ui การลา
This commit is contained in:
parent
acbec63df7
commit
333515f570
7 changed files with 79 additions and 56 deletions
|
|
@ -11,7 +11,7 @@ const props = defineProps({
|
|||
type: Function,
|
||||
},
|
||||
});
|
||||
//
|
||||
// รายละเอียดข้อมูง
|
||||
const titlename = ref<string>("");
|
||||
const timeIn = ref<string>("");
|
||||
const timeOut = ref<string>("");
|
||||
|
|
@ -32,6 +32,7 @@ watch(props, () => {
|
|||
}
|
||||
}
|
||||
});
|
||||
// ปิด popup
|
||||
function colsePopup() {
|
||||
props.colse ? props.colse() : false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
|
@ -13,10 +12,8 @@ const mixin = useCounterMixin();
|
|||
const workStore = useWorklistDataStore();
|
||||
|
||||
const { date2Thai } = mixin;
|
||||
const { optionStatus, searchDataFn } = workStore;
|
||||
onMounted(() => {
|
||||
optionStatusfn.value = optionStatus;
|
||||
});
|
||||
const { searchDataFn, filterFn } = workStore;
|
||||
onMounted(() => {});
|
||||
|
||||
//ข้อมูล Table
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -96,28 +93,15 @@ const visibleColumns = ref<string[]>([
|
|||
//DialogDetail
|
||||
const modal = ref<boolean>(false);
|
||||
const dataDetail = ref<any>([]);
|
||||
// เปิด popup ลายละเอียด
|
||||
function clickDetail(data: any) {
|
||||
modal.value = true;
|
||||
dataDetail.value = data;
|
||||
}
|
||||
} //ปิด popup ลายละเอียด
|
||||
function colseDeyail() {
|
||||
modal.value = false;
|
||||
}
|
||||
//filter Option
|
||||
const optionStatusfn = ref<any>([]);
|
||||
function filterFn(val: string, update: any) {
|
||||
if (val == "") {
|
||||
update(() => {
|
||||
optionStatusfn.value = optionStatus;
|
||||
});
|
||||
} else {
|
||||
update(() => {
|
||||
optionStatusfn.value = optionStatus.filter(
|
||||
(e: any) => e.name.search(val) !== -1
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//pagination
|
||||
const pagination = ref({
|
||||
|
|
@ -178,7 +162,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
outlined
|
||||
dense
|
||||
v-model="workStore.selectStatus"
|
||||
:options="optionStatusfn"
|
||||
:options="workStore.optionStatus"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
label="สถานะ"
|
||||
|
|
|
|||
|
|
@ -3,18 +3,19 @@ q
|
|||
import { ref } from "vue";
|
||||
import type { QTableProps } from "quasar";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
//import Stores
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const leaveStore = useLeavelistDataStore();
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const { date2Thai } = mixin;
|
||||
const { optionYear, searchDataFn, filterOption } = leaveStore;
|
||||
const { optionYear, searchDataFn, filterOption } = leaveStore; // เรียน funtion จาก stores
|
||||
|
||||
// ข้อมูล TABLE
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue