maotao 1 viikko sitten
vanhempi
commit
904ddcf36a

+ 6 - 0
src/app/app-routing.module.ts

@@ -149,6 +149,12 @@ const routes: Routes = [
149 149
     loadChildren: () => import('./views/nurse-config/nurse-config.module').then(m => m.NurseConfigModule),
150 150
     canActivate: [NurseConfigGuard]
151 151
   },
152
+	// 数据生产查看
153
+	{
154
+	  path: 'dataGenerate',
155
+	  loadChildren: () => import('./views/data-generate/data-generate.module').then(m => m.DataGenerateModule),
156
+	  canActivate: [NurseConfigGuard]
157
+	},
152 158
   // 问卷预览
153 159
   {
154 160
     path: "preview",

+ 329 - 0
src/app/components/configurationCenter/configuration-closedData/configuration-closedData.component.html

@@ -0,0 +1,329 @@
1
+<div class="content specimen" id="dictionary">
2
+  <div class="contentInner">
3
+		<div class="address">
4
+		  <overlay-scrollbars #osComponentRef1 class="contentBody">
5
+		    <div class="contentItem" [title]="item.name" [ngClass]="{ active: item.key == activeDictionaryKey }" (click)="clickDictionaryKey(item)" *ngFor="let item of dictionaryKeyList">{{ item.name }}</div>
6
+		  </overlay-scrollbars>
7
+		</div>
8
+    <div class="addressAssign">
9
+      <div class="contentBody2">
10
+        <div class="TaskTypeManagement" *ngIf="activeDictionaryKey=='specimen'">
11
+          <div class="taskTypeInfo">
12
+            <div class="top">
13
+              <div class="item" (click)="tabModal('course')" [ngClass]="{'items':tabModalName=='course'}">
14
+                过程数据
15
+              </div>
16
+            </div>
17
+            <div class="list" #scrollContainer *ngIf="!loading">
18
+              <!-- 过程数据 -->
19
+								<div class="top-style">
20
+									<div class="sign"></div>
21
+									<div>查询范围</div>
22
+								</div>
23
+								
24
+								<!-- 同步开始时间 -->
25
+								<div class="display_flex align-items_center mb8">
26
+								  <nz-form-label class="label" nzRequired>同步开始时间</nz-form-label>
27
+								  <nz-range-picker nzShowTime (nzOnCalendarChange)="onCalendarChangeDate($event)" [(ngModel)]="dateRange" (ngModelChange)="changeDate($event)"></nz-range-picker>
28
+								</div>
29
+								
30
+                <!-- 标本状态 -->
31
+                <div class="display_flex align-items_center mb8">
32
+                  <nz-form-label class="label">标本状态</nz-form-label>
33
+                  <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzAllowClear
34
+										nzPlaceHolder="请选择标本状态" [(ngModel)]="transState" (nzOpenChange)="openDrugList($event)">
35
+                    <ng-container *ngFor="let option of drugStatusList">
36
+                      <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
37
+                    </ng-container>
38
+                  </nz-select>
39
+                </div>
40
+								
41
+								<div class="display_flex align-items_center mb8">
42
+									<nz-form-label class="label" nzRequired>是否关联工单</nz-form-label>
43
+									<nz-radio-group type="active" [(ngModel)]="bindOrder">
44
+										<label nz-radio [nzValue]="1">是</label>
45
+										<label nz-radio [nzValue]="0">否</label>
46
+									</nz-radio-group>
47
+								</div>
48
+								
49
+								<div class="display_flex align-items_center mb8">
50
+									<nz-form-label class="label">编码</nz-form-label>
51
+									<input nz-input [(ngModel)]="code" class="w320px"/>
52
+								</div>
53
+							<div class="interval"></div>
54
+							<div class="top-style">
55
+								<div class="sign"></div>
56
+								<div>生成规则</div>
57
+							</div>
58
+							<!-- 收取时间间隔区间 -->
59
+							<div class="display_flex align-items_center mb8">
60
+								<nz-form-label class="label max" nzRequired>收取时间间隔区间</nz-form-label>
61
+								<input nz-input [(ngModel)]="arriveStartMinute" class="min-input"/>
62
+								<span class="span"> ~	</span>
63
+								<input nz-input [(ngModel)]="arriveEndMinute" class="min-input"/>
64
+								&nbsp;&nbsp;<span>分钟</span>
65
+							</div>
66
+							<!-- 送达时间间隔区间 -->
67
+							<div class="display_flex align-items_center mb8">
68
+								<nz-form-label class="label max" nzRequired>送达时间间隔区间</nz-form-label>
69
+								<input nz-input [(ngModel)]="sendStartMinute" class="min-input"/>
70
+								<span class="span">~</span>
71
+								<input nz-input [(ngModel)]="sendEndMinute" class="min-input"/>
72
+								&nbsp;&nbsp;<span>分钟</span>
73
+							</div>
74
+							<!-- 目标状态 -->
75
+							<div class="display_flex align-items_center mb8">
76
+								<nz-form-label class="label max" nzRequired>目标状态</nz-form-label>
77
+								<nz-radio-group type="active" [(ngModel)]="completeState">
78
+									<label nz-radio [nzValue]="1">到达</label>
79
+									<label nz-radio [nzValue]="2">送达</label>
80
+								</nz-radio-group>
81
+							</div>
82
+							<!-- 配送人员 -->
83
+							<div class="display_flex align-items_center mb8">
84
+							  <nz-form-label class="label max" nzRequired>配送人员</nz-form-label>
85
+								<nz-select nzMode="multiple" class="w320px" [nzDropdownMatchSelectWidth]="false" nzAllowClear
86
+									nzPlaceHolder="请选择配送人员" [(ngModel)]="userIds" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
87
+								  (nzOnSearch)="changeUser($event)" nzAllowClear>
88
+								  <ng-container *ngFor="let option of distributionList">
89
+								    <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
90
+								  </ng-container>
91
+								  <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
92
+								    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
93
+								  </nz-option>
94
+								</nz-select>
95
+							</div>
96
+              <div class="bottom">
97
+                <button class="login-form-button" nzType="primary" nz-button (click)="generateForm()">生成数据</button>
98
+								<button class="login-form-button" nzType="primary" [nzLoading]="btnLoading2" nz-button (click)="submitForm()">查询</button>
99
+								<button class="login-form-button" nzType="default" [nzLoading]="btnLoading3" nz-button (click)="resetForm()">重置</button>
100
+              </div>
101
+							<div class="tip" *ngIf="showNum">共查询数据 <span class="weight">{{queryNum}}</span> 条</div>
102
+							<div class="tip" *ngIf="showGenerate">共修改数据 <span class="weight">{{generateObj.count}}</span> 条,生成日志 <span class="weight">{{generateObj.logCount}}</span> 条</div>
103
+						</div>
104
+            <div class="list" *ngIf="loading">
105
+              <div class="loadingFull display_flex justify-content_flex-center align-items_center">
106
+                <div class="loadingFullInner">
107
+                  <img src="../../../assets/images/loading.gif" alt="">
108
+                  <div>加载中...</div>
109
+                </div>
110
+              </div>
111
+            </div>
112
+          </div>
113
+        </div>
114
+				<div class="TaskTypeManagement" *ngIf="activeDictionaryKey=='drugsBag'">
115
+					<div class="taskTypeInfo">
116
+					  <div class="top">
117
+					    <div class="item" (click)="tabModal('course')" [ngClass]="{'items':tabModalName=='course'}">
118
+					      过程数据
119
+					    </div>
120
+					  </div>
121
+					  <div class="list"  #scrollContainer *ngIf="!loading">
122
+					    <!-- 过程数据 -->
123
+								<div class="top-style">
124
+									<div class="sign"></div>
125
+									<div>查询范围</div>
126
+								</div>
127
+								
128
+								<!-- 同步开始时间 -->
129
+								<div class="display_flex align-items_center mb8">
130
+								  <nz-form-label class="label" nzRequired>同步开始时间</nz-form-label>
131
+								  <nz-range-picker nzShowTime (nzOnCalendarChange)="onCalendarChangeDate($event)" [(ngModel)]="dateRange" (ngModelChange)="changeDate($event)"></nz-range-picker>
132
+								</div>
133
+								
134
+					      <!-- 药品状态 -->
135
+					      <div class="display_flex align-items_center mb8">
136
+					        <nz-form-label class="label">药品状态</nz-form-label>
137
+					        <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzAllowClear
138
+										nzPlaceHolder="请选择药品状态" [(ngModel)]="transState" (nzOpenChange)="openDrugList($event)">
139
+					          <ng-container *ngFor="let option of drugStatusList">
140
+					            <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
141
+					          </ng-container>
142
+					        </nz-select>
143
+					      </div>
144
+								
145
+								<div class="display_flex align-items_center mb8">
146
+									<nz-form-label class="label" nzRequired>是否关联工单</nz-form-label>
147
+									<nz-radio-group type="active" [(ngModel)]="bindOrder">
148
+										<label nz-radio [nzValue]="1">是</label>
149
+										<label nz-radio [nzValue]="0">否</label>
150
+									</nz-radio-group>
151
+								</div>
152
+								
153
+								<div class="display_flex align-items_center mb8">
154
+									<nz-form-label class="label">编码</nz-form-label>
155
+									<input nz-input [(ngModel)]="code" class="w320px"/>
156
+								</div>
157
+							<div class="interval"></div>
158
+							<div class="top-style">
159
+								<div class="sign"></div>
160
+								<div>生成规则</div>
161
+							</div>
162
+							<!-- 收取时间间隔区间 -->
163
+							<div class="display_flex align-items_center mb8">
164
+								<nz-form-label class="label max" nzRequired>收取时间间隔区间</nz-form-label>
165
+								<input nz-input [(ngModel)]="arriveStartMinute" class="min-input"/>
166
+								<span class="span"> ~	</span>
167
+								<input nz-input [(ngModel)]="arriveEndMinute" class="min-input"/>
168
+								&nbsp;&nbsp;<span>分钟</span>
169
+							</div>
170
+							<!-- 送达时间间隔区间 -->
171
+							<div class="display_flex align-items_center mb8">
172
+								<nz-form-label class="label max" nzRequired>送达时间间隔区间</nz-form-label>
173
+								<input nz-input [(ngModel)]="sendStartMinute" class="min-input"/>
174
+								<span class="span">~</span>
175
+								<input nz-input [(ngModel)]="sendEndMinute" class="min-input"/>
176
+								&nbsp;&nbsp;<span>分钟</span>
177
+							</div>
178
+							<!-- 目标状态 -->
179
+							<div class="display_flex align-items_center mb8">
180
+								<nz-form-label class="label max" nzRequired>目标状态</nz-form-label>
181
+								<nz-radio-group type="active" [(ngModel)]="completeState">
182
+									<label nz-radio [nzValue]="1">到达</label>
183
+									<label nz-radio [nzValue]="2">送达</label>
184
+								</nz-radio-group>
185
+							</div>
186
+							<!-- 配送人员 -->
187
+							<div class="display_flex align-items_center mb8">
188
+							  <nz-form-label class="label max" nzRequired>配送人员</nz-form-label>
189
+								<nz-select nzMode="multiple" class="w320px" [nzDropdownMatchSelectWidth]="false" nzAllowClear
190
+									nzPlaceHolder="请选择配送人员" [(ngModel)]="userIds" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
191
+								  (nzOnSearch)="changeUser($event)" nzAllowClear>
192
+								  <ng-container *ngFor="let option of distributionList">
193
+								    <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
194
+								  </ng-container>
195
+								  <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
196
+								    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
197
+								  </nz-option>
198
+								</nz-select>
199
+							</div>
200
+					    <div class="bottom">
201
+					      <button class="login-form-button" nzType="primary" nz-button (click)="generateForm()">生成数据</button>
202
+								<button class="login-form-button" nzType="primary" [nzLoading]="btnLoading2" nz-button (click)="submitForm()">查询</button>
203
+								<button class="login-form-button" nzType="default" [nzLoading]="btnLoading3" nz-button (click)="resetForm()">重置</button>
204
+					    </div>
205
+							<div class="tip" *ngIf="showNum">共查询数据 <span class="weight">{{queryNum}}</span> 条</div>
206
+							<div class="tip" *ngIf="showGenerate">共修改数据 <span class="weight">{{generateObj.count}}</span> 条,生成日志 <span class="weight">{{generateObj.logCount}}</span> 条</div>
207
+					  </div>
208
+					  <div class="list" *ngIf="loading">
209
+					    <div class="loadingFull display_flex justify-content_flex-center align-items_center">
210
+					      <div class="loadingFullInner">
211
+					        <img src="../../../assets/images/loading.gif" alt="">
212
+					        <div>加载中...</div>
213
+					      </div>
214
+					    </div>
215
+					  </div>
216
+					</div>
217
+				</div>
218
+				<div class="TaskTypeManagement" *ngIf="activeDictionaryKey=='blood'">
219
+					<div class="taskTypeInfo">
220
+					  <div class="top">
221
+					    <div class="item" (click)="tabModal('course')" [ngClass]="{'items':tabModalName=='course'}">
222
+					      过程数据
223
+					    </div>
224
+					  </div>
225
+					  <div class="list" #scrollContainer *ngIf="!loading">
226
+					    <!-- 过程数据 -->
227
+								<div class="top-style">
228
+									<div class="sign"></div>
229
+									<div>查询范围</div>
230
+								</div>
231
+								
232
+								<!-- 同步开始时间 -->
233
+								<div class="display_flex align-items_center mb8">
234
+								  <nz-form-label class="label" nzRequired>同步开始时间</nz-form-label>
235
+								  <nz-range-picker nzShowTime (nzOnCalendarChange)="onCalendarChangeDate($event)" [(ngModel)]="dateRange" (ngModelChange)="changeDate($event)"></nz-range-picker>
236
+								</div>
237
+								
238
+					      <!-- 血制品状态 -->
239
+					      <div class="display_flex align-items_center mb8">
240
+					        <nz-form-label class="label">血制品状态</nz-form-label>
241
+					        <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzAllowClear
242
+										nzPlaceHolder="请选择血制品状态" [(ngModel)]="transState" (nzOpenChange)="openDrugList($event)">
243
+					          <ng-container *ngFor="let option of drugStatusList">
244
+					            <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
245
+					          </ng-container>
246
+					        </nz-select>
247
+					      </div>
248
+								
249
+								<div class="display_flex align-items_center mb8">
250
+									<nz-form-label class="label" nzRequired>是否关联工单</nz-form-label>
251
+									<nz-radio-group type="active" [(ngModel)]="bindOrder">
252
+										<label nz-radio [nzValue]="1">是</label>
253
+										<label nz-radio [nzValue]="0">否</label>
254
+									</nz-radio-group>
255
+								</div>
256
+								
257
+								<div class="display_flex align-items_center mb8">
258
+									<nz-form-label class="label">编码</nz-form-label>
259
+									<input nz-input [(ngModel)]="code" class="w320px"/>
260
+								</div>
261
+							<div class="interval"></div>
262
+							<div class="top-style">
263
+								<div class="sign"></div>
264
+								<div>生成规则</div>
265
+							</div>
266
+							<!-- 收取时间间隔区间 -->
267
+							<div class="display_flex align-items_center mb8">
268
+								<nz-form-label class="label max" nzRequired>收取时间间隔区间</nz-form-label>
269
+								<input nz-input [(ngModel)]="arriveStartMinute" class="min-input"/>
270
+								<span class="span"> ~	</span>
271
+								<input nz-input [(ngModel)]="arriveEndMinute" class="min-input"/>
272
+								&nbsp;&nbsp;<span>分钟</span>
273
+							</div>
274
+							<!-- 送达时间间隔区间 -->
275
+							<div class="display_flex align-items_center mb8">
276
+								<nz-form-label class="label max" nzRequired>送达时间间隔区间</nz-form-label>
277
+								<input nz-input [(ngModel)]="sendStartMinute" class="min-input"/>
278
+								<span class="span">~</span>
279
+								<input nz-input [(ngModel)]="sendEndMinute" class="min-input"/>
280
+								&nbsp;&nbsp;<span>分钟</span>
281
+							</div>
282
+							<!-- 目标状态 -->
283
+							<div class="display_flex align-items_center mb8">
284
+								<nz-form-label class="label max" nzRequired>目标状态</nz-form-label>
285
+								<nz-radio-group type="active" [(ngModel)]="completeState">
286
+									<label nz-radio [nzValue]="1">到达</label>
287
+									<label nz-radio [nzValue]="2">送达</label>
288
+								</nz-radio-group>
289
+							</div>
290
+							<!-- 配送人员 -->
291
+							<div class="display_flex align-items_center mb8">
292
+							  <nz-form-label class="label max" nzRequired>配送人员</nz-form-label>
293
+								<nz-select nzMode="multiple" class="w320px" [nzDropdownMatchSelectWidth]="false" nzAllowClear
294
+									nzPlaceHolder="请选择配送人员" [(ngModel)]="userIds" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
295
+								  (nzOnSearch)="changeUser($event)" nzAllowClear>
296
+								  <ng-container *ngFor="let option of distributionList">
297
+								    <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
298
+								  </ng-container>
299
+								  <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
300
+								    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
301
+								  </nz-option>
302
+								</nz-select>
303
+							</div>
304
+					    <div class="bottom">
305
+					      <button class="login-form-button" nzType="primary" nz-button (click)="generateForm()">生成数据</button>
306
+								<button class="login-form-button" nzType="primary" [nzLoading]="btnLoading2" nz-button (click)="submitForm()">查询</button>
307
+								<button class="login-form-button" nzType="default" [nzLoading]="btnLoading3" nz-button (click)="resetForm()">重置</button>
308
+					    </div>
309
+							<div class="tip" *ngIf="showNum">共查询数据 <span class="weight">{{queryNum}}</span> 条</div>
310
+							<div class="tip" *ngIf="showGenerate">共修改数据 <span class="weight">{{generateObj.count}}</span> 条,生成日志 <span class="weight">{{generateObj.logCount}}</span> 条</div>
311
+					  </div>
312
+					  <div class="list" *ngIf="loading">
313
+					    <div class="loadingFull display_flex justify-content_flex-center align-items_center">
314
+					      <div class="loadingFullInner">
315
+					        <img src="../../../assets/images/loading.gif" alt="">
316
+					        <div>加载中...</div>
317
+					      </div>
318
+					    </div>
319
+					  </div>
320
+					</div>
321
+				</div>
322
+      </div>
323
+    </div>
324
+  </div>
325
+	
326
+	<app-dialog-delete [delModal]="generateModal" (hideDelModalEvent)="hideGenerateModal()" [btnLoading]="btnLoading1"
327
+	  (confirmDelEvent)="confirmGenerate()" content="你确认要执行数据生成吗?"></app-dialog-delete>
328
+		
329
+</div>

+ 889 - 0
src/app/components/configurationCenter/configuration-closedData/configuration-closedData.component.less

@@ -0,0 +1,889 @@
1
+@import "../../../../../src/theme.less";
2
+:host {
3
+  height: 100%;
4
+  display: flex;
5
+  flex-direction: column;
6
+  justify-content: space-between;
7
+  background-color: #F0F2F5;
8
+  .list-template__nzTable,
9
+  .list-template__bottom{
10
+    padding: 0!important;
11
+    border: none!important;
12
+    background: #fff!important;
13
+  }
14
+  .list-template{
15
+    width: 100%!important;
16
+    height: 100%!important;
17
+  }
18
+  #dictionary{
19
+    margin: 24px 16px;
20
+    .addressAssign{
21
+      flex: 7;
22
+    }
23
+    .contentItem{
24
+      margin: 0 16px;
25
+      padding: 8px;
26
+      text-align: center;
27
+      &.active{
28
+        background-color: @primary-color;
29
+        color: #fff;
30
+        border-radius: 4px;
31
+      }
32
+    }
33
+    .contentBody{
34
+      padding: 16px;
35
+      min-height: 0;
36
+      display: flex;
37
+      flex-direction: column;
38
+    }
39
+    .contentBody2{
40
+      flex: 1;
41
+    }
42
+    ::ng-deep .ant-form-item{
43
+      margin-bottom: 0;
44
+    }
45
+    .dictionaryRow{
46
+      display: flex;
47
+      align-items: center;
48
+      justify-content: center;
49
+      gap: 16px;
50
+      .orders{
51
+        flex: 1;
52
+        display: flex;
53
+        justify-content: flex-end;
54
+        align-items: center;
55
+      }
56
+      .name{
57
+        width: 100px;
58
+        display: flex;
59
+        justify-content: flex-end;
60
+        align-items: center;
61
+      }
62
+      .value{
63
+        flex: 3;
64
+        display: flex;
65
+        align-items: center;
66
+        .valueInput{
67
+          width: 600px;
68
+        }
69
+        .icon_transport{
70
+          font-size: 20px;
71
+          color: #8a8a8a;
72
+          cursor: pointer;
73
+        }
74
+      }
75
+
76
+    }
77
+  }
78
+  .content{
79
+    flex: 1;
80
+    min-height: 0;
81
+    display: flex;
82
+    flex-direction: column;
83
+    justify-content: space-between;
84
+    border: 1px solid #EEF3F9;
85
+    &.priority{
86
+      margin: 24px 118px 0;
87
+      background-color: #fff;
88
+      .contentInner{
89
+        padding: 48px 206px;
90
+        border: 1px solid #E8EBEF;
91
+      }
92
+    }
93
+    .contentItem{
94
+      padding: 4px 16px;
95
+      cursor: pointer;
96
+      overflow: hidden;
97
+      text-overflow: ellipsis;
98
+      white-space: nowrap;
99
+      &.active{
100
+        color: @primary-color;
101
+        background-color: #F0F6ED;
102
+        border-radius: 4px;
103
+      }
104
+    }
105
+    .contentInner{
106
+      flex: 1;
107
+      display: flex;
108
+      justify-content: space-between;
109
+      align-items: center;
110
+      padding: 0 16px;
111
+      gap: 16px;
112
+      .contentHead{
113
+        height: 45px;
114
+        display: flex;
115
+        justify-content: space-between;
116
+        align-items: center;
117
+        gap: 16px;
118
+        padding: 0 16px;
119
+        font-size: 16px;
120
+        font-weight: bold;
121
+        border-bottom: 1px solid #D9D9D9;
122
+        .title{
123
+          overflow: hidden;
124
+          text-overflow: ellipsis;
125
+          white-space: nowrap;
126
+        }
127
+        .btns{
128
+          flex-shrink: 0;
129
+        }
130
+      }
131
+      .contentBody{
132
+        padding: 0 8px;
133
+        margin: 4px 0;
134
+        flex: 1;
135
+      }
136
+      .address{
137
+        flex: 1;
138
+        height: 100%;
139
+        background: #FFFFFF;
140
+        border: 1px solid #E8EBEF;
141
+        display: flex;
142
+        flex-direction: column;
143
+        width: 0;
144
+      }
145
+      .addressAssign{
146
+        flex: 3;
147
+        height: 100%;
148
+        background: #FFFFFF;
149
+        border: 1px solid #E8EBEF;
150
+        display: flex;
151
+        flex-direction: column;
152
+        width: 0;
153
+      }
154
+      .list-template__searchItem {
155
+        margin-bottom: 16px;
156
+        .label {
157
+          color: #333;
158
+          display: inline-block;
159
+          width: 70px;
160
+          text-align-last: justify;
161
+          text-align: justify;
162
+          &.label--big {
163
+            width: 100px;
164
+          }
165
+        }
166
+        .formItem {
167
+          width: 135px;
168
+        }
169
+      }
170
+    }
171
+    .contentBtns{
172
+      margin-bottom: 16px;
173
+      display: flex;
174
+      justify-content: center;
175
+      align-items: center;
176
+    }
177
+  }
178
+  .TaskTypeManagement {
179
+    height: calc(100vh - 136px);
180
+    background: #f9fafb;
181
+    overflow: hidden;
182
+    padding: 16px 20px;
183
+
184
+    .pagination {
185
+      margin-top: 14px;
186
+      margin-bottom: 14px;
187
+      bottom: 12px;
188
+      right: 5px;
189
+    }
190
+
191
+    .taskType {
192
+      float: left;
193
+      width: 24%;
194
+      height: 100%;
195
+      border: 1px solid #e5e9ed;
196
+      background: #fff;
197
+      color: #333;
198
+      font-size: 14px;
199
+      position: relative;
200
+      overflow: hidden;
201
+
202
+      .title {
203
+        width: 100%;
204
+        height: 40px;
205
+        line-height: 40px;
206
+        padding-left: 16px;
207
+        border-bottom: 1px solid #e5e9ed;
208
+        position: relative;
209
+        background: #fff;
210
+        z-index: 2;
211
+      }
212
+
213
+      .operate {
214
+        width: 100%;
215
+        border-bottom: 1px solid #e5e9ed;
216
+        position: relative;
217
+        background: #fff;
218
+        z-index: 2;
219
+        display: flex;
220
+
221
+        .item {
222
+          flex: 1;
223
+          height: 34px;
224
+          line-height: 34px;
225
+          border-right: 1px solid #e5e9ed;
226
+          text-align: center;
227
+          color: #666; // cursor: default;
228
+          cursor: pointer;
229
+
230
+          &:hover {
231
+            color: @primary-color;
232
+            background: #f0f6ed;
233
+          }
234
+
235
+          &:nth-last-child(1) {
236
+            border: none;
237
+          }
238
+        }
239
+      }
240
+
241
+      .taskTypes {
242
+        // width: 110%;
243
+        width: 100%;
244
+        height: 92%;
245
+        // padding-right: 10%;
246
+        overflow-y: auto;
247
+        z-index: 1;
248
+        padding-bottom: 30px;
249
+
250
+        .itemChoice {
251
+          color: @primary-color;
252
+          background: #f0f6ed;
253
+        }
254
+
255
+        .item {
256
+          width: 100%;
257
+          height: 34px;
258
+          line-height: 34px;
259
+          text-align: center;
260
+          cursor: pointer;
261
+          overflow: hidden;
262
+          text-overflow: ellipsis;
263
+          white-space: nowrap;
264
+
265
+          &:hover {
266
+            color: @primary-color;
267
+            background: #f0f6ed;
268
+          }
269
+
270
+          &.checked {
271
+            color: @primary-color;
272
+            background: #f0f6ed;
273
+          }
274
+        }
275
+      }
276
+    }
277
+
278
+    //任务类型管理-主体
279
+    .taskTypeInfo {
280
+      height: 100%;
281
+      border: 1px solid #e5e9ed;
282
+      background: #fff;
283
+      color: #333;
284
+      position: relative;
285
+
286
+      .top {
287
+        height: 61px;
288
+        line-height: 60px;
289
+        display: flex;
290
+        align-items: center;
291
+        border-bottom: 1px solid #e5e9ed;
292
+        position: relative;
293
+        z-index: 2;
294
+
295
+        .items {
296
+          background: #f0f6ed;
297
+        }
298
+
299
+        & > div {
300
+          border-right: 1px solid #e5e9ed;
301
+          width: 30%;
302
+          text-align: center; // display: flex;
303
+          // align-items: center;
304
+          cursor: pointer;
305
+
306
+          &:hover {
307
+            background: #f0f6ed;
308
+          }
309
+        }
310
+
311
+        &:nth-last-child(4) {
312
+          border: none;
313
+        }
314
+      }
315
+
316
+      .list {
317
+        width: 100%; // height: 100%;
318
+        padding: 16px; // position: absolute;
319
+        // top: 0;
320
+        // padding-top: 90px;
321
+        background: #fff;
322
+        height: 89%;
323
+        overflow: auto;
324
+				.interval{
325
+					height: 40px;
326
+				}
327
+				.top-style{
328
+					display: flex;
329
+					align-items: center;
330
+					height: 40px;
331
+					.sign{
332
+						width: 8px;
333
+						height: 8px;
334
+						border-radius: 50%;
335
+						background: #49B856;
336
+						margin-right: 6px;
337
+					}
338
+				}
339
+				
340
+        nz-form-label {
341
+          margin-left: 0px !important;
342
+        }
343
+				
344
+				.ant-select{
345
+					width: 350px;
346
+				}
347
+				
348
+        .label {
349
+          margin-left: 16px !important;
350
+          font-size: 14px;
351
+          color: #333;
352
+					width: 110px;
353
+					text-align: left;
354
+        }
355
+				
356
+				.span{
357
+					margin: 0 5px;
358
+				}
359
+				
360
+				.max{
361
+					width: 150px !important;
362
+				}
363
+				
364
+				.min-input{
365
+					width: 80px;
366
+				}
367
+				
368
+        // 规则信息
369
+        .ruleList {
370
+          padding: 15px 15px 0px 15px;
371
+          background: #fff;
372
+
373
+          .table {
374
+            width: 100%;
375
+            height: 100%;
376
+
377
+            .box {
378
+              // background: #f9fafb;
379
+              // border: 1px solid #e5e9ed;
380
+              border-radius: 5px;
381
+              position: relative;
382
+
383
+              .table_title {
384
+                font-size: 18px;
385
+                margin: 14px 0px;
386
+                text-align: center;
387
+              }
388
+
389
+              .thead {
390
+                background-image: linear-gradient(to right, @bg-start, @bg-end);
391
+
392
+                th {
393
+                  background: transparent;
394
+                  color: #fff;
395
+                  text-align: center;
396
+                  font-size: 14px;
397
+                }
398
+              }
399
+
400
+              .ant-table-body {
401
+                border-bottom: 1px solid #e5e9ed;
402
+                background: #f9fafb;
403
+              }
404
+
405
+              .ant-table-tbody {
406
+                background: #f9fafb;
407
+                border: 1px solid #e5e9ed;
408
+
409
+                .zzBontton {
410
+                  & > td {
411
+                    border-bottom: 1px solid #e5e9ed;
412
+                  }
413
+                }
414
+
415
+                tr {
416
+                  text-align: center;
417
+                  font-size: 14px;
418
+                  border: none;
419
+                  color: #333;
420
+                  overflow: hidden;
421
+
422
+                  .lin {
423
+                    width: 68.2%;
424
+                    height: 2rem;
425
+                    border-bottom: 0.1rem solid #e5e9ed;
426
+                    position: absolute;
427
+                    text-align: center;
428
+                    margin-left: 0%;
429
+                    margin-top: -0.8%;
430
+                    transform: rotate(6.5deg);
431
+                  }
432
+
433
+                  td {
434
+                    border: none;
435
+
436
+                    nz-input-number {
437
+                      width: 50px;
438
+                    }
439
+
440
+                    .coop {
441
+                      .line {
442
+                        margin: 10px;
443
+                      }
444
+
445
+                      span:nth-child(2n-1) {
446
+                        cursor: pointer;
447
+
448
+                        &:hover {
449
+                          color: @primary-color;
450
+                        }
451
+
452
+                        &:active {
453
+                          color: @primary-color;
454
+                        }
455
+                      }
456
+                    }
457
+                  }
458
+                }
459
+
460
+                tr:nth-child(even) {
461
+                  background: #fff;
462
+                }
463
+              }
464
+            }
465
+          }
466
+        }
467
+
468
+        //运送过程
469
+        .ysgcItem {
470
+          padding: 0px 0px 0px 0px; // background: #fff;
471
+
472
+          .ysgc_top {
473
+            height: 88px;
474
+            background: #fff;
475
+            border-radius: 10px 10px 0px 0px;
476
+            padding: 15px 22px 0px 22px;
477
+
478
+            .title {
479
+              span {
480
+                font-size: 18px;
481
+              }
482
+            }
483
+
484
+            .carrItems {
485
+              color: @primary-color;
486
+              border-color: @primary-color !important;
487
+            }
488
+
489
+            .process {
490
+              width: 80%;
491
+              display: flex;
492
+              justify-content: center;
493
+              align-items: center;
494
+              margin: 5px auto;
495
+              font-size: 14px;
496
+
497
+              .carrItem {
498
+                height: 40px;
499
+                line-height: 28px;
500
+                cursor: pointer;
501
+                display: flex;
502
+                justify-content: center;
503
+                align-items: center;
504
+
505
+                .carrItem_icon {
506
+                  width: 35px;
507
+                  height: 35px;
508
+                  border: 1px solid #e5e9ed;
509
+                  border-radius: 50%;
510
+                  text-align: center;
511
+                  line-height: 35px;
512
+                  margin-right: 10px;
513
+
514
+                  i {
515
+                    font-size: 18px;
516
+                  }
517
+                }
518
+              }
519
+
520
+              .carrItem1 {
521
+                float: left;
522
+                width: 45%;
523
+                height: 40px;
524
+                line-height: 28px;
525
+                padding-left: 10%;
526
+                cursor: pointer;
527
+
528
+                .carrItem_icon {
529
+                  width: 35px;
530
+                  height: 35px;
531
+                  border: 1px solid #e5e9ed;
532
+                  border-radius: 50%;
533
+                  text-align: center;
534
+                  line-height: 35px;
535
+                  float: left;
536
+                  margin-right: 10px;
537
+
538
+                  i {
539
+                    font-size: 18px;
540
+                  }
541
+                }
542
+              }
543
+            }
544
+          }
545
+
546
+          .ysgc_cont {
547
+            padding: 0px 240px 24px 240px;
548
+
549
+            textarea {
550
+              padding-right: 10%;
551
+            }
552
+
553
+            .icon_btn {
554
+              cursor: pointer;
555
+              font-size: 18px;
556
+            }
557
+
558
+            .icon_text {
559
+              display: block;
560
+              cursor: pointer;
561
+              position: relative;
562
+              right: 5px;
563
+            }
564
+
565
+            .item_type_cont {
566
+              height: 70px;
567
+              padding-top: 4px;
568
+
569
+              & > div {
570
+                height: 65px;
571
+                border: 1px solid #e5e9ed;
572
+                border-radius: 5px;
573
+                background: #fff;
574
+
575
+                .item_type_cont_L {
576
+                  height: 100%;
577
+                  width: 90%;
578
+                  float: left;
579
+                  padding: 2px 12px;
580
+                  overflow: auto;
581
+
582
+                  .item_yq {
583
+                    width: 24%;
584
+                    height: 28px;
585
+                    display: inline-block;
586
+                    border: 1px solid #e5e9ed;
587
+                    border-radius: 20px;
588
+                    text-align: center;
589
+                    line-height: 26px;
590
+                    background: #f9fafb;
591
+                    margin-right: 1%;
592
+                    margin-bottom: 2px;
593
+                    font-size: 12px;
594
+                    padding-left: 8px;
595
+
596
+                    span {
597
+                      width: 75%;
598
+                      float: left;
599
+                      overflow: hidden;
600
+                      text-overflow: ellipsis;
601
+                      white-space: nowrap;
602
+                    }
603
+
604
+                    i {
605
+                      font-size: 14px;
606
+                      color: #999;
607
+                      cursor: pointer;
608
+                    }
609
+                  }
610
+                }
611
+
612
+                .item_type_cont_R {
613
+                  height: 100%;
614
+                  width: 10%;
615
+                  float: right;
616
+                  text-align: center;
617
+                  padding-top: 15px;
618
+                  border-left: 1px solid #e5e9ed;
619
+                  cursor: pointer;
620
+
621
+                  i {
622
+                    display: block;
623
+                    font-size: 16px;
624
+                  }
625
+
626
+                  i:hover {
627
+                    color: @primary-color;
628
+                  }
629
+
630
+                  .icon_text {
631
+                    right: 1px;
632
+                  }
633
+                }
634
+              }
635
+            }
636
+          }
637
+        }
638
+
639
+        //关联信息
640
+        .glxxItem {
641
+          padding: 10px 15px 0px 15px;
642
+          background: #fff;
643
+
644
+          .tab_btn {
645
+            cursor: pointer;
646
+          }
647
+
648
+          .tab_btn:hover {
649
+            color: @primary-color;
650
+          }
651
+
652
+          .table_title {
653
+            font-size: 18px;
654
+            margin: 14px 0px;
655
+            text-align: center;
656
+          }
657
+
658
+          .thead {
659
+            background-image: linear-gradient(to right, @bg-start, @bg-end);
660
+
661
+            th {
662
+              background: transparent;
663
+              color: #fff;
664
+              text-align: center;
665
+              font-size: 14px;
666
+            }
667
+          }
668
+
669
+          .ant-table-body {
670
+            // border-bottom: 1px solid #e5e9ed;
671
+            background: #f9fafb;
672
+          }
673
+
674
+          .ant-table-tbody {
675
+            background: #f9fafb;
676
+            border: 1px solid #e5e9ed;
677
+
678
+            tr {
679
+              text-align: center;
680
+              font-size: 14px;
681
+              border: none;
682
+              color: #333;
683
+
684
+              td {
685
+                border: none; // font-size: 14px;
686
+
687
+                nz-input-number {
688
+                  width: 40px;
689
+                }
690
+
691
+                .coop {
692
+                  .line {
693
+                    margin: 10px;
694
+                  }
695
+
696
+                  span:nth-child(2n-1) {
697
+                    cursor: pointer;
698
+
699
+                    &:hover {
700
+                      color: @primary-color;
701
+                    }
702
+
703
+                    &:active {
704
+                      color: @primary-color;
705
+                    }
706
+                  }
707
+                }
708
+              }
709
+            }
710
+
711
+            tr:nth-child(even) {
712
+              background: #fff;
713
+            }
714
+          }
715
+        }
716
+
717
+        // 开通科室
718
+        .ktksItem {
719
+          padding: 0px 0px 0px 0px;
720
+          background: #fff;
721
+
722
+          .top {
723
+            width: 100%; // padding-bottom: 7px;
724
+            // border-bottom: 1px solid #e5e9ed;
725
+            position: relative;
726
+            overflow: hidden;
727
+            z-index: 2;
728
+            display: flex;
729
+            align-items: center;
730
+            justify-content: space-between;
731
+
732
+            .top_L {
733
+              width: 70%;
734
+              text-align: left;
735
+              display: flex;
736
+              flex-wrap: wrap;
737
+              align-items: center;
738
+              padding: 0 4px;
739
+              .top_L_item {
740
+                margin-left: 4px;
741
+              }
742
+
743
+              .label {
744
+                font-size: 14px;
745
+                color: #333;
746
+                margin-left: 0;
747
+              }
748
+
749
+              nz-select {
750
+                font-size: 12px;
751
+                width: 100px;
752
+              }
753
+
754
+              input {
755
+                font-size: 12px;
756
+                width: 100px;
757
+              }
758
+            }
759
+
760
+            .top_R {
761
+              border: 0px;
762
+
763
+              .btn {
764
+                margin-left: 10px;
765
+              }
766
+            }
767
+          }
768
+
769
+          .ktksItemList {
770
+            padding: 10px 15px 0px 15px;
771
+            .table {
772
+              min-height: 528px;
773
+            }
774
+
775
+            .operate {
776
+              float: right;
777
+              margin-bottom: 5px;
778
+
779
+              span {
780
+                font-size: 14px;
781
+              }
782
+
783
+              .num {
784
+                font-size: 18px;
785
+                color: @primary-color;
786
+              }
787
+            }
788
+
789
+            .thead {
790
+              background-image: linear-gradient(to right, @bg-start, @bg-end);
791
+
792
+              th {
793
+                background: transparent;
794
+                color: #fff;
795
+                text-align: center;
796
+                font-size: 14px;
797
+              }
798
+            }
799
+
800
+            .ant-table-body {
801
+              border-bottom: 1px solid #e5e9ed;
802
+              background: #f9fafb;
803
+            }
804
+
805
+            .ant-table-tbody {
806
+              background: #f9fafb;
807
+              border: 1px solid #e5e9ed;
808
+
809
+              .zzBontton {
810
+                & > td {
811
+                  border-bottom: 1px solid #e5e9ed;
812
+                }
813
+              }
814
+
815
+              tr {
816
+                text-align: center;
817
+                font-size: 14px;
818
+                border: none;
819
+                color: #333;
820
+
821
+                td {
822
+                  border: none; // font-size: 14px;
823
+
824
+                  nz-input-number {
825
+                    width: 40px;
826
+                  }
827
+
828
+                  .coop {
829
+                    .line {
830
+                      margin: 10px;
831
+                    }
832
+
833
+                    span:nth-child(2n-1) {
834
+                      cursor: pointer;
835
+
836
+                      &:hover {
837
+                        color: @primary-color;
838
+                      }
839
+
840
+                      &:active {
841
+                        color: @primary-color;
842
+                      }
843
+                    }
844
+                  }
845
+                }
846
+              }
847
+
848
+              tr:nth-child(even) {
849
+                background: #fff;
850
+              }
851
+            }
852
+          }
853
+
854
+          .pagination {
855
+            margin-top: 25px;
856
+            margin-bottom: 14px;
857
+            bottom: 12px;
858
+            right: 5px;
859
+            position: relative;
860
+            height: 30px;
861
+            .page {
862
+              position: absolute;
863
+              right: 5px;
864
+            }
865
+          }
866
+        }
867
+
868
+        .bottom {
869
+          height: 60px;
870
+					display: flex;
871
+					justify-content: center;
872
+					align-items: center;
873
+          button {
874
+            margin: 0 5px;
875
+          }
876
+        }
877
+				.tip{
878
+					text-align: center;
879
+					font-weight: 600;
880
+					padding: 20px 0;
881
+				}
882
+				.weight{
883
+					font-size: 18px;
884
+					font-weight: bold;
885
+				}
886
+      }
887
+    }
888
+  }
889
+}

+ 302 - 0
src/app/components/configurationCenter/configuration-closedData/configuration-closedData.component.ts

@@ -0,0 +1,302 @@
1
+import { Component, OnInit, ElementRef, ViewChild } from "@angular/core";
2
+import { MainService } from "../../../services/main.service";
3
+import { ToolService } from 'src/app/services/tool.service';
4
+import { NzMessageService } from 'ng-zorro-antd';
5
+import { Subject } from 'rxjs';
6
+import { debounceTime } from 'rxjs/operators';
7
+import { format } from 'date-fns';
8
+
9
+@Component({
10
+  selector: "app-configuration-closedData",
11
+  templateUrl: "./configuration-closedData.component.html",
12
+  styleUrls: ["./configuration-closedData.component.less"],
13
+})
14
+export class ConfigurationClosedDataComponent implements OnInit {
15
+	@ViewChild('scrollContainer', {static: false}) scrollContainer: ElementRef;
16
+	
17
+  loading:boolean = false; //页面加载的loading
18
+  btnLoading:boolean = false; //提交按钮的loading
19
+  tabModalName:string = 'course'; //当前选中的tab
20
+  hosId = this.tool.getCurrentHospital().id; //当前院区
21
+	
22
+	// tab类型
23
+	dictionaryKeyList:any[] = [
24
+		{
25
+			name:'检验标本',key:'specimen'
26
+		},
27
+		{
28
+			name:'病理申请单',key:'pathology'
29
+		},
30
+		{
31
+			name:'药品',key:'drugsBag'
32
+		},
33
+		{
34
+			name:'血制品',key:'blood'
35
+		},
36
+		{
37
+			name:'预约检查',key:'subscribe'
38
+		}
39
+	];
40
+	btnLoading1:boolean = false;
41
+	btnLoading2:boolean = false;
42
+	btnLoading3:boolean = false;
43
+	// 是否关联工单
44
+	bindOrder:any = 0;
45
+	// 同步开始时间
46
+	dateRange:any = [];
47
+	// 业务状态
48
+	 transState:any;
49
+	// 目标状态
50
+	completeState:any = 2;
51
+	// 收取时间间隔区间
52
+	arriveStartMinute:any;
53
+	// 收取时间间隔区间
54
+	arriveEndMinute:any;
55
+	// 送达时间间隔区间
56
+	sendStartMinute:any;
57
+	// 送达时间间隔区间
58
+	sendEndMinute:any;
59
+	code:any;
60
+  // 配置
61
+  configs:any = {};
62
+  // 任务类型
63
+  tasktype:any = {};
64
+  searchTimerSubject = new Subject();
65
+  constructor(private mainService: MainService,private tool: ToolService,private msg: NzMessageService) {}
66
+
67
+  ngOnInit():void {
68
+    // todo
69
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
70
+      let fun = v[0];
71
+      fun.call(this, v[1]);
72
+    });
73
+    this.getSpeDic();
74
+		this.getUsers();
75
+  }
76
+	
77
+	// 点击数据字典key
78
+	activeDictionaryKey:any = 'specimen';
79
+	clickDictionaryKey(item){
80
+	  this.activeDictionaryKey = item.key;
81
+		this.getSpeDic();
82
+		this.resetForm();
83
+	}
84
+	
85
+	onCalendarChangeDate(dateArr){
86
+	  console.log(dateArr)
87
+	  if(dateArr.length == 2){
88
+	    let dateStart = new Date(dateArr[0]);
89
+	    let dateEnd = new Date(dateArr[1]);
90
+	    dateStart.setHours(0,0,0);
91
+	    dateEnd.setHours(23,59,59);
92
+	    this.dateRange = [dateStart,dateEnd];
93
+	  }
94
+	}
95
+	
96
+	// 日期选择
97
+	startDate: string; //发起时间开始
98
+	endDate: string; //发起时间结束
99
+	changeDate(result?): void {
100
+	  if (!result) {
101
+	    this.startDate = this.endDate = "";
102
+	    return;
103
+	  }
104
+	  this.startDate = format(result[0], 'yyyy-MM-dd HH:mm:ss');
105
+	  this.endDate = format(result[1], 'yyyy-MM-dd HH:mm:ss');
106
+	}
107
+	
108
+  // 切换tab
109
+  tabModal(tabModalName:string){
110
+    this.tabModalName = tabModalName;
111
+  }
112
+	
113
+	// 生成数据
114
+	queryNum:any;
115
+	generateModal:boolean = false;
116
+	generateForm(){
117
+		if(!this.startDate || !this.endDate){
118
+			this.msg.error("同步开始时间不能为空");
119
+			return
120
+		}
121
+		if(!this.arriveStartMinute || !this.arriveEndMinute){
122
+			this.msg.error("收取时间间隔区间不能为空");
123
+			return
124
+		}
125
+		if(!this.sendStartMinute || !this.sendEndMinute){
126
+			this.msg.error("送达时间间隔区间不能为空");
127
+			return
128
+		}
129
+		if(this.userIds.length==0){
130
+			this.msg.error("配送人员不能为空");
131
+			return
132
+		}
133
+		this.generateModal = true
134
+	}
135
+	
136
+	hideGenerateModal() {
137
+	  this.generateModal = false;
138
+		this.btnLoading1 = false;
139
+	}
140
+	
141
+	showGenerate:boolean = false;
142
+	generateObj:any;
143
+	confirmGenerate() {
144
+	  var that = this;
145
+	  let list = this.drugStatusList.find(i=> i.id == this.transState)
146
+	  let postData:any = {
147
+	  	patchDataConfig:{
148
+	  		hosId: this.hosId,
149
+	  		bindOrder: this.bindOrder,
150
+	  		transStartTime: this.startDate || undefined,
151
+	  		transEndTime: this.endDate || undefined,
152
+	  		transState: list || undefined,
153
+	  		transType: {
154
+	  			value: this.activeDictionaryKey || undefined
155
+	  		},
156
+				code: this.code || undefined,
157
+	  		completeState: this.completeState,
158
+	  		arriveStartMinute: this.arriveStartMinute || undefined,
159
+	  		arriveEndMinute: this.arriveEndMinute || undefined,
160
+	  		sendStartMinute: this.sendStartMinute || undefined,
161
+	  		sendEndMinute: this.sendEndMinute || undefined,
162
+	  		userIds: this.userIds.length>0 ? this.userIds.join(',') : undefined
163
+	  	}
164
+	  };
165
+	  this.btnLoading1 = true;
166
+	  this.mainService
167
+	    .generateData( postData).subscribe((result:any) => {
168
+	      this.btnLoading1 = false;
169
+	      if (result.state == 200) {
170
+					this.hideGenerateModal()
171
+					this.showNum = false
172
+	        this.showGenerate = true
173
+	        this.generateObj = result.data
174
+					setTimeout(_=>{
175
+						this.scrollContainer.nativeElement.scrollTop = this.scrollContainer.nativeElement.scrollHeight;
176
+					},100)
177
+	      }
178
+	    });
179
+	}
180
+	
181
+  // 查询
182
+	showNum:boolean = false;
183
+  submitForm() {
184
+		if(!this.startDate || !this.endDate){
185
+			this.msg.error("同步开始时间不能为空");
186
+			return
187
+		}
188
+		if(!this.arriveStartMinute || !this.arriveEndMinute){
189
+			this.msg.error("收取时间间隔区间不能为空");
190
+			return
191
+		}
192
+		if(!this.sendStartMinute || !this.sendEndMinute){
193
+			this.msg.error("送达时间间隔区间不能为空");
194
+			return
195
+		}
196
+		if(this.userIds.length==0){
197
+			this.msg.error("配送人员不能为空");
198
+			return
199
+		}
200
+    let list = this.drugStatusList.find(i=> i.id == this.transState)
201
+    let postData:any = {
202
+    	patchDataConfig:{
203
+    		hosId: this.hosId,
204
+    		bindOrder: this.bindOrder,
205
+    		transStartTime: this.startDate || undefined,
206
+    		transEndTime: this.endDate || undefined,
207
+    		transState: list || undefined,
208
+    		transType: {
209
+    			value: this.activeDictionaryKey || undefined
210
+    		},
211
+				code: this.code || undefined,
212
+    		completeState: this.completeState,
213
+    		arriveStartMinute: this.arriveStartMinute || undefined,
214
+    		arriveEndMinute: this.arriveEndMinute || undefined,
215
+    		sendStartMinute: this.sendStartMinute || undefined,
216
+    		sendEndMinute: this.sendEndMinute || undefined,
217
+    		userIds: this.userIds.length>0 ? this.userIds.join(',') : undefined
218
+    	}
219
+    };
220
+    this.btnLoading2 = true;
221
+    this.mainService
222
+      .queryCount( postData).subscribe((result:any) => {
223
+        this.btnLoading2 = false;
224
+        if (result.state == 200) {
225
+					this.showNum = true
226
+					this.showGenerate = false
227
+          this.queryNum = result.data
228
+					setTimeout(_=>{
229
+						this.scrollContainer.nativeElement.scrollTop = this.scrollContainer.nativeElement.scrollHeight;
230
+					},100)
231
+        }
232
+      });
233
+  }
234
+	
235
+	// 重置
236
+	resetForm(){
237
+		this.showNum = false;
238
+		this.showGenerate = false;
239
+		this.bindOrder = 0;
240
+		this.startDate = "";
241
+		this.endDate = "";
242
+		this.dateRange = [];
243
+		this.code = undefined;
244
+		this.transState = undefined;
245
+		this.completeState = 2;
246
+		this.arriveStartMinute = undefined;
247
+		this.arriveEndMinute = undefined;
248
+		this.sendStartMinute = undefined;
249
+		this.sendEndMinute = undefined;
250
+		this.userIds = [];
251
+	}
252
+	
253
+	// 获取字典
254
+	drugStatusList:any = [];
255
+	getSpeDic(){
256
+		let key = null;
257
+		if(this.activeDictionaryKey=='specimen'){
258
+			key = 'speState'
259
+		}else if (this.activeDictionaryKey=='drugsBag'){
260
+			key = 'drug_state'
261
+		}else{
262
+			key = 'blood_trans_state'
263
+		}
264
+		this.mainService.getDictionary("list", key).subscribe((data) => {
265
+			this.drugStatusList = data
266
+		});
267
+	}
268
+	
269
+	// 人员边输边搜节流阀
270
+	changeUser(e) {
271
+	  this.searchTimer(this.getUsers, e);
272
+	}
273
+	
274
+	// 边输入边搜索节流阀
275
+	searchTimer(fun, e) {
276
+	  this.isLoading = true;
277
+	  this.searchTimerSubject.next([fun, e]);
278
+	}
279
+	
280
+	// 配送人员
281
+	userIds:any = [];
282
+	distributionList:any;
283
+	isLoading:boolean = false;
284
+	getUsers(e?) {
285
+	  let postData = {
286
+	    user: {
287
+	      name: e,
288
+	      hospital: { id: this.hosId },
289
+	      simpleQuery: true,
290
+	    },
291
+	    idx: 0,
292
+	    sum: 20,
293
+	  };
294
+	  this.isLoading = true;
295
+	  this.mainService
296
+	    .getFetchDataList("data", "user", postData)
297
+	    .subscribe((data) => {
298
+	      this.isLoading = false;
299
+	      this.distributionList = data.list;
300
+	    });
301
+	}
302
+}

