瀏覽代碼

拉取最新代码

maotao 9 月之前
父節點
當前提交
67ca6816d5

+ 1 - 1
proxy.conf.json

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

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

@@ -805,4 +805,10 @@ export class MainService {
805
       responseType: "arraybuffer",
805
       responseType: "arraybuffer",
806
     });
806
     });
807
   }
807
   }
808
+	// 验证工单问卷二维码是否过期
809
+	verifyPastApi(data): any {
810
+	  return this.http.post(host.host + "/questionnaire/check", data, {
811
+	    headers: this.headers,
812
+	  });
813
+	}
808
 }
814
 }

+ 16 - 62
src/app/views/acc-examine-set/acc-examine-set.component.html

@@ -2,61 +2,30 @@
2
   <div class="taskTypeInfo">
2
   <div class="taskTypeInfo">
3
     <div class="top">
3
     <div class="top">
4
       <div class="item" (click)="tabModal('characteristics')" [ngClass]="{'items':tabModalName=='characteristics'}">
4
       <div class="item" (click)="tabModal('characteristics')" [ngClass]="{'items':tabModalName=='characteristics'}">
5
-        特性配置
6
-      </div>
7
-      <div class="item" (click)="tabModal('automaticOrderCreation')" [ngClass]="{'items':tabModalName=='automaticOrderCreation'}">
8
-        自动建单配置
5
+        陪检问卷配置
9
       </div>
6
       </div>
10
     </div>
7
     </div>
11
     <div class="list" *ngIf="!loading">
8
     <div class="list" *ngIf="!loading">
12
       <!-- 特性配置 -->
9
       <!-- 特性配置 -->
13
       <div *ngIf="tabModalName=='characteristics'">
10
       <div *ngIf="tabModalName=='characteristics'">
14
-        <!-- 接手术关联任务类型 -->
11
+        <!-- 调查问卷 -->
15
         <div class="display_flex align-items_center mb8">
12
         <div class="display_flex align-items_center mb8">
16
-          <nz-form-label class="label" nzRequired>接手术关联任务类型</nz-form-label>
13
+          <nz-form-label class="label" nzRequired>调查问卷</nz-form-label>
17
           <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
14
           <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
18
-            (nzOnSearch)="changeTasktype($event, 1)" nzPlaceHolder="请选择接手术关联任务类型" [(ngModel)]="tasktypeId">
19
-            <ng-container *ngFor="let option of taskTypes1">
20
-              <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
21
-            </ng-container>
22
-            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
23
-              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
24
-            </nz-option>
25
-          </nz-select>
26
-        </div>
27
-        <!-- 苏醒室科室 -->
28
-        <div class="display_flex align-items_center mb8">
29
-          <nz-form-label class="label" nzRequired>苏醒室科室</nz-form-label>
30
-          <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
31
-            (nzOnSearch)="changeRecoveryDepts($event)" nzPlaceHolder="请选择接苏醒室科室" [(ngModel)]="recoveryDeptId">
32
-            <ng-container *ngFor="let option of recoveryDepts">
33
-              <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
34
-            </ng-container>
35
-            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
36
-              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
37
-            </nz-option>
38
-          </nz-select>
39
-        </div>
40
-        <!-- 送回病房科室 -->
41
-        <div class="display_flex align-items_center mb8">
42
-          <nz-form-label class="label">是否开通送回病房</nz-form-label>
43
-          <nz-checkbox-group [(ngModel)]="autoSendWard" (ngModelChange)="changeAutoSendWard($event)"></nz-checkbox-group>
44
-          <nz-select *ngIf="autoSendWard[0].checked" class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
45
-            (nzOnSearch)="changeTasktype($event, 1)" nzPlaceHolder="请选择送回病房任务类型" [(ngModel)]="tasktype1Id">
46
-            <ng-container *ngFor="let option of taskTypes1">
47
-              <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
15
+            (nzOnSearch)="changequestionnaire($event, 1)" nzPlaceHolder="请选择调查问卷" [(ngModel)]="questionnaireIds">
16
+            <ng-container *ngFor="let option of questionnaireManagementData">
17
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.title" [nzValue]="option.id"></nz-option>
48
             </ng-container>
