CheckBox, Pages, Editor
This commit is contained in:
@@ -69,7 +69,7 @@ export default defineComponent({
|
||||
const saveit = ref(false)
|
||||
const myvalue = ref(new Date())
|
||||
const valueprec = ref(new Date())
|
||||
const valueDate = toRef(props, 'valueDate')
|
||||
const myvalueDate = toRef(props, 'valueDate')
|
||||
|
||||
function getclass() {
|
||||
return 'calendar_comp ' + props.data_class
|
||||
@@ -80,10 +80,10 @@ export default defineComponent({
|
||||
saveit.value = false
|
||||
valueprec.value = myvalue.value
|
||||
if (myvalue.value === undefined) {
|
||||
valueDate.value = new Date()
|
||||
myvalue.value = tools.getstrYYMMDDDateTime(valueDate.value)
|
||||
myvalueDate.value = new Date()
|
||||
myvalue.value = tools.getstrYYMMDDDateTime(myvalueDate.value)
|
||||
}
|
||||
// console.log('Opening', valueDate, myvalue)
|
||||
// console.log('Opening', myvalueDate, myvalue)
|
||||
emit('show')
|
||||
}
|
||||
|
||||
@@ -97,9 +97,11 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
watch(() => props.valueDate, (value, oldval) => {
|
||||
if (props.valueDate)
|
||||
myvalue.value = tools.getstrYYMMDDDateTime(props.valueDate)
|
||||
watch(() => myvalueDate.value, (value, oldval) => {
|
||||
if (myvalueDate.value) {
|
||||
myvalue.value = tools.getstrYYMMDDDateTime(myvalueDate.value)
|
||||
console.log('myvalue Date = ', myvalue.value)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
@@ -129,7 +131,7 @@ export default defineComponent({
|
||||
if (props.value !== null)
|
||||
myvalue.value = props.value
|
||||
else
|
||||
myvalue.value = tools.getstrYYMMDDDateTime(valueDate.value)
|
||||
myvalue.value = tools.getstrYYMMDDDateTime(myvalueDate.value)
|
||||
|
||||
// console.log('created myvalue', myvalue)
|
||||
}
|
||||
@@ -166,6 +168,8 @@ export default defineComponent({
|
||||
Closing,
|
||||
Opening,
|
||||
getclass,
|
||||
myvalue,
|
||||
showDateTimeScroller,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,72 +1,82 @@
|
||||
<template>
|
||||
<div class="" :style="mystyle">
|
||||
<q-input
|
||||
v-model="myvalue"
|
||||
v-show="false"
|
||||
color="blue-6"
|
||||
hide-bottom-space
|
||||
outlined
|
||||
borderless
|
||||
:label="label"
|
||||
:bg-color="bgcolor"
|
||||
:readonly="true"
|
||||
:dense="dense"
|
||||
mask="####-##-## ##:##"
|
||||
debounce="500"
|
||||
@input="changeval"
|
||||
:input-class="getclass"
|
||||
>
|
||||
</q-input>
|
||||
<div class="" :style="mystyle">
|
||||
<q-input
|
||||
v-model="myvalue"
|
||||
v-show="false"
|
||||
color="blue-6"
|
||||
hide-bottom-space
|
||||
outlined
|
||||
borderless
|
||||
:label="label"
|
||||
:bg-color="bgcolor"
|
||||
:readonly="true"
|
||||
:dense="dense"
|
||||
mask="####-##-## ##:##"
|
||||
debounce="500"
|
||||
@input="changeval"
|
||||
:input-class="getclass"
|
||||
>
|
||||
</q-input>
|
||||
|
||||
<q-field
|
||||
:label="label"
|
||||
stack-label
|
||||
:value="myvalue"
|
||||
outlined
|
||||
:dense="dense"
|
||||
color="blue-6"
|
||||
:bg-color="bgcolor"
|
||||
debounce="500"
|
||||
:input-class="getclass">
|
||||
<q-field
|
||||
:label="label"
|
||||
stack-label
|
||||
:value="myvalue"
|
||||
outlined
|
||||
:dense="dense"
|
||||
color="blue-6"
|
||||
:bg-color="bgcolor"
|
||||
debounce="500"
|
||||
:input-class="getclass">
|
||||
|
||||
<template v-slot:control>
|
||||
<div style="">
|
||||
<div class="self-center full-width no-outline" :style="mystyle" tabindex="0">
|
||||
{{ getstrDate(myvalue) }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="canEdit" name="event" class="cursor-pointer">
|
||||
<q-popup-proxy v-model="showDateTimeScroller" @before-show="Opening" @before-hide="Closing">
|
||||
<template v-slot:control>
|
||||
<div style="">
|
||||
<div class="self-center full-width no-outline" :style="mystyle" tabindex="0">
|
||||
{{ getstrDate(myvalue) }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="canEdit" name="event" class="cursor-pointer">
|
||||
<q-popup-proxy v-model="showDateTimeScroller" @before-show="Opening" @before-hide="Closing">
|
||||
<!--
|
||||
<q-input
|
||||
v-model="myvalue"
|
||||
type="datetime"
|
||||
@input="changeval"
|
||||
@close="() => { savetoclose(); }"
|
||||
>
|
||||
</q-input>
|
||||
-->
|
||||
<!--
|
||||
<q-scroller
|
||||
v-model="myvalue"
|
||||
:view="view"
|
||||
:locale="toolsext.getLocale()"
|
||||
:rounded-borders="true"
|
||||
border-color="#2196f3"
|
||||
bar-color="#2196f3"
|
||||
text-color="white"
|
||||
color="primary"
|
||||
:minute-interval="minuteinterval"
|
||||
inner-text-color="primary"
|
||||
inner-color="white"
|
||||
:style="scrollerPopupStyle280"
|
||||
@input="changeval"
|
||||
@close="() => { savetoclose(); }"
|
||||
></q-scroller>
|
||||
-->
|
||||
|
||||
<q-scroller
|
||||
v-model="myvalue"
|
||||
:view="view"
|
||||
:locale="toolsext.getLocale()"
|
||||
:rounded-borders="true"
|
||||
border-color="#2196f3"
|
||||
bar-color="#2196f3"
|
||||
text-color="white"
|
||||
color="primary"
|
||||
:minute-interval="minuteinterval"
|
||||
inner-text-color="primary"
|
||||
inner-color="white"
|
||||
:style="scrollerPopupStyle280"
|
||||
@input="changeval"
|
||||
@close="() => { savetoclose(); }"
|
||||
></q-scroller>
|
||||
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-field>
|
||||
</div>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-field>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CDateTime.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CDateTime.scss';
|
||||
@import './CDateTime.scss';
|
||||
</style>
|
||||
|
||||
@@ -211,7 +211,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function save() {
|
||||
emit('showandsave', mylistimages)
|
||||
emit('showandsave', mylistimages.value)
|
||||
}
|
||||
|
||||
function getsrcimg(mygallery: any) {
|
||||
@@ -237,6 +237,8 @@ export default defineComponent({
|
||||
copytoclipboard,
|
||||
deleteFile,
|
||||
getsrcimg,
|
||||
tools,
|
||||
uploaded,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
<!--<div class="q-pa-md items-start " style="display: inline-flex; width: 800px;"> -->
|
||||
<div>
|
||||
<div v-if="!edit">
|
||||
<div v-for="(mygallery, index) in getlistimages" :key="index">
|
||||
<div v-for="(mygallery, index) in getlistimages()" :key="index">
|
||||
<div v-if="index === 0">
|
||||
<div class="q-pa-md q-gutter-md">
|
||||
<q-card :class="getclass">
|
||||
<q-card :class="getclass()">
|
||||
<q-img
|
||||
:src="getsrcimg(mygallery)" :class="getclimg"
|
||||
:src="getsrcimg(mygallery)" :class="getclimg()"
|
||||
:alt="mygallery.alt">
|
||||
<div class="absolute-bottom text-shadow">
|
||||
{{ listimages.length }} files
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class=" row">
|
||||
<!--<q-draggable-rows
|
||||
v-model="order">-->
|
||||
<div v-for="(mygallery, index) in getlistimages" :key="index">
|
||||
<div v-for="(mygallery, index) in getlistimages()" :key="index">
|
||||
<div
|
||||
class="q-pa-sm q-gutter-sm"
|
||||
@dragenter="onDragEnter"
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
@dragover="onDragOver">
|
||||
<q-card
|
||||
:id="mygallery._id" :class="getclass"
|
||||
:id="mygallery._id" :class="getclass()"
|
||||
draggable="true"
|
||||
@dragstart="onDragStart"
|
||||
@drop="onDrop"
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
<q-img
|
||||
:src="getsrcimg(mygallery)"
|
||||
:class="getclimg"
|
||||
:class="getclimg()"
|
||||
:alt="mygallery.alt">
|
||||
<div class="absolute-bottom text-shadow">
|
||||
<!-- <div class="text-h6 text-trans">{{ mygallery.description }} </div> -->
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { defineComponent, PropType, ref, watch, toRef, onMounted, toRefs } from 'vue'
|
||||
import { defineComponent, PropType, ref, watch, toRef, onMounted, toRefs, computed } from 'vue'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
@@ -95,6 +95,7 @@ export default defineComponent({
|
||||
const { t } = useI18n()
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
const isfinishLoading = computed(() => globalStore.finishLoading)
|
||||
|
||||
const mypagination = toRef(props, 'pagination')
|
||||
|
||||
@@ -302,7 +303,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function disabilita() {
|
||||
if ((mytable.value === 'users') && (isTutor)) {
|
||||
if ((mytable.value === 'users') && (isTutor())) {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -323,7 +324,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function undoVal() {
|
||||
console.log('undoVal', 'colsel', colsel, 'valprec', valPrec, 'colkey', colkey, 'selected', rowsel)
|
||||
console.log('undoVal', 'colsel', colsel.value, 'valprec', valPrec, 'colkey', colkey, 'selected', rowsel.value)
|
||||
// console.table(serverData)
|
||||
if (colsel.value) {
|
||||
if (colsel.value.subfield !== '') {
|
||||
@@ -340,7 +341,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function SaveValdb(newVal: any, valinitial: any) {
|
||||
// console.log('SaveValdb', newVal)
|
||||
console.log('SaveValdb', newVal)
|
||||
// console.log('SaveValue', newVal, 'rowsel', rowsel)
|
||||
|
||||
colsel.value = colclicksel.value
|
||||
@@ -353,7 +354,7 @@ export default defineComponent({
|
||||
function showandsel(row: any, col: any, newval: any, valinitial: any) {
|
||||
// console.log('showandsel', row, col, newval)
|
||||
rowsel = row
|
||||
colsel = col
|
||||
colsel.value = col
|
||||
idsel = row._id
|
||||
SaveValue(newval, valinitial)
|
||||
|
||||
@@ -369,7 +370,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function SaveValue(newVal: any, valinitial: any) {
|
||||
// console.log('SaveValue', newVal, 'rowsel', rowsel)
|
||||
console.log('SaveValue', newVal, 'rowsel', rowsel, 'colsel', colsel.value)
|
||||
|
||||
if (colsel.value) {
|
||||
// Update value in table memory
|
||||
@@ -384,7 +385,7 @@ export default defineComponent({
|
||||
|
||||
const mydata = <any>{
|
||||
id: idsel,
|
||||
table: mytable,
|
||||
table: mytable.value,
|
||||
fieldsvalue: {}
|
||||
}
|
||||
|
||||
@@ -396,9 +397,7 @@ export default defineComponent({
|
||||
}
|
||||
// mydata.fieldsvalue[colsel.value.field][colsel.subfield] = newVal
|
||||
} else {
|
||||
if (colsel.value) {
|
||||
mydata.fieldsvalue[colsel.value.field!] = newVal
|
||||
}
|
||||
mydata.fieldsvalue[colsel.value.field!] = newVal
|
||||
}
|
||||
}
|
||||
|
||||
@@ -456,14 +455,17 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
async function createNewRecord() {
|
||||
console.log('createNewRecord')
|
||||
loading.value = true
|
||||
|
||||
const mydata: any = {
|
||||
table: mytable,
|
||||
table: mytable.value,
|
||||
data: {}
|
||||
}
|
||||
|
||||
mydata.data = props.defaultnewrec
|
||||
if (props.defaultnewrec) {
|
||||
mydata.data = props.defaultnewrec
|
||||
}
|
||||
|
||||
// const mykey = fieldsTable.getKeyByTable(mytable)
|
||||
|
||||
@@ -493,14 +495,14 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
console.log('GridTable mounted', tablesel)
|
||||
//console.log('GridTable mounted', tablesel)
|
||||
|
||||
if (!!props.tablesList) {
|
||||
canEdit.value = tools.getCookie(tools.CAN_EDIT, canEdit) === 'true'
|
||||
tablesel.value = tools.getCookie('tablesel', tablesel)
|
||||
}
|
||||
myfilterand.value = props.filterdef
|
||||
console.log('tablesel', tablesel)
|
||||
// console.log('tablesel', tablesel)
|
||||
|
||||
if (tablesel.value === '') {
|
||||
if (!!props.tablesList)
|
||||
@@ -509,7 +511,7 @@ export default defineComponent({
|
||||
tablesel.value = mytable.value
|
||||
}
|
||||
|
||||
console.log('2) tablesel', tablesel)
|
||||
// console.log('2) tablesel', tablesel)
|
||||
|
||||
changeTable(false)
|
||||
|
||||
@@ -518,7 +520,7 @@ export default defineComponent({
|
||||
|
||||
function clickFunz(item: any, col: IColGridTable) {
|
||||
if (col.action) {
|
||||
tools.ActionRecTable(null, col.action, mytable.value, item._id, item, col.askaction)
|
||||
tools.ActionRecTable($q, col.action, mytable.value, item._id, item, col.askaction)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -548,9 +550,9 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function changeCol(newval: any) {
|
||||
console.log('changecol', mytable)
|
||||
console.log('changecol', mytable.value)
|
||||
if (!!mytable.value) {
|
||||
tools.setCookie(mytable, colVisib.value.join('|'))
|
||||
tools.setCookie(mytable.value, colVisib.value.join('|'))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -606,7 +608,7 @@ export default defineComponent({
|
||||
updatedcol()
|
||||
|
||||
if (!!mytable.value) {
|
||||
const myselcol = tools.getCookie(mytable, '')
|
||||
const myselcol = tools.getCookie(mytable.value, '')
|
||||
if (!!myselcol && myselcol.length > 0) {
|
||||
colVisib.value = myselcol.split('|')
|
||||
} else {
|
||||
@@ -682,7 +684,7 @@ export default defineComponent({
|
||||
console.log('saveNewRecord')
|
||||
savenewRec.value = true
|
||||
const mydata = {
|
||||
table: mytable,
|
||||
table: mytable.value,
|
||||
data: {}
|
||||
}
|
||||
|
||||
@@ -705,10 +707,6 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function isfinishLoading() {
|
||||
return globalStore.finishLoading
|
||||
}
|
||||
|
||||
function getlabelAddRow() {
|
||||
return props.labelBtnAddRow
|
||||
}
|
||||
@@ -765,6 +763,9 @@ export default defineComponent({
|
||||
myfilter,
|
||||
disabilita,
|
||||
newRecordBool,
|
||||
lists,
|
||||
refresh,
|
||||
spinner_visible,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="q-pa-xs" v-if="isfinishLoading()">
|
||||
<div class="q-pa-xs" v-if="isfinishLoading">
|
||||
<div class="centermydiv q-ma-sm" style="text-align: center">
|
||||
<q-btn
|
||||
v-if="mytable && visButtRow()" rounded dense color="primary"
|
||||
@@ -47,7 +47,7 @@
|
||||
</q-tr>
|
||||
</template>
|
||||
|
||||
<template>
|
||||
<template v-slot:top-right>
|
||||
<div class="q-table__title" style="min-width: 150px;">{{ mytitle }}</div>
|
||||
|
||||
<!--<p style="color:red"> Rows: {{ getrows }}</p>-->
|
||||
@@ -56,13 +56,13 @@
|
||||
v-model="search" filled dense type="search" debounce="500" hint="Search"
|
||||
v-on:keyup.enter="doSearch">
|
||||
<template v-slot:after>
|
||||
<q-btn v-if="mytable" label="" color="primary" @click="refresh()" icon="search"></q-btn>
|
||||
<q-btn v-if="mytable" label="" color="primary" @click="refresh" icon="search"></q-btn>
|
||||
</template>
|
||||
</q-input>
|
||||
<q-toggle
|
||||
v-if="mytable" v-model="canEdit" :disable="disabilita()" :val="lists.MenuAction.CAN_EDIT_TABLE"
|
||||
class="q-mx-sm"
|
||||
:label="$t('grid.editvalues')" @input="changefuncAct">
|
||||
:label="$t('grid.editvalues')" @update:model-value="changefuncAct">
|
||||
</q-toggle>
|
||||
|
||||
<q-btn
|
||||
@@ -135,6 +135,7 @@
|
||||
<div
|
||||
v-if="colVisib.includes(col.field + col.subfield)" class="tdclass">
|
||||
<div :class="getclrow(props.row)">
|
||||
|
||||
<CMyPopupEdit
|
||||
:canEdit="canEdit"
|
||||
:disable="disabilita()"
|
||||
@@ -196,6 +197,7 @@
|
||||
<div
|
||||
class="q-ma-sm q-pa-sm colmodif col-grow rounded-borders " style="border: 1px solid #bbb"
|
||||
@click="colclicksel = mycol">
|
||||
|
||||
<CMyPopupEdit
|
||||
:canEdit="true"
|
||||
:disable="disabilita()"
|
||||
|
||||
@@ -119,8 +119,8 @@ export default defineComponent({
|
||||
|
||||
myvalue.value = tools.convertiTagHTMLPerBOT(myvalue.value)
|
||||
|
||||
console.log('saveval', myvalue)
|
||||
emit('showandsave', myvalue)
|
||||
console.log('saveval', myvalue.value)
|
||||
emit('showandsave', myvalue.value)
|
||||
// emit('update:value', myvalue)
|
||||
showeditor.value = false
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
:toolbar="toolbarcomp"
|
||||
debounce="500"
|
||||
:fonts="myfonts"
|
||||
@input="changeval"
|
||||
@update:model-value="changeval"
|
||||
@paste="evt => pasteCapture(evt)"
|
||||
@keyup.enter.stop
|
||||
v-model="myvalue">
|
||||
|
||||
@@ -15,6 +15,7 @@ import { CMyChipList } from '@/components/CMyChipList'
|
||||
import { CMyToggleList } from '@/components/CMyToggleList'
|
||||
import { CDateTime } from '@/components/CDateTime'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyFieldDb',
|
||||
props: {
|
||||
@@ -185,7 +186,7 @@ export default defineComponent({
|
||||
setValDb(myq, props.mykey, myvalue.value, props.type, props.serv, props.table, props.mysubkey, props.id)
|
||||
}
|
||||
|
||||
function savefieldboolean($q: any, value: any) {
|
||||
function savefieldboolean(value: any) {
|
||||
if (myvalue.value === undefined)
|
||||
myvalue.value = 'true'
|
||||
else
|
||||
@@ -228,6 +229,8 @@ export default defineComponent({
|
||||
tools,
|
||||
costanti,
|
||||
myq: $q,
|
||||
fieldsTable,
|
||||
globalStore,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -48,10 +48,10 @@
|
||||
<CMyChipList
|
||||
:type="costanti.FieldType.binary"
|
||||
:value="myvalue"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
</div>
|
||||
<!-- Show Value -->
|
||||
<div v-else-if="type === costanti.FieldType.nationality">
|
||||
@@ -86,20 +86,20 @@
|
||||
<CMyChipList
|
||||
:type="type"
|
||||
:value="myvalue"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
</div>
|
||||
<div v-else-if="type === costanti.FieldType.select">
|
||||
<CMyChipList
|
||||
myclass="text-center"
|
||||
:type="costanti.FieldType.select"
|
||||
:value="myvalue"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
</div>
|
||||
<div v-else-if="type === costanti.FieldType.html">
|
||||
<div v-html="myvalprinted()">
|
||||
@@ -109,7 +109,7 @@
|
||||
<div v-else-if="type === costanti.FieldType.boolean">
|
||||
<q-toggle
|
||||
dark color="green" v-model="myvalue" :label="col.title"
|
||||
@input="savefieldboolean($q)"></q-toggle>
|
||||
@update:model-value="savefieldboolean"></q-toggle>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-html="myvalprinted()"></div>
|
||||
@@ -168,10 +168,10 @@
|
||||
<div v-else-if="type === costanti.FieldType.binary">
|
||||
<CMyToggleList
|
||||
:label="col.title"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
v-model:value="myvalue"
|
||||
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)">
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)">
|
||||
</CMyToggleList>
|
||||
</div>
|
||||
<div v-else-if="type === costanti.FieldType.html">
|
||||
@@ -183,9 +183,9 @@
|
||||
<CMySelect
|
||||
:label="col.title"
|
||||
v-model:value="myvalue"
|
||||
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:useinput="false">
|
||||
</CMySelect>
|
||||
</div>
|
||||
@@ -240,10 +240,10 @@
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.multiselect">
|
||||
<CMyToggleList
|
||||
:label="col.title"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
v-model:value="myvalue"
|
||||
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:isarray="true">
|
||||
</CMyToggleList>
|
||||
|
||||
@@ -255,12 +255,12 @@
|
||||
outlined
|
||||
multiple
|
||||
options-dense
|
||||
:display-value="db_fieldsTable.getTitleByTable(col.jointable)"
|
||||
:display-value="fieldsTable.getTitleByTable(col.jointable)"
|
||||
emit-value
|
||||
map-options
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:option-label="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||
:option-value="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:option-label="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:option-value="fieldsTable.getKeyByTable(col.jointable)"
|
||||
style="min-width: 150px"
|
||||
>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div v-if="mypath && !!rec">
|
||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||
<div v-if="!!rec.img1" class="text-center">
|
||||
<q-img :src="`public/`+ rec.img1" class="img"></q-img>
|
||||
<q-img :src="``+ rec.img1" class="img"></q-img>
|
||||
</div>
|
||||
|
||||
<div v-if="!!rec.content" v-html="rec.content"></div>
|
||||
@@ -11,14 +11,14 @@
|
||||
</q-video>
|
||||
|
||||
<div v-if="!!rec.img2" class="text-center">
|
||||
<q-img :src="`public/`+ rec.img2" class="img"></q-img>
|
||||
<q-img :src="``+ rec.img2" class="img"></q-img>
|
||||
</div>
|
||||
|
||||
<div v-if="!!rec.content2" v-html="rec.content2"></div>
|
||||
<q-video v-if="!!rec.video2" :src="rec.video2" :ratio="rec.ratio2"></q-video>
|
||||
|
||||
<div v-if="!!rec.img3" class="text-center">
|
||||
<q-img :src="`public/`+ rec.img2" class="img"></q-img>
|
||||
<q-img :src="``+ rec.img2" class="img"></q-img>
|
||||
</div>
|
||||
|
||||
<div v-if="!!rec.content3" v-html="rec.content3"></div>
|
||||
|
||||
@@ -192,7 +192,6 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function Savedb(newVal: any, valinitial: any) {
|
||||
console.log('Savedb')
|
||||
|
||||
if (props.col.fieldtype === costanti.FieldType.boolean) {
|
||||
// console.log('myvalue', myvalue, newVal, myvalueprec)
|
||||
@@ -334,6 +333,7 @@ export default defineComponent({
|
||||
costanti,
|
||||
fieldsTable,
|
||||
onInput,
|
||||
globalStore,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
:type="costanti.FieldType.binary"
|
||||
:value="myvalue"
|
||||
@input="changevalRec"
|
||||
:options="fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
@@ -115,7 +115,7 @@
|
||||
@input="changevalRec"
|
||||
:type="costanti.FieldType.multiselect"
|
||||
:value="myvalue"
|
||||
:options="fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
@@ -126,7 +126,7 @@
|
||||
myclass="text-center"
|
||||
:type="costanti.FieldType.select"
|
||||
:value="myvalue"
|
||||
:options="fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
@@ -135,7 +135,7 @@
|
||||
<q-toggle
|
||||
dark color="green" v-model="myvalue" :label="col.title"
|
||||
:disable="disable && col.name !== 'profile.saw_zoom_presentation'"
|
||||
@input="changevalRec"></q-toggle>
|
||||
@update:model-value="changevalRec"></q-toggle>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.html">
|
||||
<div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true">
|
||||
@@ -204,7 +204,7 @@
|
||||
<CMyChipList
|
||||
:type="costanti.FieldType.binary"
|
||||
:value="myvalue"
|
||||
:options="fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
@@ -214,7 +214,7 @@
|
||||
<CMyChipList
|
||||
:type="costanti.FieldType.multiselect"
|
||||
:value="myvalue"
|
||||
:options="fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
@@ -224,7 +224,7 @@
|
||||
myclass="text-center"
|
||||
:type="costanti.FieldType.select"
|
||||
:value="myvalue"
|
||||
:options="fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
@@ -233,7 +233,7 @@
|
||||
<q-toggle
|
||||
dark color="green" v-model="myvalue" :label="col.title"
|
||||
:disable="disable && col.name !== 'profile.saw_zoom_presentation'"
|
||||
@input="Savedb"></q-toggle>
|
||||
@update:model-value="Savedb"></q-toggle>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.html">
|
||||
<div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true">
|
||||
@@ -268,6 +268,7 @@
|
||||
v-slot="scope">
|
||||
|
||||
<div v-if="col.fieldtype === costanti.FieldType.boolean">
|
||||
Boolean:
|
||||
<q-checkbox v-model="scope.value" :label="col.title">
|
||||
</q-checkbox>
|
||||
{{ visuValByType(myvalue, col, row) }}
|
||||
@@ -307,7 +308,7 @@
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.binary">
|
||||
<CMyToggleList
|
||||
:label="col.title"
|
||||
:options="fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
v-model:value="myvalue"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)">
|
||||
@@ -319,7 +320,7 @@
|
||||
v-model:value="myvalue"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:options="fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:useinput="false">
|
||||
</CMySelect>
|
||||
</div>
|
||||
@@ -377,7 +378,7 @@
|
||||
:display-value="fieldsTable.getTitleByTable(col.jointable)"
|
||||
emit-value
|
||||
map-options
|
||||
:options="fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:option-label="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:option-value="fieldsTable.getKeyByTable(col.jointable)"
|
||||
style="min-width: 150px"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
:label="rec.label"
|
||||
:color="tools.getColorByIndexBest(index)"
|
||||
keep-color
|
||||
@input="changeval">
|
||||
@update:model-value="changeval">
|
||||
</q-toggle>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user