12 changed files with 487 additions and 315 deletions
@ -0,0 +1,29 @@
|
||||
<h2 mat-dialog-title>六熟悉</h2> |
||||
<div class="box"> |
||||
<div class="contentItem"> |
||||
<div class="content"> |
||||
<div class="textbox"> |
||||
<span class="name">熟悉对象:</span> |
||||
<span>{{data.unitdata.unitname}}</span> |
||||
</div> |
||||
<div> |
||||
<span class="name">人员数量:</span> |
||||
<input [disabled]="!isEditMode" name="memberCount" [(ngModel)]="memberCount" nz-input |
||||
placeholder="人员数量" /> |
||||
</div> |
||||
<div> |
||||
<span class="name">熟悉时间:</span> |
||||
<nz-range-picker [disabled]="!isEditMode" [nzShowTime]="{ nzFormat: 'HH:mm' }" |
||||
nzFormat="yyyy-MM-dd HH:mm" [nzPlaceHolder]="['开始时间', '结束时间']" name="time" |
||||
[(ngModel)]="time"></nz-range-picker> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="mask" *ngIf="isLoading"> |
||||
<mat-spinner [diameter]="30"></mat-spinner> |
||||
</div> |
||||
</div> |
||||
<mat-dialog-actions align="end"> |
||||
<button mat-button mat-dialog-close [disabled]="isLoading || isLoadingSave">取消</button> |
||||
<button mat-button cdkFocusInitial (click)="save()" [disabled]="isLoading || isLoadingSave">确定</button> |
||||
</mat-dialog-actions> |
@ -0,0 +1,118 @@
|
||||
.box { |
||||
width: 100%; |
||||
position: relative; |
||||
|
||||
.contentItem { |
||||
display: flex; |
||||
margin: 6px 0; |
||||
// border-bottom: 1px dashed rgb(180, 178, 178); |
||||
|
||||
.title { |
||||
width: 75px; |
||||
color: #1890ff; |
||||
display: flex; |
||||
align-items: center; |
||||
} |
||||
|
||||
.content { |
||||
flex: 1; |
||||
display: flex; |
||||
flex-wrap: wrap; |
||||
flex-direction: column; |
||||
|
||||
div { |
||||
display: flex; |
||||
align-items: center; |
||||
|
||||
input, |
||||
nz-range-picker { |
||||
flex: 1; |
||||
} |
||||
} |
||||
|
||||
div { |
||||
margin-bottom: 8px; |
||||
|
||||
.name { |
||||
display: inline-block; |
||||
width: 70px; |
||||
margin-right: 3px; |
||||
text-align: right; |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
.textbox { |
||||
height: 32px; |
||||
line-height: 32px; |
||||
width: 50%; |
||||
white-space: nowrap; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
|
||||
} |
||||
|
||||
.uploadbox { |
||||
position: relative; |
||||
display: flex; |
||||
align-items: center; |
||||
|
||||
input { |
||||
width: 88px; |
||||
height: 32px; |
||||
position: absolute; |
||||
left: 0; |
||||
top: 0; |
||||
opacity: 0; |
||||
z-index: 2; |
||||
cursor: pointer; |
||||
} |
||||
|
||||
button { |
||||
z-index: 1; |
||||
cursor: pointer; |
||||
} |
||||
|
||||
.imgbox { |
||||
height: 100%; |
||||
display: flex; |
||||
align-items: center; |
||||
|
||||
li { |
||||
display: flex; |
||||
align-items: center; |
||||
position: relative; |
||||
} |
||||
|
||||
img { |
||||
width: 50px; |
||||
height: 50px; |
||||
margin: 0 5px; |
||||
cursor: pointer; |
||||
} |
||||
|
||||
.close { |
||||
position: absolute; |
||||
right: 0; |
||||
top: 0; |
||||
font-size: 15px; |
||||
cursor: pointer; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
.mask { |
||||
position: absolute; |
||||
width: 100%; |
||||
height: 100%; |
||||
left: 0; |
||||
top: 0; |
||||
background: rgba(0, 0, 0, 0.2); |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
z-index: 3; |
||||
} |
||||
} |
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||
|
||||
import { SixFamiliarizeComponent } from './six-familiarize.component'; |
||||
|
||||
describe('SixFamiliarizeComponent', () => { |
||||
let component: SixFamiliarizeComponent; |
||||
let fixture: ComponentFixture<SixFamiliarizeComponent>; |
||||
|
||||
beforeEach(async(() => { |
||||
TestBed.configureTestingModule({ |
||||
declarations: [ SixFamiliarizeComponent ] |
||||
}) |
||||
.compileComponents(); |
||||
})); |
||||
|
||||
beforeEach(() => { |
||||
fixture = TestBed.createComponent(SixFamiliarizeComponent); |
||||
component = fixture.componentInstance; |
||||
fixture.detectChanges(); |
||||
}); |
||||
|
||||
it('should create', () => { |
||||
expect(component).toBeTruthy(); |
||||
}); |
||||
}); |
@ -0,0 +1,106 @@
|
||||
import { HttpClient } from "@angular/common/http"; |
||||
import { Component, OnInit, Inject } from "@angular/core"; |
||||
import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog"; |
||||
import { ObjectsService } from "@src/app/services/objects.service"; |
||||
import { DatePipe } from "@angular/common"; |
||||
import { MatSnackBar } from "@angular/material/snack-bar"; |
||||
import Viewer from "viewerjs"; |
||||
|
||||
@Component({ |
||||
selector: "app-six-familiarize", |
||||
templateUrl: "./six-familiarize.component.html", |
||||
styleUrls: ["./six-familiarize.component.scss"], |
||||
providers: [DatePipe], |
||||
}) |
||||
export class SixFamiliarizeComponent implements OnInit { |
||||
constructor( |
||||
public dialogRef: MatDialogRef<SixFamiliarizeComponent>, |
||||
@Inject(MAT_DIALOG_DATA) public data: any, |
||||
private objectsSer: ObjectsService, |
||||
private http: HttpClient, |
||||
private datePipe: DatePipe, |
||||
public snackBar: MatSnackBar |
||||
) {} |
||||
|
||||
isEditMode = true; |
||||
|
||||
ngOnInit(): void { |
||||
console.log(this.data); |
||||
this.isEditMode = this.data.isEditMode; |
||||
this.getData(); |
||||
} |
||||
|
||||
isHttpPost; |
||||
getData() { |
||||
this.http |
||||
.get("/api/SixFamiliars", { |
||||
params: { |
||||
PlanComponentId: this.data.planData.id, |
||||
}, |
||||
}) |
||||
.subscribe((data: any) => { |
||||
console.log("六熟悉记录数据", data); |
||||
if (data.totalCount === 0) { |
||||
this.isHttpPost = true; |
||||
} else { |
||||
this.isHttpPost = false; |
||||
let item = data.items[0]; |
||||
this.familiarizeId = item.id; |
||||
this.memberCount = item.memberCount; |
||||
this.time = [item.startTime, item.endTime]; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
isLoading = false; |
||||
|
||||
memberCount; |
||||
time; |
||||
familiarizeId; |
||||
isLoadingSave = false; |
||||
save() { |
||||
if (!this.isEditMode) { |
||||
this.dialogRef.close(); |
||||
return; |
||||
} |
||||
|
||||
if (!this.memberCount || !this.time) { |
||||
this.snackBar.open("请输入人员数量和熟悉时间", "确定", { |
||||
verticalPosition: "top", |
||||
duration: 3000, |
||||
}); |
||||
return; |
||||
} |
||||
this.isLoadingSave = true; |
||||
let body: any = { |
||||
planComponentId: this.data.planData.id, |
||||
memberCount: this.memberCount, |
||||
startTime: this.datePipe.transform(this.time[0], "yyyy-MM-ddTHH:mm:ss"), |
||||
endTime: this.datePipe.transform(this.time[1], "yyyy-MM-ddTHH:mm:ss"), |
||||
}; |
||||
if (this.isHttpPost) { |
||||
this.http.post("/api/SixFamiliars", body).subscribe((data: any) => { |
||||
this.familiarizeId = data.id; |
||||
this.isHttpPost = false; |
||||
this.isLoadingSave = false; |
||||
this.snackBar.open("保存成功", "确定", { |
||||
verticalPosition: "top", |
||||
duration: 3000, |
||||
}); |
||||
this.dialogRef.close(); |
||||
}); |
||||
} else { |
||||
body.id = this.familiarizeId; |
||||
this.http |
||||
.put(`/api/SixFamiliars/${this.familiarizeId}`, body) |
||||
.subscribe((data: any) => { |
||||
this.isLoadingSave = false; |
||||
this.snackBar.open("保存成功", "确定", { |
||||
verticalPosition: "top", |
||||
duration: 3000, |
||||
}); |
||||
this.dialogRef.close(); |
||||
}); |
||||
} |
||||
} |
||||
} |
@ -1,63 +1,66 @@
|
||||
<!-- <p>六熟悉</p> --> |
||||
<!-- <p>熟悉记录</p> --> |
||||
<div class="box"> |
||||
<div class="header"> |
||||
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm"> |
||||
<div class="queryBox"> |
||||
|
||||
<div class="queryField"> |
||||
<label style="margin-right: 10px;">熟悉对象:</label> |
||||
<mat-form-field class="example-full-width"> |
||||
<input matInput placeholder="请输入熟悉对象" name="companyName" [(ngModel)]="name" autocomplete="off"> |
||||
</mat-form-field> |
||||
</div> |
||||
<div class="queryField"> |
||||
<label style="margin-right: 10px;">熟悉时间:</label> |
||||
<mat-form-field class="example-full-width"> |
||||
<input matInput placeholder="请选择熟悉时间" name="companyName" [(ngModel)]="time" autocomplete="off"> |
||||
</mat-form-field> |
||||
</div> |
||||
<div class="queryField"> |
||||
<button mat-raised-button color="primary">查询</button> |
||||
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button> |
||||
</div> |
||||
<form class="queryBox" (ngSubmit)="onSubmit()"> |
||||
<div class="queryField"> |
||||
<span style="width: 108px;">预案名称:</span> |
||||
<input name="name" nz-input placeholder="请输入预案名称" [(ngModel)]="name" /> |
||||
</div> |
||||
<div class="queryField"> |
||||
<span style="width: 108px;">单位名称:</span> |
||||
<input name="name" nz-input placeholder="请输入单位名称" [(ngModel)]="companyname" /> |
||||
</div> |
||||
<div class="queryField" style="margin-right: 35px;"> |
||||
<span>组织机构:</span> |
||||
<nz-tree-select [nzDropdownClassName]="'maxHeightTreeSelect'" style="width: 250px" |
||||
[nzExpandedKeys]="expandKeys" [nzNodes]="nodes" nzShowSearch nzPlaceHolder="请选择组织机构" name="orId" |
||||
[(ngModel)]="orId"> |
||||
</nz-tree-select> |
||||
</div> |
||||
<div class="queryField"> |
||||
<span>熟悉时间:</span> |
||||
<nz-range-picker name="time" [(ngModel)]="time"></nz-range-picker> |
||||
</div> |
||||
<div class="queryField btnbox"> |
||||
<button nz-button nzType="primary">查询</button> |
||||
<button nz-button type="button" nzType="default" (click)="reset()">重置</button> |
||||
</div> |
||||
|
||||
</form> |
||||
</div> |
||||
<div class="body"> |
||||
<div class="tablebox"> |
||||
|
||||
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8"> |
||||
<ng-container matColumnDef="name"> |
||||
<th mat-header-cell *matHeaderCellDef style="width: 10%;">熟悉对象</th> |
||||
<td mat-cell *matCellDef="let element">{{element.name}}</td> |
||||
</ng-container> |
||||
<ng-container matColumnDef="time"> |
||||
<th mat-header-cell *matHeaderCellDef>熟悉时间</th> |
||||
<td mat-cell *matCellDef="let element">{{element.time}}</td> |
||||
</ng-container> |
||||
<ng-container matColumnDef="leader"> |
||||
<th mat-header-cell *matHeaderCellDef>带队领导</th> |
||||
<td mat-cell *matCellDef="let element">{{element.leader}}</td> |
||||
</ng-container> |
||||
<ng-container matColumnDef="upload"> |
||||
<th mat-header-cell *matHeaderCellDef>上传人员</th> |
||||
<td mat-cell *matCellDef="let element">{{element.upload}}</td> |
||||
</ng-container> |
||||
<ng-container matColumnDef="operate"> |
||||
<th mat-header-cell *matHeaderCellDef>操作</th> |
||||
<td mat-cell *matCellDef="let element" class="operate"> |
||||
<span>查看</span> |
||||
<span>详情</span> |
||||
</td> |
||||
</ng-container> |
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> |
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> |
||||
</table> |
||||
<mat-paginator [length]="length" [pageSize]="pageSize" [pageSizeOptions]="pageSizeOptions" |
||||
(page)="chagePage($event)"> |
||||
</mat-paginator> |
||||
|
||||
</div> |
||||
<div class="tablebox"> |
||||
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8"> |
||||
<ng-container matColumnDef="planname"> |
||||
<th mat-header-cell *matHeaderCellDef>预案名称</th> |
||||
<td mat-cell *matCellDef="let element">{{element.planComponent.name}}</td> |
||||
</ng-container> |
||||
<ng-container matColumnDef="name"> |
||||
<th mat-header-cell *matHeaderCellDef>熟悉对象</th> |
||||
<td mat-cell *matCellDef="let element"></td> |
||||
</ng-container> |
||||
<ng-container matColumnDef="or"> |
||||
<th mat-header-cell *matHeaderCellDef>组织机构</th> |
||||
<td mat-cell *matCellDef="let element"></td> |
||||
</ng-container> |
||||
<ng-container matColumnDef="people"> |
||||
<th mat-header-cell *matHeaderCellDef>人员数量</th> |
||||
<td mat-cell *matCellDef="let element">{{element.memberCount}}</td> |
||||
</ng-container> |
||||
<ng-container matColumnDef="time"> |
||||
<th mat-header-cell *matHeaderCellDef>熟悉时间</th> |
||||
<td mat-cell *matCellDef="let element">{{element.startTime | date:'yyyy-MM-dd HH:mm'}} - |
||||
{{element.endTime | date:'yyyy-MM-dd HH:mm'}}</td> |
||||
</ng-container> |
||||
<ng-container matColumnDef="operate"> |
||||
<th mat-header-cell *matHeaderCellDef style="width: 200px;">操作</th> |
||||
<td mat-cell *matCellDef="let element" class="operate"> |
||||
<span (click)="look(element)">查看</span> |
||||
<!-- <span (click)="delete(element)">删除</span> --> |
||||
</td> |
||||
</ng-container> |
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> |
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> |
||||
</table> |
||||
<mat-paginator [length]="length" [pageSize]="pageSize" (page)="chagePage($event)"> |
||||
</mat-paginator> |
||||
</div> |
||||
</div> |
@ -1,166 +1,154 @@
|
||||
import { Component, OnInit, ViewChild, Inject } from "@angular/core"; |
||||
import { HttpClient } from "@angular/common/http"; |
||||
import { |
||||
MatTreeFlatDataSource, |
||||
MatTreeFlattener, |
||||
} from "@angular/material/tree"; |
||||
import { MatPaginator } from "@angular/material/paginator"; |
||||
import { FlatTreeControl } from "@angular/cdk/tree"; |
||||
import { FormControl } from "@angular/forms"; |
||||
import { Router, ActivatedRoute } from "@angular/router"; |
||||
import { PageEvent } from "@angular/material/paginator"; |
||||
import { MatDialog } from "@angular/material/dialog"; |
||||
import { MatSnackBar } from "@angular/material/snack-bar"; |
||||
import { TreeService } from "../../http-interceptors/tree.service"; |
||||
import { DatePipe } from "@angular/common"; |
||||
import { SixFamiliarizeComponent } from "../entry-plan-look/six-familiarize/six-familiarize.component"; |
||||
|
||||
@Component({ |
||||
selector: "app-six-familiarity", |
||||
templateUrl: "./six-familiarity.component.html", |
||||
styleUrls: ["./six-familiarity.component.scss"], |
||||
providers: [DatePipe], |
||||
}) |
||||
export class SixFamiliarityComponent implements OnInit { |
||||
constructor( |
||||
private http: HttpClient, |
||||
private router: Router, |
||||
private route: ActivatedRoute, |
||||
private tree: TreeService, |
||||
public dialog: MatDialog, |
||||
public snackBar: MatSnackBar |
||||
public snackBar: MatSnackBar, |
||||
private datePipe: DatePipe |
||||
) {} |
||||
|
||||
private _transformer = (node, level: number) => { |
||||
//初始化tree
|
||||
return { |
||||
expandable: !!node.children && node.children.length > 0, |
||||
name: node.name, |
||||
level: level, |
||||
id: node.id, |
||||
parentId: node.parentId, |
||||
children: node.children, |
||||
}; |
||||
}; |
||||
treeControl = new FlatTreeControl<any>( |
||||
(node) => node.level, |
||||
(node) => node.expandable |
||||
); |
||||
treeFlattener = new MatTreeFlattener( |
||||
this._transformer, |
||||
(node) => node.level, |
||||
(node) => node.expandable, |
||||
(node) => node.children |
||||
); |
||||
dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener); |
||||
myControl = new FormControl(); |
||||
hasChild = (_: number, node: any) => node.expandable; |
||||
//分页
|
||||
@ViewChild(MatPaginator, { static: true }) |
||||
pageEvent: PageEvent; |
||||
paginator: MatPaginator; |
||||
length: any = 13; //共多少条数据
|
||||
pageSize: any = 10; //每页条数
|
||||
pageSizeOptions: number[] = [10]; //设置每页条数
|
||||
PageNumber: any = 1; //第几页
|
||||
displayedColumns: string[] = [ |
||||
"planname", |
||||
"name", |
||||
"or", |
||||
"people", |
||||
"time", |
||||
"operate", |
||||
]; |
||||
tabledataSource: any; //表格数据
|
||||
|
||||
displayedColumns: string[] = ["name", "time", "leader", "upload", "operate"]; |
||||
ngOnInit(): void { |
||||
this.getOrganizations(); |
||||
} |
||||
|
||||
//获得所有组织机构
|
||||
allorganizations: any; //所有组织机构
|
||||
allunittype: any; //所有单位类型
|
||||
tabledataSource: any; //表格数据
|
||||
IsNewData = ""; //维护更新活新增
|
||||
getOrganizations() { |
||||
this.http.get("/api/Organizations").subscribe((data: any) => { |
||||
this.allorganizations = data; |
||||
this.getpresentOrganization(); |
||||
}); |
||||
} |
||||
|
||||
preparelevels: any; |
||||
//得到当前单位所在组织机构的tree型数据
|
||||
expandKeys = []; |
||||
nodes = []; |
||||
organizationId; |
||||
getpresentOrganization() { |
||||
this.allorganizations.forEach((item) => { |
||||
item.key = item.id; |
||||
item.title = item.name; |
||||
item.children = []; |
||||
this.allorganizations.forEach((element) => { |
||||
if (element.parentId == item.id) { |
||||
item.children.push(element); |
||||
} |
||||
if (item.children.length === 0) { |
||||
item.isLeaf = true; |
||||
} else { |
||||
item.isLeaf = false; |
||||
} |
||||
}); |
||||
}); |
||||
this.http.get("/api/Account/Profiles").subscribe((data: any) => { |
||||
this.allorganizations.forEach((item) => { |
||||
if (item.name == data.organizationName) { |
||||
this.expandKeys = [item.id]; |
||||
this.organizationId = item.id; |
||||
this.orId = item.id; |
||||
this.nodes = [...[item]]; |
||||
this.getTabledataSource(); |
||||
} |
||||
}); |
||||
}); |
||||
} |
||||
|
||||
arr1 = [ |
||||
{ |
||||
name: "上海百联物业管理有限公司(福兴大厦)", |
||||
time: "2023-5-18 07:19", |
||||
leader: "郑子墨", |
||||
upload: "赵竹林", |
||||
}, |
||||
{ |
||||
name: "未来资产大厦", |
||||
time: "2023-5-18 08:59", |
||||
leader: "何仙超", |
||||
upload: "何晨", |
||||
}, |
||||
{ |
||||
name: "星展银行大厦", |
||||
time: "2023-5-18 11:22", |
||||
leader: "吴洁力", |
||||
upload: "赵玉", |
||||
}, |
||||
{ |
||||
name: "中国金融信息中心", |
||||
time: "2023-5-19 12:29", |
||||
leader: "吴易奚", |
||||
upload: "赵宵蕙", |
||||
}, |
||||
{ |
||||
name: "中保大厦有限公司", |
||||
time: "2023-5-20 13:07", |
||||
leader: "周伟林", |
||||
upload: "李英顺", |
||||
}, |
||||
{ |
||||
name: "上海国际航运大厦有限公司海神诺富特大酒店", |
||||
time: "2023-5-21 16:16", |
||||
leader: "李琳颖", |
||||
upload: "吴斯怡", |
||||
}, |
||||
{ |
||||
name: "东方绿舟度假村", |
||||
time: "2023-5-22 15:50", |
||||
leader: "李双秆", |
||||
upload: "钱浩宇", |
||||
}, |
||||
{ |
||||
name: "上海市金山食品工业学校", |
||||
time: "2023-5-22 08:39", |
||||
leader: "孙正容", |
||||
upload: "孙正云", |
||||
}, |
||||
]; |
||||
arr2=[ |
||||
{ |
||||
name: "上海汇资百货有限公司", |
||||
time: "2023-5-23 05:25", |
||||
leader: "王英皓", |
||||
upload: "赵竹林", |
||||
}, |
||||
{ |
||||
name: "上海良骤兴餐饮有限公司", |
||||
time: "2023-5-23 13:14", |
||||
leader: "蔡坤", |
||||
upload: "何晨", |
||||
}, |
||||
{ |
||||
name: "上海红珍娱乐有限公司", |
||||
time: "2023-5-23 18:06", |
||||
leader: "徐皓", |
||||
upload: "赵玉", |
||||
}, |
||||
] |
||||
ngOnInit(): void { |
||||
this.tabledataSource = this.arr1; |
||||
length: any; //共多少条数据
|
||||
pageSize: any = 10; //每页条数
|
||||
PageNumber: any = 1; //第几页
|
||||
getTabledataSource() { |
||||
let params = { |
||||
OrganizationId: this.orId, |
||||
PlanComponentName: this.name || "", |
||||
StartTime: this.time |
||||
? this.datePipe.transform(this.time[0], "yyyy-MM-ddT00:00:00") |
||||
: "2020-01-01T00:00:00", |
||||
EndTime: this.time |
||||
? this.datePipe.transform(this.time[1], "yyyy-MM-ddT23:59:59") |
||||
: "2030-01-01T00:00:00", |
||||
PageNumber: this.PageNumber, |
||||
PageSize: this.pageSize, |
||||
}; |
||||
this.http |
||||
.get("/api/SixFamiliars", { params: params }) |
||||
.subscribe((data: any) => { |
||||
this.tabledataSource = data.items; |
||||
this.length = data.totalCount; |
||||
}); |
||||
} |
||||
|
||||
//分页事件
|
||||
chagePage(e) { |
||||
console.log(e) |
||||
// this.PageNumber = e.pageIndex + 1;
|
||||
if(e.pageIndex === 1){ |
||||
this.tabledataSource = this.arr2; |
||||
}else{ |
||||
this.tabledataSource = this.arr1; |
||||
} |
||||
this.PageNumber = e.pageIndex + 1; |
||||
this.getTabledataSource(); |
||||
} |
||||
|
||||
name; |
||||
companyname; |
||||
orId; |
||||
time; |
||||
//查询
|
||||
onSubmit(e) { |
||||
onSubmit() { |
||||
this.PageNumber = 1; |
||||
this.pageEvent.pageIndex = 0; |
||||
this.getTabledataSource(); |
||||
} |
||||
|
||||
//重置
|
||||
reset() {} |
||||
reset() { |
||||
this.name = ""; |
||||
this.orId = this.organizationId; |
||||
this.time = null; |
||||
this.onSubmit(); |
||||
} |
||||
|
||||
look(element) { |
||||
console.log(element); |
||||
let unitdata = {}; |
||||
this.dialog.open(SixFamiliarizeComponent, { |
||||
width: "700px", |
||||
data: { planData: element, unitdata: unitdata, isEditMode: false }, |
||||
}); |
||||
} |
||||
|
||||
delete(element) { |
||||
if (confirm("确认删除此记录吗")) { |
||||
this.http |
||||
.delete(`/api/SixFamiliars/${element.id}`) |
||||
.subscribe((data: any) => { |
||||
alert("删除成功"); |
||||
this.getTabledataSource(); |
||||
}); |
||||
} |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue