myHeaderToolsMultiselectClick
This commit is contained in:
parent
163da9f589
commit
6d651dd65a
|
|
@ -108,20 +108,7 @@
|
||||||
<MySelect
|
<MySelect
|
||||||
v-model:dropdownSchema="headItem.dropdownSchema"
|
v-model:dropdownSchema="headItem.dropdownSchema"
|
||||||
:selectSchema="headItem.dropdownSchema"
|
:selectSchema="headItem.dropdownSchema"
|
||||||
@dropdownSelectEvents="
|
@my-select-action="mySelectAction($event, headItem)"
|
||||||
(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'">
|
||||||
|
|
@ -304,19 +291,7 @@
|
||||||
<MySelect
|
<MySelect
|
||||||
v-model:dropdownSelectConfig="my_item.dropdownSchema"
|
v-model:dropdownSelectConfig="my_item.dropdownSchema"
|
||||||
:selectSchema="my_item.dropdownSchema"
|
:selectSchema="my_item.dropdownSchema"
|
||||||
@dropdownSelectEvents="
|
@my-select-action="mySelectAction($event, headItem)"
|
||||||
(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'">
|
||||||
|
|
@ -434,6 +409,17 @@ 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,6 +30,8 @@ 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 });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ const headerTools = computed(() => [
|
||||||
{
|
{
|
||||||
type: "dropdown",
|
type: "dropdown",
|
||||||
key: "dropdown",
|
key: "dropdown",
|
||||||
name: "refine_codes",
|
name: "refine_conflict",
|
||||||
dropdownSchema: {
|
dropdownSchema: {
|
||||||
width: "10em",
|
width: "10em",
|
||||||
modelValue: null, // ✅ اینو بذار
|
modelValue: null, // ✅ اینو بذار
|
||||||
|
|
@ -203,7 +203,7 @@ const headerTools = computed(() => [
|
||||||
{
|
{
|
||||||
type: "dropdown",
|
type: "dropdown",
|
||||||
key: "dropdown",
|
key: "dropdown",
|
||||||
name: "refine_codes",
|
name: "refine_valid",
|
||||||
dropdownSchema: {
|
dropdownSchema: {
|
||||||
width: "8em",
|
width: "8em",
|
||||||
modelValue: null, // ✅ اینو بذار
|
modelValue: null, // ✅ اینو بذار
|
||||||
|
|
@ -255,12 +255,21 @@ 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") {
|
||||||
|
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 === "prev-click") {
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
// if (action === "next-click") {
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
function myContentAction({ action, payload }) {
|
function myContentAction({ action, payload }) {
|
||||||
if (action === "conflict_Details") {
|
if (action === "conflict_Details") {
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@
|
||||||
@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>
|
||||||
|
|
@ -169,7 +171,11 @@ 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>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user