ปรับ format code + comment + เช็ค paging เมนูพัฒนาบุคลากร
This commit is contained in:
parent
c2a1648d70
commit
fb2b9b4c30
8 changed files with 35 additions and 40 deletions
|
|
@ -126,7 +126,9 @@ function fetchTree(id: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/** function เลือกหน่วยงาน*/
|
||||
/** function เลือกหน่วยงาน
|
||||
* @param data ข้อมูลทั้งหมดของ row
|
||||
*/
|
||||
function updateSelected(data: DataTree) {
|
||||
orgName.value = data.orgTreeName;
|
||||
formData.node = data.orgLevel;
|
||||
|
|
@ -134,6 +136,7 @@ function updateSelected(data: DataTree) {
|
|||
formData.orgRevisionId = data.orgRevisionId;
|
||||
}
|
||||
|
||||
/** ดึงข้อมูลเมื่อโหลดหน้าเสร็จสิ้น */
|
||||
onMounted(async () => {
|
||||
fetchActive();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -42,13 +42,11 @@ const pagination = ref({
|
|||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
dialogConfirm,
|
||||
messageError,
|
||||
dialogMessageNotify,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
const store = useDevelopmentDataStore();
|
||||
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
|
||||
|
|
@ -56,9 +54,6 @@ const selected = ref<any[]>([]);
|
|||
const search = ref<string>("citizenId");
|
||||
const inputSearch = ref<any>("");
|
||||
|
||||
const inputType = computed(() => {
|
||||
return search.value === "citizenId" ? "number" : "text";
|
||||
});
|
||||
const govOp = ref<DataOption[]>([
|
||||
{
|
||||
id: "citizenId",
|
||||
|
|
@ -78,6 +73,7 @@ const visibleColumns = ref<string[]>([
|
|||
"level",
|
||||
"positionSide",
|
||||
]);
|
||||
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "citizenId",
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ const year = ref<string>("");
|
|||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
dialogConfirm,
|
||||
messageError,
|
||||
dialogMessageNotify,
|
||||
showLoader,
|
||||
|
|
@ -66,10 +65,6 @@ const projectOp = ref<DataOption[]>([
|
|||
id: "year",
|
||||
name: "ปีงบประมาณ",
|
||||
},
|
||||
// {
|
||||
// id: "ID3",
|
||||
// name: "ชื่อหน่วยงานที่รับผิดชอบ",
|
||||
// },
|
||||
]);
|
||||
|
||||
const visibleColumns = ref<string[]>(["project", "year", "organizingTraining"]);
|
||||
|
|
|
|||
|
|
@ -2,14 +2,12 @@
|
|||
import { ref, watch, computed,reactive } from "vue";
|
||||
import Header from "@/components/DialogHeader.vue";
|
||||
import type { DataOption,FormFilter,NewPagination } from "@/modules/15_development/interface/index/Main";
|
||||
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar, type QTableProps } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
|
||||
const rows = ref<any[]>([])
|
||||
const props = defineProps({
|
||||
upDate: { type: Function },
|
||||
|
|
@ -199,13 +197,17 @@ function searchFilter() {
|
|||
});
|
||||
}
|
||||
|
||||
/** update ค่า เเถวข้อมูล */
|
||||
/** update ค่า เเถวข้อมูล
|
||||
* @param val ตัวเลขที่มีการเปลี่ยนค่า
|
||||
*/
|
||||
function updatePage(val:number){
|
||||
formFilter.page = val;
|
||||
searchFilter();
|
||||
}
|
||||
|
||||
/** update ค่า เเถวข้อมูล */
|
||||
/** update ค่า เเถวข้อมูล
|
||||
* @param newPagination ตัวเลขที่มีการเปลี่ยนค่า
|
||||
*/
|
||||
function updatePageSize(newPagination: NewPagination) {
|
||||
formFilter.page = 1;
|
||||
formFilter.pageSize = newPagination.rowsPerPage;
|
||||
|
|
|
|||
|
|
@ -62,14 +62,9 @@ const projectOp = ref<DataOption[]>([
|
|||
id: "year",
|
||||
name: "ปีงบประมาณ",
|
||||
},
|
||||
// {
|
||||
// id: "ID3",
|
||||
// name: "ชื่อหน่วยงานที่รับผิดชอบ",
|
||||
// },
|
||||
]);
|
||||
|
||||
const visibleColumns = ref<string[]>(["project", "year", "organizingTraining"]);
|
||||
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "project",
|
||||
|
|
|
|||
|
|
@ -20,12 +20,8 @@ const router = useRouter();
|
|||
const store = useDevelopmentDataStore();
|
||||
const $q = useQuasar();
|
||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||
|
||||
|
||||
|
||||
const maxPage = ref<number>(1);
|
||||
const totalList = ref<number>(0); //จำนวนข้อมูลรายการ
|
||||
|
||||
const formFilter = reactive({
|
||||
root: null,
|
||||
page: 1,
|
||||
|
|
@ -154,7 +150,9 @@ function fetchListOrg() {
|
|||
});
|
||||
}
|
||||
|
||||
/** download file */
|
||||
/** download file
|
||||
* @param type ประเภทของไฟล์ xlsx pdf
|
||||
*/
|
||||
function onDownload(type: string) {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -174,7 +172,9 @@ function onDownload(type: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/** edit page */
|
||||
/** edit page
|
||||
* @param id id ของ row
|
||||
*/
|
||||
function onEdit(id: string) {
|
||||
store.statusEdit = true;
|
||||
router.push(`/development/employee-history/${id}`);
|
||||
|
|
@ -229,8 +229,7 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
/** ดึงข้อมูลเมื่อโหลดหน้าเสร็จสิ้น */
|
||||
onMounted(() => {
|
||||
fetchListOrg();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ const router = useRouter();
|
|||
const store = useDevelopmentDataStore();
|
||||
const $q = useQuasar();
|
||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||
|
||||
const agencyOp = ref<[]>([]);
|
||||
const rows = ref<any[]>([]);
|
||||
|
||||
|
|
@ -195,6 +194,9 @@ function getData() {
|
|||
});
|
||||
}
|
||||
|
||||
/** download file
|
||||
* @param type ประเภทของไฟล์ xlsx pdf
|
||||
*/
|
||||
function onDownload(type: string) {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -219,7 +221,9 @@ function onDownload(type: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/** edit page */
|
||||
/** edit page
|
||||
* @param id id ของ row
|
||||
*/
|
||||
function onEdit(id: string) {
|
||||
store.statusEdit = true;
|
||||
router.push(`/development/history/${id}`);
|
||||
|
|
|
|||
|
|
@ -37,9 +37,17 @@ const filter = ref<string>("");
|
|||
const filterMain = ref<string>("");
|
||||
const splitterModel = ref<number>(60);
|
||||
const modal = ref<boolean>(false);
|
||||
const totalList = ref<number>(0); //จำนวนข้อมูลรายการ
|
||||
const totalPage = ref<number>(1);
|
||||
|
||||
const statusOpt = ref<DataOption[]>([
|
||||
{ id: "ONGOING", name: "กำลังดำเนินการ" },
|
||||
{ id: "FINISH", name: "เสร็จสิ้นโครงการ" },
|
||||
]);
|
||||
|
||||
/** หัวตาราง */
|
||||
const rows = ref<ResListProject[]>([]); // ข้อมูลรายการ
|
||||
const visibleColumns = ref<string[]>(["year", "projectName", "root"]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "year",
|
||||
|
|
@ -71,13 +79,8 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px ; width:45% ",
|
||||
},
|
||||
]);
|
||||
const visibleColumns = ref<string[]>(["year", "projectName", "root"]);
|
||||
|
||||
const statusOpt = ref<DataOption[]>([
|
||||
{ id: "ONGOING", name: "กำลังดำเนินการ" },
|
||||
{ id: "FINISH", name: "เสร็จสิ้นโครงการ" },
|
||||
]);
|
||||
|
||||
/** formProject */
|
||||
const formProject = reactive<FormProject>({
|
||||
year: null,
|
||||
projectName: "",
|
||||
|
|
@ -86,7 +89,7 @@ const formProject = reactive<FormProject>({
|
|||
orgRevisionId: null,
|
||||
});
|
||||
|
||||
/** formQuery*/
|
||||
/** formQuery */
|
||||
const formQuery = reactive<FormQueryListProject>({
|
||||
year: new Date().getFullYear(),
|
||||
page: 1,
|
||||
|
|
@ -98,9 +101,6 @@ const formQuery = reactive<FormQueryListProject>({
|
|||
nodeId: null,
|
||||
});
|
||||
|
||||
const totalList = ref<number>(0); //จำนวนข้อมูลรายการ
|
||||
const totalPage = ref<number>(1);
|
||||
|
||||
/** funciton fetch รายการโครงการ*/
|
||||
function fetchListProject() {
|
||||
showLoader();
|
||||
|
|
@ -262,6 +262,7 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
/** ดึงข้อมูลเมื่อโหลดหน้าเสร็จสิ้น */
|
||||
onMounted(() => {
|
||||
fetchActive();
|
||||
fetchListProject();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue