diff --git a/src/modules/11_discipline/components/6_BasicInformation/Channel/MainPage.vue b/src/modules/11_discipline/components/6_BasicInformation/Channel/MainPage.vue index 7a15f1330..5891812eb 100644 --- a/src/modules/11_discipline/components/6_BasicInformation/Channel/MainPage.vue +++ b/src/modules/11_discipline/components/6_BasicInformation/Channel/MainPage.vue @@ -4,67 +4,15 @@ import type { QTableProps } from "quasar"; import router from "@/router"; import { useCounterMixin } from "@/stores/mixin"; import { useQuasar } from "quasar"; +import { useDisciplineChannelDataStore } from "@/modules/11_discipline/store/ChannelStore"; import config from "@/app.config"; import http from "@/plugins/http"; const mixin = useCounterMixin(); -const { - date2Thai, - success, - messageError, - showLoader, - hideLoader, - dialogConfirm, - dialogRemove, -} = mixin; +const { dialogRemove } = mixin; const $q = useQuasar(); //ใช้ noti quasar -const visibleColumns = ref([ - "no", - "subject", - "interrogated", - "fault", - "status", -]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง - -// หัวตาราง -const columns = ref([ - { - name: "no", - align: "left", - label: "ลำดับ", - sortable: false, - field: "no", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "subject", - align: "left", - label: "ชื่อประเภท", - sortable: true, - field: "subject", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, -]); - -const rows = ref([ - { - subject: " จดหมาย", - }, - { - subject: " อีเมล์", - }, - { - subject: " โทรศัพท์", - }, - { - subject: " บอกเล่า", - }, -]); - // ค้นหาในตาราง const filterKeyword = ref(""); const filterRef = ref(null); @@ -74,7 +22,7 @@ const resetFilter = () => { filterRef.value.focus(); } }; - +const dataStore = useDisciplineChannelDataStore(); const attrs = ref(useAttrs()); const paging = ref(true); const pagination = ref({ @@ -104,7 +52,23 @@ const clickDelete = (id: string) => { ); }; -onMounted(() => {}); +onMounted(() => { + // get ข้อมูลแล้วโยนใส่ store + dataStore.fetchData([ + { + subject: " จดหมาย", + }, + { + subject: " อีเมล์", + }, + { + subject: " โทรศัพท์", + }, + { + subject: " บอกเล่า", + }, + ]); +});