+ 3 - 0
src/app/components/select-menu/select-menu.component.ts

@@ -36,6 +36,9 @@ export class SelectMenuComponent implements OnInit {
36 36
     let nurseConfig = menus.find(item => item.link == 'nurseConfig');
37 37
     nurseConfig && configurationCenterMenus.push(nurseConfig);
38 38
     this.configurationCenterMenus = configurationCenterMenus;
39
+		// 数据生成
40
+		let dataGenerate = menus.find(item => item.link == 'dataGenerate');
41
+		dataGenerate && configurationCenterMenus.push(dataGenerate);
39 42
   }
40 43
   clickHandle(item){
41 44
     this.router.navigateByUrl(item.link);

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

@@ -1113,5 +1113,18 @@ export class MainService {
1113 1113
 		  headers: this.headers,
1114 1114
 		});
1115 1115
 	}
1116
+	// 闭环数据生成-生成数据
1117
+	generateData(data){
1118
+		return this.http.post(host.host + `/api/patchData/execute`, data, {
1119
+		  headers: this.headers,
1120
+		});
1121
+	}
1122
+	
1123
+	// 闭环数据生成-查询数据
1124
+	queryCount(data){
1125
+		return this.http.post(host.host + `/api/patchData/queryCount`, data, {
1126
+		  headers: this.headers,
1127
+		});
1128
+	}
1116 1129
 	
