seimin 3 роки тому
батько
коміт
6bff17adee

+ 14 - 6
README.md

@@ -1,7 +1,15 @@
1 1
 # 目录说明-seimin(2021-03-08)
2
-- directives存放指令
3
-- guard存放守卫
4
-- pipes存放管道
5
-- services存放服务
6
-- views存放视图
7
-- share存放共享组件
2
+- directives   存放指令
3
+- guard        存放守卫
4
+- pipes        存放管道
5
+- services     存放服务
6
+- views        存放视图
7
+- share        存放共享组件
8
+
9
+# 后端提示-seimin(2021-07-05)
10
+- /simple/data/fetchDataList/{model}            查询列表
11
+- /simple/data/fetchData/{model}/{id}           查询详情
12
+- /simple/data/addData/{model}                  新增,更新
13
+- /simple/data/addListData/{model}              新增,更新多个【暂时不用】
14
+- /simple/data/updData/{model}                  更新【暂时不用】
15
+- /simple/data/rmvData/{model}                  删除

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

@@ -502,20 +502,4 @@ export class MainService {
502 502
       headers: this.headers,
503 503
     });
504 504
   }
505
-  //查询工单消息设置
506
-  getWorkorderMessage(data) {
507
-    return this.http.post(
508
-      host.host + "/configuration/pageWorkOrderMessageSettings",
509
-      data,
510
-      { headers: this.headers }
511
-    );
512
-  }
513
-  //修改工单消息设置
514
-  updateWorkorderMessage(data) {
515
-    return this.http.post(
516
-      host.host + "/configuration/saveWorkOrderMessageSettings",
517
-      data,
518
-      { headers: this.headers }
519
-    );
520
-  }
521 505
 }

+ 2 - 0
src/app/views/main/main.component.html

@@ -36,6 +36,8 @@
36 36
           <button nz-button nzType="primary" *ngIf="nurseRole" (click)="toHuShi()">护士端</button>
37 37
           <button nz-button nzType="primary" *ngIf="pharmacyRole" (click)="toPharmacy()">药房端</button>
38 38
           <button nz-button nzType="primary" *ngIf="largeScreenRole" (click)="toBigScreen('largeScreen')">大屏端</button>
39
+          <button nz-button nzType="primary" *ngIf="largeScreenRole2"
40
+            (click)="toBigScreen('largeScreen2')">大屏端2</button>
39 41
           <button nz-button nzType="primary" *ngIf="specimenViewRole" (click)="toBigScreen('specimenView')"
40 42
             [nzLoading]="deptTypeLoading">业务视图</button>
41 43
         </div>

+ 7 - 1
src/app/views/main/main.component.ts

@@ -26,6 +26,7 @@ export class MainComponent implements OnInit {
26 26
   nurseRole: boolean = false; //护士端权限
27 27
   pharmacyRole: boolean = false; //药房端权限
28 28
   largeScreenRole: boolean = false; //大屏端权限
29
+  largeScreenRole2: boolean = false; //大屏端权限
29 30
   specimenViewRole: boolean = false; //业务视图权限
30 31
   @ViewChild("osComponentRef1", {
31 32
     read: OverlayScrollbarsComponent,
@@ -111,6 +112,10 @@ export class MainComponent implements OnInit {
111 112
         this.largeScreenRole = true;
112 113
         console.log("大屏端权限");
113 114
       }
115
+      if (e.link == "largeScreen2") {
116
+        this.largeScreenRole2 = true;
117
+        console.log("大屏端2权限");
118
+      }
114 119
       if (e.link == "specimenView") {
115 120
         this.specimenViewRole = true;
116 121
         console.log("业务视图权限");
@@ -211,8 +216,9 @@ export class MainComponent implements OnInit {
211 216
   submitFormHand(id) {
212 217
     if (this.screenType === "largeScreen") {
213 218
       window.open(http.bigScreenHost + "/#/" + id);
219
+    } else if (this.screenType === "largeScreen2") {
220
+      window.open(http.bigScreenHost2 + "/#/" + id);
214 221
     } else if (this.screenType === "specimenView") {
215
-      // this.getTypeByDept(id);
216 222
       let remember = JSON.parse(localStorage.getItem("remember"));
217 223
       window.open(
218 224
         http.specimenViewHost +

+ 39 - 41
src/app/views/workorder-message/workorder-message.component.ts

@@ -1,17 +1,10 @@
1 1
 import { Component, OnInit, ViewChild } from "@angular/core";
2 2
 import { ActivatedRoute } from "@angular/router";
3
-import {
4
-  FormBuilder,
5
-  Validators,
6
-  FormGroup,
7
-  FormControl,
8
-} from "@angular/forms";
3
+import { FormBuilder, Validators, FormGroup } from "@angular/forms";
9 4
 
10 5
 import { MainService } from "../../services/main.service";
11 6
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
12 7
 import { ToolService } from "../../services/tool.service";
13
-import { NzMessageService } from "ng-zorro-antd";
14
-import { format } from "date-fns";
15 8
 @Component({
16 9
   selector: "app-workorder-message",
17 10
   templateUrl: "./workorder-message.component.html",
@@ -24,7 +17,6 @@ export class WorkorderMessageComponent implements OnInit {
24 17
   })
25 18
   osComponentRef1: OverlayScrollbarsComponent;
26 19
   constructor(
27
-    private message: NzMessageService,
28 20
     private fb: FormBuilder,
29 21
     private mainService: MainService,
30 22
     private route: ActivatedRoute,
@@ -75,18 +67,20 @@ export class WorkorderMessageComponent implements OnInit {
75 67
       },
76 68
     };
77 69
     this.loading1 = true;
78
-    this.mainService.getWorkorderMessage(postData).subscribe((data) => {
79
-      this.loading1 = false;
80
-      if (data["status"] == 200) {
81
-        this.listOfData = data["list"].data;
82
-        this.listOfData.forEach((item) => {
83
-          item.applicableShiftName = Object.values(
84
-            JSON.parse(item.applicableShift)
85
-          ).join(",");
86
-        });
87
-        this.listLength = data["totalNum"];
88
-      }
89
-    });
70
+    this.mainService
71
+      .getFetchDataList("simple/data", "WorkOrderMessageSettings", postData)
72
+      .subscribe((data) => {
73
+        this.loading1 = false;
74
+        if (data["status"] == 200) {
75
+          this.listOfData = data["list"].data;
76
+          this.listOfData.forEach((item) => {
77
+            item.applicableShiftName = Object.values(
78
+              JSON.parse(item.applicableShift)
79
+            ).join(",");
80
+          });
81
+          this.listLength = data["totalNum"];
82
+        }
83
+      });
90 84
   }
91 85
   //关闭编辑弹框
92 86
   hideAddModal() {
@@ -125,17 +119,19 @@ export class WorkorderMessageComponent implements OnInit {
125 119
         id: this.dataContent.id,
126 120
       },
127 121
     };
128
-    this.mainService.updateWorkorderMessage(postData).subscribe((data) => {
129
-      this.btnLoading = false;
130
-      this.hideAddModal();
131
-      this.initForm();
132
-      if (data["status"] == 200) {
133
-        this.listLength++;
134
-        this.showPromptModal("修改", true, "");
135
-      } else {
136
-        this.showPromptModal("修改", false, data["msg"]);
137
-      }
138
-    });
122
+    this.mainService
123
+      .simplePost("addData", "WorkOrderMessageSettings", postData)
124
+      .subscribe((data) => {
125
+        this.btnLoading = false;
126
+        this.hideAddModal();
127
+        this.initForm();
128
+        if (data["status"] == 200) {
129
+          this.listLength++;
130
+          this.showPromptModal("修改", true, "");
131
+        } else {
132
+          this.showPromptModal("修改", false, data["msg"]);
133
+        }
134
+      });
139 135
   }
140 136
   // 获取班次
141 137
   getScheduleClass() {
@@ -210,15 +206,17 @@ export class WorkorderMessageComponent implements OnInit {
210 206
           id: this.dataContent.id,
211 207
         },
212 208
       };
213
-      this.mainService.updateWorkorderMessage(postData).subscribe((data) => {
214
-        this.btnLoading = false;
215
-        this.delModal = false;
216
-        if (data["status"] == 200) {
217
-          this.showPromptModal(this.tipsMsg2, true, "");
218
-        } else {
219
-          this.showPromptModal(this.tipsMsg2, false, data["msg"]);
220
-        }
221
-      });
209
+      this.mainService
210
+        .simplePost("addData", "WorkOrderMessageSettings", postData)
211
+        .subscribe((data) => {
212
+          this.btnLoading = false;
213
+          this.delModal = false;
214
+          if (data["status"] == 200) {
215
+            this.showPromptModal(this.tipsMsg2, true, "");
216
+          } else {
217
+            this.showPromptModal(this.tipsMsg2, false, data["msg"]);
218
+          }
219
+        });
222 220
     }
223 221
   }
224 222
 }

+ 1 - 0
src/assets/js/http.js

@@ -6,6 +6,7 @@ module.exports = {
6 6
   host: protocolName + '//' + domainName + ':' + port + '/service',//测试接口
7 7
   specimenViewHost: protocolName + '//' + domainName + ':' + port + '/specimenView',//业务视图
8 8
   bigScreenHost: protocolName + '//' + domainName + ':' + port + '/largeScreen',//大屏地址
9
+  bigScreenHost2: protocolName + '//' + domainName + ':' + port + '/largeScreen2',//大屏地址2
9 10
   homeWs: wsName + '://' + domainName + ':8080/webSocket/index',//websocket首页
10 11
   mainWs: wsName + '://' + domainName + ':8080/webSocket/message/manage',//websocket管理端
11 12
   nurseWs: wsName + '://' + domainName + ':8080/webSocket/message/nurse',//websocket护士端