This commit is contained in:
禾几海
2020-07-03 12:58:07 +08:00
parent efa1f0bee2
commit d800fa479b
3 changed files with 42 additions and 115 deletions

View File

@@ -1,55 +1,3 @@
<!--
<div class="inner-content">
<nz-card nzTitle="评论管理" nzSize="small" [nzExtra]="reload">
<nz-table #table [nzData]="pageList.list"
[nzTotal]="pageList.total"
[(nzPageIndex)]="pageIndex"
[nzPageSize]="pageSize"
[nzLoading]="loading"
[nzScroll]="{x:'800px'}"
(nzPageIndexChange)="getComment()"
nzFrontPagination="false"
nzTableLayout="fixed">
<thead>
<th nzAlign="center">评论页面</th>
<th nzAlign="center">评论内容</th>
<th nzAlign="center">评论日期</th>
<th nzAlign="center">操作</th>
</thead>
<tbody>
<tr *ngFor="let data of table.data">
<td nzAlign="center"><a [href]="data.pagePath">{{data.pagePath}}</a></td>
<td nzAlign="center" nzEllipsis="true" [nzTooltipTitle]="data.content"
nzTooltipPlacement="right"
nz-tooltip style="min-width: 100px;max-width: 400px">
<span *ngIf="!editInfo.editFocus||data.id!==editInfo.id">{{data.content}}</span>
<nz-input-group *ngIf="editInfo.editFocus&&data.id===editInfo.id"
[nzPrefix]="tagIcon" style="width: 50%" (blur)="editInfo.editFocus=false">
<input type="text" nz-input [(ngModel)]="editInfo.content.content" nzSize="small"
[autofocus]="editInfo.editFocus&&data.id===editInfo.id"
(keyup.enter)="edit()">
<button nz-button (click)="edit()" nzSize="small">更新</button>
<button nz-button (click)="editInfo.editFocus=false" nzSize="small">取消</button>
</nz-input-group>
</td>
<td nzAlign="center">{{data.date}}</td>
<td nzAlign="center">
<a (click)="editFocus(data)" class="edit-opr">编辑</a>
<nz-divider nzType="vertical"></nz-divider>
<a nz-popconfirm nzPopconfirmTitle="确定要删除这篇文章吗?" nzOkText="删除" nzCancelText="点错了"
(nzOnConfirm)="deleteComment(data.id)" class="del-opr">删除</a>
</td>
</tr>
</tbody>
</nz-table>
</nz-card>
</div>
<ng-template #tagIcon><i nz-icon nzType="message" nzTheme="outline"></i></ng-template>
<ng-template #reload>
<a (click)="getComment()" title="刷新"><i nz-icon nzType="reload" nzTheme="outline"></i></a>
</ng-template>
-->
<common-table [request]="request" [headData]="headData" cardTitle="评论管理"
[template]="{status:{temp:status,param:{'0':' 正常 ','3':'已删除'}},content:{temp:content}}">
</common-table>
@@ -59,6 +7,6 @@
<nz-tag nzColor="#f50" *ngIf="originValue==3">{{value}}</nz-tag>
</ng-template>
<ng-template #content let-value="value">
<editable-tag [showBorder]="false" [text]="value" (valueChange)="textChange($event)"></editable-tag>
<ng-template #content let-value="value" let-data="data">
<editable-tag #editableTagComponent [key]="data.id" [showBorder]="false" [text]="value" (valueChange)="textChange($event,data)"></editable-tag>
</ng-template>