This commit is contained in:
Baghi330 2026-02-14 11:04:51 +03:30
parent 7892a7cefb
commit d3873be2b5
3 changed files with 15 additions and 10 deletions

View File

@ -15,7 +15,7 @@
</template>
<script setup>
import sampelDataDb from "@/json/data-entry/sampelDataDb.json";
import myContentJson from "@/json/data-entry/myContentJson.json";
import refineCodes from "@/json/refineCodes.json";
import MyContent from "@/components/lazy-load/global/MyContent.vue";
const { $http: httpService } = useNuxtApp();
@ -30,14 +30,19 @@ const pagination = ref({
page: 1,
limit: 10,
});
let myContentSchema = {};
myContentSchema = ref(JSON.parse(JSON.stringify(sampelDataDb)));
myContentSchema.value.items = props.listConflicts.hits.hits;
myContentSchema.value.pagination = {
total: props.listConflicts.hits.total.value,
const myContentSchema = computed(() => {
const baseSchema = JSON.parse(JSON.stringify(myContentJson));
return {
...baseSchema,
items: props.listConflicts?.hits ?? [],
pagination: {
total: props.listConflicts?.total?.value ?? 0,
page: pagination.value.page,
limit: pagination.value.limit,
},
};
});
const headerTools = computed(() => [
{
items: [

View File

@ -127,7 +127,7 @@ const getListConflict = async (textSearch = "", filterExtended = "") => {
);
console.log("res", res);
listConflicts.value = res;
listConflicts.value = res.hits;
} catch (err) {
console.error("خطا در دریافت داده:", err);
}