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/articles/articles.component.ts |   86 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 86 insertions(+), 0 deletions(-)

diff --git a/src/app/routes/pro/list/articles/articles.component.ts b/src/app/routes/pro/list/articles/articles.component.ts
new file mode 100644
index 0000000..213dbf2
--- /dev/null
+++ b/src/app/routes/pro/list/articles/articles.component.ts
@@ -0,0 +1,86 @@
+import { Component, ViewEncapsulation, OnInit } from '@angular/core';
+import { _HttpClient } from '@delon/theme';
+
+@Component({
+  selector: 'pro-list-articles',
+  templateUrl: './articles.component.html',
+})
+export class ProListArticlesComponent implements OnInit {
+  q: any = {
+    ps: 5,
+    categories: [],
+    owners: ['zxx'],
+  };
+
+  list: any[] = [];
+  loading = false;
+
+  // 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;
+    }
+  }
+  // endregion
+
+  // region: owners
+  owners = [
+    {
+      id: 'wzj',
+      name: '���������',
+    },
+    {
+      id: 'wjh',
+      name: '���������',
+    },
+    {
+      id: 'zxx',
+      name: '���������',
+    },
+    {
+      id: 'zly',
+      name: '���������',
+    },
+    {
+      id: 'ym',
+      name: '������',
+    },
+  ];
+
+  setOwner() {
+    this.q.owners = [`wzj`];
+  }
+  // endregion
+
+  constructor(private http: _HttpClient) {}
+
+  ngOnInit() {
+    this.getData();
+  }
+
+  getData(more = false) {
+    this.loading = true;
+    this.http.get('/api/list', { count: this.q.ps }).subscribe((res: any) => {
+      this.list = more ? this.list.concat(res) : res;
+      this.loading = false;
+    });
+  }
+}

--
Gitblit v1.8.0