瀏覽代碼

院区配置

seimin 8 月之前
父節點
當前提交
0650e87174

+ 25 - 0
src/app/components/configurationCenter/configuration-hospital/configuration-hospital.component.html

@@ -0,0 +1,25 @@
1
+<div class="content priority">
2
+  <div class="contentInner">
3
+    <div class="addressAssign">
4
+      <overlay-scrollbars #osComponentRef2 class="contentBody2">
5
+        <div class="contentBody">
6
+          <div class="classList" *ngFor="let item of hospitalList">
7
+            <span>{{ item.desc }}:</span>
8
+            <nz-radio-group [(ngModel)]="item.value">
9
+              <label nz-radio nzValue="1">是</label>
10
+              <label nz-radio nzValue="0">否</label>
11
+            </nz-radio-group>
12
+          </div>
13
+        </div>
14
+      </overlay-scrollbars>
15
+      <div class="contentBtns">
16
+        <button nz-button nzType="primary" (click)="submitMessageForm()">确定</button>
17
+      </div>
18
+    </div>
19
+  </div>
20
+</div>
21
+
22
+<!-- 操作成功/失败提示框 -->
23
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
24
+  [info]="promptInfo">
25
+</app-prompt-modal>

+ 146 - 0
src/app/components/configurationCenter/configuration-hospital/configuration-hospital.component.less

@@ -0,0 +1,146 @@
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
+  .content{
19
+    flex: 1;
20
+    min-height: 0;
21
+    display: flex;
22
+    flex-direction: column;
23
+    justify-content: space-between;
24
+    border: 1px solid #EEF3F9;
25
+    &.priority{
26
+      margin: 24px 275px 0;
27
+      background-color: #fff;
28
+      .contentInner{
29
+        padding: 90px 158px 72px;
30
+        border: 1px solid #E8EBEF;
31
+        .addressAssign{
32
+          width: 100%;
33
+          border: none;
34
+        }
35
+        .contentBody{
36
+          flex: 1;
37
+          display: flex;
38
+          flex-direction: column;
39
+          align-items: center;
40
+          padding: 0 16px;
41
+          gap: 32px;
42
+        }
43
+        .hospital{
44
+          width: 100%;
45
+          text-align: left;
46
+        }
47
+        .classList{
48
+          .select{
49
+            width: 313px;
50
+          }
51
+          span{
52
+            display: inline-block;
53
+            width: 11em;
54
+          }
55
+        }
56
+      }
57
+    }
58
+    .contentItem{
59
+      padding: 4px 16px;
60
+      cursor: pointer;
61
+      overflow: hidden;
62
+      text-overflow: ellipsis;
63
+      white-space: nowrap;
64
+      &.active{
65
+        color: @primary-color;
66
+        background-color: #F0F6ED;
67
+        border-radius: 4px;
68
+      }
69
+    }
70
+    .contentInner{
71
+      flex: 1;
72
+      display: flex;
73
+      flex-direction: column;
74
+      align-items: center;
75
+      padding: 0 16px;
76
+      gap: 32px;
77
+      .contentHead{
78
+        height: 45px;
79
+        display: flex;
80
+        justify-content: space-between;
81
+        align-items: center;
82
+        gap: 16px;
83
+        padding: 0 16px;
84
+        font-size: 16px;
85
+        font-weight: bold;
86
+        border-bottom: 1px solid #D9D9D9;
87
+        .title{
88
+          overflow: hidden;
89
+          text-overflow: ellipsis;
90
+          white-space: nowrap;
91
+        }
92
+        .btns{
93
+          flex-shrink: 0;
94
+        }
95
+      }
96
+      .contentBody{
97
+        padding: 0 8px 16px;
98
+        margin: 4px 0;
99
+        flex: 1;
100
+      }
101
+      .contentBody2{
102
+        flex: 1;
103
+      }
104
+      .address{
105
+        flex: 1;
106
+        height: 100%;
107
+        background: #FFFFFF;
108
+        border: 1px solid #E8EBEF;
109
+        display: flex;
110
+        flex-direction: column;
111
+        width: 0;
112
+      }
113
+      .addressAssign{
114
+        flex: 3;
115
+        height: 100%;
116
+        background: #FFFFFF;
117
+        border: 1px solid #E8EBEF;
118
+        display: flex;
119
+        flex-direction: column;
120
+        width: 0;
121
+      }
122
+      .list-template__searchItem {
123
+        margin-bottom: 16px;
124
+        .label {
125
+          color: #333;
126
+          display: inline-block;
127
+          width: 70px;
128
+          text-align-last: justify;
129
+          text-align: justify;
130
+          &.label--big {
131
+            width: 100px;
132
+          }
133
+        }
134
+        .formItem {
135
+          width: 135px;
136
+        }
137
+      }
138
+    }
139
+    .contentBtns{
140
+      margin-bottom: 16px;
141
+      display: flex;
142
+      justify-content: center;
143
+      align-items: center;
144
+    }
145
+  }
146
+}

+ 91 - 0
src/app/components/configurationCenter/configuration-hospital/configuration-hospital.component.ts

@@ -0,0 +1,91 @@
1
+import { Component, OnInit } from "@angular/core";
2
+import { ActivatedRoute } from "@angular/router";
3
+import { MainService } from "../../../services/main.service";
4
+import { ToolService } from 'src/app/services/tool.service';
5
+import { NzMessageService } from 'ng-zorro-antd';
6
+
7
+@Component({
8
+  selector: "app-configuration-hospital",
9
+  templateUrl: "./configuration-hospital.component.html",
10
+  styleUrls: ["./configuration-hospital.component.less"],
11
+})
12
+export class ConfigurationHospitalComponent implements OnInit {
13
+  constructor(
14
+    private route: ActivatedRoute,
15
+    private mainService: MainService,
16
+    private tool: ToolService,
17
+    private message: NzMessageService,
18
+  ) {}
19
+
20
+  coopData: any = {}; //当前操作列
21
+  currentHospital; //当前院区
22
+
23
+  ngOnInit() {
24
+    this.currentHospital = this.tool.getCurrentHospital();
25
+    this.getList();
26
+  }
27
+
28
+  // 新增/编辑表单提交
29
+  btnLoading: boolean = false; //提交按钮loading状态
30
+  submitMessageForm(): void {
31
+    this.btnLoading = true;
32
+    let postData:any = {
33
+      hosId: this.currentHospital.id,
34
+      // workdayClassId: this.dataInfo.workdayClassId,
35
+      // holidayClassId: this.dataInfo.holidayClassId,
36
+    };
37
+    // postData = { ...this.dataInfo, ...postData };
38
+    this.mainService
39
+      .simplePost("addData", "hospitalConfig", postData)
40
+      .subscribe((result) => {
41
+        this.btnLoading = false;
42
+        let msg = "保存";
43
+        if (result.status == 200) {
44
+          this.showPromptModal(msg, true, '');
45
+        } else {
46
+          this.showPromptModal(msg, false, result.msg);
47
+        }
48
+      });
49
+  }
50
+
51
+  // 获取列表
52
+  loading1:boolean = false;
53
+  hospitalList:any[] = [];
54
+  getList() {
55
+    let data = {
56
+      idx: 0,
57
+      sum: 9999,
58
+      hospitalConfig: {
59
+        hosId: this.currentHospital.id,
60
+        model: 'itsm',
61
+      },
62
+    };
63
+    this.loading1 = true;
64
+    this.mainService
65
+      .getFetchDataList("simple/data", "hospitalConfig", data)
66
+      .subscribe((data) => {
67
+        this.loading1 = false;
68
+        if (data.status == 200) {
69
+          this.hospitalList = data.list || [];
70
+        }else{
71
+          this.message.error(data.msg || "请求数据失败");
72
+        }
73
+      });
74
+  }
75
+
76
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
77
+  promptContent: string; //操作提示框提示信息
78
+  ifSuccess: boolean; //操作成功/失败
79
+  promptInfo: string; //操作结果提示信息
80
+  promptModalShow: boolean; //操作提示框是否展示
81
+  showPromptModal(con, success, promptInfo?) {
82
+    this.promptModalShow = false;
83
+    this.promptContent = con;
84
+    this.ifSuccess = success;
85
+    this.promptInfo = promptInfo;
86
+    setTimeout(() => {
87
+      this.promptModalShow = true;
88
+    }, 100);
89
+    this.getList();
90
+  }
91
+}

+ 4 - 0
src/app/views/incident-config/incident-config.component.html

@@ -24,6 +24,10 @@
24 24
   <ng-container *ngIf="activeTagId === 4">
25 25
     <app-configuration-message></app-configuration-message>
26 26
   </ng-container>
27
+  <!-- 院区配置 -->
28
+  <ng-container *ngIf="activeTagId === 5">
29
+    <app-configuration-hospital></app-configuration-hospital>
30
+  </ng-container>
27 31
 </div>
28 32
 
29 33
 

+ 1 - 0
src/app/views/incident-config/incident-config.component.ts

@@ -17,6 +17,7 @@ export class IncidentConfigComponent implements OnInit, AfterViewInit {
17 17
     { id: 2, name: '优先级',},
18 18
     { id: 3, name: '数据字典',},
19 19
     { id: 4, name: '消息通知',},
20
+    { id: 5, name: '院区配置',},
20 21
   ];
21 22
 
22 23
   ngOnInit(): void {}

+ 2 - 0
src/app/views/incident-config/incident-config.module.ts

@@ -8,6 +8,7 @@ import { ConfigurationCategoryComponent } from 'src/app/components/configuration
8 8
 import { ConfigurationPriorityComponent } from 'src/app/components/configurationCenter/configuration-priority/configuration-priority.component';
9 9
 import { ConfigurationDictionaryComponent } from 'src/app/components/configurationCenter/configuration-dictionary/configuration-dictionary.component';
10 10
 import { ConfigurationMessageComponent } from 'src/app/components/configurationCenter/configuration-message/configuration-message.component';
11
+import { ConfigurationHospitalComponent } from 'src/app/components/configurationCenter/configuration-hospital/configuration-hospital.component';
11 12
 
12 13
 
13 14
 @NgModule({
@@ -17,6 +18,7 @@ import { ConfigurationMessageComponent } from 'src/app/components/configurationC
17 18
     ConfigurationPriorityComponent,
18 19
     ConfigurationDictionaryComponent,
19 20
     ConfigurationMessageComponent,
21
+    ConfigurationHospitalComponent,
20 22
   ],
21 23
   imports: [
22 24
     CommonModule,