Browse Source

Pull request #8719: REPORT-112768 fix: 修复数据连接更新视图不同步问题

Merge in DEC/decision-webui-dcm from ~AUSTIN.DUAN/decision-webui-dcm:release/11.0 to release/11.0

* commit '64d03f07821e67249b5abd7ece2e56a471a23b15':
  REPORT-112768 fix: 修复数据连接更新视图不同步问题
release/11.0
Austin.Duan-段嗣跃 11 months ago
parent
commit
d809e1e696
  1. 10
      src/modules/pages/connection/connection.ts
  2. 2
      src/modules/pages/connection/list/list.model.ts

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

@ -24,11 +24,15 @@ export class Connection extends BI.Widget {
title: HTapeLayout; title: HTapeLayout;
watch = { watch = {
connectionSelected: { connectionSelectedOne: {
immediate: true, immediate: true,
handler: (name: string) => { handler: (v: Connection) => {
BI.nextTick(() => { 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中读取参数,其他情况保留选中状态 // 仅首次进入时从url中读取参数,其他情况保留选中状态
defaultDatabaseName ||= data.data[0].connectionName; defaultDatabaseName ||= data.data[0].connectionName;
this.setSelectedConnection(this.model.connectionSelected || defaultDatabaseName); this.setSelectedConnection(defaultDatabaseName);
} }
return new Promise(resolve => { return new Promise(resolve => {

Loading…
Cancel
Save