Browse Source

Merge pull request #8729 in DEC/decision-webui-dcm from release/11.0 to bugfix/11.0

* commit '719227fde30d55ab4a4c738fdddd51b3f81ba2ee':
  FDL-9101 fix: 修复hana数据连接url联动输入框异常问题
  REPORT-112768 fix: 修复数据连接更新视图不同步问题
  REPORT-112768 fix: 修复数据连接更新视图不同步问题
bugfix/11.0
superman 11 months ago
parent
commit
5d71918704
  1. 6
      src/modules/app.provider.ts
  2. 10
      src/modules/pages/connection/connection.ts
  3. 2
      src/modules/pages/connection/list/list.model.ts

6
src/modules/app.provider.ts

@ -92,13 +92,13 @@ BI.provider('dec.connection.provider.datebase', function () {
}
// 处理SAP HANA数据连接url
const sapHanaUrl = url.match(/^jdbc:(sap):(thin:([0-9a-zA-Z/]*)?@|thin:([0-9a-zA-Z/]*)?@\/\/|\/\/|)([0-9a-zA-Z_\\.-]+)(:([0-9|port]+))?([^]+)?(.*)/i);
const sapHanaUrl = url.match(/^jdbc:(sap):(thin:([0-9a-zA-Z/]*)?@|thin:([0-9a-zA-Z/]*)?@\/\/|\/\/|)([0-9a-zA-Z_\\.-]+)(:([0-9|port]+))?(\?databaseName=)?([^&]+)([^]+)?(.*)/i);
if (sapHanaUrl) {
return {
host: sapHanaUrl[5],
port: sapHanaUrl[7] === 'port' ? '' : sapHanaUrl[7],
databaseName: '',
urlInfo: sapHanaUrl[9],
databaseName: sapHanaUrl[9] || '',
urlInfo: sapHanaUrl[10],
};
}

10
src/modules/pages/connection/connection.ts

@ -24,11 +24,15 @@ export class Connection extends BI.Widget {
title: HTapeLayout;
watch = {
connectionSelected: {
connectionSelectedOne: {
immediate: true,
handler: (name: string) => {
handler: (v: Connection) => {
BI.nextTick(() => {
name ? this.renderConnectionListView(name) : this.renderEmptyListView();
const connectionName = v.connectionName;
connectionName
? this.renderConnectionListView(connectionName)
: this.renderEmptyListView();
});
},
},

2
src/modules/pages/connection/list/list.model.ts

@ -44,7 +44,7 @@ export class ConnectionListModel extends Model<{
// 仅首次进入时从url中读取参数,其他情况保留选中状态
defaultDatabaseName ||= data.data[0].connectionName;
this.setSelectedConnection(this.model.connectionSelected || defaultDatabaseName);
this.setSelectedConnection(defaultDatabaseName);
}
return new Promise(resolve => {

Loading…
Cancel
Save