pinia store data ข้อมูลหลัก
ขาด District /sub district
This commit is contained in:
parent
e3d929f7bf
commit
6a3da944bc
24 changed files with 3026 additions and 779 deletions
|
|
@ -2,129 +2,130 @@
|
|||
* api ระบบจัดการข้อมูลหลัก
|
||||
* เมนูย่อย: ข้อมูลโครงสร้างหน่วยงาน
|
||||
*/
|
||||
import env from "../index"
|
||||
const organization = `${env.API_URI}/metadata/organization/`
|
||||
const organizationOrganization = `${env.API_URI}/metadata/organization-organization/`
|
||||
const organizationShortName = `${env.API_URI}/metadata/organization-shortname/`
|
||||
const organizationCode = `${env.API_URI_ORG_SERVICE}/PositionMaster/`
|
||||
const organizationType = `${env.API_URI}/metadata/organization-type/`
|
||||
const organizationLevel = `${env.API_URI}/metadata/organization-level/`
|
||||
const organizationStatus = `${env.API_URI}/metadata/organization-status/`
|
||||
const organizationAgency = `${env.API_URI}/metadata/organization-agency/`
|
||||
const organizationGovernmentAgency = `${env.API_URI}/metadata/organization-government-agency/`
|
||||
const organizationTelExternal = `${env.API_URI}/metadata/organization-tel-external/`
|
||||
const organizationTelInternal = `${env.API_URI}/metadata/organization-tel-internal/`
|
||||
const organizationFax = `${env.API_URI}/metadata/organization-fax/`
|
||||
const dashbord = `${env.API_URI}/metadata/dashbord/`
|
||||
import env from "../index";
|
||||
const organization = `${env.API_URI}/metadata/organization/`;
|
||||
const organizationOrganization = `${env.API_URI}/metadata/organization-organization/`;
|
||||
const organizationShortName = `${env.API_URI}/metadata/organization-shortname/`;
|
||||
const organizationCode = `${env.API_URI_ORG_SERVICE}/PositionMaster/`;
|
||||
const organizationType = `${env.API_URI}/metadata/organization-type/`;
|
||||
const organizationLevel = `${env.API_URI}/metadata/organization-level/`;
|
||||
const organizationStatus = `${env.API_URI}/metadata/organization-status/`;
|
||||
const organizationAgency = `${env.API_URI}/metadata/organization-agency/`;
|
||||
const organizationGovernmentAgency = `${env.API_URI}/metadata/organization-government-agency/`;
|
||||
const organizationTelExternal = `${env.API_URI}/metadata/organization-tel-external/`;
|
||||
const organizationTelInternal = `${env.API_URI}/metadata/organization-tel-internal/`;
|
||||
const organizationFax = `${env.API_URI}/metadata/organization-fax/`;
|
||||
const dashbord = `${env.API_URI}/metadata/dashbord/`;
|
||||
|
||||
export default {
|
||||
/**
|
||||
* api จำนวนข้อมูลใน ระบบจัดการข้อมูลหลัก tab ย่อยแต่ละ tab
|
||||
*/
|
||||
organization,
|
||||
countDashbordSubHistory: (type: number) => `${dashbord}${type}`,
|
||||
countDashbordHistory: `${dashbord}`,
|
||||
/**
|
||||
* api จำนวนข้อมูลใน ระบบจัดการข้อมูลหลัก tab ย่อยแต่ละ tab
|
||||
*/
|
||||
organization,
|
||||
countDashbordSubHistory: (type: number) => `${dashbord}${type}`,
|
||||
countDashbordHistory: `${dashbord}`,
|
||||
|
||||
/**
|
||||
* api หน่วยงาน
|
||||
*/
|
||||
listOrganizationOrganizationHistory: `${organizationOrganization}history`,
|
||||
listOrganizationOrganizationHistoryId: (id: string) =>
|
||||
`${organizationOrganization}history/${id}`,
|
||||
listOrganizationOrganizationPublished: `${organizationOrganization}history/published`,
|
||||
listOrganizationOrganizationPublishedHistory: `${organizationOrganization}history/published-history`,
|
||||
/**
|
||||
* api หน่วยงาน
|
||||
*/
|
||||
organizationOrganization,
|
||||
listOrganizationOrganizationHistory: `${organizationOrganization}history`,
|
||||
listOrganizationOrganizationHistoryId: (id: string) =>
|
||||
`${organizationOrganization}history/${id}`,
|
||||
listOrganizationOrganizationPublished: `${organizationOrganization}history/published`,
|
||||
listOrganizationOrganizationPublishedHistory: `${organizationOrganization}history/published-history`,
|
||||
|
||||
/**
|
||||
* api ชื่อย่อหน่วยงาน
|
||||
*/
|
||||
organizationShortName,
|
||||
listOrganizationShortNameHistory: `${organizationShortName}history`,
|
||||
listOrganizationShortNameHistoryId: (id: string) =>
|
||||
`${organizationShortName}history/${id}`,
|
||||
listOrganizationShortNamePublished: `${organizationShortName}history/published`,
|
||||
listOrganizationShortNamePublishedHistory: `${organizationShortName}history/published-history`,
|
||||
organizationCode: `${organizationCode}organization-code`,
|
||||
organizationGovernmentCode: (id: string) =>
|
||||
`${organizationCode}government/${id}`,
|
||||
organizationAgencyCode: (id: string) => `${organizationCode}agency/${id}`,
|
||||
/**
|
||||
* api ชื่อย่อหน่วยงาน
|
||||
*/
|
||||
organizationShortName,
|
||||
listOrganizationShortNameHistory: `${organizationShortName}history`,
|
||||
listOrganizationShortNameHistoryId: (id: string) =>
|
||||
`${organizationShortName}history/${id}`,
|
||||
listOrganizationShortNamePublished: `${organizationShortName}history/published`,
|
||||
listOrganizationShortNamePublishedHistory: `${organizationShortName}history/published-history`,
|
||||
organizationCode: `${organizationCode}organization-code`,
|
||||
organizationGovernmentCode: (id: string) =>
|
||||
`${organizationCode}government/${id}`,
|
||||
organizationAgencyCode: (id: string) => `${organizationCode}agency/${id}`,
|
||||
|
||||
/**
|
||||
* api ประเภท
|
||||
*/
|
||||
organizationType,
|
||||
listOrganizationTypeHistory: `${organizationType}history`,
|
||||
listOrganizationTypeHistoryId: (id: string) =>
|
||||
`${organizationType}history/${id}`,
|
||||
listOrganizationTypePublished: `${organizationType}history/published`,
|
||||
listOrganizationTypePublishedHistory: `${organizationType}history/published-history`,
|
||||
/**
|
||||
* api ประเภท
|
||||
*/
|
||||
organizationType,
|
||||
listOrganizationTypeHistory: `${organizationType}history`,
|
||||
listOrganizationTypeHistoryId: (id: string) =>
|
||||
`${organizationType}history/${id}`,
|
||||
listOrganizationTypePublished: `${organizationType}history/published`,
|
||||
listOrganizationTypePublishedHistory: `${organizationType}history/published-history`,
|
||||
|
||||
/**
|
||||
* api ระดับ
|
||||
*/
|
||||
organizationLevel,
|
||||
listOrganizationLevelHistory: `${organizationLevel}history`,
|
||||
listOrganizationLevelHistoryId: (id: string) =>
|
||||
`${organizationLevel}history/${id}`,
|
||||
listOrganizationLevelPublished: `${organizationLevel}history/published`,
|
||||
listOrganizationLevelPublishedHistory: `${organizationLevel}history/published-history`,
|
||||
/**
|
||||
* api ระดับ
|
||||
*/
|
||||
organizationLevel,
|
||||
listOrganizationLevelHistory: `${organizationLevel}history`,
|
||||
listOrganizationLevelHistoryId: (id: string) =>
|
||||
`${organizationLevel}history/${id}`,
|
||||
listOrganizationLevelPublished: `${organizationLevel}history/published`,
|
||||
listOrganizationLevelPublishedHistory: `${organizationLevel}history/published-history`,
|
||||
|
||||
/**
|
||||
* api สถานะ
|
||||
*/
|
||||
organizationStatus,
|
||||
listOrganizationStatusHistory: `${organizationStatus}history`,
|
||||
listOrganizationStatusHistoryId: (id: string) =>
|
||||
`${organizationStatus}history/${id}`,
|
||||
listOrganizationStatusPublished: `${organizationStatus}history/published`,
|
||||
listOrganizationStatusPublishedHistory: `${organizationStatus}history/published-history`,
|
||||
/**
|
||||
* api สถานะ
|
||||
*/
|
||||
organizationStatus,
|
||||
listOrganizationStatusHistory: `${organizationStatus}history`,
|
||||
listOrganizationStatusHistoryId: (id: string) =>
|
||||
`${organizationStatus}history/${id}`,
|
||||
listOrganizationStatusPublished: `${organizationStatus}history/published`,
|
||||
listOrganizationStatusPublishedHistory: `${organizationStatus}history/published-history`,
|
||||
|
||||
/**
|
||||
* api หน่วยงานต้นสังกัด
|
||||
*/
|
||||
organizationAgency,
|
||||
listOrganizationAgencyHistory: `${organizationAgency}history`,
|
||||
listOrganizationAgencyHistoryId: (id: string) =>
|
||||
`${organizationAgency}history/${id}`,
|
||||
listOrganizationAgencyPublished: `${organizationAgency}history/published`,
|
||||
listOrganizationAgencyPublishedHistory: `${organizationAgency}history/published-history`,
|
||||
/**
|
||||
* api หน่วยงานต้นสังกัด
|
||||
*/
|
||||
organizationAgency,
|
||||
listOrganizationAgencyHistory: `${organizationAgency}history`,
|
||||
listOrganizationAgencyHistoryId: (id: string) =>
|
||||
`${organizationAgency}history/${id}`,
|
||||
listOrganizationAgencyPublished: `${organizationAgency}history/published`,
|
||||
listOrganizationAgencyPublishedHistory: `${organizationAgency}history/published-history`,
|
||||
|
||||
/**
|
||||
* api ส่วนราชการต้นสังกัด
|
||||
*/
|
||||
organizationGovernmentAgency,
|
||||
listOrganizationGovernmentAgencyHistory: `${organizationGovernmentAgency}history`,
|
||||
listOrganizationGovernmentAgencyHistoryId: (id: string) =>
|
||||
`${organizationGovernmentAgency}history/${id}`,
|
||||
listOrganizationGovernmentAgencyPublished: `${organizationGovernmentAgency}history/published`,
|
||||
listOrganizationGovernmentAgencyPublishedHistory: `${organizationGovernmentAgency}history/published-history`,
|
||||
/**
|
||||
* api ส่วนราชการต้นสังกัด
|
||||
*/
|
||||
organizationGovernmentAgency,
|
||||
listOrganizationGovernmentAgencyHistory: `${organizationGovernmentAgency}history`,
|
||||
listOrganizationGovernmentAgencyHistoryId: (id: string) =>
|
||||
`${organizationGovernmentAgency}history/${id}`,
|
||||
listOrganizationGovernmentAgencyPublished: `${organizationGovernmentAgency}history/published`,
|
||||
listOrganizationGovernmentAgencyPublishedHistory: `${organizationGovernmentAgency}history/published-history`,
|
||||
|
||||
/**
|
||||
* api เบอร์ติดต่อภายนอก
|
||||
*/
|
||||
organizationTelExternal,
|
||||
listOrganizationTelExternalHistory: `${organizationTelExternal}history`,
|
||||
listOrganizationTelExternalHistoryId: (id: string) =>
|
||||
`${organizationTelExternal}history/${id}`,
|
||||
listOrganizationTelExternalPublished: `${organizationTelExternal}history/published`,
|
||||
listOrganizationTelExternalPublishedHistory: `${organizationTelExternal}history/published-history`,
|
||||
/**
|
||||
* api เบอร์ติดต่อภายนอก
|
||||
*/
|
||||
organizationTelExternal,
|
||||
listOrganizationTelExternalHistory: `${organizationTelExternal}history`,
|
||||
listOrganizationTelExternalHistoryId: (id: string) =>
|
||||
`${organizationTelExternal}history/${id}`,
|
||||
listOrganizationTelExternalPublished: `${organizationTelExternal}history/published`,
|
||||
listOrganizationTelExternalPublishedHistory: `${organizationTelExternal}history/published-history`,
|
||||
|
||||
/**
|
||||
* api เบอร์ติดต่อภายใน
|
||||
*/
|
||||
organizationTelInternal,
|
||||
listOrganizationTelInternalHistory: `${organizationTelInternal}history`,
|
||||
listOrganizationTelInternalHistoryId: (id: string) =>
|
||||
`${organizationTelInternal}history/${id}`,
|
||||
listOrganizationTelInternalPublished: `${organizationTelInternal}history/published`,
|
||||
listOrganizationTelInternalPublishedHistory: `${organizationTelInternal}history/published-history`,
|
||||
/**
|
||||
* api เบอร์ติดต่อภายใน
|
||||
*/
|
||||
organizationTelInternal,
|
||||
listOrganizationTelInternalHistory: `${organizationTelInternal}history`,
|
||||
listOrganizationTelInternalHistoryId: (id: string) =>
|
||||
`${organizationTelInternal}history/${id}`,
|
||||
listOrganizationTelInternalPublished: `${organizationTelInternal}history/published`,
|
||||
listOrganizationTelInternalPublishedHistory: `${organizationTelInternal}history/published-history`,
|
||||
|
||||
/**
|
||||
* api เบอร์โทรสาร
|
||||
*/
|
||||
organizationFax,
|
||||
listOrganizationFaxHistory: `${organizationFax}history`,
|
||||
listOrganizationFaxHistoryId: (id: string) =>
|
||||
`${organizationFax}history/${id}`,
|
||||
listOrganizationFaxPublished: `${organizationFax}history/published`,
|
||||
listOrganizationFaxPublishedHistory: `${organizationFax}history/published-history`,
|
||||
}
|
||||
/**
|
||||
* api เบอร์โทรสาร
|
||||
*/
|
||||
organizationFax,
|
||||
listOrganizationFaxHistory: `${organizationFax}history`,
|
||||
listOrganizationFaxHistoryId: (id: string) =>
|
||||
`${organizationFax}history/${id}`,
|
||||
listOrganizationFaxPublished: `${organizationFax}history/published`,
|
||||
listOrganizationFaxPublishedHistory: `${organizationFax}history/published-history`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ export default {
|
|||
/**
|
||||
* api เขต
|
||||
*/
|
||||
district,
|
||||
listDistrict: (id: string) => `${district}${id}`,
|
||||
listDistrictHistory: `${district}history`,
|
||||
listDistrictHistoryId: (id: string | string[]) => `${district}history/${id}`,
|
||||
|
|
|
|||
|
|
@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const {
|
||||
manageData,
|
||||
changeManageColumns,
|
||||
getOrganizationFax,
|
||||
dataOrganizationFax,
|
||||
} = store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -363,37 +368,42 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listOrganizationFaxHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getOrganizationFax(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listOrganizationFaxHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const {
|
||||
manageData,
|
||||
changeManageColumns,
|
||||
getOrganizationLevel,
|
||||
dataOrganizationLevel,
|
||||
} = store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -363,37 +368,42 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listOrganizationLevelHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getOrganizationLevel(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listOrganizationLevelHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -216,7 +216,8 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const { manageData, changeManageColumns, getOrganization, dataOrganization } =
|
||||
store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -399,38 +400,43 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listOrganizationOrganizationHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
note: e.note,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getOrganization(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listOrganizationOrganizationHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// note: e.note,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -257,7 +257,12 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const {
|
||||
manageData,
|
||||
changeManageColumns,
|
||||
getOrganizationShortName,
|
||||
dataOrganizationShortName,
|
||||
} = store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -488,40 +493,45 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listOrganizationShortNameHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
agencyCode: e.agencyCode,
|
||||
governmentCode: e.governmentCode,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
note: e.note,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getOrganizationShortName(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listOrganizationShortNameHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// agencyCode: e.agencyCode,
|
||||
// governmentCode: e.governmentCode,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// note: e.note,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const {
|
||||
manageData,
|
||||
changeManageColumns,
|
||||
getOrganizationStatus,
|
||||
dataOrganizationStatus,
|
||||
} = store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -363,37 +368,42 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listOrganizationStatusHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getOrganizationStatus(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listOrganizationStatusHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const {
|
||||
manageData,
|
||||
changeManageColumns,
|
||||
getOrganizationTelExternal,
|
||||
dataOrganizationTelExternal,
|
||||
} = store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -363,37 +368,42 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listOrganizationTelExternalHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getOrganizationTelExternal(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listOrganizationTelExternalHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const {
|
||||
manageData,
|
||||
changeManageColumns,
|
||||
getOrganizationTelInternal,
|
||||
dataOrganizationTelInternal,
|
||||
} = store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -363,37 +368,42 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listOrganizationTelInternalHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getOrganizationTelInternal(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listOrganizationTelInternalHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -204,7 +204,12 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const {
|
||||
manageData,
|
||||
changeManageColumns,
|
||||
getOrganizationType,
|
||||
dataOrganizationType,
|
||||
} = store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -363,37 +368,42 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listOrganizationTypeHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getOrganizationType(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listOrganizationTypeHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const { manageData, changeManageColumns, getBlood, dataBlood } = store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -367,37 +367,42 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listBloodGroupHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getBlood(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listBloodGroupHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const { manageData, changeManageColumns, getEducation, dataEducation } = store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -364,37 +364,42 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listEducationLevelHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getEducation(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listEducationLevelHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const { manageData, changeManageColumns, getGender, dataGenders } = store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -364,37 +364,42 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listGenderHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getGender(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listGenderHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ const { loaderPage } = dataStore; //ขึ้นหน้า load ขณะเ
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const { manageData, changeManageColumns, getProvince, dataProvince } = store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -376,37 +376,42 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listProvinceHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getProvince(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listProvinceHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -205,7 +205,8 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const { manageData, changeManageColumns, getRelationship, dataRelationship } =
|
||||
store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -364,37 +365,42 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listRelationshipHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getRelationship(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listRelationshipHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const { manageData, changeManageColumns, getReligion, dataReligion } = store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -364,37 +364,42 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listReligionHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getReligion(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listReligionHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -205,7 +205,12 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const {
|
||||
manageData,
|
||||
changeManageColumns,
|
||||
getPositionExecutive,
|
||||
dataPositionExecutive,
|
||||
} = store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -364,37 +369,42 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listPositionExecutiveHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getPositionExecutive(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listPositionExecutiveHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -217,7 +217,12 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const {
|
||||
manageData,
|
||||
changeManageColumns,
|
||||
getPositionExecutiveSide,
|
||||
dataPositionExecutiveSide,
|
||||
} = store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -400,38 +405,43 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listPositionExecutiveSideHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
note: e.note,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getPositionExecutiveSide(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listPositionExecutiveSideHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// note: e.note,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -268,7 +268,8 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const { manageData, changeManageColumns, getPositionLevel, dataPositionLevel } =
|
||||
store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -475,45 +476,50 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listPositionLevelHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
level: e.level,
|
||||
name: e.name,
|
||||
shortName: e.shortName,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
rows.value.sort(
|
||||
(
|
||||
firstItem: RequestItemsHistoryObject,
|
||||
secondItem: RequestItemsHistoryObject
|
||||
) => firstItem.level - secondItem.level
|
||||
);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getPositionLevel(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listPositionLevelHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// level: e.level,
|
||||
// name: e.name,
|
||||
// shortName: e.shortName,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// rows.value.sort(
|
||||
// (
|
||||
// firstItem: RequestItemsHistoryObject,
|
||||
// secondItem: RequestItemsHistoryObject
|
||||
// ) => firstItem.level - secondItem.level
|
||||
// );
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -205,7 +205,8 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const { manageData, changeManageColumns, getPositionLine, dataPositionLine } =
|
||||
store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -364,37 +365,42 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listPositionLineHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getPositionLine(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listPositionLineHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -217,7 +217,12 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const {
|
||||
manageData,
|
||||
changeManageColumns,
|
||||
getPositionPathSide,
|
||||
dataPositionPathSide,
|
||||
} = store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -400,38 +405,43 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listPositionSideHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
note: e.note,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getPositionPathSide(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listPositionSideHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// note: e.note,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -205,7 +205,12 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const {
|
||||
manageData,
|
||||
changeManageColumns,
|
||||
getPositionStatus,
|
||||
dataPositionStatus,
|
||||
} = store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -364,37 +369,42 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listPositionStatusHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getPositionStatus(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listPositionStatusHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -205,7 +205,8 @@ const { loaderPage } = dataStore;
|
|||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const store = useManageDataStore();
|
||||
const { manageData, changeManageColumns } = store;
|
||||
const { manageData, changeManageColumns, getPositionType, dataPositionType } =
|
||||
store;
|
||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||
|
|
@ -364,37 +365,42 @@ const $q = useQuasar();
|
|||
/**
|
||||
* ฟังก์ชัน get data ล่าสุด
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
const fetchData = async (load: boolean = false) => {
|
||||
await props.fetchDataComponent();
|
||||
rows.value.splice(0);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listPositionTypeHistory)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = data.id; //เลข id ใน mongodb
|
||||
data.items.map((e: RequestItemsHistoryObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
createdAt: e.createdAt,
|
||||
lastUpdatedAt: e.lastUpdatedAt,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
isActive: e.isActive,
|
||||
createdFullName: e.createdFullName,
|
||||
createdUserId: e.createdUserId,
|
||||
lastUpdateUserId: e.lastUpdateUserId,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
updateData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
const result = await getPositionType(false, load);
|
||||
version.value = result.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
idVersion.value = result.idversion; //เลข id ใน mongodb
|
||||
rows.value = result.data;
|
||||
updateData.value = false;
|
||||
// rows.value.splice(0);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.listPositionTypeHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// version.value = data.version; //ตัวแปรที่บอกว่าข้อมูลเผยแพร่ไปหรือยัง published=เผยแพร่แล้ว draft=ยังไม่เผยแพร่
|
||||
// idVersion.value = data.id; //เลข id ใน mongodb
|
||||
// data.items.map((e: RequestItemsHistoryObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// name: e.name,
|
||||
// createdAt: e.createdAt,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// isActive: e.isActive,
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdUserId: e.createdUserId,
|
||||
// lastUpdateUserId: e.lastUpdateUserId,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// updateData.value = false;
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue