thainv-dev

This commit is contained in:
nguyen van thai
2024-07-05 11:57:41 +07:00
parent 780474bcb3
commit cf64f11e72
9 changed files with 9 additions and 674 deletions
@@ -5,9 +5,9 @@ import { COLLECTION_PAGING_QUERY_DROP, getInputValue } from "@/utils/parseSQL";
const router = useRouter();
const route = useRoute();
const store = reactive({
component: usePageComponentStore(),
});
// const store = reactive({
// component: usePageComponentStore(),
// });
const _props = defineProps<{
dataResult?: any;
@@ -79,12 +79,12 @@ const loadPage = async (page: number) => {
} else {
newDataQuery = _props.component?.settings?.dataQuery + ` Page[${page}]`;
}
const res = await store.component.getOverviewPageComponentById(Number(_props.component?.id), newDataQuery);
const data = getInputValue(res?.settings?.dataResult, "OBJECT");
if (Object.keys(data).length > 0) {
totals.value = data.Total;
listArticlePaging.value = data?.Data || [];
}
// const res = await store.component.getOverviewPageComponentById(Number(_props.component?.id), newDataQuery);
// const data = getInputValue(res?.settings?.dataResult, "OBJECT");
// if (Object.keys(data).length > 0) {
// totals.value = data.Total;
// listArticlePaging.value = data?.Data || [];
// }
};
const handleNextPrev = (type: "+" | "-") => {