소스 검색

巡检单开发

seimin 9 달 전
부모
커밋
274645ccf0
28개의 변경된 파일2317개의 추가작업 그리고 42개의 파일을 삭제
  1. 1 1
      proxy.conf.json
  2. 5 0
      src/app/app-routing.module.ts
  3. 6 0
      src/app/services/main.service.ts
  4. 6 0
      src/app/services/tool.service.ts
  5. 85 0
      src/app/share/inspection-configuration-item-prompt-modal/inspection-configuration-item-prompt-modal.component.html
  6. 211 0
      src/app/share/inspection-configuration-item-prompt-modal/inspection-configuration-item-prompt-modal.component.less
  7. 191 0
      src/app/share/inspection-configuration-item-prompt-modal/inspection-configuration-item-prompt-modal.component.ts
  8. 3 0
      src/app/share/share.module.ts
  9. 14 0
      src/app/views/inspection-configuration-item/inspection-configuration-item-routing.module.ts
  10. 246 0
      src/app/views/inspection-configuration-item/inspection-configuration-item.component.html
  11. 244 0
      src/app/views/inspection-configuration-item/inspection-configuration-item.component.less
  12. 553 0
      src/app/views/inspection-configuration-item/inspection-configuration-item.component.ts
  13. 19 0
      src/app/views/inspection-configuration-item/inspection-configuration-item.module.ts
  14. 14 0
      src/app/views/inspection-configuration/inspection-configuration-routing.module.ts
  15. 94 0
      src/app/views/inspection-configuration/inspection-configuration.component.html
  16. 173 0
      src/app/views/inspection-configuration/inspection-configuration.component.less
  17. 240 0
      src/app/views/inspection-configuration/inspection-configuration.component.ts
  18. 19 0
      src/app/views/inspection-configuration/inspection-configuration.module.ts
  19. 5 0
      src/app/views/main/main-routing.module.ts
  20. 5 0
      src/app/views/main/main.component.html
  21. 118 26
      src/assets/iconfont/demo_index.html
  22. 23 7
      src/assets/iconfont/iconfont.css
  23. 1 1
      src/assets/iconfont/iconfont.js
  24. 35 7
      src/assets/iconfont/iconfont.json
  25. BIN
      src/assets/iconfont/iconfont.ttf
  26. BIN
      src/assets/iconfont/iconfont.woff
  27. BIN
      src/assets/iconfont/iconfont.woff2
  28. 6 0
      src/common.less

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "/service": {
3
-    "target": "http://192.168.3.108",
3
+    "target": "http://192.168.4.105",
4 4
     "logLevel": "debug",
5 5
     "changeOrigin": true,
6 6
     "pathRewrite": {

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

@@ -83,6 +83,11 @@ const routes: Routes = [
83 83
     path: 'washingBatchView',
84 84
     loadChildren: () => import('./views/washing-batch-view/washing-batch-view.module').then(m => m.WashingBatchViewModule),
85 85
   },
86
+  // 巡检项配置
87
+  {
88
+    path: "inspectionConfigurationItem",
89
+    loadChildren: () => import("./views/inspection-configuration-item/inspection-configuration-item.module").then((m) => m.InspectionConfigurationItemModule),
90
+  },
86 91
   // 管理端首页
87 92
   {
88 93
     path: '**',

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

@@ -805,4 +805,10 @@ export class MainService {
805 805
       responseType: "arraybuffer",
806 806
     });
807 807
   }
808
+  // 巡检相关接口
809
+  inspectionPost(type, data): any {
810
+    return this.http.post(host.host + "/inspection/" + type, data, {
811
+      headers: this.headers,
812
+    });
813
+  }
808 814
 }

+ 6 - 0
src/app/services/tool.service.ts

@@ -158,6 +158,12 @@ export class ToolService {
158 158
         case "editNum":
159 159
           coopBtns.editNum = true; //矫正重量
160 160
           break;
161
+        case "config":
162
+          coopBtns.config = true; //配置
163
+          break;
164
+        case "publish":
165
+          coopBtns.publish = true; //发布
166
+          break;
161 167
       }
162 168
     });
163 169
     console.log(coopBtns);

+ 85 - 0
src/app/share/inspection-configuration-item-prompt-modal/inspection-configuration-item-prompt-modal.component.html

@@ -0,0 +1,85 @@
1
+<div class="modal display_flex justify-content_flex-center align-items_center" *ngIf="show">
2
+  <div class="modalBody">
3
+    <div class="title">
4
+      选择项配置
5
+      <button class="add" nz-button nzType="primary" nzGhost (click)="addField()">
6
+        添加
7
+      </button>
8
+      <i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
9
+    </div>
10
+    <div class="content">
11
+      <form nz-form [formGroup]="validateForm" class="w100">
12
+        <nz-table class="hospitalTable" [nzData]="historySpecimenList" nzSize="middle" [nzShowPagination]="false"
13
+          [nzLoading]="hsLoading">
14
+          <thead>
15
+            <tr class="thead">
16
+              <th nzWidth="30%">选项名称</th>
17
+              <th nzWidth="10%">排序号</th>
18
+              <th nzWidth="15%">默认选中</th>
19
+              <th nzWidth="30%">异常标记</th>
20
+              <th nzWidth="15%">操作</th>
21
+            </tr>
22
+          </thead>
23
+          <tbody>
24
+            <tr *ngFor="let data of historySpecimenList;let i = index;">
25
+              <td>
26
+                <nz-form-item>
27
+                  <nz-form-control [nzSpan]="24" nzErrorTip="请输入选项名称!">
28
+                    <nz-input-group>
29
+                      <input [formControlName]="'name_' + i" nz-input placeholder="请输入选项名称">
30
+                    </nz-input-group>
31
+                  </nz-form-control>
32
+                </nz-form-item>
33
+              </td>
34
+              <td>
35
+                <nz-form-item>
36
+                  <nz-form-control [nzSpan]="24" nzErrorTip="请输入排序号!">
37
+                    <nz-input-group>
38
+                      <nz-input-number [formControlName]="'orders_' + i" nzPlaceHolder="排序号"></nz-input-number>
39
+                    </nz-input-group>
40
+                  </nz-form-control>
41
+                </nz-form-item>
42
+              </td>
43
+              <td>
44
+                <nz-form-item>
45
+                  <nz-form-control [nzSpan]="24">
46
+                    <label nz-checkbox [formControlName]="'checkDefault_' + i"></label>
47
+                  </nz-form-control>
48
+                </nz-form-item>
49
+              </td>
50
+              <td>
51
+                <nz-form-item>
52
+                  <nz-form-control [nzSpan]="24" nzErrorTip="请选择异常标记!">
53
+                    <nz-radio-group [formControlName]="'exception_' + i">
54
+                      <label style="width: 130px;text-align: left;" nz-radio [nzValue]="1">选中标记异常</label>
55
+                      <label nz-radio [nzValue]="0">未选中标记异常</label>
56
+                    </nz-radio-group>
57
+                  </nz-form-control>
58
+                </nz-form-item>
59
+              </td>
60
+              <td>
61
+                <div class="coop">
62
+                  <span (click)="removeField(data, i)">删除</span>
63
+                </div>
64
+              </td>
65
+            </tr>
66
+          </tbody>
67
+        </nz-table>
68
+      </form>
69
+      <!-- <div class="pagination">
70
+        <nz-pagination [(nzPageIndex)]="historySpecimenPageIndex" [(nzTotal)]="historySpecimenListLength"
71
+          [(nzPageSize)]="historySpecimenPageSize" (nzPageIndexChange)="getList()"
72
+          (nzPageSizeChange)="getList()">
73
+        </nz-pagination>
74
+      </div> -->
75
+    </div>
76
+    <div class="display_flex justify-content_flex-center">
77
+      <button class="btn know" [nzLoading]="btnLoading" nz-button nzType="primary" (click)="submitForm()">
78
+        批量保存
79
+      </button>
80
+      <button class="btn know" nz-button nzType="primary" nzGhost (click)="hideModal()">
81
+        取消
82
+      </button>
83
+    </div>
84
+  </div>
85
+</div>

+ 211 - 0
src/app/share/inspection-configuration-item-prompt-modal/inspection-configuration-item-prompt-modal.component.less

@@ -0,0 +1,211 @@
1
+@import "../../../../src/theme.less";
2
+.modal {
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: 999;
10
+  ::ng-deep .ant-form-item{
11
+    margin-bottom: 0;
12
+  }
13
+  ::ng-deep .ant-radio-group{
14
+    line-height: normal;
15
+  }
16
+  ::ng-deep .ant-form-item-control{
17
+    line-height: normal;
18
+  }
19
+  ::ng-deep .ant-input-number-input{
20
+    text-align: center;
21
+  }
22
+  .hospitalTable {
23
+    width: 100%;
24
+    .coop {
25
+      button{
26
+        color: #333;
27
+      }
28
+      span,button {
29
+        display: inline-block;
30
+        padding: 0 8px;
31
+        cursor: pointer;
32
+        position: relative;
33
+
34
+        &::after {
35
+          content: "|";
36
+          position: absolute;
37
+          top: 0;
38
+          right: 0;
39
+        }
40
+
41
+        &:hover,
42
+        &:active {
43
+          color: @primary-color;
44
+        }
45
+
46
+        &:nth-last-child(1) {
47
+          &::after {
48
+            content: "";
49
+          }
50
+        }
51
+      }
52
+    }
53
+    td {
54
+      text-align: center !important;
55
+    }
56
+    .thead {
57
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
58
+      th {
59
+        text-align: center !important;
60
+        color: #fff;
61
+        background: transparent;
62
+      }
63
+    }
64
+  }
65
+
66
+  .modalBody {
67
+    width: 784px;
68
+    min-height: 220px;
69
+    background: #fff;
70
+    border-radius: 5px;
71
+    padding: 10px 20px;
72
+    color: #333;
73
+    &.modalBody-search {
74
+      width: 480px;
75
+      min-height: 250px;
76
+    }
77
+
78
+    .title {
79
+      width: 100%;
80
+      text-align: center;
81
+      font-size: 18px;
82
+      position: relative;
83
+
84
+      .add{
85
+        margin-top: 0;
86
+        position: absolute;
87
+        right: 46px;
88
+        top: 0;
89
+      }
90
+
91
+      i {
92
+        position: absolute;
93
+        right: 0;
94
+        top: 0;
95
+        font-size: 20px;
96
+        color: #666;
97
+        cursor: pointer;
98
+        padding: 0 5px;
99
+      }
100
+    }
101
+
102
+    .content {
103
+      min-height: 117px;
104
+      background: #f9fafb;
105
+      border: 1px solid #e5e9ed;
106
+      border-radius: 5px;
107
+      overflow: hidden;
108
+      margin-top: 12px;
109
+      display: flex;
110
+      flex-direction: column;
111
+      justify-content: center;
112
+      align-items: center;
113
+      &.content-search {
114
+        min-height: 147px;
115
+        justify-content: start;
116
+        .defeat-search {
117
+          width: 100%;
118
+          height: 52px;
119
+          display: flex;
120
+          justify-content: center;
121
+          align-items: center;
122
+          border-bottom: solid 1px #e5e9ed;
123
+          em {
124
+            color: #666;
125
+            font-style: normal;
126
+          }
127
+        }
128
+        .form {
129
+          width: 100%;
130
+          padding: 0 16px;
131
+          .ant-form-item-label,
132
+          .ant-form-explain {
133
+            text-align: left !important;
134
+          }
135
+        }
136
+      }
137
+
138
+      div {
139
+        text-align: center;
140
+        margin: 0;
141
+
142
+        &.defeat {
143
+          color: #333;
144
+          font-size: 28px;
145
+        }
146
+        &.countDown {
147
+          font-size: 14px;
148
+          color: 666;
149
+          em {
150
+            font-style: normal;
151
+            color: @primary-color;
152
+          }
153
+        }
154
+
155
+        &:nth-child(3) {
156
+          font-size: 14px;
157
+          color: #666;
158
+          padding-bottom: 10px;
159
+        }
160
+      }
161
+    }
162
+
163
+    button {
164
+      margin-top: 10px;
165
+
166
+      &.btn {
167
+        margin-left: 8px;
168
+      }
169
+    }
170
+  }
171
+
172
+  // 新增
173
+  &.add {
174
+    .modalBody {
175
+      width: 480px;
176
+      height: auto;
177
+
178
+      .content {
179
+        width: 100%;
180
+        height: auto;
181
+        padding: 18px 14px 0 14px;
182
+
183
+        .addForm {
184
+          .ant-form-item {
185
+            margin-bottom: 15px;
186
+
187
+            .ant-form-item-label {
188
+              line-height: 0;
189
+            }
190
+          }
191
+        }
192
+
193
+        .editForm {
194
+          .ant-form-item {
195
+            margin-bottom: 15px;
196
+
197
+            .ant-form-item-label {
198
+              line-height: 0;
199
+            }
200
+          }
201
+        }
202
+      }
203
+
204
+      button {
205
+        &:nth-child(1) {
206
+          margin-right: 20px;
207
+        }
208
+      }
209
+    }
210
+  }
211
+}

