corretto filtro Provincia
This commit is contained in:
@@ -431,13 +431,23 @@ export default defineComponent({
|
||||
|
||||
if (searchList.value) {
|
||||
for (const item of searchList.value) {
|
||||
|
||||
//searchList.value.forEach((item: ISearchList) => {
|
||||
if (!item.notinsearch) {
|
||||
let objitem: any = {}
|
||||
// console.log(' item ', item)
|
||||
if (item.value > 0) {
|
||||
|
||||
if (item.table === 'provinces') {
|
||||
let obj: any = {}
|
||||
|
||||
obj['mycities.prov'] = item.value
|
||||
if (item.value !== '') {
|
||||
filtersearch3or.push(obj)
|
||||
}
|
||||
} else if (item.value > 0) {
|
||||
objitem[item.key] = item.value
|
||||
filtersearch.push(objitem)
|
||||
filtersearch.push(objitem)
|
||||
|
||||
} else if (item.arrvalue.length > 0) {
|
||||
const myarr = item.arrvalue.filter((value: any) => {
|
||||
if (typeof value === 'number') {
|
||||
@@ -448,20 +458,7 @@ export default defineComponent({
|
||||
|
||||
let arr2: any = []
|
||||
|
||||
if (item.table === 'provinces') {
|
||||
arr2 = []
|
||||
myarr.forEach((myval: any) => {
|
||||
let objitem3: any = {}
|
||||
objitem3['mycities.prov'] = myval
|
||||
arr2.push(objitem3)
|
||||
})
|
||||
let obj2: any = {
|
||||
$or: arr2
|
||||
}
|
||||
if (arr2.length > 0) {
|
||||
filtersearch3or = arr2
|
||||
}
|
||||
} else {
|
||||
if (item.table !== 'provinces') {
|
||||
myarr.forEach((myval: any) => {
|
||||
let objitem2: any = {}
|
||||
objitem2[item.key] = myval
|
||||
|
||||
@@ -106,9 +106,8 @@
|
||||
<div v-if="searchList"
|
||||
:class="$q.screen.lt.sm ? `` : `row` + ` text-blue `">
|
||||
<span v-for="(item, index) in searchList" :key="index">
|
||||
<div class="text-center" v-if="(item.type === costanti.FieldType.separator)">
|
||||
<q-btn rounded size="md" dense :icon="!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'" label="Filtri Avanzati" @click="showfilteradv = !showfilteradv"></q-btn>
|
||||
<q-separator class="q-my-sm"></q-separator>
|
||||
<div class="text-center q-my-xs" v-if="(item.type === costanti.FieldType.separator)">
|
||||
<q-btn rounded flat size="sm" dense :icon="!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'" label="Filtri Avanzati" @click="showfilteradv = !showfilteradv"></q-btn>
|
||||
</div>
|
||||
|
||||
<CMySelect
|
||||
@@ -235,7 +234,7 @@
|
||||
|
||||
<q-space></q-space>
|
||||
<q-select
|
||||
v-if="mytable && pagination.rowsNumber > 0 && (prop_search || canEdit) && showCol"
|
||||
v-if="mytable && pagination.rowsNumber > 0 && (prop_search || canEdit) && showCol && myvertical === 0"
|
||||
v-model="colVisib"
|
||||
rounded
|
||||
outlined
|
||||
|
||||
Reference in New Issue
Block a user