ปรับ code บรรจุ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-12-20 10:29:07 +07:00
parent 063db4e245
commit 35a5817db3
16 changed files with 559 additions and 700 deletions

View file

@ -9,15 +9,11 @@ import { useCounterMixin } from "@/stores/mixin";
import http from "@/plugins/http";
import config from "@/app.config";
/**
* importType
*/
/** importType*/
import type { QTableProps } from "quasar";
import type { officerType } from "@/modules/05_placement/interface/response/officer";
/**
* importComponents
*/
/** importComponents*/
import Dialogbody from "@/modules/05_placement/components/Help-Government/DialogOrders.vue";
const $q = useQuasar();
@ -34,14 +30,11 @@ const {
dialogRemove,
findOrgNameOld,
findPosMasterNoOld,
onSearchDataTable
onSearchDataTable,
} = mixin;
/**
* Table
*/
/** Table*/
const modal = ref<boolean>(false); // popup ;
const filterKeyword = ref<string>(""); //
const filterKeyword2 = ref<string>(""); //
const rows = ref<officerType[]>([]); //
@ -185,9 +178,7 @@ const visibleColumns = ref<string[]>([
"status",
]);
/**
* fetch รายการชวยราชการ
*/
/**fetch รายการช่วยราชการ*/
async function getData() {
showLoader();
await http
@ -210,9 +201,9 @@ async function getData() {
* @param id รายการทองการลบ
*/
function clickDelete(id: string) {
dialogRemove($q, () => {
dialogRemove($q, async () => {
showLoader();
http
await http
.delete(config.API.officerMainDelete(id))
.then(async () => {
await getData();
@ -235,9 +226,7 @@ function openDetail(id: string) {
router.push(`/placement/help-government/detail/${id}`);
}
/**
* เป popup งไปออกคำสงชวยราชการ
*/
/** เปิด popup ส่งไปออกคำสั่งช่วยราชการ*/
function openModalOrder() {
const row = rows.value.filter(
(item: officerType) =>
@ -254,22 +243,12 @@ function openModalOrder() {
modal.value = true;
}
/**
* popup งไปออกคำสงชวยราชการ
*/
/** ปิด popup ส่งไปออกคำสั่งช่วยราชการ*/
function closeModal() {
modal.value = false;
filterKeyword2.value = "";
}
/**
* เซตขอมลในชองฟลเตอร
*/
function resetFilter() {
filterKeyword.value = "";
filterKeyword2.value = "";
}
function onSearch() {
rows.value = onSearchDataTable(
filterKeyword.value,
@ -278,17 +257,15 @@ function onSearch() {
);
}
/**
* ทำงานเมอมการเรยกใช Components
*/
onMounted(() => {
getData();
/** ทำงานเมื่อมีการเรียกใช้ Components*/
onMounted(async () => {
await getData();
});
</script>
<template>
<div class="toptitle text-dark col-12 row items-center">รายการชวยราชการ</div>
<q-card flat bordered class="col-12 q-mt-sm">
<q-card flat bordered class="col-12">
<div class="row q-pa-md">
<div class="col-12">
<div class="row col-12">
@ -305,7 +282,6 @@ onMounted(() => {
</q-btn>
<q-space />
<q-input
class="col-xs-12 col-sm-3 col-md-2"
standout
dense
v-model="filterKeyword"
@ -320,6 +296,7 @@ onMounted(() => {
</q-input>
<q-select
class="q-ml-sm"
v-model="visibleColumns"
multiple
outlined
@ -331,7 +308,6 @@ onMounted(() => {
:options="columns"
option-value="name"
style="min-width: 140px"
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
/>
</div>