@@ -23,11 +23,13 @@ import {TISService} from "../common/tis.service";
2323import { NzModalService } from "ng-zorro-antd/modal" ;
2424import { ActivatedRoute , Router } from "@angular/router" ;
2525import { DataxDTO } from "./datax.add.component" ;
26- import { Descriptor , HeteroList , PluginType } from "../common/tis.plugin" ;
26+ import { Descriptor , HeteroList , PluginMeta , PluginType } from "../common/tis.plugin" ;
2727import { PluginsComponent } from "../common/plugins.component" ;
2828import { DATAX_PREFIX_DB } from "./datax.add.base" ;
29+ import { DataxAddStep4Component , ISubDetailTransferMeta } from "./datax.add.step4.component" ;
2930
3031const KEY_END_TYPE = 'desc'
32+ const KEY_TRANSFORMER_END_TYPE = 'transformer_desc'
3133const DATAX_READER = 'dataxReader'
3234const DATAX_WRITER = 'dataxWriter'
3335
@@ -167,22 +169,45 @@ export class EndCptListComponent extends BasicFormComponent implements OnInit {
167169 ngOnInit ( ) : void {
168170
169171 let queryParams = this . route . snapshot . queryParamMap ;
170- this . tisService . currentApp = new CurrentCollection ( 0 , "mysql_mysql" ) ;
172+ let pipeName = "mysql_mysql" ;
173+ this . tisService . currentApp = new CurrentCollection ( 0 , pipeName ) ;
174+
175+ let transformerEndType : string [ ] = queryParams . getAll ( KEY_TRANSFORMER_END_TYPE ) ;
176+ if ( transformerEndType && transformerEndType . length > 0 ) {
177+
178+ let pluginMeta : PluginType = {
179+ name : 'transformerUDF' ,
180+ require : true ,
181+ "extraParam" : ( 'dataxName_' + pipeName ) ,
182+ descFilter : {
183+ localDescFilter : ( d ) => {
184+ return transformerEndType [ 0 ] === d . impl ;
185+ }
186+ }
187+ }
188+ let meta : ISubDetailTransferMeta = {
189+ id : 'orderdetail' ,
190+ // behaviorMeta: ISubDetailClickBehaviorMeta;
191+ fieldName : null ,
192+ idList : [ ] ,
193+ // 是否已经设置子表单
194+ setted : false
195+ } ;
196+ DataxAddStep4Component . processSubFormHeteroList ( this , pluginMeta , meta , [ ] )
197+ . then ( ( hlist : HeteroList [ ] ) => {
198+ console . log ( hlist ) ;
199+ for ( let hetero of hlist ) {
200+ PluginsComponent . addDefaultItem ( pluginMeta as PluginMeta , hetero ) ;
201+ }
202+
203+ this . assistHeteroList = hlist ;
204+ this . assistMetas = [ pluginMeta ] ;
205+ } ) ;
206+ return ;
207+ }
208+
171209 let assistEndType : string [ ] = queryParams . getAll ( KEY_END_TYPE ) ;
172210 if ( assistEndType && assistEndType . length > 0 ) {
173- //console.log(assistEndType);
174- // this.httpPost('/coredefine/corenodemanage.ajax'
175- // , 'action=plugin_action&emethod=get_descs&'
176- // + assistEndType.map((desc) => KEY_END_TYPE + "=" + desc).join("&"))
177- // .then((r) => {
178- // if (!r.success) {
179- // return;
180- // }
181- //
182- // let descMap = Descriptor.wrapDescriptors(r.bizresult)
183- // return descMap;
184- //
185- // });
186211
187212 let pluginMeta : PluginType [ ] = new Array ( ) ;
188213 for ( let i of assistEndType ) {
0 commit comments