Bladeren bron

检查项目

seimin 1 maand geleden
bovenliggende
commit
75c51db51b

+ 133 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.html

@@ -0,0 +1,133 @@
1
+<div class="content priority">
2
+  <div class="contentInner">
3
+    <div class="list-template" id="wechatTable">
4
+      <div class="list-template__content">
5
+        <div class="list-template__bottom">
6
+          <div class="list-template__top" nz-row>
7
+            <div nz-col nzXl='17' class="list-template__searchBox">
8
+              <div class="list-template__searchItem">
9
+                <span class="label">检查类型</span>:
10
+                <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择检查类型" [(ngModel)]="queryData.extra5" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeDeptInp($event)" (nzOpenChange)="openChangeDept($event)" (ngModelChange)="setIsSelecting(true)">
11
+                  <nz-option *ngFor="let option of typeList" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
12
+                </nz-select>
13
+              </div>
14
+              <div class="list-template__searchItem">
15
+                <span class="label">检查科室</span>:
16
+                <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
17
+                  (nzOnSearch)="changeInp($event)" nzAllowClear nzPlaceHolder="请选择检查科室" [(ngModel)]="queryData.extra4">
18
+                  <ng-container *ngFor="let option of deptList">
19
+                    <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
20
+                  </ng-container>
21
+                  <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
22
+                    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
23
+                  </nz-option>
24
+                </nz-select>
25
+              </div>
26
+              <div class="list-template__searchItem">
27
+                <span class="label">项目名称</span>:
28
+                <input nz-input class="formItem" placeholder="请输入项目名称" [(ngModel)]="queryData.name" />
29
+              </div>
30
+            </div>
31
+            <div nz-col nzXl="7" class="list-template__btns">
32
+              <button nz-button class="btn default" (click)="addWechatModal()">新增</button>
33
+              <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
34
+              <button nz-button class="btn default ml8" (click)='getList()'>搜索</button>
35
+            </div>
36
+          </div>
37
+          <nz-table class="list-template__nzTable" [nzData]="dataList" nzSize="middle" [nzShowPagination]="false"
38
+            [nzLoading]="loading1" [nzScroll]="{ y: tableWechatHeight + 'px' }">
39
+            <thead>
40
+              <tr class="thead">
41
+                <th nzWidth="20%">排序号</th>
42
+                <th nzWidth="20%">项目名称</th>
43
+                <th nzWidth="20%">检查科室</th>
44
+                <th nzWidth="20%">检查类型</th>
45
+                <th nzWidth="20%">操作</th>
46
+              </tr>
47
+            </thead>
48
+            <tbody>
49
+              <tr *ngFor="let data of dataList;let i = index">
50
+                <td>{{data.orders}}</td>
51
+                <td>{{data.name}}</td>
52
+                <td>{{data.extra4DTO?.dept}}</td>
53
+                <td>{{data.extra5DTO?.name}}</td>
54
+                <td>
55
+                  <div class="coop">
56
+                    <span (click)="showDelModal(data,'您确认要删除吗?','删除','del')">删除</span>
57
+                    <span (click)="editWechat(data)">编辑</span>
58
+                  </div>
59
+                </td>
60
+              </tr>
61
+            </tbody>
62
+          </nz-table>
63
+        </div>
64
+      </div>
65
+    </div>
66
+  </div>
67
+</div>
68
+
69
+<!-- 操作成功/失败提示框 -->
70
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
71
+  [info]="promptInfo">
72
+</app-prompt-modal>
73
+
74
+<!-- 删除模态框 -->
75
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
76
+(confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
77
+
78
+<!-- 新增/编辑模态框 -->
79
+<div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="modalWechat">
80
+  <div class="modalBody">
81
+    <div class="title">{{modelName}}<i class="icon_transport transport-guanbi" (click)="hideWechatModal()"></i></div>
82
+    <div class="content">
83
+      <form nz-form [formGroup]="validateForm" class="addForm">
84
+        <nz-form-item>
85
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="orders">排序号</nz-form-label>
86
+          <nz-form-control [nzSpan]="18" nzErrorTip="请输入排序号!">
87
+            <nz-input-group>
88
+              <nz-input-number class="w100" formControlName="orders" nzPlaceHolder="请输入排序号" [nzMin]="0" [nzStep]="1" [nzPrecision]="0"></nz-input-number>
89
+            </nz-input-group>
90
+          </nz-form-control>
91
+        </nz-form-item>
92
+        <nz-form-item>
93
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="name">项目名称</nz-form-label>
94
+          <nz-form-control [nzSpan]="18" nzErrorTip="请输入项目名称!">
95
+            <nz-input-group>
96
+              <input formControlName="name" nz-input placeholder="请输入项目名称">
97
+            </nz-input-group>
98
+          </nz-form-control>
99
+        </nz-form-item>
100
+        <nz-form-item>
101
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="extra4">检查科室</nz-form-label>
102
+          <nz-form-control [nzSpan]="18" nzErrorTip="请选择检查科室!">
103
+            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="extra4" nzPlaceHolder="请选择检查科室" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeDeptInp($event)" (nzOpenChange)="openChangeDept($event)" (ngModelChange)="setIsSelecting(true)">
104
+              <ng-container *ngFor="let option of deptList">
105
+                <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
106
+              </ng-container>
107
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
108
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
109
+              </nz-option>
110
+            </nz-select>
111
+          </nz-form-control>
112
+        </nz-form-item>
113
+        <nz-form-item>
114
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="extra5">检查项目</nz-form-label>
115
+          <nz-form-control [nzSpan]="18" nzErrorTip="请选择检查项目!">
116
+            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="extra5" nzPlaceHolder="请选择检查项目" nzServerSearch>
117
+              <ng-container *ngFor="let data of typeList">
118
+                <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
119
+              </ng-container>
120
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
121
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
122
+              </nz-option>
123
+            </nz-select>
124
+          </nz-form-control>
125
+        </nz-form-item>
126
+      </form>
127
+    </div>
128
+    <div class=" display_flex justify-content_flex-center">
129
+      <button nzType="primary" nz-button (click)="submitWechatForm()" [nzLoading]="btnLoading">确认</button>
130
+      <button class="btn cancel" nz-button nzType="default" (click)="hideWechatModal()">取消</button>
131
+    </div>
132
+  </div>
133
+</div>

+ 288 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.less

@@ -0,0 +1,288 @@
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
+    padding: 0!important;
18
+  }
19
+  .content{
20
+    flex: 1;
21
+    min-height: 0;
22
+    display: flex;
23
+    flex-direction: column;
24
+    justify-content: space-between;
25
+    border: 1px solid #EEF3F9;
26
+    &.priority{
27
+      background-color: #fff;
28
+      .contentInner{
29
+        padding: 0 16px 16px;
30
+        border: 1px solid #E8EBEF;
31
+      }
32
+    }
33
+    .contentItem{
34
+      padding: 4px 16px;
35
+      cursor: pointer;
36
+      overflow: hidden;
37
+      text-overflow: ellipsis;
38
+      white-space: nowrap;
39
+      &.active{
40
+        color: @primary-color;
41
+        background-color: #F0F6ED;
42
+        border-radius: 4px;
43
+      }
44
+    }
45
+    .contentInner{
46
+      flex: 1;
47
+      display: flex;
48
+      justify-content: space-between;
49
+      align-items: center;
50
+      padding: 0 16px;
51
+      gap: 16px;
52
+      .contentHead{
53
+        height: 45px;
54
+        display: flex;
55
+        justify-content: space-between;
56
+        align-items: center;
57
+        gap: 16px;
58
+        padding: 0 16px;
59
+        font-size: 16px;
60
+        font-weight: bold;
61
+        border-bottom: 1px solid #D9D9D9;
62
+        .title{
63
+          overflow: hidden;
64
+          text-overflow: ellipsis;
65
+          white-space: nowrap;
66
+        }
67
+        .btns{
68
+          flex-shrink: 0;
69
+        }
70
+      }
71
+      .contentBody{
72
+        padding: 0 8px;
73
+        margin: 4px 0;
74
+        flex: 1;
75
+      }
76
+      .address{
77
+        flex: 1;
78
+        height: 100%;
79
+        background: #FFFFFF;
80
+        border: 1px solid #E8EBEF;
81
+        display: flex;
82
+        flex-direction: column;
83
+        width: 0;
84
+      }
85
+      .addressAssign{
86
+        flex: 3;
87
+        height: 100%;
88
+        background: #FFFFFF;
89
+        border: 1px solid #E8EBEF;
90
+        display: flex;
91
+        flex-direction: column;
92
+        width: 0;
93
+      }
94
+      .list-template__searchItem {
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
+
235
+              .ant-form-item-label {
236
+                text-align: left;
237
+              }
238
+
239
+              .desc {
240
+                margin-top: 5px;
241
+              }
242
+            }
243
+
244
+            .datesControl {
245
+              margin-top: -16px;
246
+
247
+              .ant-form-item-label {
248
+                line-height: 40px;
249
+              }
250
+            }
251
+
252
+            .timer {
253
+              .ant-form-item-label {
254
+                width: 100%;
255
+                text-align: left;
256
+              }
257
+
258
+              .numInp {
259
+                margin-right: 5px;
260
+              }
261
+
262
+              .line {
263
+                margin-right: 5px;
264
+              }
265
+            }
266
+
267
+            .timer2 {
268
+              .ant-form-item-label {
269
+                line-height: 20px;
270
+              }
271
+            }
272
+          }
273
+
274
+          .editForm {
275
+            .ant-form-item {
276
+              margin-bottom: 15px;
277
+
278
+              .ant-form-item-label {
279
+                line-height: 14px;
280
+                text-align: left;
281
+              }
282
+            }
283
+          }
284
+        }
285
+      }
286
+    }
287
+  }
288
+}

