From 72120bbe920425f80d3beb08c08af24151246006 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Thu, 04 Jan 2018 14:00:46 +0800
Subject: [PATCH] 组织模块
---
src/app/routes/devices/devices.module.ts | 6
src/app/routes/systems/organization/organization.service.ts | 35 ++
src/app/routes/systems/organization/organization-edit/organization-edit.component.html | 90 +++++
src/app/routes/systems/organization/organization.component.ts | 222 +++++++++++++
src/app/core/core.module.ts | 3
src/app/core/services/areacode.service.ts | 55 +++
src/assets/app-data.json | 10
src/app/routes/devices/version/version-edit/version-edit.component.ts | 18
src/app/routes/devices/version/version-edit/version-edit.component.html | 0
src/app/routes/devices/version/version.component.ts | 4
src/app/routes/systems/organization/organization.component.html | 65 ++++
src/app/routes/systems/organization/organization-edit/organization-edit.component.ts | 116 +++++++
src/app/routes/systems/systems.module.ts | 20 +
src/app/core/entity/grid.ts | 7
src/app/routes/devices/version/version.component.html | 2
yarn.lock | 230 +++++++------
src/environments/environment.prod.ts | 2
src/app/core/pipe/tyep-handle.pipe.ts | 11
src/app/systems/organization/organization-edit/organization-edit.component.html | 3
src/app/systems/organization/organization-edit/organization-edit.component.ts | 15
20 files changed, 779 insertions(+), 135 deletions(-)
diff --git a/src/app/core/core.module.ts b/src/app/core/core.module.ts
index 80ceb6c..ac8a35d 100644
--- a/src/app/core/core.module.ts
+++ b/src/app/core/core.module.ts
@@ -3,13 +3,14 @@
import { AlainThemeModule } from '@delon/theme';
import { I18NService } from './i18n/i18n.service';
+import { _HttpClient } from '@delon/theme/services/http/http.client';
@NgModule({
imports: [
AlainThemeModule.forRoot()
],
providers: [
- I18NService
+ I18NService, _HttpClient
]
})
export class CoreModule {
diff --git a/src/app/core/entity/grid.ts b/src/app/core/entity/grid.ts
index 4567923..d380735 100644
--- a/src/app/core/entity/grid.ts
+++ b/src/app/core/entity/grid.ts
@@ -1,5 +1,11 @@
import { Column } from '@core/entity/grid';
import { Types } from '@core/enum/types.enum';
+
+export interface AreaNames {
+ provinceName?: string;
+ cityName?: string;
+ areaName?: string;
+}
export interface Column {
text?: string;
name?: string;
@@ -7,6 +13,7 @@
sort?: string;
isSort?: boolean;
type?: DataType;
+ format?: Function;
}
export interface DataType {
name: Types;
diff --git a/src/app/core/pipe/tyep-handle.pipe.ts b/src/app/core/pipe/tyep-handle.pipe.ts
index a9a8ab3..47acc5f 100644
--- a/src/app/core/pipe/tyep-handle.pipe.ts
+++ b/src/app/core/pipe/tyep-handle.pipe.ts
@@ -16,18 +16,21 @@
constructor(private dateService: DateService) {
}
- transform(value: any, col?: Column): any {
+ transform(value: any, col?: Column, row?: any ): any {
const t = Types.Date;
const type = col.type;
- if (type != null && type.name != null) {
+ if ( value != null && value !== '' && type != null && type.name != null) {
value = this.transformHandle(value, type.name, type.format);
+ }
+ if (col.format !== null && col.format instanceof Function ) {
+ value = col.format(value, col, row);
}
return value;
}
- private transformHandle(value: any, type: Types, format: any): any{
+ private transformHandle(value: any, type: Types, format: any): any {
switch (type) {
case Types.Date:
return this.dateService.date_format(value, format);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/app/core/services/areacode.service.ts b/src/app/core/services/areacode.service.ts
new file mode 100644
index 0000000..cb0670e
--- /dev/null
+++ b/src/app/core/services/areacode.service.ts
@@ -0,0 +1,55 @@
+import { environment } from './../../../environments/environment.prod';
+import { Injectable } from '@angular/core';
+import { _HttpClient } from '@delon/theme/services/http/http.client';
+// Statics
+import 'rxjs/add/observable/throw';
+// Operators
+import 'rxjs/add/operator/catch';
+import 'rxjs/add/operator/map';
+import { Observable } from 'rxjs/Observable';
+
+@Injectable()
+export class AreacodeService {
+ baseUrl = environment.SERVER_BASH_URL;
+ constructor(private http: _HttpClient) { }
+ getProvinces(): Observable<{label: string, value: string}[]> {
+ return this.http.get( this.baseUrl + '/area/get-provinces' ).map(
+ (res: {code: number, data: any}) => {
+ let provinces = [];
+ if (res !== null && res['code'] === 1 ) {
+ provinces = res['data'].map((item) => {
+ return {label: item.provinceName , value: item.provinceCode };
+ });
+ }
+ return provinces;
+ }
+ );
+ }
+
+ getCities(provinceCode: string): Observable<{label: string, value: string}[]> {
+ return this.http.get( this.baseUrl + '/area/get-cities', {provinceCode: provinceCode}).map(
+ (res: {code: number, data: any}) => {
+ let cities = [];
+ if (res !== null && res['code'] === 1 ) {
+ cities = res['data'].map((item) => {
+ return {label: item.cityName , value: item.cityCode };
+ });
+ }
+ return cities;
+ }
+ );
+ }
+ getAreas(cityCode: string): Observable<{label: string, value: string}[]> {
+ return this.http.get( this.baseUrl + '/area/get-areas', {cityCode: cityCode}).map(
+ (res: {code: number, data: any}) => {
+ let areas = [];
+ if (res !== null && res['code'] === 1 ) {
+ areas = res['data'].map((item) => {
+ return {label: item.areaName , value: item.areaCode , isLeaf: true};
+ });
+ }
+ return areas;
+ }
+ );
+ }
+}
diff --git a/src/app/routes/devices/devices.module.ts b/src/app/routes/devices/devices.module.ts
index 3e17229..71b1b01 100644
--- a/src/app/routes/devices/devices.module.ts
+++ b/src/app/routes/devices/devices.module.ts
@@ -10,11 +10,11 @@
import { VersionService } from 'app/routes/devices/version/version.service';
import { Version } from '@angular/compiler/src/util';
import { _HttpClient } from '@delon/theme/services/http/http.client';
-import { AddOrEditComponent } from './version/add-or-edit/add-or-edit.component';
import { PipeModule } from '@core/pipe/pipe.module';
import { FormBuilder } from '@angular/forms';
+import { VersionEditComponent } from './version/version-edit/version-edit.component';
-const COMPONENTS_NOROUNT = [ AddOrEditComponent ];
+const COMPONENTS_NOROUNT = [ VersionEditComponent ];
const routes: Routes = [
{
@@ -39,7 +39,7 @@
BasicInfoComponent,
VersionComponent,
MonitorPointComponent,
- ...COMPONENTS_NOROUNT
+ ...COMPONENTS_NOROUNT
],
providers: [ToolsService, VersionService, _HttpClient, FormBuilder],
entryComponents: COMPONENTS_NOROUNT
diff --git a/src/app/routes/devices/version/add-or-edit/add-or-edit.component.html b/src/app/routes/devices/version/version-edit/version-edit.component.html
similarity index 100%
rename from src/app/routes/devices/version/add-or-edit/add-or-edit.component.html
rename to src/app/routes/devices/version/version-edit/version-edit.component.html
diff --git a/src/app/routes/devices/version/add-or-edit/add-or-edit.component.ts b/src/app/routes/devices/version/version-edit/version-edit.component.ts
similarity index 74%
rename from src/app/routes/devices/version/add-or-edit/add-or-edit.component.ts
rename to src/app/routes/devices/version/version-edit/version-edit.component.ts
index 4e61d6d..2137673 100644
--- a/src/app/routes/devices/version/add-or-edit/add-or-edit.component.ts
+++ b/src/app/routes/devices/version/version-edit/version-edit.component.ts
@@ -1,16 +1,14 @@
-import { DeviceVersion } from './../version.component';
import { Component, OnInit } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
import { NzMessageService, NzModalSubject } from 'ng-zorro-antd';
-import { DateService } from '@core/services/date.service';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
+import { DeviceVersion } from 'app/routes/devices/version/version.component';
@Component({
- selector: 'app-add-or-edit',
- templateUrl: './add-or-edit.component.html',
+ selector: 'app-version-edit',
+ templateUrl: './version-edit.component.html',
styles: []
})
-export class AddOrEditComponent implements OnInit {
+export class VersionEditComponent implements OnInit {
cols: DeviceVersion;
@@ -27,7 +25,7 @@
name: [this.data.name, [Validators.required] ],
version: [this.data.version == null ? 1 : this.data.version, [Validators.required] ],
createTime: [this.data.createTime, [Validators.required] ],
- description: [this.data.description, [Validators.required] ]
+ description: [this.data.description]
};
this.validateForm = this.formBuilder.group(
validates
@@ -53,16 +51,14 @@
return;
}
this.isSaving = true;
- Object.keys(this.data).forEach( (key: string) => {
+ Object.keys(value).forEach( (key: string) => {
if ( value[key] != null ) {
this.data[key] = value[key];
}
} );
this.subject.next( this );
}else {
- for (const i in this.validateForm.controls) {
- this.validateForm.controls[ i ].markAsDirty();
- }
+ this.validate();
}
}
validate() {
diff --git a/src/app/routes/devices/version/version.component.html b/src/app/routes/devices/version/version.component.html
index ba633d3..9832a1e 100644
--- a/src/app/routes/devices/version/version.component.html
+++ b/src/app/routes/devices/version/version.component.html
@@ -47,7 +47,7 @@
[ngStyle]="{'width':col.width,'text-align':col['align'] === undefined?'left':col.align}">
<span [ngSwitch]="col.type">
<!-- ������������������������������������ -->
- <span *ngSwitchDefault> {{ row[col.name]|tyepHandle:col }} </span>
+ <span *ngSwitchDefault> {{ row[col.name]|tyepHandle:col:row}} </span>
<!-- ������������������������������������ -->
</span>
</td>
diff --git a/src/app/routes/devices/version/version.component.ts b/src/app/routes/devices/version/version.component.ts
index d8fcc2d..304d9e7 100644
--- a/src/app/routes/devices/version/version.component.ts
+++ b/src/app/routes/devices/version/version.component.ts
@@ -1,5 +1,4 @@
import { DataType } from './../../../core/entity/grid';
-import { AddOrEditComponent } from './add-or-edit/add-or-edit.component';
import { Version } from '@angular/compiler/src/util';
import { Subject } from 'rxjs/Subject';
import { ToolsService } from '@core/services/tools.service';
@@ -13,6 +12,7 @@
import { Types } from '@core/enum/types.enum';
import { Column, Grid, PageBean } from '@core/entity/grid';
import { filter } from 'rxjs/operators/filter';
+import { VersionEditComponent } from 'app/routes/devices/version/version-edit/version-edit.component';
export interface DeviceVersion {
createTime?: Column|any;
@@ -108,7 +108,7 @@
data = {};
}
const cols = this.version;
- this.modalHelper.static(AddOrEditComponent, { cols , data }).subscribe(
+ this.modalHelper.static(VersionEditComponent, { cols , data }).subscribe(
( ret: { data: any, close: Function} ) => {
this.versionService.save(ret.data).subscribe(
( res: any) => {
diff --git a/src/app/routes/systems/organization/organization-edit/organization-edit.component.html b/src/app/routes/systems/organization/organization-edit/organization-edit.component.html
new file mode 100644
index 0000000..7830d63
--- /dev/null
+++ b/src/app/routes/systems/organization/organization-edit/organization-edit.component.html
@@ -0,0 +1,90 @@
+<div class="modal-header">
+ <div class="modal-title">{{ data.id != null ? '������' : '������'}} - ������</div>
+</div>
+<form [formGroup]="validateForm" (ngSubmit)="save($event,validateForm.value,validateForm.valid)" nz-form [nzType]="'horizontal'">
+ <div nz-form-item nz-row class="mb-sm">
+ <div nz-form-label nz-col [nzSm]="4" [nzXs]="24">
+ <label nz-form-item-required>������</label>
+ </div>
+ <div nz-form-control nz-col [nzSpan]="7" nzHasFeedback>
+ <nz-input formControlName="name" maxlength="20" [nzPlaceHolder]="'������������'">
+ </nz-input>
+ </div>
+ <div nz-form-label nz-col [nzSm]="4" [nzXs]="24">
+ <label>������</label>
+ </div>
+ <div nz-form-control nz-col [nzSpan]="4" nzHasFeedback>
+ <nz-select style="width: 120px;" formControlName="rank" [nzPlaceHolder]="'������ ������'">
+ <nz-option *ngFor="let option of rankOptions" [nzLabel]="option.label" [nzValue]="option.value" [nzDisabled]="option.disabled">
+ </nz-option>
+ </nz-select>
+ </div>
+ </div>
+ <div nz-form-item nz-row class="mb-sm">
+ <div nz-form-label nz-col [nzSm]="4" [nzXs]="24">
+ <label nz-form-item-required>���/���/���</label>
+ </div>
+ <div nz-form-control nz-col [nzSpan]="7" nzHasFeedback>
+ <nz-cascader [class.class123]="true" (nzChange)="setAreaCodes($event)" formControlName="_areas" (nzLoad)="areaLazyLoad($event)"
+ [nzPlaceHolder]="'������ ���/���/���'" >
+ </nz-cascader>
+ </div>
+ <div nz-form-label nz-col [nzSm]="4" [nzXs]="24">
+ <label>������������</label>
+ </div>
+ <div nz-form-control nz-col [nzSpan]="7" nzHasFeedback>
+ <nz-input formControlName="address" maxlength="20"
+ [nzPlaceHolder]="'������������(���)������������120���'">
+ </nz-input>
+ </div>
+ </div>
+ <div nz-form-item nz-row class="mb-sm">
+ <div nz-form-label nz-col [nzSm]="4" [nzXs]="24">
+ <label>������</label>
+ </div>
+ <div nz-form-control nz-col [nzSpan]="7" nzHasFeedback>
+ <nz-input formControlName="telephone" maxlength="20"
+ [nzPlaceHolder]="'������(���)���0512-12345678'"></nz-input>
+ </div>
+ <div nz-form-label nz-col [nzSm]="4" [nzXs]="24">
+ <label>������</label>
+ </div>
+ <div nz-form-control nz-col [nzSpan]="7" nzHasFeedback>
+ <nz-input formControlName="email" maxlength="20"
+ [nzPlaceHolder]="'������(���)���abc@qq.com'"></nz-input>
+ </div>
+ </div>
+ <div nz-form-item nz-row class="mb-sm">
+ <div nz-form-label nz-col [nzSm]="4" [nzXs]="24">
+ <label nz-form-item-required>������������</label>
+ </div>
+ <div nz-form-control nz-col [nzSpan]="7" nzHasFeedback>
+ <nz-datepicker nzSize="large" style="width: 90%;" formControlName="createTime" nzShowTime [nzPlaceHolder]="'������������'"
+ [nzFormat]="'YYYY-MM-DD HH:mm:ss'" ></nz-datepicker>
+ </div>
+ <div nz-form-label nz-col [nzSm]="4" [nzXs]="24">
+ <label nz-form-item-required>������������</label>
+ </div>
+ <div nz-form-control nz-col [nzSpan]="7" nzHasFeedback>
+ <nz-datepicker nzSize="large" style="width: 90%;" formControlName="expireTime" nzShowTime [nzPlaceHolder]="'������������'"
+ [nzFormat]="'YYYY-MM-DD HH:mm:ss'" ></nz-datepicker>
+ </div>
+ </div>
+ <div nz-form-item nz-row class="mb-sm">
+ <div nz-form-label nz-col [nzSm]="4" [nzXs]="24">
+ <label>������</label>
+ </div>
+ <div nz-form-control nz-col [nzSpan]="16" nzHasFeedback>
+ <nz-input formControlName="description" maxlength="100"></nz-input>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <button nz-button type="button" (click)="close()">������</button>
+ <button nz-button [nzType]="'primary'" [nzLoading]="isSaving">
+ <span>
+ ������
+ <span *ngIf="isSaving">���</span>
+ </span>
+ </button>
+ </div>
+</form>
diff --git a/src/app/routes/systems/organization/organization-edit/organization-edit.component.ts b/src/app/routes/systems/organization/organization-edit/organization-edit.component.ts
new file mode 100644
index 0000000..03a2dd4
--- /dev/null
+++ b/src/app/routes/systems/organization/organization-edit/organization-edit.component.ts
@@ -0,0 +1,116 @@
+import { Organization } from './../organization.component';
+import { AreacodeService } from './../../../../core/services/areacode.service';
+import { Component, OnInit } from '@angular/core';
+import { NzMessageService, NzModalSubject } from 'ng-zorro-antd';
+import { FormGroup, FormBuilder, FormControl, Validators } from '@angular/forms';
+import { CascaderOption } from 'ng-zorro-antd/src/cascader/nz-cascader.component';
+
+@Component({
+ selector: 'app-organization-edit',
+ templateUrl: './organization-edit.component.html',
+ styles: []
+})
+export class OrganizationEditComponent implements OnInit {
+
+ rankOptions = [
+ { value: 0, label: '������' },
+ { value: 1, label: '������������' },
+ { value: 2, label: '���������' },
+ { value: 3, label: '������������' },
+ { value: 4, label: '���������' },
+ { value: 5, label: '���������' }
+ ];
+
+ data: Organization;
+ isSaving = false;
+ validateForm: FormGroup;
+ constructor(
+ private subject: NzModalSubject,
+ private formBuilder: FormBuilder,
+ private areacodeService: AreacodeService
+ ) { }
+
+ ngOnInit() {
+ const data = this.data;
+ const areaNames = data.areaNames;
+ let _areas = null;
+ if (areaNames != null) {
+ _areas = {
+ label: Object.values(areaNames).join('/'),
+ value: data.areaCode
+ };
+ }
+ if (data.createTime == null) {
+ data.createTime = new Date().getTime();
+ }
+ const validates: Organization|object = {
+ name: [data.name, [Validators.required] ],
+ rank: [data.rank],
+ telephone: [data.telephone, [ Validators.pattern('^0\\d{2,3}-?\\d{7,8}$') ]],
+ email: [data.email, [ Validators.pattern('^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+') ] ],
+ address: [data.address ],
+ _areas: [_areas, [Validators.required]],
+ createTime: [data.createTime, [Validators.required] ],
+ expireTime: [data.expireTime, [Validators.required] ],
+ description: [data.description ]
+ };
+ this.validateForm = this.formBuilder.group(
+ validates
+ );
+ }
+ close() {
+ this.subject.destroy();
+ }
+ save($event, value, valid) {
+ $event.preventDefault();
+ if (valid) {
+ for (const i in this.validateForm.controls) {
+ this.validateForm.controls[ i ].disable();
+ }
+ this.isSaving = true;
+ Object.keys(value).forEach( (key: string) => {
+ // '_'������������������������������
+ if (!key.startsWith('_') && value[key] != null) {
+ this.data[key] = value[key];
+ }
+ } );
+ this.subject.next( this );
+ }else {
+ this.validate();
+ }
+ }
+ validate() {
+ for (const i in this.validateForm.controls) {
+ this.validateForm.controls[ i ].markAsDirty();
+ }
+ }
+ areaLazyLoad(event: { option: CascaderOption, index: number, resolve: (children: CascaderOption[]) => void, reject: () => void }) {
+ const index = event['index'];
+ const option = event.option;
+ switch (index) {
+ case -1:
+ this.areacodeService.getProvinces().subscribe(
+ (res: {label: string, value: string}[]) => {
+ event.resolve( res );
+ }
+ ); break;
+ case 0:
+ this.areacodeService.getCities(option.value).subscribe(
+ (res: {label: string, value: string}[]) => {
+ event.resolve( res );
+ }
+ ); break;
+ case 1:
+ this.areacodeService.getAreas(option.value).subscribe(
+ (res: {label: string, value: string}[]) => {
+ event.resolve( res );
+ }
+ ); break;
+ }
+ }
+ setAreaCodes(codes: string[]) {
+ this.data.provinceCode = codes[0];
+ this.data.cityCode = codes[1];
+ this.data.areaCode = codes[2];
+ }
+}
diff --git a/src/app/routes/systems/organization/organization.component.html b/src/app/routes/systems/organization/organization.component.html
new file mode 100644
index 0000000..ed0b257
--- /dev/null
+++ b/src/app/routes/systems/organization/organization.component.html
@@ -0,0 +1,65 @@
+<pro-header [title]="grid.title"></pro-header>
+<nz-card [nzBordered]="false">
+ <div class="mb-md">
+ <button nz-button (click)="addOrModify()" [nzType]="'primary'" [nzSize]="'large'">
+ <i class="anticon anticon-plus"></i><span>������</span>
+ </button>
+ <ng-container *ngIf="grid.selectedIndexs.length > 0">
+ <button nz-button [nzSize]="'large'" (click)="deleteSelected()">������������</button>
+ </ng-container>
+ <nz-input [ngStyle]="{'width': '280px','float':'right'}" [(ngModel)]="queryMap.value" name="" [nzPlaceHolder]="queryMap.text"
+ (keyup)="queryTextChanged($event)" (change)="queryTextChanged($event)" ></nz-input>
+ </div>
+ <div class="mb-md">
+ <nz-alert *ngIf="grid.selectedIndexs.length > 0" [nzType]="'info'" [nzShowIcon]="true">
+ <span alert-body>
+ ���������<strong class="text-primary">{{grid.selectedIndexs.length}}</strong>���
+ </span>
+ </nz-alert>
+ </div>
+ <nz-table #nzTable
+ [nzAjaxData]="grid.data"
+ [nzTotal]="grid.total"
+ [(nzPageIndex)]="grid.pageIndex"
+ [(nzPageSize)]="grid.pageSize"
+ [nzLoading]="grid.loading"
+ [nzShowTotal]="true"
+ (nzPageIndexChange)="load()">
+ <thead nz-thead>
+ <tr>
+ <th nz-th [nzCheckbox]="true">
+ <label nz-checkbox [(ngModel)]="grid.allChecked" [nzIndeterminate]="grid.indeterminate" (ngModelChange)="grid.checkAll($event)"></label>
+ </th>
+ <th nz-th *ngFor="let col of grid.columns"
+ [ngStyle]="{'width':col.width,'text-align':col['align'] === undefined?'left':col.align}" >
+ <span>{{ col.text }}</span>
+ <nz-table-sort *ngIf="col.isSort" [(nzValue)]="col.sort" (nzValueChange)="sort(col.name,$event)"></nz-table-sort>
+ </th>
+ <th nz-th><span>������</span></th>
+ </tr>
+ </thead>
+ <tbody nz-tbody>
+ <tr nz-tbody-tr *ngFor="let row of nzTable.data">
+ <td nz-td [nzCheckbox]="true">
+ <label nz-checkbox [(ngModel)]="row.checked" (ngModelChange)="grid.refreshStatus($event)"></label>
+ </td>
+ <td nz-td *ngFor="let col of grid.columns"
+ [ngStyle]="{'width':col.width,'text-align':col['align'] === undefined?'left':col.align}">
+ <span [ngSwitch]="col.type">
+ <!-- ������������������������������������ -->
+ <span *ngSwitchDefault> {{ row[col.name]|tyepHandle:col:row }} </span>
+ <!-- ������������������������������������ -->
+ </span>
+ </td>
+ <td nz-td>
+ <a (click)="addOrModify(row)">������</a>
+ <span nz-table-divider></span>
+ <nz-popconfirm [nzTitle]="'���������������������������?'" [nzOkText]="'Yes'" [nzCancelText]="'No'" (nzOnConfirm)="delete(row.id)" >
+ <a nz-popconfirm>������</a>
+ </nz-popconfirm>
+ </td>
+ </tr>
+ </tbody>
+ </nz-table>
+ </nz-card>
+
diff --git a/src/app/routes/systems/organization/organization.component.ts b/src/app/routes/systems/organization/organization.component.ts
new file mode 100644
index 0000000..ef58ac4
--- /dev/null
+++ b/src/app/routes/systems/organization/organization.component.ts
@@ -0,0 +1,222 @@
+import { DataType, AreaNames } from './../../../core/entity/grid';
+import { Version, ValueTransformer } from '@angular/compiler/src/util';
+import { Subject } from 'rxjs/Subject';
+import { ToolsService } from '@core/services/tools.service';
+import { Component, OnInit } from '@angular/core';
+import { NzMessageService, NzModalService } from 'ng-zorro-antd';
+import { ModalHelper } from '@delon/theme';
+import { HttpClient } from '@angular/common/http';
+import { environment } from '../../../../environments/environment';
+import { DateService } from '@core/services/date.service';
+import { VersionService } from 'app/routes/devices/version/version.service';
+import { Types } from '@core/enum/types.enum';
+import { Column, Grid, PageBean } from '@core/entity/grid';
+import { filter } from 'rxjs/operators/filter';
+import { OrganizationEditComponent } from './organization-edit/organization-edit.component';
+import { OrganizationService } from 'app/routes/systems/organization/organization.service';
+
+export interface Organization {
+ address?: Column|any;
+ areaCode?: Column|any;
+ cityCode?: Column|any;
+ createTime?: Column|any;
+ description?: Column|any;
+ email?: Column|any;
+ expireTime?: Column|any;
+ id?: Column|any;
+ isDelete?: Column|any;
+ name?: Column|any;
+ provinceCode?: Column|any;
+ rank?: Column|any;
+ telephone?: Column|any;
+ areaNames?: AreaNames|any ;
+}
+
+@Component({
+ selector: 'app-organization',
+ templateUrl: './organization.component.html',
+ styles: []
+})
+export class OrganizationComponent implements OnInit {
+
+ private organization: Organization;
+ grid: Grid<Organization> = new Grid(null);
+ queryMap = { text: '���������������', value: ''};
+ queryTextStream: Subject<string> = new Subject<string>();
+ private initPage() {
+ this.organization = {
+ name: {
+ text: '������',
+ width: '120px'
+ },
+ rank: {
+ text: '������',
+ width: '60px'
+ },
+ telephone: {
+ text: '������',
+ width: '180px'
+ },
+ address: {
+ text: '������',
+ width: '300px',
+ format: (value: any, col: Column, row: any) => {
+ value = value == null ? '' : value ;
+ if (row['areaNames'] != null) {
+ return row['areaNames']['provinceName'] + row['areaNames']['cityName'] + row['areaNames']['areaName'] + value;
+ } else {
+ return value;
+ }
+
+ }
+ },
+ createTime: {
+ text: '������������',
+ width: '100px',
+ type: {
+ name: Types.Date,
+ format: 'YYYY-MM-DD HH:mm:ss'
+ },
+ isSort: true
+ },
+ expireTime: {
+ text: '������������',
+ width: '100px',
+ type: {
+ name: Types.Date,
+ format: 'YYYY-MM-DD HH:mm:ss'
+ },
+ isSort: true
+ }
+ };
+ this.grid.title = '������������';
+ this.grid.setColumns(this.organization);
+ this.grid.pageSize = 10;
+ }
+ constructor(
+ private organizationService: OrganizationService,
+
+ private confirmServ: NzModalService,
+ public msgSrv: NzMessageService,
+ private modalHelper: ModalHelper,
+ ) {}
+
+ ngOnInit() {
+ this.initPage();
+ this.queryTextStream
+ .debounceTime(500)
+ .distinctUntilChanged()
+ .subscribe(queryText => {
+ this.load();
+ });
+ }
+ queryTextChanged($event) {
+ this.queryTextStream.next(this.queryMap.value);
+ }
+ load(reload: boolean = false) {
+ if (reload) {
+ this.grid.pageIndex = 1 ;
+ }
+ // ������������������ExpressionChangedAfterItHasBeenCheckedError
+ setTimeout(() => {
+ this.grid.loading = true;
+ }, 1);
+ this.organizationService.getPagingList(this.grid, this.queryMap.value).subscribe(
+ (res: PageBean) => {
+ this.grid.loading = true;
+ if (res != null && res.data != null) {
+ this.grid.initData(res);
+ this.grid.refreshStatus();
+ setTimeout(() => {
+ this.grid.loading = false;
+ }, 1);
+ }
+ }
+ );
+ }
+
+// rowData���null���������������
+ addOrModify(d) {
+ const data = {};
+ if ( d != null) {
+ Object.assign(data, d);
+ }
+ const cols = this.organization;
+ this.modalHelper.static(OrganizationEditComponent, { cols , data }).subscribe(
+ ( ret: { data: any, close: Function} ) => {
+ // ������������
+ if (ret.data['index'] != null ) {
+ const index: number = ret.data['index'] ;
+ const origData = this.grid.getData()[index];
+ const isModified = Object.keys(origData).some(
+ (key: string) => {
+ return ret.data[key] !== origData[key];
+ }
+ );
+ // ������������
+ if (!isModified) {
+ ret.close();
+ this.msgSrv.success('���������������������������');
+ return;
+ }
+ }
+ this.organizationService.save(ret.data).subscribe(
+ ( res: any) => {
+ if (res.code === 1) {
+ this.load();
+ ret.close();
+ this.msgSrv.success('���������������������');
+ }
+ }
+ );
+ });
+ }
+
+ delete(...id: number[]) {
+ this.organizationService.delete( ...id ).subscribe(
+ ( res: any) => {
+ if (res.code === 1) {
+ this.load();
+ this.msgSrv.success('���������������������������');
+ }
+ }
+ );
+ }
+
+ deleteSelected() {
+ this.confirmServ.confirm({
+ title: '������������',
+ content: '������������������������������������������������',
+ okText: '������',
+ cancelText: '������'
+ }).on('onOk', () => {
+ if (this.grid.selectedIndexs != null && this.grid.selectedIndexs.length > 0) {
+ const ids = this.grid.selectedIndexs.map(
+ (index: number) => {
+ const id = this.grid.data[index].id;
+ return Number.parseInt(id);
+ }
+ );
+ this.delete( ...ids );
+ }
+ });
+ }
+ sort(field: string, value: string) {
+ // ������������field
+ this.grid.sorts = this.grid.sorts.filter(
+ (fn: string) => {
+ return fn !== field;
+ }
+ );
+ // ������value������null������������������������������filed
+ if ( value != null ) {
+ this.grid.sorts.push(field);
+ }
+ this.load();
+ }
+
+ reset(ls: any[]) {
+ for (const item of ls) item.value = false;
+ this.load(true);
+ }
+}
diff --git a/src/app/routes/systems/organization/organization.service.ts b/src/app/routes/systems/organization/organization.service.ts
new file mode 100644
index 0000000..1e75ef8
--- /dev/null
+++ b/src/app/routes/systems/organization/organization.service.ts
@@ -0,0 +1,35 @@
+import { ExampleService } from './../../../core/services/example.service';
+import { _HttpClient } from '@delon/theme';
+import { environment } from './../../../../environments/environment.prod';
+import { RouteConfigLoadStart } from '@angular/router';
+import { Injectable } from '@angular/core';
+import { equal } from 'assert';
+import { Observable } from 'rxjs/Observable';
+import { PageBean } from '@core/entity/grid';
+
+
+@Injectable()
+export class OrganizationService {
+ private urls = {
+ edit: environment.SERVER_BASH_URL + '/organization/page-list',
+ save: environment.SERVER_BASH_URL + '/organization/add-or-modify',
+ delete: environment.SERVER_BASH_URL + '/organization/delete-by-ids'
+ };
+ constructor(private http: _HttpClient) { }
+ public getPagingList(page: PageBean, queryText: string): Observable<PageBean> {
+ const example = new ExampleService();
+ if (queryText != null && queryText !== '') {
+ example.or().andLike({name: 'name', value: '%' + queryText + '%'});
+ example.or().andEqualTo({name: 'version', value: queryText});
+ }
+ const param: PageBean = {pageSize: page.pageSize, pageIndex: page.pageIndex,
+ queryParams: example.getSqlParam(), orderByClause: page.getOrderByClause()};
+ return this.http.get(this.urls.edit, param);
+ }
+ public save(data: any): Observable<any> {
+ return this.http.post(this.urls.save, data);
+ }
+ public delete(...ids: number[]): Observable<any> {
+ return this.http.post(this.urls.delete, ids);
+ }
+}
diff --git a/src/app/routes/systems/systems.module.ts b/src/app/routes/systems/systems.module.ts
index 0418569..7c14ab3 100644
--- a/src/app/routes/systems/systems.module.ts
+++ b/src/app/routes/systems/systems.module.ts
@@ -1,3 +1,5 @@
+import { FormBuilder } from '@angular/forms';
+import { _HttpClient } from '@delon/theme';
import { Component, OnInit } from '@angular/core';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
@@ -6,20 +8,29 @@
import { AccountComponent } from './account/account.component';
import { AccountEditComponent } from './account/account-edit/account-edit.component';
+import { OrganizationComponent } from './organization/organization.component';
+import { PipeModule } from '@core/pipe/pipe.module';
+import { OrganizationEditComponent } from './organization/organization-edit/organization-edit.component';
+import { ToolsService } from '@core/services/tools.service';
+import { OrganizationService } from 'app/routes/systems/organization/organization.service';
+import { AreacodeService } from '@core/services/areacode.service';
const routes: Routes = [
{
path: '',
children: [
- { path: 'account', component: AccountComponent }
+ { path: 'account', component: AccountComponent },
+ { path: 'organization', component: OrganizationComponent }
]
}
];
-const COMPONENTS_NOROUNT = [ AccountEditComponent ];
+const COMPONENTS_NOROUNT = [ AccountEditComponent, OrganizationEditComponent ];
@NgModule({
imports: [
+ // ������������������������������������
+ PipeModule,
CommonModule,
SharedModule,
RouterModule.forChild(routes)
@@ -27,9 +38,10 @@
declarations: [
...COMPONENTS_NOROUNT,
AccountComponent,
- AccountEditComponent
-
+ AccountEditComponent,
+ OrganizationComponent
],
+ providers: [ToolsService, OrganizationService, _HttpClient, FormBuilder, AreacodeService],
entryComponents: COMPONENTS_NOROUNT
})
export class SystemsModule { }
diff --git a/src/app/systems/organization/organization-edit/organization-edit.component.html b/src/app/systems/organization/organization-edit/organization-edit.component.html
new file mode 100644
index 0000000..7b9d857
--- /dev/null
+++ b/src/app/systems/organization/organization-edit/organization-edit.component.html
@@ -0,0 +1,3 @@
+<p>
+ organization-edit works!
+</p>
diff --git a/src/app/systems/organization/organization-edit/organization-edit.component.ts b/src/app/systems/organization/organization-edit/organization-edit.component.ts
new file mode 100644
index 0000000..fc72600
--- /dev/null
+++ b/src/app/systems/organization/organization-edit/organization-edit.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-organization-edit',
+ templateUrl: './organization-edit.component.html',
+ styles: []
+})
+export class OrganizationEditComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/src/assets/app-data.json b/src/assets/app-data.json
index 48c82b3..5d168e0 100644
--- a/src/assets/app-data.json
+++ b/src/assets/app-data.json
@@ -64,11 +64,17 @@
"translate": "system_management",
"link": "/",
"icon": "icon-note",
- "children": [{
+ "children": [
+ {
"text": "������������",
"link": "/systems/account",
"translate": "system_management_account"
- }]
+ },
+ {
+ "text": "������������",
+ "link": "/systems/organization"
+ }
+ ]
}]
}]
}
diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts
index 0c406d4..9298dc8 100644
--- a/src/environments/environment.prod.ts
+++ b/src/environments/environment.prod.ts
@@ -3,5 +3,5 @@
production: true,
hmr: false,
useHash: true,
- SERVER_BASH_URL: 'http://localhost:8001'
+ SERVER_BASH_URL: 'http://localhost:8080'
};
diff --git a/yarn.lock b/yarn.lock
index 94bb167..8743ad4 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -28,8 +28,8 @@
rxjs "^5.5.2"
"@angular/animations@^5.0.0":
- version "5.1.1"
- resolved "http://registry.npm.taobao.org/@angular/animations/download/@angular/animations-5.1.1.tgz#007621f8bcac15560e160582eb2e91025b6b9106"
+ version "5.1.2"
+ resolved "http://registry.npm.taobao.org/@angular/animations/download/@angular/animations-5.1.2.tgz#464df9a9e30c7a8146118fdd9bff82cdfcf97d7e"
dependencies:
tslib "^1.7.1"
@@ -39,14 +39,14 @@
dependencies:
tslib "^1.7.1"
-"@angular/cli@^1.6.1":
- version "1.6.1"
- resolved "http://registry.npm.taobao.org/@angular/cli/download/@angular/cli-1.6.1.tgz#6797995be1965bfc2e26234c728c9968cf7f3bdb"
+"@angular/cli@^1.6.3":
+ version "1.6.3"
+ resolved "http://registry.npm.taobao.org/@angular/cli/download/@angular/cli-1.6.3.tgz#63120b347fc8ee206f773074d25fdd4807c189e3"
dependencies:
"@angular-devkit/build-optimizer" "~0.0.36"
"@angular-devkit/schematics" "~0.0.42"
"@ngtools/json-schema" "1.1.0"
- "@ngtools/webpack" "1.9.1"
+ "@ngtools/webpack" "1.9.3"
"@schematics/angular" "~0.1.11"
autoprefixer "^6.5.3"
chalk "~2.2.0"
@@ -91,7 +91,7 @@
style-loader "^0.13.1"
stylus "^0.54.5"
stylus-loader "^3.0.1"
- uglifyjs-webpack-plugin "~1.1.2"
+ uglifyjs-webpack-plugin "^1.1.5"
url-loader "^0.6.2"
webpack "~3.10.0"
webpack-dev-middleware "~1.12.0"
@@ -104,14 +104,14 @@
node-sass "^4.3.0"
"@angular/common@^5.0.0":
- version "5.1.1"
- resolved "http://registry.npm.taobao.org/@angular/common/download/@angular/common-5.1.1.tgz#b6444cf6508f9b0b5fc4c9b3107b3e37be1336c9"
+ version "5.1.2"
+ resolved "http://registry.npm.taobao.org/@angular/common/download/@angular/common-5.1.2.tgz#b2659161575d463bb8b3e30e37434b26d70366b4"
dependencies:
tslib "^1.7.1"
"@angular/compiler-cli@^5.0.0":
- version "5.1.1"
- resolved "http://registry.npm.taobao.org/@angular/compiler-cli/download/@angular/compiler-cli-5.1.1.tgz#579e6846ed493e7202e36eb5cea00cb1a61c927c"
+ version "5.1.2"
+ resolved "http://registry.npm.taobao.org/@angular/compiler-cli/download/@angular/compiler-cli-5.1.2.tgz#70addc11b6528f087abe809f94acedecdfc9c8f6"
dependencies:
chokidar "^1.4.2"
minimist "^1.2.0"
@@ -119,48 +119,48 @@
tsickle "^0.25.5"
"@angular/compiler@^5.0.0":
- version "5.1.1"
- resolved "http://registry.npm.taobao.org/@angular/compiler/download/@angular/compiler-5.1.1.tgz#7d7953229739e68de74ea821685e1d5569527ef3"
+ version "5.1.2"
+ resolved "http://registry.npm.taobao.org/@angular/compiler/download/@angular/compiler-5.1.2.tgz#4dfd0dd7fab39a14a1a104097c2f6af470ddabdb"
dependencies:
tslib "^1.7.1"
"@angular/core@^5.0.0":
- version "5.1.1"
- resolved "http://registry.npm.taobao.org/@angular/core/download/@angular/core-5.1.1.tgz#b6a6e2b2284f86279f096d857253f6643098d908"
+ version "5.1.2"
+ resolved "http://registry.npm.taobao.org/@angular/core/download/@angular/core-5.1.2.tgz#751070c0f4e5a8c4e2170204e08eca06391b84b1"
dependencies:
tslib "^1.7.1"
"@angular/forms@^5.0.0":
- version "5.1.1"
- resolved "http://registry.npm.taobao.org/@angular/forms/download/@angular/forms-5.1.1.tgz#e38858a44e7b57b61f375087b76a79d6e2679b14"
+ version "5.1.2"
+ resolved "http://registry.npm.taobao.org/@angular/forms/download/@angular/forms-5.1.2.tgz#fae4934ccdd41443efdee49b754c8b2a5587b12c"
dependencies:
tslib "^1.7.1"
"@angular/http@^5.0.0":
- version "5.1.1"
- resolved "http://registry.npm.taobao.org/@angular/http/download/@angular/http-5.1.1.tgz#45aa61ee61f212a34f958c444c999e8c9352ec23"
+ version "5.1.2"
+ resolved "http://registry.npm.taobao.org/@angular/http/download/@angular/http-5.1.2.tgz#38edf3bec056e9c3456868799f4c0f83127c73b9"
dependencies:
tslib "^1.7.1"
"@angular/language-service@^5.0.0":
- version "5.1.1"
- resolved "http://registry.npm.taobao.org/@angular/language-service/download/@angular/language-service-5.1.1.tgz#731533a3b6ee4c8facda862a836db1930a011f07"
+ version "5.1.2"
+ resolved "http://registry.npm.taobao.org/@angular/language-service/download/@angular/language-service-5.1.2.tgz#0c0579c2feb7dd9afb2576e9b602779d45b30810"
"@angular/platform-browser-dynamic@^5.0.0":
- version "5.1.1"
- resolved "http://registry.npm.taobao.org/@angular/platform-browser-dynamic/download/@angular/platform-browser-dynamic-5.1.1.tgz#4b7bd1cbdb3c93fdeb626b38fbd54286a73a76d0"
+ version "5.1.2"
+ resolved "http://registry.npm.taobao.org/@angular/platform-browser-dynamic/download/@angular/platform-browser-dynamic-5.1.2.tgz#120d49ce16bcb91b8ac1c5e5c634fba592359ad7"
dependencies:
tslib "^1.7.1"
"@angular/platform-browser@^5.0.0":
- version "5.1.1"
- resolved "http://registry.npm.taobao.org/@angular/platform-browser/download/@angular/platform-browser-5.1.1.tgz#88a05132d822b760c9108a3eaf0da610f39c2ed9"
+ version "5.1.2"
+ resolved "http://registry.npm.taobao.org/@angular/platform-browser/download/@angular/platform-browser-5.1.2.tgz#6faf926b9b41b6d54d873f3dcc4f31ad35fd0c38"
dependencies:
tslib "^1.7.1"
"@angular/router@^5.0.0":
- version "5.1.1"
- resolved "http://registry.npm.taobao.org/@angular/router/download/@angular/router-5.1.1.tgz#378e69edd28edadaff7b09b6ee407aadf7164220"
+ version "5.1.2"
+ resolved "http://registry.npm.taobao.org/@angular/router/download/@angular/router-5.1.2.tgz#1da8845478ca340e9c4b3d9da1d1a8ee796fda18"
dependencies:
tslib "^1.7.1"
@@ -194,22 +194,22 @@
wolfy87-eventemitter "^5.1.0"
"@antv/g2-plugin-slider@^2.0.0":
- version "2.0.0"
- resolved "http://registry.npm.taobao.org/@antv/g2-plugin-slider/download/@antv/g2-plugin-slider-2.0.0.tgz#398ec3d8b869131041f878faf845e76a84baf954"
+ version "2.0.1"
+ resolved "http://registry.npm.taobao.org/@antv/g2-plugin-slider/download/@antv/g2-plugin-slider-2.0.1.tgz#45cf6da6f2050fabe64166a213674422afe4eebf"
"@antv/g2@^3.0.1":
- version "3.0.2"
- resolved "http://registry.npm.taobao.org/@antv/g2/download/@antv/g2-3.0.2.tgz#2deac4fa5d48e36838665175166a4812bf674e5e"
+ version "3.0.3"
+ resolved "http://registry.npm.taobao.org/@antv/g2/download/@antv/g2-3.0.3.tgz#ee59e1ded71b065d1e9ef3fe6d572fe5de07c069"
dependencies:
- "@antv/g" "~2.0.2"
+ "@antv/g" "~2.0.4"
fecha "~2.3.2"
gl-matrix "~2.4.0"
lodash "~4.17.4"
wolfy87-eventemitter "~5.2.4"
-"@antv/g@~2.0.2":
- version "2.0.3"
- resolved "http://registry.npm.taobao.org/@antv/g/download/@antv/g-2.0.3.tgz#32870c86ddbd7c9cd36a5bcfcde85328915d54bb"
+"@antv/g@~2.0.4":
+ version "2.0.4"
+ resolved "http://registry.npm.taobao.org/@antv/g/download/@antv/g-2.0.4.tgz#b637c641b4dd6092fc4d628aa604424d29faca0d"
dependencies:
d3-ease "^1.0.3"
d3-interpolate "^1.1.5"
@@ -238,9 +238,9 @@
version "1.1.0"
resolved "http://registry.npm.taobao.org/@ngtools/json-schema/download/@ngtools/json-schema-1.1.0.tgz#c3a0c544d62392acc2813a42c8a0dc6f58f86922"
-"@ngtools/webpack@1.9.1":
- version "1.9.1"
- resolved "http://registry.npm.taobao.org/@ngtools/webpack/download/@ngtools/webpack-1.9.1.tgz#c09db646432723f8f912412144313d4830b2eb4d"
+"@ngtools/webpack@1.9.3":
+ version "1.9.3"
+ resolved "http://registry.npm.taobao.org/@ngtools/webpack/download/@ngtools/webpack-1.9.3.tgz#353e27e6f21ab35467d17b67e3096dfc5d9bf80c"
dependencies:
chalk "~2.2.0"
enhanced-resolve "^3.1.0"
@@ -249,6 +249,7 @@
semver "^5.3.0"
source-map "^0.5.6"
tree-kill "^1.0.0"
+ webpack-sources "^1.1.0"
"@ngx-translate/core@^9.0.0":
version "9.0.2"
@@ -269,8 +270,8 @@
resolved "http://registry.npm.taobao.org/@schematics/schematics/download/@schematics/schematics-0.0.11.tgz#c8f70f270ed38f29b2873248126fd59abd635862"
"@types/jasmine@*":
- version "2.8.2"
- resolved "http://registry.npm.taobao.org/@types/jasmine/download/@types/jasmine-2.8.2.tgz#6ae4d8740c0da5d5a627df725b4eed71b8e36668"
+ version "2.8.3"
+ resolved "http://registry.npm.taobao.org/@types/jasmine/download/@types/jasmine-2.8.3.tgz#f910edc67d69393d562d10f8f3d205ea3f3306bf"
"@types/jasmine@~2.6.0":
version "2.6.3"
@@ -283,8 +284,8 @@
"@types/jasmine" "*"
"@types/node@^6.0.46", "@types/node@~6.0.60":
- version "6.0.94"
- resolved "http://registry.npm.taobao.org/@types/node/download/@types/node-6.0.94.tgz#70e509b07ed9f961c8f6f4a73a61d922be5029a7"
+ version "6.0.95"
+ resolved "http://registry.npm.taobao.org/@types/node/download/@types/node-6.0.95.tgz#0d027612a77c55b84497ff90a4a7d597e5ac0fab"
"@types/q@^0.0.32":
version "0.0.32"
@@ -331,8 +332,8 @@
resolved "http://registry.npm.taobao.org/acorn/download/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"
acorn@^5.0.0, acorn@^5.1.1:
- version "5.2.1"
- resolved "http://registry.npm.taobao.org/acorn/download/acorn-5.2.1.tgz#317ac7821826c22c702d66189ab8359675f135d7"
+ version "5.3.0"
+ resolved "http://registry.npm.taobao.org/acorn/download/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822"
adm-zip@0.4.4:
version "0.4.4"
@@ -706,7 +707,7 @@
dependencies:
babel-runtime "^6.22.0"
-babel-runtime@^6.22.0, babel-runtime@^6.26.0:
+babel-runtime@^6.22.0, babel-runtime@^6.26.0, babel-runtime@^6.6.1:
version "6.26.0"
resolved "http://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
dependencies:
@@ -828,7 +829,7 @@
dependencies:
minimist "^1.2.0"
-bluebird@^3.3.0, bluebird@^3.4.7, bluebird@^3.5.0:
+bluebird@^3.3.0, bluebird@^3.4.6, bluebird@^3.4.7, bluebird@^3.5.0:
version "3.5.1"
resolved "http://registry.npm.taobao.org/bluebird/download/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
@@ -969,11 +970,11 @@
electron-to-chromium "^1.2.7"
browserslist@^2.10.0:
- version "2.10.0"
- resolved "http://registry.npm.taobao.org/browserslist/download/browserslist-2.10.0.tgz#bac5ee1cc69ca9d96403ffb8a3abdc5b6aed6346"
+ version "2.10.1"
+ resolved "http://registry.npm.taobao.org/browserslist/download/browserslist-2.10.1.tgz#f9dc692b79004a78ec9ba0d012c54de44cc6d7e4"
dependencies:
- caniuse-lite "^1.0.30000780"
- electron-to-chromium "^1.3.28"
+ caniuse-lite "^1.0.30000784"
+ electron-to-chromium "^1.3.30"
buffer-crc32@^0.2.1:
version "0.2.13"
@@ -1080,7 +1081,7 @@
version "1.0.30000784"
resolved "http://registry.npm.taobao.org/caniuse-db/download/caniuse-db-1.0.30000784.tgz#1be95012d9489c7719074f81aee57dbdffe6361b"
-caniuse-lite@^1.0.30000780, caniuse-lite@^1.0.30000783:
+caniuse-lite@^1.0.30000783, caniuse-lite@^1.0.30000784:
version "1.0.30000784"
resolved "http://registry.npm.taobao.org/caniuse-lite/download/caniuse-lite-1.0.30000784.tgz#129ced74e9a1280a441880b6cd2bce30ef59e6c0"
@@ -1346,8 +1347,8 @@
resolved "http://registry.npm.taobao.org/commander/download/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555"
common-tags@^1.3.1:
- version "1.5.1"
- resolved "http://registry.npm.taobao.org/common-tags/download/common-tags-1.5.1.tgz#e2e39931a013cd02253defeed89a1ad615a27f07"
+ version "1.6.0"
+ resolved "http://registry.npm.taobao.org/common-tags/download/common-tags-1.6.0.tgz#788e4bcc582f16993e5b2c92f76b1ccb80731537"
dependencies:
babel-runtime "^6.26.0"
@@ -1469,8 +1470,8 @@
run-queue "^1.0.0"
copy-webpack-plugin@^4.1.1:
- version "4.3.0"
- resolved "http://registry.npm.taobao.org/copy-webpack-plugin/download/copy-webpack-plugin-4.3.0.tgz#cfdf4d131c78d66917a1bb863f86630497aacf42"
+ version "4.3.1"
+ resolved "http://registry.npm.taobao.org/copy-webpack-plugin/download/copy-webpack-plugin-4.3.1.tgz#19ba6370bf6f8e263cbd66185a2b79f2321a9302"
dependencies:
cacache "^10.0.1"
find-cache-dir "^1.0.0"
@@ -2110,9 +2111,15 @@
version "2.5.7"
resolved "http://registry.npm.taobao.org/ejs/download/ejs-2.5.7.tgz#cc872c168880ae3c7189762fd5ffc00896c9518a"
-electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.28:
- version "1.3.29"
- resolved "http://registry.npm.taobao.org/electron-to-chromium/download/electron-to-chromium-1.3.29.tgz#7a58236b95468c3e7660091348522d65d7736b36"
+electron-releases@^2.1.0:
+ version "2.1.0"
+ resolved "http://registry.npm.taobao.org/electron-releases/download/electron-releases-2.1.0.tgz#c5614bf811f176ce3c836e368a0625782341fd4e"
+
+electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30:
+ version "1.3.30"
+ resolved "http://registry.npm.taobao.org/electron-to-chromium/download/electron-to-chromium-1.3.30.tgz#9666f532a64586651fc56a72513692e820d06a80"
+ dependencies:
+ electron-releases "^2.1.0"
elegant-spinner@^1.0.1:
version "1.0.1"
@@ -3184,8 +3191,8 @@
resolved "http://registry.npm.taobao.org/html-entities/download/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f"
html-minifier@^3.2.3:
- version "3.5.7"
- resolved "http://registry.npm.taobao.org/html-minifier/download/html-minifier-3.5.7.tgz#511e69bb5a8e7677d1012ebe03819aa02ca06208"
+ version "3.5.8"
+ resolved "http://registry.npm.taobao.org/html-minifier/download/html-minifier-3.5.8.tgz#5ccdb1f73a0d654e6090147511f6e6b2ee312700"
dependencies:
camel-case "3.0.x"
clean-css "4.1.x"
@@ -3194,7 +3201,7 @@
ncname "1.0.x"
param-case "2.1.x"
relateurl "0.2.x"
- uglify-js "3.2.x"
+ uglify-js "3.3.x"
html-tags@^2.0.0:
version "2.0.0"
@@ -3672,7 +3679,7 @@
version "0.1.2"
resolved "http://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
-istanbul-api@^1.1.8:
+istanbul-api@^1.1.14:
version "1.2.1"
resolved "http://registry.npm.taobao.org/istanbul-api/download/istanbul-api-1.2.1.tgz#0c60a0515eb11c7d65c6b50bba2c6e999acd8620"
dependencies:
@@ -3903,10 +3910,10 @@
resolve "^1.1.6"
karma-coverage-istanbul-reporter@^1.3.0:
- version "1.3.0"
- resolved "http://registry.npm.taobao.org/karma-coverage-istanbul-reporter/download/karma-coverage-istanbul-reporter-1.3.0.tgz#d142cd9c55731c9e363ef7374e8ef1a31bebfadb"
+ version "1.3.3"
+ resolved "http://registry.npm.taobao.org/karma-coverage-istanbul-reporter/download/karma-coverage-istanbul-reporter-1.3.3.tgz#daf26051d5a0daa5838a4ce81aa4a41724bdf36b"
dependencies:
- istanbul-api "^1.1.8"
+ istanbul-api "^1.1.14"
minimatch "^3.0.4"
karma-jasmine-html-reporter@^0.2.2:
@@ -4050,6 +4057,15 @@
dependencies:
prelude-ls "~1.1.2"
type-check "~0.3.2"
+
+libphonenumber-js@^0.4.5:
+ version "0.4.48"
+ resolved "http://registry.npm.taobao.org/libphonenumber-js/download/libphonenumber-js-0.4.48.tgz#d2064ef7e71f24046abfe1a07351d4affa5c1a4a"
+ dependencies:
+ babel-runtime "^6.6.1"
+ bluebird "^3.4.6"
+ minimist "^1.2.0"
+ xml2js "^0.4.17"
license-webpack-plugin@^1.0.0:
version "1.1.1"
@@ -4391,8 +4407,8 @@
pify "^3.0.0"
make-error@^1.1.1:
- version "1.3.0"
- resolved "http://registry.npm.taobao.org/make-error/download/make-error-1.3.0.tgz#52ad3a339ccf10ce62b4040b708fe707244b8b96"
+ version "1.3.2"
+ resolved "http://registry.npm.taobao.org/make-error/download/make-error-1.3.2.tgz#8762ffad2444dd8ff1f7c819629fa28e24fea1c4"
map-obj@^1.0.0, map-obj@^1.0.1:
version "1.0.1"
@@ -4687,8 +4703,8 @@
resolved "http://registry.npm.taobao.org/ng-zorro-antd-extra/download/ng-zorro-antd-extra-1.1.6.tgz#b69ba30603843ffd6ded09a46dd2038542251e40"
ng-zorro-antd@^0.6.5:
- version "0.6.7"
- resolved "http://registry.npm.taobao.org/ng-zorro-antd/download/ng-zorro-antd-0.6.7.tgz#7cbeab6258edca2c0c67a98eb93a226c41409a5f"
+ version "0.6.8"
+ resolved "http://registry.npm.taobao.org/ng-zorro-antd/download/ng-zorro-antd-0.6.8.tgz#68c360710408dca6b097a6b27b22c5061f60fae2"
dependencies:
"@angular/cdk" "^5.0.0"
moment "^2.18.1"
@@ -4706,13 +4722,19 @@
version "0.9.0"
resolved "http://registry.npm.taobao.org/ng2-img-cropper/download/ng2-img-cropper-0.9.0.tgz#305337e669c4e5adc876d628dcae0bca4d10d1c3"
+ng2-validation@^4.2.0:
+ version "4.2.0"
+ resolved "http://registry.npm.taobao.org/ng2-validation/download/ng2-validation-4.2.0.tgz#f38d441d3fb7e862155166480045aaff9ad11dbb"
+ dependencies:
+ libphonenumber-js "^0.4.5"
+
ngx-color-picker@^5.0.0:
- version "5.2.0"
- resolved "http://registry.npm.taobao.org/ngx-color-picker/download/ngx-color-picker-5.2.0.tgz#8433933ed785e0e5d328555774b20c23e3498606"
+ version "5.3.0"
+ resolved "http://registry.npm.taobao.org/ngx-color-picker/download/ngx-color-picker-5.3.0.tgz#49d64ecd391e39429b8d1dbc8701f18a4efffd3e"
ngx-countdown@^2.0.0:
- version "2.0.2"
- resolved "http://registry.npm.taobao.org/ngx-countdown/download/ngx-countdown-2.0.2.tgz#faaf74e5d96709062f7fb035f105b5f8f76be92d"
+ version "2.0.4"
+ resolved "http://registry.npm.taobao.org/ngx-countdown/download/ngx-countdown-2.0.4.tgz#b0c0266da4aa24efc057f99f2e19a03142133cc0"
no-case@^2.2.0:
version "2.3.2"
@@ -5634,12 +5656,12 @@
supports-color "^3.2.3"
postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.13, postcss@^6.0.14, postcss@^6.0.3, postcss@^6.0.6, postcss@^6.0.8:
- version "6.0.14"
- resolved "http://registry.npm.taobao.org/postcss/download/postcss-6.0.14.tgz#5534c72114739e75d0afcf017db853099f562885"
+ version "6.0.15"
+ resolved "http://registry.npm.taobao.org/postcss/download/postcss-6.0.15.tgz#f460cd6269fede0d1bf6defff0b934a9845d974d"
dependencies:
chalk "^2.3.0"
source-map "^0.6.1"
- supports-color "^4.4.0"
+ supports-color "^5.1.0"
prelude-ls@~1.1.2:
version "1.1.2"
@@ -6280,13 +6302,7 @@
version "1.3.3"
resolved "http://registry.npm.taobao.org/rw/download/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4"
-rxjs@^5.4.2, rxjs@^5.5.2:
- version "5.5.5"
- resolved "http://registry.npm.taobao.org/rxjs/download/rxjs-5.5.5.tgz#e164f11d38eaf29f56f08c3447f74ff02dd84e97"
- dependencies:
- symbol-observable "1.0.1"
-
-rxjs@^5.5.5:
+rxjs@^5.4.2, rxjs@^5.5.2, rxjs@^5.5.5:
version "5.5.6"
resolved "http://registry.npm.taobao.org/rxjs/download/rxjs-5.5.6.tgz#e31fb96d6fd2ff1fd84bcea8ae9c02d007179c02"
dependencies:
@@ -7013,9 +7029,15 @@
dependencies:
has-flag "^1.0.0"
-supports-color@^4.0.0, supports-color@^4.2.1, supports-color@^4.4.0:
+supports-color@^4.0.0, supports-color@^4.2.1:
version "4.5.0"
resolved "http://registry.npm.taobao.org/supports-color/download/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b"
+ dependencies:
+ has-flag "^2.0.0"
+
+supports-color@^5.1.0:
+ version "5.1.0"
+ resolved "http://registry.npm.taobao.org/supports-color/download/supports-color-5.1.0.tgz#058a021d1b619f7ddf3980d712ea3590ce7de3d5"
dependencies:
has-flag "^2.0.0"
@@ -7036,8 +7058,8 @@
whet.extend "~0.9.9"
sweetalert2@^7.0.0:
- version "7.1.2"
- resolved "http://registry.npm.taobao.org/sweetalert2/download/sweetalert2-7.1.2.tgz#07b4c816e4ca1294f379a45cc810f4c6618e473b"
+ version "7.3.1"
+ resolved "http://registry.npm.taobao.org/sweetalert2/download/sweetalert2-7.3.1.tgz#ea44f0affdb6e3ee58e649f13e8bbb0604c0bb8f"
symbol-observable@1.0.1:
version "1.0.1"
@@ -7243,7 +7265,7 @@
source-map "^0.5.6"
source-map-support "^0.4.2"
-tslib@^1.7.1, tslib@^1.8.0:
+tslib@^1.7.1, tslib@^1.8.1:
version "1.8.1"
resolved "http://registry.npm.taobao.org/tslib/download/tslib-1.8.1.tgz#6946af2d1d651a7b1863b531d6e5afa41aa44eac"
@@ -7263,10 +7285,10 @@
tsutils "^2.8.1"
tsutils@^2.8.1:
- version "2.13.1"
- resolved "http://registry.npm.taobao.org/tsutils/download/tsutils-2.13.1.tgz#d6d1cc0f7c04cf9fb3b28a292973cffb9cfbe09a"
+ version "2.15.0"
+ resolved "http://registry.npm.taobao.org/tsutils/download/tsutils-2.15.0.tgz#90831e5908cca10b28cdaf83a56dcf8156aed7c6"
dependencies:
- tslib "^1.8.0"
+ tslib "^1.8.1"
tty-browserify@0.0.0:
version "0.0.0"
@@ -7303,24 +7325,20 @@
version "0.0.6"
resolved "http://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
-typescript@~2.5.0:
- version "2.5.3"
- resolved "http://registry.npm.taobao.org/typescript/download/typescript-2.5.3.tgz#df3dcdc38f3beb800d4bc322646b04a3f6ca7f0d"
-
-typescript@~2.6.1:
+typescript@^2.6.2, typescript@~2.6.1:
version "2.6.2"
resolved "http://registry.npm.taobao.org/typescript/download/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4"
-uglify-es@^3.2.1:
+uglify-es@3.2.2:
version "3.2.2"
resolved "http://registry.npm.taobao.org/uglify-es/download/uglify-es-3.2.2.tgz#15c62b7775002c81b7987a1c49ecd3f126cace73"
dependencies:
commander "~2.12.1"
source-map "~0.6.1"
-uglify-js@3.2.x:
- version "3.2.2"
- resolved "http://registry.npm.taobao.org/uglify-js/download/uglify-js-3.2.2.tgz#870e4b34ed733d179284f9998efd3293f7fd73f6"
+uglify-js@3.3.x:
+ version "3.3.4"
+ resolved "http://registry.npm.taobao.org/uglify-js/download/uglify-js-3.3.4.tgz#d8ebb76f201a3798ac2f0b6519642fcca4a99834"
dependencies:
commander "~2.12.1"
source-map "~0.6.1"
@@ -7346,16 +7364,16 @@
uglify-js "^2.8.29"
webpack-sources "^1.0.1"
-uglifyjs-webpack-plugin@~1.1.2:
- version "1.1.4"
- resolved "http://registry.npm.taobao.org/uglifyjs-webpack-plugin/download/uglifyjs-webpack-plugin-1.1.4.tgz#e43ad6e736c315024eb99481a7cc9362d6a066be"
+uglifyjs-webpack-plugin@^1.1.5:
+ version "1.1.5"
+ resolved "http://registry.npm.taobao.org/uglifyjs-webpack-plugin/download/uglifyjs-webpack-plugin-1.1.5.tgz#5ec4a16da0fd10c96538f715caed10dbdb180875"
dependencies:
cacache "^10.0.0"
find-cache-dir "^1.0.0"
schema-utils "^0.3.0"
serialize-javascript "^1.4.0"
source-map "^0.6.1"
- uglify-es "^3.2.1"
+ uglify-es "3.2.2"
webpack-sources "^1.0.1"
worker-farm "^1.4.1"
@@ -7740,7 +7758,7 @@
dependencies:
lodash "^4.17.4"
-webpack-sources@^1.0.0, webpack-sources@^1.0.1:
+webpack-sources@^1.0.0, webpack-sources@^1.0.1, webpack-sources@^1.1.0:
version "1.1.0"
resolved "http://registry.npm.taobao.org/webpack-sources/download/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54"
dependencies:
@@ -8040,5 +8058,5 @@
readable-stream "^2.0.0"
zone.js@^0.8.14, zone.js@^0.8.18:
- version "0.8.18"
- resolved "http://registry.npm.taobao.org/zone.js/download/zone.js-0.8.18.tgz#8cecb3977fcd1b3090562ff4570e2847e752b48d"
+ version "0.8.19"
+ resolved "http://registry.npm.taobao.org/zone.js/download/zone.js-0.8.19.tgz#a4b522cd9e8b7b616a638c297d720d4c7f292f71"
--
Gitblit v1.8.0