fix table

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-12-19 15:17:24 +07:00
parent d5f5c722d3
commit e3a91f1c71
5 changed files with 13 additions and 10 deletions

View file

@ -50,6 +50,7 @@ const reqMaster = reactive<FilterMaster>({
revisionId: "",
});
const totalPage = ref<number>(1);
const totalData = ref<number>(1);
const action1 = ref<boolean>(false);
const posMaster = ref<PosMaster2[]>([]);
const shortName = ref<string>("");
@ -116,6 +117,7 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
.then(async (res) => {
const dataMain: PosMaster[] = [];
totalPage.value = Math.ceil(res.data.result.total / reqMaster.pageSize);
totalData.value = res.data.result.total;
res.data.result.data.forEach((e: PosMaster) => {
const p = e.positions;
if (p.length !== 0) {
@ -334,6 +336,7 @@ onMounted(async () => {
v-model:req-master="reqMaster"
v-model:total-page="totalPage"
v-model:org-root-id="orgRootId"
v-model:total-data="totalData"
:short-name="shortName"
:main-tree="mainTree"
:fetch-data-table="fetchDataTable"