ปรับ code บรรจุ
This commit is contained in:
parent
063db4e245
commit
35a5817db3
16 changed files with 559 additions and 700 deletions
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue