This commit is contained in:
Baghi330 2026-02-14 14:27:36 +03:30
parent 32a2bb9e13
commit 7fd8cb9a65

View File

@ -40,144 +40,72 @@ const myContentSchema = computed(() => {
pagination: props.pagination, pagination: props.pagination,
}; };
}); });
const headerTools = ref([ const headerTools = computed(() => [
[ {
{ items: [
items: [ {
{ key: "label", label: "کد:", style: "code-title" }, type: "dropdown",
{ key: "dropdown",
type: "dropdown", name: "refine_codes",
key: "dropdown", dropdownSchema: {
name: "refine_codes", width: "18em",
dropdownSchema: { modelValue: null, // اینو بذار
width: "18em", optionAttribute: "title",
modelValue: null, valueAttribute: "value",
optionAttribute: "title", searchable: false,
valueAttribute: "value", placeholder: "انتخاب کنید",
searchable: false, items: refineCodes,
placeholder: "انتخاب کنید", },
items: refineCodes, },
{
key: "autoComplation",
placeholder: "جستجوی ...",
debounceTime: 500,
// autocompleteUrl: "/repo/monir/complation/sanad",
minCharsForAutocomplete: 3,
maxHistoryItems: 20,
showSearchButton: false,
filters: [
{
label: "همه اجزاء",
value: "all",
}, },
}, {
{ key: "label", label: "نوع رابطه:", style: "code-title" }, label: "عنوان جلسه",
{ value: "title",
type: "dropdown",
key: "dropdown",
name: "refine_codes",
dropdownSchema: {
width: "10em",
modelValue: null,
optionAttribute: "title",
valueAttribute: "value",
searchable: false,
placeholder: "انتخاب کنید",
items: [
{
title: "تعارض",
value: "1",
},
{
title: "تینت",
value: "2",
},
{
title: "ییی",
value: "3",
},
{
title: "ییی",
value: "4",
},
],
}, },
}, {
{ key: "label", label: "وضعیت اعتبار:", style: "code-title" }, label: "عنوان دوره",
{ value: "branch",
type: "dropdown",
key: "dropdown",
name: "refine_codes",
dropdownSchema: {
width: "10em",
modelValue: null,
optionAttribute: "title",
valueAttribute: "value",
searchable: false,
placeholder: "انتخاب کنید",
placeholder: "انتخاب کنید",
items: [
{
title: "تعارض",
value: "1",
},
{
title: "تینت",
value: "2",
},
{
title: "ییی",
value: "3",
},
{
title: "ییی",
value: "4",
},
],
}, },
}, {
], label: " فقط فهرست",
}, value: "mindex",
{ },
items: [ {
{ label: " فقط کدها",
key: "autoComplation", value: "codes",
placeholder: "جستجوی ...", },
debounceTime: 500, {
// autocompleteUrl: "/repo/monir/complation/sanad", label: " دوره",
minCharsForAutocomplete: 3, value: "advance",
maxHistoryItems: 20, },
showSearchButton: false, ],
filters: [ },
{ {
label: "همه اجزاء", key: "prevNext",
value: "all", name: "entityNavigator",
}, prevDisabled: false,
{ nextDisabled: true,
label: "عنوان جلسه", },
value: "title", ],
}, },
{
label: "عنوان دوره",
value: "branch",
},
{
label: " فقط فهرست",
value: "mindex",
},
{
label: " فقط کدها",
value: "codes",
},
{
label: " دوره",
value: "advance",
},
],
},
{
key: "prevNext",
name: "entityNavigator",
prevDisabled: false,
nextDisabled: true,
},
],
},
],
]); ]);
function headerToolsAction({ action, data }) { function headerToolsAction({ action, data }) {
if (action == "auto-complation") { if (action == "auto-complation") {
if (data.action == "complete-search") { if (data.action == "complete-search") {
// console.log("data ==> ", data); console.log("data ==> ", data);
emit("my-header-tools-search", data.item); emit("my-header-tools-search", data.item);
} }