Compare commits

..

4 Commits

Author SHA1 Message Date
0468739cdc 1 2026-02-15 14:54:02 +03:30
c9921178b9 Merge branch 'shadi/conflict' of https://git2.tavasi.ir/Baghi/conflict-nuxt-4 into main 2026-02-14 19:29:30 +03:30
990d31ced2 1 2026-02-14 19:29:21 +03:30
Mehdi104797
6d651dd65a myHeaderToolsMultiselectClick 2026-02-14 15:44:00 +03:30
8 changed files with 94 additions and 131 deletions

View File

@ -108,20 +108,7 @@
<MySelect
v-model:dropdownSchema="headItem.dropdownSchema"
:selectSchema="headItem.dropdownSchema"
@dropdownSelectEvents="
(event) => {
if (!event) return;
if (event.action !== 'change') return;
emitHandler('multiselect-click', {
data: {
name: headItem.name,
value: event.payload,
item: headItem,
},
});
}
"
@my-select-action="mySelectAction($event, headItem)"
/>
</div>
<div v-else-if="headItem.key === 'button'">
@ -304,19 +291,7 @@
<MySelect
v-model:dropdownSelectConfig="my_item.dropdownSchema"
:selectSchema="my_item.dropdownSchema"
@dropdownSelectEvents="
(event) => {
if (event.action !== 'change') return;
emitHandler('multiselect-click', {
data: {
name: my_item.name,
value: event.payload,
item: my_item,
},
});
}
"
@my-select-action="mySelectAction($event, headItem)"
/>
</div>
<div v-else-if="my_item.key === 'button'">
@ -434,6 +409,17 @@ function emitHandler(action, payload) {
data: payload.data,
});
}
function mySelectAction(event, payload) {
if (event.action !== "selected") return;
emitHandler("multiselect-click", {
data: {
name: payload.name,
value: event.payload,
item: payload,
},
});
}
const selectedTabDetails = ref(null);
const localEntity = computed(() => props.entity || {});

View File