+ 191 - 0
src/app/share/inspection-configuration-item-prompt-modal/inspection-configuration-item-prompt-modal.component.ts

@@ -0,0 +1,191 @@
1
+import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2
+import { MainService } from '../../services/main.service';
3
+import { ToolService } from 'src/app/services/tool.service';
4
+import { FormGroup, Validators, FormBuilder, FormControl } from '@angular/forms';
5
+import { NzMessageService } from 'ng-zorro-antd';
6
+import countBy from 'lodash-es/countBy';
7
+
8
+@Component({
9
+  selector: 'app-inspection-configuration-item-prompt-modal',
10
+  templateUrl: './inspection-configuration-item-prompt-modal.component.html',
11
+  styleUrls: ['./inspection-configuration-item-prompt-modal.component.less']
12
+})
13
+export class InspectionConfigurationItemPromptModalComponent implements OnInit {
14
+  // 切换科室,切换弹窗
15
+  hsLoading = false;
16
+  historySpecimenList: any = [];
17
+  historySpecimenPageIndex: number = 1;//表格当前页码
18
+  historySpecimenPageSize: number = 9999;//表格每页展示条数
19
+  historySpecimenListLength: number = 10;//表格总数据量
20
+
21
+  currentHospital; //当前院区
22
+  validateForm: FormGroup; //新增/编辑表单
23
+  @Input() show: Boolean;
24
+  @Input() coopData: any;
25
+
26
+  @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
27
+  @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
28
+
29
+  constructor(
30
+    private mainService: MainService,
31
+    private tool: ToolService,
32
+    private fb: FormBuilder,
33
+    private message: NzMessageService,
34
+  ) { }
35
+
36
+  ngOnInit() {
37
+    this.initForm();
38
+    this.currentHospital = this.tool.getCurrentHospital();
39
+    this.getList();
40
+  }
41
+
42
+  // 初始化新增form表单
43
+  initForm() {
44
+    this.validateForm = this.fb.group({
45
+      // name: [null, [Validators.required]],//选项名称
46
+      // orders: [null, [Validators.required]],//排序号
47
+      // checkDefault: [false],//是否默认选中
48
+      // exception: [null, [Validators.required]],//异常标记
49
+    });
50
+    console.log(this.validateForm.controls)
51
+  }
52
+
53
+  // 添加表单提交
54
+  btnLoading: boolean = false; //提交按钮loading状态
55
+  submitForm(): void {
56
+    console.log(this.coopData)
57
+    for (const i in this.validateForm.controls) {
58
+      this.validateForm.controls[i].markAsDirty();
59
+      this.validateForm.controls[i].updateValueAndValidity();
60
+    }
61
+    if (this.validateForm.invalid) {
62
+      return;
63
+    }
64
+    if(Object.keys(this.validateForm.value).length === 0){
65
+      this.message.warning('请至少填写一个选择项');
66
+      return;
67
+    }
68
+    console.log(this.validateForm.value);
69
+    let postData:any = {};
70
+
71
+    //增加
72
+    postData = {
73
+      itemId: this.coopData.id,
74
+      configList: [],
75
+    };
76
+    const configNum = Object.keys(this.validateForm.value).length / 4;
77
+    for (let i = 0; i < configNum; i++) {
78
+      postData.configList.push({
79
+        name: this.validateForm.value['name_' + i],
80
+        valuex: this.validateForm.value['name_' + i],
81
+        orders: this.validateForm.value['orders_' + i],
82
+        checkDefault: this.validateForm.value['checkDefault_' + i] ? 1 : 0,
83
+        checkException: this.validateForm.value['exception_' + i],
84
+        uncheckException: this.validateForm.value['exception_' + i] === 1 ? 0 : 1,
85
+      })
86
+    }
87
+    // 下拉框只允许勾选一个默认选中
88
+    if((this.coopData.type.value === '1' || this.coopData.type.value === '2') && countBy(postData.configList, 'checkDefault')[1] > 1){
89
+      this.message.warning(`${this.coopData.type.name}只允许勾选一个默认选中`);
90
+      return;
91
+    }
92
+    console.log(postData);
93
+    this.btnLoading = true;
94
+    this.mainService
95
+      .inspectionPost("bindFormItem", postData)
96
+      .subscribe((result) => {
97
+        this.btnLoading = false;
98
+        if (result.status == 200) {
99
+          this.hideModal();
100
+          this.initForm();
101
+          this.message.success('批量保存成功');
102
+          this.confirmModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
103
+        } else {
104
+          this.message.error(result.msg || '批量保存失败');
105
+        }
106
+      });
107
+  }
108
+
109
+  // 关闭弹窗
110
+  hideModal() {
111
+    this.closeModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
112
+  }
113
+
114
+  // 添加
115
+  addField(): void {
116
+    let obj = {
117
+      name: null,
118
+      orders: null,
119
+      checkDefault: false,
120
+      exception: null,
121
+    };
122
+
123
+    // 动态添加表单
124
+    for (const key in obj) {
125
+      console.log(key + '_' + this.historySpecimenList.length)
126
+      if(key === 'checkDefault'){
127
+        this.validateForm.addControl(key + '_' + this.historySpecimenList.length, new FormControl(false))
128
+      }else{
129
+        this.validateForm.addControl(key + '_' + this.historySpecimenList.length, new FormControl(null, [Validators.required]))
130
+      }
131
+    }
132
+
133
+    this.historySpecimenList = [
134
+      ...this.historySpecimenList,
135
+      obj,
136
+    ]
137
+  }
138
+
139
+  // 删除
140
+  removeField(obj, i:number): void {
141
+    console.log(i);
142
+    this.historySpecimenList.splice(i, 1);
143
+    this.historySpecimenList = [...this.historySpecimenList];
144
+    // 动态删除表单
145
+    for (const key in obj) {
146
+      this.validateForm.removeControl(key + '_' + i);
147
+    }
148
+  }
149
+
150
+  // 获取列表数据
151
+  getList(idx?) {
152
+    if (idx) {
153
+      this.historySpecimenPageIndex = 1;
154
+    }
155
+    let postData = {
156
+      idx: this.historySpecimenPageIndex - 1,
157
+      sum: this.historySpecimenPageSize,
158
+      inspectionFormItemConfig: {
159
+        itemId: this.coopData.id,
160
+        hosId: this.currentHospital.id,
161
+      }
162
+    }
163
+    this.hsLoading = true;
164
+    this.mainService.getFetchDataList('simple/data','inspectionFormItemConfig',postData).subscribe(data => {
165
+      this.hsLoading = false;
166
+      let list = data.list || [];
167
+      this.historySpecimenList = list.map(v => {
168
+        return {
169
+          name: v.name || null,
170
+          orders: v.orders || null,
171
+          checkDefault: v.checkDefault || false,
172
+          exception: v.checkException === 1 ? 1 : (v.uncheckException === 1 ? 0 : null),
173
+        }
174
+      });
175
+      console.log(this.historySpecimenList);
176
+      // 动态添加表单
177
+      this.historySpecimenList.forEach((obj, i) => {
178
+        for (const key in obj) {
179
+          if(key === 'checkDefault'){
180
+            this.validateForm.addControl(key + '_' + i, new FormControl(obj[key]))
181
+          }else{
182
+            this.validateForm.addControl(key + '_' + i, new FormControl(obj[key], [Validators.required]))
183
+          }
184
+        }
185
+      })
186
+      this.historySpecimenListLength = data.totalNum || 0;
187
+    })
188
+  }
189
+}
190
+
191
+

+ 3 - 0
src/app/share/share.module.ts

@@ -10,6 +10,7 @@ import { PromptModalComponent } from './prompt-modal/prompt-modal.component';
10 10
 import { ReplicationSchemeComponent } from './replication-scheme/replication-scheme.component';
11 11
 import { HsPromptModalComponent } from './hs-prompt-modal/hs-prompt-modal.component';
12 12
 import { HistoryPromptModalComponent } from './history-prompt-modal/history-prompt-modal.component';
13
+import { InspectionConfigurationItemPromptModalComponent } from './inspection-configuration-item-prompt-modal/inspection-configuration-item-prompt-modal.component';
13 14
 import { DetailSampleComponent } from './detail-sample/detail-sample.component';
14 15
 import { DetailPatientsComponent } from './detail-patients/detail-patients.component';
15 16
 import { DetailDrugComponent } from './detail-drug/detail-drug.component';
@@ -59,6 +60,7 @@ import { OutgoingRecordDetailComponent } from './outgoing-record-detail/outgoing
59 60
     ReplicationSchemeComponent,
60 61
     HsPromptModalComponent,
61 62
     HistoryPromptModalComponent,
63
+    InspectionConfigurationItemPromptModalComponent,
62 64
     BusinessDataDetailModalComponent,
63 65
     RelationTransDetailModalComponent,
64 66
     BxPromptModalComponent,
@@ -112,6 +114,7 @@ import { OutgoingRecordDetailComponent } from './outgoing-record-detail/outgoing
112 114
     ReplicationSchemeComponent,
113 115
     HsPromptModalComponent,
114 116
     HistoryPromptModalComponent,
117
+    InspectionConfigurationItemPromptModalComponent,
115 118
     BusinessDataDetailModalComponent,
116 119
     RelationTransDetailModalComponent,
117 120
     BxPromptModalComponent,

+ 14 - 0
src/app/views/inspection-configuration-item/inspection-configuration-item-routing.module.ts

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

+ 246 - 0
src/app/views/inspection-configuration-item/inspection-configuration-item.component.html

@@ -0,0 +1,246 @@
1
+<div class="inspectionConfigurationItem">
2
+  <div class="list-template inspectionConfigurationItemTable">
3
+    <div class="list-template__content">
4
+      <div class="list-template__bottom">
5
+        <div class="list-template__top" nz-row>
6
+          <div nz-col nzXl='18' class="list-template__searchBox">
7
+            <button nz-button class="btn default" (click)="goBack()">返回</button>
8
+          </div>
9
+          <div nz-col nzLg="6" class="list-template__btns">
10
+            <button nz-button class="btn default" (click)="addModal()">新增巡检项</button>
11
+          </div>
12
+        </div>
13
+        <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
14
+          [nzLoading]="loading1"  [nzScroll]="{ y: tableHeight + 'px' }">
15
+          <thead>
16
+            <tr class="thead">
17
+              <th nzWidth="13%">巡检项</th>
18
+              <th nzWidth="13%">是否必填</th>
19
+              <th nzWidth="13%">默认值</th>
20
+              <th nzWidth="13%">排序号</th>
21
+              <th nzWidth="13%">填写方式</th>
22
+              <th nzWidth="13%">异常显示</th>
23
+              <th nzWidth="22%">操作</th>
24
+            </tr>
25
+          </thead>
26
+          <tbody>
27
+            <tr *ngFor="let data of listOfData;let i = index">
28
+              <td>{{data.name}}</td>
29
+              <td>{{data.required === 1 ? '是' : (data.required === 0 ? '否' : '')}}</td>
30
+              <td>{{data.defaultValue}}</td>
31
+              <td>{{data.orders}}</td>
32
+              <td>{{data.type?.name}}</td>
33
+              <td>{{data.showError === 1 ? '是' : (data.showError === 0 ? '否' : '')}}</td>
34
+              <td>
35
+                <div class="coop">
36
+                  <span (click)="showDelModal(data,'您确认要删除吗?','删除','del')">删除</span>
37
+                  <span (click)="edit(data)">编辑</span>
38
+                  <span (click)="showModelInspectionConfigurationItem(data)" *ngIf="data.type.value === '1' || data.type.value === '2' || data.type.value === '3'">选择项配置</span>
39
+                  <span (click)="showDelModal(data,'您确认要隐藏吗?','隐藏','hidden')" *ngIf="inspectionConfigurationDetail.status.value === '1' && data.display === 1">隐藏</span>
40
+                  <span (click)="showDelModal(data,'您确认要显示吗?','显示','show')" *ngIf="inspectionConfigurationDetail.status.value === '1' && data.display === 0">显示</span>
41
+                </div>
42
+              </td>
43
+            </tr>
44
+          </tbody>
45
+        </nz-table>
46
+      </div>
47
+    </div>
48
+
49
+    <!-- 新增/编辑巡检项模态框 -->
50
+    <div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="modal">
51
+      <div class="modalBody">
52
+        <div class="title">{{modelName}}巡检项<i class="icon_transport transport-guanbi" (click)="hideAddModal()"></i></div>
53
+        <div class="content">
54
+          <form nz-form [formGroup]="validateForm" class="addForm">
55
+            <nz-form-item>
56
+              <nz-form-label [nzSpan]="6" nzRequired nzFor="name">巡检项名称</nz-form-label>
57
+              <nz-form-control [nzSpan]="18" nzErrorTip="请输入巡检项名称!">
58
+                <nz-input-group>
59
+                  <input formControlName="name" nz-input placeholder="请输入巡检项名称">
60
+                </nz-input-group>
61
+              </nz-form-control>
62
+            </nz-form-item>
63
+            <nz-form-item>
64
+              <nz-form-label [nzSpan]="6" nzRequired nzFor="orders">排&nbsp;&nbsp;&nbsp;序&nbsp;&nbsp;&nbsp;号</nz-form-label>
65
+              <nz-form-control [nzSpan]="18" nzErrorTip="请输入排序号!">
66
+                <nz-input-group>
67
+                  <nz-input-number class="w100" formControlName="orders" nzPlaceHolder="请输入排序号" [nzMin]="0" [nzStep]="1" [nzPrecision]="0"></nz-input-number>
68
+                </nz-input-group>
69
+              </nz-form-control>
70
+            </nz-form-item>
71
+            <nz-form-item>
72
+              <nz-form-label [nzSpan]="6" nzRequired nzFor="type">填&nbsp;写&nbsp;方&nbsp;式</nz-form-label>
73
+              <nz-form-control [nzSpan]="18" nzErrorTip="请选择填写方式!">
74
+                <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="type" nzShowSearch
75
+                  nzPlaceHolder="请选择填写方式" nzServerSearch (ngModelChange)="changeType($event)">
76
+                  <ng-container *ngFor="let data of dispatchMethods">
77
+                    <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.value"></nz-option>
78
+                  </ng-container>
79
+                  <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
80
+                    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
81
+                  </nz-option>
82
+                </nz-select>
83
+              </nz-form-control>
84
+            </nz-form-item>
85
+            <nz-form-item *ngIf="validateForm.value.type !== null && validateForm.value.type !== '8'">
86
+              <nz-form-label [nzSpan]="6" nzRequired nzFor="required">是&nbsp;否&nbsp;必&nbsp;填</nz-form-label>
87
+              <nz-form-control [nzSpan]="18" nzErrorTip="请选择是否必填!">
88
+                <nz-radio-group formControlName="required">
89
+                  <label nz-radio [nzValue]="1">是</label>
90
+                  <label nz-radio [nzValue]="0">否</label>
91
+                </nz-radio-group>
92
+              </nz-form-control>
93
+            </nz-form-item>
94
+            <!-- 数值 -->
95
+            <ng-container *ngIf="validateForm.value.type === '4'">
96
+              <nz-form-item>
97
+                <nz-form-label [nzSpan]="6" nzRequired nzFor="checkType">判&nbsp;断&nbsp;形&nbsp;式</nz-form-label>
98
+                <nz-form-control [nzSpan]="18" nzErrorTip="请选择判断形式!">
99
+                  <nz-radio-group formControlName="checkType" (ngModelChange)="changeCheckType($event)">
100
+                    <label nz-radio [nzValue]="1">标准正负值</label>
101
+                    <label nz-radio [nzValue]="2">范围值</label>
102
+                  </nz-radio-group>
103
+                </nz-form-control>
104
+              </nz-form-item>
105
+              <!-- 标准正负值 -->
106
+              <ng-container *ngIf="validateForm.value.checkType == 1">
107
+                <nz-form-item>
108
+                  <nz-form-label [nzSpan]="6" nzRequired nzFor="valuex">标&nbsp;&nbsp;&nbsp;准&nbsp;&nbsp;&nbsp;值</nz-form-label>
109
+                  <nz-form-control [nzSpan]="18" nzErrorTip="请输入标准值!">
110
+                    <nz-input-group>
111
+                      <nz-input-number class="w100" formControlName="valuex" nzPlaceHolder="请输入标准值"></nz-input-number>
112
+                    </nz-input-group>
113
+                  </nz-form-control>
114
+                </nz-form-item>
115
+                <nz-form-item>
116
+                  <nz-form-label [nzSpan]="6" nzRequired nzFor="valueGap">正负范围值</nz-form-label>
117
+                  <nz-form-control [nzSpan]="18" nzErrorTip="请输入正负范围值!">
118
+                    <nz-input-group>
119
+                      <nz-input-number class="w100" formControlName="valueGap" nzPlaceHolder="请输入正负范围值"></nz-input-number>
120
+                    </nz-input-group>
121
+                  </nz-form-control>
122
+                </nz-form-item>
123
+              </ng-container>
124
+              <!-- 范围值 -->
125
+              <ng-container *ngIf="validateForm.value.checkType == 2">
126
+                <div class="form_item_wrap" nz-row>
127
+                  <nz-form-item nz-col [nzSpan]="12">
128
+                    <nz-form-label [nzSpan]="12" nzRequired nzFor="valueLow">范&nbsp;&nbsp;&nbsp;围&nbsp;&nbsp;&nbsp;值</nz-form-label>
129
+                    <nz-form-control [nzSpan]="12" nzErrorTip="请输入最小值!">
130
+                      <nz-input-group>
131
+                        <nz-input-number formControlName="valueLow" nzPlaceHolder="最小值"></nz-input-number>
132
+                      </nz-input-group>
133
+                    </nz-form-control>
134
+                  </nz-form-item>
135
+                  <span nz-col [nzSpan]="2" style="display: flex;padding-top: 10px;justify-content: center;padding-right: 12px;">至</span>
136
+                  <nz-form-item nz-col [nzSpan]="10">
137
+                    <nz-form-label [nzSpan]="10" nzRequired nzFor="valueUp" hidden>范&nbsp;&nbsp;&nbsp;围&nbsp;&nbsp;&nbsp;值</nz-form-label>
138
+                    <nz-form-control [nzSpan]="14" nzErrorTip="请输入最大值!">
139
+                      <nz-input-group>
140
+                        <nz-input-number formControlName="valueUp" nzPlaceHolder="最大值"></nz-input-number>
141
+                      </nz-input-group>
142
+                    </nz-form-control>
143
+                  </nz-form-item>
144
+                </div>
145
+              </ng-container>
146
+              <nz-form-item *ngIf="validateForm.value.checkType !== null">
147
+                <nz-form-label [nzSpan]="6" nzRequired nzFor="defaultValueNumber">默&nbsp;&nbsp;&nbsp;认&nbsp;&nbsp;&nbsp;值</nz-form-label>
148
+                <nz-form-control [nzSpan]="18" nzErrorTip="请输入默认值!">
149
+                  <nz-input-group>
150
+                    <nz-input-number class="w100" formControlName="defaultValueNumber" nzPlaceHolder="请输入默认值"></nz-input-number>
151
+                  </nz-input-group>
152
+                </nz-form-control>
153
+              </nz-form-item>
154
+            </ng-container>
155
+
156
+            <nz-form-item *ngIf="validateForm.value.type === '5' || validateForm.value.type === '6'">
157
+              <nz-form-label [nzSpan]="6" nzRequired nzFor="defaultValueString">默&nbsp;&nbsp;&nbsp;认&nbsp;&nbsp;&nbsp;值</nz-form-label>
158
+              <nz-form-control [nzSpan]="18" nzErrorTip="请输入默认值!">
159
+                <nz-input-group>
160
+                  <input formControlName="defaultValueString" nz-input placeholder="请输入默认值">
161
+                </nz-input-group>
162
+              </nz-form-control>
163
+            </nz-form-item>
164
+            <nz-form-item *ngIf="validateForm.value.type === '5' || validateForm.value.type === '6' || validateForm.value.type === '7'">
165
+              <nz-form-label [nzSpan]="6" nzRequired nzFor="showError">异&nbsp;常&nbsp;显&nbsp;示</nz-form-label>
166
+              <nz-form-control [nzSpan]="18" nzErrorTip="请选择异常显示!">
167
+                <nz-radio-group formControlName="showError">
168
+                  <label nz-radio [nzValue]="1">是</label>
169
+                  <label nz-radio [nzValue]="0">否</label>
170
+                </nz-radio-group>
171
+              </nz-form-control>
172
+            </nz-form-item>
173
+          </form>
174
+        </div>
175
+        <div class=" display_flex justify-content_flex-center">
176
+          <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">确认</button>
177
+          <button class="btn cancel" nz-button nzType="default" (click)="hideAddModal()">取消</button>
178
+        </div>
179
+      </div>
180
+    </div>
181
+    <!-- 新增/编辑巡检项页码模态框 -->
182
+    <div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="pageModal">
183
+      <div class="modalBody">
184
+        <div class="title">{{modelName}}巡检项页码<i class="icon_transport transport-guanbi" (click)="hideAddPageModal()"></i></div>
185
+        <div class="content">
186
+          <form nz-form [formGroup]="validatePageForm" class="addForm">
187
+            <nz-form-item>
188
+              <nz-form-label [nzSpan]="4" nzRequired nzFor="name">标题</nz-form-label>
189
+              <nz-form-control [nzSpan]="20" nzErrorTip="请输入标题!">
190
+                <nz-input-group>
191
+                  <input formControlName="name" nz-input placeholder="请输入标题">
192
+                </nz-input-group>
193
+              </nz-form-control>
194
+            </nz-form-item>
195
+          </form>
196
+        </div>
197
+        <div class=" display_flex justify-content_flex-center">
198
+          <button nzType="primary" nz-button (click)="submitPageForm()" [nzLoading]="btnLoading">确认</button>
199
+          <button class="btn cancel" nz-button nzType="default" (click)="hideAddPageModal()">取消</button>
200
+        </div>
201
+      </div>
202
+    </div>
203
+    <!-- 模态框 -->
204
+    <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
205
+      (confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
206
+  </div>
207
+  <div class="inspectionConfigurationItemPage">
208
+    <div class="inspectionConfigurationItemPageBox">
209
+      <div class="head">
210
+        <button nz-button class="btn default" (click)="addPageModal()">新增</button>
211
+      </div>
212
+      <overlay-scrollbars #osComponentRef1 class="content" [ngStyle]="{height: tableHeight + 46 + 'px'}">
213
+        <div class="contentItem active" [ngClass]="{ active: pageActiveId == data.id }" (click)="clickPage(data)"
214
+          *ngFor="let data of pageList">
215
+          <div class="title">
216
+            <span class="name">标题:</span>
217
+            <span class="value">{{ data.name }}</span>
218
+          </div>
219
+          <div class="contentPage">
220
+            <div class="title">
221
+              <span class="name">页码:</span>
222
+              <span class="value">{{ data.orders }}</span>
223
+            </div>
224
+            <div class="btns">
225
+              <span class="icon_transport transport-weibiaoti2010104" (click)="editPage(data)"></span>
226
+              <span class="icon_transport transport-shanchu1" (click)="showDelModal(data,'您确认要删除吗?','删除','delPage')"></span>
227
+            </div>
228
+          </div>
229
+        </div>
230
+      </overlay-scrollbars>
231
+    </div>
232
+  </div>
233
+</div>
234
+<!-- 操作成功/失败提示框 -->
235
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
236
+  [info]="promptInfo">
237
+</app-prompt-modal>
238
+
239
+<!-- 选择项配置 -->
240
+<app-inspection-configuration-item-prompt-modal
241
+  *ngIf="inspectionConfigurationItemPromptModalShow"
242
+  [show]="inspectionConfigurationItemPromptModalShow"
243
+  [coopData]="coopData"
244
+  (closeModelHs)="closeModelInspectionConfigurationItem($event)"
245
+  (confirmModelHs)="confirmModelInspectionConfigurationItem($event)"
246
+></app-inspection-configuration-item-prompt-modal>

+ 244 - 0
src/app/views/inspection-configuration-item/inspection-configuration-item.component.less

@@ -0,0 +1,244 @@
1
+@import "../../../../src/theme.less";
2
+:host{
3
+  width: 100%;
4
+  padding: 0 8px;
5
+}
6
+
7
+.inspectionConfigurationItem{
8
+  height: 100%;
9
+  width: 100%;
10
+  display: flex;
11
+  justify-content: space-between;
12
+  .inspectionConfigurationItemTable{
13
+    flex: 3;
14
+    .list-template__top{
15
+      padding: 8px 16px;
16
+    }
17
+    .list-template__nzTable{
18
+      padding-top: 0;
19
+      padding-bottom: 16px;
20
+    }
21
+    .list-template__content{
22
+      height: 100%;
23
+    }
24
+    .list-template__bottom{
25
+      height: 100%;
26
+    }
27
+  }
28
+  .inspectionConfigurationItemPage{
29
+    flex: 1;
30
+    height: 100%;
31
+    padding: 8px 0;
32
+    .inspectionConfigurationItemPageBox{
33
+      height: 100%;
34
+      background: #f9fafb;
35
+      border: 1px solid #e5e9ed;
36
+      border-radius: 8px;
37
+      .head{
38
+        padding: 8px 16px;
39
+        display: flex;
40
+        justify-content: flex-end;
41
+        align-items: center;
42
+      }
43
+      .content{
44
+        .contentItem{
45
+          margin: 0 8px 8px;
46
+          padding: 8px;
47
+          background-color: #fff;
48
+          border: 1px solid #F5F5F5;
49
+          font-size: 14px;
50
+          cursor: pointer;
51
+          &.active{
52
+            border: 1px solid #64BD7B;
53
+            background: #E9F7E9;
54
+          }
55
+          .title{
56
+            .value{
57
+              margin-left: 16px;
58
+            }
59
+          }
60
+          .contentPage{
61
+            display: flex;
62
+            justify-content: space-between;
63
+            align-items: center;
64
+            margin-top: 8px;
65
+            .icon_transport{
66
+              font-size: 20px;
67
+              margin-left: 16px;
68
+              color: @primary-color;
69
+            }
70
+          }
71
+        }
72
+      }
73
+    }
74
+  }
75
+  .form_item_wrap{
76
+    display: flex;
77
+  }
78
+}
79
+.save {
80
+  position: fixed;
81
+  left: 0;
82
+  top: 0;
83
+  width: 100%;
84
+  height: 100%;
85
+  background: rgba(0, 0, 0, 0.4);
86
+  z-index: 99;
87
+
88
+  .modalBody {
89
+    width: 350px;
90
+    background: #fff;
91
+    border-radius: 5px;
92
+    padding: 10px 20px;
93
+    color: #333;
94
+
95
+    .title {
96
+      width: 100%;
97
+      text-align: center;
98
+      font-size: 18px;
99
+      position: relative;
100
+
101
+      i {
102
+        position: absolute;
103
+        right: 0;
104
+        top: 0;
105
+        font-size: 20px;
106
+        color: #666;
107
+        cursor: pointer;
108
+        padding: 0 5px;
109
+      }
110
+    }
111
+
112
+    .content {
113
+      width: 310px;
114
+      background: #f9fafb;
115
+      border: 1px solid #e5e9ed;
116
+      border-radius: 5px;
117
+      overflow: hidden;
118
+      margin-top: 12px;
119
+      padding: 16px 0;
120
+
121
+      .busyList{
122
+        display: flex;
123
+        margin-bottom: 8px;
124
+        .busyContent{
125
+          margin-right: 8px;
126
+          flex: 1;
127
+        }
128
+      }
129
+
130
+      & > div {
131
+        text-align: center;
132
+        margin: 0;
133
+
134
+        &.icon {
135
+          // margin-top: 17px;
136
+
137
+          i {
138
+            color: #34b349;
139
+            font-size: 30px !important;
140
+
141
+            &.transport-wenhao {
142
+              color: #f5a523;
143
+            }
144
+
145
+            &.transport-shibai {
146
+              color: #ff3a52;
147
+            }
148
+          }
149
+        }
150
+
151
+        &.defeat {
152
+          color: #333;
153
+          font-size: 14px;
154
+        }
155
+
156
+        &:nth-child(3) {
157
+          font-size: 14px;
158
+          color: #666;
159
+        }
160
+      }
161
+      .workAssignmentTips {
162
+        font-size: 12px;
163
+      }
164
+    }
165
+
166
+    button {
167
+      margin-top: 10px;
168
+
169
+      &.btn {
170
+        margin-left: 8px;
171
+      }
172
+    }
173
+  }
174
+
175
+  // 新增
176
+  &.add {
177
+    .modalBody {
178
+      width: 480px;
179
+      height: auto;
180
+
181
+      .content {
182
+        width: 100%;
183
+        height: auto;
184
+        padding: 16px;
185
+        max-height: 497px;
186
+        overflow-y: auto;
187
+
188
+        .addForm {
189
+          .ant-form-item {
190
+            margin-bottom: 0;
191
+
192
+            .ant-form-item-label {
193
+              text-align: left;
194
+            }
195
+
196
+            .desc {
197
+              margin-top: 5px;
198
+            }
199
+          }
200
+
201
+          .datesControl {
202
+            margin-top: -16px;
203
+
204
+            .ant-form-item-label {
205
+              line-height: 40px;
206
+            }
207
+          }
208
+
209
+          .timer {
210
+            .ant-form-item-label {
211
+              width: 100%;
212
+              text-align: left;
213
+            }
214
+
215
+            .numInp {
216
+              margin-right: 5px;
217
+            }
218
+
219
+            .line {
220
+              margin-right: 5px;
221
+            }
222
+          }
223
+
224
+          .timer2 {
225
+            .ant-form-item-label {
226
+              line-height: 20px;
227
+            }
228
+          }
229
+        }
230
+
231
+        .editForm {
232
+          .ant-form-item {
233
+            margin-bottom: 15px;
234
+
235
+            .ant-form-item-label {
236
+              line-height: 14px;
237
+              text-align: left;
238
+            }
239
+          }
240
+        }
241
+      }
242
+    }
243
+  }
244
+}

+ 553 - 0
src/app/views/inspection-configuration-item/inspection-configuration-item.component.ts

@@ -0,0 +1,553 @@
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+import { FormBuilder, Validators, FormGroup } from "@angular/forms";
4
+
5
+import { MainService } from "../../services/main.service";
6
+import { ToolService } from "../../services/tool.service";
7
+import difference from 'lodash-es/difference'
8
+import { OverlayScrollbarsComponent } from 'overlayscrollbars-ngx';
9
+import { NzMessageService } from 'ng-zorro-antd';
10
+@Component({
11
+  selector: "app-inspection-configuration-item",
12
+  templateUrl: "./inspection-configuration-item.component.html",
13
+  styleUrls: ["./inspection-configuration-item.component.less"],
14
+})
15
+export class InspectionConfigurationItemComponent implements OnInit {
16
+  @ViewChild("osComponentRef1", {
17
+    read: OverlayScrollbarsComponent,
18
+    static: false,
19
+  })
20
+  osComponentRef1: OverlayScrollbarsComponent;
21
+  constructor(
22
+    private fb: FormBuilder,
23
+    private mainService: MainService,
24
+    private route: ActivatedRoute,
25
+    private router: Router,
26
+    private tool: ToolService,
27
+    private message: NzMessageService,
28
+  ) {}
29
+
30
+  listOfData: any[] = []; //表格数据
31
+  pageIndex: number = 1; //表格当前页码
32
+  pageSize: number = 10; //表格每页展示条数
33
+  listLength: number = 10; //表格总数据量
34
+  modal: boolean = false; //新增/编辑模态框
35
+  add: boolean; //true:新增;false:编辑
36
+  validateForm: FormGroup; //新增/编辑表单
37
+  coopData: any = {}; //当前操作列
38
+  currentHospital; //当前院区
39
+
40
+  btnLoading: boolean = false; //提交按钮loading状态
41
+
42
+  promptContent: string; //操作提示框提示信息
43
+  ifSuccess: boolean; //操作成功/失败
44
+  promptInfo: string; //操作结果提示信息
45
+  promptModalShow: boolean; //操作提示框是否展示
46
+  nextSchemeName = ""; //下一个开启的方案名称
47
+  modelName = ""; //模态框名称
48
+  tableHeight:number = 0;
49
+
50
+  ngOnInit() {
51
+    this.tableHeight = document.body.clientHeight - 128;
52
+    this.currentHospital = this.tool.getCurrentHospital();
53
+    this.coopBtns = this.tool.initCoopBtns(this.route);
54
+    this.getInspectionConfigurationDetail(+this.route.snapshot.paramMap.get("id"))
55
+  }
56
+
57
+  // 初始化增删改按钮
58
+  coopBtns: any = {};
59
+
60
+  // 获取巡检单详情
61
+  inspectionConfigurationDetail:any = {};
62
+  getInspectionConfigurationDetail(id){
63
+    this.mainService.getFetchData('simple/data','inspectionForm', id).subscribe(result => {
64
+      console.log(result);
65
+      this.inspectionConfigurationDetail = result.data || {};
66
+      this.initForm();
67
+      this.initPageForm();
68
+      this.getDispatchMethods();
69
+      this.getPageList();
70
+    })
71
+  }
72
+
73
+  // 表格数据
74
+  loading1 = false;
75
+  getList() {
76
+    let data = {
77
+      idx: 0,
78
+      sum: 9999,
79
+      inspectionFormItem: {
80
+        hosId: this.currentHospital.id,
81
+        pageId: this.pageActiveId,
82
+        formId: +this.route.snapshot.paramMap.get("id"),
83
+      },
84
+    };
85
+    this.loading1 = true;
86
+    this.mainService
87
+      .getFetchDataList("simple/data", "inspectionFormItem", data)
88
+      .subscribe((data) => {
89
+        this.loading1 = false;
90
+        if (data.status == 200) {
91
+          this.listOfData = data.list;
92
+          this.listLength = data.totalNum;
93
+        }else{
94
+          this.message.error(data.msg || "请求数据失败");
95
+        }
96
+      });
97
+  }
98
+
99
+  // 页码数据
100
+  maskFlag: any = false;
101
+  pageList:any[] = [];
102
+  getPageList() {
103
+    let postData = {
104
+      idx: 0,
105
+      sum: 9999,
106
+      inspectionFormPage: {
107
+        hosId: this.currentHospital.id,
108
+      },
109
+    };
110
+    this.maskFlag = this.message.loading("正在加载中..", {
111
+      nzDuration: 0,
112
+    }).messageId;
113
+    this.mainService
114
+      .getFetchDataList("simple/data", "inspectionFormPage", postData)
115
+      .subscribe((data) => {
116
+        this.message.remove(this.maskFlag);
117
+          this.maskFlag = false;
118
+        if (data.status == 200) {
119
+          this.pageList = data.list || [];
120
+          if(!this.pageActiveId && this.pageList.length){
121
+            this.pageActiveId = this.pageList[0].id;
122
+            this.getList();
123
+          }
124
+        }else{
125
+          this.message.error(data.msg || "请求数据失败");
126
+        }
127
+      });
128
+  }
129
+
130
+  // 新增弹框
131
+  addModal() {
132
+    this.modelName = "新增";
133
+    this.add = true; //新增
134
+    this.modal = true;
135
+    this.initForm();
136
+  }
137
+  //关闭新增/编辑弹框
138
+  hideAddModal() {
139
+    this.modal = false;
140
+    this.initForm();
141
+  }
142
+
143
+  // 新增弹框
144
+  pageModal:boolean = false;
145
+  addPageModal() {
146
+    this.modelName = "新增";
147
+    this.add = true; //新增
148
+    this.pageModal = true;
149
+    this.initPageForm();
150
+  }
151
+  //关闭新增/编辑弹框
152
+  hideAddPageModal() {
153
+    this.pageModal = false;
154
+    this.initPageForm();
155
+  }
156
+
157
+  // 初始化新增form表单
158
+  validatePageForm: FormGroup; //新增/编辑表单
159
+  initPageForm() {
160
+    this.validatePageForm = this.fb.group({
161
+      name: [null, [Validators.required, Validators.pattern(/\S/)]],//标题
162
+    });
163
+  }
164
+
165
+  // 返回
166
+  goBack(){
167
+    this.router.navigateByUrl(`/main/inspectionConfiguration`);
168
+  }
169
+
170
+  // 初始化新增form表单
171
+  formArray:string[] = [];
172
+  initForm() {
173
+    this.validateForm = this.fb.group({
174
+      name: [null, [Validators.required]],//巡检项名称
175
+      orders: [null, [Validators.required]],//排序号
176
+      type: [null, [Validators.required]],//填写方式
177
+      valuex: [null],//数值-标准正负值-标准值
178
+      valueGap: [null],//数值-标准正负值-正负范围值
179
+      valueLow: [null],//数值-范围值-最小值
180
+      valueUp: [null],//数值-范围值-最大值
181
+      defaultValueNumber: [null],//数值-默认值
182
+      defaultValueString: [null],//单行/多行-默认值
183
+      required: [null],//是否必填
184
+      checkType: [null],//判断形式
185
+      showError: [null],//异常显示
186
+    });
187
+    console.log(this.validateForm.controls)
188
+    this.formArray = Object.keys(this.validateForm.controls).filter(v => v != 'name' && v != 'orders' && v != 'type');
189
+  }
190
+
191
+  // 动态表单验证
192
+  requiredChange(formItemNames: string[] = []): void {
193
+    // 必填项
194
+    formItemNames.forEach(v => {
195
+      this.validateForm.get(v)!.setValidators(Validators.required);
196
+      this.validateForm.get(v)!.markAsDirty();
197
+      this.validateForm.get(v)!.updateValueAndValidity();
198
+      if(this.validateForm.value.type !== '4'){
199
+        // 除了数值,都要清空
200
+        this.validateForm.controls[v].setValue(null);
201
+      }
202
+    })
203
+
204
+    // 不必填项
205
+    let arr = difference(this.formArray, formItemNames);
206
+    arr.forEach(v => {
207
+      this.validateForm.get(v)!.clearValidators();
208
+      this.validateForm.get(v)!.markAsPristine();
209
+      this.validateForm.get(v)!.updateValueAndValidity();
210
+      this.validateForm.controls[v].setValue(null);
211
+    })
212
+
213
+    console.log(this.validateForm);
214
+  }
215
+
216
+  // 修改填写方式
217
+  changeType(value){
218
+    switch(value){
219
+      case '1':
220
+        this.requiredChange(['required']);
221
+        break;
222
+      case '2':
223
+        this.requiredChange(['required']);
224
+        break;
225
+      case '3':
226
+        this.requiredChange(['required']);
227
+        break;
228
+      case '4':
229
+        this.requiredChange(['required', 'checkType', 'defaultValueNumber']);
230
+        break;
231
+      case '5':
232
+        this.requiredChange(['required', 'defaultValueString', 'showError']);
233
+        break;
234
+      case '6':
235
+        this.requiredChange(['required', 'defaultValueString', 'showError']);
236
+        break;
237
+      case '7':
238
+        this.requiredChange(['required', 'showError']);
239
+        break;
240
+      case '8':
241
+        this.requiredChange();
242
+        break;
243
+    }
244
+  }
245
+
246
+  // 修改判断形式
247
+  changeCheckType(value){
248
+    this.validateForm.controls.defaultValueNumber.setValue(null);
249
+    switch(value){
250
+      case 1:
251
+        this.requiredChange(['required', 'checkType', 'defaultValueNumber', 'valuex', 'valueGap']);
252
+        break;
253
+      case 0:
254
+        this.requiredChange(['required', 'checkType', 'defaultValueNumber', 'valueLow', 'valueUp']);
255
+        break;
256
+    }
257
+  }
258
+
259
+  // 选择项配置
260
+  inspectionConfigurationItemPromptModalShow = false;
261
+  showModelInspectionConfigurationItem(data) {
262
+    this.coopData = data;
263
+    this.inspectionConfigurationItemPromptModalShow = true;
264
+  }
265
+  // 确认选择项配置
266
+  confirmModelInspectionConfigurationItem(e) {
267
+    this.inspectionConfigurationItemPromptModalShow = JSON.parse(e).show;
268
+    this.getList();
269
+  }
270
+  // 关闭选择项配置
271
+  closeModelInspectionConfigurationItem(e) {
272
+    this.inspectionConfigurationItemPromptModalShow = JSON.parse(e).show;
273
+  }
274
+
275
+  //获取填写方式
276
+  isLoading:boolean = false;
277
+  dispatchMethods:any[] = [];
278
+  getDispatchMethods() {
279
+    this.isLoading = true;
280
+    this.mainService.getDictionary("list", "inspection_form_item").subscribe((data) => {
281
+      this.isLoading = false;
282
+      this.dispatchMethods = data || [];
283
+    });
284
+  }
285
+
286
+  // 新增/编辑表单提交
287
+  submitForm(): void {
288
+    for (const i in this.validateForm.controls) {
289
+      this.validateForm.controls[i].markAsDirty();
290
+      this.validateForm.controls[i].updateValueAndValidity();
291
+    }
292
+    if (this.validateForm.invalid) {
293
+      return;
294
+    }
295
+    console.log(this.validateForm.value);
296
+    this.btnLoading = true;
297
+    let postData:any = {};
298
+
299
+    if (this.add) {
300
+      //增加
301
+      postData = {
302
+        name: this.validateForm.value.name,
303
+        valuex: this.validateForm.value.valuex,
304
+        valueGap: this.validateForm.value.valueGap,
305
+        valueLow: this.validateForm.value.valueLow,
306
+        valueUp: this.validateForm.value.valueUp,
307
+        orders: this.validateForm.value.orders,
308
+        defaultValue: this.validateForm.value.defaultValueString || this.validateForm.value.defaultValueNumber,
309
+        required: this.validateForm.value.required,
310
+        checkType: this.validateForm.value.checkType,
311
+        showError: this.validateForm.value.showError,
312
+        type: this.dispatchMethods.find(v => v.value == this.validateForm.value.type),
313
+        hosId: this.currentHospital.id,
314
+        formId: +this.route.snapshot.paramMap.get("id"),
315
+        pageId: this.pageActiveId,
316
+        display: 1,
317
+      };
318
+    } else {
319
+      //编辑
320
+      postData = {
321
+        ...this.coopData,
322
+        ...{
323
+          name: this.validateForm.value.name,
324
+          valuex: this.validateForm.value.valuex,
325
+          valueGap: this.validateForm.value.valueGap,
326
+          valueLow: this.validateForm.value.valueLow,
327
+          valueUp: this.validateForm.value.valueUp,
328
+          orders: this.validateForm.value.orders,
329
+          defaultValue: this.validateForm.value.defaultValueString || this.validateForm.value.defaultValueNumber,
330
+          required: this.validateForm.value.required,
331
+          checkType: this.validateForm.value.checkType,
332
+          showError: this.validateForm.value.showError,
333
+          type: this.dispatchMethods.find(v => v.value == this.validateForm.value.type),
334
+        }
335
+      };
336
+    }
337
+    this.mainService
338
+      .simplePost("addData", "inspectionFormItem", postData)
339
+      .subscribe((result) => {
340
+        this.btnLoading = false;
341
+        this.hideAddModal();
342
+        this.initForm();
343
+        let msg = "";
344
+        if (this.add) {
345
+          msg = "新增";
346
+        } else {
347
+          msg = "修改";
348
+        }
349
+        if (result.status == 200) {
350
+          this.showPromptModal(msg, true, '');
351
+        } else {
352
+          this.showPromptModal(msg, false, result.msg);
353
+        }
354
+      });
355
+  }
356
+
357
+  // 编辑
358
+  edit(data) {
359
+    console.log(data);
360
+    this.modelName = "编辑";
361
+    this.add = false;
362
+    this.modal = true;
363
+    this.coopData = data;
364
+    this.validateForm.controls.name.setValue(data.name);
365
+    this.validateForm.controls.valuex.setValue(data.valuex);
366
+    this.validateForm.controls.valueGap.setValue(data.valueGap);
367
+    this.validateForm.controls.valueLow.setValue(data.valueLow);
368
+    this.validateForm.controls.valueUp.setValue(data.valueUp);
369
+    this.validateForm.controls.orders.setValue(data.orders);
370
+    this.validateForm.controls.required.setValue(data.required);
371
+    this.validateForm.controls.checkType.setValue(data.checkType);
372
+    this.validateForm.controls.showError.setValue(data.showError);
373
+    this.validateForm.controls.type.setValue(data.type.value);
374
+    if(data.type.value === '5' || data.type.value === '6'){
375
+      this.validateForm.controls.defaultValueString.setValue(data.defaultValue);
376
+    }
377
+    if(data.type.value === '4'){
378
+      this.validateForm.controls.defaultValueNumber.setValue(data.defaultValue);
379
+    }
380
+  }
381
+
382
+  // 新增/编辑表单提交-页码
383
+  submitPageForm(): void {
384
+    for (const i in this.validatePageForm.controls) {
385
+      this.validatePageForm.controls[i].markAsDirty();
386
+      this.validatePageForm.controls[i].updateValueAndValidity();
387
+    }
388
+    if (this.validatePageForm.invalid) {
389
+      return;
390
+    }
391
+
392
+    this.btnLoading = true;
393
+    let postData:any = {};
394
+
395
+    if (this.add) {
396
+      //增加
397
+      postData = {
398
+        name: this.validatePageForm.value.name,
399
+        orders: this.pageList.length + 1,
400
+        hosId: this.currentHospital.id,
401
+      };
402
+    } else {
403
+      //编辑
404
+      postData = {
405
+        ...this.coopData,
406
+        ...{
407
+          name: this.validatePageForm.value.name,
408
+        }
409
+      };
410
+    }
411
+    this.mainService
412
+      .simplePost("addData", "inspectionFormPage", postData)
413
+      .subscribe((result) => {
414
+        this.btnLoading = false;
415
+        this.hideAddPageModal();
416
+        this.initPageForm();
417
+        let msg = "";
418
+        if (this.add) {
419
+          msg = "新增";
420
+        } else {
421
+          msg = "修改";
422
+        }
423
+        if (result.status == 200) {
424
+          this.showPromptModal(msg, true, '');
425
+          if(this.add){
426
+            this.pageActiveId = result.data.id;
427
+          }
428
+        } else {
429
+          this.showPromptModal(msg, false, result.msg);
430
+        }
431
+      });
432
+  }
433
+
434
+  // 编辑
435
+  editPage(data) {
436
+    console.log(data);
437
+    this.modelName = "编辑";
438
+    this.add = false;
439
+    this.pageModal = true;
440
+    this.coopData = data;
441
+    this.validatePageForm.controls.name.setValue(data.name); //名称
442
+  }
443
+
444
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
445
+  showPromptModal(con, success, promptInfo?) {
446
+    this.promptModalShow = false;
447
+    this.promptContent = con;
448
+    this.ifSuccess = success;
449
+    this.promptInfo = promptInfo;
450
+    setTimeout(() => {
451
+      this.promptModalShow = true;
452
+    }, 100);
453
+    this.getList();
454
+    this.getPageList();
455
+  }
456
+
457
+  delModal: boolean = false; //删除模态框
458
+  tipsMsg1: string; //提示框信息
459
+  tipsMsg2: string; //操作后信息
460
+  confirmDelType: string; //确认的类型(启用/停用,删除)
461
+  showDelModal(
462
+    data,
463
+    tipsMsg1: string,
464
+    tipsMsg2: string,
465
+    type: string,
466
+  ) {
467
+    this.confirmDelType = type;
468
+    this.delModal = true;
469
+    this.coopData = data;
470
+    this.tipsMsg1 = tipsMsg1;
471
+    this.tipsMsg2 = tipsMsg2;
472
+  }
473
+  // 隐藏删除框
474
+  hideDelModal() {
475
+    this.delModal = false;
476
+  }
477
+  // 确认删除
478
+  confirmDel() {
479
+    this.btnLoading = true;
480
+    if (this.confirmDelType === "del") {
481
+      //删除-巡检项
482
+      this.mainService
483
+        .simplePost("rmvData", "inspectionFormItem", [this.coopData.id])
484
+        .subscribe((data) => {
485
+          this.btnLoading = false;
486
+          this.delModal = false;
487
+          if (data.status == 200) {
488
+            this.showPromptModal(this.tipsMsg2, true, "");
489
+          } else {
490
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
491
+          }
492
+        });
493
+    } else if (this.confirmDelType === "show") {
494
+      //显示-巡检项
495
+      let postData = {
496
+        ...this.coopData,
497
+        ...{
498
+          display: 1,
499
+        }
500
+      }
501
+      this.mainService
502
+        .simplePost("addData", "inspectionFormItem", postData)
503
+        .subscribe((data) => {
504
+          this.btnLoading = false;
505
+          this.delModal = false;
506
+          if (data.status == 200) {
507
+            this.showPromptModal(this.tipsMsg2, true, "");
508
+          } else {
509
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
510
+          }
511
+        });
512
+    } else if (this.confirmDelType === "hidden") {
513
+      //隐藏-巡检项
514
+      let postData = {
515
+        ...this.coopData,
516
+        ...{
517
+          display: 0,
518
+        }
519
+      }
520
+      this.mainService
521
+        .simplePost("addData", "inspectionFormItem", postData)
522
+        .subscribe((data) => {
523
+          this.btnLoading = false;
524
+          this.delModal = false;
525
+          if (data.status == 200) {
526
+            this.showPromptModal(this.tipsMsg2, true, "");
527
+          } else {
528
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
529
+          }
530
+        });
531
+    } else if (this.confirmDelType === "delPage") {
532
+      //删除-页码
533
+      this.mainService
534
+        .simplePost("rmvData", "inspectionFormPage", [this.coopData.id])
535
+        .subscribe((data) => {
536
+          this.btnLoading = false;
537
+          this.delModal = false;
538
+          if (data.status == 200) {
539
+            this.showPromptModal(this.tipsMsg2, true, "");
540
+          } else {
541
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
542
+          }
543
+        });
544
+    }
545
+  }
546
+
547
+  // 点击页码
548
+  pageActiveId;
549
+  clickPage(data) {
550
+    this.pageActiveId = data.id;
551
+    this.getList();
552
+  }
553
+}

+ 19 - 0
src/app/views/inspection-configuration-item/inspection-configuration-item.module.ts

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

+ 14 - 0
src/app/views/inspection-configuration/inspection-configuration-routing.module.ts

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

+ 94 - 0
src/app/views/inspection-configuration/inspection-configuration.component.html

@@ -0,0 +1,94 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='18' class="list-template__searchBox"></div>
5
+      <div nz-col nzLg="6" class="list-template__btns">
6
+        <button nz-button *ngIf="coopBtns.add" class="btn default" (click)="addModal()">新增</button>
7
+      </div>
8
+    </div>
9
+    <div class="list-template__bottom">
10
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
11
+        [nzLoading]="loading1">
12
+        <thead>
13
+          <tr class="thead">
14
+            <th nzWidth="20%">表单名称</th>
15
+            <th nzWidth="20%">是否显示生成维修单</th>
16
+            <th nzWidth="20%">是否自动生成维修单</th>
17
+            <th nzWidth="20%">状态</th>
18
+            <th nzWidth="20%">操作</th>
19
+          </tr>
20
+        </thead>
21
+        <tbody>
22
+          <tr *ngFor="let data of listOfData;let i = index">
23
+            <td>{{data.name}}</td>
24
+            <td>{{data.showOrder ? '是' : '否'}}</td>
25
+            <td>{{data.createOrder ? '是' : '否'}}</td>
26
+            <td>{{data.status.name}}</td>
27
+            <td>
28
+              <div class="coop">
29
+                <span *ngIf="coopBtns.edit" (click)="edit(data)">编辑</span>
30
+                <span *ngIf="coopBtns.publish && data.status.value === '0'" (click)="showDelModal(data,'您确认要发布吗?','发布','publish')">发布</span>
31
+                <span *ngIf="coopBtns.config" (click)="toItem(data)">配置巡检项</span>
32
+                <span *ngIf="coopBtns.del" (click)="showDelModal(data,'删除后您将无法引用此表单,现有关联的计划可继续使用','删除','del')">删除</span>
33
+              </div>
34
+            </td>
35
+          </tr>
36
+        </tbody>
37
+      </nz-table>
38
+      <div class="list-template__pagination">
39
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize"
40
+          (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
41
+        </nz-pagination>
42
+      </div>
43
+    </div>
44
+  </div>
45
+
46
+  <!-- 新增/编辑模态框 -->
47
+  <div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="modal">
48
+    <div class="modalBody">
49
+      <div class="title">{{modelName}}巡检单<i class="icon_transport transport-guanbi" (click)="hideAddModal()"></i></div>
50
+      <div class="content">
51
+        <form nz-form [formGroup]="validateForm" class="addForm">
52
+          <nz-form-item>
53
+            <nz-form-label class="line_height_normal" [nzSpan]="5" nzRequired nzFor="name">表单名称</nz-form-label>
54
+            <nz-form-control [nzSpan]="19" nzErrorTip="请输入表单名称!">
55
+              <nz-input-group>
56
+                <textarea formControlName="name" nz-input
57
+                  placeholder="请输入表单名称"></textarea>
58
+              </nz-input-group>
59
+            </nz-form-control>
60
+          </nz-form-item>
61
+          <nz-form-item>
62
+            <nz-form-label [nzSpan]="9" nzRequired nzFor="showOrder">是否显示生成维修单</nz-form-label>
63
+            <nz-form-control [nzSpan]="15" nzErrorTip="请选择是否显示生成维修单!">
64
+              <nz-radio-group formControlName="showOrder">
65
+                <label nz-radio [nzValue]="1">是</label>
66
+                <label nz-radio [nzValue]="0">否</label>
67
+              </nz-radio-group>
68
+            </nz-form-control>
69
+          </nz-form-item>
70
+          <nz-form-item>
71
+            <nz-form-label [nzSpan]="9" nzRequired nzFor="createOrder">是否自动生成维修单</nz-form-label>
72
+            <nz-form-control [nzSpan]="15" nzErrorTip="请选择是否自动生成维修单!">
73
+              <nz-radio-group formControlName="createOrder">
74
+                <label nz-radio [nzValue]="1">是</label>
75
+                <label nz-radio [nzValue]="0">否</label>
76
+              </nz-radio-group>
77
+            </nz-form-control>
78
+          </nz-form-item>
79
+        </form>
80
+      </div>
81
+      <div class=" display_flex justify-content_flex-center">
82
+        <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">{{add ? '保存并配置' : '保存'}}</button>
83
+        <button class="btn cancel" nz-button nzType="default" (click)="hideAddModal()">取消</button>
84
+      </div>
85
+    </div>
86
+  </div>
87
+  <!-- 模态框 -->
88
+  <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
89
+    (confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
90
+</div>
91
+<!-- 操作成功/失败提示框 -->
92
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
93
+  [info]="promptInfo">
94
+</app-prompt-modal>

+ 173 - 0
src/app/views/inspection-configuration/inspection-configuration.component.less

@@ -0,0 +1,173 @@
1
+@import "../../../../src/theme.less";
2
+
3
+:host {
4
+  ::ng-deep .ant-calendar-picker {
5
+    width: 100% !important;
6
+  }
7
+}
8
+.save {
9
+  position: fixed;
10
+  left: 0;
11
+  top: 0;
12
+  width: 100%;
13
+  height: 100%;
14
+  background: rgba(0, 0, 0, 0.4);
15
+  z-index: 99;
16
+
17
+  .modalBody {
18
+    width: 350px;
19
+    background: #fff;
20
+    border-radius: 5px;
21
+    padding: 10px 20px;
22
+    color: #333;
23
+
24
+    .title {
25
+      width: 100%;
26
+      text-align: center;
27
+      font-size: 18px;
28
+      position: relative;
29
+
30
+      i {
31
+        position: absolute;
32
+        right: 0;
33
+        top: 0;
34
+        font-size: 20px;
35
+        color: #666;
36
+        cursor: pointer;
37
+        padding: 0 5px;
38
+      }
39
+    }
40
+
41
+    .content {
42
+      width: 310px;
43
+      background: #f9fafb;
44
+      border: 1px solid #e5e9ed;
45
+      border-radius: 5px;
46
+      overflow: hidden;
47
+      margin-top: 12px;
48
+      padding: 16px 0;
49
+
50
+      .busyList{
51
+        display: flex;
52
+        margin-bottom: 8px;
53
+        .busyContent{
54
+          margin-right: 8px;
55
+          flex: 1;
56
+        }
57
+      }
58
+
59
+      & > div {
60
+        text-align: center;
61
+        margin: 0;
62
+
63
+        &.icon {
64
+          // margin-top: 17px;
65
+
66
+          i {
67
+            color: #34b349;
68
+            font-size: 30px !important;
69
+
70
+            &.transport-wenhao {
71
+              color: #f5a523;
72
+            }
73
+
74
+            &.transport-shibai {
75
+              color: #ff3a52;
76
+            }
77
+          }
78
+        }
79
+
80
+        &.defeat {
81
+          color: #333;
82
+          font-size: 14px;
83
+        }
84
+
85
+        &:nth-child(3) {
86
+          font-size: 14px;
87
+          color: #666;
88
+        }
89
+      }
90
+      .workAssignmentTips {
91
+        font-size: 12px;
92
+      }
93
+    }
94
+
95
+    button {
96
+      margin-top: 10px;
97
+
98
+      &.btn {
99
+        margin-left: 8px;
100
+      }
101
+    }
102
+  }
103
+
104
+  // 新增
105
+  &.add {
106
+    .modalBody {
107
+      width: 480px;
108
+      height: auto;
109
+
110
+      .content {
111
+        width: 100%;
112
+        height: auto;
113
+        padding: 16px;
114
+        max-height: 497px;
115
+        overflow-y: auto;
116
+
117
+        .addForm {
118
+          .ant-form-item {
119
+            margin-bottom: 0;
120
+
121
+            .ant-form-item-label {
122
+              text-align: left;
123
+            }
124
+
125
+            .desc {
126
+              margin-top: 5px;
127
+            }
128
+          }
129
+
130
+          .datesControl {
131
+            margin-top: -16px;
132
+
133
+            .ant-form-item-label {
134
+              line-height: 40px;
135
+            }
136
+          }
137
+
138
+          .timer {
139
+            .ant-form-item-label {
140
+              width: 100%;
141
+              text-align: left;
142
+            }
143
+
144
+            .numInp {
145
+              margin-right: 5px;
146
+            }
147
+
148
+            .line {
149
+              margin-right: 5px;
150
+            }
151
+          }
152
+
153
+          .timer2 {
154
+            .ant-form-item-label {
155
+              line-height: 20px;
156
+            }
157
+          }
158
+        }
159
+
160
+        .editForm {
161
+          .ant-form-item {
162
+            margin-bottom: 15px;
163
+
164
+            .ant-form-item-label {
165
+              line-height: 14px;
166
+              text-align: left;
167
+            }
168
+          }
169
+        }
170
+      }
171
+    }
172
+  }
173
+}

+ 240 - 0
src/app/views/inspection-configuration/inspection-configuration.component.ts

@@ -0,0 +1,240 @@
1
+import { Component, OnInit } from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+import { FormBuilder, Validators, FormGroup } from "@angular/forms";
4
+
5
+import { MainService } from "../../services/main.service";
6
+import { ToolService } from "../../services/tool.service";
7
+import { NzMessageService } from 'ng-zorro-antd';
8
+@Component({
9
+  selector: "app-inspection-configuration",
10
+  templateUrl: "./inspection-configuration.component.html",
11
+  styleUrls: ["./inspection-configuration.component.less"],
12
+})
13
+export class InspectionConfigurationComponent implements OnInit {
14
+  constructor(
15
+    private fb: FormBuilder,
16
+    private mainService: MainService,
17
+    private route: ActivatedRoute,
18
+    private router: Router,
19
+    private tool: ToolService,
20
+    private message: NzMessageService,
21
+  ) {}
22
+
23
+  listOfData: any[] = []; //表格数据
24
+  pageIndex: number = 1; //表格当前页码
25
+  pageSize: number = 10; //表格每页展示条数
26
+  listLength: number = 10; //表格总数据量
27
+  modal: boolean = false; //新增/编辑模态框
28
+  add: boolean; //true:新增;false:编辑
29
+  validateForm: FormGroup; //新增/编辑表单
30
+  coopData: any; //当前操作列
31
+  currentHospital; //当前院区
32
+
33
+  btnLoading: boolean = false; //提交按钮loading状态
34
+
35
+  promptContent: string; //操作提示框提示信息
36
+  ifSuccess: boolean; //操作成功/失败
37
+  promptInfo: string; //操作结果提示信息
38
+  promptModalShow: boolean; //操作提示框是否展示
39
+  nextSchemeName = ""; //下一个开启的方案名称
40
+  modelName = ""; //模态框名称
41
+
42
+  ngOnInit() {
43
+    this.currentHospital = this.tool.getCurrentHospital();
44
+    this.coopBtns = this.tool.initCoopBtns(this.route);
45
+    this.initForm();
46
+    this.getList(1);
47
+  }
48
+
49
+  // 初始化增删改按钮
50
+  coopBtns: any = {};
51
+
52
+  // 表格数据
53
+  loading1 = false;
54
+  getList(type) {
55
+    if (type == 1) {
56
+      this.pageIndex = 1;
57
+    }
58
+    let data = {
59
+      idx: this.pageIndex - 1,
60
+      sum: this.pageSize,
61
+      inspectionForm: {
62
+        hosId: this.currentHospital.id,
63
+      },
64
+    };
65
+    this.loading1 = true;
66
+    this.mainService
67
+      .getFetchDataList("simple/data", "inspectionForm", data)
68
+      .subscribe((data) => {
69
+        this.loading1 = false;
70
+        if (data.status == 200) {
71
+          this.listOfData = data.list;
72
+          this.listLength = data.totalNum;
73
+        }else{
74
+          this.message.error(data.msg || "请求数据失败");
75
+        }
76
+      });
77
+  }
78
+
79
+  // 新增弹框
80
+  addModal() {
81
+    this.modelName = "新增";
82
+    this.add = true; //新增
83
+    this.modal = true;
84
+    this.initForm();
85
+  }
86
+  //关闭新增/编辑弹框
87
+  hideAddModal() {
88
+    this.modal = false;
89
+    this.initForm();
90
+  }
91
+
92
+  // 初始化新增form表单
93
+  initForm() {
94
+    this.validateForm = this.fb.group({
95
+      name: ['', [Validators.required, Validators.pattern(/\S/)]],
96
+      showOrder: [0, [Validators.required]],
97
+      createOrder: [0, [Validators.required]],
98
+    });
99
+  }
100
+
101
+  // 新增/编辑表单提交
102
+  submitForm(): void {
103
+    for (const i in this.validateForm.controls) {
104
+      this.validateForm.controls[i].markAsDirty();
105
+      this.validateForm.controls[i].updateValueAndValidity();
106
+    }
107
+    if (this.validateForm.invalid) {
108
+      return;
109
+    }
110
+    this.btnLoading = true;
111
+    let data:any = {};
112
+
113
+    if (this.add) {
114
+      //增加
115
+      data = {
116
+        name: this.validateForm.value.name,
117
+        showOrder: this.validateForm.value.showOrder,
118
+        createOrder: this.validateForm.value.createOrder,
119
+        hosId: this.currentHospital.id,
120
+      };
121
+    } else {
122
+      //编辑
123
+      data = {
124
+        ...this.coopData,
125
+        ...{
126
+          name: this.validateForm.value.name,
127
+          showOrder: this.validateForm.value.showOrder,
128
+          createOrder: this.validateForm.value.createOrder,
129
+        }
130
+      };
131
+    }
132
+    this.mainService
133
+      .simplePost("addData", "inspectionForm", data)
134
+      .subscribe((result) => {
135
+        this.btnLoading = false;
136
+        this.hideAddModal();
137
+        this.initForm();
138
+        if (result.status == 200) {
139
+          if (this.add) {
140
+            this.listLength++;
141
+            this.router.navigateByUrl(`/inspectionConfigurationItem/${result.data.id}`);
142
+          } else {
143
+            this.showPromptModal("编辑", true, "");
144
+          }
145
+        } else {
146
+          let msg = "";
147
+          if (this.add) {
148
+            msg = "新增";
149
+          } else {
150
+            msg = "修改";
151
+          }
152
+          this.showPromptModal(msg, false, result.msg);
153
+        }
154
+      });
155
+  }
156
+
157
+  // 编辑
158
+  edit(data) {
159
+    console.log(data);
160
+    this.modelName = "编辑";
161
+    this.add = false;
162
+    this.modal = true;
163
+    this.coopData = data;
164
+    this.validateForm.controls.name.setValue(data.name); //名称
165
+    this.validateForm.controls.showOrder.setValue(data.showOrder);
166
+    this.validateForm.controls.createOrder.setValue(data.createOrder);
167
+  }
168
+
169
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
170
+  showPromptModal(con, success, promptInfo?) {
171
+    this.promptModalShow = false;
172
+    this.promptContent = con;
173
+    this.ifSuccess = success;
174
+    this.promptInfo = promptInfo;
175
+    setTimeout(() => {
176
+      this.promptModalShow = true;
177
+    }, 100);
178
+    this.getList(0);
179
+  }
180
+
181
+  // 跳转到配置项
182
+  toItem(data){
183
+    this.router.navigateByUrl(`/inspectionConfigurationItem/${data.id}`);
184
+  }
185
+
186
+  delModal: boolean = false; //删除模态框
187
+  tipsMsg1: string; //提示框信息
188
+  tipsMsg2: string; //操作后信息
189
+  confirmDelType: string; //确认的类型(启用/停用,删除)
190
+  showDelModal(
191
+    data,
192
+    tipsMsg1: string,
193
+    tipsMsg2: string,
194
+    type: string,
195
+  ) {
196
+    this.confirmDelType = type;
197
+    this.delModal = true;
198
+    this.coopData = data;
199
+    this.tipsMsg1 = tipsMsg1;
200
+    this.tipsMsg2 = tipsMsg2;
201
+  }
202
+  // 隐藏删除框
203
+  hideDelModal() {
204
+    this.delModal = false;
205
+  }
206
+  // 确认删除
207
+  confirmDel() {
208
+    this.btnLoading = true;
209
+    if (this.confirmDelType === "del") {
210
+      //删除
211
+      this.mainService
212
+        .simplePost("rmvData", "inspectionForm", [this.coopData.id])
213
+        .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
+        });
222
+    } else if (this.confirmDelType === "publish") {
223
+      //发布
224
+      let data = {
225
+        formId: this.coopData.id,
226
+      };
227
+      this.mainService
228
+        .inspectionPost("formPublish", data)
229
+        .subscribe((result) => {
230
+          this.btnLoading = false;
231
+          this.delModal = false;
232
+          if (result.status == 200) {
233
+            this.showPromptModal(this.tipsMsg2, true, "");
234
+          } else {
235
+            this.showPromptModal(this.tipsMsg2, false, result.msg);
236
+          }
237
+        });
238
+    }
239
+  }
240
+}

+ 19 - 0
src/app/views/inspection-configuration/inspection-configuration.module.ts

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

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

@@ -503,6 +503,11 @@ const routes: Routes = [
503 503
         path: "medicalWasteTrendAnalysis",
504 504
         loadChildren: () => import("../medical-waste-trend-analysis/medical-waste-trend-analysis.module").then((m) => m.MedicalWasteTrendAnalysisModule),
505 505
       },
506
+      // 巡检单配置
507
+      {
508
+        path: "inspectionConfiguration",
509
+        loadChildren: () => import("../inspection-configuration/inspection-configuration.module").then((m) => m.InspectionConfigurationModule),
510
+      },
506 511
     ],
507 512
   },
508 513
 ];

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 5 - 0
src/app/views/main/main.component.html


+ 118 - 26
src/assets/iconfont/demo_index.html

@@ -55,6 +55,36 @@
55 55
           <ul class="icon_lists dib-box">
56 56
           
57 57
             <li class="dib">
58
+              <span class="icon icon_transport">&#xe644;</span>
59
+                <div class="name">修改</div>
60
+                <div class="code-name">&amp;#xe644;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
64
+              <span class="icon icon_transport">&#xe74b;</span>
65
+                <div class="name">删除</div>
66
+                <div class="code-name">&amp;#xe74b;</div>
67
+              </li>
68
+          
69
+            <li class="dib">
70
+              <span class="icon icon_transport">&#xe627;</span>
71
+                <div class="name">输液</div>
72
+                <div class="code-name">&amp;#xe627;</div>
73
+              </li>
74
+          
75
+            <li class="dib">
76
+              <span class="icon icon_transport">&#xe62c;</span>
77
+                <div class="name">输液</div>
78
+                <div class="code-name">&amp;#xe62c;</div>
79
+              </li>
80
+          
81
+            <li class="dib">
82
+              <span class="icon icon_transport">&#xe6c6;</span>
83
+                <div class="name">巡检</div>
84
+                <div class="code-name">&amp;#xe6c6;</div>
85
+              </li>
86
+          
87
+            <li class="dib">
58 88
               <span class="icon icon_transport">&#xe719;</span>