18
             </ng-container>
49
             <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
19
             <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
50
               <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
20
               <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
51
             </nz-option>
21
             </nz-option>
52
           </nz-select>
22
           </nz-select>
53
         </div>
23
         </div>
54
-        <!-- 送回苏醒室科室 -->
24
+        <!-- 任务类型 -->
55
         <div class="display_flex align-items_center mb8">
25
         <div class="display_flex align-items_center mb8">
56
-          <nz-form-label class="label">是否开通送回苏醒室</nz-form-label>
57
-          <nz-checkbox-group [(ngModel)]="autoSendAwakeningRoom" (ngModelChange)="changeAutoSendAwakeningRoom($event)"></nz-checkbox-group>
58
-          <nz-select *ngIf="autoSendAwakeningRoom[0].checked" class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
59
-            (nzOnSearch)="changeTasktype($event, 1)" nzPlaceHolder="请选择送回苏醒室任务类型" [(ngModel)]="tasktype2Id">
26
+          <nz-form-label class="label" nzRequired>任务类型</nz-form-label>
27
+          <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch [nzMode]="'multiple'"
28
+            (nzOnSearch)="changeTasktype($event)" nzPlaceHolder="请选择任务类型" [(ngModel)]="taskTypeIds">
60
             <ng-container *ngFor="let option of taskTypes1">
29
             <ng-container *ngFor="let option of taskTypes1">
61
               <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
30
               <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
62
             </ng-container>
31
             </ng-container>
@@ -65,34 +34,19 @@
65
             </nz-option>
34
             </nz-option>
66
           </nz-select>
35
           </nz-select>
67
         </div>
36
         </div>
68
-        <!-- 关联手术清洁 -->
37
+        <!-- 间隔时间 -->
69
         <div class="display_flex align-items_center mb8">
38
         <div class="display_flex align-items_center mb8">
70
-          <nz-form-label class="label">是否开通关联手术清洁建单</nz-form-label>
71
-          <nz-checkbox-group [(ngModel)]="autoRemandClean" (ngModelChange)="changeAutoRemandClean($event)"></nz-checkbox-group>
72
-          <nz-select *ngIf="autoRemandClean[0].checked" class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
73
-            (nzOnSearch)="changeTasktype($event, 2)" nzPlaceHolder="请选择送回苏醒室任务类型" [(ngModel)]="cleanTypeId">
74
-            <ng-container *ngFor="let option of taskTypes2">
75
-              <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
39
+					<nz-form-label class="label" nzRequired>间隔时间</nz-form-label>
40
+          <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false"
41
+             nzPlaceHolder="请选择间隔时间" [(ngModel)]="intervalTime">
42
+            <ng-container *ngFor="let option of timeData">
43
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.label" [nzValue]="option.value"></nz-option>
76
             </ng-container>
44
             </ng-container>
77
             <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
45
             <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
78
               <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
46
               <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
79
             </nz-option>
47
             </nz-option>
80
           </nz-select>
48
           </nz-select>
81
         </div>
49
         </div>
82
-        <!-- 是否开启手术即将开始通知 -->
83
-        <div class="display_flex align-items_center mb8">
84
-          <nz-form-label class="label">是否开启手术即将开始通知</nz-form-label>
85
-          <nz-checkbox-group [(ngModel)]="surgeryBegin"></nz-checkbox-group>
86
-        </div>
87
-      </div>
88
-      <!-- 自动建单配置 -->
89
-      <div *ngIf="tabModalName=='automaticOrderCreation'">
90
-        <!-- 自动建单 -->
91
-        <div class="display_flex align-items_center mb8">
92
-          <nz-form-label class="label">自动建单</nz-form-label>
93
-          <nz-checkbox-group [(ngModel)]="autoCreateOrders" (ngModelChange)="changeAutoCreateOrders($event)"></nz-checkbox-group>
94
-          <nz-time-picker [(ngModel)]="autoTime" nzFormat="HH:mm" *ngIf="autoCreateOrders[0].checked"></nz-time-picker>
95
-        </div>
96
       </div>
