children
This commit is contained in:
parent
7fd8cb9a65
commit
2d3534f731
|
|
@ -249,24 +249,20 @@ function generateDetailsHtml(item) {
|
|||
let html = `<details class="custom-details" ${item.isOpen ? "open" : ""}>`;
|
||||
html += `<summary>`;
|
||||
if (item.tag) {
|
||||
html += `<span > ${item.tag} </span>`;
|
||||
html += `<span>${item.tag}</span> `;
|
||||
}
|
||||
|
||||
html += `${escapeHtml(item.title) || "بدون عنوان"}`;
|
||||
if (item.link_url) {
|
||||
html += `<a class="link-url" href="${item.link_url}">${item.link_label}</a>`;
|
||||
}
|
||||
html += "</summary>";
|
||||
html += `</summary>`;
|
||||
|
||||
const formattedContent = formatContent(item.content || "");
|
||||
html += `<div class="details-content">${formattedContent}</div>`;
|
||||
html += formatContent(item.content || "");
|
||||
|
||||
if (item.children && item.children.length > 0) {
|
||||
html += '<div class="children-container">';
|
||||
item.children.forEach((child) => {
|
||||
html += generateDetailsHtml(child);
|
||||
});
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
html += `</details>`;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ const setDataEditor = async () => {
|
|||
base_url += "/entity/show/view/qasection/{{qanon_id}}?jump_id={{section_id}}";
|
||||
|
||||
accordionItems.value = [];
|
||||
let node = {}
|
||||
let node = {};
|
||||
|
||||
if (_source.previous_info) {
|
||||
let item = _source.previous_info;
|
||||
|
|
@ -126,17 +126,15 @@ const setDataEditor = async () => {
|
|||
title: "توضیح هوشمند برای وجود وحدت موضوع بین احکام استنادی ",
|
||||
content: _source.subject_unity.reason,
|
||||
children: [],
|
||||
}
|
||||
|
||||
if(_source.subject_unity.description){
|
||||
};
|
||||
|
||||
if (_source.subject_unity.description) {
|
||||
node["children"].push({
|
||||
isOpen: false,
|
||||
id: item.context_id,
|
||||
title: "شرط اعتبار وحدت موضوع : ",
|
||||
content: _source.subject_unity.description,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
accordionItems.value.push(node);
|
||||
|
|
@ -147,23 +145,23 @@ const setDataEditor = async () => {
|
|||
title: "توضیح وجود تخالف بین دو ماده ",
|
||||
content: _source.conflict_detection.description,
|
||||
children: [],
|
||||
}
|
||||
};
|
||||
|
||||
accordionItems.value.push(node);
|
||||
/////-------------بیان نوع تخالف----------------------
|
||||
node = {
|
||||
isOpen: true,
|
||||
id: 11,
|
||||
title: "بیان نوع تخالف بین دو ماده : " + _source.conflict_relation_identification.main_type,
|
||||
title:
|
||||
"بیان نوع تخالف بین دو ماده : " +
|
||||
_source.conflict_relation_identification.main_type,
|
||||
content: _source.conflict_relation_identification.description,
|
||||
children: [],
|
||||
}
|
||||
};
|
||||
|
||||
accordionItems.value.push(node);
|
||||
/////-----------------------------------
|
||||
|
||||
|
||||
|
||||
console.log("accordionItems", accordionItems.value);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user