- {{ col.value }}
+
+ {{ col.value ? col.value : "-" }}
@@ -294,10 +272,17 @@ onMounted(() => {
+
+
+
diff --git a/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue b/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue
index ec3fd86b9..c2bf69938 100644
--- a/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue
+++ b/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue
@@ -8,7 +8,7 @@ import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/SuspendStore";
-import type { dataType } from "@/modules/11_discipline/interface/response/suspend";
+import type { dataType } from "@/modules/11_discipline/interface/response/Suspend";
import type { QTableProps } from "quasar";
import DialogSendToCommand from "@/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue";
@@ -38,7 +38,6 @@ const visibleColumns = ref
([
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
const filterKeyword = ref("");
-const filterKeyword2 = ref("");
const filterRef = ref(null);
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
@@ -124,7 +123,6 @@ const columns = ref([
]);
const openModal = () => (modal.value = true);
-const closeModal = () => (modal.value = false);
const currentPage = ref(1);
const maxPage = ref(1);
@@ -144,7 +142,6 @@ const pagination = ref({
function resetFilter() {
filterKeyword.value = "";
- filterKeyword2.value = "";
filterRef.value.focus();
getList();
}
@@ -163,6 +160,7 @@ function openModalOrder() {
r.organization
);
rows2.value = dataMap;
+ console.log("🚀 ~ openModalOrder ~ rows2.value:", rows2.value);
}
/** ดึงข้อมูลหน้าหลัก */
@@ -176,41 +174,18 @@ async function getList() {
filterKeyword.value
)
)
- .then((res) => {
+ .then(async (res) => {
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
- const data = res.data.result.data;
+ const data = await res.data.result.data;
totalList.value = res.data.result.total;
- dataStore.getData(data);
+ await dataStore.getData(data);
+ hideLoader();
})
.catch((e) => {
messageError($q, e);
- })
- .finally(() => {
hideLoader();
- });
-}
-
-/**
- * ยืนยัน ส่งไปออกคำสั่ง
- * @param data ข้อมูลรายบุคคล
- */
-function onSubmit(data: dataType[], type: string) {
- const dataMapId = data.map((item: dataType) => item.id);
- showLoader();
- http
- .put(`${config.API.suspendReport()}/${type}`, {
- id: dataMapId,
})
- .then((res) => {
- success($q, `ส่งข้อมูลไปออกคำสั่งสำเร็จ`);
- })
- .catch((e) => {
- messageError($q, e);
- })
- .finally(() => {
- hideLoader();
- getList();
- });
+ .finally(() => {});
}
function filterFn() {
@@ -235,8 +210,8 @@ watch(
);
/** เรียกใช้งานเมื่อเริ่มหน้าเว็ป */
-onMounted(() => {
- getList();
+onMounted(async () => {
+ await getList();
dataStore.columns = columns.value;
dataStore.visibleColumns = visibleColumns.value;
});
@@ -398,12 +373,6 @@ onMounted(() => {
-