ver 1.1.20:

- corretto campo foto che non compariva più.
 - sistemato i campi aggiuntivi e i richiesti.
- migliorato la barra in alto di selezione.
- aggiunto alcune icone.
This commit is contained in:
Surya Paolo
2025-02-03 17:18:33 +01:00
parent 997fd136ea
commit 979f90f980
84 changed files with 1257 additions and 357 deletions

View File

View File

@@ -0,0 +1,199 @@
import {
computed,
provide, defineComponent, onBeforeMount, onBeforeUnmount, onMounted, ref, toRef, toRefs, watch,
} from 'vue'
import { tools } from '@store/Modules/tools'
import { CMyFieldDb } from '@/components/CMyFieldDb'
import { costanti } from '@costanti'
import { useGlobalStore } from '@store/globalStore'
import { useUserStore } from '@store/UserStore'
import { CTitlePage } from '@/components/CTitlePage'
import { CGridTableRec } from '@/components/CGridTableRec'
import { IColGridTable, IMyBacheca, IMySkill, ISearchList, ISkill } from 'model'
import { shared_consts } from '@/common/shared_vuejs'
import { useI18n } from '@/boot/i18n'
import { toolsext } from '@store/Modules/toolsext'
import { fieldsTable } from '@store/Modules/fieldsTable'
import { useQuasar } from 'quasar'
export default defineComponent({
name: 'CCatalogList',
emits: ['clickButtBar'],
props: {
ind: {
type: Number,
required: false,
default: -1,
},
prop_search: {
type: Boolean,
required: false,
default: true,
},
finder: {
type: Boolean,
required: false,
default: true,
},
heightcarousel: {
type: Number,
required: false,
default: 0,
},
},
components: {
CMyFieldDb, CGridTableRec, CTitlePage,
},
setup(props, { attrs, slots, emit }) {
const { t } = useI18n()
const $q = useQuasar()
const globalStore = useGlobalStore()
const userStore = useUserStore()
const table = ref('catalogs')
const searchList_Base = ref(<ISearchList[]>[])
const arrfilterand: any = ref([])
const filtercustom: any = ref([])
const search = ref('')
const myrecfiltertoggle = ref(tools.FILTER_ALL)
const prop_colkey = ref('')
const col_title = ref('')
const col_footer = ref('')
const col_tabfooter = ref('')
const strextra = ref('')
const myoptions = ref(<any>[])
const col = ref(<IColGridTable[]>[])
const myCatRef = ref(<any>null)
/*
const idSectorServizi = computed(() => {
let myval: any = null
myval = searchList_Servizi.value.find((rec) => (rec.table === toolsext.TABSECTORS))
if (myval) {
const ris = myval.value || 0
// console.log('idSectorServizi=', ris)
return ris
} else {
return 0
}
})
*/
function updatefilter(value: any) {
//
}
watch(() => myrecfiltertoggle.value, (value: any, oldval: any) => {
updatefilter(value)
},
)
const mypagination = computed(() => {
return { sortBy: 'title', descending: false, page: 1, rowsNumber: 0, rowsPerPage: 10 }
})
const searchList = computed(() => {
return searchList_Base.value
})
const showType = computed(() => {
return costanti.SHOW_MYCARD
})
const hint = computed(() => {
return 'digita una parola da cercare'
})
const visuType = computed(() => {
return false // $q.screen.gt.xs
})
const noMsgRecord = computed(() => {
return 'Nessun dato trovato con i filtri selezionati'
})
function mounted() {
let obj = tools.getParamsByTable(table.value)
prop_colkey.value = obj.prop_colkey
col_title.value = obj.col_title
col_footer.value = obj.col_footer
col_tabfooter.value = obj.col_tabfooter
searchList_Base.value = []
filtercustom.value = []
col.value = fieldsTable.getArrColsByTable(table.value)
}
function mySortFieldsAvailable() {
if (table.value === toolsext.TABUSER) {
return userStore.getSortFieldsAvailable()
}
return []
}
function doSearch() {
//
}
function clickButtBar(item: any) {
if (myCatRef.value) {
myCatRef.value.clickButtBar(item)
}
// emit('clickButtBar', item)
}
onMounted(mounted)
return {
t,
tools,
costanti,
arrfilterand,
filtercustom,
searchList,
search,
doSearch,
myrecfiltertoggle,
prop_colkey,
col_title,
col_footer,
col_tabfooter,
col,
toolsext,
mypagination,
noMsgRecord,
showType,
visuType,
hint,
myoptions,
mySortFieldsAvailable,
clickButtBar,
myCatRef,
table,
}
},
})

View File

@@ -0,0 +1,47 @@
<template>
<div class="q-ma-xs">
<CGridTableRec
v-if="col && col.length > 0"
ref="myCatRef"
:prop_mytable="table"
:options="tools.optionsTable(table)"
:prop_mytitlenew="tools.getTitleAnnuncio(table)"
prop_mytitle="Cataloghi"
:prop_mycolumns="col"
:prop_colkey="prop_colkey"
:col_title="col_title"
:col_footer="col_footer"
:col_tabfooter="col_tabfooter"
:vertical="costanti.VISUTABLE_LISTA"
:prop_pagination="mypagination"
:showType="showType"
:hint="hint"
:nodataLabel="noMsgRecord"
:prop_search="prop_search"
:finder="finder"
labelElemFind="trovati"
:choose_visutype="visuType"
:butt_modif_new="tools.isAdmin()"
:noresultLabel="t('grid.nosearchfound')"
:arrfilters="arrfilterand"
:filtercustom="filtercustom"
:prop_searchList="searchList"
:defaultnewrec="tools.getdefaultnewrec(table)"
labelBtnAddRow="NONE"
:prop_SortFieldsAvailable="mySortFieldsAvailable"
labelBtnAddExtra="Aggiungi Catalogo"
:extraparams="tools.extraparams(table, { myrecfiltertoggle })"
:prop_showMap="false"
:heightcarousel="heightcarousel"
@clickButtBar="clickButtBar"
:opt="{rowclass: true, widthcard: '170px', heightcard: '170px'}"
>
</CGridTableRec>
</div>
</template>
<script lang="ts" src="./CCatalogList.ts">
</script>
<style lang="scss" scoped>
@import './CCatalogList.scss';
</style>

View File

@@ -0,0 +1 @@
export { default as CCatalogList } from './CCatalogList.vue'