Explorar o código

add description for message activity

guoziyun hai 9 meses
pai
achega
4da160bd6d

+ 4 - 0
oms/dist/src/models/messageActivityModel.js

@@ -69,6 +69,10 @@ const messageActivitySchema = new mongoose_1.Schema({
         type: Number,
         type: Number,
         default: 0, // 0-unreleased; 1-published; 2-completed
         default: 0, // 0-unreleased; 1-published; 2-completed
     },
     },
+    // 活动描述
+    description: {
+        type: String,
+    },
 }, {
 }, {
     timestamps: true, // Automatically adds createdAt and updatedAt fields
     timestamps: true, // Automatically adds createdAt and updatedAt fields
 });
 });

+ 1 - 1
oms/public/app/index.html

@@ -9,5 +9,5 @@
   <style>body,html{width:100%;height:100%}*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}body{margin:0;color:#000000d9;font-size:14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-variant:tabular-nums;line-height:1.5715;background-color:#fff;font-feature-settings:"tnum"}html{--antd-wave-shadow-color:#1890ff;--scroll-bar:0}</style><link rel="stylesheet" href="styles-LXBSU6DF.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-LXBSU6DF.css"></noscript></head>
   <style>body,html{width:100%;height:100%}*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}body{margin:0;color:#000000d9;font-size:14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-variant:tabular-nums;line-height:1.5715;background-color:#fff;font-feature-settings:"tnum"}html{--antd-wave-shadow-color:#1890ff;--scroll-bar:0}</style><link rel="stylesheet" href="styles-LXBSU6DF.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-LXBSU6DF.css"></noscript></head>
   <body>
   <body>
     <app-root></app-root>
     <app-root></app-root>
-  <script src="polyfills-B6TNHZQ6.js" type="module"></script><script src="main-IYMHUKNB.js" type="module"></script></body>
+  <script src="polyfills-B6TNHZQ6.js" type="module"></script><script src="main-BC2NY3E3.js" type="module"></script></body>
 </html>
 </html>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
oms/public/app/main-BC2NY3E3.js


+ 5 - 0
oms/src/models/messageActivityModel.ts

@@ -26,6 +26,7 @@ export interface IMessageActivity extends Document {
   lastPubDate?: Date;
   lastPubDate?: Date;
   everyday: boolean;
   everyday: boolean;
   status: number;
   status: number;
+  description: string;
   createdAt: Date;
   createdAt: Date;
   updatedAt: Date;
   updatedAt: Date;
 }
 }
@@ -97,6 +98,10 @@ const messageActivitySchema = new Schema<IMessageActivity>(
       type: Number,
       type: Number,
       default: 0, // 0-unreleased; 1-published; 2-completed
       default: 0, // 0-unreleased; 1-published; 2-completed
     },
     },
+    // 活动描述
+    description: {
+      type: String,
+    },
   },
   },
   {
   {
     timestamps: true, // Automatically adds createdAt and updatedAt fields
     timestamps: true, // Automatically adds createdAt and updatedAt fields

+ 13 - 3
omsapp/src/app/pages/message-activity-detail.component.ts

@@ -72,9 +72,13 @@ import { FormsModule } from '@angular/forms';
 
 
         <nz-card nzTitle="其他信息" style="margin-top: 16px;">
         <nz-card nzTitle="其他信息" style="margin-top: 16px;">
           <nz-descriptions nzBordered [nzColumn]="2">
           <nz-descriptions nzBordered [nzColumn]="2">
-            <nz-descriptions-item nzTitle="通知图片">{{
-              activity?.image || '无'
-            }}</nz-descriptions-item>
+            <nz-descriptions-item nzTitle="通知图片">
+              <img
+                [src]="activity?.image"
+                style="max-width: 100px; max-height: 100px"
+                onerror="this.style.display='none'"
+              />
+            </nz-descriptions-item>
             <nz-descriptions-item nzTitle="允许展开">
             <nz-descriptions-item nzTitle="允许展开">
               <nz-switch
               <nz-switch
                 [ngModel]="activity?.bigger"
                 [ngModel]="activity?.bigger"
@@ -116,6 +120,12 @@ import { FormsModule } from '@angular/forms';
               }
               }
             </nz-collapse-panel>
             </nz-collapse-panel>
           </nz-collapse>
           </nz-collapse>
+
+          <nz-descriptions nzBordered [nzColumn]="1">
+            <nz-descriptions-item nzTitle="活动描述">{{
+              activity?.description
+            }}</nz-descriptions-item>
+          </nz-descriptions>
         </nz-card>
         </nz-card>
       </ng-container>
       </ng-container>
     </nz-modal>
     </nz-modal>

+ 13 - 0
omsapp/src/app/pages/message-activity.component.html

@@ -153,6 +153,19 @@
       </nz-form-control>
       </nz-form-control>
     </nz-form-item>
     </nz-form-item>
 
 
+    <nz-form-item>
+      <nz-form-label>活动描述</nz-form-label>
+      <nz-form-control>
+        <textarea
+          nz-input
+          rows="4"
+          formControlName="description"
+          placeholder="输入活动描述"
+        >
+        </textarea>
+      </nz-form-control>
+    </nz-form-item>
+
     <nz-form-item>
     <nz-form-item>
       <nz-form-label nzRequired>消息模板</nz-form-label>
       <nz-form-label nzRequired>消息模板</nz-form-label>
       <nz-form-control>
       <nz-form-control>

+ 1 - 0
omsapp/src/app/pages/message-activity.component.ts

@@ -154,6 +154,7 @@ export class MessageActivityComponent implements OnInit, OnDestroy {
       filter: [[]],
       filter: [[]],
       scheduleAt: [null],
       scheduleAt: [null],
       everyday: [false],
       everyday: [false],
+      description: [''],
     });
     });
   }
   }
 
 

+ 2 - 0
omsapp/src/app/services/message.service.ts

@@ -115,6 +115,7 @@ export interface IMessageActivity {
   image?: string;
   image?: string;
   bigger: boolean;
   bigger: boolean;
   action?: ActionType;
   action?: ActionType;
+  description: string;
   param?: string;
   param?: string;
   extend?: string;
   extend?: string;
   strategy: number;
   strategy: number;
@@ -140,6 +141,7 @@ export interface MessageActivityData {
   scheduleAt?: string;
   scheduleAt?: string;
   everyday: boolean;
   everyday: boolean;
   status: number;
   status: number;
+  description: string;
 }
 }
 
 
 // 定义消息记录接口
 // 定义消息记录接口

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio