Compare commits
2 Commits
7892a7cefb
...
f88deee0c3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f88deee0c3 | ||
|
|
d3873be2b5 |
|
|
@ -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();
|
||||
|
|
@ -25,19 +25,25 @@ const props = defineProps({
|
|||
default: () => [],
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["conflict-details"]);
|
||||
const pagination = ref({
|
||||
total: 0,
|
||||
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: [
|
||||
|
|
@ -72,8 +78,10 @@ function headerToolsAction({ action, data }) {
|
|||
if (action === "next-click") {
|
||||
}
|
||||
}
|
||||
function myContentAction({ action, data }) {
|
||||
console.log(action, data);
|
||||
function myContentAction({ action, payload }) {
|
||||
if (action === "conflict_Details") {
|
||||
emit("conflict-details", payload);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,10 @@ const props = defineProps({
|
|||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
conflictSelected: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
const accordionItems = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,20 +2,9 @@
|
|||
"items": [],
|
||||
"tableActions": [
|
||||
{
|
||||
"key": "meta_infos",
|
||||
"key": "conflict_Details",
|
||||
"icon": "i-lucide-info",
|
||||
"title": "ورود اطلاعات"
|
||||
},
|
||||
|
||||
{
|
||||
"key": "manageFiles",
|
||||
"icon": "i-lucide-upload",
|
||||
"title": "بارگذاری فایل"
|
||||
},
|
||||
{
|
||||
"key": "hasMedia",
|
||||
"icon": "lucide:list-checks",
|
||||
"title": ""
|
||||
}
|
||||
],
|
||||
"tableColumns": [
|
||||
|
|
@ -14,6 +14,8 @@
|
|||
v-if="currentComponent"
|
||||
:activeTabKey="activeTabKey"
|
||||
:listConflicts="listConflicts"
|
||||
:conflictSelected="conflictSelected"
|
||||
@conflict-details="conflictDetails"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -78,6 +80,7 @@ const handleTabChange = (tab) => {
|
|||
}
|
||||
};
|
||||
const headerSchema = ref({});
|
||||
const conflictSelected = ref({});
|
||||
headerSchema.value = {
|
||||
breadcrumb: true,
|
||||
logo: false,
|
||||
|
|
@ -127,11 +130,16 @@ const getListConflict = async (textSearch = "", filterExtended = "") => {
|
|||
);
|
||||
console.log("res", res);
|
||||
|
||||
listConflicts.value = res;
|
||||
listConflicts.value = res.hits;
|
||||
} catch (err) {
|
||||
console.error("خطا در دریافت داده:", err);
|
||||
}
|
||||
};
|
||||
function conflictDetails(event) {
|
||||
conflictSelected.value = event;
|
||||
activeTabKey.value = "RelationEdit";
|
||||
console.log("event", event);
|
||||
}
|
||||
onMounted(() => {
|
||||
getListConflict();
|
||||
activeTabKey.value = headerTabs.value[0]?.id || "";
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user