seimin 2 gadi atpakaļ
vecāks
revīzija
0193505545

+ 2 - 4
angular.json

@@ -34,8 +34,7 @@
34 34
             ],
35 35
             "styles": [
36 36
               "src/styles.less",
37
-              "src/assets/iconfont/iconfont.css",
38
-              "node_modules/viewerjs/dist/viewer.min.css"
37
+              "src/assets/iconfont/iconfont.css"
39 38
             ],
40 39
             "scripts": [
41 40
               "node_modules/echarts/dist/echarts.min.js"
@@ -104,8 +103,7 @@
104 103
             ],
105 104
             "styles": [
106 105
               "src/styles.less",
107
-              "src/assets/iconfont/iconfont.css",
108
-              "node_modules/viewerjs/dist/viewer.min.css"
106
+              "src/assets/iconfont/iconfont.css"
109 107
             ],
110 108
             "scripts": [
111 109
               "node_modules/echarts/dist/echarts.min.js"

+ 38 - 21
package-lock.json

@@ -26,6 +26,7 @@
26 26
         "echarts": "^4.6.0",
27 27
         "ng-zorro-antd": "^8.5.2",
28 28
         "ngx-echarts": "^4.2.2",
29
+        "ngx-print": "^1.2.1",
29 30
         "ngx-sortablejs": "^3.1.3",
30 31
         "npm": "^6.14.15",
31 32
         "overlayscrollbars": "^1.11.0",
@@ -33,7 +34,7 @@
33 34
         "rxjs": "~6.4.0",
34 35
         "sortablejs": "^1.14.0",
35 36
         "tslib": "^1.9.0",
36
-        "viewerjs": "^1.10.5",
37
+        "viewerjs": "^0.10.0",
37 38
         "zone.js": "^0.9.1"
38 39
       },
39 40
       "devDependencies": {
@@ -7631,6 +7632,18 @@
7631 7632
         "echarts": ">=3.1.1"
7632 7633
       }
7633 7634
     },
7635
+    "node_modules/ngx-print": {
7636
+      "version": "1.2.1",
7637
+      "resolved": "https://registry.npmmirror.com/ngx-print/-/ngx-print-1.2.1.tgz",
7638
+      "integrity": "sha512-+xz5wbVO9N5vAT/W6dgTzbE1RBB1jUeBOSF04Gs66QqTrb46paRAjHgqMr4TvE8CUiTp5aMmkL54QEKat9gj6w==",
7639
+      "dependencies": {
7640
+        "tslib": "^1.9.3"
7641
+      },
7642
+      "peerDependencies": {
7643
+        "@angular/common": "*",
7644
+        "@angular/core": "*"
7645
+      }
7646
+    },
7634 7647
     "node_modules/ngx-sortablejs": {
7635 7648
       "version": "3.1.4",
7636 7649
       "resolved": "https://registry.npm.taobao.org/ngx-sortablejs/download/ngx-sortablejs-3.1.4.tgz",
@@ -15948,9 +15961,9 @@
15948 15961
       }
15949 15962
     },
15950 15963
     "node_modules/viewerjs": {
15951
-      "version": "1.10.5",
15952
-      "resolved": "https://registry.npmmirror.com/viewerjs/-/viewerjs-1.10.5.tgz",
15953
-      "integrity": "sha512-QwKrmXlSfKg5x4y74F/jicpHIRqBMMfHXyboOxHDi5n4XAaejjpalphPq4/HW6venQAoMiD57HpVwBk0JvqpSA=="
15964
+      "version": "0.10.0",
15965
+      "resolved": "https://registry.npmmirror.com/viewerjs/-/viewerjs-0.10.0.tgz",
15966
+      "integrity": "sha512-bNx8kfK561QilHXlqGPiOIDvr5v1bitElz7SYvHdYK9y+OnlzULsxX0zNRFrFiwWALmvGWAoHmWRCH7MBxRAGw=="
15954 15967
     },
15955 15968
     "node_modules/vm-browserify": {
15956 15969
       "version": "1.1.2",
@@ -16999,7 +17012,8 @@
16999 17012
     "node_modules/zone.js": {
17000 17013
       "version": "0.9.1",
17001 17014
       "resolved": "https://registry.npm.taobao.org/zone.js/download/zone.js-0.9.1.tgz",
17002
-      "integrity": "sha1-43xuXFTBP65N4mtf/o2OkhLabZs="
17015
+      "integrity": "sha1-43xuXFTBP65N4mtf/o2OkhLabZs=",
17016
+      "dev": true
17003 17017
     },
17004 17018
     "node_modules/zrender": {
17005 17019
       "version": "4.3.2",
@@ -18075,8 +18089,7 @@
18075 18089
       "version": "4.0.0",
18076 18090
       "resolved": "https://registry.npm.taobao.org/acorn-dynamic-import/download/acorn-dynamic-import-4.0.0.tgz",
18077 18091
       "integrity": "sha1-SCIQFAWCo2uDw+NC4c/ryqkkCUg=",
18078
-      "dev": true,
18079
-      "requires": {}
18092
+      "dev": true
18080 18093
     },
18081 18094
     "acorn-walk": {
18082 18095
       "version": "7.2.0",
@@ -18130,15 +18143,13 @@
18130 18143
       "version": "1.0.1",
18131 18144
       "resolved": "https://registry.npm.taobao.org/ajv-errors/download/ajv-errors-1.0.1.tgz",
18132 18145
       "integrity": "sha1-81mGrOuRr63sQQL72FAUlQzvpk0=",
18133
-      "dev": true,
18134
-      "requires": {}
18146
+      "dev": true
18135 18147
     },
18136 18148
     "ajv-keywords": {
18137 18149
       "version": "3.5.2",
18138 18150
       "resolved": "https://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-3.5.2.tgz?cache=0&sync_timestamp=1616882384060&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv-keywords%2Fdownload%2Fajv-keywords-3.5.2.tgz",
18139 18151
       "integrity": "sha1-MfKdpatuANHC0yms97WSlhTVAU0=",
18140
-      "dev": true,
18141
-      "requires": {}
18152
+      "dev": true
18142 18153
     },
18143 18154
     "amdefine": {
18144 18155
       "version": "1.0.1",
@@ -19239,8 +19250,7 @@
19239 19250
       "version": "5.0.2",
19240 19251
       "resolved": "https://registry.npm.taobao.org/circular-dependency-plugin/download/circular-dependency-plugin-5.0.2.tgz",
19241 19252
       "integrity": "sha1-2haMCzfntDVj+5+RLBwAfCEzie8=",
19242
-      "dev": true,
19243
-      "requires": {}
19253
+      "dev": true
19244 19254
     },
19245 19255
     "class-utils": {
19246 19256
       "version": "0.3.6",
@@ -22635,8 +22645,7 @@
22635 22645
       "version": "1.7.0",
22636 22646
       "resolved": "https://registry.nlark.com/karma-jasmine-html-reporter/download/karma-jasmine-html-reporter-1.7.0.tgz",
22637 22647
       "integrity": "sha1-UsSJp012CTShCJv6XqSo/LhMwos=",
22638
-      "dev": true,
22639
-      "requires": {}
22648
+      "dev": true
22640 22649
     },
22641 22650
     "karma-source-map-support": {
22642 22651
       "version": "1.4.0",
@@ -23368,6 +23377,14 @@
23368 23377
         "tslib": "^1.9.0"
23369 23378
       }
23370 23379
     },
