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 ระบบจัดการข้อมูลหลัก
|
* 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}`,
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -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
Loading…
Add table
Add a link
Reference in a new issue