Browse Source

123

beijing
陈鹏飞 3 years ago
parent
commit
2b394d8a58
  1. 36
      src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html
  2. 4
      src/app/pages/init3D.guard.ts
  3. 32
      src/app/pages/license/update-category/details-update-category/details-update-category.component.html
  4. 92
      src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html
  5. 59
      src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts
  6. 28
      src/app/pages/license/update-category/update-category.component.html
  7. 11
      src/app/pages/license/update-category/update-category.component.ts
  8. 1
      src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts
  9. 6
      src/theme.less

36
src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html

@ -71,30 +71,30 @@
<div class="cutoffrule"></div> <div class="cutoffrule"></div>
<p>所属机构: &nbsp;&nbsp;{{data.getData.organizationName}}</p> <p>所属机构: &nbsp;&nbsp;{{data.getData.organizationName}}</p>
<div class="cutoffrule"></div> <div class="cutoffrule"></div>
<p>角色: &nbsp;&nbsp; <span style="margin-right: 8px;" <p>角色: &nbsp;&nbsp; <span style="margin-right: 8px;" *ngFor="let item of role1">{{item}}</span></p>
*ngFor="let item of role1">{{item}}</span></p>
<div class="cutoffrule"></div> <div class="cutoffrule"></div>
<p>预警接收级别: &nbsp;&nbsp; <span style="margin-right: 8px;" <p>预警接收级别: &nbsp;&nbsp; <span style="margin-right: 8px;" *ngFor="let item of role2">{{item}}</span></p>
*ngFor="let item of role2">{{item}}</span></p>
<div class="cutoffrule"></div> <div class="cutoffrule"></div>
<p>手机号: &nbsp;&nbsp;{{data.getData.phoneNumber}}</p> <p>手机号: &nbsp;&nbsp;{{data.getData.phoneNumber}}</p>
</div> </div>
<div class="cutoffrule"></div> <div class="cutoffrule"></div>
<p [hidden]="data.getData.imageUrl === undefined">附件: &nbsp;&nbsp;</p> <p [hidden]="data.getData.imageUrl === undefined">附件: &nbsp;&nbsp;
<img *ngIf="data.getData.imageUrl && getFileType(data.getData.imageUrl) == 'img'" [src]="data.getData.imageUrl" <img *ngIf="data.getData.imageUrl && getFileType(data.getData.imageUrl) == 'img'"
(click)="viewImg(data.getData.imageUrl)"> [src]="data.getData.imageUrl" (click)="viewImg(data.getData.imageUrl)">
<img *ngIf="data.getData.imageUrl && getFileType(data.getData.imageUrl) == 'word'" <img *ngIf="data.getData.imageUrl && getFileType(data.getData.imageUrl) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(data.getData.imageUrl)"> src="../../../../assets/images/license/word.png" (click)="lookFile(data.getData.imageUrl)">
<img *ngIf="data.getData.imageUrl && getFileType(data.getData.imageUrl) == 'pdf'" <img *ngIf="data.getData.imageUrl && getFileType(data.getData.imageUrl) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.getData.imageUrl)"> src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.getData.imageUrl)">
</p>
<div class="cutoffrule" [hidden]="data.getData.imageUrl === undefined"></div> <div class="cutoffrule" [hidden]="data.getData.imageUrl === undefined"></div>
<p *ngIf="data.getData.hasAttachmentDefault && data.getData.attachment">附件副本: &nbsp;&nbsp;</p> <p *ngIf="data.getData.hasAttachmentDefault && data.getData.attachment">附件副本: &nbsp;&nbsp;
<img *ngIf="data.getData.attachment && getFileType(data.getData.attachment) == 'img'" <img *ngIf="data.getData.attachment && getFileType(data.getData.attachment) == 'img'"
[src]="data.getData.attachment" (click)="viewImg(data.getData.attachment)"> [src]="data.getData.attachment" (click)="viewImg(data.getData.attachment)">
<img *ngIf="data.getData.attachment && getFileType(data.getData.attachment) == 'word'" <img *ngIf="data.getData.attachment && getFileType(data.getData.attachment) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(data.getData.attachment)"> src="../../../../assets/images/license/word.png" (click)="lookFile(data.getData.attachment)">
<img *ngIf="data.getData.attachment && getFileType(data.getData.attachment) == 'pdf'" <img *ngIf="data.getData.attachment && getFileType(data.getData.attachment) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.getData.attachment)"> src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.getData.attachment)">
</p>
<div class="cutoffrule" *ngIf="data.getData.hasAttachmentDefault && data.getData.attachment"></div> <div class="cutoffrule" *ngIf="data.getData.hasAttachmentDefault && data.getData.attachment"></div>
<p>审批意见: </p> <p>审批意见: </p>
<textarea style="background: #173350;height: 100px;width: 100%;border-radius: 0;border: 0;color: white;" <textarea style="background: #173350;height: 100px;width: 100%;border-radius: 0;border: 0;color: white;"

4
src/app/pages/init3D.guard.ts

@ -26,7 +26,9 @@ export class init3DGuard implements CanActivate {
if (userdata.userName == 'superadmin' || res.hasBuildingInfo) { if (userdata.userName == 'superadmin' || res.hasBuildingInfo) {
return true return true
} else { } else {
// this.message.info("当前油站未开通!"); if(this.router.url != '/plan'){
this.message.info("当前油站未开通!");
}
return false return false
} }
}); });

32
src/app/pages/license/update-category/details-update-category/details-update-category.component.html

@ -27,17 +27,35 @@
<!-- <p>是否年检: &nbsp;&nbsp;<span *ngIf="data.isYearlyCheck">是</span><span *ngIf="!data.isYearlyCheck">否</span></p> <!-- <p>是否年检: &nbsp;&nbsp;<span *ngIf="data.isYearlyCheck">是</span><span *ngIf="!data.isYearlyCheck">否</span></p>
<div class="cutoffrule"></div> --> <div class="cutoffrule"></div> -->
<p>附件: &nbsp;&nbsp; <p>附件: &nbsp;&nbsp;
<img *ngIf="data.imageUrl && getFileType(data.imageUrl) == 'img'" [src]="data.imageUrl" (click)="viewImg(data.imageUrl)"> <img *ngIf="data.imageUrl && getFileType(data.imageUrl) == 'img'" [src]="data.imageUrl"
<img *ngIf="data.imageUrl && getFileType(data.imageUrl) == 'word'" src="../../../../assets/images/license/word.png" (click)="lookFile(data.imageUrl)"> (click)="viewImg(data.imageUrl)">
<img *ngIf="data.imageUrl && getFileType(data.imageUrl) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.imageUrl)"> <img *ngIf="data.imageUrl && getFileType(data.imageUrl) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(data.imageUrl)">
<img *ngIf="data.imageUrl && getFileType(data.imageUrl) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.imageUrl)">
</p> </p>
<div class="cutoffrule"></div> <div class="cutoffrule"></div>
<p *ngIf="data.hasAttachmentDefault && data.attachment">附件副本: &nbsp;&nbsp; <p *ngIf="data.hasAttachmentDefault && data.attachment">附件副本: &nbsp;&nbsp;
<img *ngIf="data.attachment && getFileType(data.attachment) == 'img'" [src]="data.attachment" (click)="viewImg(data.attachment)"> <img *ngIf="data.attachment && getFileType(data.attachment) == 'img'" [src]="data.attachment"
<img *ngIf="data.attachment && getFileType(data.attachment) == 'word'" src="../../../../assets/images/license/word.png" (click)="lookFile(data.attachment)"> (click)="viewImg(data.attachment)">
<img *ngIf="data.attachment && getFileType(data.attachment) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.attachment)"> <img *ngIf="data.attachment && getFileType(data.attachment) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(data.attachment)">
<img *ngIf="data.attachment && getFileType(data.attachment) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.attachment)">
</p> </p>
<div class="cutoffrule" *ngIf="data.hasAttachmentDefault && data.attachment"></div> <div class="cutoffrule" *ngIf="data.hasAttachmentDefault && data.attachment"></div>
<p *ngIf="data.yearlyCheckAttachment">年检更新附件: &nbsp;&nbsp;
<img *ngIf="data.yearlyCheckAttachment && getFileType(data.yearlyCheckAttachment) == 'img'"
[src]="data.yearlyCheckAttachment" (click)="viewImg(data.yearlyCheckAttachment)">
<img *ngIf="data.yearlyCheckAttachment && getFileType(data.yearlyCheckAttachment) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(data.yearlyCheckAttachment)">
<img *ngIf="data.yearlyCheckAttachment && getFileType(data.yearlyCheckAttachment) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.yearlyCheckAttachment)">
</p>
<div *ngIf="data.yearlyCheckAttachment" class="cutoffrule"></div>
<p *ngIf="data.yearlyCheckDescription">年检更新说明: &nbsp;&nbsp;{{data.yearlyCheckDescription || ''}}</p>
<div *ngIf="data.yearlyCheckDescription" class="cutoffrule"></div>
<p class="recordP" style="margin-bottom: 32px"> <p class="recordP" style="margin-bottom: 32px">
<span>审核记录</span> <span>审核记录</span>
<span> <span>
@ -52,7 +70,7 @@
<nz-timeline> <nz-timeline>
<nz-timeline-item *ngFor="let item of auditList"> <nz-timeline-item *ngFor="let item of auditList">
<span>{{item.creationTime | date:"yyyy/MM/dd"}}</span> <span>{{item.creationTime | date:"yyyy/MM/dd"}}</span>
<span style="margin: 0 10px;">{{item.organizationName}} {{item.auditStatus | auditStatus}}</span> <span style="margin: 0 10px;">{{item.organizationName}} {{item.auditStatus | auditStatus}}</span>
<span *ngIf="item.auditStatus == 3">驳回说明:{{item.remark}}</span> <span *ngIf="item.auditStatus == 3">驳回说明:{{item.remark}}</span>
</nz-timeline-item> </nz-timeline-item>
</nz-timeline> </nz-timeline>

