Quellcode durchsuchen

常用故障现象

seimin vor 5 Monaten
Ursprung
Commit
9f79c52004

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "/service": {
3
-		"target": "http://192.168.3.108",
3
+		"target": "http://192.168.4.105",
4 4
     "logLevel": "debug",
5 5
     "changeOrigin": true,
6 6
     "pathRewrite": {

+ 92 - 0
src/app/components/configurationCenter/configuration-commonFaults/configuration-commonFaults.component.html

@@ -0,0 +1,92 @@
1
+<div class="content priority">
2
+  <div class="contentInner">
3
+    <div class="list-template" id="priorityTable">
4
+      <div class="list-template__content">
5
+        <div class="list-template__bottom">
6
+         <div class="list-template__top" nz-row>
7
+            <div nz-col nzLg="24" class="list-template__btns">
8
+              <button nz-button class="btn default" (click)="addPriorityModal()">新增</button>
9
+            </div>
10
+          </div>
11
+          <nz-table class="list-template__nzTable" [nzData]="commonFaultsList" nzSize="middle" [nzShowPagination]="false"
12
+            [nzLoading]="loading1" [nzScroll]="{ y: tablePriorityHeight + 'px' }">
13
+            <thead>
14
+              <tr class="thead">
15
+                <th nzWidth="25%">排序号</th>
16
+                <th nzWidth="25%">故障现象</th>
17
+                <th nzWidth="25%">别名</th>
18
+                <th nzWidth="25%">操作</th>
19
+              </tr>
20
+            </thead>
21
+            <tbody>
22
+              <tr *ngFor="let data of commonFaultsList;let i = index">
23
+                <td>{{data.orders}}</td>
24
+                <td>{{data.categoryDTO?.mutiCategory}}</td>
25
+                <td>{{data.content}}</td>
26
+                <td>
27
+                  <div class="coop">
28
+                    <span (click)="showDelModal(data,'您确认要删除吗?','删除','delPriority')">删除</span>
29
+                    <span (click)="editPriority(data)">编辑</span>
30
+                  </div>
31
+                </td>
32
+              </tr>
33
+            </tbody>
34
+          </nz-table>
35
+        </div>
36
+      </div>
37
+    </div>
38
+  </div>
39
+</div>
40
+
41
+<!-- 操作成功/失败提示框 -->
42
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
43
+  [info]="promptInfo">
44
+</app-prompt-modal>
45
+
46
+<!-- 删除模态框 -->
47
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
48
+(confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
49
+
50
+<!-- 新增/编辑模态框 -->
51
+<div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="modalPriority">
52
+  <div class="modalBody">
53
+    <div class="title">{{modelName}}<i class="icon_transport transport-guanbi" (click)="hidePriorityModal()"></i></div>
54
+    <div class="content">
55
+      <form nz-form [formGroup]="validatePriorityForm" class="addForm">
56
+        <nz-form-item>
57
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="orders">排序号</nz-form-label>
58
+          <nz-form-control [nzSpan]="18" nzErrorTip="请输入排序号!">
59
+            <nz-input-group>
60
+              <nz-input-number class="w100" formControlName="orders" nzPlaceHolder="请输入排序号" [nzMin]="0" [nzStep]="1" [nzPrecision]="0"></nz-input-number>
61
+            </nz-input-group>
62
+          </nz-form-control>
63
+        </nz-form-item>
64
+        <nz-form-item>
65
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="content">别名</nz-form-label>
66
+          <nz-form-control [nzSpan]="18" nzErrorTip="请输入别名!">
67
+            <nz-input-group>
68
+              <input formControlName="content" nz-input placeholder="请输入别名">
69
+            </nz-input-group>
70
+          </nz-form-control>
71
+        </nz-form-item>
72
+        <nz-form-item>
73
+          <nz-form-label nzFor="category" nzRequired [nzSpan]="6">故障现象</nz-form-label>
74
+          <nz-form-control [nzSpan]="18">
75
+						<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择故障现象" formControlName="category" (nzOnSearch)="changeCommonInp('category', $event)">
76
+						  <ng-container *ngFor="let option of malfunctionData">
77
+						    <nz-option *ngIf="!isLoading" [nzLabel]="option.mutiCategory" [nzValue]="option.id"></nz-option>
78
+						  </ng-container>
79
+						  <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
80
+						    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
81
+						  </nz-option>
82
+						</nz-select>
83
+          </nz-form-control>
84
+        </nz-form-item>
85
+      </form>
86
+    </div>
87
+    <div class=" display_flex justify-content_flex-center">
88
+      <button nzType="primary" nz-button (click)="submitPriorityForm()" [nzLoading]="btnLoading">确认</button>
89
+      <button class="btn cancel" nz-button nzType="default" (click)="hidePriorityModal()">取消</button>
90
+    </div>
91
+  </div>
92
+</div>

+ 290 - 0
src/app/components/configurationCenter/configuration-commonFaults/configuration-commonFaults.component.less

@@ -0,0 +1,290 @@
1
+@import "../../../../../src/theme.less";
2
+:host {
3
+  height: 100%;
4
+  display: flex;
5
+  flex-direction: column;
6
+  justify-content: space-between;
7
+  background-color: #F0F2F5;
8
+  .list-template__nzTable,
9
+  .list-template__bottom{
10
+    padding: 0!important;
11
+    border: none!important;
12
+    background: #fff!important;
13
+  }
14
+  .list-template{
15
+    width: 100%!important;
16
+    height: 100%!important;
17
+  }
18
+  .content{
19
+    flex: 1;
20
+    min-height: 0;
21
+    display: flex;
22
+    flex-direction: column;
23
+    justify-content: space-between;
24
+    border: 1px solid #EEF3F9;
25
+    &.priority{
26
+      margin: 20px;
27
+      background-color: #fff;
28
+      .contentInner{
29
+        border: 1px solid #E8EBEF;
30
+      }
31
+    }
32
+    .contentItem{
33
+      padding: 4px 16px;
34
+      cursor: pointer;
35
+      overflow: hidden;
36
+      text-overflow: ellipsis;
37
+      white-space: nowrap;
38
+      &.active{
39
+        color: @primary-color;
40
+        background-color: #F0F6ED;
41
+        border-radius: 4px;
42
+      }
43
+    }
44
+    .contentInner{
45
+      flex: 1;
46
+      display: flex;
47
+      justify-content: space-between;
48
+      align-items: center;
49
+      padding: 0 16px;
50
+      gap: 16px;
51
+      .contentHead{
52
+        height: 45px;
53
+        display: flex;
54
+        justify-content: space-between;
55
+        align-items: center;
56
+        gap: 16px;
57
+        padding: 0 16px;
58
+        font-size: 16px;
59
+        font-weight: bold;
60
+        border-bottom: 1px solid #D9D9D9;
61
+        .title{
62
+          overflow: hidden;
63
+          text-overflow: ellipsis;
64
+          white-space: nowrap;
65
+        }
66
+        .btns{
67
+          flex-shrink: 0;
68
+        }
69
+      }
70
+      .contentBody{
71
+        padding: 0 8px;
72
+        margin: 4px 0;
73
+        flex: 1;
74
+      }
75
+      .address{
76
+        flex: 1;
77
+        height: 100%;
78
+        background: #FFFFFF;
79
+        border: 1px solid #E8EBEF;
80
+        display: flex;
81
+        flex-direction: column;
82
+        width: 0;
83
+      }
84
+      .addressAssign{
85
+        flex: 3;
86
+        height: 100%;
87
+        background: #FFFFFF;
88
+        border: 1px solid #E8EBEF;
89
+        display: flex;
90
+        flex-direction: column;
91
+        width: 0;
92
+      }
93
+      .list-template__searchItem {
94
+        margin-bottom: 16px;
95
+        .label {
96
+          color: #333;
97
+          display: inline-block;
98
+          width: 70px;
99
+          text-align-last: justify;
100
+          text-align: justify;
101
+          &.label--big {
102
+            width: 100px;
103
+          }
104
+        }
105
+        .formItem {
106
+          width: 135px;
107
+        }
108
+      }
109
+    }
110
+    .contentBtns{
111
+      margin-bottom: 16px;
112
+      display: flex;
113
+      justify-content: center;
114
+      align-items: center;
115
+    }
116
+  }
117
+
118
+  .save {
119
+    position: fixed;
120
+    left: 0;
121
+    top: 0;
122
+    width: 100%;
123
+    height: 100%;
124
+    background: rgba(0, 0, 0, 0.4);
125
+    z-index: 99;
126
+
127
+    .tips{
128
+      margin-bottom: 16px!important;
129
+    }
130
+
131
+    .modalBody {
132
+      width: 350px;
133
+      background: #fff;
134
+      border-radius: 5px;
135
+      padding: 10px 20px;
136
+      color: #333;
137
+
138
+      .title {
139
+        width: 100%;
140
+        text-align: center;
141
+        font-size: 18px;
142
+        position: relative;
143
+
144
+        i {
145
+          position: absolute;
146
+          right: 0;
147
+          top: 0;
148
+          font-size: 20px;
149
+          color: #666;
150
+          cursor: pointer;
151
+          padding: 0 5px;
152
+        }
153
+      }
154
+
155
+      .content {
156
+        width: 310px;
157
+        background: #f9fafb;
158
+        border: 1px solid #e5e9ed;
159
+        border-radius: 5px;
160
+        overflow: hidden;
161
+        margin-top: 12px;
162
+        padding: 16px 0;
163
+
164
+        .busyList{
165
+          display: flex;
166
+          margin-bottom: 8px;
167
+          .busyContent{
168
+            margin-right: 8px;
169
+            flex: 1;
170
+          }
171
+        }
172
+
173
+        & > div {
174
+          text-align: center;
175
+          margin: 0;
176
+
177
+          &.icon {
178
+            // margin-top: 17px;
179
+
180
+            i {
181
+              color: #34b349;
182
+              font-size: 30px !important;
183
+
184
+              &.transport-wenhao {
185
+                color: #f5a523;
186
+              }
187
+
188
+              &.transport-shibai {
189
+                color: #ff3a52;
190
+              }
191
+            }
192
+          }
193
+
194
+          &.defeat {
195
+            color: #333;
196
+            font-size: 14px;
197
+          }
198
+
199
+          &:nth-child(3) {
200
+            font-size: 14px;
201
+            color: #666;
202
+          }
203
+        }
204
+        .workAssignmentTips {
205
+          font-size: 12px;
206
+        }
207
+      }
208
+
209
+      button {
210
+        margin-top: 10px;
211
+
212
+        &.btn {
213
+          margin-left: 8px;
214
+        }
215
+      }
216
+    }
217
+
218
+    // 新增
219
+    &.add {
220
+      .modalBody {
221
+        width: 480px;
222
+        height: auto;
223
+
224
+        .content {
225
+          width: 100%;
226
+          height: auto;
227
+          padding: 16px;
228
+          max-height: 497px;
229
+          overflow-y: auto;
230
+
231
+          .addForm {
232
+            .ant-form-item {
233
+              margin-bottom: 0;
234
+							.ant-select{
235
+								width: 100% !important;
236
+							}
237
+              .ant-form-item-label {
238
+                text-align: left;
239
+              }
240
+
241
+              .desc {
242
+                margin-top: 5px;
243
+              }
244
+            }
245
+
246
+            .datesControl {
247
+              margin-top: -16px;
248
+
249
+              .ant-form-item-label {
250
+                line-height: 40px;
251
+              }
252
+            }
253
+
254
+            .timer {
255
+              .ant-form-item-label {
256
+                width: 100%;
257
+                text-align: left;
258
+              }
259
+
260
+              .numInp {
261
+                margin-right: 5px;
262
+              }
263
+
264
+              .line {
265
+                margin-right: 5px;
266
+              }
267
+            }
268
+
269
+            .timer2 {
270
+              .ant-form-item-label {
271
+                line-height: 20px;
272
+              }
273
+            }
274
+          }
275
+
276
+          .editForm {
277
+            .ant-form-item {
278
+              margin-bottom: 15px;
279
+
280
+              .ant-form-item-label {
281
+                line-height: 14px;
282
+                text-align: left;
283
+              }
284
+            }
285
+          }
286
+        }
287
+      }
288
+    }
289
+  }
290
+}

+ 235 - 0
src/app/components/configurationCenter/configuration-commonFaults/configuration-commonFaults.component.ts

@@ -0,0 +1,235 @@
1
+import { Component, OnInit } from "@angular/core";
2
+import { ActivatedRoute } from "@angular/router";
3
+import { Subject } from 'rxjs';
4
+import { debounceTime } from 'rxjs/operators';
5
+import { MainService } from "../../../services/main.service";
6
+import { Validators, FormGroup, FormBuilder } from '@angular/forms';
7
+import { ToolService } from 'src/app/services/tool.service';
8
+import { NzMessageService } from 'ng-zorro-antd';
9
+
10
+@Component({
11
+  selector: "app-configuration-commonFaults",
12
+  templateUrl: "./configuration-commonFaults.component.html",
13
+  styleUrls: ["./configuration-commonFaults.component.less"],
14
+})
15
+export class ConfigurationCommonFaultsComponent implements OnInit {
16
+  constructor(
17
+    private route: ActivatedRoute,
18
+    private mainService: MainService,
19
+    private fb: FormBuilder,
20
+    private tool: ToolService,
21
+    private message: NzMessageService,
22
+  ) {}
23
+
24
+  coopData: any = {}; //当前操作列
25
+	hosId:any;
26
+	hospitals:any = [];
27
+	isDeptLoading: boolean = false;
28
+
29
+	currentHospital:any;
30
+	malfunctionData:any = [];
31
+	allUserGroup:any = [];
32
+	userData:any = [];
33
+
34
+  changeCommonInpSubject = new Subject();
35
+
36
+  ngOnInit() {
37
+		this.changeCommonInpSubject.pipe(debounceTime(500)).subscribe((v) => {
38
+      if(v[0] === 'category'){
39
+        this.searchApplicationCategory(v[1]);
40
+      }
41
+    });
42
+
43
+    // 优先级
44
+    setTimeout(() => {
45
+      this.tablePriorityHeight = document.querySelector('#priorityTable').clientHeight - document.querySelector('#priorityTable .list-template__top').clientHeight - 8 - document.querySelector('#priorityTable .thead').clientHeight;
46
+    }, 100)
47
+		this.hosId = this.tool.getCurrentHospital().id;
48
+		this.currentHospital = this.tool.getCurrentHospital();
49
+    this.getCommonFaultsList();
50
+		this.searchApplicationCategory()
51
+  }
52
+
53
+  // 新增优先级弹框
54
+  modelName = ""; //模态框名称
55
+  modalPriority: boolean = false; //新增/编辑模态框
56
+  add: boolean; //true:新增;false:编辑
57
+  addPriorityModal() {
58
+    this.modelName = "新增";
59
+    this.add = true; //新增
60
+    this.modalPriority = true;
61
+    this.initForm();
62
+  }
63
+  //关闭新增/编辑弹框
64
+  hidePriorityModal() {
65
+    this.modalPriority = false;
66
+  }
67
+
68
+  changeCommonInp(type, e) {
69
+    this.changeCommonInpSubject.next([type, e]);
70
+  }
71
+
72
+	// 获取故障现象数据
73
+  isLoading:boolean = false;
74
+	searchApplicationCategory(keyWord?){
75
+		let postData = {
76
+		  category: {
77
+        category: keyWord,
78
+        selectType: "mutlQuery",
79
+		    hierarchy: 3,
80
+		  },
81
+		};
82
+    this.isLoading = true;
83
+		this.mainService.incidentPost("listIncidentCategory", postData).subscribe(data => {
84
+		  this.isLoading = false;
85
+      if (data.status == 200) {
86
+        this.malfunctionData = data.data || [];
87
+      }
88
+		})
89
+	}
90
+
91
+  // 编辑
92
+  editPriority(data) {
93
+    console.log(data);
94
+    this.modelName = "编辑";
95
+    this.add = false;
96
+    this.modalPriority = true;
97
+    this.initForm();
98
+    this.coopData = data;
99
+    this.validatePriorityForm.controls.orders.setValue(data.orders);
100
+    this.validatePriorityForm.controls.content.setValue(data.content);
101
+    this.validatePriorityForm.controls.category.setValue(data.category);
102
+  }
103
+
104
+  // 新增/编辑表单提交
105
+  btnLoading: boolean = false; //提交按钮loading状态
106
+  submitPriorityForm(): void {
107
+    for (const i in this.validatePriorityForm.controls) {
108
+      this.validatePriorityForm.controls[i].markAsDirty();
109
+      this.validatePriorityForm.controls[i].updateValueAndValidity();
110
+    }
111
+    if (this.validatePriorityForm.invalid) {
112
+      return;
113
+    }
114
+    console.log(this.validatePriorityForm.value);
115
+    this.btnLoading = true;
116
+    let postData:any = {};
117
+    if (this.add) {
118
+      //增加
119
+      postData = {
120
+        orders: this.validatePriorityForm.value.orders,
121
+        content: this.validatePriorityForm.value.content,
122
+        category: this.validatePriorityForm.value.category,
123
+      };
124
+    } else {
125
+      //编辑
126
+      postData = {
127
+				...this.coopData,
128
+				orders: this.validatePriorityForm.value.orders,
129
+        content: this.validatePriorityForm.value.content,
130
+        category: this.validatePriorityForm.value.category,
131
+      };
132
+    }
133
+    this.mainService
134
+      .simplePost("addData", "incidentCategoryContent", postData)
135
+      .subscribe((result) => {
136
+        this.btnLoading = false;
137
+        this.hidePriorityModal();
138
+        let msg = "";
139
+        if (this.add) {
140
+          msg = "新增";
141
+        } else {
142
+          msg = "修改";
143
+        }
144
+        if (result.status == 200) {
145
+          this.showPromptModal(msg, true, '');
146
+        } else {
147
+          this.showPromptModal(msg, false, result.msg);
148
+        }
149
+      });
150
+  }
151
+
152
+  // 初始化新增form表单
153
+  validatePriorityForm: FormGroup; //新增/编辑表单
154
+  initForm() {
155
+    this.validatePriorityForm = this.fb.group({
156
+      orders: [0, [Validators.required]],//排序号
157
+      content: [null, [Validators.required]],//别名
158
+      category: [null, [Validators.required]],//故障现象
159
+    });
160
+    console.log(this.validatePriorityForm.controls)
161
+  }
162
+
163
+  // 获取列表
164
+  loading1:boolean = false;
165
+  commonFaultsList: any[] = []; //表格数据
166
+  tablePriorityHeight:number = 0;
167
+  getCommonFaultsList() {
168
+    let data = {
169
+			idx: 0,
170
+			sum: 99999,
171
+			incidentCategoryContent: {},
172
+		};
173
+		this.loading1 = true;
174
+		this.mainService
175
+			.getFetchDataList("simple/data", "incidentCategoryContent", data)
176
+			.subscribe((data) => {
177
+				this.loading1 = false;
178
+				this.commonFaultsList = data.list || [];
179
+			});
180
+  }
181
+
182
+  delModal: boolean = false; //删除模态框
183
+  tipsMsg1: string; //提示框信息
184
+  tipsMsg2: string; //操作后信息
185
+  confirmDelType: string; //确认的类型(启用/停用,删除)
186
+  showDelModal(
187
+    data,
188
+    tipsMsg1: string,
189
+    tipsMsg2: string,
190
+    type: string,
191
+  ) {
192
+    this.confirmDelType = type;
193
+    this.delModal = true;
194
+    this.coopData = data;
195
+    console.log(this.coopData);
196
+    this.tipsMsg1 = tipsMsg1;
197
+    this.tipsMsg2 = tipsMsg2;
198
+  }
199
+  // 隐藏删除框
200
+  hideDelModal() {
201
+    this.delModal = false;
202
+  }
203
+  // 确认删除
204
+  confirmDel() {
205
+    this.btnLoading = true;
206
+		//删除-优先级
207
+		this.mainService
208
+			.simplePost("rmvData", "incidentCategoryContent", [this.coopData.id])
209
+			.subscribe((data) => {
210
+				this.btnLoading = false;
211
+				this.delModal = false;
212
+				if (data.status == 200) {
213
+					this.showPromptModal(this.tipsMsg2, true, "");
214
+				} else {
215
+					this.showPromptModal(this.tipsMsg2, false, data.msg);
216
+				}
217
+			});
218
+  }
219
+
220
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
221
+  promptContent: string; //操作提示框提示信息
222
+  ifSuccess: boolean; //操作成功/失败
223
+  promptInfo: string; //操作结果提示信息
224
+  promptModalShow: boolean; //操作提示框是否展示
225
+  showPromptModal(con, success, promptInfo?) {
226
+    this.promptModalShow = false;
227
+    this.promptContent = con;
228
+    this.ifSuccess = success;
229
+    this.promptInfo = promptInfo;
230
+    setTimeout(() => {
231
+      this.promptModalShow = true;
232
+    }, 100);
233
+    this.getCommonFaultsList();
234
+  }
235
+}

+ 2 - 2
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -1325,7 +1325,7 @@ export class HushijiandanComponent implements OnInit {
1325 1325
             },
1326 1326
           };
1327 1327
           if (this.coopBx.category) {
1328
-            postData.incident.category = this.coopBx.category;
1328
+            postData.incident.category = this.coopBx.categoryDTO;
1329 1329
           }
1330 1330
           this.mainService.flowPost("incident/task/request", postData).subscribe((res) => {
1331 1331
             this.btnLoading = false;
@@ -3904,7 +3904,7 @@ export class HushijiandanComponent implements OnInit {
3904 3904
   getQuickBxlb() {
3905 3905
     this.quickBxlbLoading = true;
3906 3906
     this.mainService
3907
-      .fetchListBx("incidentCategoryContent", { idx: 0, sum: 10 })
3907
+      .getFetchDataList("simple/data", "incidentCategoryContent", { idx: 0, sum: 10 })
3908 3908
       .subscribe((data: any) => {
3909 3909
         this.quickBxlbLoading = false;
3910 3910
         if (data.status == 200) {

+ 4 - 0
src/app/views/incident-config/incident-config.component.html

@@ -36,6 +36,10 @@
36 36
   <ng-container *ngIf="activeTagLink === 'incidentConfigHospital'">
37 37
     <app-configuration-hospital></app-configuration-hospital>
38 38
   </ng-container>
39
+  <!-- 常见故障 -->
40
+	<ng-container *ngIf="activeTagLink === 'incidentConfigCommonFaults'">
41
+	  <app-configuration-commonFaults></app-configuration-commonFaults>
42
+	</ng-container>
39 43
 </div>
40 44
 
41 45
 

+ 6 - 4
src/app/views/incident-config/incident-config.component.ts

@@ -36,10 +36,12 @@ export class IncidentConfigComponent implements OnInit, AfterViewInit {
36 36
   ngOnInit(): void {}
37 37
 
38 38
   ngAfterViewInit(){
39
-    let menus = JSON.parse(localStorage.getItem("menu"));
40
-    let incidentConfig = menus.find(item => item.link == 'incidentConfig');
41
-    this.tagList = incidentConfig ? (incidentConfig.childrens || []) : [];
42
-    this.tagList.length && this.clickTag(this.tagList[0]);
39
+    setTimeout(() => {
40
+      let menus = JSON.parse(localStorage.getItem("menu"));
41
+      let incidentConfig = menus.find(item => item.link == 'incidentConfig');
42
+      this.tagList = incidentConfig ? (incidentConfig.childrens || []) : [];
43
+      this.tagList.length && this.clickTag(this.tagList[0]);
44
+    }, 0)
43 45
   }
44 46
 
45 47
   // 点击tab

+ 2 - 0
src/app/views/incident-config/incident-config.module.ts

@@ -11,6 +11,7 @@ import { ConfigurationDeptUserComponent } from 'src/app/components/configuration
11 11
 import { ConfigurationMessageComponent } from 'src/app/components/configurationCenter/configuration-message/configuration-message.component';
12 12
 import { ConfigurationHospitalComponent } from 'src/app/components/configurationCenter/configuration-hospital/configuration-hospital.component';
13 13
 import { ConfigurationDictionaryModule } from 'src/app/components/configurationCenter/configuration-dictionary/configuration-dictionary.module';
14
+import { ConfigurationCommonFaultsComponent } from 'src/app/components/configurationCenter/configuration-commonFaults/configuration-commonFaults.component';
14 15
 
15 16
 
16 17
 @NgModule({
@@ -22,6 +23,7 @@ import { ConfigurationDictionaryModule } from 'src/app/components/configurationC
22 23
 		ConfigurationDeptUserComponent,
23 24
     ConfigurationMessageComponent,
24 25
     ConfigurationHospitalComponent,
26
+    ConfigurationCommonFaultsComponent,
25 27
   ],
26 28
   imports: [
27 29
     CommonModule,

+ 6 - 5
src/app/views/other-config/other-config.component.ts

@@ -26,11 +26,12 @@ export class OtherConfigComponent implements OnInit, AfterViewInit {
26 26
   ngOnInit(): void {}
27 27
 
28 28
   ngAfterViewInit(){
29
-    let menus = JSON.parse(localStorage.getItem("menu"));
30
-    let otherConfig = menus.find(item => item.link == 'otherConfig');
31
-    this.tagList = otherConfig ? (otherConfig.childrens || []) : [];
32
-    this.tagList.length && this.clickTag(this.tagList[0]);
33
-    this.tagList.length && this.clickTag(this.tagList[0]);
29
+    setTimeout(() => {
30
+      let menus = JSON.parse(localStorage.getItem("menu"));
31
+      let otherConfig = menus.find(item => item.link == 'otherConfig');
32
+      this.tagList = otherConfig ? (otherConfig.childrens || []) : [];
33
+      this.tagList.length && this.clickTag(this.tagList[0]);
34
+    }, 0)
34 35
   }
35 36
 
36 37
   // 点击tab

+ 6 - 4
src/app/views/page-config/page-config.component.ts

@@ -19,10 +19,12 @@ export class PageConfigComponent implements OnInit, AfterViewInit {
19 19
   ngOnInit(): void {}
20 20
 
21 21
   ngAfterViewInit(){
22
-    let menus = JSON.parse(localStorage.getItem("menu"));
23
-    let pageConfig = menus.find(item => item.link == 'pageConfig');
24
-    this.tagList = pageConfig ? (pageConfig.childrens || []) : [];
25
-    this.tagList.length && this.clickTag(this.tagList[0]);
22
+    setTimeout(() => {
23
+      let menus = JSON.parse(localStorage.getItem("menu"));
24
+      let pageConfig = menus.find(item => item.link == 'pageConfig');
25
+      this.tagList = pageConfig ? (pageConfig.childrens || []) : [];
26
+      this.tagList.length && this.clickTag(this.tagList[0]);
27
+    }, 0)
26 28
   }
27 29
 
28 30
   // 点击tab