23380
+    "ngx-print": {
23381
+      "version": "1.2.1",
23382
+      "resolved": "https://registry.npmmirror.com/ngx-print/-/ngx-print-1.2.1.tgz",
23383
+      "integrity": "sha512-+xz5wbVO9N5vAT/W6dgTzbE1RBB1jUeBOSF04Gs66QqTrb46paRAjHgqMr4TvE8CUiTp5aMmkL54QEKat9gj6w==",
23384
+      "requires": {
23385
+        "tslib": "^1.9.3"
23386
+      }
23387
+    },
23371 23388
     "ngx-sortablejs": {
23372 23389
       "version": "3.1.4",
23373 23390
       "resolved": "https://registry.npm.taobao.org/ngx-sortablejs/download/ngx-sortablejs-3.1.4.tgz",
@@ -26966,8 +26983,7 @@
26966 26983
     "overlayscrollbars-ngx": {
26967 26984
       "version": "0.1.1",
26968 26985
       "resolved": "https://registry.nlark.com/overlayscrollbars-ngx/download/overlayscrollbars-ngx-0.1.1.tgz",
26969
-      "integrity": "sha1-APyVynU9vV7by2Njp9AokJJVIow=",
26970
-      "requires": {}
26986
+      "integrity": "sha1-APyVynU9vV7by2Njp9AokJJVIow="
26971 26987
     },
26972 26988
     "p-defer": {
26973 26989
       "version": "1.0.0",
@@ -29922,9 +29938,9 @@
29922 29938
       }
29923 29939
     },
29924 29940
     "viewerjs": {
29925
-      "version": "1.10.5",
29926
-      "resolved": "https://registry.npmmirror.com/viewerjs/-/viewerjs-1.10.5.tgz",
29927
-      "integrity": "sha512-QwKrmXlSfKg5x4y74F/jicpHIRqBMMfHXyboOxHDi5n4XAaejjpalphPq4/HW6venQAoMiD57HpVwBk0JvqpSA=="
29941
+      "version": "0.10.0",
29942
+      "resolved": "https://registry.npmmirror.com/viewerjs/-/viewerjs-0.10.0.tgz",
29943
+      "integrity": "sha512-bNx8kfK561QilHXlqGPiOIDvr5v1bitElz7SYvHdYK9y+OnlzULsxX0zNRFrFiwWALmvGWAoHmWRCH7MBxRAGw=="
29928 29944
     },
29929 29945
     "vm-browserify": {
29930 29946
       "version": "1.1.2",
@@ -30785,7 +30801,8 @@
30785 30801
     "zone.js": {
30786 30802
       "version": "0.9.1",
30787 30803
       "resolved": "https://registry.npm.taobao.org/zone.js/download/zone.js-0.9.1.tgz",
30788
-      "integrity": "sha1-43xuXFTBP65N4mtf/o2OkhLabZs="
30804
+      "integrity": "sha1-43xuXFTBP65N4mtf/o2OkhLabZs=",
30805
+      "dev": true
30789 30806
     },
30790 30807
     "zrender": {
30791 30808
       "version": "4.3.2",

+ 2 - 1
package.json

@@ -31,6 +31,7 @@
31 31
     "echarts": "^4.6.0",
32 32
     "ng-zorro-antd": "^8.5.2",
33 33
     "ngx-echarts": "^4.2.2",
34
+    "ngx-print": "^1.2.1",
34 35
     "ngx-sortablejs": "^3.1.3",
35 36
     "npm": "^6.14.15",
36 37
     "overlayscrollbars": "^1.11.0",
@@ -38,7 +39,7 @@
38 39
     "rxjs": "~6.4.0",
39 40
     "sortablejs": "^1.14.0",
40 41
     "tslib": "^1.9.0",
41
-    "viewerjs": "^1.10.5",
42
+    "viewerjs": "^0.10.0",
42 43
     "zone.js": "^0.9.1"
43 44
   },
44 45
   "devDependencies": {

+ 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.3.207",
4 4
     "logLevel": "debug",
5 5
     "changeOrigin": true,
6 6
     "pathRewrite": {

+ 36 - 0
src/app/services/main.service.ts

@@ -608,4 +608,40 @@ export class MainService {
608 608
       }
609 609
     );
610 610
   }
611
+  //查询楼栋核酸
612
+  getNucleicAcidBuildingSummary(data) {
613
+    return this.http.post(
614
+      host.host + "/workerOrder/nucleicAcidBuildingSummary",
615
+      data,
616
+      {
617
+        headers: this.headers,
618
+      }
619
+    );
620
+  }
621
+  //打印楼栋核酸
622
+  printNucleicAcid(data) {
623
+    return this.http.post(
624
+      host.host + "/api/printNucleicAcid",
625
+      data,
626
+      {
627
+        headers: this.headers,
628
+      }
629
+    );
630
+  }
631
+  //获取核酸图片
632
+  getPreviewImage(type, id) {
633
+    return this.http.get(host.host + "/common/common/listAttachment/"+ type +"/" + id, {
634
+      headers: this.headers,
635
+    });
636
+  }
637
+  //补充打印楼栋核酸
638
+  supplementPrintNucleicAcid(data) {
639
+    return this.http.post(
640
+      host.host + "/api/supplementPrintNucleicAcid",
641
+      data,
642
+      {
643
+        headers: this.headers,
644
+      }
645
+    );
646
+  }
611 647
 }

+ 10 - 7
src/app/share/image-viewer/image-viewer.component.ts

@@ -1,29 +1,32 @@
1
-import { Component, ElementRef, Input, OnInit, ViewChild } from "@angular/core";
1
+import { Component, ElementRef, Input, OnInit, ViewChild, AfterViewInit, OnDestroy } from "@angular/core";
2 2
 import Viewer from 'viewerjs';
3 3
 @Component({
4 4
   selector: "app-image-viewer",
5 5
   templateUrl: "./image-viewer.component.html",
6 6
   styleUrls: ["./image-viewer.component.less"],
7 7
 })
