seimin 10 mēneši atpakaļ
vecāks
revīzija
06994afad8

+ 61 - 7
package-lock.json

@@ -39,6 +39,7 @@
39
         "sortablejs": "^1.14.0",
39
         "sortablejs": "^1.14.0",
40
         "swiper": "^6.8.4",
40
         "swiper": "^6.8.4",
41
         "tslib": "^1.9.0",
41
         "tslib": "^1.9.0",
42
+        "uuid": "^10.0.0",
42
         "viewerjs": "^0.10.0",
43
         "viewerjs": "^0.10.0",
43
         "zone.js": "^0.9.1"
44
         "zone.js": "^0.9.1"
44
       },
45
       },
@@ -302,6 +303,16 @@
302
         "npm": ">= 6.2.0"
303
         "npm": ">= 6.2.0"
303
       }
304
       }
304
     },
305
     },
306
+    "node_modules/@angular/cli/node_modules/uuid": {
307
+      "version": "3.4.0",
308
+      "resolved": "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz",
309
+      "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
310
+      "deprecated": "Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.",
311
+      "dev": true,
312
+      "bin": {
313
+        "uuid": "bin/uuid"
314
+      }
315
+    },
305
     "node_modules/@angular/common": {
316
     "node_modules/@angular/common": {
306
       "version": "8.1.3",
317
       "version": "8.1.3",
307
       "resolved": "https://registry.npmmirror.com/@angular/common/-/common-8.1.3.tgz",
318
       "resolved": "https://registry.npmmirror.com/@angular/common/-/common-8.1.3.tgz",
@@ -13659,6 +13670,16 @@
13659
         "node": ">=0.6"
13670
         "node": ">=0.6"
13660
       }
13671
       }
13661
     },
13672
     },
13673
+    "node_modules/request/node_modules/uuid": {
13674
+      "version": "3.4.0",
13675
+      "resolved": "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz",
13676
+      "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
13677
+      "deprecated": "Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.",
13678
+      "dev": true,
13679
+      "bin": {
13680
+        "uuid": "bin/uuid"
13681
+      }
13682
+    },
13662
     "node_modules/require-directory": {
13683
     "node_modules/require-directory": {
13663
       "version": "2.1.1",
13684
       "version": "2.1.1",
13664
       "resolved": "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz",
13685
       "resolved": "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz",
@@ -14648,6 +14669,16 @@
14648
         "node": ">=0.8.0"
14669
         "node": ">=0.8.0"
14649
       }
14670
       }
14650
     },
14671
     },
14672
+    "node_modules/sockjs/node_modules/uuid": {
14673
+      "version": "3.4.0",
14674
+      "resolved": "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz",
14675
+      "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
14676
+      "deprecated": "Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.",
14677
+      "dev": true,
14678
+      "bin": {
14679
+        "uuid": "bin/uuid"
14680
+      }
14681
+    },
14651
     "node_modules/socks": {
14682
     "node_modules/socks": {
14652
       "version": "2.3.3",
14683
       "version": "2.3.3",
14653
       "resolved": "https://registry.npmmirror.com/socks/-/socks-2.3.3.tgz",
14684
       "resolved": "https://registry.npmmirror.com/socks/-/socks-2.3.3.tgz",
@@ -15955,6 +15986,16 @@
15955
         "uuid": "^3.0.0"
15986
         "uuid": "^3.0.0"
15956
       }
15987
       }
15957
     },
15988
     },
15989
+    "node_modules/universal-analytics/node_modules/uuid": {
15990
+      "version": "3.4.0",
15991
+      "resolved": "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz",
15992
+      "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
15993
+      "deprecated": "Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.",
15994
+      "dev": true,
15995
+      "bin": {
15996
+        "uuid": "bin/uuid"
15997
+      }
15998
+    },
15958
     "node_modules/universalify": {
15999
     "node_modules/universalify": {
15959
       "version": "0.1.2",
16000
       "version": "0.1.2",
15960
       "resolved": "https://registry.npmmirror.com/universalify/-/universalify-0.1.2.tgz",
16001
       "resolved": "https://registry.npmmirror.com/universalify/-/universalify-0.1.2.tgz",
@@ -16159,13 +16200,15 @@
16159
       }
16200
       }
