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