8
-export class ImageViewerComponent implements OnInit {
8
+export class ImageViewerComponent implements OnInit, AfterViewInit,OnDestroy {
9 9
   @ViewChild("ljImgViewerId", { static: false }) ljImgViewer: ElementRef;
10 10
   // 图片地址
11 11
   @Input() imageUrl: any = [];
12 12
   // 默认预览图大小 (单位px)
13 13
   @Input() width: any = 100;
14 14
   @Input() height: any = 100;
15
+  @Input() isPreviewNow: boolean = false;
16
+  viewer = null;
15 17
 
16 18
   constructor() {}
17 19
 
18 20
   ngOnInit(): void {
19 21
     console.log('初始化')
20
-    // 传入是单条转换为数租
21
-    if (typeof this.imageUrl == "string") {
22
-      this.imageUrl = [this.imageUrl];
23
-    }
24 22
   }
25 23
 
26 24
   ngAfterViewInit(): void {
27
-    new Viewer(this.ljImgViewer["nativeElement"]);
25
+    this.viewer = new Viewer(this.ljImgViewer["nativeElement"]);
26
+    this.isPreviewNow && this.viewer.show();
27
+  }
28
+
29
+  ngOnDestroy(): void {
30
+    this.viewer && this.viewer.destroy();
28 31
   }
29 32
 }

+ 3 - 9
src/app/share/order-detail/order-detail.component.html

@@ -1109,7 +1109,7 @@
1109 1109
                 <td>
1110 1110
                   <button
1111 1111
                     *ngIf="item.attachments"
1112
-                    (click)="previewImageHandler(item.attachments[0].token)"
1112
+                    (click)="previewImageHandler(item.attachments[0])"
1113 1113
                   >
1114 1114
                     查看图片</button
1115 1115
                   ><span *ngIf="!item.attachments">无</span>
@@ -1145,13 +1145,7 @@
1145 1145
 >
1146 1146
   <!-- 2.父组件调用子组件时绑定到这个事件属性,并在事件发生时作出回应。(closeModel)="close()" -->
1147 1147
 </app-prompt-modal>
1148
-<!-- 图片提示框 -->
1149
-<app-prompt-modal
1150
-  *ngIf="promptModalShowImg"
1151
-  [show]="promptModalShowImg"
1152
-  (closeModel)="closeImg()"
1153
-  [previewImage]="previewImage"
1154
->
1155
-</app-prompt-modal>
1148
+
1156 1149
 <!-- 遮罩 -->
1157 1150
 <app-mask *ngIf="maskFlag"></app-mask>
1151
+<app-image-viewer [imageUrl]="imgs" hidden *ngIf="isPreview" [isPreviewNow]="true"></app-image-viewer>

+ 13 - 16
src/app/share/order-detail/order-detail.component.ts

@@ -71,9 +71,7 @@ export class OrderDetailComponent implements OnInit {
71 71
   promptContent: string; //操作提示框提示信息
72 72
   ifSuccess: boolean; //操作成功/失败
73 73
   promptInfo: string; //操作结果提示信息
74
-  previewImage: string; //操作结果图片预览
75 74
   promptModalShow: boolean; //是否展示提示框
76
-  promptModalShowImg: boolean; //是否展示提示框-图片
77 75
 
78 76
   urgentLoading: boolean = false; //确认加急按钮loading状态
79 77
   recLoading: boolean = false; //撤回并删除按钮loading状态
@@ -124,8 +122,18 @@ export class OrderDetailComponent implements OnInit {
124 122
       });
125 123
   }
126 124
   // 预览图片
127
-  previewImageHandler(token) {
128
-    this.showPromptModalImg(token);
125
+  imgs = [];
126
+  isPreview = false;
127
+  previewImageHandler(data) {
128
+    this.isPreview = false;
129
+    this.mainService.getPreviewImage(data.bindType,data.bindId).subscribe((result:any)=>{
130
+      if (result.status == 200) {
131
+        this.imgs = result.data.map((v) => v.previewUrl);
132
+        this.isPreview = true;
133
+      } else {
134
+        this.imgs = [];
135
+      }
136
+    })
129 137
   }
130 138
   // 获取历史记录
131 139
   workOrderRecord: any = [];
@@ -142,9 +150,6 @@ export class OrderDetailComponent implements OnInit {
142 150
   close() {
143 151
     history.go(-1);
144 152
   }
145
-  closeImg() {
146
-    this.promptModalShowImg = false;
147
-  }
148 153
 
149 154
   // 获取工单历史记录
150 155
   logList = []; //工单历史记录
@@ -198,23 +203,15 @@ export class OrderDetailComponent implements OnInit {
198 203
   }
199 204
 
200 205
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
201
-  showPromptModal(con, success, promptInfo?, previewImage?) {
206
+  showPromptModal(con, success, promptInfo?) {
202 207
     this.promptModalShow = false;
203 208
     this.promptContent = con;
204 209
     this.ifSuccess = success;
205 210
     this.promptInfo = promptInfo;
206
-    this.previewImage = previewImage ? previewImage : "";
207 211
     setTimeout(() => {
208 212
       this.promptModalShow = true;
209 213
     }, 100);
210 214
   }
211
-  showPromptModalImg(previewImage) {
212
-    this.promptModalShowImg = false;
213
-    this.previewImage = previewImage ? previewImage : "";
214
-    setTimeout(() => {
215
-      this.promptModalShowImg = true;
216
-    }, 100);
217
-  }
218 215
 
219 216
   // 格式化时分秒
220 217
   // (时间小于一分钟则显示秒,时间大于一分钟则显示分钟数,如超出一小时则显示小时和分钟。)time单位:秒

+ 2 - 5
src/app/share/prompt-modal/prompt-modal.component.html

@@ -1,15 +1,12 @@
1 1
 <div class="modal display_flex justify-content_flex-center align-items_center" *ngIf="show&&!loading">
2 2
   <div class="modalBody">
3
-    <div class="title">{{previewImage?'查看图片':'提示'}}<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
-    <div class="content" *ngIf="!previewImage">
3
+    <div class="title">提示<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
+    <div class="content">
5 5
       <div class="icon"><i
6 6
           [ngClass]="{'icon_transport':true, 'transport-duigou':success,'transport-shibai':!success}"></i></div>
7 7
       <div class="defeat">{{content}}{{(success?"成功":"失败")}}</div>
8 8
       <div *ngIf="info" [innerHTML]="info"></div>
9 9
     </div>
10
-    <div class="content" *ngIf="previewImage">
11
-      <img [src]="host+'/common/common/previewAttachmentImage/'+previewImage" class="w100">
12
-    </div>
13 10
     <div class="display_flex justify-content_flex-center">
14 11
       <button class="btn know" nz-button nzType="primary" nzGhost (click)="hideModal()">知道了</button>
15 12
     </div>

+ 0 - 7
src/app/share/prompt-modal/prompt-modal.component.ts

@@ -14,24 +14,17 @@ export class PromptModalComponent implements OnInit {
14 14
   @Input() back: string = "";
15 15
   @Input() isReLoad: Boolean = false;
16 16
   @Input() loading: Boolean = false;
17
-  @Input() previewImage: string = "";
18
-  // @Input() nUrl: string;
19 17
 
20 18
   @Output() closeModel = new EventEmitter<any>(); //1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
21 19
 
22 20
   constructor() {}
23
-  // constructor(private router: Router) {}
24 21
 
25 22
   ngOnInit() {
26 23
     console.log(this.show);
27
-    console.log(this.previewImage);
28 24
   }
29 25
   hideModal() {
30 26
     this.show = false;
31 27
     this.closeModel.emit(this.back); //emits(向上弹射)事件
32
-    // if(this.nUrl){
33
-    //   this.router.navigateByUrl(this.nUrl);
34
-    // }
35 28
     if (this.isReLoad) {
36 29
       location.reload(true);
37 30
     }

+ 89 - 0
src/app/views/fuwutai/fuwutai.component.html

@@ -1877,6 +1877,13 @@
1877 1877
               展示形式
1878 1878
             </div>
1879 1879
             <div
1880
+              [ngClass]="{ item: true, checked: fixedTab == 'nucleicAcidPrinting' }"
1881
+              (click)="checkFixedTab('nucleicAcidPrinting')"
1882
+              *ngIf="isShowNucleicAcidPrinting"
1883
+            >
1884
+              核酸打印
1885
+            </div>
1886
+            <div
1880 1887
               [ngClass]="{ item: true, checked: fixedTab == 'queueNum' }"
1881 1888
               (click)="checkFixedTab('queueNum')"
1882 1889
             >
@@ -1918,6 +1925,88 @@
1918 1925
     ></div>
1919 1926
   </div>
1920 1927
 
1928
+  <!-- 核酸打印 -->
1929
+  <div
1930
+    class="newOrder display_flex justify-content_flex-center align-items_center" *ngIf="fixedTab == 'nucleicAcidPrinting'">
1931
+    <div class="modalBody">
1932
+      <p class="title">
1933
+        汇总
1934
+        <i class="icon_transport transport-guanbi" (click)="nucleicAcidPrintingCancel()"></i>
1935
+      </p>
1936
+      <div class="content">
1937
+        <nz-table class="hospitalTable" [nzData]="nucleicAcidList" nzSize="middle" [nzShowPagination]="false"
1938
+          [nzLoading]="nucleicAcidLoading" [nzScroll]="{ y: '428px' }">
1939
+          <thead>
1940
+            <tr class="thead">
1941
+                <th nzWidth="5%">序号</th>
1942
+                <th nzWidth="25%">楼栋名字</th>
1943
+                <th nzWidth="10%">工单总量</th>
1944
+                <th nzWidth="60%">涉及科室</th>
1945
+            </tr>
1946
+          </thead>
1947
+          <tbody>
1948
+            <tr *ngFor="let data of nucleicAcidList;let i = index;">
1949
+                <td>{{ i + 1 }}</td>
1950
+                <td>{{ data.buildName || '无' }}</td>
1951
+                <td>{{ data.buildCount || '无' }}</td>
1952
+                <td>{{ data.deptNames || '无' }}</td>
1953
+            </tr>
1954
+          </tbody>
1955
+        </nz-table>
1956
+        <!-- <div class="pagination">
1957
+          <nz-pagination [(nzPageIndex)]="nucleicAcidListPageIndex" [(nzTotal)]="nucleicAcidListLength"
1958
+            [(nzPageSize)]="nucleicAcidListPageSize" (nzPageIndexChange)="getNucleicAcidList()"
1959
+            (nzPageSizeChange)="getNucleicAcidList()">
1960
+          </nz-pagination>
1961
+        </div> -->
1962
+      </div>
1963
+      <div class="btns display_flex justify-content_flex-center align-items_center">
1964
+        <button
1965
+          nz-button
1966
+          class="btn"
1967
+          nzType="primary"
1968
+          (click)="printAucleicAcid()"
1969
+          [nzLoading]="isOkLoading"
1970
+        >
1971
+          打印
1972
+        </button>
1973
+        <button
1974
+          class="btn cancel"
1975
+          nz-button
1976
+          nzType="default"
1977
+          (click)="nucleicAcidPrintingCancel()"
1978
+        >
1979
+          取消
1980
+        </button>
1981
+      </div>
1982
+    </div>
1983
+  </div>
1984
+  <!-- 打印的内容 -->
1985
+  <div id="print-section" hidden>
1986
+    <div *ngFor="let building of nucleicAcidList;let first = first;" [ngStyle]="{'page-break-before':first?'':'always'}" style="overflow: hidden;">
1987
+      <h1 style="text-align: center;position: relative;"><span style="position: absolute;left: 0;font-size:0.5em;top: 50%;transform: translateY(-50%);">{{printDate|date:'yyyy-MM-dd HH:mm'}}</span>{{building.buildName}}<img style="width: 50px;position: absolute;right: 50px;" [src]="mapQrcodes[building.buildId]"></h1>
1988
+      <div style="width: 50%;float: left;">
1989
+        <div style="display: flex;justify-content: center;text-align: center;font-weight: bold;">
1990
+          <span style="flex: 2; border: 1px solid #ccc;">科室名称</span>
1991
+          <span style="flex: 1; border-bottom: 1px solid #ccc;border-right: 1px solid #ccc;border-top: 1px solid #ccc;">只数</span>
1992
+        </div>
1993
+      </div>
1994
+      <div style="width: 50%;float: left;">
1995
+        <div style="display: flex;justify-content: center;text-align: center;font-weight: bold;">
1996
+          <span style="flex: 2; border-bottom: 1px solid #ccc;border-right: 1px solid #ccc;border-top: 1px solid #ccc;">科室名称</span>
1997
+          <span style="flex: 1; border-bottom: 1px solid #ccc;border-right: 1px solid #ccc;border-top: 1px solid #ccc;">只数</span>
1998
+        </div>
1999
+      </div>
2000
+      <div *ngFor="let item of building.deptData;let even = even;" style="width: 50%;float: left;">
2001
+        <div style="display: flex;justify-content: center;text-align: center;">
2002
+          <span style="flex: 2;word-break: break-all; border-bottom: 1px solid #ccc;border-right: 1px solid #ccc;" [ngStyle]="{'border-left':even?'1px solid #ccc':''}">{{item.deptName}}<span *ngIf="item.workOrderRemarks">+{{item.workOrderRemarks.slice(0,2)}}</span></span>
2003
+          <span style="flex: 1; border-bottom: 1px solid #ccc;border-right: 1px solid #ccc;"></span>
2004
+        </div>
2005
+      </div>
2006
+    </div>
2007
+  </div>
2008
+  <button ngxPrint printSectionId="print-section" #printBtn hidden>打印</button>
2009
+
1921 2010
   <!-- 新建工单 -->
1922 2011
   <div
1923 2012
     class="newOrder display_flex justify-content_flex-center align-items_center"

+ 16 - 0
src/app/views/fuwutai/fuwutai.component.less

@@ -1392,6 +1392,22 @@
1392 1392
     cursor: pointer;
1393 1393
   }
1394 1394
 
1395
+  .hospitalTable {
1396
+    width: 100%;
1397
+    td {
1398
+      text-align: center !important;
1399
+      position: relative;
1400
+    }
1401
+    .thead {
1402
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
1403
+      th {
1404
+        text-align: center !important;
1405
+        color: #fff;
1406
+        background: transparent;
1407
+      }
1408
+    }
1409
+  }
1410
+
1395 1411
   // 右侧悬浮菜单
1396 1412
   .fixed {
1397 1413
     position: fixed;

+ 84 - 11
src/app/views/fuwutai/fuwutai.component.ts

@@ -25,6 +25,7 @@ import { SourceId } from "src/app/type/types";
25 25
   styleUrls: ["./fuwutai.component.less"],
26 26
 })
27 27
 export class FuwutaiComponent implements OnInit {
28
+  @ViewChild('printBtn', { static: false }) printBtn: ElementRef<HTMLElement>;
28 29
   @ViewChild("remarksEle", { static: false }) remarksEle: ElementRef;
29 30
   @ViewChild("tabs", { static: false }) tabs: ElementRef;
30 31
   @ViewChild("tab", { static: false }) elementView: ElementRef;
@@ -154,6 +155,20 @@ export class FuwutaiComponent implements OnInit {
154 155
   searchHosDepartmentSubject = new Subject();
155 156
   searchHosDepartmentQtSubject = new Subject();
156 157
   searchPatientListSubject = new Subject();
158
+
159
+  // 获取院区配置配置,是否核酸打印
160
+  isShowNucleicAcidPrinting = false;
161
+  getHospitalConfigList(key) {
162
+    let postData = { idx: 0, sum: 1, hospitalConfig: { hosId: this.checkedHos, key } };
163
+    this.mainService.getFetchDataList("simple/data", "hospitalConfig", postData).subscribe(result=>{
164
+      if(result.status == 200){
165
+        this.isShowNucleicAcidPrinting = result.list[0].value == 1;
166
+      }else{
167
+        this.isShowNucleicAcidPrinting = false;
168
+      }
169
+    });
170
+  }
171
+
157 172
   // 打开选择楼栋多选框
158 173
   openChangeUnassignedBuilding(e) {
159 174
     if (e) {
@@ -487,6 +502,56 @@ export class FuwutaiComponent implements OnInit {
487 502
       }
488 503
     });
489 504
   }
505
+  // 核酸打印
506
+  nucleicAcidLoading = false;
507
+  nucleicAcidList: any = [];
508
+  // nucleicAcidListPageIndex: number = 1;//表格当前页码
509
+  // nucleicAcidListPageSize: number = 5;//表格每页展示条数
510
+  // nucleicAcidListLength: number = 10;//表格总数据量
511
+  // 获取列表数据
512
+  getNucleicAcidBuildingSummary(idx?) {
513
+    // if (idx) {
514
+    //   this.nucleicAcidListPageIndex = 1;
515
+    // }
516
+    this.nucleicAcidLoading = true;
517
+    this.mainService.getNucleicAcidBuildingSummary({}).subscribe((data:any) => {
518
+      this.nucleicAcidLoading = false;
519
+      let nucleicAcidList = data.data || [];
520
+      for (let i = 0; i < nucleicAcidList.length; i++) {
521
+        if(nucleicAcidList[i].deptData && Array.isArray(nucleicAcidList[i].deptData)){
522
+          nucleicAcidList[i].deptNames = nucleicAcidList[i].deptData.map(v=>v.deptName).toString();
523
+        }else{
524
+          nucleicAcidList[i].deptData = [];
525
+          nucleicAcidList[i].deptNames = '';
526
+        }
527
+      }
528
+      this.nucleicAcidList = nucleicAcidList;
529
+      console.log(this.nucleicAcidList)
530
+      // this.nucleicAcidListLength = data.totalNum || 0;
531
+    })
532
+  }
533
+  // 打印
534
+  mapQrcodes:any = {};
535
+  printDate:number = Date.now();
536
+  printAucleicAcid(){
537
+    this.isOkLoading = true;
538
+    this.mainService.printNucleicAcid({}).subscribe((data:any) => {
539
+      this.isOkLoading = false;
540
+      if(data.state == 200){
541
+        let mapQrcodes = {};
542
+        data.data.forEach(v=>{
543
+          mapQrcodes[v.buildId] = v.qrcode;
544
+        })
545
+        this.mapQrcodes = mapQrcodes;
546
+        this.nucleicAcidPrintingCancel();
547
+        setTimeout(()=>{
548
+          this.printBtn.nativeElement.click();
549
+        },0)
550
+      }else{
551
+        this.msg.create('error', `操作失败!`);
552
+      }
553
+    })
554
+  }
490 555
   ngOnInit() {
491 556
     //防抖
492 557
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
@@ -521,6 +586,7 @@ export class FuwutaiComponent implements OnInit {
521 586
       workOrderRemark: [null], //工单备注
522 587
     });
523 588
 
589
+    this.getHospitalConfigList('allowNucleicAcidPrinting');
524 590
     this.getWebsocketSer();
525 591
     this.initRole();
526 592
     this.initLogin();
@@ -847,17 +913,17 @@ export class FuwutaiComponent implements OnInit {
847 913
       });
848 914
       postData.groups = groups;
849 915
     }
850
-    // if (this.hurseInfoHiding == '1'){
851
-    //   that.workerMessage = [];
852
-    //   that.initTopCount();
853
-    //   return;
854
-    // }
855
-    // that.mainService.getSerInfo("getWorkInfo", postData).subscribe((data) => {
856
-    //   that.workerMessage = data.data ? data.data : [];
857
-    //   that.initTopCount();
858
-    // });
859
-    that.workerMessage = [];
860
-    that.initTopCount();
916
+    if (this.hurseInfoHiding == '1'){
917
+      that.workerMessage = [];
918
+      that.initTopCount();
919
+      return;
920
+    }
921
+    that.mainService.getSerInfo("getWorkInfo", postData).subscribe((data) => {
922
+      that.workerMessage = data.data ? data.data : [];
923
+      that.initTopCount();
924
+    });
925
+    // that.workerMessage = [];
926
+    // that.initTopCount();
861 927
   }
862 928
 
863 929
   // 获取三个状态数据数据
@@ -1148,6 +1214,9 @@ export class FuwutaiComponent implements OnInit {
1148 1214
     if (type == "logout") {
1149 1215
       this.logOut();
1150 1216
     }
1217
+    if (type == "nucleicAcidPrinting") {
1218
+      this.getNucleicAcidBuildingSummary();
1219
+    }
1151 1220
     if (this.fixedTab == type) {
1152 1221
       this.fixedTab = "";
1153 1222
     } else {
@@ -1826,6 +1895,10 @@ export class FuwutaiComponent implements OnInit {
1826 1895
     }
1827 1896
   }
1828 1897
 
1898
+  nucleicAcidPrintingCancel():void {
1899
+    this.fixedTab = '';
1900
+  }
1901
+
1829 1902
   newOrderCancel(): void {
1830 1903
     this.newOrderShow = false;
1831 1904
     this.newOrderShowOpen = false;

+ 4 - 1
src/app/views/fuwutai/fuwutai.module.ts

@@ -5,6 +5,8 @@ import { FuwutaiRoutingModule } from './fuwutai-routing.module';
5 5
 import { FuwutaiComponent } from './fuwutai.component';
6 6
 import { ShareModule } from 'src/app/share/share.module';
7 7
 
8
+import { NgxPrintModule } from 'ngx-print';
9
+
8 10
 
9 11
 @NgModule({
10 12
   declarations: [
@@ -13,7 +15,8 @@ import { ShareModule } from 'src/app/share/share.module';
13 15
   imports: [
14 16
     CommonModule,
15 17
     ShareModule,
16
-    FuwutaiRoutingModule
18
+    FuwutaiRoutingModule,
19
+    NgxPrintModule,
17 20
   ]
18 21
 })
19 22
 export class FuwutaiModule { }

+ 8 - 0
src/app/views/main/main-routing.module.ts

@@ -156,6 +156,14 @@ const routes: Routes = [
156 156
           ),
157 157
       },
158 158
       {
159
+        // 核酸接收列表
160
+        path: "nucleicAcidCollection",
161
+        loadChildren: () =>
162
+          import("../nucleic-acid-collection/nucleic-acid-collection.module").then(
163
+            (m) => m.NucleicAcidCollectionModule
164
+          ),
165
+      },
166
+      {
159 167
         // 统计分析-综合统计
160 168
         path: "compreStatistics",
161 169
         loadChildren: () =>

+ 14 - 0
src/app/views/nucleic-acid-collection/nucleic-acid-collection-routing.module.ts

@@ -0,0 +1,14 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { NucleicAcidCollectionComponent } from './nucleic-acid-collection.component';
4
+
5
+
6
+const routes: Routes = [
7
+  { path: '', component: NucleicAcidCollectionComponent }
8
+];
9
+
10
+@NgModule({
11
+  imports: [RouterModule.forChild(routes)],
12
+  exports: [RouterModule]
13
+})
14
+export class NucleicAcidCollectionRoutingModule { }

+ 77 - 0
src/app/views/nucleic-acid-collection/nucleic-acid-collection.component.html

@@ -0,0 +1,77 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='15' class="list-template__searchBox"></div>
5
+      <div nz-col nzXl="9" class="list-template__btns"></div>
6
+    </div>
7
+    <div class="list-template__bottom">
8
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
9
+        [nzLoading]="loading1">
10
+        <thead>
11
+          <tr class="thead">
12
+            <th nzWidth="4%">序号</th>
13
+            <th nzWidth="10%">批次号</th>
14
+            <th nzWidth="10%">楼栋名称</th>
15
+            <th nzWidth="10%">创建时间</th>
16
+            <th nzWidth="10%">工单总数</th>
17
+            <th nzWidth="10%">状态</th>
18
+            <th nzWidth="10%">闭环时间</th>
19
+            <th nzWidth="10%">闭环人</th>
20
+            <th nzWidth="10%">备注</th>
21
+            <th nzWidth="16%">操作</th>
22
+          </tr>
23
+        </thead>
24
+        <tbody>
25
+          <tr *ngFor="let data of listOfData;let i = index">
26
+            <td>{{ i+1 }}</td>
27
+            <td>{{ data.batchNo || '无' }}</td>
28
+            <td>{{ data.buildId?data.buildId.buildingName:'无' }}</td>
29
+            <td>{{data.addTime?(data.addTime|date:'yyyy-MM-dd HH:mm'):'无'}}</td>
30
+            <td>{{data.orderCount || '无'}}</td>
31
+            <td>{{data.closedLoopState == 1?'已闭环':'未闭环'}}</td>
32
+            <td>{{data.closedLoopTime?(data.closedLoopTime|date:'yyyy-MM-dd HH:mm'):'无'}}</td>
33
+            <td>{{data.closedLoopUser ? data.closedLoopUser.name : '无'}}</td>
34
+            <td>{{data.remark || '无'}}</td>
35
+            <td>
36
+              <div class="coop">
37
+                <span *ngIf="data.pictureId" (click)="previewImageHandler(data)">查看图片</span>
38
+                <button nz-button nzType="link" *ngIf="isShowNucleicAcidPrinting && data.closedLoopState === 0" (click)="supplementPrint(data)" [nzLoading]="data.isOkLoading">补打</button>
39
+              </div>
40
+            </td>
41
+          </tr>
42
+        </tbody>
43
+      </nz-table>
44
+      <div class="list-template__pagination">
45
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize"
46
+          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
47
+        </nz-pagination>
48
+      </div>
49
+    </div>
50
+  </div>
51
+  <app-image-viewer [imageUrl]="imgs" hidden *ngIf="isPreview" [isPreviewNow]="true"></app-image-viewer>
52
+</div>
53
+<!-- 打印的内容 -->
54
+<div id="print-section" hidden>
55
+  <div *ngFor="let building of nucleicAcidList;let first = first;" [ngStyle]="{'page-break-before':first?'':'always'}" style="overflow: hidden;">
56
+    <h1 style="text-align: center;position: relative;"><span style="position: absolute;left: 0;font-size:0.5em;top: 50%;transform: translateY(-50%);">{{printDate|date:'yyyy-MM-dd HH:mm'}}</span>{{building.buildName}}<img style="width: 50px;position: absolute;right: 50px;" [src]="mapQrcodes[building.buildId]"></h1>
57
+    <div style="width: 50%;float: left;">
58
+      <div style="display: flex;justify-content: center;text-align: center;font-weight: bold;">
59
+        <span style="flex: 2; border: 1px solid #ccc;">科室名称</span>
60
+        <span style="flex: 1; border-bottom: 1px solid #ccc;border-right: 1px solid #ccc;border-top: 1px solid #ccc;">只数</span>
61
+      </div>
62
+    </div>
63
+    <div style="width: 50%;float: left;">
64
+      <div style="display: flex;justify-content: center;text-align: center;font-weight: bold;">
65
+        <span style="flex: 2; border-bottom: 1px solid #ccc;border-right: 1px solid #ccc;border-top: 1px solid #ccc;">科室名称</span>
66
+        <span style="flex: 1; border-bottom: 1px solid #ccc;border-right: 1px solid #ccc;border-top: 1px solid #ccc;">只数</span>
67
+      </div>
68
+    </div>
69
+    <div *ngFor="let item of building.deptData;let even = even;" style="width: 50%;float: left;">
70
+      <div style="display: flex;justify-content: center;text-align: center;">
71
+        <span style="flex: 2;word-break: break-all; border-bottom: 1px solid #ccc;border-right: 1px solid #ccc;" [ngStyle]="{'border-left':even?'1px solid #ccc':''}">{{item.deptName}}<span *ngIf="item.workOrderRemarks">+{{item.workOrderRemarks.slice(0,2)}}</span></span>
72
+        <span style="flex: 1; border-bottom: 1px solid #ccc;border-right: 1px solid #ccc;"></span>
73
+      </div>
74
+    </div>
75
+  </div>
76
+</div>
77
+<button ngxPrint printSectionId="print-section" #printBtn hidden>打印</button>

+ 177 - 0
src/app/views/nucleic-acid-collection/nucleic-acid-collection.component.less

@@ -0,0 +1,177 @@
1
+@import "../../../../src/theme.less";
2
+
3
+::ng-deep .executeTime,
4
+::ng-deep
5
+  .executeTime[nzplaceholder="请选择定时发送时间"]
6
+  .ant-calendar-picker {
7
+  width: 100% !important;
8
+}
9
+::ng-deep .ant-calendar-picker-input {
10
+  width: 410px !important;
11
+}
12
+
13
+.save {
14
+  position: fixed;
15
+  left: 0;
16
+  top: 0;
17
+  width: 100%;
18
+  height: 100%;
19
+  background: rgba(0, 0, 0, 0.4);
20
+  z-index: 99;
21
+
22
+  .modalBody {
23
+    width: 350px;
24
+    height: 220px;
25
+    background: #fff;
26
+    border-radius: 5px;
27
+    padding: 10px 20px;
28
+    color: #333;
29
+
30
+    .title {
31
+      width: 100%;
32
+      text-align: center;
33
+      font-size: 18px;
34
+      position: relative;
35
+
36
+      i {
37
+        position: absolute;
38
+        right: 0;
39
+        top: 0;
40
+        font-size: 20px;
41
+        color: #666;
42
+        cursor: pointer;
43
+        padding: 0 5px;
44
+      }
45
+    }
46
+
47
+    .content {
48
+      width: 310px;
49
+      height: 117px;
50
+      background: #f9fafb;
51
+      border: 1px solid #e5e9ed;
52
+      border-radius: 5px;
53
+      overflow: hidden;
54
+      margin-top: 12px;
55
+
56
+      & > div {
57
+        text-align: center;
58
+        margin: 0;
59
+
60
+        &.icon {
61
+          margin-top: 17px;
62
+
63
+          i {
64
+            color: #34b349;
65
+            font-size: 30px !important;
66
+
67
+            &.transport-wenhao {
68
+              color: #f5a523;
69
+            }
70
+
71
+            &.transport-shibai {
72
+              color: #ff3a52;
73
+            }
74
+          }
75
+        }
76
+
77
+        &.defeat {
78
+          color: #333;
79
+          font-size: 18px;
80
+        }
81
+
82
+        &:nth-child(3) {
83
+          font-size: 14px;
84
+          color: #666;
85
+        }
86
+      }
87
+      .timingMessageSendingTips {
88
+        font-size: 12px;
89
+      }
90
+    }
91
+
92
+    button {
93
+      margin-top: 10px;
94
+
95
+      &.btn {
96
+        margin-left: 8px;
97
+      }
98
+    }
99
+  }
100
+
101
+  // 新增
102
+  &.add {
103
+    .modalBody {
104
+      width: 480px;
105
+      height: auto;
106
+
107
+      .content {
108
+        width: 100%;
109
+        height: auto;
110
+        padding: 18px 14px 0 14px;
111
+        max-height: 497px;
112
+        overflow-y: auto;
113
+
114
+        .addForm {
115
+          .ant-form-item {
116
+            margin-bottom: 15px;
117
+
118
+            .ant-form-item-label {
119
+              line-height: 14px;
120
+              text-align: left;
121
+            }
122
+
123
+            .desc {
124
+              margin-top: 5px;
125
+            }
126
+          }
127
+
128
+          .datesControl {
129
+            margin-top: -16px;
130
+
131
+            .ant-form-item-label {
132
+              line-height: 40px;
133
+            }
134
+          }
135
+
136
+          .timer {
137
+            .ant-form-item-label {
138
+              width: 100%;
139
+              text-align: left;
140
+            }
141
+
142
+            .numInp {
143
+              margin-right: 5px;
144
+            }
145
+
146
+            .line {
147
+              margin-right: 5px;
148
+            }
149
+          }
150
+
151
+          .timer2 {
152
+            .ant-form-item-label {
153
+              line-height: 20px;
154
+            }
155
+          }
156
+        }
157
+
158
+        .editForm {
159
+          .ant-form-item {
160
+            margin-bottom: 15px;
161
+
162
+            .ant-form-item-label {
163
+              line-height: 14px;
164
+              text-align: left;
165
+            }
166
+          }
167
+        }
168
+      }
169
+
170
+      button {
171
+        &:nth-child(1) {
172
+          margin-right: 20px;
173
+        }
174
+      }
175
+    }
176
+  }
177
+}

+ 126 - 0
src/app/views/nucleic-acid-collection/nucleic-acid-collection.component.ts

@@ -0,0 +1,126 @@
1
+import { Component, OnInit, ViewChild, ElementRef } from "@angular/core";
2
+import { ActivatedRoute } from "@angular/router";
3
+
4
+import { MainService } from "../../services/main.service";
5
+import { ToolService } from "../../services/tool.service";
6
+import { NzMessageService } from 'ng-zorro-antd';
7
+@Component({
8
+  selector: "app-nucleic-acid-collection",
9
+  templateUrl: "./nucleic-acid-collection.component.html",
10
+  styleUrls: ["./nucleic-acid-collection.component.less"],
11
+})
12
+export class NucleicAcidCollectionComponent implements OnInit {
13
+  @ViewChild('printBtn', { static: false }) printBtn: ElementRef<HTMLElement>;
14
+  constructor(
15
+    private mainService: MainService,
16
+    private route: ActivatedRoute,
17
+    private tool: ToolService,
18
+    private msg: NzMessageService,
19
+  ) {}
20
+
21
+  userInfo: any = JSON.parse(localStorage.getItem("user")) || {}; //登录用户信息
22
+  hosId;
23
+  listOfData: any[] = []; //表格数据
24
+  pageIndex: number = 1; //表格当前页码
25
+  pageSize: number = 10; //表格每页展示条数
26
+  listLength: number = 10; //表格总数据量
27
+
28
+  ngOnInit() {
29
+    this.hosId = this.tool.getCurrentHospital().id;
30
+    this.getList();
31
+    this.getHospitalConfigList('allowNucleicAcidPrinting');
32
+    this.coopBtns = this.tool.initCoopBtns(this.route);
33
+  }
34
+
35
+  // 初始化权限按钮
36
+  coopBtns: any = {};
37
+
38
+  // 预览图片
39
+  imgs = [];
40
+  isPreview = false;
41
+  previewImageHandler(data) {
42
+    if(data.pictureId){
43
+      console.log(data.id)
44
+      this.isPreview = false;
45
+      this.mainService.getPreviewImage('specimenPhotos', data.id).subscribe((result:any)=>{
46
+        if (result.status == 200) {
47
+          this.imgs = result.data.map((v) => v.previewUrl);
48
+          this.isPreview = true;
49
+        } else {
50
+          this.imgs = [];
51
+        }
52
+      })
53
+    }
54
+  }
55
+
56
+  // 获取院区配置配置,是否核酸打印
57
+  isShowNucleicAcidPrinting = false;
58
+  getHospitalConfigList(key) {
59
+    let postData = { idx: 0, sum: 1, hospitalConfig: { hosId: this.hosId, key } };
60
+    this.mainService.getFetchDataList("simple/data", "hospitalConfig", postData).subscribe(result=>{
61
+      if(result.status == 200){
62
+        this.isShowNucleicAcidPrinting = result.list[0].value == 1;
63
+      }else{
64
+        this.isShowNucleicAcidPrinting = false;
65
+      }
66
+    });
67
+  }
68
+
69
+  // 补充打印
70
+  nucleicAcidList: any = [];
71
+  printDate:number = Date.now();
72
+  mapQrcodes:any = {};
73
+  supplementPrint(data){
74
+    data.isOkLoading = true;
75
+    this.mainService.supplementPrintNucleicAcid({buildingId:data.buildId?data.buildId.id:undefined,code:data.qrcode}).subscribe((result:any) => {
76
+      data.isOkLoading = false;
77
+      if(result.status == 200){
78
+        this.mapQrcodes = {[data.buildId.id]: result.qrcode};
79
+        let nucleicAcidList:any = [
80
+          {
81
+            buildName: data.buildId.buildingName,
82
+            buildId: data.buildId.id,
83
+            deptData: result.deptData
84
+          }
85
+        ]
86
+        for (let i = 0; i < nucleicAcidList.length; i++) {
87
+          if(nucleicAcidList[i].deptData && Array.isArray(nucleicAcidList[i].deptData)){
88
+            nucleicAcidList[i].deptNames = nucleicAcidList[i].deptData.map(v=>v.deptName).toString();
89
+          }else{
90
+            nucleicAcidList[i].deptData = [];
91
+            nucleicAcidList[i].deptNames = '';
92
+          }
93
+        }
94
+        this.nucleicAcidList = nucleicAcidList;
95
+        setTimeout(()=>{
96
+          this.printBtn.nativeElement.click();
97
+        },0)
98
+      }else{
99
+        this.msg.create('error', `操作失败!`);
100
+      }
101
+    })
102
+  }
103
+
104
+  // 表格数据
105
+  loading1 = false;
106
+  getList() {
107
+    let postData = {
108
+      idx: this.pageIndex - 1,
109
+      sum: this.pageSize,
110
+      messageJob: {
111
+        hospital: this.hosId,
112
+      },
113
+    };
114
+    this.loading1 = true;
115
+    this.mainService
116
+      .getFetchDataList("simple/data", "nucleicAcid", postData)
117
+      .subscribe((data) => {
118
+        this.loading1 = false;
119
+        if (data.status == 200) {
120
+          this.listOfData = data.list;
121
+          this.listLength = data.totalNum;
122
+        }
123
+      });
124
+  }
125
+}
126
+

+ 20 - 0
src/app/views/nucleic-acid-collection/nucleic-acid-collection.module.ts

@@ -0,0 +1,20 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { NucleicAcidCollectionRoutingModule } from './nucleic-acid-collection-routing.module';
5
+import { ShareModule } from 'src/app/share/share.module';
6
+import { NucleicAcidCollectionComponent } from './nucleic-acid-collection.component';
7
+
8
+import { NgxPrintModule } from 'ngx-print';
9
+
10
+
11
+@NgModule({
12
+  declarations: [NucleicAcidCollectionComponent],
13
+  imports: [
14
+    CommonModule,
15
+    NucleicAcidCollectionRoutingModule,
16
+    ShareModule,
17
+    NgxPrintModule
18
+  ]
19
+})
20
+export class NucleicAcidCollectionModule { }

+ 4 - 1
src/common.less

@@ -287,7 +287,10 @@
287 287
               border: none;
288 288
 
289 289
               .coop {
290
-                span {
290
+                button{
291
+                  color: #333;
292
+                }
293
+                span,button {
291 294
                   display: inline-block;
292 295
                   padding: 0 8px;
293 296
                   cursor: pointer;

+ 1 - 1
src/main.ts

@@ -8,7 +8,7 @@ if (environment.production) {
8 8
   enableProdMode();
9 9
   if (window) {
10 10
     window.console.log = function () { };
11
-    console.info('v2.4.12');
11
+    console.info('v2.4.13');
12 12
   }
13 13
 }
14 14
 platformBrowserDynamic().bootstrapModule(AppModule)

+ 1 - 0
src/styles.less

@@ -2,3 +2,4 @@
2 2
 @import "./theme.less"; //自定义全局样式
3 3
 @import "./common.less"; //common
4 4
 @import "~overlayscrollbars/css/OverlayScrollbars.css"; //滚动条
5
+@import "~viewerjs/dist/viewer.min.css"; //viewerjs