瀏覽代碼

添加问卷调查配置

maotao 9 月之前
父節點
當前提交
6029107b96

+ 2 - 2
src/app/views/acc-examine-set/acc-examine-set.component.ts

@@ -220,7 +220,7 @@ export class AccExamineSetComponent implements OnInit {
220 220
 			idx: 0,
221 221
 			questionnaireManagement: {
222 222
 				title:e,
223
-				hosId: 1,
223
+				hosId: this.hosId,
224 224
 				surveyTarget:{ //问卷调查目标
225 225
 					id:targetId.id
226 226
 				},
@@ -228,7 +228,7 @@ export class AccExamineSetComponent implements OnInit {
228 228
 					id:stateId.id
229 229
 				}
230 230
 			},
231
-			hosId: 1,
231
+			hosId: this.hosId,
232 232
 			sum: 10
233 233
 		}
234 234
 		isFirst && (this.loading = true);

+ 7 - 2
src/app/views/preview/preview.component.html

@@ -1,5 +1,5 @@
1 1
 <div class="preview" [ngStyle]="{margin:isM?0:'',minHeight:isM?'100vh':''}">
2
-  <ng-container *ngIf="!success">
2
+  <ng-container *ngIf="!success && !pastStatus">
3 3
     <ng-container *ngIf="!failure">
4 4
       <div *ngIf="!loading">
5 5
         <h1>{{qm.title}}</h1>
@@ -32,7 +32,7 @@
32 32
           </ng-container>
33 33
           <nz-form-item nz-row class="submit" *ngIf="listOfData.length && qm.state.value == 2">
34 34
             <nz-form-control>
35
-              <button nz-button [disabled]="pastStatus" nzType="primary" [nzLoading]="loading" (click)="submitForm()">提交</button>
35
+              <button nz-button nzType="primary" [nzLoading]="loading" (click)="submitForm()">提交</button>
36 36
             </nz-form-control>
37 37
           </nz-form-item>
38 38
         </form>
@@ -48,4 +48,9 @@
48 48
   <div class="success" *ngIf="success">
49 49
     感谢您的参与!
50 50
   </div>
51
+	<div class="failure" *ngIf="pastStatus">
52
+	  调研码已过期,请知悉!<br>	
53
+		请退出重新扫码
54
+	</div>
55
+	
51 56
 </div>

+ 15 - 6
src/app/views/preview/preview.component.ts

@@ -18,7 +18,8 @@ export class PreviewComponent implements OnInit {
18 18
   success:boolean = false;
19 19
   isM:boolean = false;
20 20
 	pastStatus:boolean = false;
21
-	
21
+	gdid:string = '';
22
+	qrCodeIndex:string = '';
22 23
   constructor(
23 24
     private route: ActivatedRoute,
24 25
     private mainService:MainService,
@@ -34,9 +35,11 @@ export class PreviewComponent implements OnInit {
34 35
     }else{
35 36
       document.documentElement.style.fontSize = '100px';
36 37
     }
37
-		let gdid = this.route.snapshot.queryParams.gdid;
38
-		if(gdid){
39
-			this.verifyPast(gdid)
38
+		console.log(234,this.route.snapshot.queryParams)
39
+		this.gdid = this.route.snapshot.queryParams.gdId;
40
+		this.qrCodeIndex = this.route.snapshot.queryParams.qrCodeIndex
41
+		if(this.gdid){
42
+			this.verifyPast(this.gdid)
40 43
 		}
41 44
     this.getList();
42 45
   }
@@ -63,6 +66,11 @@ export class PreviewComponent implements OnInit {
63 66
         hosId: this.qm.hosId,
64 67
       }))
65 68
     };
69
+		if(this.gdid){
70
+			postData.gdId = this.gdid
71
+		}else{
72
+			delete postData.gdId
73
+		}
66 74
     const mid = this.message.loading('loading..', { nzDuration: 0 }).messageId;
67 75
     this.mainService.surveyCommit(postData).subscribe((res:any)=>{
68 76
       this.message.remove(mid);
@@ -82,13 +90,14 @@ export class PreviewComponent implements OnInit {
82 90
 	// 验证工单问卷调查二维码是否过期
83 91
 	verifyPast(gdid){
84 92
 		this.mainService.verifyPastApi({
85
-			gdId:gdid
93
+			gdId:gdid,
94
+			qrCodeIndex:this.qrCodeIndex
86 95
 		}).subscribe((res:any)=>{
87 96
 		  if (res.status == 200) {
88 97
 		    this.pastStatus = false;
89 98
 		  }else{
90 99
 				this.pastStatus = true;
91
-		    this.message.create('error',res.info,{ nzDuration: 5000 });
100
+		    // this.message.create('error',res.info,{ nzDuration: 5000 });
92 101
 		  }
93 102
 		})
94 103
 	}

+ 7 - 1
src/app/views/questionnaire-answer/questionnaire-answer.component.html

@@ -17,13 +17,19 @@
17 17
         <thead>
18 18
           <tr class="thead">
19 19
             <th nzWidth="50px">序号</th>
20
+						<th *ngFor="let item of listBaseInfoTh">{{item.describe}}</th>
20 21
             <th *ngFor="let item of listOfDataTh">{{item.describe}}</th>
21 22
           </tr>
22 23
         </thead>
23 24
         <tbody>
24 25
           <tr *ngFor="let data of listOfData; let i = index">
25 26
             <td>{{ i + 1 }}</td>
26
-            <td *ngFor="let item of data">{{ item.answer }}</td>
27
+						<td *ngIf="data.data">{{ data.data.patientName }}</td>
28
+						<td *ngIf="data.data">{{ data.data.residenceNo }}</td>
29
+						<td *ngIf="data.data">{{data.data.gdCode}}/{{data.data.taskTypeName}}</td>
30
+						<td *ngFor="let item of data">
31
+							{{ item.answer }}
32
+						</td>
27 33
           </tr>
28 34
         </tbody>
29 35
       </nz-table>

+ 15 - 4
src/app/views/questionnaire-answer/questionnaire-answer.component.ts

@@ -25,7 +25,8 @@ export class QuestionnaireAnswerComponent implements OnInit {
25 25
   pageSize: number = 10; //表格每页展示条数
26 26
   listLength: number = 10; //表格总数据量
27 27
   currentHospital; //当前院区
28
-
28
+	listBaseInfoTh: any[] = []; //陪检患者表格表头
29
+	listBaseInfos: any[] = []; //陪检患者表格数据
29 30
   ngOnInit() {
30 31
     this.currentHospital = this.tool.getCurrentHospital();
31 32
     this.getList(1);
@@ -82,10 +83,20 @@ export class QuestionnaireAnswerComponent implements OnInit {
82 83
         this.loading1 = false;
83 84
         if (data.status == 200) {
84 85
           this.listOfData = data.data?data.data.answers:[];
85
-          // if(data.data && data.data.answers){
86
-          //   data.data.answers
87
-          // }
88 86
           this.listOfDataTh = data.data?data.data.infos:[];
87
+					this.listBaseInfos = data.data?data.data.baseInfos:[];
88
+					if(this.listBaseInfos&&this.listBaseInfos.length>0){
89
+						this.listBaseInfoTh = [
90
+							{describe:'患者姓名'},
91
+							{describe:'住院号'},
92
+							{describe:'工单编号/任务类型'},
93
+						]
94
+						for(let i in this.listBaseInfos){
95
+							this.listOfData[i].data = this.listBaseInfos[i]
96
+						}
97
+					}else{
98
+						this.listBaseInfoTh = []
99
+					}	
89 100
           this.listLength = data.totalNum;
90 101
         }
91 102
       });