PASSAGGIO A VITE !

AGG. 1.1.23
This commit is contained in:
Surya Paolo
2025-03-01 14:15:40 +01:00
parent bc960d38a1
commit c52ca22c83
520 changed files with 3618692 additions and 5448 deletions

View File

View File

@@ -0,0 +1,61 @@
import type {
PropType} from 'vue';
import {
computed,
defineComponent, onBeforeMount, onBeforeUnmount, onMounted, ref, toRef, toRefs, watch,
} from 'vue'
import { tools } from '@tools'
import type { IOptQueryGM } from '@src/model';
import { IOptCatalogo, IMyScheda, IProduct, ISchedaSingola, IText } from '@src/model'
import { useProducts } from '@store/Products'
import { useGlobalStore } from '@src/store/globalStore'
import { costanti } from '@costanti'
export default defineComponent({
name: 'CViewTable',
props: {
options: {
type: Object as PropType<IOptQueryGM>,
required: true,
},
},
setup(props, { attrs, slots, emit }) {
const globalStore = useGlobalStore()
const risultatoHTML = ref('')
const tabella = ref('')
const loading = ref(false)
async function mounted() {
if (props.options) {
loading.value = true
await getTabellaDaGM()
loading.value = false
}
}
async function getTabellaDaGM() {
tabella.value = props.options.nameTable
risultatoHTML.value = ''
risultatoHTML.value = await globalStore.getGM_Tabella(props.options)
}
onMounted(mounted)
return {
tools,
globalStore,
costanti,
getTabellaDaGM,
risultatoHTML,
tabella,
loading,
}
},
})

View File

@@ -0,0 +1,23 @@
<template>
<q-inner-loading id="spinner" :showing="loading">
<q-spinner-tail color="primary" size="4em"> </q-spinner-tail>
</q-inner-loading>
<div v-if="options">
<div class="text-center text-bold text-h6 text-blue">
Tabella: {{ options.nameTable }}<br>
</div>
<div class="text-center text-h7">
Query: {{ options.where }}<br>
</div>
risultatoHTML: {{risultatoHTML}}
<br><br>
<div v-html="risultatoHTML">
</div>
</div>
</template>
<script lang="ts" src="./CViewTable.ts">
</script>
<style lang="scss" scoped>
@import './CViewTable.scss';
</style>

View File

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