Compare commits
9 Commits
50cf02890a
...
b09ead1f12
| Author | SHA1 | Date | |
|---|---|---|---|
| b09ead1f12 | |||
| dedd9c6d98 | |||
|
|
163da9f589 | ||
|
|
5ae16d04ab | ||
|
|
44168bd5ec | ||
|
|
7205931f30 | ||
|
|
7c684be671 | ||
|
|
cca8dfc457 | ||
|
|
aa659d8aa8 |
|
|
@ -34,20 +34,12 @@
|
|||
emitHandler('dropdown-setting', { data: val })
|
||||
"
|
||||
/>
|
||||
<div
|
||||
v-else-if="headItem.key === 'label'"
|
||||
class="mr-3"
|
||||
v-tooltip="headItem.tooltip || ''"
|
||||
>
|
||||
<div v-else-if="headItem.key === 'label'" class="mr-3">
|
||||
<span class="text-primary font-medium px-3">{{
|
||||
headItem.label
|
||||
}}</span>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="headItem.key === 'text'"
|
||||
class="mr-3"
|
||||
v-tooltip="headItem.tooltip || ''"
|
||||
>
|
||||
<div v-else-if="headItem.key === 'text'" class="mr-3">
|
||||
<span class="text-primary font-medium px-3"
|
||||
>{{ headItem.label }}:</span
|
||||
>
|
||||
|
|
@ -95,7 +87,6 @@
|
|||
v-else-if="headItem.key === 'icon'"
|
||||
class="btn p-2 rounded hover:text-primary transition-colors"
|
||||
:title="headItem.label"
|
||||
v-tooltip="headItem.tooltip || ''"
|
||||
@click="emitHandler('icon-click', { data: headItem })"
|
||||
>
|
||||
<!-- <svg :class="'icon icon-' + headItem.icon">
|
||||
|
|
@ -133,10 +124,7 @@
|
|||
"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="headItem.key === 'button'"
|
||||
v-tooltip="headItem.tooltip || ''"
|
||||
>
|
||||
<div v-else-if="headItem.key === 'button'">
|
||||
<button
|
||||
class="btn bg-primary text-white px-3 py-1 rounded hover:bg-primary-dark"
|
||||
@click="
|
||||
|
|
@ -146,10 +134,7 @@
|
|||
{{ headItem.label }}
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="headItem.key === 'iconButton'"
|
||||
v-tooltip="headItem.tooltip || ''"
|
||||
>
|
||||
<div v-else-if="headItem.key === 'iconButton'">
|
||||
<button
|
||||
class="btn flex items-center gap-1 px-2 py-1 rounded hover:text-primary"
|
||||
@click="
|
||||
|
|
@ -248,20 +233,12 @@
|
|||
emitHandler('dropdown-setting', { data: val })
|
||||
"
|
||||
/>
|
||||
<div
|
||||
v-else-if="my_item.key === 'label'"
|
||||
class="mr-3"
|
||||
v-tooltip="my_item.tooltip || ''"
|
||||
>
|
||||
<div v-else-if="my_item.key === 'label'" class="mr-3">
|
||||
<span class="text-primary font-medium px-3">{{
|
||||
my_item.label
|
||||
}}</span>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="my_item.key === 'text'"
|
||||
class="mr-3"
|
||||
v-tooltip="my_item.tooltip || ''"
|
||||
>
|
||||
<div v-else-if="my_item.key === 'text'" class="mr-3">
|
||||
<span class="text-primary font-medium px-3"
|
||||
>{{ my_item.label }}:</span
|
||||
>
|
||||
|
|
@ -310,7 +287,6 @@
|
|||
v-else-if="my_item.key === 'icon'"
|
||||
class="btn p-2 rounded hover:text-primary transition-colors"
|
||||
:title="my_item.label"
|
||||
v-tooltip="my_item.tooltip || ''"
|
||||
@click="emitHandler('icon-click', { data: my_item })"
|
||||
>
|
||||
<!-- <svg :class="'icon icon-' + my_item.icon">
|
||||
|
|
@ -343,10 +319,7 @@
|
|||
"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="my_item.key === 'button'"
|
||||
v-tooltip="my_item.tooltip || ''"
|
||||
>
|
||||
<div v-else-if="my_item.key === 'button'">
|
||||
<button
|
||||
class="btn bg-primary text-white px-3 py-1 rounded hover:bg-primary-dark"
|
||||
@click="
|
||||
|
|
@ -356,10 +329,7 @@
|
|||
{{ my_item.label }}
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="my_item.key === 'iconButton'"
|
||||
v-tooltip="my_item.tooltip || ''"
|
||||
>
|
||||
<div v-else-if="my_item.key === 'iconButton'">
|
||||
<button
|
||||
class="btn flex items-center gap-1 px-2 py-1 rounded hover:text-primary"
|
||||
@click="
|
||||
|
|
|
|||
|
|
@ -185,7 +185,6 @@ onMounted(fetchItems);
|
|||
}
|
||||
}
|
||||
.i-lucide\:check {
|
||||
color: #22c55e;
|
||||
stroke: #22c55e;
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- تولبار ادیتور -->
|
||||
<div class="editor-toolbar" v-if="editor">
|
||||
<!-- <div class="editor-toolbar" v-if="editor">
|
||||
<div
|
||||
class="toolbar-group"
|
||||
v-for="(group, gIndex) in toolbarGroups"
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
<span class="toolbar-icon">{{ btn.icon }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<editor-content :editor="editor" class="editor-content" />
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -248,7 +248,14 @@ function formatContent(content) {
|
|||
}
|
||||
|
||||
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>`;
|
||||
if (item.tag) {
|
||||
html += `<a class="tag" target="normal" @click.stop="true" > ${item.tag} </a>`;
|
||||
|
|
@ -279,8 +286,7 @@ function generateDetailsHtml(item) {
|
|||
function loadFromJson() {
|
||||
if (!editor.value) return;
|
||||
|
||||
let html =
|
||||
'<p style="margin-bottom: 1.5rem; color: var(--color-dark-primary-700);"></p>';
|
||||
let html = "";
|
||||
|
||||
props.accordionData.forEach((item) => {
|
||||
html += generateDetailsHtml(item);
|
||||
|
|
@ -515,6 +521,16 @@ onBeforeUnmount(() => {
|
|||
}
|
||||
}
|
||||
|
||||
.b_color1{
|
||||
background: rgb(227, 242, 253)
|
||||
}
|
||||
.b_color2{
|
||||
background: rgb(232, 245, 233)
|
||||
}
|
||||
.b_color3{
|
||||
background: rgb(243, 229, 245)
|
||||
}
|
||||
|
||||
/* استایل آکاردئونها */
|
||||
.custom-details {
|
||||
position: relative;
|
||||
|
|
|
|||
|
|
@ -40,9 +40,125 @@ const myContentSchema = computed(() => {
|
|||
pagination: props.pagination,
|
||||
};
|
||||
});
|
||||
// const headerTools = computed(() => [
|
||||
// {
|
||||
// items: [
|
||||
// // {
|
||||
// // key: "label",
|
||||
// // label: "کد :",
|
||||
// // tooltip: "عنوان صفحه",
|
||||
// // },
|
||||
// {
|
||||
// type: "dropdown",
|
||||
// key: "dropdown",
|
||||
// name: "refine_codes",
|
||||
// dropdownSchema: {
|
||||
// width: "18em",
|
||||
// modelValue: null, // ✅ اینو بذار
|
||||
// optionAttribute: "title",
|
||||
// valueAttribute: "value",
|
||||
// searchable: false,
|
||||
// placeholder: "انتخاب کنید",
|
||||
// items: refineCodes,
|
||||
// },
|
||||
// },
|
||||
// // {
|
||||
// // key: "label",
|
||||
// // label: "نوع رابطه :",
|
||||
// // tooltip: "عنوان صفحه",
|
||||
// // },
|
||||
// {
|
||||
// type: "dropdown",
|
||||
// key: "dropdown",
|
||||
// name: "refine_codes",
|
||||
// dropdownSchema: {
|
||||
// width: "18em",
|
||||
// modelValue: null, // ✅ اینو بذار
|
||||
// optionAttribute: "title",
|
||||
// valueAttribute: "value",
|
||||
// searchable: false,
|
||||
// placeholder: "انتخاب کنید",
|
||||
// items: [
|
||||
// { label: " تعارض مستقر", value: "stable" },
|
||||
// { label: "تعارض مشروط", value: "conditional" },
|
||||
// { label: "تکرار حکم", value: "duplicate" },
|
||||
// ],
|
||||
// },
|
||||
// },
|
||||
// // {
|
||||
// // key: "label",
|
||||
// // label: " وضعیت اعتبار:",
|
||||
// // tooltip: "عنوان صفحه",
|
||||
// // },
|
||||
// {
|
||||
// type: "dropdown",
|
||||
// key: "dropdown",
|
||||
// name: "refine_codes",
|
||||
// dropdownSchema: {
|
||||
// width: "18em",
|
||||
// modelValue: null, // ✅ اینو بذار
|
||||
// optionAttribute: "title",
|
||||
// valueAttribute: "value",
|
||||
// searchable: false,
|
||||
// placeholder: "انتخاب کنید",
|
||||
// items: [
|
||||
// { label: "نامعتبر", value: "invalid" },
|
||||
// { label: "معتبر", value: "valid" },
|
||||
// ],
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// key: "autoComplation",
|
||||
// placeholder: "جستجوی ...",
|
||||
// debounceTime: 500,
|
||||
// // autocompleteUrl: "/repo/monir/complation/sanad",
|
||||
// minCharsForAutocomplete: 3,
|
||||
// maxHistoryItems: 20,
|
||||
// showSearchButton: false,
|
||||
// filters: [
|
||||
// {
|
||||
// label: "همه اجزاء",
|
||||
// value: "all",
|
||||
// },
|
||||
// {
|
||||
// label: "عنوان جلسه",
|
||||
// value: "title",
|
||||
// },
|
||||
// {
|
||||
// label: "عنوان دوره",
|
||||
// value: "branch",
|
||||
// },
|
||||
// {
|
||||
// label: " فقط فهرست",
|
||||
// value: "mindex",
|
||||
// },
|
||||
// {
|
||||
// label: " فقط کدها",
|
||||
// value: "codes",
|
||||
// },
|
||||
// {
|
||||
// label: " دوره",
|
||||
// value: "advance",
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// // {
|
||||
// // key: "prevNext",
|
||||
// // name: "entityNavigator",
|
||||
// // prevDisabled: false,
|
||||
// // nextDisabled: true,
|
||||
// // },
|
||||
// ],
|
||||
// },
|
||||
// ]);
|
||||
const headerTools = computed(() => [
|
||||
[
|
||||
{
|
||||
items: [
|
||||
{
|
||||
key: "label",
|
||||
label: "کد: ",
|
||||
},
|
||||
{
|
||||
type: "dropdown",
|
||||
key: "dropdown",
|
||||
|
|
@ -57,6 +173,55 @@ const headerTools = computed(() => [
|
|||
items: refineCodes,
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "label",
|
||||
label: "نوع رابطه :",
|
||||
},
|
||||
{
|
||||
type: "dropdown",
|
||||
key: "dropdown",
|
||||
name: "refine_codes",
|
||||
dropdownSchema: {
|
||||
width: "10em",
|
||||
modelValue: null, // ✅ اینو بذار
|
||||
optionAttribute: "title",
|
||||
valueAttribute: "value",
|
||||
searchable: false,
|
||||
placeholder: "انتخاب کنید",
|
||||
items: [
|
||||
{ label: " همه", value: "all" },
|
||||
{ label: " تعارض مستقر", value: "stable" },
|
||||
{ label: "تعارض مشروط", value: "conditional" },
|
||||
{ label: "تکرار حکم", value: "duplicate" },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "label",
|
||||
label: " وضعیت اعتبار:",
|
||||
},
|
||||
{
|
||||
type: "dropdown",
|
||||
key: "dropdown",
|
||||
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" },
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
key: "autoComplation",
|
||||
placeholder: "جستجوی ...",
|
||||
|
|
@ -70,36 +235,17 @@ const headerTools = computed(() => [
|
|||
label: "همه اجزاء",
|
||||
value: "all",
|
||||
},
|
||||
{
|
||||
label: "عنوان جلسه",
|
||||
value: "title",
|
||||
},
|
||||
{
|
||||
label: "عنوان دوره",
|
||||
value: "branch",
|
||||
},
|
||||
{
|
||||
label: " فقط فهرست",
|
||||
value: "mindex",
|
||||
},
|
||||
{
|
||||
label: " فقط کدها",
|
||||
value: "codes",
|
||||
},
|
||||
{
|
||||
label: " دوره",
|
||||
value: "advance",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: "prevNext",
|
||||
name: "entityNavigator",
|
||||
prevDisabled: false,
|
||||
nextDisabled: true,
|
||||
},
|
||||
// {
|
||||
// key: "prevNext",
|
||||
// name: "entityNavigator",
|
||||
// prevDisabled: false,
|
||||
// nextDisabled: true,
|
||||
// },
|
||||
],
|
||||
},
|
||||
],
|
||||
]);
|
||||
|
||||
function headerToolsAction({ action, data }) {
|
||||
|
|
|
|||
|
|
@ -54,9 +54,14 @@ const setDataEditor = async () => {
|
|||
if (_source.previous_info) {
|
||||
let item = _source.previous_info;
|
||||
node = {
|
||||
background:"b_color1",
|
||||
isOpen: false,
|
||||
id: item.section_mom_id,
|
||||
title: `<a class="label" href="#">قانون مقدم : </a>` + item.qanon_title + " - " + item.full_path,
|
||||
title:
|
||||
`<a class="label" href="#">قانون مقدم : </a>` +
|
||||
item.qanon_title +
|
||||
" - " +
|
||||
item.full_path,
|
||||
tag: item.state_etebar,
|
||||
content: _source.content1,
|
||||
link_label: "«منبع»",
|
||||
|
|
@ -66,6 +71,7 @@ const setDataEditor = async () => {
|
|||
children: [],
|
||||
};
|
||||
|
||||
if (item.group_section_ids?.length > 1)
|
||||
node["children"].push({
|
||||
isOpen: false,
|
||||
id: item.context_id,
|
||||
|
|
@ -75,7 +81,11 @@ 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,
|
||||
|
|
@ -89,9 +99,14 @@ const setDataEditor = async () => {
|
|||
if (_source.next_info) {
|
||||
let item = _source.next_info;
|
||||
node = {
|
||||
background:"b_color2",
|
||||
isOpen: false,
|
||||
id: item.section_mom_id,
|
||||
title: `<a class="label">قانون موخر : </a>` + item.qanon_title + " - " + item.full_path,
|
||||
title:
|
||||
`<a class="label">قانون موخر : </a>` +
|
||||
item.qanon_title +
|
||||
" - " +
|
||||
item.full_path,
|
||||
tag: item.state_etebar,
|
||||
content: _source.content2,
|
||||
link_label: "«منبع»",
|
||||
|
|
@ -100,6 +115,8 @@ const setDataEditor = async () => {
|
|||
.replace("{{section_id}}", item.section_mom_id),
|
||||
children: [],
|
||||
};
|
||||
|
||||
if (item.group_section_ids?.length > 1)
|
||||
node["children"].push({
|
||||
isOpen: false,
|
||||
id: item.context_id,
|
||||
|
|
@ -122,6 +139,7 @@ const setDataEditor = async () => {
|
|||
|
||||
/////-------------وحدت موضوع----------------------
|
||||
node = {
|
||||
background:"b_color3",
|
||||
isOpen: true,
|
||||
id: 11,
|
||||
title: "توضیح هوشمند برای وجود وحدت موضوع بین احکام استنادی ",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user