Browse Source

[修改]修复两类证照不能保存的bug

beijing
邵佳豪 3 years ago
parent
commit
0ca4f4acf3
  1. 5
      src/app/pages/license/file-category/file-category.component.ts
  2. 3
      src/app/pages/license/update-category/update-category.component.ts
  3. 3
      src/app/system-management/organization/organization.component.ts
  4. 53
      src/styles.scss

5
src/app/pages/license/file-category/file-category.component.ts

@ -132,16 +132,17 @@ export class FileCategoryComponent implements OnInit {
return false;
}
instance.data2.validatyType = Number(instance.validatyType)
if (instance.data2.imageUrl.indexOf('http') == -1) {
if (instance.data2.imageUrl && instance.data2.imageUrl.indexOf('http') == -1) {
let newUrl = window.location.protocol + '//' + window.location.host + instance.data2.imageUrl
instance.data2.imageUrl = newUrl
}
if (!instance.isSubmit) {
this.http.post('/api/services/app/StationFileLicense/Create', instance.data2).subscribe((data: any) => {
this.getStationList();
this.message.create('success', '修改成功!');
})
return false;
return true;
} else {
await new Promise(resolve => {
this.http.post('/api/services/app/StationFileLicense/Create', instance.data2).subscribe((data: any) => {

3
src/app/pages/license/update-category/update-category.component.ts

@ -115,6 +115,7 @@ export class UpdateCategoryComponent implements OnInit {
}
edit(item) {
console.log(item)
if (item.auditStatus === 1) {
this.message.create('warning', '审核中不允许编辑!');
return
@ -163,7 +164,7 @@ export class UpdateCategoryComponent implements OnInit {
body.attachment = newUrl
}
if (body.isYearlyCheck && !body.yearlyCheckDescription) {
if (body.isYearlyCheck && !body.yearlyCheckDescription && body.lastLicenseAuditType == 1) {
this.message.create('warning', '请填写年检更新说明!');
return false
}

3
src/app/system-management/organization/organization.component.ts

@ -60,8 +60,7 @@ export class OrganizationComponent implements OnInit {
});
this.allOrList = data.result.items
this.nodes = [...this.toTree.toTree(data.result.items)]
this.defaultExpandedKeys = [this.nodes[0].id]
this.defaultExpandedKeys = [...this.defaultExpandedKeys]
this.defaultExpandedKeys.length == 0 ? this.defaultExpandedKeys = [this.nodes[0].id] : this.defaultExpandedKeys = [...this.defaultExpandedKeys]
console.log(this.nodes)
})
}

53
src/styles.scss

@ -188,4 +188,57 @@ h1 {
}
}
#container {
flex: 1;
position: relative;
height: 46px;
overflow: hidden;
}
#list-wrapper {
position: relative;
}
ul {
list-style: none;
}
.info {
flex: 1;
display: flex;
height: 46px;
line-height: 46px;
color: #fff;
display: flex;
align-items: center;
justify-content: space-between;
.infoitem {
flex: 1;
display: flex;
align-items: center;
img {
width: 40px;
}
color: #fff;
}
.btn {
color: #36A2FF;
span {
cursor: pointer;
}
span:nth-child(1) {
margin-right: 24px;
}
span:nth-child(2) {
margin-right: 40px;
}
}
}

Loading…
Cancel
Save