From 3bbe9a88d9ab747ee2e4f01128547efd1fc20038 Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Mon, 29 Jan 2018 16:27:17 +0800 Subject: [PATCH] 编译精简完成 --- src/app/delon.module.ts | 10 +---- src/app/routes/map/coordinates-picker/coordinates-picker.component.html | 2 src/app/routes/systems/organization/organization.component.ts | 2 src/app/routes/users/installer/edit/edit.component.ts | 2 src/app/routes/systems/account/account.component.ts | 2 src/app/routes/systems/organization/organization-list/organization-list.component.html | 4 +- src/app/routes/users/alarm-user/alarm-user.component.html | 2 .angular-cli.json | 2 src/app/routes/systems/account/account-edit/account-edit.component.html | 2 src/app/routes/map/coordinates-picker/coordinates-picker.component.ts | 2 + src/app/routes/devices/basic-info/device-edit/device-edit.component.ts | 8 ++-- /dev/null | 4 -- src/app/routes/systems/organization/organization-config/organization-config.component.ts | 6 +- src/app/routes/users/alarm-user/alarm-user-edit/alarm-user-edit.component.html | 2 src/app/routes/devices/version/version.component.html | 2 src/app/routes/users/installer/edit/edit.component.html | 2 yarn.lock | 14 +++++-- src/environments/environment.prod.ts | 2 src/app/routes/devices/version/version-sensor-config/version-sensor-config.component.html | 2 package.json | 1 src/app/routes/devices/basic-info/basic-info.component.html | 2 src/app/routes/devices/monitor-point/monitor-point.component.html | 2 src/app/routes/sensors/basic-info/basic-info.component.html | 4 +- 23 files changed, 39 insertions(+), 42 deletions(-) diff --git a/.angular-cli.json b/.angular-cli.json index 71940fd..c11dab3 100644 --- a/.angular-cli.json +++ b/.angular-cli.json @@ -23,7 +23,7 @@ "scripts": [ "../node_modules/@antv/g2/dist/g2.min.js", "../node_modules/@antv/data-set/dist/data-set.min.js", - "../node_modules/@antv/g2-plugin-slider/dist/g-2.0.0.min.js" + "../node_modules/@antv/g2-plugin-slider/dist/g2-plugin-slider.min.js" ], "environmentSource": "environments/environment.ts", "environments": { diff --git a/_mock/README.md b/_mock/README.md deleted file mode 100644 index ac06b06..0000000 --- a/_mock/README.md +++ /dev/null @@ -1 +0,0 @@ -[Document](http://ng-alain.com/docs/mock) diff --git a/_mock/_api.ts b/_mock/_api.ts deleted file mode 100644 index 04b577c..0000000 --- a/_mock/_api.ts +++ /dev/null @@ -1,271 +0,0 @@ -import { MockRequest } from '@delon/mock'; -// region: mock data - -const titles = [ - 'Alipay', - 'Angular', - 'Ant Design', - 'Ant Design Pro', - 'Bootstrap', - 'React', - 'Vue', - 'Webpack' -]; - -const avatars = [ - 'https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png', // Alipay - 'https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png', // Angular - 'https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png', // Ant Design - 'https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png', // Ant Design Pro - 'https://gw.alipayobjects.com/zos/rmsportal/siCrBXXhmvTQGWPNLBow.png', // Bootstrap - 'https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png', // React - 'https://gw.alipayobjects.com/zos/rmsportal/ComBAopevLwENQdKWiIn.png', // Vue - 'https://gw.alipayobjects.com/zos/rmsportal/nxkuOJlFJuAUhzlMTCEe.png' // Webpack -]; -const covers = [ - 'https://gw.alipayobjects.com/zos/rmsportal/HrxcVbrKnCJOZvtzSqjN.png', - 'https://gw.alipayobjects.com/zos/rmsportal/alaPpKWajEbIYEUvvVNf.png', - 'https://gw.alipayobjects.com/zos/rmsportal/RLwlKSYGSXGHuWSojyvp.png', - 'https://gw.alipayobjects.com/zos/rmsportal/gLaIAoVWTtLbBWZNYEMg.png' -]; -const desc = [ - '������������������������������ ���������������������������������������', - '���������������������������������������������������������������������������', - '������������������������������������������������������', - '������������������������������������������������������������������', - '���������������������������������������������������������������������' -]; - -const user = [ - '������', - 'cipchk', - '���������', - '���������', - '���������', - '���������', - '���������', - '���������', - '������', - '������', - '���������', - '������' -]; - -// endregion - -function getFakeList(count: number = 20): any[] { - const list = []; - for (let i = 0; i < count; i += 1) { - list.push({ - id: `fake-list-${i}`, - owner: user[i % 10], - title: titles[i % 8], - avatar: avatars[i % 8], - cover: parseInt((i / 4).toString(), 10) % 2 === 0 ? covers[i % 4] : covers[3 - (i % 4)], - status: ['active', 'exception', 'normal'][i % 3], - percent: Math.ceil(Math.random() * 50) + 50, - logo: avatars[i % 8], - href: 'https://ant.design', - updatedAt: new Date(new Date().getTime() - (1000 * 60 * 60 * 2 * i)), - createdAt: new Date(new Date().getTime() - (1000 * 60 * 60 * 2 * i)), - subDescription: desc[i % 5], - description: '���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������', - activeUser: Math.ceil(Math.random() * 100000) + 100000, - newUser: Math.ceil(Math.random() * 1000) + 1000, - star: Math.ceil(Math.random() * 100) + 100, - like: Math.ceil(Math.random() * 100) + 100, - message: Math.ceil(Math.random() * 10) + 10, - content: '��������������������������������������� ant.design��������������������������������������������������������������������������������������������������������������������������������������� ant.design���������������������������������������������������������������������������������������������������������������', - members: [ - { - avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png', - name: '���������', - }, - { - avatar: 'https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png', - name: '���������', - }, - { - avatar: 'https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png', - name: '���������', - }, - ] - }); - } - - return list; -} - -function getNotice(): any[] { - return [ - { - id: 'xxx1', - title: titles[0], - logo: avatars[0], - description: '������������������������������ ���������������������������������������', - updatedAt: new Date(), - member: '���������������', - href: '', - memberLink: '', - }, - { - id: 'xxx2', - title: titles[1], - logo: avatars[1], - description: '���������������������������������������������������������������������������', - updatedAt: new Date('2017-07-24'), - member: '���������������������', - href: '', - memberLink: '', - }, - { - id: 'xxx3', - title: titles[2], - logo: avatars[2], - description: '������������������������������������������������������������������', - updatedAt: new Date(), - member: '���������������', - href: '', - memberLink: '', - }, - { - id: 'xxx4', - title: titles[3], - logo: avatars[3], - description: '���������������������������������������������������������������������', - updatedAt: new Date('2017-07-23'), - member: '���������������', - href: '', - memberLink: '', - }, - { - id: 'xxx5', - title: titles[4], - logo: avatars[4], - description: '������������', - updatedAt: new Date('2017-07-23'), - member: '���������������������', - href: '', - memberLink: '', - }, - { - id: 'xxx6', - title: titles[5], - logo: avatars[5], - description: '������������������������������������������������������', - updatedAt: new Date('2017-07-23'), - member: '���������������������', - href: '', - memberLink: '', - }, - ]; -} - -function getActivities(): any[] { - return [ - { - id: 'trend-1', - updatedAt: new Date(), - user: { - name: '���������', - avatar: avatars[0], - }, - group: { - name: '���������������������', - link: 'http://github.com/', - }, - project: { - name: '������������', - link: 'http://github.com/', - }, - template: '��� @{group} ������������ @{project}', - }, - { - id: 'trend-2', - updatedAt: new Date(), - user: { - name: '���������', - avatar: avatars[1], - }, - group: { - name: '���������������������', - link: 'http://github.com/', - }, - project: { - name: '������������', - link: 'http://github.com/', - }, - template: '��� @{group} ������������ @{project}', - }, - { - id: 'trend-3', - updatedAt: new Date(), - user: { - name: '���������', - avatar: avatars[2], - }, - group: { - name: '���������������', - link: 'http://github.com/', - }, - project: { - name: '������������', - link: 'http://github.com/', - }, - template: '��� @{group} ������������ @{project}', - }, - { - id: 'trend-4', - updatedAt: new Date(), - user: { - name: '���������', - avatar: avatars[3], - }, - project: { - name: '5 ���������������', - link: 'http://github.com/', - }, - template: '��� @{project} ������������������������', - }, - { - id: 'trend-5', - updatedAt: new Date(), - user: { - name: '���������', - avatar: avatars[4], - }, - project: { - name: '������������', - link: 'http://github.com/', - }, - comment: { - name: '������', - link: 'http://github.com/', - }, - template: '��� @{project} ��������� @{comment}', - }, - { - id: 'trend-6', - updatedAt: new Date(), - user: { - name: '������', - avatar: avatars[5], - }, - group: { - name: '���������������', - link: 'http://github.com/', - }, - project: { - name: '������������', - link: 'http://github.com/', - }, - template: '��� @{group} ������������ @{project}', - }, - ]; -} - -export const APIS = { - '/api/list': (req: MockRequest) => getFakeList(req.queryString.count), - '/api/notice': () => getNotice(), - '/api/activities': () => getActivities() -}; diff --git a/_mock/_chart.ts b/_mock/_chart.ts deleted file mode 100644 index f5bf256..0000000 --- a/_mock/_chart.ts +++ /dev/null @@ -1,208 +0,0 @@ -// tslint:disable -import * as Mock from 'mockjs'; -import * as moment from "moment"; - -// region: mock data - -const visitData = []; -const beginDay = new Date().getTime(); - -const fakeY = [7, 5, 4, 2, 4, 7, 5, 6, 5, 9, 6, 3, 1, 5, 3, 6, 5]; -for (let i = 0; i < fakeY.length; i += 1) { - visitData.push({ - x: moment(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format( - "YYYY-MM-DD" - ), - y: fakeY[i] - }); -} - -const visitData2 = []; -const fakeY2 = [1, 6, 4, 8, 3, 7, 2]; -for (let i = 0; i < fakeY2.length; i += 1) { - visitData2.push({ - x: moment(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format( - "YYYY-MM-DD" - ), - y: fakeY2[i] - }); -} - -const salesData = []; -for (let i = 0; i < 12; i += 1) { - salesData.push({ - x: `${i + 1}���`, - y: Math.floor(Math.random() * 1000) + 200 - }); -} -const searchData = []; -for (let i = 0; i < 50; i += 1) { - searchData.push({ - index: i + 1, - keyword: `���������������-${i}`, - count: Math.floor(Math.random() * 1000), - range: Math.floor(Math.random() * 100), - status: Math.floor((Math.random() * 10) % 2) - }); -} -const salesTypeData = [ - { - x: "������������", - y: 4544 - }, - { - x: "������������", - y: 3321 - }, - { - x: "������������", - y: 3113 - }, - { - x: "������������", - y: 2341 - }, - { - x: "������������", - y: 1231 - }, - { - x: "������", - y: 1231 - } -]; - -const salesTypeDataOnline = [ - { - x: "������������", - y: 244 - }, - { - x: "������������", - y: 321 - }, - { - x: "������������", - y: 311 - }, - { - x: "������������", - y: 41 - }, - { - x: "������������", - y: 121 - }, - { - x: '������', - y: 111 - } -]; - -const salesTypeDataOffline = [ - { - x: '������������', - y: 99 - }, - { - x: '������������', - y: 188 - }, - { - x: '������������', - y: 344 - }, - { - x: '������������', - y: 255 - }, - { - x: '������', - y: 65 - } -]; - -const offlineData = []; -for (let i = 0; i < 10; i += 1) { - offlineData.push({ - name: `������${i}`, - cvr: Math.ceil(Math.random() * 9) / 10 - }); -} -const offlineChartData = []; -for (let i = 0; i < 20; i += 1) { - offlineChartData.push({ - x: new Date().getTime() + 1000 * 60 * 30 * i, - y1: Math.floor(Math.random() * 100) + 10, - y2: Math.floor(Math.random() * 100) + 10 - }); -} - -const radarOriginData = [ - { - name: '������', - ref: 10, - koubei: 8, - output: 4, - contribute: 5, - hot: 7 - }, - { - name: '������', - ref: 3, - koubei: 9, - output: 6, - contribute: 3, - hot: 1 - }, - { - name: '������', - ref: 4, - koubei: 1, - output: 6, - contribute: 5, - hot: 7 - } -]; - -// -const radarData = []; -const radarTitleMap = { - ref: '������', - koubei: '������', - output: '������', - contribute: '������', - hot: '������' -}; -radarOriginData.forEach(item => { - Object.keys(item).forEach(key => { - if (key !== 'name') { - radarData.push({ - name: item.name, - label: radarTitleMap[key], - value: item[key] - }); - } - }); -}); - -// endregion - -export const CHARTS = { - '/chart': Object.assign({}, { - visitData, - visitData2, - salesData, - searchData, - offlineData, - offlineChartData, - salesTypeData, - salesTypeDataOnline, - salesTypeDataOffline, - radarData - }), - '/chart/visit': Object.assign([], visitData), - '/chart/tags': Mock.mock({ - 'list|100': [{ name: '@city', 'value|1-100': 150, 'type|0-2': 1 }] - }) -}; diff --git a/_mock/_profile.ts b/_mock/_profile.ts deleted file mode 100644 index 729a371..0000000 --- a/_mock/_profile.ts +++ /dev/null @@ -1,148 +0,0 @@ -const basicGoods = [ - { - id: '1234561', - name: '��������� 550ml', - barcode: '12421432143214321', - price: '2.00', - num: '1', - amount: '2.00', - }, - { - id: '1234562', - name: '������ 300ml', - barcode: '12421432143214322', - price: '3.00', - num: '2', - amount: '6.00', - }, - { - id: '1234563', - name: '���������������', - barcode: '12421432143214323', - price: '7.00', - num: '4', - amount: '28.00', - }, - { - id: '1234564', - name: '���������������������', - barcode: '12421432143214324', - price: '8.50', - num: '3', - amount: '25.50', - }, -]; - -const basicProgress = [ - { - key: '1', - time: '2017-10-01 14:10', - rate: '������������', - status: 'processing', - operator: '��������� ID1234', - cost: '5mins', - }, - { - key: '2', - time: '2017-10-01 14:05', - rate: '���������������', - status: 'success', - operator: '��������� ID1234', - cost: '1h', - }, - { - key: '3', - time: '2017-10-01 13:05', - rate: '���������������', - status: 'success', - operator: '��������� ID1234', - cost: '5mins', - }, - { - key: '4', - time: '2017-10-01 13:00', - rate: '������������������', - status: 'success', - operator: '������', - cost: '1h', - }, - { - key: '5', - time: '2017-10-01 12:00', - rate: '������������������', - status: 'success', - operator: '������', - cost: '5mins', - }, -]; - -const advancedOperation1 = [ - { - key: 'op1', - type: '������������������', - name: '���������', - status: 'agree', - updatedAt: '2017-10-03 19:23:12', - memo: '-', - }, - { - key: 'op2', - type: '������������', - name: '���������', - status: 'reject', - updatedAt: '2017-10-03 19:23:12', - memo: '���������������', - }, - { - key: 'op3', - type: '������������', - name: '���������', - status: 'agree', - updatedAt: '2017-10-03 19:23:12', - memo: '-', - }, - { - key: 'op4', - type: '������������', - name: '���������', - status: 'agree', - updatedAt: '2017-10-03 19:23:12', - memo: '������', - }, - { - key: 'op5', - type: '������������', - name: '���������', - status: 'agree', - updatedAt: '2017-10-03 19:23:12', - memo: '-', - }, -]; - -const advancedOperation2 = [ - { - key: 'op1', - type: '������������������', - name: '���������', - status: 'agree', - updatedAt: '2017-10-03 19:23:12', - memo: '-', - }, -]; - -const advancedOperation3 = [ - { - key: 'op1', - type: '������������', - name: '���������', - status: 'agree', - updatedAt: '2017-10-03 19:23:12', - memo: '-', - }, -]; - -export const PROFILES = { - 'GET /profile/progress': basicProgress, - 'GET /profile/goods': basicGoods, - 'GET /profile/advanced': { advancedOperation1, advancedOperation2, advancedOperation3 } -}; diff --git a/_mock/_rule.ts b/_mock/_rule.ts deleted file mode 100644 index bd555c5..0000000 --- a/_mock/_rule.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { HttpRequest } from '@angular/common/http'; -import { MockRequest } from '@delon/mock'; - -const list = []; - -for (let i = 0; i < 46; i += 1) { - list.push({ - key: i, - disabled: ((i % 6) === 0), - href: 'https://ant.design', - avatar: ['https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png', 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png'][i % 2], - no: `TradeCode ${i}`, - title: `������������������ ${i}`, - owner: '���������', - description: '������������������', - callNo: Math.floor(Math.random() * 1000), - status: Math.floor(Math.random() * 10) % 4, - updatedAt: new Date(`2017-07-${Math.floor(i / 2) + 1}`), - createdAt: new Date(`2017-07-${Math.floor(i / 2) + 1}`), - progress: Math.ceil(Math.random() * 100), - }); -} - -function getRule(params: any) { - let ret = [...list]; - if (params.sorter) { - const s = params.sorter.split('_'); - ret = ret.sort((prev, next) => { - if (s[1] === 'descend') { - return next[s[0]] - prev[s[0]]; - } - return prev[s[0]] - next[s[0]]; - }); - } - if (params.statusList && params.statusList.length > 0) { - ret = ret.filter(data => params.statusList.indexOf(data.status) > -1); - } - if (params.no) { - ret = ret.filter(data => data.no.indexOf(params.no) > -1); - } - return ret; -} - -function removeRule(nos: string): boolean { - nos.split(',').forEach(no => { - const idx = list.findIndex(w => w.no === no); - if (idx !== -1) list.splice(idx, 1); - }); - return true; -} - -function saveRule(description: string) { - const i = Math.ceil(Math.random() * 10000); - list.unshift({ - key: i, - href: 'https://ant.design', - avatar: ['https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png', 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png'][i % 2], - no: `TradeCode ${i}`, - title: `������������������ ${i}`, - owner: '���������', - description, - callNo: Math.floor(Math.random() * 1000), - status: Math.floor(Math.random() * 10) % 2, - updatedAt: new Date(), - createdAt: new Date(), - progress: Math.ceil(Math.random() * 100), - }); -} - -export const RULES = { - '/rule': (req: MockRequest) => getRule(req.queryString), - 'DELETE /rule': (req: MockRequest) => removeRule(req.queryString.nos), - 'POST /rule': (req: MockRequest) => saveRule(req.body.description) -}; diff --git a/_mock/index.ts b/_mock/index.ts deleted file mode 100644 index 34345bf..0000000 --- a/_mock/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './_profile'; -export * from './_rule'; -export * from './_api'; -export * from './_chart'; diff --git a/package.json b/package.json index fee1e5b..f3dc5f3 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,6 @@ "@delon/acl": "0.6.1", "@delon/auth": "0.6.1", "@delon/theme": "0.6.1", - "@delon/mock": "0.6.1", "@delon/cache": "0.6.1", "@ngx-translate/core": "^9.0.0", "@ngx-translate/http-loader": "^2.0.0", diff --git a/src/app/delon.module.ts b/src/app/delon.module.ts index ba076da..26ab5ac 100644 --- a/src/app/delon.module.ts +++ b/src/app/delon.module.ts @@ -172,12 +172,8 @@ import { AlainAuthModule } from '@delon/auth'; import { AlainACLModule } from '@delon/acl'; import { DelonCacheModule } from '@delon/cache'; -// mock -import { DelonMockModule } from '@delon/mock'; -import * as MOCKDATA from '../../_mock'; import { environment } from '@env/environment'; -const MOCKMODULE = !environment.production || environment.chore === true ? - [ DelonMockModule.forRoot({ data: MOCKDATA }) ] : []; + @NgModule({ imports: [ @@ -196,9 +192,7 @@ // acl AlainACLModule.forRoot(), // cache - DelonCacheModule.forRoot(), - // mock - ...MOCKMODULE + DelonCacheModule.forRoot() ] }) export class DelonModule { diff --git a/src/app/routes/devices/basic-info/basic-info.component.html b/src/app/routes/devices/basic-info/basic-info.component.html index 3b0a7bb..e49b85a 100644 --- a/src/app/routes/devices/basic-info/basic-info.component.html +++ b/src/app/routes/devices/basic-info/basic-info.component.html @@ -6,7 +6,7 @@ </div> <nz-card [nzBordered]="false"> <div class="mb-md"> - <button nz-button (click)="addOrModify()" [nzType]="'primary'" [nzSize]="'large'"> + <button nz-button (click)="addOrModify($event)" [nzType]="'primary'" [nzSize]="'large'"> <i class="anticon anticon-plus"></i><span>������</span> </button> <ng-container *ngIf="selectedRows.length > 0"> diff --git a/src/app/routes/devices/basic-info/device-edit/device-edit.component.ts b/src/app/routes/devices/basic-info/device-edit/device-edit.component.ts index cd51a45..fc97214 100644 --- a/src/app/routes/devices/basic-info/device-edit/device-edit.component.ts +++ b/src/app/routes/devices/basic-info/device-edit/device-edit.component.ts @@ -16,10 +16,10 @@ styles: [] }) export class DeviceEditComponent implements OnInit { - private monitorPoints:any [] = []; - private deviceVersions:any [] = []; - private operateUsers:any [] = []; - private isSaving = false; + public monitorPoints:any [] = []; + public deviceVersions:any [] = []; + public operateUsers:any [] = []; + public isSaving = false; constructor( private subject: NzModalSubject, private formBuilder: FormBuilder, diff --git a/src/app/routes/devices/monitor-point/monitor-point.component.html b/src/app/routes/devices/monitor-point/monitor-point.component.html index deffe36..b676ceb 100644 --- a/src/app/routes/devices/monitor-point/monitor-point.component.html +++ b/src/app/routes/devices/monitor-point/monitor-point.component.html @@ -1,7 +1,7 @@ <pro-header [title]="grid.title"></pro-header> <nz-card [nzBordered]="false"> <div class="mb-md"> - <button nz-button (click)="addOrModify()" [nzType]="'primary'" [nzSize]="'large'"> + <button nz-button (click)="addOrModify($event)" [nzType]="'primary'" [nzSize]="'large'"> <i class="anticon anticon-plus"></i><span>������</span> </button> <ng-container *ngIf="grid.selectedIndexs.length > 0"> diff --git a/src/app/routes/devices/version/version-sensor-config/version-sensor-config.component.html b/src/app/routes/devices/version/version-sensor-config/version-sensor-config.component.html index 86c2a1a..b12c73c 100644 --- a/src/app/routes/devices/version/version-sensor-config/version-sensor-config.component.html +++ b/src/app/routes/devices/version/version-sensor-config/version-sensor-config.component.html @@ -31,7 +31,7 @@ </nz-table> <div class="modal-footer"> <button nz-button type="button" (click)="close()">������</button> - <button nz-button [nzType]="'primary'" (click)="save($event)" [nzLoading]="isSaving"> + <button nz-button [nzType]="'primary'" (click)="save($event,null,null)" [nzLoading]="isSaving"> <span > ������<span *ngIf="isSaving" >���</span> </span> diff --git a/src/app/routes/devices/version/version.component.html b/src/app/routes/devices/version/version.component.html index 31d2d18..507b190 100644 --- a/src/app/routes/devices/version/version.component.html +++ b/src/app/routes/devices/version/version.component.html @@ -1,7 +1,7 @@ <pro-header [title]="grid.title"></pro-header> <nz-card [nzBordered]="false"> <div class="mb-md"> - <button nz-button (click)="addOrModify()" [nzType]="'primary'" [nzSize]="'large'"> + <button nz-button (click)="addOrModify($event)" [nzType]="'primary'" [nzSize]="'large'"> <i class="anticon anticon-plus"></i><span>������</span> </button> <ng-container *ngIf="grid.selectedIndexs.length > 0"> diff --git a/src/app/routes/map/coordinates-picker/coordinates-picker.component.html b/src/app/routes/map/coordinates-picker/coordinates-picker.component.html index df2ada9..c9470b5 100644 --- a/src/app/routes/map/coordinates-picker/coordinates-picker.component.html +++ b/src/app/routes/map/coordinates-picker/coordinates-picker.component.html @@ -10,7 +10,7 @@ </nz-input> </div> <div nz-col [nzSpan]="1"> - <button nz-button [nzType]="'primary'" [disabled]="disabled" (click)="mapSearch($event)" class="mr-sm"> + <button nz-button [nzType]="'primary'" (click)="mapSearch($event)" class="mr-sm"> <i class="anticon anticon-search"></i><span>������</span> </button> </div> diff --git a/src/app/routes/map/coordinates-picker/coordinates-picker.component.ts b/src/app/routes/map/coordinates-picker/coordinates-picker.component.ts index f7ba6b6..a06e490 100644 --- a/src/app/routes/map/coordinates-picker/coordinates-picker.component.ts +++ b/src/app/routes/map/coordinates-picker/coordinates-picker.component.ts @@ -16,6 +16,7 @@ export class CoordinatesPickerComponent{ Default_LNG = 121; Default_LAT = 31.4; + isSaving = false; markerOption:{ point:Point, options:MarkerOptions @@ -114,6 +115,7 @@ this.subject.destroy(); } save() { + this.isSaving = true; this.subject.next(); this.subject.destroy(); } diff --git a/src/app/routes/sensors/basic-info/basic-info.component.html b/src/app/routes/sensors/basic-info/basic-info.component.html index fd431c6..1ee8934 100644 --- a/src/app/routes/sensors/basic-info/basic-info.component.html +++ b/src/app/routes/sensors/basic-info/basic-info.component.html @@ -1,11 +1,11 @@ <pro-header [title]="grid.title"></pro-header> <nz-card [nzBordered]="false"> <div class="mb-md"> - <button nz-button (click)="addOrModify()" [nzType]="'primary'" [nzSize]="'large'"> + <button nz-button (click)="addOrModify($event)" [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> + <button nz-button [nzSize]="'large'" (click)="deleteSelected($event)">������������</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> diff --git a/src/app/routes/systems/account/account-edit/account-edit.component.html b/src/app/routes/systems/account/account-edit/account-edit.component.html index b9d3adc..edcd62d 100644 --- a/src/app/routes/systems/account/account-edit/account-edit.component.html +++ b/src/app/routes/systems/account/account-edit/account-edit.component.html @@ -52,6 +52,6 @@ </div> <div class="modal-footer"> <button nz-button type="button" (click)="close()">������</button> - <button nz-button [nzLoading]="http.loading" [nzType]="'primary'" [disabled]="!validateForm.valid">������</button> + <button nz-button [nzType]="'primary'" [disabled]="!validateForm.valid">������</button> </div> </form> diff --git a/src/app/routes/systems/account/account.component.ts b/src/app/routes/systems/account/account.component.ts index 209ad3a..9eeb426 100644 --- a/src/app/routes/systems/account/account.component.ts +++ b/src/app/routes/systems/account/account.component.ts @@ -13,7 +13,7 @@ export class AccountComponent implements OnInit { - private isDeleteOptions = [ + public isDeleteOptions = [ {value: '1', label: '���'}, {value: '0', label: '���'} ]; diff --git a/src/app/routes/systems/organization/organization-config/organization-config.component.ts b/src/app/routes/systems/organization/organization-config/organization-config.component.ts index f4cee54..34f4089 100644 --- a/src/app/routes/systems/organization/organization-config/organization-config.component.ts +++ b/src/app/routes/systems/organization/organization-config/organization-config.component.ts @@ -23,7 +23,7 @@ ngOnDestroy(): void { this.backToList(); } - private organization: Organization; + public organization: Organization; grid: Grid<object> = new Grid<object>(null); validateForm: FormGroup; constructor( @@ -274,8 +274,8 @@ } } } - private hasDegression = false; - refreshHasDegression(value){ + public hasDegression = false; + public refreshHasDegression(value){ if(value){ this.hasDegression = true; }else{ diff --git a/src/app/routes/systems/organization/organization-list/organization-list.component.html b/src/app/routes/systems/organization/organization-list/organization-list.component.html index ead90fe..033bdb6 100644 --- a/src/app/routes/systems/organization/organization-list/organization-list.component.html +++ b/src/app/routes/systems/organization/organization-list/organization-list.component.html @@ -1,10 +1,10 @@ <nz-card [nzBordered]="false"> <div class="mb-md"> - <button nz-button (click)="addOrModify()" [nzType]="'primary'" [nzSize]="'large'"> + <button nz-button (click)="addOrModify($event)" [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> + <button nz-button [nzSize]="'large'" (click)="deleteSelected($event)">������������</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> diff --git a/src/app/routes/systems/organization/organization.component.ts b/src/app/routes/systems/organization/organization.component.ts index 474aac0..7f68d8c 100644 --- a/src/app/routes/systems/organization/organization.component.ts +++ b/src/app/routes/systems/organization/organization.component.ts @@ -12,6 +12,6 @@ ngOnInit(): void { } constructor( - private organizationService: OrganizationService + public organizationService: OrganizationService ) {} } diff --git a/src/app/routes/users/alarm-user/alarm-user-edit/alarm-user-edit.component.html b/src/app/routes/users/alarm-user/alarm-user-edit/alarm-user-edit.component.html index 9b8d9f3..7ff3c0d 100644 --- a/src/app/routes/users/alarm-user/alarm-user-edit/alarm-user-edit.component.html +++ b/src/app/routes/users/alarm-user/alarm-user-edit/alarm-user-edit.component.html @@ -51,6 +51,6 @@ </div> <div class="modal-footer"> <button nz-button type="button" (click)="close()">������</button> - <button nz-button [nzLoading]="http.loading" [nzType]="'primary'">������</button> + <button nz-button [nzType]="'primary'">������</button> </div> </form> diff --git a/src/app/routes/users/alarm-user/alarm-user.component.html b/src/app/routes/users/alarm-user/alarm-user.component.html index fca1838..a4158ca 100644 --- a/src/app/routes/users/alarm-user/alarm-user.component.html +++ b/src/app/routes/users/alarm-user/alarm-user.component.html @@ -81,7 +81,7 @@ <th nz-th><span>������������</span></th> <th nz-th> <span>������������</span> - <nz-table-sort [(nzValue)]="sortMap.updatedAt" (nzValueChange)="sort('expire_time', $event)"></nz-table-sort> + <nz-table-sort [(nzValue)]="sortMap" (nzValueChange)="sort('expire_time', $event)"></nz-table-sort> </th> <th nz-th><span>������</span></th> </tr> diff --git a/src/app/routes/users/installer/edit/edit.component.html b/src/app/routes/users/installer/edit/edit.component.html index 12a0a00..fd5d65a 100644 --- a/src/app/routes/users/installer/edit/edit.component.html +++ b/src/app/routes/users/installer/edit/edit.component.html @@ -36,6 +36,6 @@ </div> <div class="modal-footer"> <button nz-button type="button" (click)="close()">������</button> - <button nz-button [nzLoading]="http.loading" [nzType]="'primary'">������</button> + <button nz-button [nzType]="'primary'">������</button> </div> </form> diff --git a/src/app/routes/users/installer/edit/edit.component.ts b/src/app/routes/users/installer/edit/edit.component.ts index f02cabf..58ff4ac 100644 --- a/src/app/routes/users/installer/edit/edit.component.ts +++ b/src/app/routes/users/installer/edit/edit.component.ts @@ -14,7 +14,7 @@ export class UserInstallerEditComponent implements OnInit { user: any; - private validateForm: FormGroup; + public validateForm: FormGroup; constructor( private modalHelper: ModalHelper, diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 156ae6e..0c0a43c 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -4,5 +4,5 @@ production: true, hmr: false, useHash: true, - SERVER_BASH_URL: `http://47.96.15.25:8001/` + SERVER_BASH_URL:`http://47.96.171.62:8080/screen_api_v2/` }; diff --git a/yarn.lock b/yarn.lock index 7132ee2..5fa8eed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -235,10 +235,6 @@ version "0.6.1" resolved "http://registry.npm.taobao.org/@delon/cache/download/@delon/cache-0.6.1.tgz#13b412897743dc2ad612c4c4fca280c3dc044825" -"@delon/mock@0.6.1": - version "0.6.1" - resolved "http://registry.npm.taobao.org/@delon/mock/download/@delon/mock-0.6.1.tgz#e52bbdd708ff83680c985d0aa4ace282168de873" - "@delon/theme@0.6.1": version "0.6.1" resolved "http://registry.npm.taobao.org/@delon/theme/download/@delon/theme-0.6.1.tgz#4e98b1dc565c2f0684717c44ed73509cd866f120" @@ -2176,6 +2172,12 @@ resolved "http://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" dependencies: jsbn "~0.1.0" + +echarts@^3.8.5: + version "3.8.5" + resolved "https://registry.yarnpkg.com/echarts/-/echarts-3.8.5.tgz#58e4a51d2743c6fb75257b0dc0a9cf9f5378ac0e" + dependencies: + zrender "3.7.4" ee-first@1.1.1: version "1.1.1" @@ -8253,3 +8255,7 @@ zone.js@^0.8.14, zone.js@^0.8.18: version "0.8.19" resolved "http://registry.npm.taobao.org/zone.js/download/zone.js-0.8.19.tgz#a4b522cd9e8b7b616a638c297d720d4c7f292f71" + +zrender@3.7.4: + version "3.7.4" + resolved "https://registry.yarnpkg.com/zrender/-/zrender-3.7.4.tgz#f847d53948481ef6d42906d1ea9aeec7acbefdf2" -- Gitblit v1.8.0