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', type: 'pie',
radius: ['65%', '75%'], radius: ['65%', '75%'],
top: '5%', // top: '2%',
// bottom: '-5%',
// right: '77%',
avoidLabelOverlap: false,//防止标签重叠策略 avoidLabelOverlap: false,//防止标签重叠策略
emphasis: {//中间高亮区域 emphasis: {//中间高亮区域
show: true, 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 let newUrl = window.location.protocol + '//' + window.location.host + body.imageUrl
body.imageUrl = newUrl body.imageUrl = newUrl
} }
if (body.hasAttachmentDefault && body.attachment) {
let newUrl = window.location.protocol + '//' + window.location.host + body.attachment
body.attachment = newUrl
}
if (!instance.isSubmit) { 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.getStationList();
this.message.create('success', '修改成功!'); this.message.create('success', '修改成功!');
}) })
return false; return false;
} else { } else {
await new Promise(resolve => { await new Promise(resolve => {
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.submitReview(data.result).then(res=>{ this.submitReview(data.result).then(res => {
resolve(data); resolve(data);
return true; return true;
}); });
}) })
}) })
} }
// return false; // return false;
} else { } else {
this.message.create('warning', '请填写完整!'); this.message.create('warning', '请填写完整!');

Loading…
Cancel
Save