|
|
|
@ -71,6 +71,8 @@ export class LoginSatus extends StatusBase {
|
|
|
|
|
console.error("获取单位列表失败"); |
|
|
|
|
console.log(error); |
|
|
|
|
if (error instanceof HttpErrorResponse && error.status === 404) { |
|
|
|
|
let isAdd = confirm('数据库为空,是否进行初始化?') |
|
|
|
|
if (isAdd) { |
|
|
|
|
//数据库没有数据,新建
|
|
|
|
|
this.institutionList = []; |
|
|
|
|
if (onSuccess) { |
|
|
|
@ -78,6 +80,7 @@ export class LoginSatus extends StatusBase {
|
|
|
|
|
} |
|
|
|
|
console.log("新建数据列表"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
console.log("单纯报错", error instanceof HttpErrorResponse, error.status === 404) |
|
|
|
|
if (onFail) { |
|
|
|
|