diff --git a/src/app/home/basic-info/unit-details/unit-details.component.html b/src/app/home/basic-info/unit-details/unit-details.component.html
index 5acfd98..e24814d 100644
--- a/src/app/home/basic-info/unit-details/unit-details.component.html
+++ b/src/app/home/basic-info/unit-details/unit-details.component.html
@@ -6,7 +6,7 @@
-
+
单位信息
@@ -57,7 +57,7 @@
-
+
diff --git a/src/app/home/basic-info/unit/unit.component.html b/src/app/home/basic-info/unit/unit.component.html
index a273d07..2078ab0 100644
--- a/src/app/home/basic-info/unit/unit.component.html
+++ b/src/app/home/basic-info/unit/unit.component.html
@@ -45,7 +45,7 @@
-
+
@@ -84,6 +84,7 @@
{{ data.state }} |
查看详情
+ 修改
关闭
|
diff --git a/src/app/home/basic-info/unit/unit.component.ts b/src/app/home/basic-info/unit/unit.component.ts
index 0539526..40a7d5d 100644
--- a/src/app/home/basic-info/unit/unit.component.ts
+++ b/src/app/home/basic-info/unit/unit.component.ts
@@ -47,6 +47,7 @@ export class UnitComponent implements OnInit {
this.listOfData = data.items
this.listOfData = [...this.listOfData]
console.log(this.listOfData);
+
for (let index = 0; index < this.listOfData.length; index++) {
this.listOfData[index].creationTime=this.listOfData[index].creationTime.substring(0,10)
@@ -60,7 +61,8 @@ export class UnitComponent implements OnInit {
}
addOr(node?: any) {
-
+ console.log(node);
+
const modal = this.modal.create({
nzTitle: "新增单位",
nzContent: AddUnitComponent,
@@ -71,7 +73,7 @@ export class UnitComponent implements OnInit {
console.log(instance.validateForm);
if (instance.validateForm.valid) {
console.log(instance.validateForm);
- // return
+ return
await new Promise(resolve => {
let body = {
companyName: instance.validateForm.value.unit,
@@ -86,12 +88,15 @@ export class UnitComponent implements OnInit {
}
this.http.post('/api/Companies', body).subscribe({
next: (data: any) => {
- console.log(data, 80808)
-
+ this.message.create('success', '编辑成功!');
+ modal.destroy()
+ this.getCompanies()
+ return true
},
error: (err) => {
-
console.log(err)
+ this.message.create('warning', '创建失败');
+ return false
}
}