2 files added
	
		
		8 files modified
	
	
 
	
	
	
	
	
	
	
	
|  |  |  | 
|---|
|  |  |  | "@delon/abc": "0.6.1", | 
|---|
|  |  |  | "@delon/acl": "0.6.1", | 
|---|
|  |  |  | "@delon/auth": "0.6.1", | 
|---|
|  |  |  | "@delon/theme": "0.6.1", | 
|---|
|  |  |  | "@delon/cache": "0.6.1", | 
|---|
|  |  |  | "@delon/theme": "0.6.1", | 
|---|
|  |  |  | "@ngx-translate/core": "^9.0.0", | 
|---|
|  |  |  | "@ngx-translate/http-loader": "^2.0.0", | 
|---|
|  |  |  | "angular2-baidu-map": "^4.1.0", | 
|---|
|  |  |  | "angular-qq-maps": "^1.0.1", | 
|---|
|  |  |  | "angular-split": "^1.0.0-rc.0", | 
|---|
|  |  |  | "angular-tree-component": "^7.0.1", | 
|---|
|  |  |  | "angular2-baidu-map": "^4.1.0", | 
|---|
|  |  |  | "core-js": "^2.5.1", | 
|---|
|  |  |  | "echarts": "^3.8.5", | 
|---|
|  |  |  | "file-saver": "^1.3.3", | 
|---|
|  |  |  | 
|---|
|  |  |  | "@types/jszip": "^3.1.2", | 
|---|
|  |  |  | "@types/mockjs": "^1.0.0", | 
|---|
|  |  |  | "@types/node": "~6.0.60", | 
|---|
|  |  |  | "angular2-cookie": "^1.2.6", | 
|---|
|  |  |  | "codecov": "^3.0.0", | 
|---|
|  |  |  | "codelyzer": "~4.0.1", | 
|---|
|  |  |  | "jasmine-core": "~2.8.0", | 
|---|
|  |  |  | 
|---|
|  |  |  | import { NgModule } from '@angular/core'; | 
|---|
|  |  |  | import { CommonModule } from '@angular/common'; | 
|---|
|  |  |  | import { HttpModule } from '@angular/http'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // Statics | 
|---|
|  |  |  | import 'rxjs/add/observable/throw'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @NgModule({ | 
|---|
|  |  |  | imports: [ | 
|---|
|  |  |  | CommonModule, | 
|---|
|  |  |  | HttpModule | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | export class BusinessModule { } | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="head"> | 
|---|
|  |  |  | <a [routerLink]="['/']"> | 
|---|
|  |  |  | <img class="logo" src="./assets/img/logo-color.svg"> | 
|---|
|  |  |  | <span class="title">ng-alain</span> | 
|---|
|  |  |  | <span class="title">大气监测系统管理后台</span> | 
|---|
|  |  |  | </a> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <p class="desc"></p> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <router-outlet></router-outlet> | 
|---|
|  |  |  | <global-footer [links]="links"> | 
|---|
|  |  |  | <global-footer> | 
|---|
|  |  |  | <ng-template #copyright> | 
|---|
|  |  |  | Copyright <nz-icon nzType="copyright"></nz-icon> 2017 <a href="//github.com/cipchk" target="_blank">卡色</a>出品 | 
|---|
|  |  |  | Copyright <nz-icon nzType="copyright"></nz-icon> 2018 <a href="http://www.7drlb.com/" target="_blank">七星博士</a>出品 | 
|---|
|  |  |  | </ng-template> | 
|---|
|  |  |  | </global-footer> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .title { | 
|---|
|  |  |  | font-size: 33px; | 
|---|
|  |  |  | font-size: 28px; | 
|---|
|  |  |  | color: @heading-color; | 
|---|
|  |  |  | font-family: "Myriad Pro", "Helvetica Neue", Arial, Helvetica, sans-serif; | 
|---|
|  |  |  | font-weight: 600; | 
|---|
|  |  |  | 
|---|
|  |  |  | import { NzMessageService } from 'ng-zorro-antd'; | 
|---|
|  |  |  | import { SocialService, SocialOpenType, ITokenService, DA_SERVICE_TOKEN } from '@delon/auth'; | 
|---|
|  |  |  | import { environment } from '@env/environment'; | 
|---|
|  |  |  | import { CookieService } from 'angular2-cookie/services/cookies.service'; | 
|---|
|  |  |  | @Component({ | 
|---|
|  |  |  | selector: 'passport-login', | 
|---|
|  |  |  | templateUrl: './login.component.html', | 
|---|
|  |  |  | styleUrls: [ './login.component.less' ], | 
|---|
|  |  |  | providers: [ SocialService] | 
|---|
|  |  |  | providers: [ SocialService,CookieService] | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | export class UserLoginComponent implements OnDestroy { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | private settingsService: SettingsService, | 
|---|
|  |  |  | private socialService: SocialService, | 
|---|
|  |  |  | private loginService:LoginService, | 
|---|
|  |  |  | private _cookieService:CookieService, | 
|---|
|  |  |  | @Inject(DA_SERVICE_TOKEN) private tokenService: ITokenService) { | 
|---|
|  |  |  | this.form = fb.group({ | 
|---|
|  |  |  | userName: [null, [Validators.required, Validators.minLength(5)]], | 
|---|
|  |  |  | 
|---|
|  |  |  | captcha: [null, [Validators.required]], | 
|---|
|  |  |  | remember: [true] | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | let nowTime = new Date(); | 
|---|
|  |  |  | nowTime.setDate(nowTime.getDate()+1); | 
|---|
|  |  |  | this._cookieService.put('test','test',{expires:nowTime}); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // region: fields | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | (err) => { | 
|---|
|  |  |  | console.log(err); | 
|---|
|  |  |  | // console.log(err); | 
|---|
|  |  |  | if(err instanceof ProgressEvent){ | 
|---|
|  |  |  | const error = <ProgressEvent>err; | 
|---|
|  |  |  | let xmlHttp = error.target; | 
|---|
|  |  |  | 
|---|
|  |  |  | import { ResultBean } from '@business/entity/grid'; | 
|---|
|  |  |  | import { Subject } from 'rxjs/Subject'; | 
|---|
|  |  |  | import {NzModalSubject, NzMessageService} from 'ng-zorro-antd'; | 
|---|
|  |  |  | import {Component, OnInit} from '@angular/core'; | 
|---|
|  |  |  | import {ModalHelper} from '@delon/theme'; | 
|---|
|  |  |  | import {HttpClient} from '@angular/common/http'; | 
|---|
|  |  |  | import {HttpClient, HttpResponse} from '@angular/common/http'; | 
|---|
|  |  |  | import {environment} from 'environments/environment'; | 
|---|
|  |  |  | import {DateService} from '@business/services/util/date.service'; | 
|---|
|  |  |  | import {FormGroup, FormBuilder, FormControl, Validators} from '@angular/forms'; | 
|---|
|  |  |  | import { catchError } from 'rxjs/operators'; | 
|---|
|  |  |  | import { ErrorObservable } from 'rxjs/observable/ErrorObservable'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Component({ | 
|---|
|  |  |  | selector: 'app-edit', | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | user: any; | 
|---|
|  |  |  | public validateForm: FormGroup; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | constructor( | 
|---|
|  |  |  | private modalHelper: ModalHelper, | 
|---|
|  |  |  | constructor( | 
|---|
|  |  |  | private subject: NzModalSubject, | 
|---|
|  |  |  | public dateSrv: DateService, | 
|---|
|  |  |  | public msgSrv: NzMessageService, | 
|---|
|  |  |  | public http: HttpClient, | 
|---|
|  |  |  | private formBuilder: FormBuilder | 
|---|
|  |  |  | private formBuilder: FormBuilder, | 
|---|
|  |  |  | ) {} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ngOnInit() { | 
|---|
|  |  |  | 
|---|
|  |  |  | expireTime: [user.expireTime], | 
|---|
|  |  |  | id: [user.id] | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | const mobileControl = this.validateForm.get('mobile'); | 
|---|
|  |  |  | mobileControl.valueChanges.filter(val => { | 
|---|
|  |  |  | return val != null && val.trim() != ''; | 
|---|
|  |  |  | }).debounceTime(900).distinctUntilChanged().subscribe( value => { | 
|---|
|  |  |  | if(mobileControl.errors==null){ | 
|---|
|  |  |  | mobileControl.setErrors({unique:true}) | 
|---|
|  |  |  | this.http.get(environment.SERVER_BASH_URL + '/operateUser/unique-mobile?mobile='+value) | 
|---|
|  |  |  | .pipe( | 
|---|
|  |  |  | catchError(() => { | 
|---|
|  |  |  | const req = <XMLHttpRequest>event.target; | 
|---|
|  |  |  | if(req.status==401){ | 
|---|
|  |  |  | this.subject.destroy(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 以错误的形式结束本次请求 | 
|---|
|  |  |  | return ErrorObservable.create(event); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | .subscribe( | 
|---|
|  |  |  | (value:ResultBean<boolean>) => { | 
|---|
|  |  |  | if(value.code == 1 && value.data){ | 
|---|
|  |  |  | this.validateForm.get('mobile').setErrors(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | save() { | 
|---|
|  |  |  | 
|---|
|  |  |  | import {ModalHelper} from '@delon/theme'; | 
|---|
|  |  |  | import {HttpClient} from '@angular/common/http'; | 
|---|
|  |  |  | import {UserInstallerEditComponent} from './edit/edit.component'; | 
|---|
|  |  |  | import {environment} from '../../../../environments/environment'; | 
|---|
|  |  |  | import {environment} from  'environments/environment'; | 
|---|
|  |  |  | import {DateService} from '@business/services/util/date.service'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Component({ | 
|---|
|  |  |  | 
|---|
|  |  |  | version "4.0.13" | 
|---|
|  |  |  | resolved "http://registry.npm.taobao.org/acorn/download/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | acorn@^5.0.0, acorn@^5.1.1: | 
|---|
|  |  |  | acorn@^5.0.0: | 
|---|
|  |  |  | version "5.3.0" | 
|---|
|  |  |  | resolved "http://registry.npm.taobao.org/acorn/download/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | acorn@^5.3.0: | 
|---|
|  |  |  | version "5.4.1" | 
|---|
|  |  |  | resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.4.1.tgz#fdc58d9d17f4a4e98d102ded826a9b9759125102" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | adler-32@~1.1.0: | 
|---|
|  |  |  | version "1.1.0" | 
|---|
|  |  |  | 
|---|
|  |  |  | angular2-baidu-map@^4.1.0: | 
|---|
|  |  |  | version "4.1.0" | 
|---|
|  |  |  | resolved "https://registry.yarnpkg.com/angular2-baidu-map/-/angular2-baidu-map-4.1.0.tgz#9992840349a78e3d3c3eaf3b3857fd85e59ccb32" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | angular2-cookie@^1.2.6: | 
|---|
|  |  |  | version "1.2.6" | 
|---|
|  |  |  | resolved "https://registry.yarnpkg.com/angular2-cookie/-/angular2-cookie-1.2.6.tgz#8fa845531e777adb042fe2f339c0040f6ddbf09d" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ansi-escapes@^1.0.0: | 
|---|
|  |  |  | version "1.4.0" | 
|---|
|  |  |  | 
|---|
|  |  |  | dependencies: | 
|---|
|  |  |  | callsite "1.0.0" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | bfj-node4@^5.2.0: | 
|---|
|  |  |  | version "5.2.0" | 
|---|
|  |  |  | resolved "https://registry.yarnpkg.com/bfj-node4/-/bfj-node4-5.2.0.tgz#bd08350353f81d808d6a8352a15f5d9fb74ddec6" | 
|---|
|  |  |  | dependencies: | 
|---|
|  |  |  | bluebird "^3.5.1" | 
|---|
|  |  |  | check-types "^7.3.0" | 
|---|
|  |  |  | tryer "^1.0.0" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | big.js@^3.1.3: | 
|---|
|  |  |  | version "3.2.0" | 
|---|
|  |  |  | resolved "http://registry.npm.taobao.org/big.js/download/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" | 
|---|
|  |  |  | 
|---|
|  |  |  | dependencies: | 
|---|
|  |  |  | minimist "^1.2.0" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | bluebird@^3.3.0, bluebird@^3.4.7, bluebird@^3.5.0: | 
|---|
|  |  |  | bluebird@^3.3.0, bluebird@^3.4.7, bluebird@^3.5.0, bluebird@^3.5.1: | 
|---|
|  |  |  | version "3.5.1" | 
|---|
|  |  |  | resolved "http://registry.npm.taobao.org/bluebird/download/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | version "1.1.1" | 
|---|
|  |  |  | resolved "http://registry.npm.taobao.org/character-reference-invalid/download/character-reference-invalid-1.1.1.tgz#942835f750e4ec61a308e60c2ef8cc1011202efc" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | check-types@^7.3.0: | 
|---|
|  |  |  | version "7.3.0" | 
|---|
|  |  |  | resolved "https://registry.yarnpkg.com/check-types/-/check-types-7.3.0.tgz#468f571a4435c24248f5fd0cb0e8d87c3c341e7d" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | chokidar@^1.4.1, chokidar@^1.4.2, chokidar@^1.6.0, chokidar@^1.7.0: | 
|---|
|  |  |  | version "1.7.0" | 
|---|
|  |  |  | resolved "http://registry.npm.taobao.org/chokidar/download/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" | 
|---|
|  |  |  | 
|---|
|  |  |  | commander@*, commander@2, commander@2.12.x, commander@^2.11.0, commander@^2.12.1, commander@^2.9.0, commander@~2.12.1: | 
|---|
|  |  |  | version "2.12.2" | 
|---|
|  |  |  | resolved "http://registry.npm.taobao.org/commander/download/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | commander@^2.13.0: | 
|---|
|  |  |  | version "2.14.1" | 
|---|
|  |  |  | resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | commander@~2.11.0: | 
|---|
|  |  |  | version "2.11.0" | 
|---|
|  |  |  | 
|---|
|  |  |  | version "1.1.1" | 
|---|
|  |  |  | resolved "http://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ejs@^2.5.6, ejs@^2.5.7: | 
|---|
|  |  |  | ejs@^2.5.7: | 
|---|
|  |  |  | version "2.5.7" | 
|---|
|  |  |  | resolved "http://registry.npm.taobao.org/ejs/download/ejs-2.5.7.tgz#cc872c168880ae3c7189762fd5ffc00896c9518a" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | loader-utils "^1.0.2" | 
|---|
|  |  |  | source-map "0.5.x" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | express@^4.15.2, express@^4.16.2: | 
|---|
|  |  |  | express@^4.16.2: | 
|---|
|  |  |  | version "4.16.2" | 
|---|
|  |  |  | resolved "http://registry.npm.taobao.org/express/download/express-4.16.2.tgz#e35c6dfe2d64b7dca0a5cd4f21781be3299e076c" | 
|---|
|  |  |  | dependencies: | 
|---|
|  |  |  | 
|---|
|  |  |  | glob "^7.0.3" | 
|---|
|  |  |  | minimatch "^3.0.3" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | filesize@^3.5.9: | 
|---|
|  |  |  | version "3.5.11" | 
|---|
|  |  |  | resolved "http://registry.npm.taobao.org/filesize/download/filesize-3.5.11.tgz#1919326749433bb3cf77368bd158caabcc19e9ee" | 
|---|
|  |  |  | filesize@^3.5.11: | 
|---|
|  |  |  | version "3.6.0" | 
|---|
|  |  |  | resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.0.tgz#22d079615624bb6fd3c04026120628a41b3f4efa" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | fill-range@^2.1.0: | 
|---|
|  |  |  | version "2.2.3" | 
|---|
|  |  |  | 
|---|
|  |  |  | dependencies: | 
|---|
|  |  |  | glogg "^1.0.0" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | gzip-size@^3.0.0: | 
|---|
|  |  |  | version "3.0.0" | 
|---|
|  |  |  | resolved "http://registry.npm.taobao.org/gzip-size/download/gzip-size-3.0.0.tgz#546188e9bdc337f673772f81660464b389dce520" | 
|---|
|  |  |  | gzip-size@^4.1.0: | 
|---|
|  |  |  | version "4.1.0" | 
|---|
|  |  |  | resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-4.1.0.tgz#8ae096257eabe7d69c45be2b67c448124ffb517c" | 
|---|
|  |  |  | dependencies: | 
|---|
|  |  |  | duplexer "^0.1.1" | 
|---|
|  |  |  | pify "^3.0.0" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | handle-thing@^1.2.5: | 
|---|
|  |  |  | version "1.2.5" | 
|---|
|  |  |  | 
|---|
|  |  |  | dependencies: | 
|---|
|  |  |  | glob "^6.0.4" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | tryer@^1.0.0: | 
|---|
|  |  |  | version "1.0.0" | 
|---|
|  |  |  | resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.0.tgz#027b69fa823225e551cace3ef03b11f6ab37c1d7" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ts-node@~3.2.0: | 
|---|
|  |  |  | version "3.2.2" | 
|---|
|  |  |  | resolved "http://registry.npm.taobao.org/ts-node/download/ts-node-3.2.2.tgz#bbd28e38af4aaa3e96076c466e1b220197c1a3ce" | 
|---|
|  |  |  | 
|---|
|  |  |  | semver "^5.3.0" | 
|---|
|  |  |  | xml2js "^0.4.17" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | webpack-bundle-analyzer@^2.9.2: | 
|---|
|  |  |  | version "2.9.2" | 
|---|
|  |  |  | resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.9.2.tgz#63ed86eb71cc4cda86f68e685a84530ba0126449" | 
|---|
|  |  |  | webpack-bundle-analyzer@^2.9.0: | 
|---|
|  |  |  | version "2.10.0" | 
|---|
|  |  |  | resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.10.0.tgz#d0646cda342939f6f05eb632a090abbd90317446" | 
|---|
|  |  |  | dependencies: | 
|---|
|  |  |  | acorn "^5.1.1" | 
|---|
|  |  |  | chalk "^1.1.3" | 
|---|
|  |  |  | commander "^2.9.0" | 
|---|
|  |  |  | ejs "^2.5.6" | 
|---|
|  |  |  | express "^4.15.2" | 
|---|
|  |  |  | filesize "^3.5.9" | 
|---|
|  |  |  | gzip-size "^3.0.0" | 
|---|
|  |  |  | acorn "^5.3.0" | 
|---|
|  |  |  | bfj-node4 "^5.2.0" | 
|---|
|  |  |  | chalk "^2.3.0" | 
|---|
|  |  |  | commander "^2.13.0" | 
|---|
|  |  |  | ejs "^2.5.7" | 
|---|
|  |  |  | express "^4.16.2" | 
|---|
|  |  |  | filesize "^3.5.11" | 
|---|
|  |  |  | gzip-size "^4.1.0" | 
|---|
|  |  |  | lodash "^4.17.4" | 
|---|
|  |  |  | mkdirp "^0.5.1" | 
|---|
|  |  |  | opener "^1.4.3" | 
|---|