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

fix: 环境变量修改

parent 9f24b928
{
"name": "panda-xform",
"version": "5.1.0",
"description": "5.1.0 增加增加本人电话",
"version": "5.1.1",
"description": "5.1.1 环境变量修改",
"keywords": [
"panda-xform"
],
......
......@@ -28,7 +28,7 @@ const formAuto = debounce(formAutomatic)
const ValueEdit = (props) => {
const preview = sessionStorage.getItem('FormRender')
const userInfo = preview !== 'preview' ? initUserInfo : window?.globalConfig?.userInfo || initUserInfo
const userInfo = preview === 'preview' ? initUserInfo : window?.globalConfig?.userInfo || initUserInfo
const {
onChange,
value,
......
......@@ -277,17 +277,17 @@ const RelationForm = (props) => {
}
})
setDataSource(array)
let type = row.ID.includes('前端ID') ? 'add' : 'edit'
let type = row?.ID?.includes('前端ID') ? 'add' : 'edit'
let formValue = []
let field = config?.accountFieids?.filter(v => v.webDisplay).map(v => v.fieldName)
field.forEach(v => {
formValue.push({ fieldName: v, fieldValue: row[v] || '' })
})
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)
listArray.push(itemData)
addons.setValue('relationForm', { ...relationForm, data: listArray })
addons?.setValue('relationForm', { ...relationForm, data: listArray })
setTimeout(() => {
onChange(value && value.includes(' ') ? `${array.length}` : `${array.length} `)
}, 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