From f88deee0c343ed72a54b8e6ed5f806429810a03e Mon Sep 17 00:00:00 2001 From: Baghi330 Date: Sat, 14 Feb 2026 11:16:55 +0330 Subject: [PATCH] conflictSelected --- app/components/lazy-load/data-entry/MainList.vue | 7 +++++-- .../lazy-load/data-entry/RelationEdit.vue | 4 ++++ app/json/data-entry/myContentJson.json | 13 +------------ app/pages/index.vue | 8 ++++++++ 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/app/components/lazy-load/data-entry/MainList.vue b/app/components/lazy-load/data-entry/MainList.vue index abaa5e8..78baa4e 100644 --- a/app/components/lazy-load/data-entry/MainList.vue +++ b/app/components/lazy-load/data-entry/MainList.vue @@ -25,6 +25,7 @@ const props = defineProps({ default: () => [], }, }); +const emit = defineEmits(["conflict-details"]); const pagination = ref({ total: 0, page: 1, @@ -77,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); + } } diff --git a/app/components/lazy-load/data-entry/RelationEdit.vue b/app/components/lazy-load/data-entry/RelationEdit.vue index e0c1ddb..10315bd 100644 --- a/app/components/lazy-load/data-entry/RelationEdit.vue +++ b/app/components/lazy-load/data-entry/RelationEdit.vue @@ -11,6 +11,10 @@ const props = defineProps({ type: Array, default: () => [], }, + conflictSelected: { + type: Object, + default: () => {}, + }, }); const accordionItems = [ { diff --git a/app/json/data-entry/myContentJson.json b/app/json/data-entry/myContentJson.json index ce86a56..dce93ef 100755 --- a/app/json/data-entry/myContentJson.json +++ b/app/json/data-entry/myContentJson.json @@ -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": [ diff --git a/app/pages/index.vue b/app/pages/index.vue index e48597e..a7455e4 100755 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -14,6 +14,8 @@ v-if="currentComponent" :activeTabKey="activeTabKey" :listConflicts="listConflicts" + :conflictSelected="conflictSelected" + @conflict-details="conflictDetails" /> @@ -78,6 +80,7 @@ const handleTabChange = (tab) => { } }; const headerSchema = ref({}); +const conflictSelected = ref({}); headerSchema.value = { breadcrumb: true, logo: false, @@ -132,6 +135,11 @@ const getListConflict = async (textSearch = "", filterExtended = "") => { console.error("خطا در دریافت داده:", err); } }; +function conflictDetails(event) { + conflictSelected.value = event; + activeTabKey.value = "RelationEdit"; + console.log("event", event); +} onMounted(() => { getListConflict(); activeTabKey.value = headerTabs.value[0]?.id || "";