16160
     },
16201
     },
16161
     "node_modules/uuid": {
16202
     "node_modules/uuid": {
16162
-      "version": "3.4.0",
16163
-      "resolved": "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz",
16164
-      "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
16165
-      "deprecated": "Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.",
16166
-      "dev": true,
16203
+      "version": "10.0.0",
16204
+      "resolved": "https://registry.npmmirror.com/uuid/-/uuid-10.0.0.tgz",
16205
+      "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",
16206
+      "funding": [
16207
+        "https://github.com/sponsors/broofa",
16208
+        "https://github.com/sponsors/ctavan"
16209
+      ],
16167
       "bin": {
16210
       "bin": {
16168
-        "uuid": "bin/uuid"
16211
+        "uuid": "dist/bin/uuid"
16169
       }
16212
       }
16170
     },
16213
     },
16171
     "node_modules/validate-npm-package-license": {
16214
     "node_modules/validate-npm-package-license": {
@@ -16884,6 +16927,16 @@
16884
         "node": ">=6"
16927
         "node": ">=6"
16885
       }
16928
       }
16886
     },
16929
     },
16930
+    "node_modules/webpack-log/node_modules/uuid": {
16931
+      "version": "3.4.0",
16932
+      "resolved": "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz",
16933
+      "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
16934
+      "deprecated": "Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.",
16935
+      "dev": true,
16936
+      "bin": {
16937
+        "uuid": "bin/uuid"
16938
+      }
16939
+    },
16887
     "node_modules/webpack-merge": {
16940
     "node_modules/webpack-merge": {
16888
       "version": "4.2.1",
16941
       "version": "4.2.1",
16889
       "resolved": "https://registry.npmmirror.com/webpack-merge/-/webpack-merge-4.2.1.tgz",
16942
       "resolved": "https://registry.npmmirror.com/webpack-merge/-/webpack-merge-4.2.1.tgz",
@@ -17314,7 +17367,8 @@
17314
     "node_modules/zone.js": {
17367
     "node_modules/zone.js": {
17315
       "version": "0.9.1",
17368
       "version": "0.9.1",
17316
       "resolved": "https://registry.npmmirror.com/zone.js/-/zone.js-0.9.1.tgz",
17369
       "resolved": "https://registry.npmmirror.com/zone.js/-/zone.js-0.9.1.tgz",
17317
-      "integrity": "sha512-GkPiJL8jifSrKReKaTZ5jkhrMEgXbXYC+IPo1iquBjayRa0q86w3Dipjn8b415jpitMExe9lV8iTsv8tk3DGag=="
17370
+      "integrity": "sha512-GkPiJL8jifSrKReKaTZ5jkhrMEgXbXYC+IPo1iquBjayRa0q86w3Dipjn8b415jpitMExe9lV8iTsv8tk3DGag==",
17371
+      "dev": true
17318
     },
17372
     },
17319
     "node_modules/zrender": {
17373
     "node_modules/zrender": {
17320
       "version": "4.3.2",
17374
       "version": "4.3.2",

+ 1 - 0
package.json

@@ -47,6 +47,7 @@
47
     "sortablejs": "^1.14.0",
47
     "sortablejs": "^1.14.0",
48
     "swiper": "^6.8.4",
48
     "swiper": "^6.8.4",
49
     "tslib": "^1.9.0",
49
     "tslib": "^1.9.0",
50
+    "uuid": "^10.0.0",
50
     "viewerjs": "^0.10.0",
51
     "viewerjs": "^0.10.0",
51
     "zone.js": "^0.9.1"
52
     "zone.js": "^0.9.1"
52
   },
53
   },

+ 1 - 1
proxy.conf.json

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

+ 1 - 0
src/app/share/inspection-address-department-prompt-modal/inspection-address-department-prompt-modal.component.ts

@@ -143,6 +143,7 @@ export class InspectionAddressDepartmentPromptModalComponent implements OnInit {
143
         type: this.searchDto.deptTypeId ? { id: this.searchDto.deptTypeId } : undefined,
143
         type: this.searchDto.deptTypeId ? { id: this.searchDto.deptTypeId } : undefined,
144
         buildIds: this.searchDto.buildId ? this.searchDto.buildId.toString() : undefined,
144
         buildIds: this.searchDto.buildId ? this.searchDto.buildId.toString() : undefined,
145
         cascadeHosId: this.currentHospital.id,
145
         cascadeHosId: this.currentHospital.id,
146
+        bussType: 'inspection',
146
       }
147
       }
147
     }
148
     }
148
     this.hsLoading = true;
149
     this.hsLoading = true;

+ 4 - 4
src/app/share/inspection-configuration-item-prompt-modal/inspection-configuration-item-prompt-modal.component.html

@@ -26,7 +26,7 @@
26
                 <nz-form-item>
26
                 <nz-form-item>
27
                   <nz-form-control [nzSpan]="24" nzErrorTip="请输入选项名称!">
27
                   <nz-form-control [nzSpan]="24" nzErrorTip="请输入选项名称!">
28
                     <nz-input-group>
28
                     <nz-input-group>
29
-                      <input [formControlName]="'name_' + i" nz-input placeholder="请输入选项名称">
29
+                      <input [formControlName]="'name_' + data.id" nz-input placeholder="请输入选项名称">
30
                     </nz-input-group>
30
                     </nz-input-group>
31
                   </nz-form-control>
31
                   </nz-form-control>
32
                 </nz-form-item>
32
                 </nz-form-item>
@@ -35,7 +35,7 @@
35
                 <nz-form-item>
35
                 <nz-form-item>
36
                   <nz-form-control [nzSpan]="24" nzErrorTip="请输入排序号!">
36
                   <nz-form-control [nzSpan]="24" nzErrorTip="请输入排序号!">
37
                     <nz-input-group>
37
                     <nz-input-group>
38
-                      <nz-input-number [formControlName]="'orders_' + i" nzPlaceHolder="排序号"></nz-input-number>
38
+                      <nz-input-number [formControlName]="'orders_' + data.id" nzPlaceHolder="排序号"></nz-input-number>
39
                     </nz-input-group>
39
                     </nz-input-group>
40
                   </nz-form-control>
40
                   </nz-form-control>
41
                 </nz-form-item>
41
                 </nz-form-item>
@@ -43,14 +43,14 @@
43
               <td>
43
               <td>
44
                 <nz-form-item>
44
                 <nz-form-item>
45
                   <nz-form-control [nzSpan]="24">
45
                   <nz-form-control [nzSpan]="24">
46
-                    <label nz-checkbox [formControlName]="'checkDefault_' + i"></label>
46
+                    <label nz-checkbox [formControlName]="'checkDefault_' + data.id"></label>
47
                   </nz-form-control>
47
                   </nz-form-control>
48
                 </nz-form-item>
48
                 </nz-form-item>
49
               </td>
49
               </td>
50
               <td>
50
               <td>
51
                 <nz-form-item>
51
                 <nz-form-item>
52
                   <nz-form-control [nzSpan]="24" nzErrorTip="请选择异常标记!">
52
                   <nz-form-control [nzSpan]="24" nzErrorTip="请选择异常标记!">
53
-                    <nz-radio-group [formControlName]="'exception_' + i">
53
+                    <nz-radio-group [formControlName]="'exception_' + data.id">
54
                       <label style="width: 130px;text-align: left;" nz-radio [nzValue]="1">选中标记异常</label>
54
                       <label style="width: 130px;text-align: left;" nz-radio [nzValue]="1">选中标记异常</label>
55
                       <label nz-radio [nzValue]="0">未选中标记异常</label>
55
                       <label nz-radio [nzValue]="0">未选中标记异常</label>
56
                     </nz-radio-group>
56
                     </nz-radio-group>

+ 18 - 16
src/app/share/inspection-configuration-item-prompt-modal/inspection-configuration-item-prompt-modal.component.ts

