浏览代码

前端接口方法合并

seimin 3 年之前
父节点
当前提交
5170b55e33

+ 3 - 93
src/app/services/main.service.ts

@@ -54,18 +54,6 @@ export class MainService {
54
       headers: this.headers,
54
       headers: this.headers,
55
     });
55
     });
56
   }
56
   }
57
-  // 列表搜索(get data)
58
-  getDataFetchData(type, id): any {
59
-    return this.http.get(host.host + "/data/fetchData/" + type + "/" + id, {
60
-      headers: this.headers,
61
-    });
62
-  }
63
-  // api 详情 -工单详情
64
-  getApiFetchData(type, id): any {
65
-    return this.http.get(host.host + "/api/fetchData/" + type + "/" + id, {
66
-      headers: this.headers,
67
-    });
68
-  }
69
   // 列表搜索(通用)
57
   // 列表搜索(通用)
70
   getFetchDataList(type, target, data): any {
58
   getFetchDataList(type, target, data): any {
71
     return this.http.post(
59
     return this.http.post(
@@ -115,42 +103,16 @@ export class MainService {
115
     });
103
     });
116
   }
104
   }
117
 
105
 
118
-  // 查询所有数据
119
-  findAllDataList(type): any {
120
-    return this.http.post(
121
-      host.host + "/data/findAll/" + type,
122
-      {},
123
-      { headers: this.headers }
124
-    );
125
-  }
126
-
127
   // 权限相关
106
   // 权限相关
128
   getPermission(type): any {
107
   getPermission(type): any {
129
     return this.http.get(host.host + "/permission/roleMenu/" + type, {
108
     return this.http.get(host.host + "/permission/roleMenu/" + type, {
130
       headers: this.headers,
109
       headers: this.headers,
131
     });
110
     });
132
   }
111
   }
133
-
134
-  //科室详情
135
-  getOfficeDetail(id): any {
136
-    return this.http.get(host.host + "/data/fetchData/department/" + id, {
137
-      headers: this.headers,
138
-    });
139
-  }
140
-
141
   // fetchData查看详情
112
   // fetchData查看详情
142
-  getFetchData(type, info, id?): any {
143
-    let url = id
144
-      ? host.host + "/" + type + "/fetchData/" + info + "/" + id
145
-      : host.host + "/" + type + "/fetchData/" + info;
146
-    return this.http.get(url, { headers: this.headers });
147
-  }
148
-
149
-  // 获取楼栋信息/楼层信息
150
-  getBuildingOrFloor(type, data): any {
151
-    return this.http.post(
152
-      host.host + "/data/getBuildingOrFloor/" + type,
153
-      data,
113
+  getFetchData(type, info, id): any {
114
+    return this.http.get(
115
+      host.host + "/" + type + "/fetchData/" + info + "/" + id,
154
       { headers: this.headers }
116
       { headers: this.headers }
155
     );
117
     );
156
   }
118
   }
@@ -274,18 +236,6 @@ export class MainService {
274
       headers: this.headers,
236
       headers: this.headers,
275
     });
237
     });
276
   }
238
   }
277
-  //药房端药房列表查询、搜索接口
278
-  getPharmacyList(idx, type, searchKey, launch) {
279
-    return this.http.post(
280
-      host.host + "/api/fetchDataList/drugsBag",
281
-      {
282
-        idx: idx,
283
-        sum: 10,
284
-        drugsBag: { searchType: type, searchKey: searchKey, launch: launch },
285
-      },
286
-      { headers: this.headers }
287
-    );
288
-  }
289
   //药房端打印二维码的接口
239
   //药房端打印二维码的接口