59 89
                 <div class="name">订单—列表</div>
60 90
                 <div class="code-name">&amp;#xe719;</div>
@@ -667,12 +697,6 @@
667 697
               </li>
668 698
           
669 699
             <li class="dib">
670
-              <span class="icon icon_transport">&#xe635;</span>
671
-                <div class="name">icon_zhengzaijinx</div>
672
-                <div class="code-name">&amp;#xe635;</div>
673
-              </li>
674
-          
675
-            <li class="dib">
676 700
               <span class="icon icon_transport">&#xe662;</span>
677 701
                 <div class="name">xiala02</div>
678 702
                 <div class="code-name">&amp;#xe662;</div>
@@ -720,9 +744,9 @@
720 744
 <pre><code class="language-css"
721 745
 >@font-face {
722 746
   font-family: 'icon_transport';
723
-  src: url('iconfont.woff2?t=1715570700362') format('woff2'),
724
-       url('iconfont.woff?t=1715570700362') format('woff'),
725
-       url('iconfont.ttf?t=1715570700362') format('truetype');
747
+  src: url('iconfont.woff2?t=1718952478641') format('woff2'),
748
+       url('iconfont.woff?t=1718952478641') format('woff'),
749
+       url('iconfont.ttf?t=1718952478641') format('truetype');
726 750
 }
