From a3a8c23b196980732a795713a5eb5fe0c7075bf9 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Wed, 11 Jul 2018 21:47:13 +0800
Subject: [PATCH] Revert "提交"

---
 src/app/routes/dashboard/workplace/workplace.component.ts |  114 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 114 insertions(+), 0 deletions(-)

diff --git a/src/app/routes/dashboard/workplace/workplace.component.ts b/src/app/routes/dashboard/workplace/workplace.component.ts
new file mode 100644
index 0000000..2e366e0
--- /dev/null
+++ b/src/app/routes/dashboard/workplace/workplace.component.ts
@@ -0,0 +1,114 @@
+import { Component, OnInit, OnDestroy } from '@angular/core';
+import { zip } from 'rxjs';
+import { NzMessageService } from 'ng-zorro-antd';
+import { getTimeDistance, yuan } from '@delon/util';
+import { _HttpClient } from '@delon/theme';
+import { JWTTokenModel } from '@delon/auth';
+
+@Component({
+  selector: 'app-dashboard-workplace',
+  templateUrl: './workplace.component.html',
+  styleUrls: ['./workplace.component.less'],
+})
+export class DashboardWorkplaceComponent implements OnInit, OnDestroy {
+  notice: any[] = [];
+  activities: any[] = [];
+  radarData: any[] = [];
+  loading = true;
+
+  // region: mock data
+  links = [
+    {
+      title: '���������',
+      href: '',
+    },
+    {
+      title: '���������',
+      href: '',
+    },
+    {
+      title: '���������',
+      href: '',
+    },
+    {
+      title: '���������',
+      href: '',
+    },
+    {
+      title: '���������',
+      href: '',
+    },
+    {
+      title: '���������',
+      href: '',
+    },
+  ];
+  members = [
+    {
+      id: 'members-1',
+      title: '���������������',
+      logo:
+        'https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png',
+      link: '',
+    },
+    {
+      id: 'members-2',
+      title: '���������������',
+      logo:
+        'https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png',
+      link: '',
+    },
+    {
+      id: 'members-3',
+      title: '������������',
+      logo:
+        'https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png',
+      link: '',
+    },
+    {
+      id: 'members-4',
+      title: '���������������',
+      logo:
+        'https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png',
+      link: '',
+    },
+    {
+      id: 'members-5',
+      title: '������������������',
+      logo:
+        'https://gw.alipayobjects.com/zos/rmsportal/siCrBXXhmvTQGWPNLBow.png',
+      link: '',
+    },
+  ];
+  // endregion
+
+  constructor(private http: _HttpClient, public msg: NzMessageService) {}
+
+  ngOnInit() {
+    this.http.get('user-context').subscribe(
+      res => {
+          console.log(res);
+      }
+    );
+    zip(
+      this.http.get('/chart'),
+      this.http.get('/api/notice'),
+      this.http.get('/api/activities'),
+    ).subscribe(([chart, notice, activities]: [any, any, any]) => {
+      this.radarData = chart.radarData;
+      this.notice = notice;
+      this.activities = activities.map((item: any) => {
+        item.template = item.template
+          .split(/@\{([^{}]*)\}/gi)
+          .map((key: string) => {
+            if (item[key]) return `<a>${item[key].name}</a>`;
+            return key;
+          });
+        return item;
+      });
+      this.loading = false;
+    });
+  }
+
+  ngOnDestroy(): void {}
+}

--
Gitblit v1.8.0