Commit 0a6e792b authored by 田翔's avatar 田翔

fix: 环境变量修改

parent 9f24b928
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "5.1.0", "version": "5.1.1",
"description": "5.1.0 增加增加本人电话", "description": "5.1.1 环境变量修改",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -28,7 +28,7 @@ const formAuto = debounce(formAutomatic) ...@@ -28,7 +28,7 @@ const formAuto = debounce(formAutomatic)
const ValueEdit = (props) => { const ValueEdit = (props) => {
const preview = sessionStorage.getItem('FormRender') const preview = sessionStorage.getItem('FormRender')
const userInfo = preview !== 'preview' ? initUserInfo : window?.globalConfig?.userInfo || initUserInfo const userInfo = preview === 'preview' ? initUserInfo : window?.globalConfig?.userInfo || initUserInfo
const { const {
onChange, onChange,
value, value,
......
...@@ -277,17 +277,17 @@ const RelationForm = (props) => { ...@@ -277,17 +277,17 @@ const RelationForm = (props) => {
} }
}) })
setDataSource(array) setDataSource(array)
let type = row.ID.includes('前端ID') ? 'add' : 'edit' let type = row?.ID?.includes('前端ID') ? 'add' : 'edit'
let formValue = [] let formValue = []
let field = config?.accountFieids?.filter(v => v.webDisplay).map(v => v.fieldName) let field = config?.accountFieids?.filter(v => v.webDisplay).map(v => v.fieldName)
field.forEach(v => { field.forEach(v => {
formValue.push({ fieldName: v, fieldValue: row[v] || '' }) formValue.push({ fieldName: v, fieldValue: row[v] || '' })
}) })
let itemData = { type, accountTable: accountName, ID: row.ID, values: formValue } let itemData = { type, accountTable: accountName, ID: row.ID, values: formValue }
let relationForm = addons.getValue('relationForm') || { configs: [], data: [] } let relationForm = addons?.getValue('relationForm') || { configs: [], data: [] }
let listArray = relationForm.data.filter(v => v.ID !== itemData.ID) let listArray = relationForm.data.filter(v => v.ID !== itemData.ID)
listArray.push(itemData) listArray.push(itemData)
addons.setValue('relationForm', { ...relationForm, data: listArray }) addons?.setValue('relationForm', { ...relationForm, data: listArray })
setTimeout(() => { setTimeout(() => {
onChange(value && value.includes(' ') ? `${array.length}` : `${array.length} `) onChange(value && value.includes(' ') ? `${array.length}` : `${array.length} `)
}, 0) }, 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment