Merge branch 'develop' into work
# Conflicts: # src/modules/01_metadata/store.ts
This commit is contained in:
commit
8576f3c387
42 changed files with 3621 additions and 1014 deletions
|
|
@ -2,129 +2,130 @@
|
||||||
* api ระบบจัดการข้อมูลหลัก
|
* api ระบบจัดการข้อมูลหลัก
|
||||||
* เมนูย่อย: ข้อมูลโครงสร้างหน่วยงาน
|
* เมนูย่อย: ข้อมูลโครงสร้างหน่วยงาน
|
||||||
*/
|
*/
|
||||||
import env from "../index"
|
import env from "../index";
|
||||||
const organization = `${env.API_URI}/metadata/organization/`
|
const organization = `${env.API_URI}/metadata/organization/`;
|
||||||
const organizationOrganization = `${env.API_URI}/metadata/organization-organization/`
|
const organizationOrganization = `${env.API_URI}/metadata/organization-organization/`;
|
||||||
const organizationShortName = `${env.API_URI}/metadata/organization-shortname/`
|
const organizationShortName = `${env.API_URI}/metadata/organization-shortname/`;
|
||||||
const organizationCode = `${env.API_URI_ORG_SERVICE}/PositionMaster/`
|
const organizationCode = `${env.API_URI_ORG_SERVICE}/PositionMaster/`;
|
||||||
const organizationType = `${env.API_URI}/metadata/organization-type/`
|
const organizationType = `${env.API_URI}/metadata/organization-type/`;
|
||||||
const organizationLevel = `${env.API_URI}/metadata/organization-level/`
|
const organizationLevel = `${env.API_URI}/metadata/organization-level/`;
|
||||||
const organizationStatus = `${env.API_URI}/metadata/organization-status/`
|
const organizationStatus = `${env.API_URI}/metadata/organization-status/`;
|
||||||
const organizationAgency = `${env.API_URI}/metadata/organization-agency/`
|
const organizationAgency = `${env.API_URI}/metadata/organization-agency/`;
|
||||||
const organizationGovernmentAgency = `${env.API_URI}/metadata/organization-government-agency/`
|
const organizationGovernmentAgency = `${env.API_URI}/metadata/organization-government-agency/`;
|
||||||
const organizationTelExternal = `${env.API_URI}/metadata/organization-tel-external/`
|
const organizationTelExternal = `${env.API_URI}/metadata/organization-tel-external/`;
|
||||||
const organizationTelInternal = `${env.API_URI}/metadata/organization-tel-internal/`
|
const organizationTelInternal = `${env.API_URI}/metadata/organization-tel-internal/`;
|
||||||
const organizationFax = `${env.API_URI}/metadata/organization-fax/`
|
const organizationFax = `${env.API_URI}/metadata/organization-fax/`;
|
||||||
const dashbord = `${env.API_URI}/metadata/dashbord/`
|
const dashbord = `${env.API_URI}/metadata/dashbord/`;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
/**
|
/**
|
||||||
* api จำนวนข้อมูลใน ระบบจัดการข้อมูลหลัก tab ย่อยแต่ละ tab
|
* api จำนวนข้อมูลใน ระบบจัดการข้อมูลหลัก tab ย่อยแต่ละ tab
|
||||||
*/
|
*/
|
||||||
organization,
|
organization,
|
||||||
countDashbordSubHistory: (type: number) => `${dashbord}${type}`,
|
countDashbordSubHistory: (type: number) => `${dashbord}${type}`,
|
||||||
countDashbordHistory: `${dashbord}`,
|
countDashbordHistory: `${dashbord}`,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* api หน่วยงาน
|
* api หน่วยงาน
|
||||||
*/
|
*/
|
||||||
listOrganizationOrganizationHistory: `${organizationOrganization}history`,
|
organizationOrganization,
|
||||||
listOrganizationOrganizationHistoryId: (id: string) =>
|
listOrganizationOrganizationHistory: `${organizationOrganization}history`,
|
||||||
`${organizationOrganization}history/${id}`,
|
listOrganizationOrganizationHistoryId: (id: string) =>
|
||||||
listOrganizationOrganizationPublished: `${organizationOrganization}history/published`,
|
`${organizationOrganization}history/${id}`,
|
||||||
listOrganizationOrganizationPublishedHistory: `${organizationOrganization}history/published-history`,
|
listOrganizationOrganizationPublished: `${organizationOrganization}history/published`,
|
||||||
|
listOrganizationOrganizationPublishedHistory: `${organizationOrganization}history/published-history`,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* api ชื่อย่อหน่วยงาน
|
* api ชื่อย่อหน่วยงาน
|
||||||
*/
|
*/
|
||||||
organizationShortName,
|
organizationShortName,
|
||||||
listOrganizationShortNameHistory: `${organizationShortName}history`,
|
listOrganizationShortNameHistory: `${organizationShortName}history`,
|
||||||
listOrganizationShortNameHistoryId: (id: string) =>
|
listOrganizationShortNameHistoryId: (id: string) =>
|
||||||
`${organizationShortName}history/${id}`,
|
`${organizationShortName}history/${id}`,
|
||||||
listOrganizationShortNamePublished: `${organizationShortName}history/published`,
|
listOrganizationShortNamePublished: `${organizationShortName}history/published`,
|
||||||
listOrganizationShortNamePublishedHistory: `${organizationShortName}history/published-history`,
|
listOrganizationShortNamePublishedHistory: `${organizationShortName}history/published-history`,
|
||||||
organizationCode: `${organizationCode}organization-code`,
|
organizationCode: `${organizationCode}organization-code`,
|
||||||
organizationGovernmentCode: (id: string) =>
|
organizationGovernmentCode: (id: string) =>
|
||||||
`${organizationCode}government/${id}`,
|
`${organizationCode}government/${id}`,
|
||||||
organizationAgencyCode: (id: string) => `${organizationCode}agency/${id}`,
|
organizationAgencyCode: (id: string) => `${organizationCode}agency/${id}`,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* api ประเภท
|
* api ประเภท
|
||||||
*/
|
*/
|
||||||
organizationType,
|
organizationType,
|
||||||
listOrganizationTypeHistory: `${organizationType}history`,
|
listOrganizationTypeHistory: `${organizationType}history`,
|
||||||
listOrganizationTypeHistoryId: (id: string) =>
|
listOrganizationTypeHistoryId: (id: string) =>
|
||||||
`${organizationType}history/${id}`,
|
`${organizationType}history/${id}`,
|
||||||
listOrganizationTypePublished: `${organizationType}history/published`,
|
listOrganizationTypePublished: `${organizationType}history/published`,
|
||||||
listOrganizationTypePublishedHistory: `${organizationType}history/published-history`,
|
listOrganizationTypePublishedHistory: `${organizationType}history/published-history`,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* api ระดับ
|
* api ระดับ
|
||||||
*/
|
*/
|
||||||
organizationLevel,
|
organizationLevel,
|
||||||
listOrganizationLevelHistory: `${organizationLevel}history`,
|
listOrganizationLevelHistory: `${organizationLevel}history`,
|
||||||
listOrganizationLevelHistoryId: (id: string) =>
|
listOrganizationLevelHistoryId: (id: string) =>
|
||||||
`${organizationLevel}history/${id}`,
|
`${organizationLevel}history/${id}`,
|
||||||
listOrganizationLevelPublished: `${organizationLevel}history/published`,
|
listOrganizationLevelPublished: `${organizationLevel}history/published`,
|
||||||
listOrganizationLevelPublishedHistory: `${organizationLevel}history/published-history`,
|
listOrganizationLevelPublishedHistory: `${organizationLevel}history/published-history`,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* api สถานะ
|
* api สถานะ
|
||||||
*/
|
*/
|
||||||
organizationStatus,
|
organizationStatus,
|
||||||
listOrganizationStatusHistory: `${organizationStatus}history`,
|
listOrganizationStatusHistory: `${organizationStatus}history`,
|
||||||
listOrganizationStatusHistoryId: (id: string) =>
|
listOrganizationStatusHistoryId: (id: string) =>
|
||||||
`${organizationStatus}history/${id}`,
|
`${organizationStatus}history/${id}`,
|
||||||
listOrganizationStatusPublished: `${organizationStatus}history/published`,
|
listOrganizationStatusPublished: `${organizationStatus}history/published`,
|
||||||
listOrganizationStatusPublishedHistory: `${organizationStatus}history/published-history`,
|
listOrganizationStatusPublishedHistory: `${organizationStatus}history/published-history`,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* api หน่วยงานต้นสังกัด
|
* api หน่วยงานต้นสังกัด
|
||||||
*/
|
*/
|
||||||
organizationAgency,
|
organizationAgency,
|
||||||
listOrganizationAgencyHistory: `${organizationAgency}history`,
|
listOrganizationAgencyHistory: `${organizationAgency}history`,
|
||||||
listOrganizationAgencyHistoryId: (id: string) =>
|
listOrganizationAgencyHistoryId: (id: string) =>
|
||||||
`${organizationAgency}history/${id}`,
|
`${organizationAgency}history/${id}`,
|
||||||
listOrganizationAgencyPublished: `${organizationAgency}history/published`,
|
listOrganizationAgencyPublished: `${organizationAgency}history/published`,
|
||||||
listOrganizationAgencyPublishedHistory: `${organizationAgency}history/published-history`,
|
listOrganizationAgencyPublishedHistory: `${organizationAgency}history/published-history`,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* api ส่วนราชการต้นสังกัด
|
* api ส่วนราชการต้นสังกัด
|
||||||
*/
|
*/
|
||||||
organizationGovernmentAgency,
|
organizationGovernmentAgency,
|
||||||
listOrganizationGovernmentAgencyHistory: `${organizationGovernmentAgency}history`,
|
listOrganizationGovernmentAgencyHistory: `${organizationGovernmentAgency}history`,
|
||||||
listOrganizationGovernmentAgencyHistoryId: (id: string) =>
|
listOrganizationGovernmentAgencyHistoryId: (id: string) =>
|
||||||
`${organizationGovernmentAgency}history/${id}`,
|
`${organizationGovernmentAgency}history/${id}`,
|
||||||
listOrganizationGovernmentAgencyPublished: `${organizationGovernmentAgency}history/published`,
|
listOrganizationGovernmentAgencyPublished: `${organizationGovernmentAgency}history/published`,
|
||||||
listOrganizationGovernmentAgencyPublishedHistory: `${organizationGovernmentAgency}history/published-history`,
|
listOrganizationGovernmentAgencyPublishedHistory: `${organizationGovernmentAgency}history/published-history`,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* api เบอร์ติดต่อภายนอก
|
* api เบอร์ติดต่อภายนอก
|
||||||
*/
|
*/
|
||||||
organizationTelExternal,
|
organizationTelExternal,
|
||||||
listOrganizationTelExternalHistory: `${organizationTelExternal}history`,
|
listOrganizationTelExternalHistory: `${organizationTelExternal}history`,
|
||||||
listOrganizationTelExternalHistoryId: (id: string) =>
|
listOrganizationTelExternalHistoryId: (id: string) =>
|
||||||
`${organizationTelExternal}history/${id}`,
|
`${organizationTelExternal}history/${id}`,
|
||||||
listOrganizationTelExternalPublished: `${organizationTelExternal}history/published`,
|
listOrganizationTelExternalPublished: `${organizationTelExternal}history/published`,
|
||||||
listOrganizationTelExternalPublishedHistory: `${organizationTelExternal}history/published-history`,
|
listOrganizationTelExternalPublishedHistory: `${organizationTelExternal}history/published-history`,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* api เบอร์ติดต่อภายใน
|
* api เบอร์ติดต่อภายใน
|
||||||
*/
|
*/
|
||||||
organizationTelInternal,
|
organizationTelInternal,
|
||||||
listOrganizationTelInternalHistory: `${organizationTelInternal}history`,
|
listOrganizationTelInternalHistory: `${organizationTelInternal}history`,
|
||||||
listOrganizationTelInternalHistoryId: (id: string) =>
|
listOrganizationTelInternalHistoryId: (id: string) =>
|
||||||
`${organizationTelInternal}history/${id}`,
|
`${organizationTelInternal}history/${id}`,
|
||||||
listOrganizationTelInternalPublished: `${organizationTelInternal}history/published`,
|
listOrganizationTelInternalPublished: `${organizationTelInternal}history/published`,
|
||||||
listOrganizationTelInternalPublishedHistory: `${organizationTelInternal}history/published-history`,
|
listOrganizationTelInternalPublishedHistory: `${organizationTelInternal}history/published-history`,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* api เบอร์โทรสาร
|
* api เบอร์โทรสาร
|
||||||
*/
|
*/
|
||||||
organizationFax,
|
organizationFax,
|
||||||
listOrganizationFaxHistory: `${organizationFax}history`,
|
listOrganizationFaxHistory: `${organizationFax}history`,
|
||||||
listOrganizationFaxHistoryId: (id: string) =>
|
listOrganizationFaxHistoryId: (id: string) =>
|
||||||
`${organizationFax}history/${id}`,
|
`${organizationFax}history/${id}`,
|
||||||
listOrganizationFaxPublished: `${organizationFax}history/published`,
|
listOrganizationFaxPublished: `${organizationFax}history/published`,
|
||||||
listOrganizationFaxPublishedHistory: `${organizationFax}history/published-history`,
|
listOrganizationFaxPublishedHistory: `${organizationFax}history/published-history`,
|
||||||
}
|
};
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ export default {
|
||||||
/**
|
/**
|
||||||
* api เขต
|
* api เขต
|
||||||
*/
|
*/
|
||||||
|
district,
|
||||||
listDistrict: (id: string) => `${district}${id}`,
|
listDistrict: (id: string) => `${district}${id}`,
|
||||||
listDistrictHistory: `${district}history`,
|
listDistrictHistory: `${district}history`,
|
||||||
listDistrictHistoryId: (id: string | string[]) => `${district}history/${id}`,
|
listDistrictHistoryId: (id: string | string[]) => `${district}history/${id}`,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<q-dialog :model-value="modal" persistent>
|
<q-dialog :model-value="modal" persistent>
|
||||||
<q-card style="min-width: 70vw;">
|
<q-card style="min-width: 70vw">
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<div class="row items-center q-pa-sm">
|
<div class="row items-center q-pa-sm">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
@ -89,8 +89,7 @@
|
||||||
:virtual-scroll-sticky-size-start="48"
|
:virtual-scroll-sticky-size-start="48"
|
||||||
dense
|
dense
|
||||||
:pagination-label="paginationLabel"
|
:pagination-label="paginationLabel"
|
||||||
:pagination="initialPagination"
|
v-model:pagination="pagination"
|
||||||
:rows-per-page-options="[0]"
|
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
|
@ -104,6 +103,17 @@
|
||||||
<template #body="props">
|
<template #body="props">
|
||||||
<slot v-bind="props" name="columns"></slot>
|
<slot v-bind="props" name="columns"></slot>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-slot:pagination="scope">
|
||||||
|
<q-pagination
|
||||||
|
v-model="pagination.page"
|
||||||
|
color="grey-8"
|
||||||
|
:max="scope.pagesNumber"
|
||||||
|
:max-pages="5"
|
||||||
|
size="sm"
|
||||||
|
boundary-links
|
||||||
|
direction-links
|
||||||
|
></q-pagination>
|
||||||
|
</template>
|
||||||
</q-table>
|
</q-table>
|
||||||
</div>
|
</div>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
@ -112,9 +122,10 @@
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, useAttrs } from "vue";
|
import { ref, useAttrs, computed } from "vue";
|
||||||
import type { Pagination } from "@/modules/01_metadata/interface/index/Main";
|
import type { Pagination } from "@/modules/01_metadata/interface/index/Main";
|
||||||
|
|
||||||
|
const rows = ref<any>([]);
|
||||||
const attrs = ref<any>(useAttrs());
|
const attrs = ref<any>(useAttrs());
|
||||||
const filterRef = ref<any>(null);
|
const filterRef = ref<any>(null);
|
||||||
// const history = ref<string>("");
|
// const history = ref<string>("");
|
||||||
|
|
@ -123,6 +134,17 @@ const initialPagination = ref<Pagination>({
|
||||||
rowsPerPage: 0,
|
rowsPerPage: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const pagination = ref({
|
||||||
|
sortBy: "desc",
|
||||||
|
descending: false,
|
||||||
|
page: 1,
|
||||||
|
rowsPerPage: 10,
|
||||||
|
});
|
||||||
|
|
||||||
|
const pagesNumber = computed(() => {
|
||||||
|
return Math.ceil(rows.value.length / pagination.value.rowsPerPage);
|
||||||
|
});
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
tittle: String,
|
tittle: String,
|
||||||
inputfilter: String,
|
inputfilter: String,
|
||||||
|
|
|
||||||
|
|
@ -277,5 +277,38 @@ const tabList = readonly<tabType[]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
export { menuList, tabList };
|
const tabList_placement = readonly<tabType[]>([
|
||||||
|
{
|
||||||
|
key: 1,
|
||||||
|
label: "ข้อมูลทั่วไป",
|
||||||
|
tag: "information",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 2,
|
||||||
|
label: "ประวัติการศึกษา",
|
||||||
|
tag: "education",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 3,
|
||||||
|
label: "ใบอนุญาตประกอบอาชีพ",
|
||||||
|
tag: "certicate",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 4,
|
||||||
|
label: "เครื่องราชอิสริยาภรณ์",
|
||||||
|
tag: "insignia",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 5,
|
||||||
|
label: "ผลการสอบ",
|
||||||
|
tag: "examresult",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 6,
|
||||||
|
label: "การคัดกรองคุณสมบัติ",
|
||||||
|
tag: "qualification",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
export { menuList, tabList ,tabList_placement };
|
||||||
export type { ScrollType, tabType, menuType, notiType, optionType };
|
export type { ScrollType, tabType, menuType, notiType, optionType };
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const {
|
||||||
|
manageData,
|
||||||
|
changeManageColumns,
|
||||||
|
getOrganizationFax,
|
||||||
|
dataOrganizationFax,
|
||||||
|
} = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -363,37 +368,42 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getOrganizationFax(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listOrganizationFaxHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listOrganizationFaxHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
})
|
// createdFullName: e.createdFullName,
|
||||||
.catch((e) => {
|
// createdUserId: e.createdUserId,
|
||||||
messageError($q, e);
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const {
|
||||||
|
manageData,
|
||||||
|
changeManageColumns,
|
||||||
|
getOrganizationLevel,
|
||||||
|
dataOrganizationLevel,
|
||||||
|
} = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -363,37 +368,42 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getOrganizationLevel(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listOrganizationLevelHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listOrganizationLevelHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
})
|
// createdFullName: e.createdFullName,
|
||||||
.catch((e) => {
|
// createdUserId: e.createdUserId,
|
||||||
messageError($q, e);
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,8 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const { manageData, changeManageColumns, getOrganization, dataOrganization } =
|
||||||
|
store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -399,38 +400,43 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getOrganization(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listOrganizationOrganizationHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listOrganizationOrganizationHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
note: e.note,
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
});
|
// createdFullName: e.createdFullName,
|
||||||
})
|
// createdUserId: e.createdUserId,
|
||||||
.catch((e) => {
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
messageError($q, e);
|
// note: e.note,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -257,7 +257,12 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const {
|
||||||
|
manageData,
|
||||||
|
changeManageColumns,
|
||||||
|
getOrganizationShortName,
|
||||||
|
dataOrganizationShortName,
|
||||||
|
} = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -488,40 +493,45 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getOrganizationShortName(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listOrganizationShortNameHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listOrganizationShortNameHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
agencyCode: e.agencyCode,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
governmentCode: e.governmentCode,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
name: e.name,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
createdAt: e.createdAt,
|
// rows.value.push({
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// id: e.id,
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// agencyCode: e.agencyCode,
|
||||||
isActive: e.isActive,
|
// governmentCode: e.governmentCode,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
note: e.note,
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
});
|
// createdFullName: e.createdFullName,
|
||||||
})
|
// createdUserId: e.createdUserId,
|
||||||
.catch((e) => {
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
messageError($q, e);
|
// note: e.note,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const {
|
||||||
|
manageData,
|
||||||
|
changeManageColumns,
|
||||||
|
getOrganizationStatus,
|
||||||
|
dataOrganizationStatus,
|
||||||
|
} = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -363,37 +368,42 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getOrganizationStatus(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listOrganizationStatusHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listOrganizationStatusHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
})
|
// createdFullName: e.createdFullName,
|
||||||
.catch((e) => {
|
// createdUserId: e.createdUserId,
|
||||||
messageError($q, e);
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const {
|
||||||
|
manageData,
|
||||||
|
changeManageColumns,
|
||||||
|
getOrganizationTelExternal,
|
||||||
|
dataOrganizationTelExternal,
|
||||||
|
} = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -363,37 +368,42 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getOrganizationTelExternal(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listOrganizationTelExternalHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listOrganizationTelExternalHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
})
|
// createdFullName: e.createdFullName,
|
||||||
.catch((e) => {
|
// createdUserId: e.createdUserId,
|
||||||
messageError($q, e);
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const {
|
||||||
|
manageData,
|
||||||
|
changeManageColumns,
|
||||||
|
getOrganizationTelInternal,
|
||||||
|
dataOrganizationTelInternal,
|
||||||
|
} = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -363,37 +368,42 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getOrganizationTelInternal(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listOrganizationTelInternalHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listOrganizationTelInternalHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
})
|
// createdFullName: e.createdFullName,
|
||||||
.catch((e) => {
|
// createdUserId: e.createdUserId,
|
||||||
messageError($q, e);
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const {
|
||||||
|
manageData,
|
||||||
|
changeManageColumns,
|
||||||
|
getOrganizationType,
|
||||||
|
dataOrganizationType,
|
||||||
|
} = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -363,37 +368,42 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getOrganizationType(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listOrganizationTypeHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listOrganizationTypeHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
})
|
// createdFullName: e.createdFullName,
|
||||||
.catch((e) => {
|
// createdUserId: e.createdUserId,
|
||||||
messageError($q, e);
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,7 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const { manageData, changeManageColumns, getBlood, dataBlood } = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -367,37 +367,42 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getBlood(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listBloodGroupHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listBloodGroupHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
})
|
// createdFullName: e.createdFullName,
|
||||||
.catch((e) => {
|
// createdUserId: e.createdUserId,
|
||||||
messageError($q, e);
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const { manageData, changeManageColumns, getEducation, dataEducation } = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -364,37 +364,42 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getEducation(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listEducationLevelHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listEducationLevelHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
})
|
// createdFullName: e.createdFullName,
|
||||||
.catch((e) => {
|
// createdUserId: e.createdUserId,
|
||||||
messageError($q, e);
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const { manageData, changeManageColumns, getGender, dataGenders } = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -364,37 +364,42 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getGender(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listGenderHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listGenderHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
})
|
// createdFullName: e.createdFullName,
|
||||||
.catch((e) => {
|
// createdUserId: e.createdUserId,
|
||||||
messageError($q, e);
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -210,8 +210,6 @@ const {
|
||||||
changeManageColumns,
|
changeManageColumns,
|
||||||
getPrefix,
|
getPrefix,
|
||||||
dataPrefix,
|
dataPrefix,
|
||||||
storeIdVersion,
|
|
||||||
storeVersion,
|
|
||||||
} = store;
|
} = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>(dataPrefix); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>(dataPrefix); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ const { loaderPage } = dataStore; //ขึ้นหน้า load ขณะเ
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const { manageData, changeManageColumns, getProvince, dataProvince } = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -376,37 +376,42 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getProvince(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listProvinceHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listProvinceHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
})
|
// createdFullName: e.createdFullName,
|
||||||
.catch((e) => {
|
// createdUserId: e.createdUserId,
|
||||||
messageError($q, e);
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,8 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const { manageData, changeManageColumns, getRelationship, dataRelationship } =
|
||||||
|
store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -364,37 +365,42 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getRelationship(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listRelationshipHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listRelationshipHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
})
|
// createdFullName: e.createdFullName,
|
||||||
.catch((e) => {
|
// createdUserId: e.createdUserId,
|
||||||
messageError($q, e);
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const { manageData, changeManageColumns, getReligion, dataReligion } = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -364,37 +364,42 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getReligion(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listReligionHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listReligionHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
})
|
// createdFullName: e.createdFullName,
|
||||||
.catch((e) => {
|
// createdUserId: e.createdUserId,
|
||||||
messageError($q, e);
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,12 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const {
|
||||||
|
manageData,
|
||||||
|
changeManageColumns,
|
||||||
|
getPositionExecutive,
|
||||||
|
dataPositionExecutive,
|
||||||
|
} = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -364,37 +369,42 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getPositionExecutive(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listPositionExecutiveHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listPositionExecutiveHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
})
|
// createdFullName: e.createdFullName,
|
||||||
.catch((e) => {
|
// createdUserId: e.createdUserId,
|
||||||
messageError($q, e);
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,12 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const {
|
||||||
|
manageData,
|
||||||
|
changeManageColumns,
|
||||||
|
getPositionExecutiveSide,
|
||||||
|
dataPositionExecutiveSide,
|
||||||
|
} = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -400,38 +405,43 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getPositionExecutiveSide(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listPositionExecutiveSideHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listPositionExecutiveSideHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
note: e.note,
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
});
|
// createdFullName: e.createdFullName,
|
||||||
})
|
// createdUserId: e.createdUserId,
|
||||||
.catch((e) => {
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
messageError($q, e);
|
// note: e.note,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -268,7 +268,8 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const { manageData, changeManageColumns, getPositionLevel, dataPositionLevel } =
|
||||||
|
store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -475,45 +476,50 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getPositionLevel(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listPositionLevelHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listPositionLevelHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
level: e.level,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
name: e.name,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
shortName: e.shortName,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
createdAt: e.createdAt,
|
// rows.value.push({
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// id: e.id,
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// level: e.level,
|
||||||
isActive: e.isActive,
|
// name: e.name,
|
||||||
createdFullName: e.createdFullName,
|
// shortName: e.shortName,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
rows.value.sort(
|
// createdFullName: e.createdFullName,
|
||||||
(
|
// createdUserId: e.createdUserId,
|
||||||
firstItem: RequestItemsHistoryObject,
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
secondItem: RequestItemsHistoryObject
|
// });
|
||||||
) => firstItem.level - secondItem.level
|
// });
|
||||||
);
|
// rows.value.sort(
|
||||||
})
|
// (
|
||||||
.catch((e) => {
|
// firstItem: RequestItemsHistoryObject,
|
||||||
messageError($q, e);
|
// secondItem: RequestItemsHistoryObject
|
||||||
})
|
// ) => firstItem.level - secondItem.level
|
||||||
.finally(() => {
|
// );
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,8 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const { manageData, changeManageColumns, getPositionLine, dataPositionLine } =
|
||||||
|
store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -364,37 +365,42 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getPositionLine(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listPositionLineHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listPositionLineHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
})
|
// createdFullName: e.createdFullName,
|
||||||
.catch((e) => {
|
// createdUserId: e.createdUserId,
|
||||||
messageError($q, e);
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,12 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const {
|
||||||
|
manageData,
|
||||||
|
changeManageColumns,
|
||||||
|
getPositionPathSide,
|
||||||
|
dataPositionPathSide,
|
||||||
|
} = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -400,38 +405,43 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getPositionPathSide(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listPositionSideHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listPositionSideHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
note: e.note,
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
});
|
// createdFullName: e.createdFullName,
|
||||||
})
|
// createdUserId: e.createdUserId,
|
||||||
.catch((e) => {
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
messageError($q, e);
|
// note: e.note,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,12 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const {
|
||||||
|
manageData,
|
||||||
|
changeManageColumns,
|
||||||
|
getPositionStatus,
|
||||||
|
dataPositionStatus,
|
||||||
|
} = store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -364,37 +369,42 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getPositionStatus(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listPositionStatusHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listPositionStatusHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
})
|
// createdFullName: e.createdFullName,
|
||||||
.catch((e) => {
|
// createdUserId: e.createdUserId,
|
||||||
messageError($q, e);
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,8 @@ const { loaderPage } = dataStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const { manageData, changeManageColumns } = store;
|
const { manageData, changeManageColumns, getPositionType, dataPositionType } =
|
||||||
|
store;
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
@ -364,37 +365,42 @@ const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async (load: boolean = false) => {
|
||||||
await props.fetchDataComponent();
|
await props.fetchDataComponent();
|
||||||
rows.value.splice(0);
|
const result = await getPositionType(false, load);
|
||||||
showLoader();
|
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
await http
|
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||||
.get(config.API.listPositionTypeHistory)
|
rows.value = result.data;
|
||||||
.then((res) => {
|
updateData.value = false;
|
||||||
let data = res.data.result;
|
// rows.value.splice(0);
|
||||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
// showLoader();
|
||||||
idVersion.value = data.id; //เลข id ใน mongodb
|
// await http
|
||||||
data.items.map((e: RequestItemsHistoryObject) => {
|
// .get(config.API.listPositionTypeHistory)
|
||||||
rows.value.push({
|
// .then((res) => {
|
||||||
id: e.id,
|
// let data = res.data.result;
|
||||||
name: e.name,
|
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||||
createdAt: e.createdAt,
|
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||||
lastUpdatedAt: e.lastUpdatedAt,
|
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||||
lastUpdateFullName: e.lastUpdateFullName,
|
// rows.value.push({
|
||||||
isActive: e.isActive,
|
// id: e.id,
|
||||||
createdFullName: e.createdFullName,
|
// name: e.name,
|
||||||
createdUserId: e.createdUserId,
|
// createdAt: e.createdAt,
|
||||||
lastUpdateUserId: e.lastUpdateUserId,
|
// lastUpdatedAt: e.lastUpdatedAt,
|
||||||
});
|
// lastUpdateFullName: e.lastUpdateFullName,
|
||||||
});
|
// isActive: e.isActive,
|
||||||
})
|
// createdFullName: e.createdFullName,
|
||||||
.catch((e) => {
|
// createdUserId: e.createdUserId,
|
||||||
messageError($q, e);
|
// lastUpdateUserId: e.lastUpdateUserId,
|
||||||
})
|
// });
|
||||||
.finally(() => {
|
// });
|
||||||
updateData.value = false;
|
// })
|
||||||
hideLoader();
|
// .catch((e) => {
|
||||||
});
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// updateData.value = false;
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -60,9 +60,9 @@ import Occupation from "@/modules/03_recruiting/components/Occupation.vue";
|
||||||
import Education from "@/modules/03_recruiting/components/Education.vue";
|
import Education from "@/modules/03_recruiting/components/Education.vue";
|
||||||
import Career from "@/modules/03_recruiting/components/Career.vue";
|
import Career from "@/modules/03_recruiting/components/Career.vue";
|
||||||
import Document from "@/modules/03_recruiting/components/Document.vue";
|
import Document from "@/modules/03_recruiting/components/Document.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useManageDataStore } from "@/modules/01_metadata/store";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
status: {
|
status: {
|
||||||
|
|
@ -88,8 +88,9 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
const store = useManageDataStore();
|
||||||
|
const { getPrefix } = store;
|
||||||
const prefixOptions = ref<DataOption[]>([]);
|
const prefixOptions = ref<DataOption[]>([]);
|
||||||
const relationshipOptions = ref<DataOption[]>([]);
|
const relationshipOptions = ref<DataOption[]>([]);
|
||||||
const provinceOptions = ref<DataOption[]>([]);
|
const provinceOptions = ref<DataOption[]>([]);
|
||||||
|
|
@ -131,23 +132,15 @@ onMounted(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchPrefix = async () => {
|
const fetchPrefix = async () => {
|
||||||
showLoader();
|
const result = await getPrefix(true, false);
|
||||||
await http
|
const data = result.data;
|
||||||
.get(config.API.prefix)
|
let option: DataOption[] = [];
|
||||||
.then((res) => {
|
if (data.length > 0) {
|
||||||
const data = res.data.result;
|
data.map((r: any) => {
|
||||||
let option: DataOption[] = [];
|
option.push({ id: r.id.toString(), name: r.name.toString() });
|
||||||
data.map((r: any) => {
|
|
||||||
option.push({ id: r.id.toString(), name: r.name.toString() });
|
|
||||||
});
|
|
||||||
prefixOptions.value = option;
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
prefixOptions.value = option;
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchRelationship = async () => {
|
const fetchRelationship = async () => {
|
||||||
|
|
|
||||||
|
|
@ -774,6 +774,7 @@ import type {
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
|
import { useManageDataStore } from "@/modules/01_metadata/store";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
statusEdit: {
|
statusEdit: {
|
||||||
|
|
@ -789,8 +790,8 @@ const emit = defineEmits(["update:statusEdit"]);
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataStore = useDataStore();
|
const store = useManageDataStore();
|
||||||
const { loaderPage } = dataStore;
|
const { getPrefix } = store;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, messageError, showLoader, hideLoader } = mixin;
|
const { date2Thai, success, messageError, showLoader, hideLoader } = mixin;
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
|
|
@ -857,24 +858,34 @@ const refreshData = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchPrefix = async () => {
|
const fetchPrefix = async () => {
|
||||||
showLoader();
|
const result = await getPrefix(true, false);
|
||||||
await http
|
const data = result.data;
|
||||||
.get(config.API.prefix)
|
let option: DataOption[] = [];
|
||||||
.then((res) => {
|
if (data.length > 0) {
|
||||||
const data = res.data.result;
|
data.map((r: any) => {
|
||||||
let option: DataOption[] = [];
|
option.push({ id: r.id.toString(), name: r.name.toString() });
|
||||||
data.map((r: any) => {
|
|
||||||
option.push({ id: r.id.toString(), name: r.name.toString() });
|
|
||||||
});
|
|
||||||
Ops.value.prefixOps = option;
|
|
||||||
OpsFilter.value.prefixOps = option;
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
Ops.value.prefixOps = option;
|
||||||
|
OpsFilter.value.prefixOps = option;
|
||||||
|
// showLoader();
|
||||||
|
// await http
|
||||||
|
// .get(config.API.prefix)
|
||||||
|
// .then((res) => {
|
||||||
|
// const data = res.data.result;
|
||||||
|
// let option: DataOption[] = [];
|
||||||
|
// data.map((r: any) => {
|
||||||
|
// option.push({ id: r.id.toString(), name: r.name.toString() });
|
||||||
|
// });
|
||||||
|
// Ops.value.prefixOps = option;
|
||||||
|
// OpsFilter.value.prefixOps = option;
|
||||||
|
// })
|
||||||
|
// .catch((e) => {
|
||||||
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
const addChildren = async () => {
|
const addChildren = async () => {
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ import Informationvue from "@/modules/05_placement/components/exams_other/Inform
|
||||||
import EducationVue from "@/modules/05_placement/components/exams_other/Education.vue";
|
import EducationVue from "@/modules/05_placement/components/exams_other/Education.vue";
|
||||||
import Certicate from "@/modules/05_placement/components/exams_other/Information/Certicate.vue";
|
import Certicate from "@/modules/05_placement/components/exams_other/Information/Certicate.vue";
|
||||||
import InsigniaVue from "@/modules/05_placement/components/exams_other/Insignia.vue";
|
import InsigniaVue from "@/modules/05_placement/components/exams_other/Insignia.vue";
|
||||||
|
import ExamResult from "@/modules/05_placement/components/exams_other/ExamResult.vue";
|
||||||
|
import Qualification from "@/modules/05_placement/components/exams_other/Qualification.vue";
|
||||||
|
|
||||||
const store = useDataStore();
|
const store = useDataStore();
|
||||||
const { changeTab } = store;
|
const { changeTab } = store;
|
||||||
|
|
@ -26,7 +28,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8 row">
|
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8 row q-pb-sm">
|
||||||
<div class="header-text">
|
<div class="header-text">
|
||||||
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm"
|
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm"
|
||||||
@click="router.go(-1)" />
|
@click="router.go(-1)" />
|
||||||
|
|
@ -34,19 +36,30 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<q-card flat bordered>
|
<q-card flat bordered class="q-px-lg q-pb-lg">
|
||||||
<div id="information" name="1" class="row col-12 information">
|
<div id="information" name="1" class="row col-12 information">
|
||||||
<Informationvue v-model:statusEdit="statusEdit" :profileType="profileType" />
|
<Informationvue v-model:statusEdit="statusEdit" :profileType="profileType" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="horizontal-line"></div>
|
||||||
<div id="education" name="2" class="row col-12 q-mt-md">
|
<div id="education" name="2" class="row col-12 q-mt-md">
|
||||||
<EducationVue v-model:statusEdit="statusEdit" />
|
<EducationVue v-model:statusEdit="statusEdit" />
|
||||||
</div>
|
</div>
|
||||||
<div id="certicate" name="15" class="row col-12 q-mt-md">
|
<div class="horizontal-line"></div>
|
||||||
|
<div id="certicate" name="4" class="row col-12 q-mt-md">
|
||||||
<Certicate v-model:statusEdit="statusEdit" :profileType="profileType" />
|
<Certicate v-model:statusEdit="statusEdit" :profileType="profileType" />
|
||||||
</div>
|
</div>
|
||||||
<div id="insignia" name="4" class="row col-12 q-mt-md">
|
<div class="horizontal-line"></div>
|
||||||
|
<div id="insignia" name="5" class="row col-12 q-mt-md">
|
||||||
<InsigniaVue v-model:statusEdit="statusEdit" />
|
<InsigniaVue v-model:statusEdit="statusEdit" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="horizontal-line"></div>
|
||||||
|
<div id="examresult" name="6" class="q-px-lg q-py-lg">
|
||||||
|
<ExamResult />
|
||||||
|
</div>
|
||||||
|
<div class="horizontal-line"></div>
|
||||||
|
<div id="qualification" name="7" class="q-px-lg q-py-lg">
|
||||||
|
<Qualification v-model:statusEdit="statusEdit" />
|
||||||
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -62,4 +75,9 @@ onMounted(async () => {
|
||||||
.information:target {
|
.information:target {
|
||||||
padding-top: 84px;
|
padding-top: 84px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.horizontal-line {
|
||||||
|
background-color: #F4F4F4;
|
||||||
|
height: 5px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -942,7 +942,7 @@ const getClass = (val: boolean) => {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-card flat bordered class="col-12 q-px-lg q-py-md">
|
<q-card flat bordered class="col-12 q-px-lg q-py-md no-border">
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<ProfileTable
|
<ProfileTable
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
|
|
@ -1378,4 +1378,9 @@ const getClass = (val: boolean) => {
|
||||||
.modalfix {
|
.modalfix {
|
||||||
position: fixed !important;
|
position: fixed !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-border {
|
||||||
|
border: none !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
101
src/modules/05_placement/components/exams_other/ExamResult.vue
Normal file
101
src/modules/05_placement/components/exams_other/ExamResult.vue
Normal file
|
|
@ -0,0 +1,101 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div class="row">
|
||||||
|
<q-icon name="mdi-briefcase-edit" size="1.5em" color="grey-5" class="q-pr-md" />
|
||||||
|
<span class="text-bold text-subtitle2 ">ผลการสอบ</span>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-7 q-pl-xl">
|
||||||
|
<q-card class="card-exam">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col q-pa-xs header-sub-text-exam">
|
||||||
|
<div class="q-pb-xs"> ประเภท </div>
|
||||||
|
<div class="q-pb-xs"> ภาค ก </div>
|
||||||
|
<div class="q-pb-xs"> ภาค ข </div>
|
||||||
|
<div class="q-pb-xs"> ภาค ค </div>
|
||||||
|
<div> รวมทั้งหมด </div>
|
||||||
|
</div>
|
||||||
|
<div class="col q-pa-xs">
|
||||||
|
<div class="header-sub-text-exam-2 q-pb-xs">คะแนนเต็ม</div>
|
||||||
|
<div class="sub-text-exam q-pb-xs">200</div>
|
||||||
|
<div class="sub-text-exam q-pb-xs">200</div>
|
||||||
|
<div class="sub-text-exam q-pb-xs">100</div>
|
||||||
|
<div class="sub-text-exam ">500</div>
|
||||||
|
</div>
|
||||||
|
<div class="col q-pa-xs header-sub-text-exam-2">
|
||||||
|
<div class="header-sub-text-exam-2 q-pb-xs">คะแนนที่ได้</div>
|
||||||
|
<div class="sub-text-exam q-pb-xs">133</div>
|
||||||
|
<div class="sub-text-exam q-pb-xs">149</div>
|
||||||
|
<div class="sub-text-exam q-pb-xs">100</div>
|
||||||
|
<div class="sub-text-exam q-pb-xs">382</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
<div class="col q-pl-xl">
|
||||||
|
<q-card class="q-pt-xs">
|
||||||
|
<div class="header-text-right">ผลการสอบ</div>
|
||||||
|
<div class="sub-text-right q-pb-xs">ผ่าน</div>
|
||||||
|
<div class="header-text-right">ลำดับที่สอบได้</div>
|
||||||
|
<div class="sub-text-right q-pb-xs">3</div>
|
||||||
|
<div class="header-text-right">จำนวนครั้งที่สมัครสอบ</div>
|
||||||
|
<div class="sub-text-right q-pb-xs">5</div>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.header-text {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #4F4F4F;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-text-right {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 150%;
|
||||||
|
color: #818181;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub-text-right {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 150%;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub-text {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 22px;
|
||||||
|
letter-spacing: 0.0025em;
|
||||||
|
color: #35373C;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-exam {
|
||||||
|
border-radius: 5px;
|
||||||
|
background: #FAFAFA;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-sub-text-exam {
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 150%;
|
||||||
|
color: #818181;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-sub-text-exam-2 {
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 150%;
|
||||||
|
color: #00AA86;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub-text-exam {
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -546,7 +546,7 @@ const getClass = (val: boolean) => {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-card flat class="col-12 q-px-lg q-py-md q-mt-md">
|
<q-card flat class="col-12 q-px-lg q-py-md q-mt-md no-border">
|
||||||
<HeaderTop
|
<HeaderTop
|
||||||
v-model:edit="edit"
|
v-model:edit="edit"
|
||||||
header="ข้อมูลที่อยู่"
|
header="ข้อมูลที่อยู่"
|
||||||
|
|
|
||||||
|
|
@ -565,7 +565,7 @@ const getClass = (val: boolean) => {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-card flat bordered class="col-12 q-px-lg q-py-md q-mt-md">
|
<q-card flat bordered class="col-12 q-px-lg q-py-md q-mt-md no-border">
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<ProfileTable
|
<ProfileTable
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
|
|
|
||||||
|
|
@ -611,7 +611,7 @@ const getClass = (val: boolean) => {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-card flat bordered class="col-12 q-px-lg q-py-md">
|
<q-card flat bordered class="col-12 q-px-lg q-py-md no-border">
|
||||||
<HeaderTop
|
<HeaderTop
|
||||||
v-model:edit="edit"
|
v-model:edit="edit"
|
||||||
header="ข้อมูลส่วนตัว"
|
header="ข้อมูลส่วนตัว"
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,18 @@ const closeModalError = () => {
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<Information :notiNoEdit="notiNoEdit" v-model:statusEdit="statusEdit" />
|
<div>
|
||||||
<Address :notiNoEdit="notiNoEdit" v-model:statusEdit="statusEdit" />
|
<Information :notiNoEdit="notiNoEdit" v-model:statusEdit="statusEdit" />
|
||||||
|
</div>
|
||||||
|
<div class="horizontal-line"></div>
|
||||||
|
<div>
|
||||||
|
<Address :notiNoEdit="notiNoEdit" v-model:statusEdit="statusEdit" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.horizontal-line {
|
||||||
|
background-color: #F4F4F4;
|
||||||
|
width: 100%;
|
||||||
|
height: 5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -811,7 +811,7 @@ const getClass = (val: boolean) => {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-card flat bordered class="col-12 q-px-lg q-py-md">
|
<q-card class="col-12 q-px-lg q-py-md no-border">
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<ProfileTable
|
<ProfileTable
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,105 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import type { CheckboxItem } from "@/modules/05_placement/interface/index/Main";
|
||||||
|
import type { QForm } from 'quasar';
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import HeaderTop from "@/modules/05_placement/components/exams_other/Information/top.vue";
|
||||||
|
const $q = useQuasar();
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const {
|
||||||
|
modalError,
|
||||||
|
} = mixin;
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
statusEdit: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
notiNoEdit: {
|
||||||
|
type: Function,
|
||||||
|
default: () => console.log("not function"),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emit = defineEmits(["update:statusEdit"]);
|
||||||
|
|
||||||
|
const edit = ref<boolean>(false);
|
||||||
|
const myform = ref<QForm | null>(null);
|
||||||
|
const saveData = async () => {
|
||||||
|
if (myform.value != null) {
|
||||||
|
await myform.value.validate().then(async (success: boolean) => {
|
||||||
|
if (success) {
|
||||||
|
await editData();
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const changeBtn = async () => {
|
||||||
|
if (edit.value == true) {
|
||||||
|
if (props.statusEdit === true) {
|
||||||
|
edit.value = false;
|
||||||
|
props.notiNoEdit();
|
||||||
|
} else {
|
||||||
|
emit("update:statusEdit", true);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
emit("update:statusEdit", false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const editData = async () => {
|
||||||
|
modalError($q, "พบข้อผิดพลาด", "วันเกิดไม่ถูกต้อง");
|
||||||
|
}
|
||||||
|
|
||||||
|
const onCancel = async () => {
|
||||||
|
if (myform.value != null) {
|
||||||
|
myform.value.reset();
|
||||||
|
}
|
||||||
|
// await fetchData();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const selection = ref([]);
|
||||||
|
const checkboxItems: CheckboxItem[] = [
|
||||||
|
{ id: 1, label: 'ไม่เป็นผู้ดำรงตำแหน่งทางการเมือง' },
|
||||||
|
{ id: 2, label: 'ไม่เป็นคนไร้ความสามารถ คนเสมือนไร้ความสามารถ คนวิกลจริตหรือจิตฟั่นเฟือน ไม่สมประกอบหรือเป็นโรคตามที่กำหนดในกฎ ก.พ.' },
|
||||||
|
{ id: 3, label: 'ไม่เป็นผู้อยู่ในระหว่างถูกสั่งพักราชการหรือถูกสั่งให้ออกจากราชการไว้ก่อนตามพระราชบัญญัตินี้ หรือตามกฎหมายอื่น' },
|
||||||
|
{ id: 4, label: 'ไม่เป็นผู้บกพร่องในศีลธรรมอันดีจนเป็นที่รังเกียจของสังคม' },
|
||||||
|
{ id: 5, label: 'ไม่เป็นกรรมการหรือผู้ดำรงตำแหน่งที่รับผิดชอบในการบริหารพรรคการเมือง หรือเจ้าหน้าที่ในพรรคการเมือง' },
|
||||||
|
{ id: 6, label: 'ไม่เป็นบุคคลล้มละลาย' },
|
||||||
|
{ id: 7, label: 'ไม่เป็นผู้เคยต้องรับโทษจำคุกโดยคำพิพากษาถึงที่สุดให้จำคุกเพราะกระทำความผิดทางอาญา เว้นแต่เป็นโทษสำหรับความผิดที่ใด้กระทำโดยประมาทหรือความผิดลหุโทษ' },
|
||||||
|
{ id: 8, label: 'ไม่เป็นผู้เคยถูกลงโทษให้ออก ปลดออก หรือไล่ออกจากรัฐวิสาหกิจ หรือ หน่วยงานอื่นของรัฐ' },
|
||||||
|
{ id: 9, label: 'เป็นผู้เคยถูลงโทษให้ออก หรือปลดออก เพราะกระทำผิตวินัยตามพระราชบัญญัตินี้ หรือตามกฎหมายอื่น' },
|
||||||
|
{ id: 10, label: 'เป็นผู้เคยถูกลงโทษไล่ออก เพราะกระทำผิดวินัยตามพระราชบัญญัตินี้ หรือตามกฎหมายอื่น' },
|
||||||
|
{ id: 11, label: 'เป็นผู้เคยกระทำการทุจริตในการสอบเข้ารับราชการ หรือเข้าปฏิบัติงานใน หน่วยงานของรัฐ' },
|
||||||
|
]
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div class="row">
|
||||||
|
<HeaderTop
|
||||||
|
v-model:edit="edit"
|
||||||
|
header="การคัดกรองคุณสมบัติ"
|
||||||
|
icon="mdi-briefcase-edit"
|
||||||
|
:save="saveData"
|
||||||
|
:history="false"
|
||||||
|
:changeBtn="changeBtn"
|
||||||
|
:disable="statusEdit"
|
||||||
|
:cancel="onCancel"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="contanier-checkbox">
|
||||||
|
<div v-for="item of checkboxItems" :key="item.id" class="q-pt-md">
|
||||||
|
<q-checkbox size="xs" v-model="selection" :val="item.id" :label="item.label" keep-color color="teal"
|
||||||
|
:disable="false" />
|
||||||
|
<q-separator />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.contanier-checkbox {
|
||||||
|
padding-left: 20px;
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -175,7 +175,9 @@ const fetchOrganization = async (id: string) => {
|
||||||
};
|
};
|
||||||
const templateDetail = async () => {
|
const templateDetail = async () => {
|
||||||
await fetchOrganization(selected.value);
|
await fetchOrganization(selected.value);
|
||||||
|
|
||||||
salaryClass.value = "";
|
salaryClass.value = "";
|
||||||
|
|
||||||
if (ocId.value != "") {
|
if (ocId.value != "") {
|
||||||
salaryClass.value = salaryClass.value + `สังกัด${ocId.value} `;
|
salaryClass.value = salaryClass.value + `สังกัด${ocId.value} `;
|
||||||
}
|
}
|
||||||
|
|
@ -234,10 +236,10 @@ const templateDetail = async () => {
|
||||||
};
|
};
|
||||||
const appointModal = ref<boolean>(false);
|
const appointModal = ref<boolean>(false);
|
||||||
|
|
||||||
const nodeTree = async (isDraft: boolean) => {
|
const nodeTree = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getDraftTreeRoot)
|
.get(config.API.getTreeRoot)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
nodesTree.value = data;
|
nodesTree.value = data;
|
||||||
|
|
@ -265,7 +267,22 @@ const appoint = ref<any>({
|
||||||
});
|
});
|
||||||
|
|
||||||
const saveAppoint = () => {
|
const saveAppoint = () => {
|
||||||
console.log("save appoint===>", appoint.value);
|
const dataAppoint = {
|
||||||
|
date : date.value,
|
||||||
|
posNoId: posNoId.value,
|
||||||
|
positionId: positionId.value,
|
||||||
|
positionPathSideId: positionPathSideId.value,
|
||||||
|
positionTypeId: positionTypeId.value,
|
||||||
|
positionLineId: positionLineId.value,
|
||||||
|
positionLevelId: positionLevelId.value,
|
||||||
|
amount : amount.value,
|
||||||
|
positionSalaryAmount : positionSalaryAmount.value,
|
||||||
|
mouthSalaryAmount : mouthSalaryAmount.value,
|
||||||
|
salaryClass : salaryClass.value,
|
||||||
|
refSelected : refSelected.value,
|
||||||
|
salaryRef : salaryRef.value
|
||||||
|
};
|
||||||
|
console.log("save appoint===>", dataAppoint);
|
||||||
};
|
};
|
||||||
|
|
||||||
const savePostpone = () => {
|
const savePostpone = () => {
|
||||||
|
|
@ -287,7 +304,7 @@ const clickEditRow = () => {
|
||||||
};
|
};
|
||||||
const getClass = (val: boolean) => {
|
const getClass = (val: boolean) => {
|
||||||
return {
|
return {
|
||||||
"full-width inputgreen cursor-pointer": val,
|
"full-width inputgreen cursor-pointer ": val,
|
||||||
"full-width cursor-pointer": !val,
|
"full-width cursor-pointer": !val,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -371,7 +388,7 @@ placementData.mappingPosition.columns.length == 0
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "position",
|
name: "position",
|
||||||
align: "left",
|
align: "center",
|
||||||
label: "ลำดับ",
|
label: "ลำดับ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "position",
|
field: "position",
|
||||||
|
|
@ -391,7 +408,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ExamOrder",
|
name: "ExamOrder",
|
||||||
align: "left",
|
align: "center",
|
||||||
label: "ลำดับที่สอบได้",
|
label: "ลำดับที่สอบได้",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "ExamOrder",
|
field: "ExamOrder",
|
||||||
|
|
@ -422,7 +439,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "BMAOfficer",
|
name: "BMAOfficer",
|
||||||
align: "left",
|
align: "center",
|
||||||
label: "ข้าราชการฯ กทม.",
|
label: "ข้าราชการฯ กทม.",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "BMAOfficer",
|
field: "BMAOfficer",
|
||||||
|
|
@ -1067,7 +1084,6 @@ onMounted(async () => {
|
||||||
// await fetchData();
|
// await fetchData();
|
||||||
});
|
});
|
||||||
const fetchChildrenByParentId = async (node: any) => {
|
const fetchChildrenByParentId = async (node: any) => {
|
||||||
// console.log(isDraft);
|
|
||||||
console.log("Call API4");
|
console.log("Call API4");
|
||||||
showLoader();
|
showLoader();
|
||||||
let request = "";
|
let request = "";
|
||||||
|
|
@ -1094,6 +1110,17 @@ const onLazyLoad = (node: any) => {
|
||||||
node.done(node.node.children); //return ค่าให้ q-tree generate children
|
node.done(node.node.children); //return ค่าให้ q-tree generate children
|
||||||
}, 10);
|
}, 10);
|
||||||
};
|
};
|
||||||
|
const listKeyId = (data: any) => {
|
||||||
|
const { node } = data;
|
||||||
|
console.log("test", node);
|
||||||
|
posNoId.value = node.positionNum;
|
||||||
|
positionId.value = node.positionName;
|
||||||
|
positionPathSideId.value = node.executivePositionSide;
|
||||||
|
positionTypeId.value = node.positionType;
|
||||||
|
positionLineId.value = node.organizationName;
|
||||||
|
positionLevelId.value = node.positionLevel;
|
||||||
|
return node.keyId;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
|
|
@ -1146,7 +1173,22 @@ const onLazyLoad = (node: any) => {
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'Name'" class="table_ellipsis">
|
<div v-else-if="col.name == 'Name'" class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
<p>{{ props.row.fullName }}</p>
|
<div class="row col-12 text-no-wrap items-center">
|
||||||
|
<img
|
||||||
|
v-if="props.row.avatar == null"
|
||||||
|
src="@/assets/avatar_user.jpg"
|
||||||
|
class="col-4 img-info"
|
||||||
|
/>
|
||||||
|
<img v-else :src="props.row.avatar" class="col-4 img-info" />
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="text-weight-medium">
|
||||||
|
{{ props.row.fullName }}
|
||||||
|
</div>
|
||||||
|
<div class="text-weight-light">
|
||||||
|
{{ props.row.profileID }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'Unit'" class="table_ellipsis">
|
<div v-else-if="col.name == 'Unit'" class="table_ellipsis">
|
||||||
<div v-if="editvisible && props.row.Status == 'ยังไม่บรรจุ'">
|
<div v-if="editvisible && props.row.Status == 'ยังไม่บรรจุ'">
|
||||||
|
|
@ -1176,7 +1218,7 @@ const onLazyLoad = (node: any) => {
|
||||||
-
|
-
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ props.row.examResult }}
|
{{ props.row.UnitGroup }}
|
||||||
<p>{{ col.value }}</p>
|
<p>{{ col.value }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1331,37 +1373,47 @@ const onLazyLoad = (node: any) => {
|
||||||
>
|
>
|
||||||
<!--organization บรรทัดแสดงชื่อหน่วยงาน & ปุ่ม + -->
|
<!--organization บรรทัดแสดงชื่อหน่วยงาน & ปุ่ม + -->
|
||||||
<template v-slot:header-organization="prop">
|
<template v-slot:header-organization="prop">
|
||||||
<div class="row items-center q-px-xs q-pt-xs q-gutter-sm">
|
<div class="col">
|
||||||
<!--แสดงชื่อแผนก พิมพ์ตัวหนา คลิกแล้วกาง/หุบ Tree-->
|
<div
|
||||||
<div class="text-weight-medium">
|
class="row items-center q-px-xs q-pt-xs q-gutter-sm"
|
||||||
{{ prop.node.organizationName }}
|
>
|
||||||
</div>
|
<!--แสดงชื่อแผนก พิมพ์ตัวหนา คลิกแล้วกาง/หุบ Tree-->
|
||||||
<!--แสดง Total Count PositionNum-->
|
<div class="text-weight-medium">
|
||||||
<q-badge
|
{{ prop.node.organizationName }}
|
||||||
rounded
|
</div>
|
||||||
color="grey-2"
|
|
||||||
text-color="dark"
|
|
||||||
:label="prop.node.totalPositionCount"
|
|
||||||
/>
|
|
||||||
<q-badge
|
|
||||||
v-if="prop.node.totalPositionVacant > 0"
|
|
||||||
rounded
|
|
||||||
color="red"
|
|
||||||
outline
|
|
||||||
:label="prop.node.totalPositionVacant"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<q-space />
|
<!--แสดง Total Count PositionNum-->
|
||||||
|
<q-badge
|
||||||
|
rounded
|
||||||
|
color="grey-2"
|
||||||
|
text-color="dark"
|
||||||
|
:label="prop.node.totalPositionCount"
|
||||||
|
/>
|
||||||
|
<q-badge
|
||||||
|
v-if="prop.node.totalPositionVacant > 0"
|
||||||
|
rounded
|
||||||
|
color="red"
|
||||||
|
outline
|
||||||
|
:label="prop.node.totalPositionVacant"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<q-space />
|
||||||
|
</div>
|
||||||
|
<div class="col items-center q-px-xs q-pt-xs">
|
||||||
|
<div class="text-weight-medium text-grey-7">
|
||||||
|
{{ prop.node.governmentCode }}
|
||||||
|
{{ prop.node.organizationShortName }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:header-person="prop">
|
<template v-slot:header-person="prop">
|
||||||
<q-item
|
<q-item
|
||||||
clickable
|
clickable
|
||||||
:active=" clickAction === prop.node.keyId"
|
:active="clickAction === prop.node.keyId"
|
||||||
@click="clickAction = '1-1-3'"
|
@click="clickAction = listKeyId(prop)"
|
||||||
active-class="my-list-link text-primary text-weight-medium"
|
active-class="my-list-link text-primary text-weight-medium"
|
||||||
class="row items-center text-dark col-12 q-py-xs q-pl-sm rounded-borders my-list"
|
class="row items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
||||||
style="width: 100%"
|
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -1480,179 +1532,78 @@ const onLazyLoad = (node: any) => {
|
||||||
</datepicker>
|
</datepicker>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<selector
|
<q-input
|
||||||
:class="getClass(edit)"
|
disable
|
||||||
:outlined="edit"
|
standout
|
||||||
|
readonly
|
||||||
|
class="custom-input"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="posNoId"
|
v-model="posNoId"
|
||||||
:rules="[
|
|
||||||
(val:string) => !!val || `${'กรุณาเลือกเลขที่ตำแหน่ง'}`,
|
|
||||||
]"
|
|
||||||
:label="`${'เลขที่ตำแหน่ง'}`"
|
:label="`${'เลขที่ตำแหน่ง'}`"
|
||||||
@update:modelValue="clickEditRow"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="posNoOptions"
|
|
||||||
option-value="id"
|
|
||||||
hide-bottom-space
|
|
||||||
use-input
|
|
||||||
input-debounce="0"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<selector
|
<q-input
|
||||||
:class="getClass(edit)"
|
disable
|
||||||
:outlined="edit"
|
readonly
|
||||||
|
class="custom-input"
|
||||||
|
standout
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="positionId"
|
v-model="positionId"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกตำแหน่ง'}`]"
|
|
||||||
:label="`${'ตำแหน่ง'}`"
|
:label="`${'ตำแหน่ง'}`"
|
||||||
@update:modelValue="clickEditRow"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="positionOptions"
|
|
||||||
option-value="id"
|
|
||||||
hide-bottom-space
|
|
||||||
use-input
|
|
||||||
input-debounce="0"
|
|
||||||
@filter="(inputValue:any,
|
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn,'2'
|
|
||||||
) "
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<selector
|
<q-input
|
||||||
:class="getClass(edit)"
|
disable
|
||||||
:outlined="edit"
|
readonly
|
||||||
|
class="custom-input"
|
||||||
|
standout
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="positionPathSideId"
|
v-model="positionPathSideId"
|
||||||
:label="`${'ด้าน/สาขา'}`"
|
:label="`${'ด้าน/สาขา'}`"
|
||||||
@update:modelValue="clickEditRow"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="positionSideOptions"
|
|
||||||
option-value="id"
|
|
||||||
hide-bottom-space
|
|
||||||
use-input
|
|
||||||
input-debounce="0"
|
|
||||||
@filter="(inputValue:any,
|
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn,'3'
|
|
||||||
) "
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<selector
|
<q-input
|
||||||
:class="getClass(edit)"
|
disable
|
||||||
:outlined="edit"
|
readonly
|
||||||
|
class="custom-input"
|
||||||
|
standout
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="positionTypeId"
|
v-model="positionTypeId"
|
||||||
:rules="[
|
|
||||||
(val:string) => !!val || `${'กรุณาเลือกประเภทตำแหน่ง'}`,
|
|
||||||
]"
|
|
||||||
:label="`${'ประเภทตำแหน่ง'}`"
|
:label="`${'ประเภทตำแหน่ง'}`"
|
||||||
@update:modelValue="clickEditRow"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="positionTypeOptions"
|
|
||||||
option-value="id"
|
|
||||||
hide-bottom-space
|
|
||||||
use-input
|
|
||||||
input-debounce="0"
|
|
||||||
@filter="(inputValue:any,
|
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn,'4'
|
|
||||||
) "
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<selector
|
<q-input
|
||||||
:class="getClass(edit)"
|
disable
|
||||||
:outlined="edit"
|
readonly
|
||||||
|
class="custom-input"
|
||||||
|
standout
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="positionLineId"
|
v-model="positionLineId"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกสายงาน'}`]"
|
|
||||||
:label="`${'สายงาน'}`"
|
:label="`${'สายงาน'}`"
|
||||||
@update:modelValue="clickEditRow"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="positionLineOptions"
|
|
||||||
option-value="id"
|
|
||||||
hide-bottom-space
|
|
||||||
use-input
|
|
||||||
input-debounce="0"
|
|
||||||
@filter="(inputValue:any,
|
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn,'5'
|
|
||||||
) "
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<selector
|
<q-input
|
||||||
:class="getClass(edit)"
|
disable
|
||||||
:outlined="edit"
|
readonly
|
||||||
|
class="custom-input"
|
||||||
|
standout
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="positionLevelId"
|
v-model="positionLevelId"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกระดับ'}`]"
|
|
||||||
:label="`${'ระดับ'}`"
|
:label="`${'ระดับ'}`"
|
||||||
@update:modelValue="clickEditRow"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="positionLevelOptions"
|
|
||||||
option-value="id"
|
|
||||||
hide-bottom-space
|
|
||||||
use-input
|
|
||||||
input-debounce="0"
|
|
||||||
@filter="(inputValue:any,
|
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn,'6'
|
|
||||||
) "
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
|
||||||
<selector
|
|
||||||
:class="getClass(edit)"
|
|
||||||
:outlined="edit"
|
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="positionExecutiveId"
|
|
||||||
:label="`${'ตำแหน่งทางการบริหาร'}`"
|
|
||||||
@update:modelValue="clickEditRow"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="positionExecutiveOptions"
|
|
||||||
option-value="id"
|
|
||||||
hide-bottom-space
|
|
||||||
use-input
|
|
||||||
input-debounce="0"
|
|
||||||
@filter="(inputValue:any,
|
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn,'7'
|
|
||||||
) "
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-xs-6 col-sm-6 col-md-6"></div>
|
||||||
<div class="col-xs-4 col-sm-4 col-md-4">
|
<div class="col-xs-4 col-sm-4 col-md-4">
|
||||||
<q-input
|
<q-input
|
||||||
:class="getClass(edit)"
|
:class="getClass(edit)"
|
||||||
|
|
@ -1882,16 +1833,25 @@ const onLazyLoad = (node: any) => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.custom-input {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
.my-list-link {
|
.my-list-link {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
|
||||||
font-weight: 600;
|
|
||||||
border: 1px solid #00AA86;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
font-weight: 600;
|
||||||
|
border: 1px solid #00aa86;
|
||||||
|
}
|
||||||
|
|
||||||
.q-table p {
|
.q-table p {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
color: #818181;
|
color: #818181;
|
||||||
}
|
}
|
||||||
|
.img-info {
|
||||||
|
width: 30px !important;
|
||||||
|
height: 30px !important;
|
||||||
|
border-radius: 50%;
|
||||||
|
object-fit: cover;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import DialogHeader from "@/modules/05_placement/components/pass/DialogHeader.vue";
|
import DialogHeader from "@/modules/05_placement/components/pass/DialogHeader.vue";
|
||||||
import DialogFooter from "@/modules/05_placement/components/pass/DialogFooter.vue";
|
import DialogFooter from "@/modules/05_placement/components/pass/DialogFooter.vue";
|
||||||
|
import type { CheckboxItem } from "@/modules/05_placement/interface/index/Main";
|
||||||
|
|
||||||
const save = ref<boolean>(true);
|
const save = ref<boolean>(true);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -17,10 +17,7 @@ const props = defineProps({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
interface CheckboxItem {
|
|
||||||
id: number;
|
|
||||||
label: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const selection = ref([]);
|
const selection = ref([]);
|
||||||
const checkboxItems: CheckboxItem[] = [
|
const checkboxItems: CheckboxItem[] = [
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,11 @@ interface treeTab {
|
||||||
children: treeTab[];
|
children: treeTab[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface CheckboxItem {
|
||||||
|
id: number;
|
||||||
|
label: string;
|
||||||
|
}
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
DataOption,
|
DataOption,
|
||||||
DataOptionInsignia,
|
DataOptionInsignia,
|
||||||
|
|
@ -57,5 +62,6 @@ export type {
|
||||||
AddressOps,
|
AddressOps,
|
||||||
Pagination,
|
Pagination,
|
||||||
EduOps,
|
EduOps,
|
||||||
InsigniaOps
|
InsigniaOps,
|
||||||
|
CheckboxItem
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import type {
|
||||||
notiType,
|
notiType,
|
||||||
optionType,
|
optionType,
|
||||||
} from "../interface/request/main/main";
|
} from "../interface/request/main/main";
|
||||||
import { menuList, tabList } from "../interface/request/main/main";
|
import { menuList, tabList ,tabList_placement } from "../interface/request/main/main";
|
||||||
|
|
||||||
const { setVerticalScrollPosition, getVerticalScrollPosition } = scroll;
|
const { setVerticalScrollPosition, getVerticalScrollPosition } = scroll;
|
||||||
const store = useDataStore();
|
const store = useDataStore();
|
||||||
|
|
@ -67,6 +67,10 @@ const tabScroll = () => {
|
||||||
return route.name == "registryDetail";
|
return route.name == "registryDetail";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const tabScroll2 = () => {
|
||||||
|
return route.name == "placement2Detail";
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* toggleBtnRight ปุ่มย่อ ขยาย drawer ขวา
|
* toggleBtnRight ปุ่มย่อ ขยาย drawer ขวา
|
||||||
*/
|
*/
|
||||||
|
|
@ -93,6 +97,7 @@ const toggleBtnLeft = () => {
|
||||||
const onScroll = (scroll: ScrollType) => {
|
const onScroll = (scroll: ScrollType) => {
|
||||||
const { position } = scroll;
|
const { position } = scroll;
|
||||||
updateScroll(position);
|
updateScroll(position);
|
||||||
|
updateScroll2(position);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -152,6 +157,60 @@ const activeBtn = () => {
|
||||||
return route.name == "registryDetail" && rightActive.value;
|
return route.name == "registryDetail" && rightActive.value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const updateScroll2 = (position: number) => {
|
||||||
|
// เมื่อ position เป็น undifind ให้ position เป็น ตำแหน่ง top ที่ scroll
|
||||||
|
if (position === void 0) {
|
||||||
|
position = document.documentElement.scrollTop || document.body.scrollTop;
|
||||||
|
}
|
||||||
|
|
||||||
|
let last;
|
||||||
|
/**
|
||||||
|
* วนหา id ของ div นั้น
|
||||||
|
*/
|
||||||
|
for (const i in tabList_placement) {
|
||||||
|
const section = tabList_placement[i];
|
||||||
|
const item = document.getElementById(section.tag);
|
||||||
|
/**
|
||||||
|
* วนหา id ของ div หน้านั้น
|
||||||
|
* เมื่อหาไม่เจอให้ไปต่อตัวต่อไป
|
||||||
|
* เมื่อเจอแล้ว ให้ ตำแหน่งบนสุดของ div นั้น มากกว่าหรือเท่ากับ ตำแหน่ง top ที่ scroll บวกกับ แทปด้านบน 155
|
||||||
|
* ถ้า last เป็น undifind ให้ last เท่ากับ tag แล้ว หยุดลูป
|
||||||
|
* ถ้าไม่ใช้ undifind ให้ last เท่ากับ tag แล้ว ลูปหาต่อ กรณี div นั้นยาว
|
||||||
|
*/
|
||||||
|
if (item === null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.offsetTop >= position + 155) {
|
||||||
|
if (last === void 0) {
|
||||||
|
last = section.tag;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
last = section.tag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* ถ้า last ไม่เท่ากับ undifind
|
||||||
|
* ใช้ เซ็ท active ให้เป็นแทปสีฟ้า
|
||||||
|
* และใช้ scrollIntoView ย้ายตำแหน่ง activeโดยการเลื่อนไปหา
|
||||||
|
*/
|
||||||
|
if (last !== void 0) {
|
||||||
|
changeTab(last);
|
||||||
|
const tocEl = document.getElementById("tab--" + last);
|
||||||
|
if (tocEl) {
|
||||||
|
tocEl.scrollIntoView({ block: "nearest" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ให้แสดง แทปด้านขวา เมื่อเข้าหน้า รายละเอียดหน่อยงานอื่นๆ และ rightActive เท่ากับ true
|
||||||
|
*/
|
||||||
|
const activeBtn2 = () => {
|
||||||
|
return route.name == "placement2Detail" && rightActive.value;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เมื่อเริ่มต้นโปรแกรมให้ฟัง event resize และ function myEventHandler
|
* เมื่อเริ่มต้นโปรแกรมให้ฟัง event resize และ function myEventHandler
|
||||||
* set function myEventHandler เพราะ state ยังไม่เซ็ท , state เซ็ทเมื่อ หน้าจอเริ่ม ขยับหน้าจอ
|
* set function myEventHandler เพราะ state ยังไม่เซ็ท , state เซ็ทเมื่อ หน้าจอเริ่ม ขยับหน้าจอ
|
||||||
|
|
@ -235,7 +294,8 @@ const tagClick = (tag: string) => {
|
||||||
// router.replace({ hash });
|
// router.replace({ hash });
|
||||||
if (route.hash !== hash) {
|
if (route.hash !== hash) {
|
||||||
const check = activeBtn();
|
const check = activeBtn();
|
||||||
if (check) {
|
const check2 = activeBtn2();
|
||||||
|
if (check || check2) {
|
||||||
// router.replace({ hash, position: { x: 0, y: 0 } });
|
// router.replace({ hash, position: { x: 0, y: 0 } });
|
||||||
// router.replace({ hash }).then(() => {
|
// router.replace({ hash }).then(() => {
|
||||||
// setVerticalScrollPosition(window, offset, 300);
|
// setVerticalScrollPosition(window, offset, 300);
|
||||||
|
|
@ -436,7 +496,7 @@ if (keycloak.tokenParsed != null) {
|
||||||
<q-btn
|
<q-btn
|
||||||
size="13px"
|
size="13px"
|
||||||
class="bg-blue-1"
|
class="bg-blue-1"
|
||||||
v-if="activeBtn()"
|
v-if="activeBtn() || activeBtn2()"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
round
|
round
|
||||||
|
|
@ -775,6 +835,44 @@ if (keycloak.tokenParsed != null) {
|
||||||
</q-list>
|
</q-list>
|
||||||
</q-scroll-area>
|
</q-scroll-area>
|
||||||
</q-drawer>
|
</q-drawer>
|
||||||
|
|
||||||
|
<!-- drawer page placement2/detail/:id -->
|
||||||
|
<q-drawer
|
||||||
|
side="right"
|
||||||
|
class="bg-grey-2"
|
||||||
|
show-if-above
|
||||||
|
v-if="tabScroll2()"
|
||||||
|
v-model="drawerR"
|
||||||
|
:width="220"
|
||||||
|
:breakpoint="1023"
|
||||||
|
>
|
||||||
|
<q-scroll-area class="fit">
|
||||||
|
<q-list padding>
|
||||||
|
<q-item
|
||||||
|
v-for="(tabItem, index) in tabList_placement"
|
||||||
|
:key="index"
|
||||||
|
:id="'tab--' + tabItem.tag"
|
||||||
|
class="tabNative"
|
||||||
|
active-class="text-blue-7 active-item text-weight-medium tabActive"
|
||||||
|
:active="activeTab(tabItem.tag)"
|
||||||
|
clickable
|
||||||
|
v-ripple
|
||||||
|
dense
|
||||||
|
exact
|
||||||
|
@click="tagClick(tabItem.tag)"
|
||||||
|
>
|
||||||
|
<q-item-section>
|
||||||
|
<q-item-label
|
||||||
|
><q-icon size="11px" name="mdi-circle-medium" /><span
|
||||||
|
class="q-pl-xs"
|
||||||
|
>{{ tabItem.label }}</span
|
||||||
|
></q-item-label
|
||||||
|
>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
|
</q-scroll-area>
|
||||||
|
</q-drawer>
|
||||||
<!-- drawer -->
|
<!-- drawer -->
|
||||||
|
|
||||||
<q-page-container class="bg-grey-2">
|
<q-page-container class="bg-grey-2">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue