Browse Source

基本信息详情样式

非煤矿山灾害智能感知和预警系统
jingbowen 3 years ago
parent
commit
cdffb7dc5b
  1. 2
      src/app/home/basic-info/unit-details/unit-details.component.html
  2. 9
      src/app/home/basic-info/unit-details/unit-details.component.scss
  3. 18
      src/app/home/basic-info/unit-details/unit-details.component.ts
  4. 4
      src/app/home/home.module.ts

2
src/app/home/basic-info/unit-details/unit-details.component.html

@ -104,6 +104,7 @@
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</form> </form>
</div> </div>
<div class="content-right mainright" style="width: 50%;" id="setPosition"> <div class="content-right mainright" style="width: 50%;" id="setPosition">
@ -147,6 +148,7 @@
</div> </div>
</div> </div>
<div class="title">基本信息</div>
<div [ngClass]="{'form': disableds}"> <div [ngClass]="{'form': disableds}">
<div class="formbox" #box> <div class="formbox" #box>
<table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin: 0 auto; "> <table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin: 0 auto; ">

9
src/app/home/basic-info/unit-details/unit-details.component.scss

@ -57,7 +57,14 @@
.content { .content {
border: 1px solid; border: 1px solid;
.content-left{
display: flex;
justify-content: center;
align-items: center;
form{
width: 100%;
}
}
.mainright { .mainright {
color: #000; color: #000;
float: left; float: left;

18
src/app/home/basic-info/unit-details/unit-details.component.ts

@ -3,6 +3,9 @@ import { CustomReuseStrategy } from 'src/app/CustomReuseStrategy';
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { NzMessageService } from 'ng-zorro-antd/message'; import { NzMessageService } from 'ng-zorro-antd/message';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { NzUploadFile } from 'ng-zorro-antd/upload';
import { Observable, Observer } from 'rxjs';
import { NzUploadChangeParam } from 'ng-zorro-antd/upload';
import { TreeService } from 'src/app/service/tree.service'; import { TreeService } from 'src/app/service/tree.service';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { asBlob } from 'html-docx-js-typescript' import { asBlob } from 'html-docx-js-typescript'
@ -17,6 +20,8 @@ declare var AMap: any;
export class UnitDetailsComponent implements OnInit { export class UnitDetailsComponent implements OnInit {
@ViewChild('box') box: ElementRef; @ViewChild('box') box: ElementRef;
loading = false;
avatarUrl?: string;
constructor(private message: NzMessageService, private router: Router, private toTree: TreeService, private fb: FormBuilder, private http: HttpClient, private renderer: Renderer2, private el: ElementRef, public renderer2: Renderer2, private elementRef: ElementRef) { constructor(private message: NzMessageService, private router: Router, private toTree: TreeService, private fb: FormBuilder, private http: HttpClient, private renderer: Renderer2, private el: ElementRef, public renderer2: Renderer2, private elementRef: ElementRef) {
} }
@ -323,7 +328,18 @@ export class UnitDetailsComponent implements OnInit {
handleChange(info: NzUploadChangeParam): void { // 点击事件 - 附件上传回调
console.log('[点击事件] - 附件上传');
console.log(info);
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList);
}
if (info.file.status === 'done') {
this.message.success(`${info.file.name} file uploaded successfully`);
} else if (info.file.status === 'error') {
this.message.error(`${info.file.name} file upload failed.`);
}
}
listOfData: any[] = []; listOfData: any[] = [];
listOfData2: any[] = []; listOfData2: any[] = [];

4
src/app/home/home.module.ts

@ -56,6 +56,7 @@ import { UnitEditComponent } from './basic-info/unit-edit/unit-edit.component';
import { NzSpinModule } from 'ng-zorro-antd/spin'; import { NzSpinModule } from 'ng-zorro-antd/spin';
import { AllotPersonComponent } from './task/da-subordinate-audit/allot-person/allot-person.component'; import { AllotPersonComponent } from './task/da-subordinate-audit/allot-person/allot-person.component';
import { ChangePasswordComponent } from './change-password/change-password.component'; import { ChangePasswordComponent } from './change-password/change-password.component';
import { NzUploadModule } from 'ng-zorro-antd/upload';
@NgModule({ @NgModule({
declarations: [ declarations: [
NavComponent, NavComponent,
@ -117,7 +118,8 @@ import { ChangePasswordComponent } from './change-password/change-password.compo
NzGridModule, NzGridModule,
NzRadioModule, NzRadioModule,
NzDatePickerModule, NzDatePickerModule,
NzSpinModule NzSpinModule,
NzUploadModule
], ],
entryComponents: [AddroleComponent, EditroleComponent, AdduserComponent, EdituserComponent, AddorComponent, EditorComponent, ApplyComponent, ApplyLookComponent, LookTaskComponent, AllotPersonComponent] entryComponents: [AddroleComponent, EditroleComponent, AdduserComponent, EdituserComponent, AddorComponent, EditorComponent, ApplyComponent, ApplyLookComponent, LookTaskComponent, AllotPersonComponent]
}) })

Loading…
Cancel
Save