Refactoring code module 15_development
This commit is contained in:
parent
895bfe98f2
commit
32ff7bdc96
25 changed files with 271 additions and 1440 deletions
|
|
@ -1,18 +1,21 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, watch } from "vue";
|
||||
import { useQuasar, type QTableProps } from "quasar";
|
||||
import genReportXLSX from "@/plugins/genreportxlsx";
|
||||
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useStructureTree } from "@/stores/structureTree";
|
||||
import genReportXLSX from "@/plugins/genreportxlsx";
|
||||
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
/**importType*/
|
||||
import type {
|
||||
DataOption,
|
||||
NewPagination,
|
||||
OrgTree,
|
||||
} from "@/modules/15_development/interface/index/Main";
|
||||
import type {
|
||||
FormQueryListProject,
|
||||
|
|
@ -23,14 +26,7 @@ import type {
|
|||
DataTree,
|
||||
} from "@/modules/15_development/interface/response/Main";
|
||||
|
||||
/**
|
||||
* importComponents
|
||||
*/
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
|
||||
|
||||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
/** use*/
|
||||
const $q = useQuasar();
|
||||
|
|
@ -46,16 +42,16 @@ const {
|
|||
dialogConfirm,
|
||||
} = useCounterMixin();
|
||||
|
||||
const node = ref<any>([]);
|
||||
const node = ref<OrgTree[]>([]); // หน่วยงาน/ส่วนราชการ
|
||||
const expanded = ref<string[]>([]);
|
||||
const expandedDialog = ref<string[]>([]);
|
||||
|
||||
const filter = ref<string>("");
|
||||
const filterMain = ref<string>("");
|
||||
const splitterModel = ref<number>(60);
|
||||
const modal = ref<boolean>(false);
|
||||
const filter = ref<string>(""); //ค้นหา เพิ่มโครงการ/หลักสูตรการฝึกอบรม
|
||||
const filterMain = ref<string>(""); //ค้นหา หน่วยงาน/ส่วนราชการ
|
||||
const splitterModel = ref<number>(60); //แบ่ง ส่วน
|
||||
const modal = ref<boolean>(false); // ตัวแปร dialog
|
||||
const totalList = ref<number>(0); //จำนวนข้อมูลรายการ
|
||||
const totalPage = ref<number>(1);
|
||||
const totalPage = ref<number>(1); // จำนวนข้อมูลที่มี
|
||||
|
||||
const statusOpt = ref<DataOption[]>([
|
||||
{ id: "ONGOING", name: "กำลังดำเนินการ" },
|
||||
|
|
@ -269,14 +265,6 @@ function onRedirectToRecordPage(id: string) {
|
|||
router.push(`/development/record/${id}`);
|
||||
}
|
||||
|
||||
/** callbackFunction ทำเมื่อมีการอัปเดท pageSize*/
|
||||
watch(
|
||||
() => formQuery.pageSize,
|
||||
() => {
|
||||
fetchListProject();
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* function redirect หน้าบันทึกผล
|
||||
* @param id โครงการ
|
||||
|
|
@ -285,6 +273,14 @@ function onDetail(id: string) {
|
|||
router.push(`/development-detail/${id}`);
|
||||
}
|
||||
|
||||
/** callbackFunction ทำเมื่อมีการอัปเดท pageSize*/
|
||||
watch(
|
||||
() => formQuery.pageSize,
|
||||
() => {
|
||||
fetchListProject();
|
||||
}
|
||||
);
|
||||
|
||||
/** ดึงข้อมูลเมื่อโหลดหน้าเสร็จสิ้น */
|
||||
onMounted(() => {
|
||||
fetchActive();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue