|
|
|
@ -11,24 +11,28 @@ export class FormPlugin extends BI.Widget {
|
|
|
|
|
plugin: any; |
|
|
|
|
|
|
|
|
|
render() { |
|
|
|
|
const { connectionType } = this.options.formData; |
|
|
|
|
const { connectionType, connectionId, connectionName, connectionData } = this.options.formData; |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
type: getPluginWidgetEdit(connectionType), |
|
|
|
|
ref: (_ref: any) => { |
|
|
|
|
this.plugin = _ref; |
|
|
|
|
}, |
|
|
|
|
value: this.options.formData.connectionData, |
|
|
|
|
value: connectionData, // 兼容
|
|
|
|
|
connectionData, |
|
|
|
|
connectionId, |
|
|
|
|
connectionType, |
|
|
|
|
connectionName, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public getSubmitValue(): Connection { |
|
|
|
|
const { connectionType, connectionId, connectionName } = this.options.formData; |
|
|
|
|
const { connectionType, connectionId } = this.options.formData; |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
connectionId, |
|
|
|
|
connectionType, |
|
|
|
|
connectionName, |
|
|
|
|
connectionName: this.plugin.getName ? this.plugin.getName() : '', |
|
|
|
|
connectionData: this.plugin.getValue(), |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|