727 751
 </code></pre>
728 752
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -749,6 +773,51 @@
749 773
         <ul class="icon_lists dib-box">
750 774
           
751 775
           <li class="dib">
776
+            <span class="icon icon_transport transport-weibiaoti2010104"></span>
777
+            <div class="name">
778
+              修改
779
+            </div>
780
+            <div class="code-name">.transport-weibiaoti2010104
781
+            </div>
782
+          </li>
783
+          
784
+          <li class="dib">
785
+            <span class="icon icon_transport transport-shanchu1"></span>
786
+            <div class="name">
787
+              删除
788
+            </div>
789
+            <div class="code-name">.transport-shanchu1
790
+            </div>
791
+          </li>
792
+          
793
+          <li class="dib">
794
+            <span class="icon icon_transport transport-shuye"></span>
795
+            <div class="name">
796
+              输液
797
+            </div>
798
+            <div class="code-name">.transport-shuye
799
+            </div>
800
+          </li>
801
+          
802
+          <li class="dib">
803
+            <span class="icon icon_transport transport-shuye1"></span>
804
+            <div class="name">
805
+              输液
806
+            </div>
807
+            <div class="code-name">.transport-shuye1
808
+            </div>
809
+          </li>
810
+          
811
+          <li class="dib">
812
+            <span class="icon icon_transport transport-xunjian"></span>
813
+            <div class="name">
814
+              巡检
815
+            </div>
816
+            <div class="code-name">.transport-xunjian
817
+            </div>
818
+          </li>
819
+          
820
+          <li class="dib">
752 821
             <span class="icon icon_transport transport-dingdanliebiao"></span>
