Browse Source

[完善]完善代码

beijing
邵佳豪 3 years ago
parent
commit
a80933c290
  1. 4
      src/app/pages/home-page/home-page.component.ts
  2. 13
      src/app/pages/license/update-category/update-category.component.ts

4
src/app/pages/home-page/home-page.component.ts

@ -45,9 +45,7 @@ export class HomePageComponent implements OnInit {
{
type: 'pie',
radius: ['65%', '75%'],
top: '5%',
// bottom: '-5%',
// right: '77%',
// top: '2%',
avoidLabelOverlap: false,//防止标签重叠策略
emphasis: {//中间高亮区域
show: true,

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

@ -157,23 +157,26 @@ export class UpdateCategoryComponent implements OnInit {
let newUrl = window.location.protocol + '//' + window.location.host + body.imageUrl
body.imageUrl = newUrl
}
if (body.hasAttachmentDefault && body.attachment) {
let newUrl = window.location.protocol + '//' + window.location.host + body.attachment
body.attachment = newUrl
}
if (!instance.isSubmit) {
this.http.post('/api/services/app/StationValidityLicense/Create', body).subscribe((data:any) => {
this.http.post('/api/services/app/StationValidityLicense/Create', body).subscribe((data: any) => {
this.getStationList();
this.message.create('success', '修改成功!');
})
return false;
} else {
await new Promise(resolve => {
this.http.post('/api/services/app/StationValidityLicense/Create', body).subscribe((data:any) => {
this.submitReview(data.result).then(res=>{
this.http.post('/api/services/app/StationValidityLicense/Create', body).subscribe((data: any) => {
this.submitReview(data.result).then(res => {
resolve(data);
return true;
});
})
})
}
}
// return false;
} else {
this.message.create('warning', '请填写完整!');

Loading…
Cancel
Save