Added Bar Selector City at the Top !
This commit is contained in:
@@ -247,9 +247,11 @@ export default defineComponent({
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
components: { CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups,
|
||||
components: {
|
||||
CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups,
|
||||
CMyUser, CMyRecCard, CMyCardPopup, CMyRecGrpCard, CMyCardGrpPopup, CMyCardCircuitPopup,
|
||||
CMyRecCircuitCard },
|
||||
CMyRecCircuitCard
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
@@ -352,13 +354,24 @@ export default defineComponent({
|
||||
const rec = searchList.value.find((myrec) => myrec.table === globalStore.myselector.table) // check if exist
|
||||
if (rec) {
|
||||
rec.value = globalStore.myselector.data
|
||||
|
||||
// Reset others tables
|
||||
const rec2 = searchList.value.find((myrec) => myrec.table === toolsext.TABREGIONS) // check if exist
|
||||
if (rec2) {
|
||||
rec2.value = costanti.FILTER_TUTTI
|
||||
}
|
||||
const rec3 = searchList.value.find((myrec) => myrec.table === toolsext.TABPROVINCE) // check if exist
|
||||
if (rec3) {
|
||||
rec3.value = costanti.FILTER_TUTTI
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (value) {
|
||||
refresh()
|
||||
}
|
||||
},
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
watch(() => searchList.value, (to: any, from: any) => {
|
||||
@@ -454,9 +467,10 @@ export default defineComponent({
|
||||
if (arrvalues)
|
||||
trovato = arrvalues.find((myrec: any) => myrec[myrec.key] === valsaved)
|
||||
}
|
||||
if (valsaved && trovato)
|
||||
if (valsaved && trovato) {
|
||||
item.value = valsaved
|
||||
else {
|
||||
globalStore.myselector.data = item.value
|
||||
} else {
|
||||
if (arrvalues) {
|
||||
item.value = costanti.FILTER_TUTTI
|
||||
}
|
||||
@@ -478,6 +492,11 @@ export default defineComponent({
|
||||
item.value = costanti.FILTER_TUTTI
|
||||
}
|
||||
}
|
||||
if (item.value === costanti.FILTER_TUTTI) {
|
||||
globalStore.myselector.data = { _id: 0, comune: '' }
|
||||
} else {
|
||||
globalStore.myselector.data = item.value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -504,6 +523,22 @@ export default defineComponent({
|
||||
tools.setCookie(tools.COOK_SEARCH + table + '_' + recSector.value, newval)
|
||||
}
|
||||
// setCategBySector('sectorgoods', table, newval)
|
||||
} else if (table === toolsext.TABCITIES) {
|
||||
const rec = searchList.value.find((myrec) => myrec.table === toolsext.TABCITIES) // check if exist
|
||||
if (rec) {
|
||||
if (rec.value === costanti.FILTER_TUTTI) {
|
||||
globalStore.myselector.data = { _id: 0, comune: '' }
|
||||
} else {
|
||||
globalStore.myselector.data = rec.value
|
||||
}
|
||||
}
|
||||
|
||||
} else if (table === toolsext.TABPROVINCE) {
|
||||
const rec = searchList.value.find((myrec) => myrec.table === toolsext.TABPROVINCE) // check if exist
|
||||
if (rec) {
|
||||
globalStore.myselector.data = { _id: 0, comune: '' }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1004,8 +1039,8 @@ export default defineComponent({
|
||||
|
||||
onUpdateData(0,
|
||||
{
|
||||
pagination: pagination.value
|
||||
}, done)
|
||||
pagination: pagination.value
|
||||
}, done)
|
||||
}
|
||||
|
||||
|
||||
@@ -1944,7 +1979,7 @@ export default defineComponent({
|
||||
return actualDate.value
|
||||
}
|
||||
|
||||
function onLoadScroll (index: number, done: any) {
|
||||
function onLoadScroll(index: number, done: any) {
|
||||
if (index > 1) {
|
||||
// console.log('onLoadScroll', index, 'RECLOAD', numRecLoaded.value, 'ROWS: ', pagination.value.rowsNumber)
|
||||
if (numRecLoaded.value < pagination.value.rowsNumber || (pagination.value.rowsNumber <= 0 && clickbuttsearch.value)) {
|
||||
@@ -1962,7 +1997,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function wrapCsvValue (val: any, formatFn?: any, row?: any, col?: IColGridTable) {
|
||||
function wrapCsvValue(val: any, formatFn?: any, row?: any, col?: IColGridTable) {
|
||||
let formatted = formatFn !== void 0
|
||||
? formatFn(val, row)
|
||||
: val
|
||||
@@ -1992,7 +2027,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
// onMounted(mounted)
|
||||
function exportTable () {
|
||||
function exportTable() {
|
||||
// console.log('row', serverData.value)
|
||||
// console.log('mycolumns.value', mycolumns.value)
|
||||
// naive encoding to csv format
|
||||
@@ -2005,7 +2040,7 @@ export default defineComponent({
|
||||
row,
|
||||
col
|
||||
)).join(','))
|
||||
).join('\r\n')
|
||||
).join('\r\n')
|
||||
|
||||
const status = exportFile(
|
||||
'export-' + mytable.value + '_' + tools.getstrYYMMDDHHMMDateTime(tools.getDateNow()) + '.csv',
|
||||
|
||||
Reference in New Issue
Block a user