Browse Source

工单日志等待接口

seimin 1 year ago
parent
commit
2f002f0608

+ 5 - 0
src/app/views/main/main-routing.module.ts

@@ -158,6 +158,11 @@ const routes: Routes = [
158 158
         path: "formManagementDetail/:id/:taskType",
159 159
         loadChildren: () => import("../form-management-detail/form-management-detail.module").then((m) => m.FormManagementDetailModule),
160 160
       },
161
+      // 工单日志列表
162
+      {
163
+        path: "workOrderLog",
164
+        loadChildren: () => import("../work-order-log/work-order-log.module").then((m) => m.WorkOrderLogModule),
165
+      },
161 166
       // 统计分析-综合统计
162 167
       {
163 168
         path: "compreStatistics",

+ 15 - 0
src/app/views/work-order-log/work-order-log-routing.module.ts

@@ -0,0 +1,15 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { WorkOrderLogComponent } from './work-order-log.component';
4
+
5
+
6
+const routes: Routes = [{
7
+  path: '',
8
+  component: WorkOrderLogComponent,
9
+}];
10
+
11
+@NgModule({
12
+  imports: [RouterModule.forChild(routes)],
13
+  exports: [RouterModule]
14
+})
15
+export class WorkOrderLogRoutingModule { }

+ 54 - 0
src/app/views/work-order-log/work-order-log.component.html

@@ -0,0 +1,54 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='6' class="list-template__searchBox">
5
+      </div>
6
+      <div nz-col nzXl='18' class="list-template__btns">
7
+        <button nz-button class="btn default" (click)='search()'>搜索</button>
8
+      </div>
9
+    </div>
10
+    <div class="list-template__bottom">
11
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
12
+        [nzLoading]="loading1">
13
+        <thead>
14
+          <tr class="thead">
15
+            <th nzWidth="10%">工单号</th>
16
+            <th nzWidth="10%">申请科室</th>
17
+            <th nzWidth="10%">操作类型</th>
18
+            <th nzWidth="10%">操作人</th>
19
+            <th nzWidth="10%">交接人</th>
20
+            <th nzWidth="10%">操作时间</th>
21
+            <th nzWidth="20%">备注</th>
22
+            <th nzWidth="10%">图片</th>
23
+            <th nzWidth="10%">操作</th>
24
+          </tr>
25
+        </thead>
26
+        <tbody>
27
+          <tr *ngFor="let data of listOfData;let index=index;">
28
+            <td>{{ data.title }}</td>
29
+            <td>{{ data.taskNames }}</td>
30
+            <td>{{ data.deptNames }}</td>
31
+            <td>{{ data.type?.name }}</td>
32
+            <td>{{ data.type?.name }}</td>
33
+            <td>{{ data.type?.name }}</td>
34
+            <td>{{ data.type?.name }}</td>
35
+            <td>{{ data.type?.name }}</td>
36
+            <td>
37
+              <div class="coop">
38
+                <span (click)="del(data)">查看</span>
39
+              </div>
40
+            </td>
41
+          </tr>
42
+        </tbody>
43
+      </nz-table>
44
+      <div class="list-template__pagination">
45
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
46
+          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
47
+        </nz-pagination>
48
+      </div>
49
+    </div>
50
+  </div>
51
+</div>
52
+
53
+<!-- 遮罩 -->
54
+<app-mask *ngIf="maskFlag"></app-mask>

+ 126 - 0
src/app/views/work-order-log/work-order-log.component.less

@@ -0,0 +1,126 @@
1
+@import "../../../../src/theme.less";
2
+.save {
3
+  position: fixed;
4
+  left: 0;
5
+  top: 0;
6
+  width: 100%;
7
+  height: 100%;
8
+  background: rgba(0, 0, 0, 0.4);
9
+  z-index: 99;
10
+
11
+  .modalBody {
12
+    width: 350px;
13
+    background: #fff;
14
+    border-radius: 5px;
15
+    padding: 10px 20px;
16
+    color: #333;
17
+
18
+    .title {
19
+      width: 100%;
20
+      text-align: center;
21
+      font-size: 18px;
22
+      position: relative;
23
+
24
+      i {
25
+        position: absolute;
26
+        right: 0;
27
+        top: 0;
28
+        font-size: 20px;
29
+        color: #666;
30
+        cursor: pointer;
31
+        padding: 0 5px;
32
+      }
33
+    }
34
+
35
+    .content {
36
+      width: 100%;
37
+      height: 117px;
38
+      background: #f9fafb;
39
+      border: 1px solid #e5e9ed;
40
+      border-radius: 5px;
41
+      overflow: hidden;
42
+      margin-top: 12px;
43
+
44
+      div {
45
+        text-align: center;
46
+        margin: 0;
47
+
48
+        &.icon {
49
+          margin-top: 17px;
50
+
51
+          i {
52
+            color: #34b349;
53
+            font-size: 30px !important;
54
+
55
+            &.transport-wenhao {
56
+              color: #f5a523;
57
+            }
58
+
59
+            &.transport-shibai {
60
+              color: #ff3a52;
61
+            }
62
+          }
63
+        }
64
+
65
+        &.defeat {
66
+          color: #333;
67
+          font-size: 18px;
68
+        }
69
+
70
+        &:nth-child(3) {
71
+          font-size: 14px;
72
+          color: #666;
73
+        }
74
+      }
75
+    }
76
+
77
+    button {
78
+      margin-top: 10px;
79
+
80
+      &.btn {
81
+        margin-left: 8px;
82
+      }
83
+    }
84
+  }
85
+
86
+  // 新增
87
+  &.add {
88
+    .modalBody {
89
+      width: 480px;
90
+      height: auto;
91
+
92
+      .content {
93
+        width: 100%;
94
+        height: auto;
95
+        padding: 19px 14px 0 14px;
96
+        max-height: 500px;
97
+        overflow-y: auto;
98
+
99
+        .addForm {
100
+          .ant-form-item {
101
+            margin-bottom: 8px;
102
+
103
+            .ant-form-item-label {
104
+              line-height: 14px;
105
+              text-align: left;
106
+            }
107
+          }
108
+        }
109
+
110
+        .editForm {
111
+          .ant-form-item {
112
+            margin-bottom: 14px;
113
+
114
+            .ant-form-item-label {
115
+              line-height: 0;
116
+            }
117
+          }
118
+        }
119
+      }
120
+
121
+      button:nth-child(1) {
122
+        margin-right: 20px;
123
+      }
124
+    }
125
+  }
126
+}

+ 67 - 0
src/app/views/work-order-log/work-order-log.component.ts

@@ -0,0 +1,67 @@
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { ActivatedRoute } from "@angular/router";
3
+
4
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5
+import { ToolService } from "../../services/tool.service";
6
+import { WorkOrderLogService } from './work-order-log.service';
7
+
8
+@Component({
9
+  selector: "app-work-order-log",
10
+  templateUrl: "./work-order-log.component.html",
11
+  styleUrls: ["./work-order-log.component.less"],
12
+})
13
+export class WorkOrderLogComponent implements OnInit {
14
+  @ViewChild("osComponentRef1", {
15
+    read: OverlayScrollbarsComponent,
16
+    static: false,
17
+  })
18
+  osComponentRef1: OverlayScrollbarsComponent;
19
+  constructor(
20
+    private route: ActivatedRoute,
21
+    private tool: ToolService,
22
+    private workOrderLogService: WorkOrderLogService,
23
+  ) {}
24
+
25
+  listOfData: any[] = []; //表格数据
26
+
27
+  hosId: any; //院区(搜索)
28
+  pageIndex: number = 1; //页码
29
+  listLength: number = 10; //总条数
30
+  pageSize: number = 10; //每页条数
31
+
32
+  // 初始化增删改按钮
33
+  coopBtns: any = {};
34
+
35
+  ngOnInit() {
36
+    this.coopBtns = this.tool.initCoopBtns(this.route);
37
+    this.hosId = this.tool.getCurrentHospital().id;
38
+    this.getList(true);
39
+  }
40
+
41
+  // 搜索
42
+  search() {
43
+    this.getList(true);
44
+  }
45
+  // 表格数据
46
+  loading1 = false;
47
+  getList(isResetPageIndex = false) {
48
+    isResetPageIndex && (this.pageIndex = 1);
49
+    let data = {
50
+      pageIndex: this.pageIndex,
51
+      pageSize: this.pageSize,
52
+      hosId: this.hosId,
53
+    };
54
+    this.loading1 = true;
55
+    this.workOrderLogService
56
+      .query(data)
57
+      .subscribe((result) => {
58
+        this.loading1 = false;
59
+        result.list = result.list || [];
60
+        result.list.forEach(v => {
61
+          // todo
62
+        })
63
+        this.listOfData = result.list;
64
+        this.listLength = result.totalNum;
65
+      });
66
+  }
67
+}

+ 19 - 0
src/app/views/work-order-log/work-order-log.module.ts

@@ -0,0 +1,19 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { WorkOrderLogRoutingModule } from './work-order-log-routing.module';
5
+import { ShareModule } from 'src/app/share/share.module';
6
+import { WorkOrderLogComponent } from './work-order-log.component';
7
+
8
+
9
+@NgModule({
10
+  declarations: [
11
+    WorkOrderLogComponent,
12
+  ],
13
+  imports: [
14
+    CommonModule,
15
+    WorkOrderLogRoutingModule,
16
+    ShareModule,
17
+  ]
18
+})
19
+export class WorkOrderLogModule { }

+ 47 - 0
src/app/views/work-order-log/work-order-log.service.ts

@@ -0,0 +1,47 @@
1
+import { Injectable } from '@angular/core';
2
+import { MainService } from 'src/app/services/main.service';
3
+import { map } from 'rxjs/operators';
4
+
5
+@Injectable({
6
+  providedIn: 'root'
7
+})
8
+export class WorkOrderLogService {
9
+  constructor(
10
+    private mainService: MainService,
11
+  ) { }
12
+
13
+  // 列表-查
14
+  query({pageIndex, pageSize, hosId}) {
15
+    let data = {
16
+      idx: pageIndex - 1,
17
+      sum: pageSize,
18
+      record: {
19
+        hosId,
20
+      },
21
+    };
22
+    return this.mainService.getFetchDataList("simple/data", "record", data);
23
+  }
24
+
25
+  // 查询科室
26
+  // queryDept({hosId, keywords}){
27
+  //   let postData = {
28
+  //     department: {
29
+  //       simpleQuery: true,
30
+  //       hospital: {id: hosId},
31
+  //       dept: keywords,
32
+  //     },
33
+  //     idx: 0,
34
+  //     sum: 9999,
35
+  //   };
36
+  //   return this.mainService.getFetchDataList("data", "department", postData).pipe(map((v:any) => {
37
+  //     if(Array.isArray(v.list)){
38
+  //       v.list = v.list.map(vv => ({id: vv.id, name: vv.dept}));
39
+  //     }else{
40
+  //       v.list = [];
41
+  //     }
42
+  //     return v;
43
+  //   }));
44
+  // }
45
+}
46
+
47
+