|
@@ -1,10 +1,5 @@
|
1
|
1
|
import { Component, OnInit, OnDestroy, ViewChild } from "@angular/core";
|
2
|
2
|
import { ActivatedRoute } from "@angular/router";
|
3
|
|
-import {
|
4
|
|
- FormBuilder,
|
5
|
|
- Validators,
|
6
|
|
- FormGroup,
|
7
|
|
-} from "@angular/forms";
|
8
|
3
|
import { MainService } from "../../services/main.service";
|
9
|
4
|
import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
|
10
|
5
|
import { NzMessageService } from "ng-zorro-antd";
|
|
@@ -27,7 +22,6 @@ export class OutgoingRecordDetailComponent implements OnInit {
|
27
|
22
|
osComponentRef2: OverlayScrollbarsComponent;
|
28
|
23
|
constructor(
|
29
|
24
|
private message: NzMessageService,
|
30
|
|
- private fb: FormBuilder,
|
31
|
25
|
private route: ActivatedRoute,
|
32
|
26
|
private mainService: MainService,
|
33
|
27
|
private tool: ToolService,
|
|
@@ -35,32 +29,12 @@ export class OutgoingRecordDetailComponent implements OnInit {
|
35
|
29
|
maskFlag: any = false;
|
36
|
30
|
id: number;
|
37
|
31
|
orderInfo: any;
|
38
|
|
- endDepts = "";
|
39
|
|
- showCoop: boolean = true;
|
40
|
|
-
|
41
|
|
- promptContent: string;
|
42
|
|
- ifSuccess: boolean;
|
43
|
|
- promptInfo: string;
|
44
|
|
- promptModalShow: boolean;
|
45
|
|
-
|
46
|
|
- urgentLoading: boolean = false;
|
47
|
|
- recLoading: boolean = false;
|
48
|
|
- btnLoading: boolean = false;
|
49
|
|
- amplificationShow = true;
|
50
|
|
-
|
51
|
32
|
hosId;
|
52
|
33
|
|
53
|
34
|
ngOnInit() {
|
54
|
35
|
this.hosId = this.tool.getCurrentHospital().id;
|
55
|
36
|
this.tabType = this.route.snapshot.params.type || 1;
|
56
|
37
|
this.getInfo();
|
57
|
|
- this.initForm();
|
58
|
|
- }
|
59
|
|
- ngOnDestroy() {}
|
60
|
|
-
|
61
|
|
-
|
62
|
|
- amplification(){
|
63
|
|
- this.amplificationShow = !this.amplificationShow;
|
64
|
38
|
}
|
65
|
39
|
|
66
|
40
|
|
|
@@ -79,21 +53,8 @@ export class OutgoingRecordDetailComponent implements OnInit {
|
79
|
53
|
this.getList();
|
80
|
54
|
});
|
81
|
55
|
}
|
82
|
|
-
|
83
|
|
- imgs = [];
|
84
|
|
- isPreview = false;
|
85
|
|
- previewImageHandler(data) {
|
86
|
|
- this.isPreview = false;
|
87
|
|
- this.mainService.getPreviewImage(data.bindType,data.bindId).subscribe((result:any)=>{
|
88
|
|
- if (result.status == 200) {
|
89
|
|
- this.imgs = result.data.map((v) => location.origin + '/file' + v.relativeFilePath);
|
90
|
|
- this.isPreview = true;
|
91
|
|
- } else {
|
92
|
|
- this.imgs = [];
|
93
|
|
- }
|
94
|
|
- })
|
95
|
|
- }
|
96
|
|
-
|
|
56
|
+
|
|
57
|
+
|
97
|
58
|
pageIndex: number = 1;
|
98
|
59
|
pageSize: number = 3;
|
99
|
60
|
total: number = 0;
|
|
@@ -127,110 +88,4 @@ export class OutgoingRecordDetailComponent implements OnInit {
|
127
|
88
|
history.go(-1);
|
128
|
89
|
}
|
129
|
90
|
|
130
|
|
-
|
131
|
|
- businessDataModalShow = false;
|
132
|
|
- businessDataModalType = '';
|
133
|
|
- orderId = "";
|
134
|
|
- viewDetail(data, type) {
|
135
|
|
- this.orderId = data.id;
|
136
|
|
- this.businessDataModalType = type;
|
137
|
|
- this.businessDataModalShow = true;
|
138
|
|
- }
|
139
|
|
-
|
140
|
|
- closeModelBlood(e) {
|
141
|
|
- this.businessDataModalShow = JSON.parse(e).show;
|
142
|
|
- }
|
143
|
|
-
|
144
|
|
-
|
145
|
|
- logList = [];
|
146
|
|
- getLog() {
|
147
|
|
- return this.mainService.getWorkOrderLog(this.id);
|
148
|
|
- }
|
149
|
|
-
|
150
|
|
-
|
151
|
|
- validateForm: FormGroup;
|
152
|
|
- initForm() {
|
153
|
|
- this.validateForm = this.fb.group({
|
154
|
|
- reason: [null, [Validators.required]],
|
155
|
|
- process: [null, [Validators.required]],
|
156
|
|
- handleType: [null, [Validators.required]],
|
157
|
|
- improve: [null, [Validators.required]],
|
158
|
|
- });
|
159
|
|
- }
|
160
|
|
-
|
161
|
|
-
|
162
|
|
- submitForm(): void {
|
163
|
|
- var that = this;
|
164
|
|
- for (const i in that.validateForm.controls) {
|
165
|
|
- that.validateForm.controls[i].markAsDirty();
|
166
|
|
- that.validateForm.controls[i].updateValueAndValidity();
|
167
|
|
- }
|
168
|
|
- if (that.validateForm.invalid) return;
|
169
|
|
- that.btnLoading = true;
|
170
|
|
- let postData = {
|
171
|
|
- badEvaluationHandle: {
|
172
|
|
- id: that.id,
|
173
|
|
- reasonAndEventProcess: that.validateForm.value.reason,
|
174
|
|
- mediationProcess: that.validateForm.value.process,
|
175
|
|
- handleType: { id: that.validateForm.value.handleType },
|
176
|
|
- advice: that.validateForm.value.improve,
|
177
|
|
- handleStatus: { key: "bad_evaluation_handle_status", value: "2" },
|
178
|
|
- },
|
179
|
|
- };
|
180
|
|
-
|
181
|
|
- that.mainService
|
182
|
|
- .postCustom("adviceCollection", "updData/badEvaluationHandle", postData)
|
183
|
|
- .subscribe((data) => {
|
184
|
|
- that.btnLoading = false;
|
185
|
|
- if (data.status == 200) {
|
186
|
|
- that.showPromptModal("调解", true, "");
|
187
|
|
- that.getInfo();
|
188
|
|
-
|
189
|
|
- } else {
|
190
|
|
- that.showPromptModal("调解", false, data.msg);
|
191
|
|
- }
|
192
|
|
- });
|
193
|
|
- }
|
194
|
|
-
|
195
|
|
-
|
196
|
|
- showPromptModal(con, success, promptInfo?) {
|
197
|
|
- this.promptModalShow = false;
|
198
|
|
- this.promptContent = con;
|
199
|
|
- this.ifSuccess = success;
|
200
|
|
- this.promptInfo = promptInfo;
|
201
|
|
- setTimeout(() => {
|
202
|
|
- this.promptModalShow = true;
|
203
|
|
- }, 100);
|
204
|
|
- }
|
205
|
|
-
|
206
|
|
-
|
207
|
|
-
|
208
|
|
- formatTime(time) {
|
209
|
|
- let timeStr = "";
|
210
|
|
- if (time >= 0 && time < 60) {
|
211
|
|
-
|
212
|
|
- timeStr = time + "秒";
|
213
|
|
- } else if (time >= 60 && time < 3600) {
|
214
|
|
-
|
215
|
|
- timeStr = Math.floor(time / 60) + "分钟";
|
216
|
|
- } else if (time >= 3600) {
|
217
|
|
-
|
218
|
|
- let h = "";
|
219
|
|
- let m = "";
|
220
|
|
- h = Math.floor(time / 3600) + "小时";
|
221
|
|
- m = time % 3600 >= 60 ? Math.floor((time % 3600) / 60) + "分钟" : "";
|
222
|
|
- timeStr = h + m;
|
223
|
|
- }
|
224
|
|
- return timeStr;
|
225
|
|
- }
|
226
|
|
-
|
227
|
|
-
|
228
|
|
- filterTime(step) {
|
229
|
|
-
|
230
|
|
- let num = 0;
|
231
|
|
- step.forEach((e) => {
|
232
|
|
- num += e.difTime;
|
233
|
|
- });
|
234
|
|
- return this.formatTime(num / 1000);
|
235
|
|
- }
|
236
|
91
|
}
|