Browse Source

DEC-17991 chore: 甘老师插件接口问题反馈--数据连接支持创建时添加connectionname

release/10.0
zsmj1994 4 years ago
parent
commit
ba6dfb1792
  1. 12
      src/modules/pages/maintain/forms/components/form.plugin.ts

12
src/modules/pages/maintain/forms/components/form.plugin.ts

@ -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(),
}; };
} }

Loading…
Cancel
Save