ปรับ วินัย
This commit is contained in:
parent
89bedf5251
commit
2adbbc9b24
22 changed files with 416 additions and 411 deletions
|
|
@ -1,12 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import Table from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue";
|
||||
|
||||
|
|
@ -19,10 +19,11 @@ const pagination = ref({
|
|||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
const dataInvestigateDis = useInvestigateDisStore();
|
||||
const { showLoader, hideLoader } = mixin;
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
const { fetchList } = dataInvestigateDis;
|
||||
|
||||
const filter = ref<string>(""); //search data table
|
||||
|
|
@ -33,17 +34,21 @@ async function fetchListDisciplinary() {
|
|||
await http
|
||||
.get(
|
||||
config.API.disciplineDisciplinary() +
|
||||
`?page=${pagination.value.page}&pageSize=${pagination.value.rowsPerPage}&keyword=${filter.value.trim()}&status=${status.value}`
|
||||
`?page=${pagination.value.page}&pageSize=${
|
||||
pagination.value.rowsPerPage
|
||||
}&keyword=${filter.value.trim()}&status=${status.value}`
|
||||
)
|
||||
.then((res) => {
|
||||
.then(async (res) => {
|
||||
const data = res.data.result.data;
|
||||
totalList.value = Math.ceil(
|
||||
res.data.result.total / pagination.value.rowsPerPage
|
||||
);
|
||||
total.value = res.data.result.total;
|
||||
fetchList(data);
|
||||
await fetchList(data);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.catch((err) => {})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
|
|
@ -66,7 +71,7 @@ function openDetail(id: string) {
|
|||
|
||||
function filterStatus(statusReturn: string) {
|
||||
status.value = statusReturn;
|
||||
getSearch()
|
||||
getSearch();
|
||||
}
|
||||
|
||||
function getSearch() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue