ปรับ format code + comment + เช็ค paging เมนูพัฒนาบุคลากร
This commit is contained in:
parent
c2a1648d70
commit
fb2b9b4c30
8 changed files with 35 additions and 40 deletions
|
|
@ -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