50
       </div>
97
       <div class="bottom">
51
       <div class="bottom">
98
         <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>
52
         <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>

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

@@ -49,6 +49,21 @@ export class AccExamineSetComponent implements OnInit {
49
   tasktype1Id:any;
49
   tasktype1Id:any;
50
   tasktype2Id:any;
50
   tasktype2Id:any;
51
   cleanTypeId:any;
51
   cleanTypeId:any;
52
+	associationTypeIds:any;
53
+	questionnaireManagementData:any; //调查问卷数据
54
+	questionnaireIds:Number; //问卷参数
55
+	intervalTime:string = ''; //间隔时间参数
56
+	taskTypeIds:any = []; //任务类型参数
57
+	editId:'';
58
+	targetData:any = [];
59
+	stateData:any = [];
60
+	// 间隔时间数据
61
+	timeData:any[] = [
62
+	  {label:'10',value: 10},
63
+		{label:'15',value: 15},
64
+		{label:'30',value: 30},
65
+		{label:'60',value: 60}
66
+	];
52
   // 配置
67
   // 配置
53
   configs:any = {};
68
   configs:any = {};
54
   searchTimerSubject = new Subject();
69
   searchTimerSubject = new Subject();
@@ -60,8 +75,9 @@ export class AccExamineSetComponent implements OnInit {
60
       let fun = v[0];
75
       let fun = v[0];
61
       fun.call(this, v[1], v[2], v[3]);
76
       fun.call(this, v[1], v[2], v[3]);
62
     });
77
     });
63
-    this.getTaskTypes('', true, 1);
64
-    this.getTaskTypes('', false, 2);
78
+    // this.getTaskTypes('', true, 1);
79
+    // this.getTaskTypes('', false, 2);
80
+		this.getRelevanceType()
65
   }
81
   }
66
 
82
 
67
   // 切换tab
83
   // 切换tab