1117 1130
 }

+ 18 - 0
src/app/views/data-generate/data-generate-routing.module.ts

@@ -0,0 +1,18 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { DataGenerateComponent } from './data-generate.component';
4
+
5
+
6
+const routes: Routes = [
7
+  {
8
+    path: '',
9
+    component: DataGenerateComponent,
10
+  }
11
+];
12
+
13
+@NgModule({
14
+  imports: [RouterModule.forChild(routes)],
15
+  exports: [RouterModule]
16
+})
17
+export class DataGenerateRoutingModule { }
18
+

+ 17 - 0
src/app/views/data-generate/data-generate.component.html

@@ -0,0 +1,17 @@
1
+<div class="incidentConfig">
2
+  <div class="tagsAndTemplete">
3
+    <div class="tags">
4
+      <div><i class="icon_transport transport-peizhizhongxin"></i>配置中心&emsp;&gt;&emsp;数据生成</div>
5
+      <div class="tagList">
6
+        <span *ngFor="let tag of tagList" [ngClass]="{ active: activeTagLink === tag.link }" (click)="clickTag(tag)">{{ tag.title }}</span>
7
+      </div>
8
+      <button nz-button class="btn default" (click)="goBack()">返回</button>
9
+    </div>
10
+  </div>
11
+  <!-- 闭环数据生成 -->
12
+  <ng-container *ngIf="activeTagLink === 'closedData'">
13
+    <app-configuration-closedData></app-configuration-closedData>
14
+  </ng-container>
15
+</div>
16
+
17
+

