fengxiang
2018-06-15 565f5b26ee306966f0b4b9447b7a8f9b04a9fe00
src/app/routes/dashboard/workplace/workplace.component.ts
@@ -160,11 +160,11 @@
        //     });
        //     this.totalDeviceCount += fakeDC[i];
        // }
        let example1 = new ExampleService();
        let mo = moment();
        example1.or().andGreaterThanOrEqualTo({ name: "createTime", value: mo.format('YYYY-MM-01 00:00:00') });
        let example2 = new ExampleService();
        let example3 = new ExampleService();
        const example1 = new ExampleService();
        const mo = moment();
        example1.or().andGreaterThanOrEqualTo({ name: 'createTime', value: mo.format('YYYY-MM-01 00:00:00') });
        const example2 = new ExampleService();
        const example3 = new ExampleService();
        example3.or().andNotEqualTo({name:'state',value:4});
        zip(this.deviceService.countByExample(example1),
            this.deviceService.countByExample(example2),
@@ -176,7 +176,7 @@
                        this.totalDeviceCount = ToolsService.toThousands(rWithToltal.data.toString());
                        this.totalDeviceCountList = rWithList.data.map(item => {
                            return {x:item.time,y:item.count};
                        })
                        });
                        this.operNormalPercent = Math.round(rWithNormal.data/rWithToltal.data*100);
                        this.deviceCountLoading = false;
                        this.operationLoading = false;
@@ -184,9 +184,9 @@
                }
            );
        zip(
            this.http.get<ResultBean<{time: string,count: number}[]>>("alarm/count-by-times",{start: mo.format('YYYY-MM-01 00:00:00'),end: null,timeUnits: TimeUnits.DAY}),
            this.http.get<ResultBean<{time: string,count: number}[]>>("alarm/count-by-times",{start: mo.format('YYYY-MM-01 00:00:00'),end: null}),
            this.http.get<ResultBean<{time: string,count: number}[]>>("alarm/count-by-times",{start: mo.format('YYYY-MM-DD 00:00:00'),end: null})
            this.http.get<ResultBean<{time: string, count: number}[]>>('alarm/count-by-times', {start: mo.format('YYYY-MM-01 00:00:00'), end: null, timeUnits: TimeUnits.DAY}),
            this.http.get<ResultBean<{time: string, count: number}[]>>('alarm/count-by-times', {start: mo.format('YYYY-MM-01 00:00:00'), end: null}),
            this.http.get<ResultBean<{time: string, count: number}[]>>('alarm/count-by-times', {start: mo.format('YYYY-MM-DD 00:00:00'), end: null})
        ).subscribe(
            ([rWithList,rWithMonth,rWithDay]) => {
                 if(!!rWithList.code&&!!rWithMonth.code&&!!rWithDay.code){