92
src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html

@ -14,7 +14,8 @@
<nz-form-item> <nz-form-item>
<nz-form-control> <nz-form-control>
<nz-input-group> <nz-input-group>
<input nz-input type="text" formControlName="number" placeholder="请输入证照编号" [(ngModel)]="data2.licenseCode"/> <input nz-input type="text" formControlName="number" placeholder="请输入证照编号"
[(ngModel)]="data2.licenseCode" />
</nz-input-group> </nz-input-group>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
@ -22,52 +23,105 @@
<p>证照效期<span style="color: red;">*</span></p> <p>证照效期<span style="color: red;">*</span></p>
<div class="validity"> <div class="validity">
<label nz-checkbox (ngModelChange)="validityChange($event)" [(ngModel)]="data2.isLongTerm" formControlName="isLongTerm"> <label nz-checkbox (ngModelChange)="validityChange($event)" [(ngModel)]="data2.isLongTerm"
formControlName="isLongTerm">
<span>长期</span> <span>长期</span>
</label> </label>
<nz-date-picker *ngIf="data2.isLongTerm" nzPlaceHolder="请选择开始日期" [(ngModel)]="isLongTermTime" (ngModelChange)="onChange($event)" formControlName="isLongTermTime"></nz-date-picker> <nz-date-picker *ngIf="data2.isLongTerm" nzPlaceHolder="请选择开始日期" [(ngModel)]="isLongTermTime"
<nz-range-picker *ngIf="!data2.isLongTerm" [(ngModel)]="isNoLongTermTime" (ngModelChange)="onChange($event)" formControlName="isNoLongTermTime"></nz-range-picker> (ngModelChange)="onChange($event)" formControlName="isLongTermTime"></nz-date-picker>
<nz-range-picker *ngIf="!data2.isLongTerm" [(ngModel)]="isNoLongTermTime" (ngModelChange)="onChange($event)"
formControlName="isNoLongTermTime"></nz-range-picker>
</div> </div>
<p> <p>
<span style="margin-right: 12px;">有效期类型: {{data2.validityDays || 0}}天</span> <span style="margin-right: 12px;">有效期类型: {{data2.validityDays || 0}}天</span>
<!-- <span>是否年检: <span *ngIf="data2.isYearlyCheck">是</span><span *ngIf="!data2.isYearlyCheck">否</span></span> -->
</p> </p>
<p>办理类型: &nbsp;&nbsp;{{getHandleTypes(data2.handleTypesDefault)}}</p> <p>办理类型: &nbsp;&nbsp;{{getHandleTypes(data2.handleTypesDefault)}}</p>
<p>附件上传(图片格式、pdf格式、word格式)</p> <p>附件上传(图片格式、pdf格式、word格式)</p>
<div class="uploadDivbox"> <div class="uploadDivbox">
<div class="uploadDiv"> <div class="uploadDiv">
<img *ngIf="data2.imageUrl && getFileType(data2.imageUrl) == 'img'" style="width: 100%;height: 100%;cursor: pointer;" [src]="data2.imageUrl" (click)="viewImg(data2.imageUrl)"> <img *ngIf="data2.imageUrl && getFileType(data2.imageUrl) == 'img'"
<img *ngIf="data2.imageUrl && getFileType(data2.imageUrl) == 'word'" src="../../../../assets/images/license/word.png" (click)="lookFile(data2.imageUrl)"> style="width: 100%;height: 100%;cursor: pointer;" [src]="data2.imageUrl"
<img *ngIf="data2.imageUrl && getFileType(data2.imageUrl) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(data2.imageUrl)"> (click)="viewImg(data2.imageUrl)">
<img *ngIf="data2.imageUrl && getFileType(data2.imageUrl) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(data2.imageUrl)">
<img *ngIf="data2.imageUrl && getFileType(data2.imageUrl) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(data2.imageUrl)">
<input *ngIf="!data2.imageUrl" (change)="filechange($event,true)" class="fileinput" type="file" name="" id=""> <input *ngIf="!data2.imageUrl" (change)="filechange($event,0)" class="fileinput" type="file" name=""
<button *ngIf="!data2.imageUrl" nz-button [nzLoading]="isLoadingSave"><i nz-icon nzType="upload" nzTheme="outline"></i>上传附件</button> id="">
<button *ngIf="!data2.imageUrl" nz-button [nzLoading]="isLoadingSave"><i nz-icon nzType="upload"
nzTheme="outline"></i>上传附件</button>
</div> </div>
<div class="uploadDiv" *ngIf="data2.imageUrl" style="margin: 0 10px;"> <div class="uploadDiv" *ngIf="data2.imageUrl" style="margin: 0 10px;">
<input (change)="filechange($event,true)" class="fileinput" type="file" name="" id=""> <input (change)="filechange($event,0)" class="fileinput" type="file" name="" id="">
<button nz-button [nzLoading]="isLoadingSave"><i nz-icon nzType="upload" nzTheme="outline"></i>重新上传</button> <button nz-button [nzLoading]="isLoadingSave"><i nz-icon nzType="upload"
nzTheme="outline"></i>重新上传</button>
</div> </div>
<div class="uploadDiv" *ngIf="data2.hasAttachmentDefault" style="margin: 0 10px;"> <div class="uploadDiv" *ngIf="data2.hasAttachmentDefault" style="margin: 0 10px;">
<img *ngIf="data2.attachment && getFileType(data2.attachment) == 'img'" style="width: 100%;height: 100%;cursor: pointer;" [src]="data2.attachment" (click)="viewImg(data2.attachment)"> <img *ngIf="data2.attachment && getFileType(data2.attachment) == 'img'"
<img *ngIf="data2.attachment && getFileType(data2.attachment) == 'word'" src="../../../../assets/images/license/word.png" (click)="lookFile(data2.attachment)"> style="width: 100%;height: 100%;cursor: pointer;" [src]="data2.attachment"
<img *ngIf="data2.attachment && getFileType(data2.attachment) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(data2.attachment)"> (click)="viewImg(data2.attachment)">
<img *ngIf="data2.attachment && getFileType(data2.attachment) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(data2.attachment)">
<img *ngIf="data2.attachment && getFileType(data2.attachment) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(data2.attachment)">
<input *ngIf="!data2.attachment" (change)="filechange($event,false)" class="fileinput" type="file" name="" id=""> <input *ngIf="!data2.attachment" (change)="filechange($event,1)" class="fileinput" type="file" name=""
id="">
<button *ngIf="!data2.attachment" nz-button [nzLoading]="isLoadingSave">上传附件副本</button> <button *ngIf="!data2.attachment" nz-button [nzLoading]="isLoadingSave">上传附件副本</button>
</div> </div>
<div class="uploadDiv" *ngIf="data2.attachment && data2.hasAttachmentDefault"> <div class="uploadDiv" *ngIf="data2.attachment && data2.hasAttachmentDefault">
<input (change)="filechange($event,false)" class="fileinput" type="file" name="" id=""> <input (change)="filechange($event,1)" class="fileinput" type="file" name="" id="">
<button nz-button [nzLoading]="isLoadingSave">重新上传副本</button> <button nz-button [nzLoading]="isLoadingSave">重新上传副本</button>
</div> </div>
</div> </div>
<div *ngIf="data2.isYearlyCheck">
<p>
<nz-radio-group [(ngModel)]="data2.lastLicenseAuditType" (ngModelChange)="radioChange($event)"
formControlName="radioTypeForm">
<label nz-radio [nzValue]="0">基本信息</label>
<label nz-radio [nzValue]="1">年检更新</label>
</nz-radio-group>
</p>
<p *ngIf="data2.lastLicenseAuditType == 1">年检更新附件上传</p>
<div *ngIf="data2.lastLicenseAuditType == 1" class="uploadDivbox">
<div class="uploadDiv">
<img *ngIf="data2.yearlyCheckAttachment && getFileType(data2.yearlyCheckAttachment) == 'img'"
style="width: 100%;height: 100%;cursor: pointer;" [src]="data2.yearlyCheckAttachment"
(click)="viewImg(data2.yearlyCheckAttachment)">
<img *ngIf="data2.yearlyCheckAttachment && getFileType(data2.yearlyCheckAttachment) == 'word'"
src="../../../../assets/images/license/word.png"
(click)="lookFile(data2.yearlyCheckAttachment)">
<img *ngIf="data2.yearlyCheckAttachment && getFileType(data2.yearlyCheckAttachment) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(data2.yearlyCheckAttachment)">
<input *ngIf="!data2.yearlyCheckAttachment" (change)="filechange($event,2)" class="fileinput"
type="file" name="" id="">
<button *ngIf="!data2.yearlyCheckAttachment" nz-button [nzLoading]="isLoadingSave"><i nz-icon
nzType="upload" nzTheme="outline"></i>上传附件</button>
</div>
<div class="uploadDiv" *ngIf="data2.yearlyCheckAttachment" style="margin: 0 10px;">
<input (change)="filechange($event,2)" class="fileinput" type="file" name="" id="">
<button nz-button [nzLoading]="isLoadingSave"><i nz-icon nzType="upload"
nzTheme="outline"></i>重新上传</button>
</div>
</div>
<p *ngIf="data2.lastLicenseAuditType == 1">年检更新说明</p>
<div *ngIf="data2.lastLicenseAuditType == 1">
<textarea [(ngModel)]="data2.yearlyCheckDescription" formControlName="explain" nz-input
rows="2"></textarea>
</div>
</div>
<div class="btnbox"> <div class="btnbox">
<button nz-button type="submit" class="ok" (click)="submitReview()" [nzLoading]="isLoadingSave">提交审核</button> <button nz-button type="submit" class="ok" (click)="submitReview()"
[nzLoading]="isLoadingSave">提交审核</button>
<button nz-button type="submit" class="ok" (click)="ok()" [nzLoading]="isLoadingSave">保存</button> <button nz-button type="submit" class="ok" (click)="ok()" [nzLoading]="isLoadingSave">保存</button>
<button nz-button type="button" class="cancel" (click)="destroyModal()">取消</button> <button nz-button type="button" class="cancel" (click)="destroyModal()">取消</button>
</div> </div>