@ -30,6 +30,8 @@ const props = defineProps({
const emit = defineEmits(["my-select-action"]);
const emitAction = (action, payload) => {
// console.log("payloadیییی ==> ", payload);
// console.log("actionیییی ==> ", action);
emit("my-select-action", { action, payload });
};

View File

@ -248,19 +248,12 @@ function formatContent(content) {
}
function generateDetailsHtml(item) {
let html = `<details class="custom-details #bcolor# " ${item.isOpen ? "open" : ""}>`;
if(item.background)
html.replace("#bcolor#", item.background)
else
html.replace("#bcolor#", "")
let html = `<details class="custom-details" ${item.isOpen ? "open" : ""}>`;
html += `<summary>`;
if (item.tag) {
html += `<a class="tag" target="normal" @click.stop="true" > ${item.tag} </a>`;
// console.log(" html 1 ", html);
}
html += `${item.title || "بدون عنوان"}`;
@ -279,6 +272,11 @@ function generateDetailsHtml(item) {
html += `</details>`;
if(item.background)
html = html.replaceAll("#bcolor#", item.background)
else
html = html.replaceAll("#bcolor#", "")
// console.log(" html 10 ", html);
return html;
}
@ -521,14 +519,14 @@ onBeforeUnmount(() => {
}
}
.b_color1{
background: rgb(227, 242, 253)
.bcolor1{
background: rgb(227, 242, 253) !important;
}
.b_color2{
background: rgb(232, 245, 233)
.bcolor2{
background: rgb(232, 245, 233) !important;
}
.b_color3{
background: rgb(243, 229, 245)
.bcolor3{
background: rgb(243, 229, 245) !important;
}
/* استایل آکاردئون‌ها */

View File

@ -180,7 +180,7 @@ const headerTools = computed(() => [
{
type: "dropdown",
key: "dropdown",
name: "refine_codes",
name: "refine_conflict",
dropdownSchema: {
width: "10em",
modelValue: null, // اینو بذار
@ -190,20 +190,44 @@ const headerTools = computed(() => [
placeholder: "انتخاب کنید",
items: [
{ label: " همه", value: "all" },
{ label: " تعارض مستقر", value: "stable" },
{ label: "تعارض مشروط", value: "conditional" },
{ label: "تکرار حکم", value: "duplicate" },
{ label: "تعارض مستقر", value: "تعارض مستقر" },
{ label: "مطلق مقدم، مقید موخر", value: "مطلق مقدم، مقید موخر" },
{ label: "مقید مقدم، مطلق موخر", value: "مقید مقدم، مطلق موخر" },
{ label: "تکرار حکم", value: "تکرار حکم" },
{ label: "بدون تعارض", value: "بدون تعارض" },
],
},
},
{
key: "label",
label: " وضعیت اعتبار:",
label: "اعتبار داتیک:",
},
{
type: "dropdown",
key: "dropdown",
name: "refine_codes",
name: "state_etebar",
dropdownSchema: {
width: "8em",
modelValue: null, // اینو بذار
optionAttribute: "title",
valueAttribute: "value",
searchable: false,
placeholder: "انتخاب کنید",
items: [
{ label: " همه", value: "all" },
{ label: "نامعتبر", value: "invalid" },
{ label: "معتبر", value: "valid" },
],
},
},
{
key: "label",
label: "اعتبار تشخیصی:",
},
{
type: "dropdown",
key: "dropdown",
name: "refine_valid",
dropdownSchema: {
width: "8em",
modelValue: null, // اینو بذار
@ -255,12 +279,21 @@ function headerToolsAction({ action, data }) {
emit("my-header-tools-search", data.item);
}
}
if (action === "prev-click") {
} else if (action == "multiselect-click" && data.value) {
if (data.name == "refine_valid") {
emit("my-header-tools-multiselect-click", data);
} else if (data.name == "refine_conflict") {
emit("my-header-tools-multiselect-click", data);
} else if (data.name == "refine_codes") {
emit("my-header-tools-multiselect-click", data);
}
}
if (action === "next-click") {
}
// if (action === "prev-click") {
// }
// if (action === "next-click") {
// }
}
function myContentAction({ action, payload }) {
if (action === "conflict_Details") {

View File

@ -51,14 +51,15 @@ const setDataEditor = async () => {
accordionItems.value = [];
let node = {};
/////-----------------------------------------
if (_source.previous_info) {
let item = _source.previous_info;
node = {
background:"b_color1",
background:"bcolor1",
isOpen: false,
id: item.section_mom_id,
title:
`<a class="label" href="#">قانون مقدم : </a>` +
`<a class="label #bcolor# " href="#">قانون مقدم : </a>` +
item.qanon_title +
" - " +
item.full_path,
@ -96,14 +97,15 @@ const setDataEditor = async () => {
});
}
/////-----------------------------------------
if (_source.next_info) {
let item = _source.next_info;
node = {
background:"b_color2",
background:"bcolor2",
isOpen: false,
id: item.section_mom_id,
title:
`<a class="label">قانون موخر : </a>` +
`<a class="label #bcolor# " href="#">قانون موخر : </a>` +
item.qanon_title +
" - " +
item.full_path,
@ -126,7 +128,12 @@ const setDataEditor = async () => {
accordionItems.value.push(node);
let unrepeat_id = {}
item.rule_ids.forEach((rule_id) => {
if(unrepeat_id[rule_id])
return
unrepeat_id[rule_id] = 1
let content = _source.rules_content[rule_id] ?? "";
accordionItems.value.push({
isOpen: false,
@ -139,7 +146,7 @@ const setDataEditor = async () => {
/////-------------وحدت موضوع----------------------
node = {
background:"b_color3",
background:"bcolor3",
isOpen: true,
id: 11,
title: "توضیح هوشمند برای وجود وحدت موضوع بین احکام استنادی ",

View File

@ -23,13 +23,13 @@
},
{ "key": "next_info.full_path", "title": "ماده موخر", "width": "1" },
{
"key": "subject_unity.main_type",
"title": "وضعیت وحدت موضوع",
"key": "conflict_relation_identification.main_type",
"title": "تعارض- بررسی اول",
"width": "2"
},
{
"key": "conflict_relation_identification.main_type",
"title": "تعارض",
"key": "conflict_evaluation.main_type",
"title": "تعارض -بررسی نهایی",
"width": "2"
}
],

View File

@ -20,6 +20,8 @@
@conflict-details="conflictDetails"
@my-content-action="myContentAction"
@my-header-tools-search="myHeaderToolsSearch"
@my-header-tools-multiselect-click="myHeaderToolsMultiselectClick"
/>
</div>
</template>
@ -169,7 +171,11 @@ function myContentAction({ action, payload }) {
}
}
function myHeaderToolsSearch(textSearch) {
console.log("dataqqqq ==> ", textSearch);
getListConflict(textSearch);
}
function myHeaderToolsMultiselectClick(textSearch) {
console.log("dataqqqq ==> ", textSearch);
}
</script>

View File

@ -1,69 +0,0 @@
<template>
<div
class="min-h-[calc(100dvh-4em)] flex items-center justify-center p-4 bg-gray-100 dark:bg-dark-primary"
>
<div
class="max-w-md w-full bg-white dark:bg-dark-primary-800 rounded-2xl shadow-xl p-8 text-center border border-gray-200 dark:border-dark-primary-600"
>
<!-- Tabs -->
<ul class="flex border-b border-gray-200">
<li class="flex-1">
<button
class="w-full py-3.5 font-medium transition-all duration-200 cursor-pointer"
:class="tabClass('login')"
@click="setActive('login')"
>
ورود
</button>
</li>
<li class="flex-1">
<button
class="w-full py-3.5 font-medium transition-all duration-200 cursor-pointer"
:class="tabClass('register')"
@click="setActive('register')"
>
ثبتنام
</button>
</li>
</ul>
<!-- Content -->
<div class="mt-8">
<component :is="currentComponent" />
</div>
</div>
</div>
</template>
<script setup>
import { ref } from "vue";
definePageMeta({ layout: "login-layout" });
// --- Lazy load components ---
import LoginForm from "~/components/lazy-load/auth/LoginForm.vue";
import RegisterForm from "~/components/lazy-load/auth/RegisterForm.vue";
// --- State ---
const activeTab = ref("login");
const currentComponent = ref(LoginForm);
const componentsMap = {
login: LoginForm,
register: RegisterForm,
};
// --- Methods ---
function setActive(tab) {
activeTab.value = tab;
currentComponent.value = componentsMap[tab];
}
// --- Compute class for tabs ---
function tabClass(tab) {
if (activeTab.value === tab) {
return "text-primary border-b-1 border-primary font-semibold";
} else {
return "text-gray-500 hover:text-primary";
}
}
</script>
<style></style>