Compare commits
No commits in common. "f88deee0c343ed72a54b8e6ed5f806429810a03e" and "7892a7cefb69892707df68d0a1372191ef90b005" have entirely different histories.
f88deee0c3
...
7892a7cefb
|
|
@ -15,7 +15,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import myContentJson from "@/json/data-entry/myContentJson.json";
|
import sampelDataDb from "@/json/data-entry/sampelDataDb.json";
|
||||||
import refineCodes from "@/json/refineCodes.json";
|
import refineCodes from "@/json/refineCodes.json";
|
||||||
import MyContent from "@/components/lazy-load/global/MyContent.vue";
|
import MyContent from "@/components/lazy-load/global/MyContent.vue";
|
||||||
const { $http: httpService } = useNuxtApp();
|
const { $http: httpService } = useNuxtApp();
|
||||||
|
|
@ -25,25 +25,19 @@ const props = defineProps({
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const emit = defineEmits(["conflict-details"]);
|
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
total: 0,
|
total: 0,
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
});
|
});
|
||||||
const myContentSchema = computed(() => {
|
let myContentSchema = {};
|
||||||
const baseSchema = JSON.parse(JSON.stringify(myContentJson));
|
myContentSchema = ref(JSON.parse(JSON.stringify(sampelDataDb)));
|
||||||
|
myContentSchema.value.items = props.listConflicts.hits.hits;
|
||||||
return {
|
myContentSchema.value.pagination = {
|
||||||
...baseSchema,
|
total: props.listConflicts.hits.total.value,
|
||||||
items: props.listConflicts?.hits ?? [],
|
page: pagination.value.page,
|
||||||
pagination: {
|
limit: pagination.value.limit,
|
||||||
total: props.listConflicts?.total?.value ?? 0,
|
};
|
||||||
page: pagination.value.page,
|
|
||||||
limit: pagination.value.limit,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
});
|
|
||||||
const headerTools = computed(() => [
|
const headerTools = computed(() => [
|
||||||
{
|
{
|
||||||
items: [
|
items: [
|
||||||
|
|
@ -78,10 +72,8 @@ function headerToolsAction({ action, data }) {
|
||||||
if (action === "next-click") {
|
if (action === "next-click") {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function myContentAction({ action, payload }) {
|
function myContentAction({ action, data }) {
|
||||||
if (action === "conflict_Details") {
|
console.log(action, data);
|
||||||
emit("conflict-details", payload);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,6 @@ const props = defineProps({
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
conflictSelected: {
|
|
||||||
type: Object,
|
|
||||||
default: () => {},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
const accordionItems = [
|
const accordionItems = [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,20 @@
|
||||||
"items": [],
|
"items": [],
|
||||||
"tableActions": [
|
"tableActions": [
|
||||||
{
|
{
|
||||||
"key": "conflict_Details",
|
"key": "meta_infos",
|
||||||
"icon": "i-lucide-info",
|
"icon": "i-lucide-info",
|
||||||
"title": "ورود اطلاعات"
|
"title": "ورود اطلاعات"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"key": "manageFiles",
|
||||||
|
"icon": "i-lucide-upload",
|
||||||
|
"title": "بارگذاری فایل"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "hasMedia",
|
||||||
|
"icon": "lucide:list-checks",
|
||||||
|
"title": ""
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"tableColumns": [
|
"tableColumns": [
|
||||||
|
|
@ -14,8 +14,6 @@
|
||||||
v-if="currentComponent"
|
v-if="currentComponent"
|
||||||
:activeTabKey="activeTabKey"
|
:activeTabKey="activeTabKey"
|
||||||
:listConflicts="listConflicts"
|
:listConflicts="listConflicts"
|
||||||
:conflictSelected="conflictSelected"
|
|
||||||
@conflict-details="conflictDetails"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -80,7 +78,6 @@ const handleTabChange = (tab) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const headerSchema = ref({});
|
const headerSchema = ref({});
|
||||||
const conflictSelected = ref({});
|
|
||||||
headerSchema.value = {
|
headerSchema.value = {
|
||||||
breadcrumb: true,
|
breadcrumb: true,
|
||||||
logo: false,
|
logo: false,
|
||||||
|
|
@ -130,16 +127,11 @@ const getListConflict = async (textSearch = "", filterExtended = "") => {
|
||||||
);
|
);
|
||||||
console.log("res", res);
|
console.log("res", res);
|
||||||
|
|
||||||
listConflicts.value = res.hits;
|
listConflicts.value = res;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("خطا در دریافت داده:", err);
|
console.error("خطا در دریافت داده:", err);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function conflictDetails(event) {
|
|
||||||
conflictSelected.value = event;
|
|
||||||
activeTabKey.value = "RelationEdit";
|
|
||||||
console.log("event", event);
|
|
||||||
}
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getListConflict();
|
getListConflict();
|
||||||
activeTabKey.value = headerTabs.value[0]?.id || "";
|
activeTabKey.value = headerTabs.value[0]?.id || "";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user