59
src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts

@ -16,7 +16,7 @@ export class EditUpdateCategoryComponent implements OnInit {
@Input() data?: any; @Input() data?: any;
validateForm!: FormGroup; validateForm!: FormGroup;
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private objectsSrv: ObjectsSimpleService,private message: NzMessageService,) { } constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private objectsSrv: ObjectsSimpleService, private message: NzMessageService,) { }
handleTypeList: handleTypeList[] = new handleType().list; handleTypeList: handleTypeList[] = new handleType().list;
data2: any; //深拷贝data data2: any; //深拷贝data
@ -27,8 +27,10 @@ export class EditUpdateCategoryComponent implements OnInit {
this.validateForm = this.fb.group({ this.validateForm = this.fb.group({
number: [null, [Validators.required]], number: [null, [Validators.required]],
isLongTerm: [null, [Validators.required]], isLongTerm: [null, [Validators.required]],
isLongTermTime: [null,], isLongTermTime: [null],
isNoLongTermTime: [null,], isNoLongTermTime: [null],
radioTypeForm: [null],
explain: [null]
}); });
// 日期 // 日期
this.data2 = JSON.parse(JSON.stringify(this.data)) this.data2 = JSON.parse(JSON.stringify(this.data))
@ -41,15 +43,22 @@ export class EditUpdateCategoryComponent implements OnInit {
this.isNoLongTermTime = [] this.isNoLongTermTime = []
this.isNoLongTermTime.push(new Date(this.data2.validityStartTime)) this.isNoLongTermTime.push(new Date(this.data2.validityStartTime))
this.isNoLongTermTime.push(new Date(this.data2.validityEndTime)) this.isNoLongTermTime.push(new Date(this.data2.validityEndTime))
if (this.isNoLongTermTime.length && this.isNoLongTermTime.find(item=>{ return item.getFullYear() < 1000 })) { if (this.isNoLongTermTime.length && this.isNoLongTermTime.find(item => { return item.getFullYear() < 1000 })) {
this.isNoLongTermTime[0] = new Date() this.isNoLongTermTime[0] = new Date()
this.isNoLongTermTime[1] = new Date() this.isNoLongTermTime[1] = new Date()
} }
} }
console.log(this.data2) console.log(this.data2)
console.log(typeof(this.data2.lastLicenseAuditType))
} }
radioChange($event) {
this.data2.LastLicenseAuditType = $event
}
imageUrl = '/api/Objects/sinochemweb/stationPhotos/175/timg.jpg' imageUrl = '/api/Objects/sinochemweb/stationPhotos/175/timg.jpg'
destroyModal() { destroyModal() {
@ -63,7 +72,7 @@ export class EditUpdateCategoryComponent implements OnInit {
} }
//提交审核 //提交审核
submitReview(){ submitReview() {
this.isSubmit = true; this.isSubmit = true;
this.modal.triggerOk(); this.modal.triggerOk();
} }
@ -79,7 +88,7 @@ export class EditUpdateCategoryComponent implements OnInit {
if (time <= 0) { if (time <= 0) {
this.data2.validityDays = 0 this.data2.validityDays = 0
} else { } else {
this.data2.validityDays = Math.floor(time / (1000*3600*24)); this.data2.validityDays = Math.floor(time / (1000 * 3600 * 24));
} }
} }
} }
@ -96,7 +105,7 @@ export class EditUpdateCategoryComponent implements OnInit {
if (time <= 0) { if (time <= 0) {
this.data2.validityDays = 0 this.data2.validityDays = 0
} else { } else {
this.data2.validityDays = Math.floor(time / (1000*3600*24)); this.data2.validityDays = Math.floor(time / (1000 * 3600 * 24));
} }
} else { } else {
this.data2.validityDays = 999 this.data2.validityDays = 999
@ -104,29 +113,29 @@ export class EditUpdateCategoryComponent implements OnInit {
} }
//获取办理类型 //获取办理类型
getHandleTypes(handleTypes: any[]):string { getHandleTypes(handleTypes: any[]): string {
if (!handleTypes || !handleTypes.length) { if (!handleTypes || !handleTypes.length) {
return return
} }
let names: string[] = [] let names: string[] = []
let handleTypeList = JSON.parse(JSON.stringify(handleTypes)); let handleTypeList = JSON.parse(JSON.stringify(handleTypes));
let list: handleTypeList[] = new handleType().list; let list: handleTypeList[] = new handleType().list;
handleTypeList.forEach(item=>{ handleTypeList.forEach(item => {
list.find(element=>{ list.find(element => {
item == element.value? names.push(element.name) : null item == element.value ? names.push(element.name) : null
}) })
}) })
return names.join(',') return names.join(',')
} }
//获取文件格式 //获取文件格式
getFileType(name: string):string { getFileType(name: string): string {
let suffix let suffix
if (name.substring(name.length-4).includes('png') || name.substring(name.length-4).includes('jpg') || name.substring(name.length-4).includes('jpeg') || name.substring(name.length-4).includes('webp')) { if (name.substring(name.length - 4).includes('png') || name.substring(name.length - 4).includes('jpg') || name.substring(name.length - 4).includes('jpeg') || name.substring(name.length - 4).includes('webp')) {
suffix = 'img' suffix = 'img'
} else if (name.substring(name.length-4).includes('doc') || name.substring(name.length-4).includes('docx')) { } else if (name.substring(name.length - 4).includes('doc') || name.substring(name.length - 4).includes('docx')) {
suffix = 'word' suffix = 'word'
} else if (name.substring(name.length-4).includes('pdf')) { } else if (name.substring(name.length - 4).includes('pdf')) {
suffix = 'pdf' suffix = 'pdf'
} }
return suffix return suffix
@ -141,7 +150,7 @@ export class EditUpdateCategoryComponent implements OnInit {
let arr = item.split('.') let arr = item.split('.')
arr[arr.length - 1] = 'pdf' arr[arr.length - 1] = 'pdf'
window.open(arr.join('.')) window.open(arr.join('.'))
} else if (this.getFileType(item) == 'pdf') { } else if (this.getFileType(item) == 'pdf') {
window.open(item) window.open(item)
} else { } else {
this.message.create('warning', '暂不支持查看!'); this.message.create('warning', '暂不支持查看!');
@ -149,10 +158,10 @@ export class EditUpdateCategoryComponent implements OnInit {
} }
uploadType: boolean; //是否是上传副本 uploadType: number; //是否是上传副本
isLoadingSave: boolean = false isLoadingSave: boolean = false
uploadIndex: string uploadIndex: string
filechange(e, type: boolean) { filechange(e, type: number) {
this.uploadType = type this.uploadType = type
this.isLoadingSave = true this.isLoadingSave = true
let oilStationId = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id let oilStationId = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id
@ -180,10 +189,12 @@ export class EditUpdateCategoryComponent implements OnInit {
this.objectsSrv.postFile(this.postFilePath, file).subscribe(data => { this.objectsSrv.postFile(this.postFilePath, file).subscribe(data => {
let dataObj = data as any; let dataObj = data as any;
let filePath: string = ObjectsSimpleService.baseUrl + dataObj.objectName; let filePath: string = ObjectsSimpleService.baseUrl + dataObj.objectName;
if (this.uploadType){ if (this.uploadType === 0) {
this.data2.imageUrl = filePath this.data2.imageUrl = filePath
} else { } else if (this.uploadType === 1) {
this.data2.attachment = filePath this.data2.attachment = filePath
} else if (this.uploadType === 2) {
this.data2.yearlyCheckAttachment = filePath
} }
this.isLoadingSave = false this.isLoadingSave = false
resolve('success') resolve('success')
@ -199,10 +210,12 @@ export class EditUpdateCategoryComponent implements OnInit {
this.objectsSrv.postFile_MultipartUpload(this.postFilePath, file).then((value) => { this.objectsSrv.postFile_MultipartUpload(this.postFilePath, file).then((value) => {
let dataObj = value as any; let dataObj = value as any;
let filePath = dataObj.filePath let filePath = dataObj.filePath
if (this.uploadType){ if (this.uploadType === 0) {
this.data2.imageUrl = filePath this.data2.imageUrl = filePath
} else { } else if (this.uploadType === 1) {
this.data2.attachment = filePath this.data2.attachment = filePath
} else if (this.uploadType === 2) {
this.data2.yearlyCheckAttachment = filePath
} }
this.isLoadingSave = false this.isLoadingSave = false
}); });
@ -233,7 +246,7 @@ export class EditUpdateCategoryComponent implements OnInit {
//办理类型 //办理类型
export class handleType { export class handleType {
list: handleTypeList[] =[ list: handleTypeList[] = [
{ value: 0, name: "无" }, { value: 0, name: "无" },
{ value: 1, name: "年度公示" }, { value: 1, name: "年度公示" },
{ value: 2, name: "年检" }, { value: 2, name: "年检" },

28
src/app/pages/license/update-category/update-category.component.html

@ -48,13 +48,29 @@
<span *ngIf="item.licenseViolationType == 3">逾期报警</span> <span *ngIf="item.licenseViolationType == 3">逾期报警</span>
</td> </td>
<td> <td>
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'img'" [src]="item.imageUrl" (click)="viewImg(item.imageUrl)"> <img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'img'" [src]="item.imageUrl"
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'word'" src="../../../../assets/images/license/word.png" (click)="lookFile(item.imageUrl)"> (click)="viewImg(item.imageUrl)">
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(item.imageUrl)"> <img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(item.imageUrl)">
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(item.imageUrl)">
<label *ngIf="item.attachment && item.hasAttachmentDefault" style="margin-left: 10px;"> <label *ngIf="item.attachment && item.hasAttachmentDefault" style="margin-left: 10px;">
<img *ngIf="item.attachment && getFileType(item.attachment) == 'img'" [src]="item.attachment" (click)="viewImg(item.attachment)"> <img *ngIf="item.attachment && getFileType(item.attachment) == 'img'"
<img *ngIf="item.attachment && getFileType(item.attachment) == 'word'" src="../../../../assets/images/license/word.png" (click)="lookFile(item.attachment)"> [src]="item.attachment" (click)="viewImg(item.attachment)">
<img *ngIf="item.attachment && getFileType(item.attachment) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(item.attachment)"> <img *ngIf="item.attachment && getFileType(item.attachment) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(item.attachment)">
<img *ngIf="item.attachment && getFileType(item.attachment) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(item.attachment)">
</label>
<label *ngIf="item.yearlyCheckAttachment" style="margin-left: 10px;">
<img *ngIf="item.yearlyCheckAttachment && getFileType(item.yearlyCheckAttachment) == 'img'"
[src]="item.yearlyCheckAttachment" (click)="viewImg(item.yearlyCheckAttachment)">
<img *ngIf="item.yearlyCheckAttachment && getFileType(item.yearlyCheckAttachment) == 'word'"
src="../../../../assets/images/license/word.png"
(click)="lookFile(item.yearlyCheckAttachment)">
<img *ngIf="item.yearlyCheckAttachment && getFileType(item.yearlyCheckAttachment) == 'pdf'"
src="../../../../assets/images/license/pdf.png"
(click)="lookFile(item.yearlyCheckAttachment)">
</label> </label>
</td> </td>
<td class="operation"> <td class="operation">

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

@ -162,6 +162,12 @@ export class UpdateCategoryComponent implements OnInit {
let newUrl = window.location.protocol + '//' + window.location.host + body.attachment let newUrl = window.location.protocol + '//' + window.location.host + body.attachment
body.attachment = newUrl body.attachment = newUrl
} }
if (body.lastLicenseAuditType == 0) {
body.yearlyCheckAttachment = null
body.yearlyCheckDescription = null
}
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();
@ -221,7 +227,10 @@ export class UpdateCategoryComponent implements OnInit {
return return
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let params = { id: item.id } let params: any = {
id: item.id,
type: item.lastLicenseAuditType
}
this.http.post('/api/services/app/StationValidityLicense/Commit', {}, { params }).subscribe(data => { this.http.post('/api/services/app/StationValidityLicense/Commit', {}, { params }).subscribe(data => {
this.message.create('success', '提交审核成功!'); this.message.create('success', '提交审核成功!');
this.getStationList(); this.getStationList();

1
src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts

@ -2,7 +2,6 @@ import { HttpClient } from '@angular/common/http';
import { Component, OnInit, Input } from '@angular/core'; import { Component, OnInit, Input } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { DomSanitizer } from '@angular/platform-browser'; import { DomSanitizer } from '@angular/platform-browser';
// import { Console } from 'console';
import { NzMessageService } from 'ng-zorro-antd/message'; import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@Component({ @Component({

6
src/theme.less

@ -288,7 +288,6 @@
#detailsfilecategory { #detailsfilecategory {
nz-form-item { nz-form-item {
margin-bottom: 0; margin-bottom: 0;
input, input,
select { select {
color: rgba(145, 204, 255, 0.95) !important; color: rgba(145, 204, 255, 0.95) !important;
@ -297,11 +296,12 @@
nz-date-picker, nz-date-picker,
nz-range-picker, nz-range-picker,
nz-select { nz-select,
textarea {
background-color: #143c61; background-color: #143c61;
} }
nz-select { nz-select,textarea {
color: rgba(145, 204, 255, 0.95) !important; color: rgba(145, 204, 255, 0.95) !important;
} }

Loading…
Cancel
Save