Commit 51a77407 authored by 田翔's avatar 田翔

fix: 关联表单bug

parent 935ecee0
{
"name": "panda-xform",
"version": "5.9.0",
"description": "5.9.0 关联表单bug",
"version": "5.9.1",
"description": "5.9.1 关联表单bug",
"keywords": [
"panda-xform"
],
......
......@@ -144,6 +144,12 @@ const RelationForm = (props) => {
queryWheres.push({ field: v.toField, type: '等于', value: codes[v.fromField] || formDataObj[v.fromField] })
})
}
let relationForm = addons.getValue('relationForm') || { configs: [], data: [], table: [] }
window.configsLocal.push({ ...schema, id: schema.$id, queryWheres: queryWheres.map(v => ({ fieldName: v.field, fieldValue: v.value })) })
addons.setValue('relationForm', {
...relationForm,
configs: window.configsLocal,
})
return queryWheres
}
......@@ -166,9 +172,7 @@ const RelationForm = (props) => {
setDataSource(tableData)
onChange(`${tableData.length}`)
let relationForm = addons.getValue('relationForm') || { configs: [], data: [], table: [] }
window.configsLocal.push({ ...schema, id: schema.$id, queryWheres: queryWheres.map(v => ({ fieldName: v.field, fieldValue: v.value })) })
window.tableLocal.push({ config, dataSource: tableData, schema })
console.log(1, window.configsLocal, window.tableLocal)
addons.setValue('relationForm', {
...relationForm,
configs: window.configsLocal,
......
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