Browse Source

DEC-18013 fix: 【自动化】最新redis数据集插件,新建redis数据连接,默认名称是widget7127这种带随机数

feature/10.0
zsmj1994 4 years ago
parent
commit
71c9d39d9d
  1. 16
      README.md
  2. 2
      src/modules/pages/maintain/forms/components/form.plugin.ts

16
README.md

@ -25,14 +25,16 @@ yarn dev
BI.config(ConstantPluginTyps, (datas: string[]) => [...datas, { BI.config(ConstantPluginTyps, (datas: string[]) => [...datas, {
text: 'Redis', text: 'Redis',
databaseType: 'Redis', databaseType: 'Redis',
edit: '',
show: '',
}]); }]);
``` ```
### 数据连接填写页面 ### 数据连接填写页面
ConstantName名称为`dec.constant.database.conf.connect.form.${name}.edit`,值为组件shortcut的名称 edit属性值为填写组件shortcut的名称
### 数据连接展示页面 ### 数据连接展示页面
ConstantName名称为`dec.constant.database.conf.connect.form.${name}.show`,值为组件shortcut的名称 show属性值为组件shortcut的名称
### 示例 ### 示例
``` ```
@ -121,7 +123,7 @@ BI.shortcut(RedisShowName, RedisShow);
const RedisEdit = BI.inherit(BI.Widget, { const RedisEdit = BI.inherit(BI.Widget, {
props: { props: {
formData: { value: {
url: '', url: '',
port: '6379', port: '6379',
password: '', password: '',
@ -152,7 +154,7 @@ const RedisEdit = BI.inherit(BI.Widget, {
ref: _ref => { ref: _ref => {
this.url = _ref; this.url = _ref;
}, },
text: o.formData.url, text: o.value.url,
}, },
], ],
}, },
@ -173,7 +175,7 @@ const RedisEdit = BI.inherit(BI.Widget, {
ref: _ref => { ref: _ref => {
this.port = _ref; this.port = _ref;
}, },
text: o.formData.port, text: o.value.port,
}, },
], ],
}, },
@ -195,14 +197,14 @@ const RedisEdit = BI.inherit(BI.Widget, {
ref: _ref => { ref: _ref => {
this.password = _ref; this.password = _ref;
}, },
text: o.formData.password, text: o.value.password,
}, },
], ],
}, },
], ],
}; };
}, },
getSubmitValue() { getValue() {
return { return {
url: this.url.getValue(), url: this.url.getValue(),
port: this.port.getValue(), port: this.port.getValue(),

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

@ -32,7 +32,7 @@ export class FormPlugin extends BI.Widget {
return { return {
connectionId, connectionId,
connectionType, connectionType,
connectionName: this.plugin.getName ? this.plugin.getName() : '', connectionName: this.plugin.getConnectionName ? this.plugin.getConnectionName() : '',
connectionData: this.plugin.getValue(), connectionData: this.plugin.getValue(),
}; };
} }

Loading…
Cancel
Save