|
|
|
@ -132,25 +132,27 @@ const [useProvideSharedFormStore, useSharedFormStore] = useInjectionState((share
|
|
|
|
|
{} as Record<string, FormColumnType>, |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
columns.value = viewMeta.model?.columns?.map((c) => { |
|
|
|
|
if ( |
|
|
|
|
!isSystemColumn(c) && |
|
|
|
|
!isVirtualCol(c) && |
|
|
|
|
!isAttachment(c) && |
|
|
|
|
c.uidt !== UITypes.SpecificDBType && |
|
|
|
|
c?.title && |
|
|
|
|
c?.cdf && |
|
|
|
|
!/^\w+\(\)|CURRENT_TIMESTAMP$/.test(c.cdf) |
|
|
|
|
) { |
|
|
|
|
formState.value[c.title] = typeof c.cdf === 'string' ? c.cdf.replace(/^'|'$/g, '') : c.cdf |
|
|
|
|
} |
|
|
|
|
columns.value = (viewMeta.model?.columns || []) |
|
|
|
|
.filter((c) => fieldById[c.id]) |
|
|
|
|
.map((c) => { |
|
|
|
|
if ( |
|
|
|
|
!isSystemColumn(c) && |
|
|
|
|
!isVirtualCol(c) && |
|
|
|
|
!isAttachment(c) && |
|
|
|
|
c.uidt !== UITypes.SpecificDBType && |
|
|
|
|
c?.title && |
|
|
|
|
c?.cdf && |
|
|
|
|
!/^\w+\(\)|CURRENT_TIMESTAMP$/.test(c.cdf) |
|
|
|
|
) { |
|
|
|
|
formState.value[c.title] = typeof c.cdf === 'string' ? c.cdf.replace(/^'|'$/g, '') : c.cdf |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
...c, |
|
|
|
|
meta: { ...parseProp(fieldById[c.id].meta), ...parseProp(c.meta) }, |
|
|
|
|
description: fieldById[c.id].description, |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
return { |
|
|
|
|
...c, |
|
|
|
|
meta: { ...parseProp(fieldById[c.id].meta), ...parseProp(c.meta) }, |
|
|
|
|
description: fieldById[c.id].description, |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const _sharedViewMeta = (viewMeta as any).meta |
|
|
|
|
sharedViewMeta.value = isString(_sharedViewMeta) ? JSON.parse(_sharedViewMeta) : _sharedViewMeta |
|
|
|
@ -188,6 +190,8 @@ const [useProvideSharedFormStore, useSharedFormStore] = useInjectionState((share
|
|
|
|
|
if (password.value && password.value !== '') { |
|
|
|
|
passwordError.value = error.message |
|
|
|
|
} |
|
|
|
|
} else if (error.error === NcErrorType.UNKNOWN_ERROR) { |
|
|
|
|
console.log(e) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|