+ 57 - 0
src/app/views/data-generate/data-generate.component.less

@@ -0,0 +1,57 @@
1
+@import "../../../../src/theme.less";
2
+:host {
3
+  width: 100%;
4
+  .incidentConfig{
5
+    padding-bottom: 24px;
6
+    height: 100%;
7
+    display: flex;
8
+    flex-direction: column;
9
+    justify-content: space-between;
10
+    background-color: #F0F2F5;
11
+    .tagsAndTemplete{
12
+      height: 64px;
13
+      display: flex;
14
+      justify-content: space-between;
15
+      align-items: center;
16
+      .tags{
17
+        height: 100%;
18
+        background: #fff;
19
+        flex: 1;
20
+        padding: 16px 24px;
21
+        display: flex;
22
+        align-items: center;
23
+        justify-content: space-between;
24
+        position: relative;
25
+        .transport-peizhizhongxin{
26
+          color: @primary-color;
27
+          font-size: 20px;
28
+          margin-right: 8px;;
29
+        }
30
+        .tagList{
31
+          width: 100%;
32
+          height: 100%;
33
+          position: absolute;
34
+          left: 0;
35
+          top: 50%;
36
+          transform: translateY(-50%);
37
+          display: flex;
38
+          justify-content: center;
39
+          align-items: center;
40
+          span{
41
+            height: 100%;
42
+            display: inline-block;
43
+            padding: 0 24px;
44
+            cursor: pointer;
45
+            display: flex;
46
+            justify-content: center;
47
+            align-items: center;
48
+            &.active{
49
+              color: @primary-color;
50
+              background: #F0F6ED;
51
+            }
52
+          }
53
+        }
54
+      }
55
+    }
56
+  }
57
+}

