Compare commits
No commits in common. "main" and "Baghi/conflict" have entirely different histories.
main
...
Baghi/conf
|
|
@ -108,7 +108,20 @@
|
||||||
<MySelect
|
<MySelect
|
||||||
v-model:dropdownSchema="headItem.dropdownSchema"
|
v-model:dropdownSchema="headItem.dropdownSchema"
|
||||||
:selectSchema="headItem.dropdownSchema"
|
:selectSchema="headItem.dropdownSchema"
|
||||||
@my-select-action="mySelectAction($event, headItem)"
|
@dropdownSelectEvents="
|
||||||
|
(event) => {
|
||||||
|
if (!event) return;
|
||||||
|
if (event.action !== 'change') return;
|
||||||
|
|
||||||
|
emitHandler('multiselect-click', {
|
||||||
|
data: {
|
||||||
|
name: headItem.name,
|
||||||
|
value: event.payload,
|
||||||
|
item: headItem,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="headItem.key === 'button'">
|
<div v-else-if="headItem.key === 'button'">
|
||||||
|
|
@ -291,7 +304,19 @@
|
||||||
<MySelect
|
<MySelect
|
||||||
v-model:dropdownSelectConfig="my_item.dropdownSchema"
|
v-model:dropdownSelectConfig="my_item.dropdownSchema"
|
||||||
:selectSchema="my_item.dropdownSchema"
|
:selectSchema="my_item.dropdownSchema"
|
||||||
@my-select-action="mySelectAction($event, headItem)"
|
@dropdownSelectEvents="
|
||||||
|
(event) => {
|
||||||
|
if (event.action !== 'change') return;
|
||||||
|
|
||||||
|
emitHandler('multiselect-click', {
|
||||||
|
data: {
|
||||||
|
name: my_item.name,
|
||||||
|
value: event.payload,
|
||||||
|
item: my_item,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="my_item.key === 'button'">
|
<div v-else-if="my_item.key === 'button'">
|
||||||
|
|
@ -409,17 +434,6 @@ function emitHandler(action, payload) {
|
||||||
data: payload.data,
|
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 selectedTabDetails = ref(null);
|
||||||
const localEntity = computed(() => props.entity || {});
|
const localEntity = computed(() => props.entity || {});
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,6 @@ const props = defineProps({
|
||||||
|
|
||||||
const emit = defineEmits(["my-select-action"]);
|
const emit = defineEmits(["my-select-action"]);
|
||||||
const emitAction = (action, payload) => {
|
const emitAction = (action, payload) => {
|
||||||
// console.log("payloadیییی ==> ", payload);
|
|
||||||
// console.log("actionیییی ==> ", action);
|
|
||||||
emit("my-select-action", { action, payload });
|
emit("my-select-action", { action, payload });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -248,12 +248,19 @@ function formatContent(content) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateDetailsHtml(item) {
|
function generateDetailsHtml(item) {
|
||||||
let html = `<details class="custom-details" ${item.isOpen ? "open" : ""}>`;
|
let html = `<details class="custom-details #bcolor# " ${item.isOpen ? "open" : ""}>`;
|
||||||
|
if(item.background)
|
||||||
|
html.replace("#bcolor#", item.background)
|
||||||
|
else
|
||||||
|
html.replace("#bcolor#", "")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
html += `<summary>`;
|
html += `<summary>`;
|
||||||
if (item.tag) {
|
if (item.tag) {
|
||||||
html += `<a class="tag" target="normal" @click.stop="true" > ${item.tag} </a>`;
|
html += `<a class="tag" target="normal" @click.stop="true" > ${item.tag} </a>`;
|
||||||
// console.log(" html 1 ", html);
|
// console.log(" html 1 ", html);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
html += `${item.title || "بدون عنوان"}`;
|
html += `${item.title || "بدون عنوان"}`;
|
||||||
|
|
@ -272,11 +279,6 @@ function generateDetailsHtml(item) {
|
||||||
|
|
||||||
html += `</details>`;
|
html += `</details>`;
|
||||||
|
|
||||||
if(item.background)
|
|
||||||
html = html.replaceAll("#bcolor#", item.background)
|
|
||||||
else
|
|
||||||
html = html.replaceAll("#bcolor#", "")
|
|
||||||
|
|
||||||
// console.log(" html 10 ", html);
|
// console.log(" html 10 ", html);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
@ -519,14 +521,14 @@ onBeforeUnmount(() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bcolor1{
|
.b_color1{
|
||||||
background: rgb(227, 242, 253) !important;
|
background: rgb(227, 242, 253)
|
||||||
}
|
}
|
||||||
.bcolor2{
|
.b_color2{
|
||||||
background: rgb(232, 245, 233) !important;
|
background: rgb(232, 245, 233)
|
||||||
}
|
}
|
||||||
.bcolor3{
|
.b_color3{
|
||||||
background: rgb(243, 229, 245) !important;
|
background: rgb(243, 229, 245)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* استایل آکاردئونها */
|
/* استایل آکاردئونها */
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ const headerTools = computed(() => [
|
||||||
{
|
{
|
||||||
type: "dropdown",
|
type: "dropdown",
|
||||||
key: "dropdown",
|
key: "dropdown",
|
||||||
name: "refine_conflict",
|
name: "refine_codes",
|
||||||
dropdownSchema: {
|
dropdownSchema: {
|
||||||
width: "10em",
|
width: "10em",
|
||||||
modelValue: null, // ✅ اینو بذار
|
modelValue: null, // ✅ اینو بذار
|
||||||
|
|
@ -190,44 +190,20 @@ const headerTools = computed(() => [
|
||||||
placeholder: "انتخاب کنید",
|
placeholder: "انتخاب کنید",
|
||||||
items: [
|
items: [
|
||||||
{ label: " همه", value: "all" },
|
{ label: " همه", value: "all" },
|
||||||
{ label: "تعارض مستقر", value: "تعارض مستقر" },
|
{ label: " تعارض مستقر", value: "stable" },
|
||||||
{ label: "مطلق مقدم، مقید موخر", value: "مطلق مقدم، مقید موخر" },
|
{ label: "تعارض مشروط", value: "conditional" },
|
||||||
{ label: "مقید مقدم، مطلق موخر", value: "مقید مقدم، مطلق موخر" },
|
{ label: "تکرار حکم", value: "duplicate" },
|
||||||
{ label: "تکرار حکم", value: "تکرار حکم" },
|
|
||||||
{ label: "بدون تعارض", value: "بدون تعارض" },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "label",
|
key: "label",
|
||||||
label: "اعتبار داتیک:",
|
label: " وضعیت اعتبار:",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "dropdown",
|
type: "dropdown",
|
||||||
key: "dropdown",
|
key: "dropdown",
|
||||||
name: "state_etebar",
|
name: "refine_codes",
|
||||||
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: {
|
dropdownSchema: {
|
||||||
width: "8em",
|
width: "8em",
|
||||||
modelValue: null, // ✅ اینو بذار
|
modelValue: null, // ✅ اینو بذار
|
||||||
|
|
@ -279,21 +255,12 @@ function headerToolsAction({ action, data }) {
|
||||||
|
|
||||||
emit("my-header-tools-search", data.item);
|
emit("my-header-tools-search", data.item);
|
||||||
}
|
}
|
||||||
} else if (action == "multiselect-click" && data.value) {
|
}
|
||||||
if (data.name == "refine_valid") {
|
if (action === "prev-click") {
|
||||||
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 === "prev-click") {
|
if (action === "next-click") {
|
||||||
// }
|
}
|
||||||
|
|
||||||
// if (action === "next-click") {
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
function myContentAction({ action, payload }) {
|
function myContentAction({ action, payload }) {
|
||||||
if (action === "conflict_Details") {
|
if (action === "conflict_Details") {
|
||||||
|
|
|
||||||
|
|
@ -51,15 +51,14 @@ const setDataEditor = async () => {
|
||||||
accordionItems.value = [];
|
accordionItems.value = [];
|
||||||
let node = {};
|
let node = {};
|
||||||
|
|
||||||
/////-----------------------------------------
|
|
||||||
if (_source.previous_info) {
|
if (_source.previous_info) {
|
||||||
let item = _source.previous_info;
|
let item = _source.previous_info;
|
||||||
node = {
|
node = {
|
||||||
background:"bcolor1",
|
background:"b_color1",
|
||||||
isOpen: false,
|
isOpen: false,
|
||||||
id: item.section_mom_id,
|
id: item.section_mom_id,
|
||||||
title:
|
title:
|
||||||
`<a class="label #bcolor# " href="#">قانون مقدم : </a>` +
|
`<a class="label" href="#">قانون مقدم : </a>` +
|
||||||
item.qanon_title +
|
item.qanon_title +
|
||||||
" - " +
|
" - " +
|
||||||
item.full_path,
|
item.full_path,
|
||||||
|
|
@ -97,15 +96,14 @@ const setDataEditor = async () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/////-----------------------------------------
|
|
||||||
if (_source.next_info) {
|
if (_source.next_info) {
|
||||||
let item = _source.next_info;
|
let item = _source.next_info;
|
||||||
node = {
|
node = {
|
||||||
background:"bcolor2",
|
background:"b_color2",
|
||||||
isOpen: false,
|
isOpen: false,
|
||||||
id: item.section_mom_id,
|
id: item.section_mom_id,
|
||||||
title:
|
title:
|
||||||
`<a class="label #bcolor# " href="#">قانون موخر : </a>` +
|
`<a class="label">قانون موخر : </a>` +
|
||||||
item.qanon_title +
|
item.qanon_title +
|
||||||
" - " +
|
" - " +
|
||||||
item.full_path,
|
item.full_path,
|
||||||
|
|
@ -128,12 +126,7 @@ const setDataEditor = async () => {
|
||||||
|
|
||||||
accordionItems.value.push(node);
|
accordionItems.value.push(node);
|
||||||
|
|
||||||
let unrepeat_id = {}
|
|
||||||
item.rule_ids.forEach((rule_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] ?? "";
|
let content = _source.rules_content[rule_id] ?? "";
|
||||||
accordionItems.value.push({
|
accordionItems.value.push({
|
||||||
isOpen: false,
|
isOpen: false,
|
||||||
|
|
@ -146,7 +139,7 @@ const setDataEditor = async () => {
|
||||||
|
|
||||||
/////-------------وحدت موضوع----------------------
|
/////-------------وحدت موضوع----------------------
|
||||||
node = {
|
node = {
|
||||||
background:"bcolor3",
|
background:"b_color3",
|
||||||
isOpen: true,
|
isOpen: true,
|
||||||
id: 11,
|
id: 11,
|
||||||
title: "توضیح هوشمند برای وجود وحدت موضوع بین احکام استنادی ",
|
title: "توضیح هوشمند برای وجود وحدت موضوع بین احکام استنادی ",
|
||||||
|
|
|
||||||
|
|
@ -21,15 +21,15 @@
|
||||||
"width": "3",
|
"width": "3",
|
||||||
"trancate_word": 10
|
"trancate_word": 10
|
||||||
},
|
},
|
||||||
{ "key": "next_info.full_path", "title": "ماده موخر", "width": "1" },
|
{ "key": "next_info.full_path", "title": "ماده موخر", "width": "1" },
|
||||||
{
|
{
|
||||||
"key": "conflict_relation_identification.main_type",
|
"key": "subject_unity.main_type",
|
||||||
"title": "تعارض- بررسی اول",
|
"title": "وضعیت وحدت موضوع",
|
||||||
"width": "2"
|
"width": "2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "conflict_evaluation.main_type",
|
"key": "conflict_relation_identification.main_type",
|
||||||
"title": "تعارض -بررسی نهایی",
|
"title": "تعارض",
|
||||||
"width": "2"
|
"width": "2"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,6 @@
|
||||||
@conflict-details="conflictDetails"
|
@conflict-details="conflictDetails"
|
||||||
@my-content-action="myContentAction"
|
@my-content-action="myContentAction"
|
||||||
@my-header-tools-search="myHeaderToolsSearch"
|
@my-header-tools-search="myHeaderToolsSearch"
|
||||||
@my-header-tools-multiselect-click="myHeaderToolsMultiselectClick"
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -171,11 +169,7 @@ function myContentAction({ action, payload }) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function myHeaderToolsSearch(textSearch) {
|
function myHeaderToolsSearch(textSearch) {
|
||||||
|
console.log("dataqqqq ==> ", textSearch);
|
||||||
getListConflict(textSearch);
|
getListConflict(textSearch);
|
||||||
}
|
}
|
||||||
function myHeaderToolsMultiselectClick(textSearch) {
|
|
||||||
console.log("dataqqqq ==> ", textSearch);
|
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
69
app/pages/login.vue
Executable file
69
app/pages/login.vue
Executable file
|
|
@ -0,0 +1,69 @@
|
||||||
|
<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>
|
||||||
Loading…
Reference in New Issue
Block a user