Site Configuration by Server Params (confsites and confpages)

This commit is contained in:
Surya Paolo
2022-11-28 14:00:15 +01:00
parent fab0dbbb72
commit 58dc1dfdcc
76 changed files with 2504 additions and 5004 deletions

View File

@@ -12,7 +12,7 @@ import MixinBase from '@/mixins/mixin-base'
export default defineComponent({
name: 'CMyFieldRec',
emits: ['save'],
emits: ['save', 'update:rec'],
props: {
table: {
type: String,
@@ -123,13 +123,27 @@ export default defineComponent({
const jointable = ref('')
const recordCol = ref(<any>{})
const myrec = ref(<any>{})
const mykey = ref('')
const mysubkey = ref('')
const mysubsubkey = ref('')
const { setValDb, getValDb } = MixinBase()
watch(() => myrec.value, (value, oldval) => {
emit('update:rec', myrec.value)
return true
}
)
watch(() => props.rec, (value, oldval) => {
myrec.value = props.rec
}
)
function mounted() {
myrec.value = props.rec
mytitle.value = props.title
keytab.value = fieldsTable.getKeyByTable(props.table)
optlab.value = fieldsTable.getLabelByTable(props.table)
@@ -148,21 +162,21 @@ export default defineComponent({
const arrk = props.field.split('.')
if (arrk) {
mykey.value = props.field
if (arrk.length >= 0)
mykey.value = arrk[0]
if (arrk.length > 1)
mysubkey.value = arrk[1]
if (arrk.length > 2)
mysubsubkey.value = arrk[2]
else
mykey.value = props.field
}
// console.log('### table', props.table, 'col.value', col.value, 'field', props.field, 'mykey', mykey.value)
console.log('### table', props.table, 'col.value', col.value, 'field', props.field, 'mykey', mykey.value)
}
function showandsel(row: any, col: any, newval: any, valinitial: any) {
// console.log('showandsel CMyFieldDb', row, col, newval)
console.log('showandsel CMyFieldDb', row, col, newval)
emit('save', props.rec, newval)
if (props.nosaveToDb)
@@ -236,6 +250,7 @@ export default defineComponent({
mysubsubkey,
visuElem,
getclass,
myrec,
}
},
})