87 lines
1.9 KiB
Vue
87 lines
1.9 KiB
Vue
<template>
|
|
<div>
|
|
<HeaderTools
|
|
:header-tools="headerTools"
|
|
@header-tools-action="headerToolsAction"
|
|
></HeaderTools>
|
|
<div class="p-4 pt-0 w-full lg:flex-1">
|
|
<MyContent
|
|
:mainSchema="myContentSchema"
|
|
:pagination="pagination"
|
|
@my-content-action="myContentAction"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
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();
|
|
const props = defineProps({
|
|
listConflicts: {
|
|
type: Array,
|
|
default: () => [],
|
|
},
|
|
pagination: {
|
|
type: Object,
|
|
default: () => {},
|
|
},
|
|
});
|
|
const emit = defineEmits(["conflict-details"]);
|
|
|
|
const myContentSchema = computed(() => {
|
|
const baseSchema = JSON.parse(JSON.stringify(myContentJson));
|
|
|
|
return {
|
|
...baseSchema,
|
|
items: props.listConflicts?.hits ?? [],
|
|
pagination: props.pagination,
|
|
};
|
|
});
|
|
const headerTools = computed(() => [
|
|
{
|
|
items: [
|
|
{
|
|
type: "dropdown",
|
|
key: "dropdown",
|
|
name: "refine_codes",
|
|
dropdownSchema: {
|
|
width: "18em",
|
|
modelValue: null, // ✅ اینو بذار
|
|
optionAttribute: "title",
|
|
valueAttribute: "value",
|
|
searchable: false,
|
|
placeholder: "انتخاب کنید",
|
|
items: refineCodes,
|
|
},
|
|
},
|
|
{
|
|
key: "prevNext",
|
|
name: "entityNavigator",
|
|
prevDisabled: false,
|
|
nextDisabled: true,
|
|
},
|
|
],
|
|
},
|
|
]);
|
|
|
|
function headerToolsAction({ action, data }) {
|
|
if (action === "prev-click") {
|
|
}
|
|
|
|
if (action === "next-click") {
|
|
}
|
|
}
|
|
function myContentAction({ action, payload }) {
|
|
if (action === "conflict_Details") {
|
|
emit("conflict-details", payload);
|
|
} else {
|
|
emit("my-content-action", { action, payload });
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss"></style>
|