CGridTableRec + fields + page

pagine:
- Siti Web
- Operazioni
- Push...
This commit is contained in:
Paolo Arena
2021-09-19 20:07:28 +02:00
parent 622bd6943d
commit db4b06f67f
96 changed files with 2561 additions and 4328 deletions

View File

@@ -5,7 +5,7 @@
ref="table"
color="primary"
title="Parametri di Configurazione Server"
:data="serverData"
:rows="serverData"
:columns="columns"
:filter="filter"
selection="multiple"

View File

@@ -15,33 +15,13 @@ interface IPageS {
export default defineComponent({
name: 'CfgServer',
props: {
loading: {
type: Boolean,
default: false,
required: true,
},
paginationControl: {
type: Object as PropType<IPageSrv>,
required: true,
/*default() {
return { page: 1, rowsPerPage: 20 }
},*/
},
pagination: {
type: Object as PropType<IPageS>,
required: true,
default() {
return { page: 1 }
},
},
},
setup() {
const $q = useQuasar()
const { t } = useI18n()
const globalStore = useGlobalStore()
const provaval = ref(1)
const serverData = computed(() => globalStore.cfgServer.slice()) // [{ chiave: 'chiave1', valore: 'valore 1' }]
const columns = ref([
{
@@ -80,7 +60,7 @@ export default defineComponent({
}
function SaveValue(newVal: any, valinitial: any) {
// console.log('SaveValue', newVal, 'selected', this.selected)
console.log('SaveValue', newVal)
const mydata: ICfgServer = {
chiave: keysel.value,
@@ -99,6 +79,7 @@ export default defineComponent({
serverData,
columns,
filter,
provaval,
}
},
})

View File

@@ -1,6 +1,6 @@
<template>
<q-table
:data="serverData"
:rows="serverData"
:columns="columns"
:filter="filter"
title="Configurazione Server"
@@ -35,9 +35,15 @@
<q-td key="valore" :props="props">
{{ props.row.valore }}
<q-popup-edit
v-model="props.row.valore" title="Aggiorna Valore" buttons @save="SaveValue"
v-model="props.row.valore"
title="Aggiorna Valore"
v-slot="scope"
buttons
@save="SaveValue"
@show="selItem(props.row)">
<q-input v-model="props.row.valore"/>
<q-input
v-model="scope.value"
@keyup.enter="scope.set"/>
</q-popup-edit>
</q-td>
</q-tr>

View File

@@ -8,6 +8,7 @@ import { useI18n } from '@/boot/i18n'
import { useUserStore } from '@store/UserStore'
import { useGlobalStore } from '@store/globalStore'
import { tools } from '@store/Modules/tools'
import { costanti } from '@costanti'
export default defineComponent({
name: 'Dbop',
@@ -75,6 +76,7 @@ export default defineComponent({
return {
EseguiFunz,
tools,
costanti,
}
},
})

View File

@@ -3,18 +3,18 @@
<CTitleBanner title="Operazioni su DB:"></CTitleBanner>
<div class="row justify-center q-gutter-sm q-list--bordered center_img" style="max-width: 600px">
<CMyFieldDb
title="SITO_ONLINE"
mykey="SITO_ONLINE"
:serv="false"
:type="costanti.FieldType.boolean">
title="SITO_ONLINE"
mykey="SITO_ONLINE"
:serv="false"
:type="costanti.FieldType.boolean">
</CMyFieldDb>
<br>
<CMyFieldDb
title="ABILITA CRONTAB (1 ora)"
mykey="CRONTAB"
:serv="false"
:type="costanti.FieldType.boolean">
title="ABILITA CRONTAB (1 ora)"
mykey="CRONTAB"
:serv="false"
:type="costanti.FieldType.boolean">
</CMyFieldDb>
<br>
@@ -203,8 +203,8 @@ title="ABILITA CRONTAB (1 ora)"
<div class="row">
<q-btn
label="Correggi Tabella Hours con userId" color="negative"
@click="EseguiFunz('CorreggiTabHours')"></q-btn>
label="Correggi Tabella Hours con userId" color="negative"
@click="EseguiFunz('CorreggiTabHours')"></q-btn>
<br>
</div>
@@ -214,7 +214,7 @@ label="Correggi Tabella Hours con userId" color="negative"
dense
>
<template v-slot:control>
<div class="self-center full-width no-outline text-center" tabindex="0">{{ris}}</div>
<div class="self-center full-width no-outline text-center" tabindex="0">{{ ris }}</div>
</template>
</q-field>
@@ -225,5 +225,5 @@ label="Correggi Tabella Hours con userId" color="negative"
</script>
<style lang="scss" scoped>
@import './dbop';
@import './dbop';
</style>