xufenglei
2018-01-05 ff5ee2b5f624345c65693aeddc1187629a7e85ac
src/app/routes/systems/account/account-edit/account-edit.component.ts
@@ -39,6 +39,7 @@
      expireTime: [this.account.expireTime],
      id: [this.account.id]
    });
    this.searchOptions = this.account.organization ? [this.account.organization] : [];
  }
  save() {
@@ -70,9 +71,13 @@
  }
  searchChange(searchText) {
    const query = encodeURI(searchText);
    this.http.get(environment.SERVER_BASH_URL + '/organization/list/' + query).subscribe((res: any) => {
      this.searchOptions = res.data;
    });
    if (searchText) {
      const query = encodeURI(searchText);
      if (query) {
        this.http.get(environment.SERVER_BASH_URL + '/organization/list/' + query).subscribe((res: any) => {
          this.searchOptions = res.data;
        });
      }
    }
  }
}