+ 40 - 0
src/app/views/data-generate/data-generate.component.ts

@@ -0,0 +1,40 @@
1
+import { Component, OnInit, AfterViewInit } from "@angular/core";
2
+import { Location } from '@angular/common';
3
+
4
+@Component({
5
+  selector: "app-data-generate",
6
+  templateUrl: "./data-generate.component.html",
7
+  styleUrls: ["./data-generate.component.less"],
8
+})
9
+export class DataGenerateComponent implements OnInit, AfterViewInit {
10
+  constructor(
11
+    private _location: Location,
12
+  ){}
13
+
14
+  // tab
15
+  tagList:any = [
16
+    // { id: 1, name: '标本',},
17
+  ];
18
+
19
+  ngOnInit(): void {}
20
+
21
+  ngAfterViewInit(){
22
+    setTimeout(() => {
23
+      let menus = JSON.parse(localStorage.getItem("menu"));
24
+      let dataGenerate = menus.find(item => item.link == 'dataGenerate');
25
+      this.tagList = dataGenerate ? (dataGenerate.childrens || []) : [];
26
+      this.tagList.length && this.clickTag(this.tagList[0]);
27
+    }, 0)
28
+  }
29
+
30
+  // 点击tab
31
+  activeTagLink:any = 1;
32
+  clickTag(tag){
33
+    this.activeTagLink = tag.link;
34
+  }
35
+
36
+  // 返回
37
+  goBack(){
38
+    this._location.back();
39
+  }
40
+}

+ 21 - 0
src/app/views/data-generate/data-generate.module.ts

@@ -0,0 +1,21 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { DataGenerateRoutingModule } from './data-generate-routing.module';
5
+import { DataGenerateComponent } from './data-generate.component';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+import { ConfigurationClosedDataComponent } from 'src/app/components/configurationCenter/configuration-closedData/configuration-closedData.component';
8
+
9
+
10
+@NgModule({
11
+  declarations: [
12
+		DataGenerateComponent,
13
+    ConfigurationClosedDataComponent
14
+  ],
15
+  imports: [
16
+    CommonModule,
17
+    DataGenerateRoutingModule,
18
+    ShareModule
19
+  ]
20
+})
21
+export class DataGenerateModule { }