Nuova Grafica , Nuovi settori e categorie, Beni e Servizi.
Nella Nazionalità non c'è Repubblica di San Marino Aggiungere Bottone di "Chiudi" nella visualizzazione della Card cerca persona, mettere solo una parte della parola da cercare... Gruppi sistemare il bottone di Nuovo e controllare altro.. adTypeBacheca per la tabella mybachecas (Evento, Offro, Cerco) Semplificare le CATEGORIE ?! o togliere la Specializzazione? (con Giovanna)
This commit is contained in:
@@ -7,13 +7,20 @@ import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CGridTableRec } from '@/components/CGridTableRec'
|
||||
|
||||
import { colTablegroups } from '@src/store/Modules/fieldsTable'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'GroupPage',
|
||||
components: { CImgText, CCard, CMyPage, CTitleBanner, CGridTableRec },
|
||||
setup() {
|
||||
|
||||
function getdefaultnewrec(): any {
|
||||
return tools.getdefaultnewrec_MyGroup()
|
||||
}
|
||||
|
||||
return {
|
||||
colTablegroups
|
||||
colTablegroups,
|
||||
getdefaultnewrec
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
prop_mytable="groups"
|
||||
prop_mytitle="Gruppi"
|
||||
:prop_mycolumns="colTablegroups"
|
||||
:defaultnewrec="getdefaultnewrec"
|
||||
prop_colkey="descr"
|
||||
nodataLabel="Nessun Gruppo"
|
||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
|
||||
|
||||
@@ -20,7 +20,9 @@ export default defineComponent({
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const arrSector = ref(<any[]>[])
|
||||
const arrSectorGood = ref(<any[]>[])
|
||||
const arrSkill = ref(<any[]>[])
|
||||
const arrGood = ref(<any[]>[])
|
||||
|
||||
|
||||
const incaricamento = ref(false)
|
||||
@@ -30,6 +32,8 @@ export default defineComponent({
|
||||
const inputfile = ref('')
|
||||
const risultato = ref('')
|
||||
|
||||
const caricaDatiToggle = ref(false)
|
||||
|
||||
const ListaCmd = ref(
|
||||
[
|
||||
{
|
||||
@@ -45,8 +49,12 @@ export default defineComponent({
|
||||
value: shared_consts.Cmd.CITIES_SERVER
|
||||
},
|
||||
{
|
||||
label: 'Importa Categorie da TXT',
|
||||
value: shared_consts.Cmd.CAT_TXT
|
||||
label: 'Importa Categorie Servizi da TXT',
|
||||
value: shared_consts.Cmd.CAT_SKILL_TXT
|
||||
},
|
||||
{
|
||||
label: 'Importa Categorie Beni (Goods) da TXT',
|
||||
value: shared_consts.Cmd.CAT_GOODS_TXT
|
||||
},
|
||||
{
|
||||
label: 'converti da TXT seperato senza spazi',
|
||||
@@ -55,8 +63,16 @@ export default defineComponent({
|
||||
]
|
||||
)
|
||||
|
||||
function created() {
|
||||
inputfile.value = ''
|
||||
function caricadati() {
|
||||
|
||||
if (!caricaDatiToggle.value) {
|
||||
arrSector.value = []
|
||||
arrSectorGood.value = []
|
||||
arrSkill.value = []
|
||||
arrGood.value = []
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
const sortBy = 'descr'
|
||||
const descending = 1
|
||||
@@ -67,7 +83,7 @@ export default defineComponent({
|
||||
myobj[sortBy] = 1
|
||||
|
||||
const params: IParamsQuery = {
|
||||
table: 'sectors',
|
||||
table: '',
|
||||
startRow: 0,
|
||||
endRow: 10000,
|
||||
filter: '',
|
||||
@@ -80,42 +96,89 @@ export default defineComponent({
|
||||
userId: ''
|
||||
}
|
||||
|
||||
globalStore.loadTable(params).then((data) => {
|
||||
arrSector.value = data.rows
|
||||
})
|
||||
if (true) {
|
||||
params.table = 'sectors'
|
||||
globalStore.loadTable(params).then((data) => {
|
||||
arrSector.value = data.rows
|
||||
})
|
||||
|
||||
params.table = 'sectorgoods'
|
||||
globalStore.loadTable(params).then((data) => {
|
||||
arrSectorGood.value = data.rows
|
||||
})
|
||||
|
||||
params.table = 'skills'
|
||||
globalStore.loadTable(params).then((data) => {
|
||||
arrSkill.value = data.rows
|
||||
})
|
||||
params.table = 'skills'
|
||||
globalStore.loadTable(params).then((data) => {
|
||||
arrSkill.value = data.rows
|
||||
})
|
||||
|
||||
params.table = 'goods'
|
||||
globalStore.loadTable(params).then((data) => {
|
||||
arrGood.value = data.rows
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function createSector(cat: string) {
|
||||
const myid = arrSector.value.length + 1
|
||||
arrSector.value.push({_id: myid, descr: cat})
|
||||
function created() {
|
||||
inputfile.value = ''
|
||||
|
||||
if (caricaDatiToggle.value) {
|
||||
caricadati()
|
||||
}
|
||||
}
|
||||
|
||||
function createSector(cat: string, cmd: number) {
|
||||
let arr = []
|
||||
if (cmd === shared_consts.Cmd.CAT_GOODS_TXT) {
|
||||
arr = arrSectorGood.value
|
||||
} else {
|
||||
arr = arrSector.value
|
||||
}
|
||||
|
||||
const myid = arr.length + 1
|
||||
arr.push({_id: myid, descr: cat})
|
||||
return myid
|
||||
}
|
||||
|
||||
function findidSector(cat: string) {
|
||||
const rec = arrSector.value.find((rec) => rec.descr === cat)
|
||||
function findidSector(cat: string, cmd: number) {
|
||||
let arr = []
|
||||
if (cmd === shared_consts.Cmd.CAT_GOODS_TXT) {
|
||||
arr = arrSectorGood.value
|
||||
} else {
|
||||
arr = arrSector.value
|
||||
}
|
||||
|
||||
const rec = arr.find((rec) => rec.descr === cat)
|
||||
if (rec) {
|
||||
return rec._id
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
function findidSkill(cat: string) {
|
||||
const rec = arrSkill.value.find((rec) => rec.descr === cat)
|
||||
function findidSkill(cat: string, cmd: number) {
|
||||
let arr = []
|
||||
if (cmd === shared_consts.Cmd.CAT_GOODS_TXT) {
|
||||
arr = arrGood.value
|
||||
} else {
|
||||
arr = arrSkill.value
|
||||
}
|
||||
|
||||
const rec = arr.find((rec) => rec.descr === cat)
|
||||
if (rec) {
|
||||
return rec._id
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function createSkill(cat: string) {
|
||||
const myid = arrSkill.value.length + 1
|
||||
arrSkill.value.push({_id: myid, descr: cat})
|
||||
function createSkill(cat: string, cmd: number) {
|
||||
let arr = []
|
||||
if (cmd === shared_consts.Cmd.CAT_GOODS_TXT) {
|
||||
arr = arrGood.value
|
||||
} else {
|
||||
arr = arrSkill.value
|
||||
}
|
||||
const myid = arr.length + 1
|
||||
arr.push({_id: myid, descr: cat})
|
||||
return myid
|
||||
}
|
||||
|
||||
@@ -147,7 +210,7 @@ export default defineComponent({
|
||||
arrstr = myarr[i].split(',')
|
||||
sector = arrstr[0]
|
||||
skill = arrstr[1]
|
||||
sotto_cat = arrstr[2]
|
||||
// sotto_cat = arrstr[2]
|
||||
// sotto_cat = myarr[i].replace('\'', '\\\'')
|
||||
// sector = myarr[i+2]
|
||||
if (skill)
|
||||
@@ -156,9 +219,9 @@ export default defineComponent({
|
||||
sector = sector.replace('\'', '\\\'')
|
||||
|
||||
if (sector) {
|
||||
idSector = findidSector(sector)
|
||||
idSector = findidSector(sector, cmd)
|
||||
if (!idSector) {
|
||||
idSector = createSector(sector)
|
||||
idSector = createSector(sector, cmd)
|
||||
|
||||
// sectors
|
||||
strsectors += '{ \n'
|
||||
@@ -168,19 +231,25 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
if (skill !== '') {
|
||||
idSkill = findidSkill(skill)
|
||||
idSkill = findidSkill(skill, cmd)
|
||||
if (!idSkill) {
|
||||
idSkill = createSkill(skill)
|
||||
idSkill = createSkill(skill, cmd)
|
||||
|
||||
// skills
|
||||
strskills += '{ \n'
|
||||
strsectors += ' _id:' + idSkill + ','
|
||||
strskills += ' idSector: [' + idSector + '],'
|
||||
strskills += ' _id:' + idSkill + ','
|
||||
if (cmd === shared_consts.Cmd.CAT_GOODS_TXT) {
|
||||
strskills += ' idSectorGood: [' + idSector + '],'
|
||||
}else if (cmd === shared_consts.Cmd.CAT_SKILL_TXT) {
|
||||
strskills += ' idSector: [' + idSector + '],'
|
||||
}
|
||||
|
||||
strskills += ' descr:\'' + skill + '\','
|
||||
strskills += '}, \n'
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (sotto_cat !== '') {
|
||||
// subskills
|
||||
strsubskills += '{ \n'
|
||||
@@ -188,6 +257,8 @@ export default defineComponent({
|
||||
strsubskills += ' descr:\'' + sotto_cat + '\','
|
||||
strsubskills += '}, \n'
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
indrecsub++
|
||||
@@ -199,9 +270,11 @@ export default defineComponent({
|
||||
ris += 'module.exports = {\n' +
|
||||
' list: [' + strskills + ']'
|
||||
ris += '<br><br><br><br>'
|
||||
ris += 'module.exports = {\n' +
|
||||
/*ris += 'module.exports = {\n' +
|
||||
' list: [' + strsubskills + ']'
|
||||
|
||||
*/
|
||||
|
||||
return ris
|
||||
|
||||
}
|
||||
@@ -241,7 +314,9 @@ export default defineComponent({
|
||||
delim = ','
|
||||
} else if ((cmd === shared_consts.Cmd.COMUNI) || (cmd === shared_consts.Cmd.CITIES_SERVER)) {
|
||||
delim = ';'
|
||||
} else if (cmd === shared_consts.Cmd.CAT_TXT) {
|
||||
} else if (cmd === shared_consts.Cmd.CAT_SKILL_TXT) {
|
||||
return importCmdTxt(cmd, testo);
|
||||
} else if (cmd === shared_consts.Cmd.CAT_GOODS_TXT) {
|
||||
return importCmdTxt(cmd, testo);
|
||||
} else if (cmd === shared_consts.Cmd.CAT_NO_SPAZI) {
|
||||
return importNoSpazi(cmd, testo);
|
||||
@@ -326,6 +401,8 @@ export default defineComponent({
|
||||
cosafare,
|
||||
ListaCmd,
|
||||
eseguiCmd,
|
||||
caricaDatiToggle,
|
||||
caricadati,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<CMyPage img="" title="Import Data" keywords="" description="">
|
||||
<div class="q-ma-sm">
|
||||
|
||||
<q-toggle v-model="caricaDatiToggle" @click="caricadati()"
|
||||
label="Carica Dati"></q-toggle>
|
||||
<br>
|
||||
<q-select rounded outlined v-model="cosafare"
|
||||
:options="ListaCmd"
|
||||
@@ -16,10 +19,10 @@
|
||||
<q-btn
|
||||
label="Esegui"
|
||||
@click="eseguiCmd"></q-btn>
|
||||
{{risultato}}
|
||||
|
||||
<br><br><br><br><br>
|
||||
VERSIONE HTML:
|
||||
<br><br>
|
||||
|
||||
|
||||
<div v-html="risultato"></div>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
@@ -78,24 +78,11 @@ export default defineComponent({
|
||||
return fieldsTable
|
||||
}
|
||||
|
||||
function userlist() {
|
||||
|
||||
if (static_data.functionality.ENABLE_REG_AYNI) {
|
||||
return db_fieldsTable().colTableUsers
|
||||
} else if (static_data.functionality.ENABLE_REG_CNM) {
|
||||
return db_fieldsTable().colTableUsersCNM
|
||||
} else if (static_data.functionality.ENABLE_REG_ISP) {
|
||||
return db_fieldsTable().colTableUsersISP
|
||||
} else {
|
||||
return db_fieldsTable().colTableUsersBase
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
arrfilterand,
|
||||
userlist,
|
||||
fieldsTable,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<CGridTableRec
|
||||
prop_mytable="users"
|
||||
prop_mytitle="Lista Utenti"
|
||||
:prop_mycolumns="userlist()"
|
||||
:prop_mycolumns="fieldsTable.userlist()"
|
||||
prop_colkey="_id"
|
||||
nodataLabel="Nessun Utente"
|
||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
|
||||
|
||||
Reference in New Issue
Block a user