|
@@ -1,5 +1,4 @@
|
|
|
-// message-record-detail.component.ts
|
|
|
|
|
-import { Component, Inject, Input } from '@angular/core';
|
|
|
|
|
|
|
+import { Component } from '@angular/core';
|
|
|
import { CommonModule, DatePipe, JsonPipe } from '@angular/common';
|
|
import { CommonModule, DatePipe, JsonPipe } from '@angular/common';
|
|
|
|
|
|
|
|
// NG-ZORRO 组件
|
|
// NG-ZORRO 组件
|
|
@@ -27,15 +26,20 @@ import { NzModalRef } from 'ng-zorro-antd/modal';
|
|
|
<nz-descriptions-item nzTitle="用户ID">{{
|
|
<nz-descriptions-item nzTitle="用户ID">{{
|
|
|
record.uid
|
|
record.uid
|
|
|
}}</nz-descriptions-item>
|
|
}}</nz-descriptions-item>
|
|
|
- <nz-descriptions-item nzTitle="活动">{{
|
|
|
|
|
- record.activityName || ''
|
|
|
|
|
- }}</nz-descriptions-item>
|
|
|
|
|
- <nz-descriptions-item nzTitle="策略">{{
|
|
|
|
|
- record.strategyName || ''
|
|
|
|
|
- }}</nz-descriptions-item>
|
|
|
|
|
- <nz-descriptions-item nzTitle="模板">{{
|
|
|
|
|
- record.templateName || ''
|
|
|
|
|
- }}</nz-descriptions-item>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 合并活动、策略、模板为一列 -->
|
|
|
|
|
+ <nz-descriptions-item nzTitle="消息来源">
|
|
|
|
|
+ <div class="source-item">
|
|
|
|
|
+ @if(record.activityName) {
|
|
|
|
|
+ <div><strong>活动:</strong> {{ record.activityName }}</div>
|
|
|
|
|
+ } @if(record.strategyName) {
|
|
|
|
|
+ <div><strong>策略:</strong> {{ record.strategyName }}</div>
|
|
|
|
|
+ } @if(record.templateName) {
|
|
|
|
|
+ <div><strong>模板:</strong> {{ record.templateName }}</div>
|
|
|
|
|
+ }
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </nz-descriptions-item>
|
|
|
|
|
+
|
|
|
<nz-descriptions-item nzTitle="标题">{{
|
|
<nz-descriptions-item nzTitle="标题">{{
|
|
|
record.title
|
|
record.title
|
|
|
}}</nz-descriptions-item>
|
|
}}</nz-descriptions-item>
|
|
@@ -51,7 +55,7 @@ import { NzModalRef } from 'ng-zorro-antd/modal';
|
|
|
record.image || ''
|
|
record.image || ''
|
|
|
}}</nz-descriptions-item>
|
|
}}</nz-descriptions-item>
|
|
|
<nz-descriptions-item nzTitle="大图模式">
|
|
<nz-descriptions-item nzTitle="大图模式">
|
|
|
- <nz-switch ([ngModel)="(record.bigger)" [nzDisabled]="true"></nz-switch>
|
|
|
|
|
|
|
+ {{ record.bigger }}
|
|
|
</nz-descriptions-item>
|
|
</nz-descriptions-item>
|
|
|
<nz-descriptions-item nzTitle="客户端行为">{{
|
|
<nz-descriptions-item nzTitle="客户端行为">{{
|
|
|
record.action || ''
|
|
record.action || ''
|
|
@@ -100,6 +104,16 @@ import { NzModalRef } from 'ng-zorro-antd/modal';
|
|
|
white-space: pre-wrap;
|
|
white-space: pre-wrap;
|
|
|
word-wrap: break-word;
|
|
word-wrap: break-word;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .source-item {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ gap: 4px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .source-item div {
|
|
|
|
|
+ line-height: 1.5;
|
|
|
|
|
+ }
|
|
|
`,
|
|
`,
|
|
|
],
|
|
],
|
|
|
})
|
|
})
|
|
@@ -107,7 +121,6 @@ export class MessageRecordDetailComponent {
|
|
|
record: IMessageRecord;
|
|
record: IMessageRecord;
|
|
|
|
|
|
|
|
constructor(private modalRef: NzModalRef) {
|
|
constructor(private modalRef: NzModalRef) {
|
|
|
- // 从模态框引用中获取数据
|
|
|
|
|
this.record = this.modalRef.getConfig().nzData?.record;
|
|
this.record = this.modalRef.getConfig().nzData?.record;
|
|
|
}
|
|
}
|
|
|
|
|
|