+ 309 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.ts

@@ -0,0 +1,309 @@
1
+import { Component, OnInit, Input } from "@angular/core";
2
+import { Subject } from 'rxjs';
3
+import { debounceTime } from 'rxjs/operators';
4
+import { Validators, FormGroup, FormBuilder } from '@angular/forms';
5
+import { ToolService } from 'src/app/services/tool.service';
6
+import { NzMessageService } from 'ng-zorro-antd';
7
+import { MainService } from 'src/app/services/main.service';
8
+
9
+@Component({
10
+  selector: "app-configuration-inspect-inspects",
11
+  templateUrl: "./configuration-inspect-inspects.component.html",
12
+  styleUrls: ["./configuration-inspect-inspects.component.less"],
13
+})
14
+export class ConfigurationInspectInspectsComponent implements OnInit {
15
+  constructor(
16
+    private mainService: MainService,
17
+    private fb: FormBuilder,
18
+    private tool: ToolService,
19
+    private message: NzMessageService,
20
+  ) {}
21
+
22
+  coopData: any = {}; //当前操作列
23
+  hosId: any = this.tool.getCurrentHospital().id;
24
+
25
+  searchTimerSubject = new Subject();
26
+
27
+  ngOnInit() {
28
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
29
+      let fun = v[0];
30
+      fun.call(this, v[1]);
31
+    });
32
+    setTimeout(() => {
33
+      this.tableWechatHeight = document.querySelector('#wechatTable').clientHeight - document.querySelector('#wechatTable .list-template__top').clientHeight - 8 - document.querySelector('#wechatTable .thead').clientHeight;
34
+    }, 0)
35
+    this.getTypes();
36
+    this.getList();
37
+  }
38
+
39
+  // 新增弹框
40
+  modelName = ""; //模态框名称
41
+  modalWechat: boolean = false; //新增/编辑模态框
42
+  add: boolean; //true:新增;false:编辑
43
+  addWechatModal() {
44
+    this.modelName = "新增";
45
+    this.add = true; //新增
46
+    this.modalWechat = true;
47
+    this.initWechatForm();
48
+  }
49
+  //关闭新增/编辑弹框
50
+  hideWechatModal() {
51
+    this.modalWechat = false;
52
+  }
53
+
54
+  // 编辑
55
+  editWechat(data) {
56
+    console.log(data);
57
+    this.modelName = "编辑";
58
+    this.add = false;
59
+    this.modalWechat = true;
60
+    this.initWechatForm();
61
+    this.coopData = data;
62
+    this.validateForm.controls.orders.setValue(data.orders);
63
+    this.validateForm.controls.name.setValue(data.name);
64
+    this.validateForm.controls.extra4.setValue(data.extra4DTO ? data.extra4DTO.id : null);
65
+    this.validateForm.controls.extra5.setValue(data.extra5DTO ? data.extra5DTO.id : null);
66
+
67
+    data.extra4DTO && (this.deptList = [data.extra4DTO]);
68
+  }
69
+
70
+  // 新增/编辑表单提交
71
+  btnLoading: boolean = false; //提交按钮loading状态
72
+  submitWechatForm(): void {
73
+    for (const i in this.validateForm.controls) {
74
+      this.validateForm.controls[i].markAsDirty();
75
+      this.validateForm.controls[i].updateValueAndValidity();
76
+    }
77
+    if (this.validateForm.invalid) {
78
+      return;
79
+    }
80
+    console.log(this.validateForm.value);
81
+    this.btnLoading = true;
82
+    let postData:any = {};
83
+
84
+    let arr = this.dataList.filter(
85
+      (item) => item.name == this.validateForm.value.name && item.id != this.coopData.id
86
+    );
87
+
88
+    //有重复名称
89
+    if (arr.length > 0) {
90
+      this.btnLoading = false;
91
+      this.showPromptModal(
92
+        this.add ? "新增" : "编辑",
93
+        false,
94
+        `存在重复的检查项目名称【${this.validateForm.value.name}】请修改后再保存!`
95
+      );
96
+      return;
97
+    }
98
+
99
+    if (this.add) {
100
+      //增加
101
+      let n = 0;
102
+      if (this.dataList.length > 0) {
103
+        let sortArr = this.dataList.map((item) => Number(item.value));
104
+        n = Math.max.apply(null, sortArr);
105
+      } else {
106
+        n = 0;
107
+      }
108
+      postData = {
109
+        // dictionary: {
110
+          key: "inspect_check_type",
111
+          value: n + 1,
112
+          desc: "检查项目",
113
+          orders: this.validateForm.value.orders,
114
+          name: this.validateForm.value.name,
115
+          extra4: this.validateForm.value.extra4,
116
+          extra5: this.validateForm.value.extra5,
117
+        // }
118
+      };
119
+    } else {
120
+      //编辑
121
+      postData = {
122
+        // dictionary: {
123
+          ...this.coopData,
124
+          ...{
125
+            orders: this.validateForm.value.orders,
126
+            name: this.validateForm.value.name,
127
+            extra4: this.validateForm.value.extra4,
128
+            extra5: this.validateForm.value.extra5,
129
+          }
130
+        // }
131
+      };
132
+    }
133
+    this.mainService
134
+      .simplePost("addData", "dictionary", postData)
135
+      .subscribe((result) => {
136
+        this.btnLoading = false;
137
+        this.hideWechatModal();
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
+  validateForm: FormGroup; //新增/编辑表单
154
+  initWechatForm() {
155
+    this.validateForm = this.fb.group({
156
+      orders: [null, [Validators.required]],
157
+      name: [null, [Validators.required]],
158
+      extra4: [null, [Validators.required]],
159
+      extra5: [null, [Validators.required]],
160
+    });
161
+  }
162
+
163
+  // 重置
164
+  queryData: any = {}
165
+  reset(){
166
+    this.queryData = {};
167
+    this.getList();
168
+  }
169
+
170
+  // 获取列表
171
+  loading1:boolean = false;
172
+  dataList: any[] = []; //表格数据
173
+  tableWechatHeight:number = 0;
174
+  getList() {
175
+    let data = {
176
+      idx: 0,
177
+      sum: 9999,
178
+      dictionary: {
179
+        key: "inspect_check_type",
180
+        name: this.queryData.name,
181
+        extra4: this.queryData.extra4,
182
+        extra5: this.queryData.extra5,
183
+      },
184
+    };
185
+    this.loading1 = true;
186
+    this.mainService
187
+      .getFetchDataList("simple/data", "dictionary", data)
188
+      .subscribe((data) => {
189
+        this.loading1 = false;
190
+        if (data.status == 200) {
191
+          this.dataList = data.list || [];
192
+        }else{
193
+          this.message.error(data.msg || "请求数据失败");
194
+        }
195
+      });
196
+  }
197
+
198
+  // 防抖
199
+  isLoading = false;
200
+  isSelecting:boolean = false; // 是否在选中状态
201
+  searchTimer(fun, e) {
202
+    if (this.isSelecting) {
203
+      this.isSelecting = false; // 重置标志
204
+      return; // 跳过处理
205
+    }
206
+    this.isLoading = true;
207
+    this.searchTimerSubject.next([fun, e]);
208
+  }
209
+
210
+  // 设置标志
211
+  setIsSelecting(flag){
212
+    this.isSelecting = flag; // 设置标志
213
+  }
214
+
215
+  openChangeDept(flag){
216
+    flag && this.setIsSelecting(false);
217
+    flag && this.getDeptList();
218
+  }
219
+
220
+  // 科室搜索
221
+  changeDeptInp(e) {
222
+    this.searchTimer(this.getDeptList, e);
223
+  }
224
+
225
+  // 获取检查科室
226
+  deptList: any = [];
227
+  getDeptList(e = undefined) {
228
+    let postData = {
229
+      idx: 0,
230
+      sum: 20,
231
+      department: {
232
+        searchType: 1,// 简单查询
233
+        hospital: { id: this.hosId },
234
+        dept: e,
235
+      }
236
+    };
237
+    this.isLoading = true;
238
+    this.mainService
239
+      .getFetchDataList("simple/data", "department", postData)
240
+      .subscribe((data) => {
241
+        this.isLoading = false;
242
+        this.deptList = data.list || [];
243
+      });
244
+  }
245
+
246
+  // 获取检查类型
247
+  typeList: any = [];
248
+  getTypes() {
249
+    this.mainService.getDictionary('list', 'inspect_check_item').subscribe((data) => {
250
+      this.isLoading = false;
251
+      this.typeList = data || [];
252
+    });
253
+  }
254
+
255
+  delModal: boolean = false; //删除模态框
256
+  tipsMsg1: string; //提示框信息
257
+  tipsMsg2: string; //操作后信息
258
+  confirmDelType: string; //确认的类型(启用/停用,删除)
259
+  showDelModal(
260
+    data,
261
+    tipsMsg1: string,
262
+    tipsMsg2: string,
263
+    type: string,
264
+  ) {
265
+    this.confirmDelType = type;
266
+    this.delModal = true;
267
+    this.coopData = data;
268
+    this.tipsMsg1 = tipsMsg1;
269
+    this.tipsMsg2 = tipsMsg2;
270
+  }
271
+  // 隐藏删除框
272
+  hideDelModal() {
273
+    this.delModal = false;
274
+  }
275
+  // 确认删除
276
+  confirmDel() {
277
+    this.btnLoading = true;
278
+    if (this.confirmDelType === "del") {
279
+      //删除
280
+      this.mainService
281
+        .simplePost("rmvData", "dictionary", [this.coopData.id])
282
+        .subscribe((data) => {
283
+          this.btnLoading = false;
284
+          this.delModal = false;
285
+          if (data.status == 200) {
286
+            this.showPromptModal(this.tipsMsg2, true, "");
287
+          } else {
288
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
289
+          }
290
+        });
291
+    }
292
+  }
293
+
294
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
295
+  promptContent: string; //操作提示框提示信息
296
+  ifSuccess: boolean; //操作成功/失败
297
+  promptInfo: string; //操作结果提示信息
298
+  promptModalShow: boolean; //操作提示框是否展示
299
+  showPromptModal(con, success, promptInfo?) {
300
+    this.promptModalShow = false;
301
+    this.promptContent = con;
302
+    this.ifSuccess = success;
303
+    this.promptInfo = promptInfo;
304
+    setTimeout(() => {
305
+      this.promptModalShow = true;
306
+    }, 100);
307
+    this.getList();
308
+  }
309
+}

+ 20 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.module.ts

@@ -0,0 +1,20 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { ConfigurationInspectInspectsComponent } from './configuration-inspect-inspects.component';
5
+import { ShareModule } from 'src/app/share/share.module';
6
+
7
+
8
+@NgModule({
9
+  declarations: [
10
+    ConfigurationInspectInspectsComponent,
11
+  ],
12
+  imports: [
13
+    CommonModule,
14
+    ShareModule,
15
+  ],
16
+  exports: [
17
+    ConfigurationInspectInspectsComponent,
18
+  ]
19
+})
20
+export class ConfigurationInspectInspectsModule { }

+ 6 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect.component.html

@@ -58,6 +58,12 @@
58 58
           <app-configuration-inspect-batch [activeDictionaryKey]="activeDictionaryKey" [dictionaryKeyList]="dictionaryKeyList"></app-configuration-inspect-batch>
59 59
         </div>
60 60
       </ng-container>
61
+      <!-- 检查项目 -->
62
+      <ng-container *ngIf="activeDictionaryKey.id == 3">
63
+        <div class="contentBody2">
64
+          <app-configuration-inspect-inspects></app-configuration-inspect-inspects>
65
+        </div>
66
+      </ng-container>
61 67
     </div>
62 68
   </div>
63 69
 </div>

+ 1 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect.component.ts

@@ -60,6 +60,7 @@ export class ConfigurationInspectComponent implements OnInit {
60 60
       ib2DefaultDayStart: [{ label:'+1天', value: 0 }],
61 61
       ib2DefaultDayEnd: [{ label:'+1天', value: 0 }],
62 62
     }},
63
+    { id: 3, name: '检查项目', key: ""},
63 64
   ]
64 65
 
65 66
   // 点击数据字典key

+ 2 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect.module.ts

@@ -4,6 +4,7 @@ import { CommonModule } from '@angular/common';
4 4
 import { ConfigurationInspectComponent } from './configuration-inspect.component';
5 5
 import { ShareModule } from '../../../share/share.module';
6 6
 import { ConfigurationInspectBatchModule } from './configuration-inspect-batch/configuration-inspect-batch.module';
7
+import { ConfigurationInspectInspectsModule } from './configuration-inspect-inspects/configuration-inspect-inspects.module';
7 8
 
8 9
 
9 10
 @NgModule({
@@ -14,6 +15,7 @@ import { ConfigurationInspectBatchModule } from './configuration-inspect-batch/c
14 15
     CommonModule,
15 16
     ShareModule,
16 17
     ConfigurationInspectBatchModule,
18
+    ConfigurationInspectInspectsModule,
17 19
   ],
18 20
   exports: [
19 21
     ConfigurationInspectComponent,