@@ -106,50 +122,36 @@ export class AccExamineSetComponent implements OnInit {
106
 
122
 
107
   // 保存
123
   // 保存
108
   submitForm() {
124
   submitForm() {
109
-    if(!this.tasktypeId){
110
-      this.msg.create("warning", "请选择接手术关联任务类型!");
125
+    if(!this.questionnaireIds){
126
+      this.msg.create("warning", "请选择调查问卷!");
111
       return;
127
       return;
112
     }
128
     }
113
-    if(!this.recoveryDeptId){
114
-      this.msg.create("warning", "请选择苏醒室科室!");
129
+    if(this.taskTypeIds.length==0){
130
+      this.msg.create("warning", "请选择任务类型!");
115
       return;
131
       return;
116
     }
132
     }
117
-    if(this.autoCreateOrders[0].checked && !this.autoTime){
118
-      this.msg.create("warning", "请选择建单时间!");
133
+    if(this.intervalTime==''){
134
+      this.msg.create("warning", "请选择间隔时间!");
119
       return;
135
       return;
120
     }
136
     }
121
-    if(this.autoSendWard[0].checked && !this.tasktype1Id){
122
-      this.msg.create("warning", "请选择送回病房任务类型!");
123
-      return;
124
-    }
125
-    if(this.autoSendAwakeningRoom[0].checked && !this.tasktype2Id){
126
-      this.msg.create("warning", "请选择送回苏醒室任务类型!");
127
-      return;
128
-    }
129
-    if(this.autoRemandClean[0].checked && !this.cleanTypeId){
130
-      this.msg.create("warning", "请选择手术清洁任务类型!");
131
-      return;
132
-    }
133
-    let editData:any = {
134
-      hosId: this.hosId,
135
-      taskType: this.tasktypeId || undefined,
136
-      recoveryDeptId: this.recoveryDeptId || undefined,
137
-      ordinaryField: this.surgeryField,
138
-      autoCreate: this.autoCreateOrders[0].checked ? 1 : 0,
139
-      createTime: this.autoTime ? format(startOfMinute(this.autoTime), "yyyy-MM-dd HH:mm:ss") : undefined,
140
-      remandClinical: this.autoSendWard[0].checked ? 1 : 0,
141
-      clinicalTypeId: this.tasktype1Id || undefined,
142
-      remandRecovery: this.autoSendAwakeningRoom[0].checked ? 1 : 0,
143
-      recoveryTypeId: this.tasktype2Id || undefined,
144
-      remandClean: this.autoRemandClean[0].checked ? 1 : 0,
145
-      surgeryBegin: this.surgeryBegin[0].checked ? 1 : 0,
146
-      cleanTypeId: this.cleanTypeId || undefined,
137
+		let taskArr = JSON.parse(JSON.stringify(this.taskTypeIds))
138
+    let editData = {
139
+			// questionnaireConfig:{
140
+				id:'',
141
+				hosId: this.hosId,
142
+				questionnaireIds:this.questionnaireIds,//问卷参数
143
+				intervalTime:this.intervalTime, //间隔时间参数
144
+				taskTypeIds:taskArr.join(',') //任务类型参数
145
+			// }
147
     };
146
     };
148
-    let postData = Object.assign({}, this.configs, editData);
149
-    console.log(postData);
147
+		if(this.editId){
148
+			editData.id = this.editId
149
+		}else{
150
+			delete editData.id 
151
+		}
150
     this.btnLoading = true;
152
     this.btnLoading = true;
151
     this.mainService
153
     this.mainService
152
-      .simplePost("addData", "taskTypeConfig", postData)
154
+      .simplePost("addData", "questionnaireConfig", editData)
153
       .subscribe((result) => {
155
       .subscribe((result) => {
154
         this.btnLoading = false;
156
         this.btnLoading = false;
155
         if (result.status == 200) {
157
         if (result.status == 200) {
@@ -157,11 +159,16 @@ export class AccExamineSetComponent implements OnInit {
157
         }
159
         }
158
       });
160
       });
159
   }
161
   }
160
-
162
+	
163
+	// 调查问卷搜索
164
+	changequestionnaire(e) {
165
+		this.searchTimer(this.getOneQuestionnaireManagement, e, false)
166
+	}
167
+	
161
   // 用户输入搜索任务类型
168
   // 用户输入搜索任务类型
162
   isLoading: boolean = false;
169
   isLoading: boolean = false;
163
-  changeTasktype(e, type) {
164
-    this.searchTimer(this.getTaskTypes, e, false, type);
170
+  changeTasktype(e) {
171
+    this.searchTimer(this.getTaskTypes, e, false);
165
   }
172
   }
166
 
173
 
167
   changeRecoveryDepts(e) {
174
   changeRecoveryDepts(e) {
@@ -173,46 +180,96 @@ export class AccExamineSetComponent implements OnInit {
173
     this.isLoading = true;
180
     this.isLoading = true;
174
     this.searchTimerSubject.next([fun, e, isFirst, type]);
181
     this.searchTimerSubject.next([fun, e, isFirst, type]);
175
   }
182
   }
176
-
183
+	
184
+	// 获取关联任务类型
185
+	getRelevanceType(){
186
+		this.associationTypeIds=[]
187
+		this.mainService.getDictionary("list", "association_types").subscribe((data) => {
188
+			for( let t of data){
189
+				if(t.value=='patientTransport' || 
190
+				t.value=='other' || t.value=='inspect'){
191
+					this.associationTypeIds.push(t)
192
+				}
193
+			}
194
+			this.getTaskTypes('', true, 1)
195
+			this.getState()
196
+		});
197
+	}
198
+	
199
+	// 获取问卷状态
200
+	getState(){
201
+		this.mainService.getDictionary("list", "survey_state").subscribe((data) => {
202
+			this.stateData = data
203
+			this.getQuestionnaireTarget()
204
+		});
205
+	}
206
+	
207
+	// 获取问卷调查目标
208
+	getQuestionnaireTarget(){
209
+		this.mainService.getDictionary("list", "survey_target").subscribe((data) => {
210
+			this.targetData = data
211
+			this.getOneQuestionnaireManagement()
212
+		});
213
+	}
214
+	
215
+	// 获取问卷数据
216
+	getOneQuestionnaireManagement(e:string = '', isFirst:boolean = false,){
217
+		let targetId = this.targetData.find(i=>i.value==4)
218
+		let stateId = this.stateData.find(i=>i.value==2)
219
+		let query = {
220
+			idx: 0,
221
+			questionnaireManagement: {
222
+				title:e,
223
+				hosId: 1,
224
+				surveyTarget:{ //问卷调查目标
225
+					id:targetId.id
226
+				},
227
+				state:{ //问卷状态
228
+					id:stateId.id
229
+				}
230
+			},
231
+			hosId: 1,
232
+			sum: 10
233
+		}
234
+		isFirst && (this.loading = true);
235
+		this.isLoading = true;
236
+	  this.mainService.getFetchDataList('api', "questionnaireManagement", query).subscribe(res=>{
237
+	    if(res.status == 200){
238
+				this.isLoading = false;
239
+	      this.questionnaireManagementData = res.list;
240
+	    }
241
+	  })
242
+	}
243
+	
177
   //获取接手术关联任务类型
244
   //获取接手术关联任务类型
178
   // 1 患者其他服务
245
   // 1 患者其他服务
179
   // 2 其他临床服务
246
   // 2 其他临床服务
180
   getTaskTypes(e:string = '', isFirst:boolean = false, type:number = 1) {
247
   getTaskTypes(e:string = '', isFirst:boolean = false, type:number = 1) {
248
+		let ids = []
249
+		for(let i of this.associationTypeIds){
250
+			ids.push(i.id)
251
+		}
181
     isFirst && (this.loading = true);
252
     isFirst && (this.loading = true);
182
     let postData:any = {
253
     let postData:any = {
183
       idx: 0,
254
       idx: 0,
184
-      sum: 10,
255
+      sum: 9999,
185
       taskType: {
256
       taskType: {
186
         taskName: e,
257
         taskName: e,
187
         simpleQuery: true,
258
         simpleQuery: true,
259
+				associationTypeIds:ids.join(','),
188
         hosId: {
260
         hosId: {
189
           id: this.hosId
261
           id: this.hosId
190
         }
262
         }
191
       }
263
       }
192
     };
264
     };
193
-    if(type === 1){
194
-      postData.taskType.associationType = {
195
-        key: 'association_types',
196
-        value: 'patientTransport'
197
-      }
198
-    }else if(type === 2){
199
-      postData.taskType.associationType = {
200
-        key: 'association_types',
201
-        value: 'other'
202
-      }
203
-    }
204
     this.isLoading = true;
265
     this.isLoading = true;
205
     this.mainService
266
     this.mainService
206
       .getFetchDataList("simple/data", "taskType", postData)
267
       .getFetchDataList("simple/data", "taskType", postData)
207
       .subscribe((result) => {
268
       .subscribe((result) => {
208
         this.isLoading = false;
269
         this.isLoading = false;
209
         if (result.status == 200) {
270
         if (result.status == 200) {
210
-          if(type === 1){
211
-            this.taskTypes1 = result.list || [];
212
-          }else if(type === 2){
213
-            this.taskTypes2 = result.list || [];
214
-          }
215
-          isFirst && this.getDeptType(true);
271
+          this.taskTypes1 = result.list || [];
272
+          isFirst && this.getConfig();
216
         }
273
         }
217
       });
274
       });
218
   }
275
   }
@@ -258,83 +315,28 @@ export class AccExamineSetComponent implements OnInit {
258
   // 获取配置
315
   // 获取配置
259
   getConfig() {
316
   getConfig() {
260
     this.loading = true;
317
     this.loading = true;
318
+    let postData = {
319
+      idx: 0,
320
+      sum: 10,
321
+      questionnaireConfig: {
322
+        hosId: this.hosId,
323
+      }
324
+    };
261
     this.mainService
325
     this.mainService
262
-      .getDictionary("list", "ordinary_field")
263
-      .subscribe((data) => {
264
-        this.surgeryField = data.find(v => v.value == 'surgery');
265
-        if(this.surgeryField){
266
-          let postData = {
267
-            idx: 0,
268
-            sum: 10,
269
-            taskTypeConfig: {
270
-              hosId: this.hosId,
271
-              ordinaryField: this.surgeryField
272
-            }
273
-          };
274
-          this.mainService
275
-            .getFetchDataList("simple/data", "taskTypeConfig", postData)
276
-            .subscribe((result) => {
277
-              this.loading = false;
278
-              if (result.status == 200) {
279
-                this.configs = result.list[0] || {};
280
-
281
-                // 接手术关联任务类型
282
-                this.tasktypeId = this.configs.taskTypeDTO ? this.configs.taskTypeDTO.id : null;
283
-                if(this.tasktypeId && this.configs.taskTypeDTO){
284
-                  let isInArr = this.taskTypes1.some(v => v.id == this.tasktypeId);
285
-                  if(!isInArr){
286
-                    this.taskTypes1.unshift(this.configs.taskTypeDTO);
287
-                  }
288
-                }
289
-
290
-                // 苏醒室科室
291
-                this.recoveryDeptId = this.configs.recoveryDeptId || null;
292
-                if(this.recoveryDeptId && this.configs.recoveryDeptDTO){
293
-                  let isInArr = this.recoveryDepts.some(v => v.id == this.recoveryDeptId);
294
-                  if(!isInArr){
295
-                    this.recoveryDepts.unshift(this.configs.recoveryDeptDTO);
296
-                  }
297
-                }
298
-
299
-                this.autoCreateOrders[0].checked = this.configs.autoCreate == 1;
300
-                this.autoTime = this.configs.createTime ? new Date(this.configs.createTime) : null;
301
-                this.autoSendWard[0].checked = this.configs.remandClinical == 1;
302
-
303
-                // 送回病房科室
304
-                this.tasktype1Id = this.configs.clinicalTypeId || null;
305
-                if(this.tasktype1Id && this.configs.clinicalTypeDTO){
306
-                  let isInArr = this.taskTypes1.some(v => v.id == this.tasktype1Id);
307
-                  if(!isInArr){
308
-                    this.taskTypes1.unshift(this.configs.clinicalTypeDTO);
309
-                  }
310
-                }
311
-                this.autoSendAwakeningRoom[0].checked = this.configs.remandRecovery == 1;
312
-
313
-                // 送回苏醒室科室
314
-                this.tasktype2Id = this.configs.recoveryTypeId || null;
315
-                if(this.tasktype2Id && this.configs.recoveryType){
316
-                  let isInArr = this.taskTypes1.some(v => v.id == this.tasktype2Id);
317
-                  if(!isInArr){
318
-                    this.taskTypes1.unshift(this.configs.recoveryType);
319
-                  }
320
-                }
321
-
322
-                this.autoRemandClean[0].checked = this.configs.remandClean == 1;
323
-
324
-                // 关联手术清洁
325
-                this.cleanTypeId = this.configs.cleanTypeId || null;
326
-                if(this.cleanTypeId && this.configs.cleanType){
327
-                  let isInArr = this.taskTypes2.some(v => v.id == this.cleanTypeId);
328
-                  if(!isInArr){
329
-                    this.taskTypes2.unshift(this.configs.cleanType);
330
-                  }
331
-                }
332
-
333
-                this.surgeryBegin[0].checked = this.configs.surgeryBegin == 1;
334
-              }
335
-            });
336
-        }else{
337
-          this.loading = false;
326
+      .getFetchDataList("simple/data", "questionnaireConfig", postData)
327
+      .subscribe((result) => {
328
+        this.loading = false;
329
+        if (result.status == 200) {
330
+    			let data = result.list[0] || {};
331
+					this.editId = data.id
332
+					let questionData = data.questionnaireDTOS.map(i=>{
333
+						return i.id
334
+					})
335
+    			this.questionnaireIds = Number(questionData.join(',')) //调查问卷
336
+    			this.intervalTime = data.intervalTime //间隔时间
337
+    			this.taskTypeIds = data.taskTypeDTOS.map(i=>{ //任务类型
338
+						return i.id
339
+					}) 
338
         }
340
         }
339
       });
341
       });
340
   }
342
   }

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

@@ -4,7 +4,7 @@
4
       <div *ngIf="!loading">
4
       <div *ngIf="!loading">
5
         <h1>{{qm.title}}</h1>
5
         <h1>{{qm.title}}</h1>
6
         <p>{{qm.surveyDescribe}}</p>
6
         <p>{{qm.surveyDescribe}}</p>
7
-        <form nz-form [formGroup]="validateForm">
7
+        <form nz-form [formGroup]="validateForm" >
8
           <ng-container *ngFor="let item of listOfData;let i=index;">
8
           <ng-container *ngFor="let item of listOfData;let i=index;">
9
             <!-- 单选 -->
9
             <!-- 单选 -->
10
             <nz-form-item *ngIf="item.answerMode && item.answerMode.value == 1">
10
             <nz-form-item *ngIf="item.answerMode && item.answerMode.value == 1">
@@ -32,7 +32,7 @@
32
           </ng-container>
32
           </ng-container>
33
           <nz-form-item nz-row class="submit" *ngIf="listOfData.length && qm.state.value == 2">
33
           <nz-form-item nz-row class="submit" *ngIf="listOfData.length && qm.state.value == 2">
34
             <nz-form-control>
34
             <nz-form-control>
35
-              <button nz-button nzType="primary" [nzLoading]="loading" (click)="submitForm()">提交</button>
35
+              <button nz-button [disabled]="pastStatus" nzType="primary" [nzLoading]="loading" (click)="submitForm()">提交</button>
36
             </nz-form-control>
36
             </nz-form-control>
37
           </nz-form-item>
37
           </nz-form-item>
38
         </form>
38
         </form>

+ 19 - 1
src/app/views/preview/preview.component.ts

@@ -17,7 +17,8 @@ export class PreviewComponent implements OnInit {
17
   listOfData:any[] = [];
17
   listOfData:any[] = [];
18
   success:boolean = false;
18
   success:boolean = false;
19
   isM:boolean = false;
19
   isM:boolean = false;
20
-
20
+	pastStatus:boolean = false;
21
+	
21
   constructor(
22
   constructor(
22
     private route: ActivatedRoute,
23
     private route: ActivatedRoute,
23
     private mainService:MainService,
24
     private mainService:MainService,
@@ -33,6 +34,10 @@ export class PreviewComponent implements OnInit {
33
     }else{
34
     }else{
34
       document.documentElement.style.fontSize = '100px';
35
       document.documentElement.style.fontSize = '100px';
35
     }
36
     }
37
+		let gdid = this.route.snapshot.queryParams.gdid;
38
+		if(gdid){
39
+			this.verifyPast(gdid)
40
+		}
36
     this.getList();
41
     this.getList();
37
   }
42
   }
38
   // 初始化Form
43
   // 初始化Form
@@ -74,6 +79,19 @@ export class PreviewComponent implements OnInit {
74
       const reg = /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i;
79
       const reg = /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i;
75
       return reg.test(navigator.userAgent);
80
       return reg.test(navigator.userAgent);
76
   }
81
   }
82
+	// 验证工单问卷调查二维码是否过期
83
+	verifyPast(gdid){
84
+		this.mainService.verifyPastApi({
85
+			gdId:gdid
86
+		}).subscribe((res:any)=>{
87
+		  if (res.status == 200) {
88
+		    this.pastStatus = false;
89
+		  }else{
90
+				this.pastStatus = true;
91
+		    this.message.create('error',res.info,{ nzDuration: 5000 });
92
+		  }
93
+		})
94
+	}
77
   // 问卷数据
95
   // 问卷数据
78
   getList() {
96
   getList() {
79
     let token = this.route.snapshot.queryParams.token;
97
     let token = this.route.snapshot.queryParams.token;