753 822
             <div class="name">
754 823
               订单—列表
@@ -1667,15 +1736,6 @@
1667 1736
           </li>
1668 1737
           
1669 1738
           <li class="dib">
1670
-            <span class="icon icon_transport transport-icon_zhengzaijinx"></span>
1671
-            <div class="name">
1672
-              icon_zhengzaijinx
1673
-            </div>
1674
-            <div class="code-name">.transport-icon_zhengzaijinx
1675
-            </div>
1676
-          </li>
1677
-          
1678
-          <li class="dib">
1679 1739
             <span class="icon icon_transport transport-xiala1"></span>
1680 1740
             <div class="name">
1681 1741
               xiala02
@@ -1749,6 +1809,46 @@
1749 1809
           
1750 1810
             <li class="dib">
1751 1811
                 <svg class="icon svg-icon" aria-hidden="true">
1812
+                  <use xlink:href="#transport-weibiaoti2010104"></use>
1813
+                </svg>
1814
+                <div class="name">修改</div>
1815
+                <div class="code-name">#transport-weibiaoti2010104</div>
1816
+            </li>
1817
+          
1818
+            <li class="dib">
1819
+                <svg class="icon svg-icon" aria-hidden="true">
1820
+                  <use xlink:href="#transport-shanchu1"></use>
1821
+                </svg>
1822
+                <div class="name">删除</div>
1823
+                <div class="code-name">#transport-shanchu1</div>
1824
+            </li>
1825
+          
1826
+            <li class="dib">
1827
+                <svg class="icon svg-icon" aria-hidden="true">
1828
+                  <use xlink:href="#transport-shuye"></use>
1829
+                </svg>
1830
+                <div class="name">输液</div>
1831
+                <div class="code-name">#transport-shuye</div>
1832
+            </li>
1833
+          
1834
+            <li class="dib">
1835
+                <svg class="icon svg-icon" aria-hidden="true">
1836
+                  <use xlink:href="#transport-shuye1"></use>
1837
+                </svg>
1838
+                <div class="name">输液</div>
1839
+                <div class="code-name">#transport-shuye1</div>
1840
+            </li>
1841
+          
1842
+            <li class="dib">
1843
+                <svg class="icon svg-icon" aria-hidden="true">
1844
+                  <use xlink:href="#transport-xunjian"></use>
1845
+                </svg>
1846
+                <div class="name">巡检</div>
1847
+                <div class="code-name">#transport-xunjian</div>
1848
+            </li>
1849
+          
1850
+            <li class="dib">
1851
+                <svg class="icon svg-icon" aria-hidden="true">
1752 1852
                   <use xlink:href="#transport-dingdanliebiao"></use>
