- aggiornamento cataloghi.
possibilità di estrapolare i dati da GM direttamente - migrazione delle tabelle di GM in locale - corretto l'ordinamento del Catalogo
This commit is contained in:
36
src/views/admin/dbopmacro/dbopmacro.scss
Executable file
36
src/views/admin/dbopmacro/dbopmacro.scss
Executable file
@@ -0,0 +1,36 @@
|
||||
.results-container {
|
||||
border: 2px solid #4CAF50;
|
||||
/* Colore del bordo */
|
||||
border-radius: 10px;
|
||||
/* Angoli arrotondati */
|
||||
padding: 20px;
|
||||
/* Spaziatura interna */
|
||||
background-color: #f9f9f9;
|
||||
/* Colore di sfondo */
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
/* Ombra */
|
||||
margin: 20px 0;
|
||||
/* Margine sopra e sotto */
|
||||
}
|
||||
|
||||
.results-title {
|
||||
color: #333;
|
||||
/* Colore del testo */
|
||||
font-family: Arial, sans-serif;
|
||||
/* Tipo di font */
|
||||
margin-bottom: 15px;
|
||||
/* Spaziatura sotto il titolo */
|
||||
font-size: 24px;
|
||||
/* Dimensione del font */
|
||||
}
|
||||
|
||||
.results-content {
|
||||
color: #555;
|
||||
/* Colore del testo dei risultati */
|
||||
font-family: Arial, sans-serif;
|
||||
/* Tipo di font */
|
||||
font-size: 18px;
|
||||
/* Dimensione del font */
|
||||
white-space: pre-wrap;
|
||||
/* Mantiene gli spazi e le interruzioni di riga */
|
||||
}
|
||||
131
src/views/admin/dbopmacro/dbopmacro.ts
Executable file
131
src/views/admin/dbopmacro/dbopmacro.ts
Executable file
@@ -0,0 +1,131 @@
|
||||
import { defineComponent, ref } from 'vue'
|
||||
|
||||
import { CTitleBanner } from '../../../components/CTitleBanner'
|
||||
import { CDateTime } from '../../../components/CDateTime'
|
||||
import { CMyFieldDb } from '../../../components/CMyFieldDb'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useCircuitStore } from '@store/CircuitStore'
|
||||
import { tools } from '@tools'
|
||||
import { costanti } from '@costanti'
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
import type { IOptQueryGM } from '@src/model'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'dbopmacro',
|
||||
components: { CTitleBanner, CDateTime, CMyFieldDb },
|
||||
props: {},
|
||||
setup() {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const circuitStore = useCircuitStore()
|
||||
|
||||
const ris = ref('')
|
||||
const riga = ref(0)
|
||||
const numpersone = ref(7)
|
||||
const date_start = ref(new Date())
|
||||
const col = ref(0)
|
||||
const placca = ref('')
|
||||
const valmin = ref(200)
|
||||
const circuitId = ref('')
|
||||
const valmax = ref(400)
|
||||
const defmin = ref(shared_consts.CIRCUIT_PARAMS.SCOPERTO_MIN_GRP)
|
||||
const defmax = ref(shared_consts.CIRCUIT_PARAMS.SCOPERTO_MAX_GRP)
|
||||
const defpersmin = ref(100)
|
||||
const defpersmax = ref(200)
|
||||
const search_username = ref('')
|
||||
const search = ref('')
|
||||
const replace_username = ref('')
|
||||
const risultato = ref('')
|
||||
const risultatoHTML = ref('')
|
||||
const incaricamento = ref(false)
|
||||
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
function EseguiFunz(miafunz: string, options?: any, search_username?: string, replace_username?: string, valmin?: number, valmax?: number, circuitId?: string) {
|
||||
const userStore = useUserStore()
|
||||
|
||||
$q.dialog({
|
||||
message: t('dialog.continue') + ' ' + miafunz + ' ?',
|
||||
ok: {
|
||||
label: t('dialog.yes'),
|
||||
push: true,
|
||||
},
|
||||
cancel: {
|
||||
label: t('dialog.cancel'),
|
||||
},
|
||||
title: 'Funzione:',
|
||||
}).onOk(async () => {
|
||||
const mydata = {
|
||||
dbop: miafunz,
|
||||
riga: riga,
|
||||
col: col,
|
||||
date_start: date_start,
|
||||
numpersone: numpersone,
|
||||
search_username,
|
||||
replace_username,
|
||||
search: search.value,
|
||||
valmin: tools.convstrToNum(valmin),
|
||||
valmax: tools.convstrToNum(valmax),
|
||||
circuitId,
|
||||
options,
|
||||
}
|
||||
|
||||
incaricamento.value = true
|
||||
$q.loading.show({ message: t('otherpages.update') })
|
||||
|
||||
const risfunz = await userStore.execDbOp({ mydata })
|
||||
|
||||
$q.loading.hide()
|
||||
await globalStore.loadSite()
|
||||
|
||||
incaricamento.value = false
|
||||
|
||||
console.log('risfunz', risfunz)
|
||||
|
||||
ris.value = ''
|
||||
|
||||
risultato.value = ''
|
||||
if (risfunz.data && risfunz.data.mystr) {
|
||||
risultato.value = risfunz.data.mystr
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
async function getListaArg() {
|
||||
risultatoHTML.value = ''
|
||||
risultatoHTML.value = await globalStore.getGM_Lista_Argomenti(true)
|
||||
}
|
||||
|
||||
async function getTabellaDaGM(options: IOptQueryGM) {
|
||||
risultatoHTML.value = ''
|
||||
risultatoHTML.value = await globalStore.getGM_Tabella(options)
|
||||
}
|
||||
|
||||
return {
|
||||
EseguiFunz,
|
||||
tools,
|
||||
costanti,
|
||||
search_username,
|
||||
replace_username,
|
||||
valmin,
|
||||
valmax,
|
||||
defmin,
|
||||
defmax,
|
||||
defpersmin,
|
||||
defpersmax,
|
||||
circuitId,
|
||||
circuitStore,
|
||||
incaricamento,
|
||||
ris,
|
||||
risultato,
|
||||
search,
|
||||
globalStore,
|
||||
risultatoHTML,
|
||||
getListaArg,
|
||||
getTabellaDaGM,
|
||||
}
|
||||
},
|
||||
})
|
||||
80
src/views/admin/dbopmacro/dbopmacro.vue
Executable file
80
src/views/admin/dbopmacro/dbopmacro.vue
Executable file
@@ -0,0 +1,80 @@
|
||||
<template>
|
||||
<div>
|
||||
<CTitleBanner title="Operazioni su DB MACRO:"></CTitleBanner>
|
||||
<div
|
||||
class="row justify-center q-gutter-sm q-list--bordered center_img"
|
||||
style="max-width: 600px"
|
||||
>
|
||||
<q-btn
|
||||
label="Migrazione del DB MSSQL su MongoDB (TUTTE)"
|
||||
color="positive"
|
||||
@click="EseguiFunz('MigrateMSSQLToMongoDb', {tutte: true})"
|
||||
></q-btn>
|
||||
|
||||
<q-btn
|
||||
label="Migrazione del DB MSSQL su MongoDB (ALCUNE)"
|
||||
color="positive"
|
||||
@click="EseguiFunz('MigrateMSSQLToMongoDb')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="Aggiorna Statistiche Fatturato"
|
||||
color="positive"
|
||||
@click="EseguiFunz('UpdateStatFatturato')"
|
||||
></q-btn>
|
||||
<br><br>
|
||||
<q-btn
|
||||
label="Riaggiorna TUTTI gli ARTICOLI da GM SERVER"
|
||||
color="accent"
|
||||
@click="EseguiFunz('updateAllBook', {usaDBGMLocale: false, caricatutti: true})"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="Riaggiorna TUTTI gli ARTICOLI dal DB Locale Importato"
|
||||
color="accent"
|
||||
@click="EseguiFunz('updateAllBook', {usaDBGMLocale: true, caricatutti: true})"
|
||||
></q-btn>
|
||||
|
||||
<!--
|
||||
<q-btn
|
||||
label="getGM_Lista_Argomenti"
|
||||
color="positive"
|
||||
@click="getListaArg()"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="getGM_Tabella Collane"
|
||||
color="positive"
|
||||
@click="
|
||||
getTabellaDaGM({
|
||||
nameTable: 'T_Web_Collane',
|
||||
numrec: 500,
|
||||
outhtml: true,
|
||||
})
|
||||
"
|
||||
></q-btn>
|
||||
--></div>
|
||||
|
||||
<div class="results-container">
|
||||
<h2 class="results-title">Risultati:</h2>
|
||||
<div class="results-content">
|
||||
{{ risultato }}
|
||||
</div>
|
||||
<h2
|
||||
v-if="!!risultatoHTML"
|
||||
class="results-title"
|
||||
>
|
||||
Risultati HTML:
|
||||
</h2>
|
||||
<div
|
||||
v-if="!!risultatoHTML"
|
||||
v-html="risultatoHTML"
|
||||
></div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./dbopmacro.ts"></script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './dbopmacro.scss';
|
||||
</style>
|
||||
1
src/views/admin/dbopmacro/index.ts
Executable file
1
src/views/admin/dbopmacro/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as dbopmacro} from './dbopmacro.vue'
|
||||
Reference in New Issue
Block a user