@@ -4,6 +4,7 @@ import { ToolService } from 'src/app/services/tool.service';
4
 import { FormGroup, Validators, FormBuilder, FormControl } from '@angular/forms';
4
 import { FormGroup, Validators, FormBuilder, FormControl } from '@angular/forms';
5
 import { NzMessageService } from 'ng-zorro-antd';
5
 import { NzMessageService } from 'ng-zorro-antd';
6
 import countBy from 'lodash-es/countBy';
6
 import countBy from 'lodash-es/countBy';
7
+import { v4 as uuidv4 } from 'uuid';
7
 
8
 
8
 @Component({
9
 @Component({
9
   selector: 'app-inspection-configuration-item-prompt-modal',
10
   selector: 'app-inspection-configuration-item-prompt-modal',
@@ -73,15 +74,14 @@ export class InspectionConfigurationItemPromptModalComponent implements OnInit {
73
       itemId: this.coopData.id,
74
       itemId: this.coopData.id,
74
       configList: [],
75
       configList: [],
75
     };
76
     };
76
-    const configNum = Object.keys(this.validateForm.value).length / 4;
77
-    for (let i = 0; i < configNum; i++) {
77
+    for (let i = 0; i < this.historySpecimenList.length; i++) {
78
       postData.configList.push({
78
       postData.configList.push({
79
-        name: this.validateForm.value['name_' + i],
80
-        valuex: this.validateForm.value['name_' + i],
81
-        orders: this.validateForm.value['orders_' + i],
82
-        checkDefault: this.validateForm.value['checkDefault_' + i] ? 1 : 0,
83
-        checkException: this.validateForm.value['exception_' + i],
84
-        uncheckException: this.validateForm.value['exception_' + i] === 1 ? 0 : 1,
79
+        name: this.validateForm.value['name_' + this.historySpecimenList[i].id],
80
+        valuex: this.validateForm.value['name_' + this.historySpecimenList[i].id],
81
+        orders: this.validateForm.value['orders_' + this.historySpecimenList[i].id],
82
+        checkDefault: this.validateForm.value['checkDefault_' + this.historySpecimenList[i].id] ? 1 : 0,
83
+        checkException: this.validateForm.value['exception_' + this.historySpecimenList[i].id],
84
+        uncheckException: this.validateForm.value['exception_' + this.historySpecimenList[i].id] === 1 ? 0 : 1,
85
       })
85
       })
86
     }
86
     }
87
     // 下拉框只允许勾选一个默认选中
87
     // 下拉框只允许勾选一个默认选中
@@ -114,6 +114,7 @@ export class InspectionConfigurationItemPromptModalComponent implements OnInit {
114
   // 添加
114
   // 添加
115
   addField(): void {
115
   addField(): void {
116
     let obj = {
116
     let obj = {
117
+      id: uuidv4(),
117
       name: null,
118
       name: null,
118
       orders: null,
119
       orders: null,
119
       checkDefault: false,
120
       checkDefault: false,
@@ -122,11 +123,11 @@ export class InspectionConfigurationItemPromptModalComponent implements OnInit {
122
 
123
 
123
     // 动态添加表单
124
     // 动态添加表单
124
     for (const key in obj) {
125
     for (const key in obj) {
125
-      console.log(key + '_' + this.historySpecimenList.length)
126
+      console.log(key + '_' + obj.id)
126
       if(key === 'checkDefault'){
127
       if(key === 'checkDefault'){
127
-        this.validateForm.addControl(key + '_' + this.historySpecimenList.length, new FormControl(false))
128
-      }else{
129
-        this.validateForm.addControl(key + '_' + this.historySpecimenList.length, new FormControl(null, [Validators.required]))
128
+        this.validateForm.addControl(key + '_' + obj.id, new FormControl(false))
129
+      }else if(key !== 'id'){
130
+        this.validateForm.addControl(key + '_' + obj.id, new FormControl(null, [Validators.required]))
130
       }
131
       }
131
     }
132
     }
132
 
133
 
@@ -143,7 +144,7 @@ export class InspectionConfigurationItemPromptModalComponent implements OnInit {
143
     this.historySpecimenList = [...this.historySpecimenList];
144
     this.historySpecimenList = [...this.historySpecimenList];
144
     // 动态删除表单
145
     // 动态删除表单
145
     for (const key in obj) {
146
     for (const key in obj) {
146
-      this.validateForm.removeControl(key + '_' + i);
147
+      this.validateForm.removeControl(key + '_' + obj.id);
147
     }
148
     }
148
   }
149
   }
149
 
150
 
@@ -166,6 +167,7 @@ export class InspectionConfigurationItemPromptModalComponent implements OnInit {
166
       let list = data.list || [];
167
       let list = data.list || [];
167
       this.historySpecimenList = list.map(v => {
168
       this.historySpecimenList = list.map(v => {
168
         return {
169
         return {
170
+          id: uuidv4(),
169
           name: v.name || null,
171
           name: v.name || null,
170
           orders: v.orders || null,
172
           orders: v.orders || null,
171
           checkDefault: v.checkDefault || false,
173
           checkDefault: v.checkDefault || false,
@@ -177,9 +179,9 @@ export class InspectionConfigurationItemPromptModalComponent implements OnInit {
177
       this.historySpecimenList.forEach((obj, i) => {
179
       this.historySpecimenList.forEach((obj, i) => {
178
         for (const key in obj) {
180
         for (const key in obj) {
179
           if(key === 'checkDefault'){
181
           if(key === 'checkDefault'){
180
-            this.validateForm.addControl(key + '_' + i, new FormControl(obj[key]))
181
-          }else{
182
-            this.validateForm.addControl(key + '_' + i, new FormControl(obj[key], [Validators.required]))
182
+            this.validateForm.addControl(key + '_' + obj.id, new FormControl(obj[key]))
183
+          }else if(key !== 'id'){
184
+            this.validateForm.addControl(key + '_' + obj.id, new FormControl(obj[key], [Validators.required]))
183
           }
185
           }
184
         }
186
         }
185
       })
187
       })

+ 2 - 2
src/app/views/inspection-address/inspection-address.component.html

@@ -72,8 +72,8 @@
72
             <td>{{data.signType?.name}}</td>
72
             <td>{{data.signType?.name}}</td>
73
             <td>
73
             <td>
74
               <div class="coop">
74
               <div class="coop">
75
-                <span *ngIf="coopBtns.edit" (click)="edit(data)">编辑</span>
76
-                <span *ngIf="coopBtns.del" (click)="showDelModal(data,'删除后您配置的相关巡检计划,下次执行时不在生成巡检任务,您确认要删除吗?','删除','del')">删除</span>
75
+                <span *ngIf="coopBtns.edit" (click)="edit($event, data)">编辑</span>
76
+                <span *ngIf="coopBtns.del" (click)="showDelModal($event, data,'删除后您配置的相关巡检计划,下次执行时不在生成巡检任务,您确认要删除吗?','删除','del')">删除</span>
77
               </div>
77
               </div>
78
             </td>
78
             </td>
79
           </tr>
79
           </tr>

+ 29 - 23
src/app/views/inspection-address/inspection-address.component.ts

@@ -186,7 +186,7 @@ export class InspectionAddressComponent implements OnInit {
186
 
186
 
187
   // 搜索
187
   // 搜索
188
   search() {
188
   search() {
189
-    this.getList(0);
189
+    this.getList(1);
190
   }
190
   }
191
   // 重置
191
   // 重置
192
   reset() {
192
   reset() {
@@ -263,7 +263,7 @@ export class InspectionAddressComponent implements OnInit {
263
   departmentAddList: any = []; //所有所属科室
263
   departmentAddList: any = []; //所有所属科室
264
   departmentSearchList: any = []; //所有所属科室(搜索)
264
   departmentSearchList: any = []; //所有所属科室(搜索)
265
   getDeparts(type, keyword, init = false) {
265
   getDeparts(type, keyword, init = false) {
266
-    let postData = {
266
+    let postData:any = {
267
       department: {
267
       department: {
268
         // searchType: 1,// 简单查询
268
         // searchType: 1,// 简单查询
269
         dept: keyword,
269
         dept: keyword,
@@ -272,6 +272,9 @@ export class InspectionAddressComponent implements OnInit {
272
       idx: 0,
272
       idx: 0,
273
       sum: 20,
273
       sum: 20,
274
     };
274
     };
275
+    if(type === 'add'){
276
+      postData.department.bussType = 'inspection';
277
+    }
275
     this.mainService
278
     this.mainService
276
       .getFetchDataList("data", "department", postData)
279
       .getFetchDataList("data", "department", postData)
277
       .subscribe((data) => {
280
       .subscribe((data) => {
@@ -338,20 +341,20 @@ export class InspectionAddressComponent implements OnInit {
338
         }
341
         }
339
         this.isLoading = false;
342
         this.isLoading = false;
340
 
343
 
341
-        if(init && this.deptDto && this.deptDto.building && !this.validateForm.value.buildId){
342
-          let buildId = this.deptDto.building.id;
343
-          let flag = this.buildingAddList.some(v => v.id == buildId);
344
-          if(!flag){
345
-            this.buildingAddList.unshift(this.deptDto.building)
346
-          }
347
-          this.validateForm.controls.buildId.setValue(this.deptDto.building.id);
348
-        } else if(init && this.coopData && this.coopData.buildingDTO){
344
+        if(init && this.coopData && this.coopData.buildingDTO){
349
           let buildId = this.coopData.buildingDTO.id;
345
           let buildId = this.coopData.buildingDTO.id;
350
           let flag = this.buildingAddList.some(v => v.id == buildId);
346
           let flag = this.buildingAddList.some(v => v.id == buildId);
351
           if(!flag){
347
           if(!flag){
352
             this.buildingAddList.unshift(this.coopData.buildingDTO)
348
             this.buildingAddList.unshift(this.coopData.buildingDTO)
353
           }
349
           }
354
           this.validateForm.controls.buildId.setValue(this.coopData.buildingDTO.id);
350
           this.validateForm.controls.buildId.setValue(this.coopData.buildingDTO.id);
351
+        } else if (this.deptDto && this.deptDto.building){
352
+          let buildId = this.deptDto.building.id;
353
+          let flag = this.buildingAddList.some(v => v.id == buildId);
354
+          if(!flag){
355
+            this.buildingAddList.unshift(this.deptDto.building)
356
+          }
357
+          this.validateForm.controls.buildId.setValue(this.deptDto.building.id);
355
         }
358
         }
356
       });
359
       });
357
   }
360
   }
@@ -367,13 +370,13 @@ export class InspectionAddressComponent implements OnInit {
367
         this.validateForm.controls.name.setValue(this.deptDto.dept);
370
         this.validateForm.controls.name.setValue(this.deptDto.dept);
368
       }
371
       }
369
 
372
 
370
-      if(this.deptDto && this.deptDto.building && !this.validateForm.value.buildId){
371
-        this.getBuildings('add', '', true);
373
+      if(this.deptDto && this.deptDto.building){
374
+        this.getBuildings('add', '');
372
       }
375
       }
373
 
376
 
374
-      if(this.deptDto && this.deptDto.floor && !this.validateForm.value.floorId){
377
+      if(this.deptDto && this.deptDto.floor){
375
         this.noChangeBuilding = true;
378
         this.noChangeBuilding = true;
376
-        this.getFloors('add', '', this.deptDto.building.id, true);
379
+        this.getFloors('add', '', this.deptDto.building.id);
377
       }
380
       }
378
     }
381
     }
379
   }
382
   }
@@ -411,20 +414,20 @@ export class InspectionAddressComponent implements OnInit {
411
         this.floorList = data.list;
414
         this.floorList = data.list;
412
         this.isLoading = false;
415
         this.isLoading = false;
413
 
416
 
414
-        if(init && this.deptDto && this.deptDto.floor && !this.validateForm.value.floorId){
415
-          let floorId = this.deptDto.floor.id;
416
-          let flag = this.floorList.some(v => v.id == floorId);
417
-          if(!flag){
418
-            this.floorList.unshift(this.deptDto.floor)
419
-          }
420
-          this.validateForm.controls.floorId.setValue(this.deptDto.floor.id);
421
-        } else if(init && this.coopData && this.coopData.floorDTO){
417
+        if(init && this.coopData && this.coopData.floorDTO){
422
           let floorId = this.coopData.floorDTO.id;
418
           let floorId = this.coopData.floorDTO.id;
423
           let flag = this.floorList.some(v => v.id == floorId);
419
           let flag = this.floorList.some(v => v.id == floorId);
424
           if(!flag){
420
           if(!flag){
425
             this.floorList.unshift(this.coopData.floorDTO)
421
             this.floorList.unshift(this.coopData.floorDTO)
426
           }
422
           }
427
           this.validateForm.controls.floorId.setValue(this.coopData.floorDTO.id);
423
           this.validateForm.controls.floorId.setValue(this.coopData.floorDTO.id);
424
+        } else if (this.deptDto && this.deptDto.floor){
425
+          let floorId = this.deptDto.floor.id;
426
+          let flag = this.floorList.some(v => v.id == floorId);
427
+          if(!flag){
428
+            this.floorList.unshift(this.deptDto.floor)
429
+          }
430
+          this.validateForm.controls.floorId.setValue(this.deptDto.floor.id);
428
         }
431
         }
429
       });
432
       });
430
   }
433
   }
@@ -552,7 +555,8 @@ export class InspectionAddressComponent implements OnInit {
552
   }
555
   }
553
 
556
 
554
   // 编辑
557
   // 编辑
555
-  edit(data) {
558
+  edit(e, data) {
559
+    e.stopPropagation();
556
     console.log(data);
560
     console.log(data);
557
     this.initForm();
561
     this.initForm();
558
     this.modelName = "编辑";
562
     this.modelName = "编辑";
@@ -596,11 +600,13 @@ export class InspectionAddressComponent implements OnInit {
596
   tipsMsg2: string; //操作后信息
600
   tipsMsg2: string; //操作后信息
597
   confirmDelType: string; //确认的类型(启用/停用,删除)
601
   confirmDelType: string; //确认的类型(启用/停用,删除)
598
   showDelModal(
602
   showDelModal(
603
+    e,
599
     data,
604
     data,
600
     tipsMsg1: string,
605
     tipsMsg1: string,
601
     tipsMsg2: string,
606
     tipsMsg2: string,
602
     type: string,
607
     type: string,
603
   ) {
608
   ) {
609
+    e.stopPropagation();
604
     this.confirmDelType = type;
610
     this.confirmDelType = type;
605
     this.delModal = true;
611
     this.delModal = true;
606
     this.coopData = data;
612
     this.coopData = data;

+ 1 - 1
src/app/views/inspection-batch/inspection-batch.component.ts

@@ -126,7 +126,7 @@ export class InspectionBatchComponent implements OnInit {
126
 
126
 
127
   // 搜索
127
   // 搜索
128
   search() {
128
   search() {
129
-    this.getList(0);
129
+    this.getList(1);
130
   }
130
   }
131
   // 重置
131
   // 重置
132
   reset() {
132
   reset() {

+ 2 - 2
src/app/views/inspection-configuration-item/inspection-configuration-item.component.html

@@ -33,7 +33,7 @@
33
               <td>{{data.showError === 1 ? '是' : (data.showError === 0 ? '否' : '')}}</td>
33
               <td>{{data.showError === 1 ? '是' : (data.showError === 0 ? '否' : '')}}</td>
34
               <td>
34
               <td>
35
                 <div class="coop">
35
                 <div class="coop">
36
-                  <span (click)="showDelModal(data,'您确认要删除吗?','删除','del')">删除</span>
36
+                  <span (click)="showDelModal(data,'您确认要删除吗?','删除','del')" *ngIf="inspectionConfigurationDetail.status.value === '0'">删除</span>
37
                   <span (click)="edit(data)">编辑</span>
37
                   <span (click)="edit(data)">编辑</span>
38
                   <span (click)="showModelInspectionConfigurationItem(data)" *ngIf="data.type.value === '1' || data.type.value === '2' || data.type.value === '3'">选择项配置</span>
38
                   <span (click)="showModelInspectionConfigurationItem(data)" *ngIf="data.type.value === '1' || data.type.value === '2' || data.type.value === '3'">选择项配置</span>
39
                   <span (click)="showDelModal(data,'您确认要隐藏吗?','隐藏','hidden')" *ngIf="inspectionConfigurationDetail.status.value === '1' && data.display === 1">隐藏</span>
39
                   <span (click)="showDelModal(data,'您确认要隐藏吗?','隐藏','hidden')" *ngIf="inspectionConfigurationDetail.status.value === '1' && data.display === 1">隐藏</span>
@@ -72,7 +72,7 @@
72
               <nz-form-label [nzSpan]="6" nzRequired nzFor="type">填&nbsp;写&nbsp;方&nbsp;式</nz-form-label>
72
               <nz-form-label [nzSpan]="6" nzRequired nzFor="type">填&nbsp;写&nbsp;方&nbsp;式</nz-form-label>
73
               <nz-form-control [nzSpan]="18" nzErrorTip="请选择填写方式!">
73
               <nz-form-control [nzSpan]="18" nzErrorTip="请选择填写方式!">
74
                 <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="type" nzShowSearch
74
                 <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="type" nzShowSearch
75
-                  nzPlaceHolder="请选择填写方式" nzServerSearch (ngModelChange)="changeType($event)">
75
+                  nzPlaceHolder="请选择填写方式" nzServerSearch (ngModelChange)="changeType($event)" [nzDisabled]="inspectionConfigurationDetail.status.value !== '0'">
76
                   <ng-container *ngFor="let data of dispatchMethods">
76
                   <ng-container *ngFor="let data of dispatchMethods">
77
                     <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.value"></nz-option>
77
                     <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.value"></nz-option>
78
                   </ng-container>
78
                   </ng-container>

+ 4 - 2
src/app/views/inspection-configuration-item/inspection-configuration-item.component.ts

@@ -55,8 +55,10 @@ export class InspectionConfigurationItemComponent implements OnInit, AfterViewIn
55
   }
55
   }
56
 
56
 
57
   ngAfterViewInit(){
57
   ngAfterViewInit(){
58
-    this.pageHeight = document.querySelector('.list-template__bottom').clientHeight - document.querySelector('.list-template__top').clientHeight - 8;
59
-    this.tableHeight = this.pageHeight - document.querySelector('.thead').clientHeight;
58
+    setTimeout(() => {
59
+      this.pageHeight = document.querySelector('.list-template__bottom').clientHeight - document.querySelector('.list-template__top').clientHeight - 8;
60
+      this.tableHeight = this.pageHeight - document.querySelector('.thead').clientHeight;
61
+    }, 0)
60
   }
62
   }
61
 
63
 
62
   // 初始化增删改按钮
64
   // 初始化增删改按钮

+ 1 - 1
src/app/views/inspection-execute/inspection-execute.component.ts

@@ -147,7 +147,7 @@ export class InspectionExecuteComponent implements OnInit {
147
 
147
 
148
   // 搜索
148
   // 搜索
149
   search() {
149
   search() {
150
-    this.getList(0);
150
+    this.getList(1);
151
   }
151
   }
152
   // 重置
152
   // 重置
153
   reset() {
153
   reset() {

+ 1 - 0
src/app/views/inspection-plan/inspection-plan.component.ts

@@ -151,6 +151,7 @@ export class InspectionPlanComponent implements OnInit {
151
       inspectionForm: {
151
       inspectionForm: {
152
         hosId: this.hosId,
152
         hosId: this.hosId,
153
         name: keyWord,
153
         name: keyWord,
154
+        status: { value: '1' },
154
       },
155
       },
155
     };
156
     };
156
     this.mainService
157
     this.mainService