290
   printRequisition(idArr) {
240
   printRequisition(idArr) {
291
     return this.http.post(host.host + "/drugsBag/printRequisition", idArr, {
241
     return this.http.post(host.host + "/drugsBag/printRequisition", idArr, {
@@ -366,12 +316,6 @@ export class MainService {
366
       { headers: this.headers }
316
       { headers: this.headers }
367
     );
317
     );
368
   }
318
   }
369
-  //护士端关注接口
370
-  changeFollow(data) {
371
-    return this.http.post(host.host + "/nurse/updData/patient", data, {
372
-      headers: this.headers,
373
-    });
374
-  }
375
   //数据字典楼栋保存接口
319
   //数据字典楼栋保存接口
376
   saveBuildingList(data) {
320
   saveBuildingList(data) {
377
     return this.http.post(
321
     return this.http.post(
@@ -398,14 +342,6 @@ export class MainService {
398
       headers: this.headers,
342
       headers: this.headers,
399
     });
343
     });
400
   }
344
   }
401
-  //获取患者最近一条检查信息
402
-  getRecentInfo(data) {
403
-    return this.http.post(
404
-      host.host + "/nurse/workOrder/findInspectRecently",
405
-      data,
406
-      { headers: this.headers }
407
-    );
408
-  }
409
   //simple增删改查,addData新增,addListData批量新增
345
   //simple增删改查,addData新增,addListData批量新增
410
   simplePost(coop, type, data): any {
346
   simplePost(coop, type, data): any {
411
     return this.http.post(
347
     return this.http.post(
@@ -414,12 +350,6 @@ export class MainService {
414
       { headers: this.headers }
350
       { headers: this.headers }
415
     );
351
     );
416
   }
352
   }
417
-  //任务类型列表排序
418
-  sortTaskType(data): any {
419
-    return this.http.post(host.host + "/configuration/setOrders", data, {
420
-      headers: this.headers,
421
-    });
422
-  }
423
   //获取工单详情里的历史记录
353
   //获取工单详情里的历史记录
424
   getWorkOrderRecord(data): any {
354
   getWorkOrderRecord(data): any {
425
     return this.http.post(host.host + "/workerOrder/getWorkOrderRecord", data, {
355
     return this.http.post(host.host + "/workerOrder/getWorkOrderRecord", data, {
@@ -468,14 +398,6 @@ export class MainService {
468
       { headers: this.headers }
398
       { headers: this.headers }
469
     );
399
     );
470
   }
400
   }
471
-  //获取配置文件的接口
472
-  systemConfiguration(data) {
473
-    return this.http.post(
474
-      host.host + "/simple/data/fetchDataList/systemConfiguration",
475
-      data,
476
-      { headers: this.headers }
477
-    );
478
-  }
479
   //检查信息,患者信息
401
   //检查信息,患者信息
480
   listMsgByMain(type, data) {
402
   listMsgByMain(type, data) {
481
     return this.http.post(host.host + "/nurse/" + type, data, {
403
     return this.http.post(host.host + "/nurse/" + type, data, {
@@ -490,18 +412,6 @@ export class MainService {
490
       { headers: this.headers }
412
       { headers: this.headers }
491
     );
413
     );
492
   }
414
   }
493
-  //护士端获取综合日志
494
-  listDeptOrderRecord(data) {
495
-    return this.http.post(host.host + "/nurse/listDeptOrderRecord", data, {
496
-      headers: this.headers,
497
-    });
498
-  }
499
-  //自动同步国家法定节假日
500
-  syncWorkDay(data) {
501
-    return this.http.post(host.host + "/configuration/syncWorkDay", data, {
502
-      headers: this.headers,
503
-    });
504
-  }
505
   //删除用户(包含企业微信用户)
415
   //删除用户(包含企业微信用户)
506
   rmvDataAndWeChatNum(data, flag) {
416
   rmvDataAndWeChatNum(data, flag) {
507
     return this.http.post(
417
     return this.http.post(

+ 1 - 1
src/app/share/detail-drug/detail-drug.component.ts

@@ -60,7 +60,7 @@ export class DetailDrugComponent implements OnInit {
60
 
60
 
61
   // 获取工单详情
61
   // 获取工单详情
62
   getDetail() {
62
   getDetail() {
63
-    return this.mainService.getApiFetchData("workOrder", this.id);
63
+    return this.mainService.getFetchData("api", "workOrder", this.id);
64
   }
64
   }
65
 
65
 
66
   // 关闭弹框
66
   // 关闭弹框

+ 2 - 2
src/app/share/detail-others/detail-others.component.ts

@@ -59,7 +59,7 @@ export class DetailOthersComponent implements OnInit {
59
       this.orderInfo = res[1]["data"];
59
       this.orderInfo = res[1]["data"];
60
       this.endDepts = res[1]["data"].endDepts
60
       this.endDepts = res[1]["data"].endDepts
61
         .map((item) =>
61
         .map((item) =>
62
-          (!this.showCoop && this.deptDisplay == 2) ? item.deptalias : item.dept
62
+          !this.showCoop && this.deptDisplay == 2 ? item.deptalias : item.dept
63
         )
63
         )
64
         .join();
64
         .join();
65
     });
65
     });
@@ -67,7 +67,7 @@ export class DetailOthersComponent implements OnInit {
67
 
67
 
68
   // 获取工单详情
68
   // 获取工单详情
69
   getDetail() {
69
   getDetail() {
70
-    return this.mainService.getApiFetchData("workOrder", this.id);
70
+    return this.mainService.getFetchData("api", "workOrder", this.id);
71
   }
71
   }
72
 
72
 
73
   // 确认加急
73
   // 确认加急

+ 4 - 5
src/app/share/detail-patients/detail-patients.component.ts

@@ -80,10 +80,9 @@ export class DetailPatientsComponent implements OnInit {
80
         this.orderInfo["yyTime"] = "";
80
         this.orderInfo["yyTime"] = "";
81
       }
81
       }
82
       if (res[1]["data"].middleDept) {
82
       if (res[1]["data"].middleDept) {
83
-        this.middleDept = res[1]["data"].middleDept
84
-          .map((item) =>
85
-            !this.showCoop && this.deptDisplay == 2 ? item.deptalias : item.dept
86
-          );
83
+        this.middleDept = res[1]["data"].middleDept.map((item) =>
84
+          !this.showCoop && this.deptDisplay == 2 ? item.deptalias : item.dept
85
+        );
87
       } else {
86
       } else {
88
         this.middleDept = [];
87
         this.middleDept = [];
89
       }
88
       }
@@ -92,7 +91,7 @@ export class DetailPatientsComponent implements OnInit {
92
   // 获取工单详情
91
   // 获取工单详情
93
   middleDept = []; //中间科室数组
92
   middleDept = []; //中间科室数组
94
   getDetail() {
93
   getDetail() {
95
-    return this.mainService.getApiFetchData("workOrder", this.id);
94
+    return this.mainService.getFetchData("api", "workOrder", this.id);
96
   }
95
   }
97
   // 获取工单历史记录
96
   // 获取工单历史记录
98
   logList = []; //工单历史记录
97
   logList = []; //工单历史记录

+ 1 - 1
src/app/share/detail-sample/detail-sample.component.ts

@@ -66,7 +66,7 @@ export class DetailSampleComponent implements OnInit {
66
 
66
 
67
   // 获取工单详情
67
   // 获取工单详情
68
   getDetail() {
68
   getDetail() {
69
-    return this.mainService.getApiFetchData("workOrder", this.id);
69
+    return this.mainService.getFetchData("api", "workOrder", this.id);
70
   }
70
   }
71
 
71
 
72
   // 确认加急
72
   // 确认加急

+ 125 - 97
src/app/share/order-detail/order-detail.component.ts

@@ -1,90 +1,121 @@
1
-import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
2
-import { ActivatedRoute } from '@angular/router';
3
-import { FormBuilder, Validators, FormGroup, FormControl } from '@angular/forms';
4
-import { MainService } from '../../services/main.service';
5
-import { OverlayScrollbarsComponent } from 'overlayscrollbars-ngx';
6
-import { NzMessageService } from 'ng-zorro-antd';
7
-import { forkJoin } from 'rxjs';
1
+import { Component, OnInit, OnDestroy, ViewChild } from "@angular/core";
2
+import { ActivatedRoute } from "@angular/router";
3
+import {
4
+  FormBuilder,
5
+  Validators,
6
+  FormGroup,
7
+  FormControl,
8
+} from "@angular/forms";
9
+import { MainService } from "../../services/main.service";
10
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
11
+import { NzMessageService } from "ng-zorro-antd";
12
+import { forkJoin } from "rxjs";
8
 @Component({
13
 @Component({
9
-  selector: 'app-order-detail',
10
-  templateUrl: './order-detail.component.html',
11
-  styleUrls: ['./order-detail.component.less']
14
+  selector: "app-order-detail",
15
+  templateUrl: "./order-detail.component.html",
16
+  styleUrls: ["./order-detail.component.less"],
12
 })
17
 })
13
 export class OrderDetailComponent implements OnInit {
18
 export class OrderDetailComponent implements OnInit {
14
-  @ViewChild('osComponentRef1', { read: OverlayScrollbarsComponent, static: false })
19
+  @ViewChild("osComponentRef1", {
20
+    read: OverlayScrollbarsComponent,
21
+    static: false,
22
+  })
15
   osComponentRef1: OverlayScrollbarsComponent;
23
   osComponentRef1: OverlayScrollbarsComponent;
16
-  @ViewChild('osComponentRef2', { read: OverlayScrollbarsComponent, static: false })
24
+  @ViewChild("osComponentRef2", {
25
+    read: OverlayScrollbarsComponent,
26
+    static: false,
27
+  })
17
   osComponentRef2: OverlayScrollbarsComponent;
28
   osComponentRef2: OverlayScrollbarsComponent;
18
-  @ViewChild('osComponentRef3', { read: OverlayScrollbarsComponent, static: false })
29
+  @ViewChild("osComponentRef3", {
30
+    read: OverlayScrollbarsComponent,
31
+    static: false,
32
+  })
19
   osComponentRef3: OverlayScrollbarsComponent;
33
   osComponentRef3: OverlayScrollbarsComponent;
20
-  @ViewChild('osComponentRef4', { read: OverlayScrollbarsComponent, static: false })
34
+  @ViewChild("osComponentRef4", {
35
+    read: OverlayScrollbarsComponent,
36
+    static: false,
37
+  })
21
   osComponentRef4: OverlayScrollbarsComponent;
38
   osComponentRef4: OverlayScrollbarsComponent;
22
-  @ViewChild('osComponentRef5', { read: OverlayScrollbarsComponent, static: false })
39
+  @ViewChild("osComponentRef5", {
40
+    read: OverlayScrollbarsComponent,
41
+    static: false,
42
+  })
23
   osComponentRef5: OverlayScrollbarsComponent;
43
   osComponentRef5: OverlayScrollbarsComponent;
24
-  @ViewChild('osComponentRef6', { read: OverlayScrollbarsComponent, static: false })
44
+  @ViewChild("osComponentRef6", {
45
+    read: OverlayScrollbarsComponent,
46
+    static: false,
47
+  })
25
   osComponentRef6: OverlayScrollbarsComponent;
48
   osComponentRef6: OverlayScrollbarsComponent;
26
-  @ViewChild('osComponentRef7', { read: OverlayScrollbarsComponent, static: false })
49
+  @ViewChild("osComponentRef7", {
50
+    read: OverlayScrollbarsComponent,
51
+    static: false,
52
+  })
27
   osComponentRef7: OverlayScrollbarsComponent;
53
   osComponentRef7: OverlayScrollbarsComponent;
28
-  @ViewChild('osComponentRef8', { read: OverlayScrollbarsComponent, static: false })
54
+  @ViewChild("osComponentRef8", {
55
+    read: OverlayScrollbarsComponent,
56
+    static: false,
57
+  })
29
   osComponentRef8: OverlayScrollbarsComponent;
58
   osComponentRef8: OverlayScrollbarsComponent;
30
   constructor(
59
   constructor(
31
     private message: NzMessageService,
60
     private message: NzMessageService,
32
     private fb: FormBuilder,
61
     private fb: FormBuilder,
33
     private route: ActivatedRoute,
62
     private route: ActivatedRoute,
34
-    private mainService: MainService,
35
-  ) { }
63
+    private mainService: MainService
64
+  ) {}
36
   maskFlag: any = false;
65
   maskFlag: any = false;
37
-  id: number;//工单id
38
-  orderInfo: any;//工单详情信息
39
-  endDepts = '';//工单详情目标科室
40
-  showCoop: boolean = true;//是否展示详情页操作按钮
41
-
42
-  promptContent: string;//操作提示框提示信息
43
-  ifSuccess: boolean;//操作成功/失败
44
-  promptInfo: string;//操作结果提示信息
45
-  previewImage: string;//操作结果图片预览
46
-  promptModalShow: boolean;//是否展示提示框
47
-  promptModalShowImg: boolean;//是否展示提示框-图片
48
-
49
-  urgentLoading: boolean = false;//确认加急按钮loading状态
50
-  recLoading: boolean = false;//撤回并删除按钮loading状态
51
-  btnLoading: boolean = false;//确认按钮loading状态
52
-
66
+  id: number; //工单id
67
+  orderInfo: any; //工单详情信息
68
+  endDepts = ""; //工单详情目标科室
69
+  showCoop: boolean = true; //是否展示详情页操作按钮
70
+
71
+  promptContent: string; //操作提示框提示信息
72
+  ifSuccess: boolean; //操作成功/失败
73
+  promptInfo: string; //操作结果提示信息
74
+  previewImage: string; //操作结果图片预览
75
+  promptModalShow: boolean; //是否展示提示框
76
+  promptModalShowImg: boolean; //是否展示提示框-图片
77
+
78
+  urgentLoading: boolean = false; //确认加急按钮loading状态
79
+  recLoading: boolean = false; //撤回并删除按钮loading状态
80
+  btnLoading: boolean = false; //确认按钮loading状态
53
 
81
 
54
   ngOnInit() {
82
   ngOnInit() {
55
     this.tabType = this.route.snapshot.params.type || 1;
83
     this.tabType = this.route.snapshot.params.type || 1;
56
-    this.getInfo()
57
-    this.initForm()
58
-  }
59
-  ngOnDestroy() {
84
+    this.getInfo();
85
+    this.initForm();
60
   }
86
   }
87
+  ngOnDestroy() {}
61
 
88
 
62
   // 获取工单详情
89
   // 获取工单详情
63
-  middleDept = [];//中间科室数组
90
+  middleDept = []; //中间科室数组
64
   getInfo() {
91
   getInfo() {
65
-    this.id = +this.route.snapshot.paramMap.get('id');
66
-    this.maskFlag = this.message.loading('正在加载中..', { nzDuration: 0 }).messageId;
67
-    this.mainService.getApiFetchData('workOrder', this.id).subscribe(data => {
68
-      this.orderInfo = data.data;
69
-      if (data.data.middleDept) {
70
-        this.middleDept = data.data.middleDept.map(item => item.dept);
71
-      } else {
72
-        this.middleDept = [];
73
-      }
74
-      this.endDepts = data.data.endDepts.map(item => item.dept).join();
75
-      let log$ = this.getLog();
76
-      let record$ = this.getWorkOrderRecord();
77
-      forkJoin(log$, record$).subscribe(res => {
78
-        this.message.remove(this.maskFlag);
79
-        this.maskFlag = false;
80
-        // getLog
81
-        this.logList = res[0]['data'];
82
-        // getWorkOrderRecord
83
-        if (res[1]['status'] == 200) {
84
-          this.workOrderRecord = res[1]['data'];
92
+    this.id = +this.route.snapshot.paramMap.get("id");
93
+    this.maskFlag = this.message.loading("正在加载中..", {
94
+      nzDuration: 0,
95
+    }).messageId;
96
+    this.mainService
97
+      .getFetchData("api", "workOrder", this.id)
98
+      .subscribe((data) => {
99
+        this.orderInfo = data.data;
100
+        if (data.data.middleDept) {
101
+          this.middleDept = data.data.middleDept.map((item) => item.dept);
102
+        } else {
103
+          this.middleDept = [];
85
         }
104
         }
86
-      })
87
-    })
105
+        this.endDepts = data.data.endDepts.map((item) => item.dept).join();
106
+        let log$ = this.getLog();
107
+        let record$ = this.getWorkOrderRecord();
108
+        forkJoin(log$, record$).subscribe((res) => {
109
+          this.message.remove(this.maskFlag);
110
+          this.maskFlag = false;
111
+          // getLog
112
+          this.logList = res[0]["data"];
113
+          // getWorkOrderRecord
114
+          if (res[1]["status"] == 200) {
115
+            this.workOrderRecord = res[1]["data"];
116
+          }
117
+        });
118
+      });
88
   }
119
   }
89
   // 预览图片
120
   // 预览图片
90
   previewImageHandler(token) {
121
   previewImageHandler(token) {
@@ -93,10 +124,10 @@ export class OrderDetailComponent implements OnInit {
93
   // 获取历史记录
124
   // 获取历史记录
94
   workOrderRecord: any = [];
125
   workOrderRecord: any = [];
95
   getWorkOrderRecord() {
126
   getWorkOrderRecord() {
96
-    return this.mainService.getWorkOrderRecord({ "gdid": this.id });
127
+    return this.mainService.getWorkOrderRecord({ gdid: this.id });
97
   }
128
   }
98
   // 切换tab栏
129
   // 切换tab栏
99
-  tabType: number = 1;//tab栏
130
+  tabType: number = 1; //tab栏
100
   checkTab(type) {
131
   checkTab(type) {
101
     this.tabType = type;
132
     this.tabType = type;
102
   }
133
   }
@@ -110,19 +141,19 @@ export class OrderDetailComponent implements OnInit {
110
   }
141
   }
111
 
142
 
112
   // 获取工单历史记录
143
   // 获取工单历史记录
113
-  logList = [];//工单历史记录
144
+  logList = []; //工单历史记录
114
   getLog() {
145
   getLog() {
115
     return this.mainService.getWorkOrderLog(this.id);
146
     return this.mainService.getWorkOrderLog(this.id);
116
   }
147
   }
117
 
148
 
118
   // 初始化新增form表单
149
   // 初始化新增form表单
119
-  validateForm: FormGroup;//新增/编辑表单
150
+  validateForm: FormGroup; //新增/编辑表单
120
   initForm() {
151
   initForm() {
121
     this.validateForm = this.fb.group({
152
     this.validateForm = this.fb.group({
122
       reason: [null, [Validators.required]],
153
       reason: [null, [Validators.required]],
123
       process: [null, [Validators.required]],
154
       process: [null, [Validators.required]],
124
       handleType: [null, [Validators.required]],
155
       handleType: [null, [Validators.required]],
125
-      improve: [null, [Validators.required]]
156
+      improve: [null, [Validators.required]],
126
     });
157
     });
127
   }
158
   }
128
 
159
 
@@ -142,41 +173,38 @@ export class OrderDetailComponent implements OnInit {
142
         mediationProcess: that.validateForm.value.process,
173
         mediationProcess: that.validateForm.value.process,
143
         handleType: { id: that.validateForm.value.handleType },
174
         handleType: { id: that.validateForm.value.handleType },
144
         advice: that.validateForm.value.improve,
175
         advice: that.validateForm.value.improve,
145
-        handleStatus: { key: "bad_evaluation_handle_status", value: "2" }
146
-      }
147
-    }
148
-
149
-    that.mainService.postCustom('adviceCollection', 'updData/badEvaluationHandle', postData).subscribe(data => {
150
-      that.btnLoading = false;
151
-      if (data.status == 200) {
152
-        that.showPromptModal('调解', true, '');
153
-        that.getInfo()
154
-        // that.initForm();
155
-      } else {
156
-        that.showPromptModal('调解', false, data.msg);
157
-      }
158
-    })
159
-
160
-
176
+        handleStatus: { key: "bad_evaluation_handle_status", value: "2" },
177
+      },
178
+    };
179
+
180
+    that.mainService
181
+      .postCustom("adviceCollection", "updData/badEvaluationHandle", postData)
182
+      .subscribe((data) => {
183
+        that.btnLoading = false;
184
+        if (data.status == 200) {
185
+          that.showPromptModal("调解", true, "");
186
+          that.getInfo();
187
+          // that.initForm();
188
+        } else {
189
+          that.showPromptModal("调解", false, data.msg);
190
+        }
191
+      });
161
   }
192
   }
162
 
193
 
163
-
164
-
165
-
166
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
194
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
167
   showPromptModal(con, success, promptInfo?, previewImage?) {
195
   showPromptModal(con, success, promptInfo?, previewImage?) {
168
     this.promptModalShow = false;
196
     this.promptModalShow = false;
169
     this.promptContent = con;
197
     this.promptContent = con;
170
     this.ifSuccess = success;
198
     this.ifSuccess = success;
171
     this.promptInfo = promptInfo;
199
     this.promptInfo = promptInfo;
172
-    this.previewImage = previewImage ? previewImage : '';
200
+    this.previewImage = previewImage ? previewImage : "";
173
     setTimeout(() => {
201
     setTimeout(() => {
174
       this.promptModalShow = true;
202
       this.promptModalShow = true;
175
     }, 100);
203
     }, 100);
176
   }
204
   }
177
   showPromptModalImg(previewImage) {
205
   showPromptModalImg(previewImage) {
178
     this.promptModalShowImg = false;
206
     this.promptModalShowImg = false;
179
-    this.previewImage = previewImage ? previewImage : '';
207
+    this.previewImage = previewImage ? previewImage : "";
180
     setTimeout(() => {
208
     setTimeout(() => {
181
       this.promptModalShowImg = true;
209
       this.promptModalShowImg = true;
182
     }, 100);
210
     }, 100);
@@ -185,19 +213,19 @@ export class OrderDetailComponent implements OnInit {
185
   // 格式化时分秒
213
   // 格式化时分秒
186
   // (时间小于一分钟则显示秒,时间大于一分钟则显示分钟数,如超出一小时则显示小时和分钟。)time单位:秒
214
   // (时间小于一分钟则显示秒,时间大于一分钟则显示分钟数,如超出一小时则显示小时和分钟。)time单位:秒
187
   formatTime(time) {
215
   formatTime(time) {
188
-    let timeStr = '';
216
+    let timeStr = "";
189
     if (time >= 0 && time < 60) {
217
     if (time >= 0 && time < 60) {
190
       // 秒
218
       // 秒
191
-      timeStr = time + '秒';
219
+      timeStr = time + "秒";
192
     } else if (time >= 60 && time < 3600) {
220
     } else if (time >= 60 && time < 3600) {
193
       // 分钟
221
       // 分钟
194
-      timeStr = Math.floor(time / 60) + '分钟'
222
+      timeStr = Math.floor(time / 60) + "分钟";
195
     } else if (time >= 3600) {
223
     } else if (time >= 3600) {
196
       // 时 + 分
224
       // 时 + 分
197
-      let h = '';
198
-      let m = '';
199
-      h = Math.floor(time / 3600) + '小时';
200
-      m = (time % 3600) >= 60 ? Math.floor((time % 3600) / 60) + '分钟' : '';
225
+      let h = "";
226
+      let m = "";
227
+      h = Math.floor(time / 3600) + "小时";
228
+      m = time % 3600 >= 60 ? Math.floor((time % 3600) / 60) + "分钟" : "";
201
       timeStr = h + m;
229
       timeStr = h + m;
202
     }
230
     }
203
     return timeStr;
231
     return timeStr;
@@ -207,7 +235,7 @@ export class OrderDetailComponent implements OnInit {
207
   filterTime(step) {
235
   filterTime(step) {
208
     // step = [{ difTime: 2 }, { difTime: 6 }]
236
     // step = [{ difTime: 2 }, { difTime: 6 }]
209
     let num = 0;
237
     let num = 0;
210
-    step.forEach(e => {
238
+    step.forEach((e) => {
211
       num += e.difTime;
239
       num += e.difTime;
212
     });
240
     });
213
     return this.formatTime(num / 1000);
241
     return this.formatTime(num / 1000);

+ 4 - 2
src/app/views/fuwutai/fuwutai.component.ts

@@ -174,7 +174,7 @@ export class FuwutaiComponent implements OnInit {
174
     }
174
     }
175
     this.bLoading = true;
175
     this.bLoading = true;
176
     this.mainService
176
     this.mainService
177
-      .getBuildingOrFloor("building", postData)
177
+      .coopData("getBuildingOrFloor", "building", postData)
178
       .subscribe((result) => {
178
       .subscribe((result) => {
179
         this.bLoading = false;
179
         this.bLoading = false;
180
         if (result.status == 200) {
180
         if (result.status == 200) {
@@ -1220,7 +1220,9 @@ export class FuwutaiComponent implements OnInit {
1220
       },
1220
       },
1221
     };
1221
     };
1222
     this.patientLogTasktypeLoading = true;
1222
     this.patientLogTasktypeLoading = true;
1223
-    return this.mainService.systemConfiguration(postData).toPromise();
1223
+    return this.mainService
1224
+      .getFetchDataList("simple/data", "systemConfiguration", postData)
1225
+      .toPromise();
1224
   }
1226
   }
1225
   // 打开新建工单
1227
   // 打开新建工单
1226
   deathTasktypeId; //获取这个写死的任务类型的id,送病人回病房
1228
   deathTasktypeId; //获取这个写死的任务类型的id,送病人回病房

+ 1 - 1
src/app/views/holidays-management/holidays-management.component.ts

@@ -53,7 +53,7 @@ export class HolidaysManagementComponent implements OnInit {
53
     this.syncWorkDayObj.valueconfig = Number(e);
53
     this.syncWorkDayObj.valueconfig = Number(e);
54
     let postData = { syncWorkDay: JSON.stringify(this.syncWorkDayObj) };
54
     let postData = { syncWorkDay: JSON.stringify(this.syncWorkDayObj) };
55
     this.maskFlag = this.msg.loading("加载中", { nzDuration: 0 }).messageId;
55
     this.maskFlag = this.msg.loading("加载中", { nzDuration: 0 }).messageId;
56
-    this.mainService.syncWorkDay(postData).subscribe((result) => {
56
+    this.mainService.coopConfig("syncWorkDay", postData).subscribe((result) => {
57
       this.msg.remove(this.maskFlag);
57
       this.msg.remove(this.maskFlag);
58
       this.maskFlag = false;
58
       this.maskFlag = false;
59
       if (result["state"] == 200) {
59
       if (result["state"] == 200) {

+ 1 - 1
src/app/views/hospital-config/hospital-config.component.ts

@@ -48,7 +48,7 @@ export class HospitalConfigComponent implements OnInit {
48
   }
48
   }
49
   // 根据科室id查科室
49
   // 根据科室id查科室
50
   getDeptById(id) {
50
   getDeptById(id) {
51
-    return this.mainService.getOfficeDetail(id);
51
+    return this.mainService.getFetchData("data", "department", id);
52
   }
52
   }
53
   //初始化请求数据
53
   //初始化请求数据
54
   getInit() {
54
   getInit() {

+ 15 - 11
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -117,7 +117,9 @@ export class HushijiandanComponent implements OnInit {
117
               orders: i,
117
               orders: i,
118
             };
118
             };
119
           });
119
           });
120
-          this.mainService.sortTaskType(postData).subscribe((result) => {});
120
+          this.mainService
121
+            .coopConfig("setOrders", postData)
122
+            .subscribe((result) => {});
121
         }, 500);
123
         }, 500);
122
       },
124
       },
123
     };
125
     };
@@ -287,7 +289,7 @@ export class HushijiandanComponent implements OnInit {
287
   listDeptOrderRecord() {
289
   listDeptOrderRecord() {
288
     this.rLoading = true;
290
     this.rLoading = true;
289
     this.mainService
291
     this.mainService
290
-      .listDeptOrderRecord({ deptId: this.loginUserDeptId })
292
+      .listMsgByMain("listDeptOrderRecord", { deptId: this.loginUserDeptId })
291
       .subscribe((result) => {
293
       .subscribe((result) => {
292
         this.rLoading = false;
294
         this.rLoading = false;
293
         if (result["status"] == 200) {
295
         if (result["status"] == 200) {
@@ -320,14 +322,16 @@ export class HushijiandanComponent implements OnInit {
320
     clearTimeout(this.recentInfoTimer);
322
     clearTimeout(this.recentInfoTimer);
321
     this.recentInfoTimer = setTimeout(() => {
323
     this.recentInfoTimer = setTimeout(() => {
322
       this.recentInfoNum++;
324
       this.recentInfoNum++;
323
-      this.mainService.getRecentInfo({ patientCode }).subscribe((result) => {
324
-        this.recentInfoNum--;
325
-        if (result["status"] == 200 && this.recentInfoNum === 0) {
326
-          this.recentInfo = result["data"]["info"];
327
-        } else {
328
-          this.recentInfo = "";
329
-        }
330
-      });
325
+      this.mainService
326
+        .listMsgByMain("workOrder/findInspectRecently", { patientCode })
327
+        .subscribe((result) => {
328
+          this.recentInfoNum--;
329
+          if (result["status"] == 200 && this.recentInfoNum === 0) {
330
+            this.recentInfo = result["data"]["info"];
331
+          } else {
332
+            this.recentInfo = "";
333
+          }
334
+        });
331
     }, 500);
335
     }, 500);
332
   }
336
   }
333
   // 获取患者陪检任务类型(只有一个)的信息
337
   // 获取患者陪检任务类型(只有一个)的信息
@@ -602,7 +606,7 @@ export class HushijiandanComponent implements OnInit {
602
       },
606
       },
603
     };
607
     };
604
     this.loading4 = true;
608
     this.loading4 = true;
605
-    this.mainService.changeFollow(postData).subscribe(
609
+    this.mainService.listMsgByMain("updData/patient", postData).subscribe(
606
       (result) => {
610
       (result) => {
607
         this.loading4 = false;
611
         this.loading4 = false;
608
         if (result["status"] == 200) {
612
         if (result["status"] == 200) {

+ 3 - 1
src/app/views/job-assignment/job-assignment.component.ts

@@ -1214,7 +1214,9 @@ export class JobAssignmentComponent implements OnInit {
1214
   getAllBuilding() {
1214
   getAllBuilding() {
1215
     var that = this;
1215
     var that = this;
1216
     that.mainService
1216
     that.mainService
1217
-      .getBuildingOrFloor("building", { hosId: that.checkedType["hosId"].id })
1217
+      .coopData("getBuildingOrFloor", "building", {
1218
+        hosId: that.checkedType["hosId"].id,
1219
+      })
1218
       .subscribe((data) => {
1220
       .subscribe((data) => {
1219
         that.allBuilding = data.data;
1221
         that.allBuilding = data.data;
1220
       });
1222
       });

+ 25 - 18
src/app/views/office-detail/office-detail.component.ts

@@ -1,38 +1,45 @@
1
-import { Component, OnInit } from '@angular/core';
1
+import { Component, OnInit } from "@angular/core";
2
 import { Router, ActivatedRoute } from "@angular/router";
2
 import { Router, ActivatedRoute } from "@angular/router";
3
-import { NzMessageService } from 'ng-zorro-antd';
3
+import { NzMessageService } from "ng-zorro-antd";
4
 
4
 
5
 import { MainService } from "../../services/main.service";
5
 import { MainService } from "../../services/main.service";
6
 
6
 
7
 @Component({
7
 @Component({
8
-  selector: 'app-office-detail',
9
-  templateUrl: './office-detail.component.html',
10
-  styleUrls: ['./office-detail.component.less']
8
+  selector: "app-office-detail",
9
+  templateUrl: "./office-detail.component.html",
10
+  styleUrls: ["./office-detail.component.less"],
11
 })
11
 })
12
 export class OfficeDetailComponent implements OnInit {
12
 export class OfficeDetailComponent implements OnInit {
13
-
14
-  constructor(private message: NzMessageService,private router: Router, private mainService: MainService, private routerInfo: ActivatedRoute) { }
13
+  constructor(
14
+    private message: NzMessageService,
15
+    private router: Router,
16
+    private mainService: MainService,
17
+    private routerInfo: ActivatedRoute
18
+  ) {}
15
 
19
 
16
   id: number;
20
   id: number;
17
-  officeInfo: any={};
21
+  officeInfo: any = {};
18
 
22
 
19
   ngOnInit() {
23
   ngOnInit() {
20
-    this.getDetail()
24
+    this.getDetail();
21
   }
25
   }
22
   hideModal() {
26
   hideModal() {
23
-    this.router.navigateByUrl('/main/officeManagement')
27
+    this.router.navigateByUrl("/main/officeManagement");
24
   }
28
   }
25
 
29
 
26
   // 获取详情
30
   // 获取详情
27
   maskFlag: any = false;
31
   maskFlag: any = false;
28
   getDetail() {
32
   getDetail() {
29
-    this.id = this.routerInfo.snapshot.params['id'];
30
-    this.maskFlag = this.message.loading('正在加载中..', { nzDuration: 0 }).messageId;
31
-    this.mainService.getOfficeDetail(this.id).subscribe(data => {
32
-      this.message.remove(this.maskFlag);
33
-      this.maskFlag = false;
34
-      this.officeInfo = data.data;
35
-    })
33
+    this.id = this.routerInfo.snapshot.params["id"];
34
+    this.maskFlag = this.message.loading("正在加载中..", {
35
+      nzDuration: 0,
36
+    }).messageId;
37
+    this.mainService
38
+      .getFetchData("data", "department", this.id)
39
+      .subscribe((data) => {
40
+        this.message.remove(this.maskFlag);
41
+        this.maskFlag = false;
42
+        this.officeInfo = data.data;
43
+      });
36
   }
44
   }
37
-
38
 }
45
 }

+ 43 - 39
src/app/views/office-management/office-management.component.ts

@@ -161,34 +161,36 @@ export class OfficeManagementComponent implements OnInit {
161
     this.maskFlag = this.message.loading("正在加载中..", {
161
     this.maskFlag = this.message.loading("正在加载中..", {
162
       nzDuration: 0,
162
       nzDuration: 0,
163
     }).messageId;
163
     }).messageId;
164
-    this.mainService.getBuildingOrFloor("building", data).subscribe((data) => {
165
-      this.buildings = data.data;
166
-      this.floors = [];
167
-      // ---------
168
-      if (obj) {
169
-        //编辑
170
-        let arr = this.buildings.map((item) => item.id);
171
-        if (obj.building.id && arr.includes(obj.building.id)) {
172
-          //有楼栋
173
-          this.changeBuilding(obj.building.id, obj);
174
-          this.validateForm.controls.building.setValue(obj.building.id + "");
164
+    this.mainService
165
+      .coopData("getBuildingOrFloor", "building", data)
166
+      .subscribe((data) => {
167
+        this.buildings = data.data;
168
+        this.floors = [];
169
+        // ---------
170
+        if (obj) {
171
+          //编辑
172
+          let arr = this.buildings.map((item) => item.id);
173
+          if (obj.building.id && arr.includes(obj.building.id)) {
174
+            //有楼栋
175
+            this.changeBuilding(obj.building.id, obj);
176
+            this.validateForm.controls.building.setValue(obj.building.id + "");
177
+          } else {
178
+            //无楼栋
179
+            this.floors = [];
180
+            this.message.remove(this.maskFlag);
181
+            this.maskFlag = false;
182
+            this.modal = true;
183
+            this.validateForm.controls.building.setValue(null);
184
+            this.validateForm.controls.officeAddress.setValue(null);
185
+          }
175
         } else {
186
         } else {
176
-          //无楼栋
177
-          this.floors = [];
187
+          //新增
178
           this.message.remove(this.maskFlag);
188
           this.message.remove(this.maskFlag);
179
           this.maskFlag = false;
189
           this.maskFlag = false;
180
           this.modal = true;
190
           this.modal = true;
181
-          this.validateForm.controls.building.setValue(null);
182
-          this.validateForm.controls.officeAddress.setValue(null);
183
         }
191
         }
184
-      } else {
185
-        //新增
186
-        this.message.remove(this.maskFlag);
187
-        this.maskFlag = false;
188
-        this.modal = true;
189
-      }
190
-      // ---------
191
-    });
192
+        // ---------
193
+      });
192
   }
194
   }
193
 
195
 
194
   // 切换楼栋信息
196
   // 切换楼栋信息
@@ -209,23 +211,25 @@ export class OfficeManagementComponent implements OnInit {
209
       buildingId: bid,
211
       buildingId: bid,
210
     };
212
     };
211
     this.floorLoading = true;
213
     this.floorLoading = true;
212
-    that.mainService.getBuildingOrFloor("floor", data).subscribe((data) => {
213
-      this.floorLoading = false;
214
-      this.message.remove(this.maskFlag);
215
-      this.maskFlag = false;
216
-      this.modal = true;
217
-      that.floors = data.data;
218
-      if (obj) {
219
-        let floorId = obj.floor.id;
220
-        let arr = that.floors.map((item) => item["id"]);
221
-        if (floorId && arr.includes(floorId)) {
222
-          this.validateForm.controls.floor.setValue(floorId + "");
223
-        } else {
224
-          this.validateForm.controls.floor.setValue(null);
225
-          this.validateForm.controls.officeAddress.setValue(null);
214
+    that.mainService
215
+      .coopData("getBuildingOrFloor", "floor", data)
216
+      .subscribe((data) => {
217
+        this.floorLoading = false;
218
+        this.message.remove(this.maskFlag);
219
+        this.maskFlag = false;
220
+        this.modal = true;
221
+        that.floors = data.data;
222
+        if (obj) {
223
+          let floorId = obj.floor.id;
224
+          let arr = that.floors.map((item) => item["id"]);
225
+          if (floorId && arr.includes(floorId)) {
226
+            this.validateForm.controls.floor.setValue(floorId + "");
227
+          } else {
228
+            this.validateForm.controls.floor.setValue(null);
229
+            this.validateForm.controls.officeAddress.setValue(null);
230
+          }
226
         }
231
         }
227
-      }
228
-    });
232
+      });
229
   }
233
   }
230
 
234
 
231
   // 获取科室类型
235
   // 获取科室类型

+ 6 - 1
src/app/views/pharmacy/pharmacy.component.ts

@@ -83,8 +83,13 @@ export class PharmacyComponent implements OnInit {
83
         this.loading3 = true;
83
         this.loading3 = true;
84
         break;
84
         break;
85
     }
85
     }
86
+    let postData = {
87
+      idx,
88
+      sum: 10,
89
+      drugsBag: { searchType: type, searchKey, launch },
90
+    };
86
     this.mainService
91
     this.mainService
87
-      .getPharmacyList(idx, type, searchKey, launch)
92
+      .getFetchDataList("api", "drugsBag", postData)
88
       .subscribe((result) => {
93
       .subscribe((result) => {
89
         switch (type) {
94
         switch (type) {
90
           case 1:
95
           case 1:

+ 27 - 22
src/app/views/round-robin-detail/round-robin-detail.component.ts

@@ -1,42 +1,47 @@
1
-import { Component, OnInit } from '@angular/core';
1
+import { Component, OnInit } from "@angular/core";
2
 import { Router, ActivatedRoute } from "@angular/router";
2
 import { Router, ActivatedRoute } from "@angular/router";
3
-import { NzMessageService } from 'ng-zorro-antd';
3
+import { NzMessageService } from "ng-zorro-antd";
4
 
4
 
5
 import { MainService } from "../../services/main.service";
5
 import { MainService } from "../../services/main.service";
6
 
6
 
7
-
8
 @Component({
7
 @Component({
9
-  selector: 'app-round-robin-detail',
10
-  templateUrl: './round-robin-detail.component.html',
11
-  styleUrls: ['./round-robin-detail.component.less']
8
+  selector: "app-round-robin-detail",
9
+  templateUrl: "./round-robin-detail.component.html",
10
+  styleUrls: ["./round-robin-detail.component.less"],
12
 })
11
 })
13
 export class RoundRobinDetailComponent implements OnInit {
12
 export class RoundRobinDetailComponent implements OnInit {
14
-
15
-  constructor(private message: NzMessageService, private router: Router, private mainService: MainService, private routerInfo: ActivatedRoute) { }
13
+  constructor(
14
+    private message: NzMessageService,
15
+    private router: Router,
16
+    private mainService: MainService,
17
+    private routerInfo: ActivatedRoute
18
+  ) {}
16
 
19
 
17
   id: number;
20
   id: number;
18
   userInfo: any = null;
21
   userInfo: any = null;
19
-  dayType = ['全部', '节假日', '工作日'];//执行策略里的复选框数据字典
22
+  dayType = ["全部", "节假日", "工作日"]; //执行策略里的复选框数据字典
20
   ngOnInit() {
23
   ngOnInit() {
21
-    this.getDetail()
24
+    this.getDetail();
22
   }
25
   }
23
   hideModal() {
26
   hideModal() {
24
-    this.router.navigateByUrl('/main/roundRobin')
27
+    this.router.navigateByUrl("/main/roundRobin");
25
   }
28
   }
26
 
29
 
27
   // 获取详情
30
   // 获取详情
28
   maskFlag: any = false;
31
   maskFlag: any = false;
29
   getDetail() {
32
   getDetail() {
30
-    this.id = this.routerInfo.snapshot.params['id'];
31
-    this.maskFlag = this.message.loading('正在加载中..', { nzDuration: 0 }).messageId;
32
-    this.mainService.getApiFetchData('orderPlan', this.id).subscribe(data => {
33
-      this.message.remove(this.maskFlag);
34
-      this.maskFlag = false;
35
-      if (data.status == 200) {
36
-        this.userInfo = data.data;
37
-      }
38
-    })
33
+    this.id = this.routerInfo.snapshot.params["id"];
34
+    this.maskFlag = this.message.loading("正在加载中..", {
35
+      nzDuration: 0,
36
+    }).messageId;
37
+    this.mainService
38
+      .getFetchData("api", "orderPlan", this.id)
39
+      .subscribe((data) => {
40
+        this.message.remove(this.maskFlag);
41
+        this.maskFlag = false;
42
+        if (data.status == 200) {
43
+          this.userInfo = data.data;
44
+        }
45
+      });
39
   }
46
   }
40
-
41
 }
47
 }
42
-

+ 27 - 24
src/app/views/shortcut-build-orders-detail/shortcut-build-orders-detail.component.ts

@@ -1,44 +1,47 @@
1
-import { Component, OnInit } from '@angular/core';
1
+import { Component, OnInit } from "@angular/core";
2
 import { Router, ActivatedRoute } from "@angular/router";
2
 import { Router, ActivatedRoute } from "@angular/router";
3
-import { NzMessageService } from 'ng-zorro-antd';
3
+import { NzMessageService } from "ng-zorro-antd";
4
 
4
 
5
 import { MainService } from "../../services/main.service";
5
 import { MainService } from "../../services/main.service";
6
 
6
 
7
-
8
 @Component({
7
 @Component({
9
-  selector: 'app-shortcut-build-orders-detail',
10
-  templateUrl: './shortcut-build-orders-detail.component.html',
11
-  styleUrls: ['./shortcut-build-orders-detail.component.less']
8
+  selector: "app-shortcut-build-orders-detail",
9
+  templateUrl: "./shortcut-build-orders-detail.component.html",
10
+  styleUrls: ["./shortcut-build-orders-detail.component.less"],
12
 })
11
 })
13
 export class ShortcutBuildOrdersDetailComponent implements OnInit {
12
 export class ShortcutBuildOrdersDetailComponent implements OnInit {
14
-
15
-  constructor(private message: NzMessageService, private router: Router, private mainService: MainService, private routerInfo: ActivatedRoute) { }
13
+  constructor(
14
+    private message: NzMessageService,
15
+    private router: Router,
16
+    private mainService: MainService,
17
+    private routerInfo: ActivatedRoute
18
+  ) {}
16
 
19
 
17
   id: number;
20
   id: number;
18
   userInfo: any = null;
21
   userInfo: any = null;
19
-  roundRobinTypes = [
20
-    { id: '163', hosName: '标本轮巡' }
21
-  ];//快捷建单类型
22
+  roundRobinTypes = [{ id: "163", hosName: "标本轮巡" }]; //快捷建单类型
22
   ngOnInit() {
23
   ngOnInit() {
23
-    this.getDetail()
24
+    this.getDetail();
24
   }
25
   }
25
   hideModal() {
26
   hideModal() {
26
-    this.router.navigateByUrl('/main/shortcutBuildOrders')
27
+    this.router.navigateByUrl("/main/shortcutBuildOrders");
27
   }
28
   }
28
 
29
 
29
   // 获取详情
30
   // 获取详情
30
   maskFlag: any = false;
31
   maskFlag: any = false;
31
   getDetail() {
32
   getDetail() {
32
-    this.id = this.routerInfo.snapshot.params['id'];
33
-    this.maskFlag = this.message.loading('正在加载中..', { nzDuration: 0 }).messageId;
34
-    this.mainService.getApiFetchData('quickOrder', this.id).subscribe(data => {
35
-      this.message.remove(this.maskFlag);
36
-      this.maskFlag = false;
37
-      if (data.status == 200) {
38
-        this.userInfo = data.data;
39
-      }
40
-    })
33
+    this.id = this.routerInfo.snapshot.params["id"];
34
+    this.maskFlag = this.message.loading("正在加载中..", {
35
+      nzDuration: 0,
36
+    }).messageId;
37
+    this.mainService
38
+      .getFetchData("api", "quickOrder", this.id)
39
+      .subscribe((data) => {
40
+        this.message.remove(this.maskFlag);
41
+        this.maskFlag = false;
42
+        if (data.status == 200) {
43
+          this.userInfo = data.data;
44
+        }
45
+      });
41
   }
46
   }
42
 }
47
 }
43
-
44
-

+ 3 - 1
src/app/views/task-type-management/task-type-management.component.ts

@@ -42,7 +42,9 @@ export class TaskTypeManagementComponent implements OnInit {
42
               orders: i,
42
               orders: i,
43
             };
43
             };
44
           });
44
           });
45
-          this.mainService.sortTaskType(postData).subscribe((result) => {});
45
+          this.mainService
46
+            .coopConfig("setOrders", postData)
47
+            .subscribe((result) => {});
46
         }, 500);
48
         }, 500);
47
       },
49
       },
48
     };
50
     };

+ 19 - 15
src/app/views/user-detail/user-detail.component.ts

@@ -1,38 +1,42 @@
1
-import { Component, OnInit } from '@angular/core';
1
+import { Component, OnInit } from "@angular/core";
2
 import { Router, ActivatedRoute } from "@angular/router";
2
 import { Router, ActivatedRoute } from "@angular/router";
3
-import { NzMessageService } from 'ng-zorro-antd';
3
+import { NzMessageService } from "ng-zorro-antd";
4
 
4
 
5
 import { MainService } from "../../services/main.service";
5
 import { MainService } from "../../services/main.service";
6
 
6
 
7
-
8
 @Component({
7
 @Component({
9
-  selector: 'app-user-detail',
10
-  templateUrl: './user-detail.component.html',
11
-  styleUrls: ['./user-detail.component.less']
8
+  selector: "app-user-detail",
9
+  templateUrl: "./user-detail.component.html",
10
+  styleUrls: ["./user-detail.component.less"],
12
 })
11
 })
13
 export class UserDetailComponent implements OnInit {
12
 export class UserDetailComponent implements OnInit {
14
-
15
-  constructor(private message: NzMessageService, private router: Router, private mainService: MainService, private routerInfo: ActivatedRoute) { }
13
+  constructor(
14
+    private message: NzMessageService,
15
+    private router: Router,
16
+    private mainService: MainService,
17
+    private routerInfo: ActivatedRoute
18
+  ) {}
16
 
19
 
17
   id: number;
20
   id: number;
18
   userInfo: any = {};
21
   userInfo: any = {};
19
   ngOnInit() {
22
   ngOnInit() {
20
-    this.getDetail()
23
+    this.getDetail();
21
   }
24
   }
22
   hideModal() {
25
   hideModal() {
23
-    this.router.navigateByUrl('/main/usersManagement')
26
+    this.router.navigateByUrl("/main/usersManagement");
24
   }
27
   }
25
 
28
 
26
   // 获取详情
29
   // 获取详情
27
   maskFlag: any = false;
30
   maskFlag: any = false;
28
   getDetail() {
31
   getDetail() {
29
-    this.id = this.routerInfo.snapshot.params['id'];
30
-    this.maskFlag = this.message.loading('正在加载中..', { nzDuration: 0 }).messageId;
31
-    this.mainService.getDataFetchData('user', this.id).subscribe(data => {
32
+    this.id = this.routerInfo.snapshot.params["id"];
33
+    this.maskFlag = this.message.loading("正在加载中..", {
34
+      nzDuration: 0,
35
+    }).messageId;
36
+    this.mainService.getFetchData("data", "user", this.id).subscribe((data) => {
32
       this.message.remove(this.maskFlag);
37
       this.message.remove(this.maskFlag);
33
       this.maskFlag = false;
38
       this.maskFlag = false;
34
       this.userInfo = data.data;
39
       this.userInfo = data.data;
35
-    })
40
+    });
36
   }
41
   }
37
-
38
 }
42
 }