Commit 2ad668c8 authored by 杨子龙's avatar 杨子龙

修复表格取值问题

parent 59b5928b
...@@ -24,7 +24,7 @@ const IndicatorCard = props => { ...@@ -24,7 +24,7 @@ const IndicatorCard = props => {
if(addons){ if(addons){
const newObj = {}; const newObj = {};
const addonsForm = addons.formData; const addonsForm = addons.getValues();
loopObj(addonsForm , newObj); loopObj(addonsForm , newObj);
field = newObj[schema.fieldName] field = newObj[schema.fieldName]
} }
......
...@@ -263,7 +263,7 @@ const DataTable = props => { ...@@ -263,7 +263,7 @@ const DataTable = props => {
'台账名称': schema.accountName, '台账名称': schema.accountName,
'映射字段': [{ fromField: '工单编号', toField: '工单编号' }], '映射字段': [{ fromField: '工单编号', toField: '工单编号' }],
widget: schema.widget, widget: schema.widget,
schema: schema.layerName, layerName: schema.layerName,
accountName: schema.accountName, accountName: schema.accountName,
tableName: schema.tableName tableName: schema.tableName
} }
...@@ -291,7 +291,7 @@ const DataTable = props => { ...@@ -291,7 +291,7 @@ const DataTable = props => {
const val = key.split("-")[1] const val = key.split("-")[1]
const isHas = areaTaskShine.find(s => s.fromField === val); const isHas = areaTaskShine.find(s => s.fromField === val);
if(isHas){ if(isHas && item[key]){
const valuesObj = { const valuesObj = {
fieldName: isHas.fromField, fieldName: isHas.fromField,
fieldValue: item[key] fieldValue: item[key]
...@@ -322,12 +322,12 @@ const DataTable = props => { ...@@ -322,12 +322,12 @@ const DataTable = props => {
setVisible(false); setVisible(false);
res.forEach((item , index) => { list.forEach((item , index) => {
item.key = index; item.key = index;
}) })
setDataSource(res); setDataSource(list);
setVisible(true); setVisible(true);
onChange(res.length) onChange(list.length)
}) })
return () => { return () => {
......
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