From 9ceeba8e3c31fe7357910c980f99d89e54f01df3 Mon Sep 17 00:00:00 2001
From: 沈斌 <bluelazysb@hotmail.com>
Date: Mon, 18 Dec 2017 10:26:32 +0800
Subject: [PATCH] updates
---
src/app/routes/users/installer/installer.component.ts | 31 +++++++++----------------------
1 files changed, 9 insertions(+), 22 deletions(-)
diff --git a/src/app/routes/users/installer/installer.component.ts b/src/app/routes/users/installer/installer.component.ts
index bc9de9a..68e8d55 100644
--- a/src/app/routes/users/installer/installer.component.ts
+++ b/src/app/routes/users/installer/installer.component.ts
@@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { NzMessageService } from 'ng-zorro-antd';
import { getRule, saveRule, removeRule } from '../../../../../_mock/rule.service';
+import { getInstaller } from '../../../../../_mock/installer.service';
@Component({
selector: 'app-installer',
@@ -13,8 +14,8 @@
pi: 1,
ps: 10,
sorter: '',
- status: -1,
- statusList: []
+ u_name: '',
+ u_mobile: ''
};
data: any[] = [];
loading = false;
@@ -23,16 +24,9 @@
totalCallNo = 0;
allChecked = false;
indeterminate = false;
- status = [
- { text: '������', value: false, type: 'default' },
- { text: '���������', value: false, type: 'processing' },
- { text: '���������', value: false, type: 'success' },
- { text: '������', value: false, type: 'error' }
- ];
+
sortMap: any = {};
- expandForm = false;
modalVisible = false;
- description = '';
constructor(public msg: NzMessageService) {}
@@ -42,13 +36,10 @@
getData() {
this.pageChange(1).then(() => {
- this.q.statusList = this.status.map((i, index) => i.value ? index : -1).filter(w => w !== -1);
- if (this.q.status && this.q.status > -1) this.q.statusList.push(this.q.status);
- console.log(this.q);
- this.data = getRule(this.q).map(i => {
- const statusItem = this.status[i.status];
- i.statusText = statusItem.text;
- i.statusType = statusItem.type;
+ // this.q.statusList = this.status.map((i, index) => i.value ? index : -1).filter(w => w !== -1);
+ // if (this.q.status && this.q.status > -1) this.q.statusList.push(this.q.status);
+ // console.log(this.q);
+ this.data = getInstaller(this.q).map(i => {
return i;
});
});
@@ -56,14 +47,10 @@
add() {
this.modalVisible = true;
- this.description = '';
}
save() {
- this.loading = true;
- saveRule(this.description);
- this.getData();
- setTimeout(() => this.modalVisible = false, 500);
+
}
remove() {
--
Gitblit v1.8.0