ปรับ Code ประเมืน
This commit is contained in:
parent
f9c4bb3b80
commit
5b2be2af2b
24 changed files with 603 additions and 1398 deletions
|
|
@ -1,6 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, useAttrs, onMounted, watch } from "vue";
|
||||
import type { QTableProps } from "quasar";
|
||||
import { ref, onMounted, watch } from "vue";
|
||||
import router from "@/router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
|
|
@ -12,14 +11,7 @@ import config from "@/app.config";
|
|||
const $q = useQuasar();
|
||||
const dataStore = useEvaluateDirectorDataStore();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
dialogConfirm,
|
||||
dialogRemove,
|
||||
success,
|
||||
} = mixin;
|
||||
const { messageError, showLoader, hideLoader, dialogRemove, success } = mixin;
|
||||
|
||||
const currentPage = ref<number>(1);
|
||||
const maxPage = ref<number>(1);
|
||||
|
|
@ -51,17 +43,13 @@ watch(
|
|||
getList();
|
||||
}
|
||||
);
|
||||
// currentPage.value,
|
||||
// rowsPerPage.value,
|
||||
// filterKeyword.value
|
||||
|
||||
function getList() {
|
||||
showLoader();
|
||||
http
|
||||
.get(
|
||||
config.API.evaluateDirectorMain())
|
||||
.get(config.API.evaluateDirectorMain())
|
||||
.then((res) => {
|
||||
// maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
||||
const data = res.data.result
|
||||
const data = res.data.result;
|
||||
dataStore.fetchData(data);
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -70,7 +58,6 @@ function getList() {
|
|||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -89,7 +76,7 @@ async function deleteData(id: string) {
|
|||
showLoader();
|
||||
await http
|
||||
.delete(config.API.evaluateDirectorById(id))
|
||||
.then((res) => {
|
||||
.then(() => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -115,7 +102,6 @@ function resetFilter() {
|
|||
|
||||
function filterFn() {
|
||||
getList();
|
||||
console.log("enter", filterKeyword.value);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue