Open authoritya opened 7 months ago
//外部调用方法手动赋值 const fn = async() => { const [sourceData, targetData] = await Promise.all([ DataApi.listObjDataV3(originMeta ? originMeta.obj.obj.ns : sourceObjData.ns, mainData ? mainData.biz_data_obj_name : objMainData.biz_data_obj_name, {...payload, filters: sourceFilter}), DataApi.listObjDataV3(originMeta ? originMeta.obj.obj.ns : sourceObjData.ns, mainData ? mainData.standard_name : objMainData.standard_name, {...payload, filters: targetFilter}), ])
setDataSource(sourceData.obj.data ?? []) setDataTarget(targetData.obj.data ?? []) }
<ButterflyDataMapping width={'100%'} type={'single'} sourceColumns={columnsSource} targetColumns={columnsTarget} sourceData={{fields: dataSource}} targetData={{fields: dataTarget}} mappingData={mappingData} sourceClassName={'source-column'} targetClassName={'target-column'} onRowMouseOver={onRowMouseOver} onRowMouseOut={onRowMouseOut} onEdgeClick={onEdgeClick} config={{checkable: {source: true}}} onChange={onMapFieldsChange} />
//外部调用方法手动赋值 const fn = async() => { const [sourceData, targetData] = await Promise.all([ DataApi.listObjDataV3(originMeta ? originMeta.obj.obj.ns : sourceObjData.ns, mainData ? mainData.biz_data_obj_name : objMainData.biz_data_obj_name, {...payload, filters: sourceFilter}), DataApi.listObjDataV3(originMeta ? originMeta.obj.obj.ns : sourceObjData.ns, mainData ? mainData.standard_name : objMainData.standard_name, {...payload, filters: targetFilter}), ])
setDataSource(sourceData.obj.data ?? []) setDataTarget(targetData.obj.data ?? []) }
<ButterflyDataMapping width={'100%'} type={'single'} sourceColumns={columnsSource} targetColumns={columnsTarget} sourceData={{fields: dataSource}} targetData={{fields: dataTarget}} mappingData={mappingData} sourceClassName={'source-column'} targetClassName={'target-column'} onRowMouseOver={onRowMouseOver} onRowMouseOut={onRowMouseOut} onEdgeClick={onEdgeClick} config={{checkable: {source: true}}} onChange={onMapFieldsChange} />