seimin 1 月之前
父节点
当前提交
a4637b5c08

+ 2 - 0
src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.ts

@@ -4,6 +4,7 @@ import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } fro
4 4
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
5 5
 import { MainService } from 'src/app/services/main.service';
6 6
 import { ActivatedRoute } from '@angular/router';
7
+import cloneDeep from 'lodash-es/cloneDeep'
7 8
 @Component({
8 9
   selector: "app-date-business-statistics",
9 10
   templateUrl: "./date-business-statistics.component.html",
@@ -101,6 +102,7 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
101 102
   getList(num?: number, field?: string, sort?: string) {
102 103
     this.mainService.getDictionary('list', 'statistics_date_type').subscribe((data) => {
103 104
       let dictionaryList = data || [];
105
+      dictionaryList = cloneDeep(dictionaryList);
104 106
       let flag = dictionaryList.some((item) => item.value === 'dateOther');
105 107
       !flag && dictionaryList.push({id: 0, name: '其他', value: 'dateOther'});
106 108
       this.dictionaryList = dictionaryList;

+ 2 - 0
src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.ts

@@ -6,6 +6,7 @@ import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } fro
6 6
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
7 7
 import { MainService } from 'src/app/services/main.service';
8 8
 import { ActivatedRoute } from '@angular/router';
9
+import cloneDeep from 'lodash-es/cloneDeep'
9 10
 @Component({
10 11
   selector: "app-department-business-statistics",
11 12
   templateUrl: "./department-business-statistics.component.html",
@@ -111,6 +112,7 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
111 112
   getList(num?: number, field?: string, sort?: string) {
112 113
     this.mainService.getDictionary('list', 'statistics_date_type').subscribe((data) => {
113 114
       let dictionaryList = data || [];
115
+      dictionaryList = cloneDeep(dictionaryList);
114 116
       let flag = dictionaryList.some((item) => item.value === 'dateOther');
115 117
       !flag && dictionaryList.push({id: 0, name: '其他', value: 'dateOther'});
116 118
       this.dictionaryList = dictionaryList;

+ 2 - 0
src/app/views/new-statistics/distribution-inspection-statistics/user-business-statistics/user-business-statistics.component.ts

@@ -6,6 +6,7 @@ import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } fro
6 6
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
7 7
 import { MainService } from 'src/app/services/main.service';
8 8
 import { ActivatedRoute } from '@angular/router';
9
+import cloneDeep from 'lodash-es/cloneDeep'
9 10
 @Component({
10 11
   selector: "app-user-business-statistics",
11 12
   templateUrl: "./user-business-statistics.component.html",
@@ -111,6 +112,7 @@ export class UserBusinessStatisticsComponent implements OnInit, AfterViewInit {
111 112
   getList(num?: number, field?: string, sort?: string) {
112 113
     this.mainService.getDictionary('list', 'statistics_date_type').subscribe((data) => {
113 114
       let dictionaryList = data || [];
115
+      dictionaryList = cloneDeep(dictionaryList);
114 116
       let flag = dictionaryList.some((item) => item.value === 'dateOther');
115 117
       !flag && dictionaryList.push({id: 0, name: '其他', value: 'dateOther'});
116 118
       this.dictionaryList = dictionaryList;