Browse Source

呼叫中心

seimin 10 months ago
parent
commit
a1cc2210bb

+ 43 - 0
src/app/components/configurationCenter/configuration-callcenter/configuration-callcenter.component.html

@@ -0,0 +1,43 @@
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="hospital">{{currentHospital.hosName}}</div>
7
+          <div class="classList">
8
+            节假日班次:
9
+            <nz-select class="select" [nzDropdownMatchSelectWidth]="false" nzAllowClear [(ngModel)]="dataInfo.holidayClassId"
10
+              nzPlaceHolder="请选择节假日班次" nzServerSearch>
11
+              <ng-container *ngFor="let data of classList1">
12
+                <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
13
+              </ng-container>
14
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
15
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
16
+              </nz-option>
17
+            </nz-select>
18
+          </div>
19
+          <div class="classList">
20
+            工作日班次:
21
+            <nz-select class="select" [nzDropdownMatchSelectWidth]="false" nzAllowClear [(ngModel)]="dataInfo.workdayClassId"
22
+              nzPlaceHolder="请选择工作日班次" nzServerSearch>
23
+              <ng-container *ngFor="let data of classList2">
24
+                <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
25
+              </ng-container>
26
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
27
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
28
+              </nz-option>
29
+            </nz-select>
30
+          </div>
31
+        </div>
32
+      </overlay-scrollbars>
33
+      <div class="contentBtns">
34
+        <button nz-button nzType="primary" (click)="submitMessageForm()">确定</button>
35
+      </div>
36
+    </div>
37
+  </div>
38
+</div>
39
+
40
+<!-- 操作成功/失败提示框 -->
41
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
42
+  [info]="promptInfo">
43
+</app-prompt-modal>

+ 142 - 0
src/app/components/configurationCenter/configuration-callcenter/configuration-callcenter.component.less

@@ -0,0 +1,142 @@
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: 40px 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
+        }
52
+      }
53
+    }
54
+    .contentItem{
55
+      padding: 4px 16px;
56
+      cursor: pointer;
57
+      overflow: hidden;
58
+      text-overflow: ellipsis;
59
+      white-space: nowrap;
60
+      &.active{
61
+        color: @primary-color;
62
+        background-color: #F0F6ED;
63
+        border-radius: 4px;
64
+      }
65
+    }
66
+    .contentInner{
67
+      flex: 1;
68
+      display: flex;
69
+      flex-direction: column;
70
+      align-items: center;
71
+      padding: 0 16px;
72
+      gap: 32px;
73
+      .contentHead{
74
+        height: 45px;
75
+        display: flex;
76
+        justify-content: space-between;
77
+        align-items: center;
78
+        gap: 16px;
79
+        padding: 0 16px;
80
+        font-size: 16px;
81
+        font-weight: bold;
82
+        border-bottom: 1px solid #D9D9D9;
83
+        .title{
84
+          overflow: hidden;
85
+          text-overflow: ellipsis;
86
+          white-space: nowrap;
87
+        }
88
+        .btns{
89
+          flex-shrink: 0;
90
+        }
91
+      }
92
+      .contentBody{
93
+        padding: 0 8px 16px;
94
+        margin: 4px 0;
95
+        flex: 1;
96
+      }
97
+      .contentBody2{
98
+        flex: 1;
99
+      }
100
+      .address{
101
+        flex: 1;
102
+        height: 100%;
103
+        background: #FFFFFF;
104
+        border: 1px solid #E8EBEF;
105
+        display: flex;
106
+        flex-direction: column;
107
+        width: 0;
108
+      }
109
+      .addressAssign{
110
+        flex: 3;
111
+        height: 100%;
112
+        background: #FFFFFF;
113
+        border: 1px solid #E8EBEF;
114
+        display: flex;
115
+        flex-direction: column;
116
+        width: 0;
117
+      }
118
+      .list-template__searchItem {
119
+        margin-bottom: 16px;
120
+        .label {
121
+          color: #333;
122
+          display: inline-block;
123
+          width: 70px;
124
+          text-align-last: justify;
125
+          text-align: justify;
126
+          &.label--big {
127
+            width: 100px;
128
+          }
129
+        }
130
+        .formItem {
131
+          width: 135px;
132
+        }
133
+      }
134
+    }
135
+    .contentBtns{
136
+      margin-bottom: 16px;
137
+      display: flex;
138
+      justify-content: center;
139
+      align-items: center;
140
+    }
141
+  }
142
+}

+ 115 - 0
src/app/components/configurationCenter/configuration-callcenter/configuration-callcenter.component.ts

@@ -0,0 +1,115 @@
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-callcenter",
9
+  templateUrl: "./configuration-callcenter.component.html",
10
+  styleUrls: ["./configuration-callcenter.component.less"],
11
+})
12
+export class ConfigurationCallcenterComponent 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
+    this.getClassList(1);
27
+    this.getClassList(2);
28
+  }
29
+
30
+  // 新增/编辑表单提交
31
+  btnLoading: boolean = false; //提交按钮loading状态
32
+  dataInfo:any = {};
33
+  submitMessageForm(): void {
34
+    this.btnLoading = true;
35
+    let postData:any = {
36
+      hosId: this.currentHospital.id,
37
+      workdayClassId: this.dataInfo.workdayClassId,
38
+      holidayClassId: this.dataInfo.holidayClassId,
39
+    };
40
+    postData = { ...this.dataInfo, ...postData };
41
+    this.mainService
42
+      .simplePost("addData", "callCenterConfig", postData)
43
+      .subscribe((result) => {
44
+        this.btnLoading = false;
45
+        let msg = "保存";
46
+        if (result.status == 200) {
47
+          this.showPromptModal(msg, true, '');
48
+        } else {
49
+          this.showPromptModal(msg, false, result.msg);
50
+        }
51
+      });
52
+  }
53
+
54
+  // 获取班次
55
+  isLoading:boolean = false;
56
+  classList1: any = [];
57
+  classList2: any = [];
58
+  // type: 1工作日,2节假日
59
+  getClassList(type:number) {
60
+    let postData = {
61
+      idx: 0,
62
+      sum: 9999,
63
+      scheduleClass: {
64
+        hospital: { id: this.currentHospital.id },
65
+        type,
66
+      },
67
+    };
68
+    this.mainService
69
+      .getFetchDataList("simple/data", "scheduleClass", postData)
70
+      .subscribe((data) => {
71
+        this.isLoading = false;
72
+        this['classList' + type] = data.list || [];
73
+      });
74
+  }
75
+
76
+  // 获取列表
77
+  loading1:boolean = false;
78
+  getList() {
79
+    let data = {
80
+      idx: 0,
81
+      sum: 9999,
82
+      callCenterConfig: {
83
+        hosId: this.currentHospital.id,
84
+      },
85
+    };
86
+    this.loading1 = true;
87
+    this.mainService
88
+      .getFetchDataList("simple/data", "callCenterConfig", data)
89
+      .subscribe((data) => {
90
+        this.loading1 = false;
91
+        if (data.status == 200) {
92
+          let list = data.list || [];
93
+          this.dataInfo = list.length ? list[0] : {};
94
+        }else{
95
+          this.message.error(data.msg || "请求数据失败");
96
+        }
97
+      });
98
+  }
99
+
100
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
101
+  promptContent: string; //操作提示框提示信息
102
+  ifSuccess: boolean; //操作成功/失败
103
+  promptInfo: string; //操作结果提示信息
104
+  promptModalShow: boolean; //操作提示框是否展示
105
+  showPromptModal(con, success, promptInfo?) {
106
+    this.promptModalShow = false;
107
+    this.promptContent = con;
108
+    this.ifSuccess = success;
109
+    this.promptInfo = promptInfo;
110
+    setTimeout(() => {
111
+      this.promptModalShow = true;
112
+    }, 100);
113
+    this.getList();
114
+  }
115
+}

+ 35 - 33
src/app/components/configurationCenter/configuration-dictionary/configuration-dictionary.component.html

@@ -12,39 +12,41 @@
12 12
           <div class="name">键</div>
13 13
           <div class="value">值</div>
14 14
         </div>
15
-        <form nz-form [formGroup]="validateDictionaryForm" class="w100">
16
-          <div class="dictionaryRow" *ngFor="let data of dictionaryList;let i = index;">
17
-            <div class="orders">
18
-              <nz-form-item>
19
-                <nz-form-control [nzSpan]="24" nzErrorTip="请输入排序号!">
20
-                  <nz-input-group>
21
-                    <nz-input-number [formControlName]="'orders_' + data.id" class="ordersInput"></nz-input-number>
22
-                  </nz-input-group>
23
-                </nz-form-control>
24
-              </nz-form-item>
15
+        <overlay-scrollbars #osComponentRef2 class="contentBody2">
16
+          <form nz-form [formGroup]="validateDictionaryForm" class="w100">
17
+            <div class="dictionaryRow" *ngFor="let data of dictionaryList;let i = index;">
18
+              <div class="orders">
19
+                <nz-form-item>
20
+                  <nz-form-control [nzSpan]="24" nzErrorTip="请输入排序号!">
21
+                    <nz-input-group>
22
+                      <nz-input-number [formControlName]="'orders_' + data.id" class="ordersInput"></nz-input-number>
23
+                    </nz-input-group>
24
+                  </nz-form-control>
25
+                </nz-form-item>
26
+              </div>
27
+              <div class="name">
28
+                <nz-form-item>
29
+                  <nz-form-control [nzSpan]="24" nzErrorTip="请输入键!">
30
+                    <nz-input-group>
31
+                      <input [formControlName]="'name_' + data.id" nz-input class="nameInput">
32
+                    </nz-input-group>
33
+                  </nz-form-control>
34
+                </nz-form-item>
35
+              </div>
36
+              <div class="value">
37
+                <nz-form-item>
38
+                  <nz-form-control [nzSpan]="24" nzErrorTip="请输入值!">
39
+                    <nz-input-group>
40
+                      <input [formControlName]="'value_' + data.id" nz-input class="valueInput">
41
+                    </nz-input-group>
42
+                  </nz-form-control>
43
+                </nz-form-item>
44
+                <i class="icon_transport transport-tag27fuben ml8" (click)="addField(i)"></i>
45
+                <i class="icon_transport transport-shanchu1 ml8" *ngIf="dictionaryList.length > 1 && !data.system" (click)="removeField(data, i)"></i>
46
+              </div>
25 47
             </div>
26
-            <div class="name">
27
-              <nz-form-item>
28
-                <nz-form-control [nzSpan]="24" nzErrorTip="请输入键!">
29
-                  <nz-input-group>
30
-                    <input [formControlName]="'name_' + data.id" nz-input class="nameInput">
31
-                  </nz-input-group>
32
-                </nz-form-control>
33
-              </nz-form-item>
34
-            </div>
35
-            <div class="value">
36
-              <nz-form-item>
37
-                <nz-form-control [nzSpan]="24" nzErrorTip="请输入值!">
38
-                  <nz-input-group>
39
-                    <input [formControlName]="'value_' + data.id" nz-input class="valueInput">
40
-                  </nz-input-group>
41
-                </nz-form-control>
42
-              </nz-form-item>
43
-              <i class="icon_transport transport-tag27fuben ml8" (click)="addField(i)"></i>
44
-              <i class="icon_transport transport-shanchu1 ml8" *ngIf="dictionaryList.length > 1 && !data.system" (click)="removeField(data, i)"></i>
45
-            </div>
46
-          </div>
47
-        </form>
48
+          </form>
49
+        </overlay-scrollbars>
48 50
       </div>
49 51
       <div class="contentBtns">
50 52
         <button nz-button nzType="primary" class="ml8" (click)="saveDictionary()">保存</button>
@@ -63,4 +65,4 @@
63 65
 (confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
64 66
 
65 67
 <!-- 遮罩 -->
66
-<app-mask *ngIf="maskFlag"></app-mask>
68
+<app-mask *ngIf="maskFlag"></app-mask>

+ 6 - 0
src/app/components/configurationCenter/configuration-dictionary/configuration-dictionary.component.less

@@ -32,6 +32,12 @@
32 32
     }
33 33
     .contentBody{
34 34
       padding: 16px;
35
+      min-height: 0;
36
+      display: flex;
37
+      flex-direction: column;
38
+    }
39
+    .contentBody2{
40
+      flex: 1;
35 41
     }
36 42
     ::ng-deep .ant-form-item{
37 43
       margin-bottom: 0;

+ 5 - 0
src/app/components/configurationCenter/configuration-dictionary/configuration-dictionary.component.ts

@@ -26,6 +26,11 @@ export class ConfigurationDictionaryComponent implements OnInit {
26 26
     static: false,
27 27
   })
28 28
   osComponentRef1: OverlayScrollbarsComponent;
29
+  @ViewChild("osComponentRef2", {
30
+    read: OverlayScrollbarsComponent,
31
+    static: false,
32
+  })
33
+  osComponentRef2: OverlayScrollbarsComponent;
29 34
 
30 35
   ngOnInit() {
31 36
     this.initDictionaryForm();

+ 4 - 4
src/app/views/other-config/other-config.component.html

@@ -8,13 +8,13 @@
8 8
       <button nz-button class="btn default" (click)="goBack()">返回</button>
9 9
     </div>
10 10
   </div>
11
-  <!-- 微信配置 -->
11
+  <!-- 呼叫中心 -->
12 12
   <ng-container *ngIf="activeTagId === 1">
13
-    <app-configuration-wechat></app-configuration-wechat>
13
+    <app-configuration-callcenter></app-configuration-callcenter>
14 14
   </ng-container>
15
-  <!-- 优先级 -->
15
+  <!-- 微信配置 -->
16 16
   <ng-container *ngIf="activeTagId === 2">
17
-    <!-- <app-configuration-priority></app-configuration-priority> -->
17
+    <app-configuration-wechat></app-configuration-wechat>
18 18
   </ng-container>
19 19
   <!-- 数据字典 -->
20 20
   <ng-container *ngIf="activeTagId === 3">

+ 2 - 2
src/app/views/other-config/other-config.component.ts

@@ -13,8 +13,8 @@ export class OtherConfigComponent implements OnInit, AfterViewInit {
13 13
 
14 14
   // tab
15 15
   tagList:any = [
16
-    { id: 1, name: '微信配置',},
17
-    // { id: 2, name: '优先级',},
16
+    { id: 1, name: '呼叫中心',},
17
+    { id: 2, name: '微信配置',},
18 18
     // { id: 3, name: '数据字典',},
19 19
   ];
20 20
 

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

@@ -5,12 +5,14 @@ import { OtherConfigRoutingModule } from './other-config-routing.module';
5 5
 import { OtherConfigComponent } from './other-config.component';
6 6
 import { ShareModule } from 'src/app/share/share.module';
7 7
 import { ConfigurationWechatComponent } from 'src/app/components/configurationCenter/configuration-wechat/configuration-wechat.component';
8
+import { ConfigurationCallcenterComponent } from 'src/app/components/configurationCenter/configuration-callcenter/configuration-callcenter.component';
8 9
 
9 10
 
10 11
 @NgModule({
11 12
   declarations: [
12 13
     OtherConfigComponent,
13 14
     ConfigurationWechatComponent,
15
+    ConfigurationCallcenterComponent,
14 16
   ],
15 17
   imports: [
16 18
     CommonModule,