1753 1853
                 </svg>
1754 1854
                 <div class="name">订单—列表</div>
@@ -2565,14 +2665,6 @@
2565 2665
           
2566 2666
             <li class="dib">
2567 2667
                 <svg class="icon svg-icon" aria-hidden="true">
2568
-                  <use xlink:href="#transport-icon_zhengzaijinx"></use>
2569
-                </svg>
2570
-                <div class="name">icon_zhengzaijinx</div>
2571
-                <div class="code-name">#transport-icon_zhengzaijinx</div>
2572
-            </li>
2573
-          
2574
-            <li class="dib">
2575
-                <svg class="icon svg-icon" aria-hidden="true">
2576 2668
                   <use xlink:href="#transport-xiala1"></use>
2577 2669
                 </svg>
2578 2670
                 <div class="name">xiala02</div>

+ 23 - 7
src/assets/iconfont/iconfont.css

@@ -1,8 +1,8 @@
1 1
 @font-face {
2 2
   font-family: "icon_transport"; /* Project id 4543613 */
3
-  src: url('iconfont.woff2?t=1715570700362') format('woff2'),
4
-       url('iconfont.woff?t=1715570700362') format('woff'),
5
-       url('iconfont.ttf?t=1715570700362') format('truetype');
3
+  src: url('iconfont.woff2?t=1718952478641') format('woff2'),
4
+       url('iconfont.woff?t=1718952478641') format('woff'),
5
+       url('iconfont.ttf?t=1718952478641') format('truetype');
6 6
 }
7 7
 
8 8
 .icon_transport {
@@ -13,6 +13,26 @@
13 13
   -moz-osx-font-smoothing: grayscale;
14 14
 }
15 15
 
16
+.transport-weibiaoti2010104:before {
17
+  content: "\e644";
18
+}
19
+
20
+.transport-shanchu1:before {
21
+  content: "\e74b";
22
+}
23
+
24
+.transport-shuye:before {
25
+  content: "\e627";
26
+}
27
+
28
+.transport-shuye1:before {
29
+  content: "\e62c";
30
+}
31
+
32
+.transport-xunjian:before {
33
+  content: "\e6c6";
34
+}
35
+
16 36
 .transport-dingdanliebiao:before {
17 37
   content: "\e719";
18 38
 }
@@ -421,10 +441,6 @@
421 441
   content: "\e61a";
422 442
 }
423 443
 
424
-.transport-icon_zhengzaijinx:before {
425
-  content: "\e635";
426
-}
427
-
428 444
 .transport-xiala1:before {
429 445
   content: "\e662";
430 446
 }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
src/assets/iconfont/iconfont.js


+ 35 - 7
src/assets/iconfont/iconfont.json

@@ -6,6 +6,41 @@
6 6
   "description": "",
7 7
   "glyphs": [
8 8
     {
9
+      "icon_id": "1069107",
10
+      "name": "修改",
11
+      "font_class": "weibiaoti2010104",
12
+      "unicode": "e644",
13
+      "unicode_decimal": 58948
14
+    },
15
+    {
16
+      "icon_id": "577357",
17
+      "name": "删除",
18
+      "font_class": "shanchu1",
19
+      "unicode": "e74b",
20
+      "unicode_decimal": 59211
21
+    },
22
+    {
23
+      "icon_id": "20274523",
24
+      "name": "输液",
25
+      "font_class": "shuye",
26
+      "unicode": "e627",
27
+      "unicode_decimal": 58919
28
+    },
29
+    {
30
+      "icon_id": "31359573",
31
+      "name": "输液",
32
+      "font_class": "shuye1",
33
+      "unicode": "e62c",
34
+      "unicode_decimal": 58924
35
+    },
36
+    {
37
+      "icon_id": "18616187",
38
+      "name": "巡检",
39
+      "font_class": "xunjian",
40
+      "unicode": "e6c6",
41
+      "unicode_decimal": 59078
42
+    },
43
+    {
9 44
       "icon_id": "8348114",
10 45
       "name": "订单—列表",
11 46
       "font_class": "dingdanliebiao",
@@ -720,13 +755,6 @@
720 755
       "unicode_decimal": 58906
721 756
     },
722 757
     {
723
-      "icon_id": "4852661",
724
-      "name": "icon_zhengzaijinx",
725
-      "font_class": "icon_zhengzaijinx",
726
-      "unicode": "e635",
727
-      "unicode_decimal": 58933
728
-    },
729
-    {
730 758
       "icon_id": "5933299",
731 759
       "name": "xiala02",
732 760
       "font_class": "xiala1",

BIN
src/assets/iconfont/iconfont.ttf


BIN
src/assets/iconfont/iconfont.woff


BIN
src/assets/iconfont/iconfont.woff2


+ 6 - 0
src/common.less

@@ -1,3 +1,6 @@
1
+.ant-table-tbody tr:nth-of-type(2n){
2
+  background-color: #e9f7e9!important;
3
+}
1 4
 .ml8 {
2 5
   margin-left: 8px !important;
3 6
 }
@@ -13,6 +16,9 @@
13 16
 .ml16 {
14 17
   margin-left: 16px !important;
15 18
 }
19
+.line_height_normal{
20
+  line-height: normal !important;
21
+}
16 22
 .w100 {
17 23
   width: 100% !important;
18 24
 }