Commit 2684c3ca authored by wangqinghua's avatar wangqinghua

update

parent 9a8a65c0
...@@ -150,8 +150,7 @@ ...@@ -150,8 +150,7 @@
</ng-container> </ng-container>
</tbody> </tbody>
</nz-table> </nz-table>
<ng-template #indicatorTemplate><i class="anticon anticon-spin anticon-loading" style="font-size: 24px;"></i> <ng-template #indicatorTemplate><i class="anticon anticon-spin anticon-loading" style="font-size: 24px;"></i></ng-template>
</ng-template>
<nz-modal [(nzVisible)]="isVisiable" nzWidth="780" [nzTitle]="title" [nzFooter]="null" (nzOnCancel)="handleCancel()"> <nz-modal [(nzVisible)]="isVisiable" nzWidth="780" [nzTitle]="title" [nzFooter]="null" (nzOnCancel)="handleCancel()">
<nz-table #nzTable [nzData]="modalList" [nzFrontPagination]="true"> <nz-table #nzTable [nzData]="modalList" [nzFrontPagination]="true">
<thead> <thead>
......
...@@ -36,18 +36,24 @@ ...@@ -36,18 +36,24 @@
<label nz-radio-button nzValue="5">自定义</label> <label nz-radio-button nzValue="5">自定义</label>
</nz-radio-group> </nz-radio-group>
</div> </div>
<div nz-col nzSpan="8" *ngIf="timeType == '5'"> <div nz-col nzSpan="8"
<nz-date-picker
nzShowTime
[(ngModel)]="startTime"
nzPlaceHolder="开始时间" >
></nz-date-picker> <ng-container *ngIf="timeType == '5'">
<nz-date-picker <nz-date-picker
nzShowTime nzShowTime
nzFormat="yyyy-MM-dd HH:mm:ss" [(ngModel)]="startTime"
[(ngModel)]="endTime" nzPlaceHolder="开始时间"
nzPlaceHolder="结束时间" ></nz-date-picker>
></nz-date-picker> <nz-date-picker
nzShowTime
nzFormat="yyyy-MM-dd HH:mm:ss"
[(ngModel)]="endTime"
nzPlaceHolder="结束时间"
></nz-date-picker>
</ng-container>
</div> </div>
<div nz-col nzSpan="2" class="text-right"> <div nz-col nzSpan="2" class="text-right">
<button (click)="search()" nz-button nzType="default"><i class="anticon anticon-search" <button (click)="search()" nz-button nzType="default"><i class="anticon anticon-search"
......
...@@ -122,6 +122,7 @@ ...@@ -122,6 +122,7 @@
<span (click)="goToTri(item)">{{item.triggersCount}}</span> <span (click)="goToTri(item)">{{item.triggersCount}}</span>
</td> </td>
<td class="handle main-color"> <td class="handle main-color">
<span (click)="cloneTemp(item)">克隆</span>
<span (click)="showTempEditModal(item)">编辑</span> <span (click)="showTempEditModal(item)">编辑</span>
<span (click)="showDeleteConfirm(item)">删除</span> <span (click)="showDeleteConfirm(item)">删除</span>
</td> </td>
...@@ -131,6 +132,9 @@ ...@@ -131,6 +132,9 @@
</tbody> </tbody>
</nz-table> </nz-table>
<nz-spin style="position: absolute;top: 35%;left: 50%;" [nzIndicator]="indicatorTemplate" nzTip='克隆中...' [nzSpinning]="isClone"></nz-spin>
<ng-template #indicatorTemplate><i class="anticon anticon-spin anticon-loading" style="font-size: 24px;"></i></ng-template>
<!-- 添加资源--> <!-- 添加资源-->
<smart-basic-edit #basicEdit (done)="handleOk($event)"></smart-basic-edit> <smart-basic-edit #basicEdit (done)="handleOk($event)"></smart-basic-edit>
<!--添加监测点--> <!--添加监测点-->
......
...@@ -62,6 +62,8 @@ export class TemplateComponent implements OnInit { ...@@ -62,6 +62,8 @@ export class TemplateComponent implements OnInit {
templateList = []; templateList = [];
indeterminate; indeterminate;
isClone = false;
constructor(private fb: FormBuilder, private overAllSer: OverAllService, private router: Router, constructor(private fb: FormBuilder, private overAllSer: OverAllService, private router: Router,
private modalService: NzModalService, private message: NzMessageService, private main: JhiMainComponent) { private modalService: NzModalService, private message: NzMessageService, private main: JhiMainComponent) {
} }
...@@ -409,6 +411,7 @@ export class TemplateComponent implements OnInit { ...@@ -409,6 +411,7 @@ export class TemplateComponent implements OnInit {
nzOkText: '确定', nzOkText: '确定',
nzOkType: 'danger', nzOkType: 'danger',
nzOnOk: () => { nzOnOk: () => {
this.isClone = true;
const data = { const data = {
templateid: Number(item.templateid) templateid: Number(item.templateid)
}; };
...@@ -420,6 +423,7 @@ export class TemplateComponent implements OnInit { ...@@ -420,6 +423,7 @@ export class TemplateComponent implements OnInit {
} else { } else {
this.message.info(res.errMsg); this.message.info(res.errMsg);
} }
this.isClone = false;
} }
); );
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment