fix column changed value (fieldtype)
This commit is contained in:
@@ -150,6 +150,8 @@ export default defineComponent({
|
||||
// recordCol.value = fieldsTable.getrecTableList(props.table)
|
||||
let columns = fieldsTable.getArrColsByTable(props.table)
|
||||
|
||||
// console.log('table', props.table, 'LAB', optlab.value, 'COL', columns)
|
||||
|
||||
if (columns) {
|
||||
col.value = columns.find((col: any) => col.name === props.field)
|
||||
} else {
|
||||
@@ -160,6 +162,7 @@ export default defineComponent({
|
||||
jointable.value = col.value.jointable!
|
||||
}
|
||||
|
||||
|
||||
const arrk = props.field.split('.')
|
||||
if (arrk) {
|
||||
mykey.value = props.field
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
fieldtype: {{fieldtype}}
|
||||
<div v-if="visuElem()" :class="mytitle ? `row items-center justify-center q-ma-xs text-center` : ``">
|
||||
<div v-if="mytitle" class="q-ma-xs">
|
||||
<q-field rounded outlined :bg-color="($q.dark.isActive ? '' : 'blue-4')" dense style="min-width:110px;">
|
||||
|
||||
@@ -254,7 +254,7 @@ export default defineComponent({
|
||||
// console.log('crea', isFieldDb(), 'props.mycol', props.mycol)
|
||||
|
||||
if (props.mycol && props.mycol.name && props.mycol.name !== 'test') {
|
||||
col.value = props.mycol
|
||||
col.value = {...props.mycol}
|
||||
} else {
|
||||
if (col.value.name === 'test') {
|
||||
col.value.name = props.field
|
||||
|
||||
@@ -119,6 +119,12 @@
|
||||
:label="myvalue"
|
||||
>
|
||||
</q-btn>
|
||||
<div v-else>
|
||||
<span
|
||||
:class="{ disabled: disable }"
|
||||
v-html="visuValByType(myvalue, col, row)"
|
||||
></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label lines="1">
|
||||
|
||||
<CMyFieldRec
|
||||
table="users"
|
||||
:id="user._id"
|
||||
|
||||
@@ -2981,7 +2981,7 @@ export const fieldsTable = {
|
||||
},
|
||||
getArrColsByTable(mytable: string) {
|
||||
const tablerec: any = this.tablesList.find((rec) => rec.value === mytable)
|
||||
if (tablerec) {
|
||||
if (tablerec && tablerec.columns) {
|
||||
return tablerec.columns
|
||||
} else
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user