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/pro/list/projects/projects.component.ts |   61 ++++++++++++++++++++++++++++++
 1 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/src/app/routes/pro/list/projects/projects.component.ts b/src/app/routes/pro/list/projects/projects.component.ts
new file mode 100644
index 0000000..0d1a423
--- /dev/null
+++ b/src/app/routes/pro/list/projects/projects.component.ts
@@ -0,0 +1,61 @@
+import { Component, OnInit } from '@angular/core';
+import { NzMessageService } from 'ng-zorro-antd';
+import { _HttpClient } from '@delon/theme';
+
+@Component({
+  selector: 'pro-list-projects',
+  templateUrl: './projects.component.html',
+  styleUrls: ['./projects.component.less'],
+})
+export class ProListProjectsComponent implements OnInit {
+  q: any = {
+    ps: 8,
+    categories: [],
+    owners: ['zxx'],
+  };
+
+  list: any[] = [];
+
+  loading = true;
+
+  // region: cateogry
+  categories = [
+    { id: 0, text: '������', value: false },
+    { id: 1, text: '���������', value: false },
+    { id: 2, text: '���������', value: false },
+    { id: 3, text: '���������', value: false },
+    { id: 4, text: '���������', value: false },
+    { id: 5, text: '���������', value: false },
+    { id: 6, text: '���������', value: false },
+    { id: 7, text: '���������', value: false },
+    { id: 8, text: '���������', value: false },
+    { id: 9, text: '���������', value: false },
+    { id: 10, text: '���������', value: false },
+    { id: 11, text: '������������', value: false },
+    { id: 12, text: '������������', value: false },
+  ];
+
+  changeCategory(status: boolean, idx: number) {
+    if (idx === 0) {
+      this.categories.map(i => (i.value = status));
+    } else {
+      this.categories[idx].value = status;
+    }
+    this.getData();
+  }
+  // endregion
+
+  constructor(private http: _HttpClient, public msg: NzMessageService) {}
+
+  ngOnInit() {
+    this.getData();
+  }
+
+  getData() {
+    this.loading = true;
+    this.http.get('/api/list', { count: this.q.ps }).subscribe((res: any) => {
+      this.list = this.list.concat(res);
+      this.loading = false;
+    });
+  }
+}

--
Gitblit v1.8.0