瀏覽代碼

主题色

seimin 2 天之前
父節點
當前提交
74d014f871

+ 2 - 0
src/app/app.component.ts

@@ -25,6 +25,8 @@ export class AppComponent {
25
     }
25
     }
26
     console.log(hosId);
26
     console.log(hosId);
27
     this.tool.getSysNameAndLogoAsync(hosId).subscribe(result => {
27
     this.tool.getSysNameAndLogoAsync(hosId).subscribe(result => {
28
+      // 系统颜色设置
29
+      this.tool.setUIColor(result.ui_colour);
28
       let marking = result.project || '';
30
       let marking = result.project || '';
29
       let logoTitle = result.sysName || '';
31
       let logoTitle = result.sysName || '';
30
       let logoUrl = location.origin + '/file' + result.logo || '';
32
       let logoUrl = location.origin + '/file' + result.logo || '';

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

@@ -60,6 +60,51 @@ export class ToolService {
60
     this.faviconUrl = faviconUrl;
60
     this.faviconUrl = faviconUrl;
61
   }
61
   }
62
 
62
 
63
+  // 系统颜色设置
64
+  setUIColor(color){
65
+    // 移除样式
66
+    if(document.getElementById('dsThemeId')){
67
+      document.getElementById('dsThemeId').remove();
68
+    }
69
+    // 创建一个新的 <style> 元素
70
+    var style = document.createElement('style');
71
+
72
+    // 设置 style 元素的类型
73
+    style.id = 'dsThemeId';
74
+    style.type = 'text/css';
75
+
76
+    // 添加 CSS 规则
77
+    style.innerHTML = `
78
+      .ant-table-thead tr{
79
+        background-image:none!important;
80
+        background-color:${color}!important;
81
+      }
82
+      #ds-menu .mainMenuOne.mainMenuSelected{
83
+        background-color:${color}!important;
84
+      }
85
+      #ds-menu .mainMenu.menuTwoSelected{
86
+        border-left-color: ${color}!important;
87
+      }
88
+      #sidebar-logo .title{
89
+        color: ${color}!important;
90
+      }
91
+      #app-header .left > .icon_transport,
92
+      #app-header .left .icon_transport.green{
93
+        color: ${color}!important;
94
+      }
95
+      #fuwutai .lists_box .right_bots .top_bot{
96
+        background-color: ${color}!important;
97
+        border-color: ${color}!important;
98
+      }
99
+      #fuwutai .lists_box .no_data{
100
+        color: ${color}!important;
101
+      }
102
+    `;
103
+
104
+    // 将 <style> 元素添加到 <head> 中
105
+    document.head.appendChild(style);
106
+  }
107
+
63
   // 获取权限中的院区
108
   // 获取权限中的院区
64
   getHospitalList() {
109
   getHospitalList() {
65
     return (
110
     return (

+ 3 - 3
src/app/views/fuwutai/fuwutai.component.html

@@ -1,4 +1,4 @@
1
-<div class="fuwutai">
1
+<div class="fuwutai" id="fuwutai">
2
   <div class="top" id="top" *ngIf="hurseInfoHiding != 1 && hsmsData.hsmsSwitch">
2
   <div class="top" id="top" *ngIf="hurseInfoHiding != 1 && hsmsData.hsmsSwitch">
3
     <!-- 头部Tab -->
3
     <!-- 头部Tab -->
4
     <div class="tabBox">
4
     <div class="tabBox">
@@ -2080,7 +2080,7 @@
2080
 	  cancelTxt="否"
2080
 	  cancelTxt="否"
2081
 	  (cancelDelEvent)="hideRepeatModal()"
2081
 	  (cancelDelEvent)="hideRepeatModal()"
2082
 	></app-dialog-delete>
2082
 	></app-dialog-delete>
2083
-	
2083
+
2084
 	<!-- 一键派单 -->
2084
 	<!-- 一键派单 -->
2085
 	<app-dialog-delete
2085
 	<app-dialog-delete
2086
 	  [delModal]="sendModal"
2086
 	  [delModal]="sendModal"
@@ -2089,7 +2089,7 @@
2089
 	  (confirmDelEvent)="confirmSecd()"
2089
 	  (confirmDelEvent)="confirmSecd()"
2090
 	  content="您确认一键派单吗?系统会根据工作分配方案自动派单给指定人员"
2090
 	  content="您确认一键派单吗?系统会根据工作分配方案自动派单给指定人员"
2091
 	></app-dialog-delete>
2091
 	></app-dialog-delete>
2092
-	
2092
+
2093
 	<!-- 是否限制业务发起时间模态框 -->
2093
 	<!-- 是否限制业务发起时间模态框 -->
2094
 	<app-dialog-delete [delModal]="limitTimeModal" (hideDelModalEvent)="hideLimitTimeModal()" [btnLoading]="limitTimeLoading"
2094
 	<app-dialog-delete [delModal]="limitTimeModal" (hideDelModalEvent)="hideLimitTimeModal()" [btnLoading]="limitTimeLoading"
2095
 	(confirmDelEvent)="confirmLimitTime()" [content]="limitTimeInfo" confirmTxt="继续建单" [isShowConfirm]="isShowConfirm" [isShowConfirmInfo]="isShowConfirmInfo"></app-dialog-delete>
2095
 	(confirmDelEvent)="confirmLimitTime()" [content]="limitTimeInfo" confirmTxt="继续建单" [isShowConfirm]="isShowConfirm" [isShowConfirmInfo]="isShowConfirmInfo"></app-dialog-delete>

+ 8 - 4
src/app/views/home/home.component.less

@@ -210,7 +210,7 @@
210
                 .thead {
210
                 .thead {
211
                   th {
211
                   th {
212
                     background: transparent;
212
                     background: transparent;
213
-                    color: #333;
213
+                    color: #fff;
214
                     text-align: center;
214
                     text-align: center;
215
                     font-size: 12px;
215
                     font-size: 12px;
216
                     padding: 8px;
216
                     padding: 8px;
@@ -346,6 +346,10 @@
346
                 .box {
346
                 .box {
347
                   height: 100%;
347
                   height: 100%;
348
 
348
 
349
+                  th{
350
+                    color: #fff;
351
+                  }
352
+
349
                   th,
353
                   th,
350
                   td {
354
                   td {
351
                     text-align: center;
355
                     text-align: center;
@@ -421,12 +425,12 @@
421
                   width: 100%;
425
                   width: 100%;
422
                   padding: 16px 16px 8px 16px;
426
                   padding: 16px 16px 8px 16px;
423
                   font-size: 12px;
427
                   font-size: 12px;
424
-									
428
+
425
 									.flex{
429
 									.flex{
426
 										display: flex;
430
 										display: flex;
427
 										justify-content: space-between;
431
 										justify-content: space-between;
428
 									}
432
 									}
429
-									
433
+
430
                   .title {
434
                   .title {
431
                     color: #333;
435
                     color: #333;
432
 
436
 
@@ -450,7 +454,7 @@
450
                     &.noOver {
454
                     &.noOver {
451
                       -webkit-line-clamp: unset;
455
                       -webkit-line-clamp: unset;
452
                     }
456
                     }
453
-										
457
+
454
                   }
458
                   }
455
 
459
 
456
                   .up {
460
                   .up {

+ 7 - 4
src/app/views/login/login.component.ts

@@ -152,7 +152,7 @@ export class LoginComponent implements OnInit {
152
       remember: [Boolean(localStorage.getItem("remember"))],
152
       remember: [Boolean(localStorage.getItem("remember"))],
153
 			code: [null, [Validators.required]]
153
 			code: [null, [Validators.required]]
154
     });
154
     });
155
-		
155
+
156
 		if(this.isSingleSignOn){
156
 		if(this.isSingleSignOn){
157
 			this.validateForm.removeControl('code');
157
 			this.validateForm.removeControl('code');
158
 		}else{
158
 		}else{
@@ -163,7 +163,7 @@ export class LoginComponent implements OnInit {
163
 	resetCode(){
163
 	resetCode(){
164
 		this.getCode()
164
 		this.getCode()
165
 	}
165
 	}
166
-	
166
+
167
 	// 获取系统安全配置
167
 	// 获取系统安全配置
168
 	verificationCode:any;
168
 	verificationCode:any;
169
 	getSysConfig(){
169
 	getSysConfig(){
@@ -174,7 +174,7 @@ export class LoginComponent implements OnInit {
174
 			}
174
 			}
175
 		})
175
 		})
176
 	}
176
 	}
177
-	
177
+
178
 	// 获取验证码
178
 	// 获取验证码
179
 	loginImg:any;
179
 	loginImg:any;
180
 	captchaId:any;
180
 	captchaId:any;
@@ -186,7 +186,7 @@ export class LoginComponent implements OnInit {
186
 			}
186
 			}
187
 		})
187
 		})
188
 	}
188
 	}
189
-	
189
+
190
   // enter触发
190
   // enter触发
191
   enterUp(e): void {
191
   enterUp(e): void {
192
     let keyCode = e.which || e.keyCode || 0;
192
     let keyCode = e.which || e.keyCode || 0;
@@ -254,6 +254,9 @@ export class LoginComponent implements OnInit {
254
         console.log(data.user);
254
         console.log(data.user);
255
         let hosId = data.user.user.currentHospital ? data.user.user.currentHospital.id : ''
255
         let hosId = data.user.user.currentHospital ? data.user.user.currentHospital.id : ''
256
         this.tool.getSysNameAndLogoAsync(hosId).subscribe(result => {
256
         this.tool.getSysNameAndLogoAsync(hosId).subscribe(result => {
257
+          // 系统颜色设置
258
+          this.tool.setUIColor(result.ui_colour);
259
+
257
 					// this.verificationCode = result.verificationCode;
260
 					// this.verificationCode = result.verificationCode;
258
           let marking = result.project || '';
261
           let marking = result.project || '';
259
           let logoTitle = result.sysName || '';
262
           let logoTitle = result.sysName || '';

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

@@ -1,6 +1,6 @@
1
 <nz-layout class="app-layout display_flex flex_auto ant-layout-has-sider">
1
 <nz-layout class="app-layout display_flex flex_auto ant-layout-has-sider">
2
   <overlay-scrollbars #osComponentRef1 class="menu-sidebar">
2
   <overlay-scrollbars #osComponentRef1 class="menu-sidebar">
3
-    <div class="sidebar-logo display_flex align-items_center justify-content_flex-center">
3
+    <div class="sidebar-logo display_flex align-items_center justify-content_flex-center" id="sidebar-logo">
4
       <div class="display_flex align-items_center justify-content_flex-center logoTitle">
4
       <div class="display_flex align-items_center justify-content_flex-center logoTitle">
5
         <div class="title ellipsis-multiline" nz-tooltip nzTooltipTitle="{{tool.logoTitle}}">{{tool.logoTitle}}</div>
5
         <div class="title ellipsis-multiline" nz-tooltip nzTooltipTitle="{{tool.logoTitle}}">{{tool.logoTitle}}</div>
6
       </div>
6
       </div>
@@ -28,7 +28,7 @@
28
   </overlay-scrollbars>
28
   </overlay-scrollbars>
29
   <nz-layout style="background:#fff;display: flex;flex-direction: column;position: relative;">
29
   <nz-layout style="background:#fff;display: flex;flex-direction: column;position: relative;">
30
     <nz-header>
30
     <nz-header>
31
-      <div class="app-header display_flex justify-content_space-between align-items_center">
31
+      <div class="app-header display_flex justify-content_space-between align-items_center" id="app-header">
32
         <div class="left">
32
         <div class="left">
33
 					<!-- <i class="icon_transport transport-xiaoxi green" (click)="toMessage()" nz-tooltip nzTooltipTitle="个人消息通知"></i> -->
33
 					<!-- <i class="icon_transport transport-xiaoxi green" (click)="toMessage()" nz-tooltip nzTooltipTitle="个人消息通知"></i> -->
34
           <div class="dropdown">
34
           <div class="dropdown">

+ 1 - 1
src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.ts

@@ -238,7 +238,7 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
238
   loading1 = false;
238
   loading1 = false;
239
   dictionaryList: any[] = [];
239
   dictionaryList: any[] = [];
240
   getList(num?: number, field?: string, sort?: string) {
240
   getList(num?: number, field?: string, sort?: string) {
241
-    this.mainService.getDictionary('list', 'statistics_date_type').subscribe((data) => {
241
+    this.mainService.getDictionary('list', 'statistics_date_type', true).subscribe((data) => {
242
       this.dictionaryList = data || [];
242
       this.dictionaryList = data || [];
243
       // this.dictionaryList = cloneDeep(dictionaryList);
243
       // this.dictionaryList = cloneDeep(dictionaryList);
244
       let flag = this.dictionaryList.some((item) => item.value === 'dateOther');
244
       let flag = this.dictionaryList.some((item) => item.value === 'dateOther');

+ 1 - 1
src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.ts

@@ -290,7 +290,7 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
290
   dictionaryList: any[] = [];
290
   dictionaryList: any[] = [];
291
 	widthValue:any;
291
 	widthValue:any;
292
   getList(num?: number, field?: string, sort?: string) {
292
   getList(num?: number, field?: string, sort?: string) {
293
-    this.mainService.getDictionary('list', 'statistics_date_type').subscribe((data) => {
293
+    this.mainService.getDictionary('list', 'statistics_date_type', true).subscribe((data) => {
294
      this.dictionaryList = data || [];
294
      this.dictionaryList = data || [];
295
      // this.dictionaryList = cloneDeep(dictionaryList);
295
      // this.dictionaryList = cloneDeep(dictionaryList);
296
      let flag = this.dictionaryList.some((item) => item.value === 'dateOther');
296
      let flag = this.dictionaryList.some((item) => item.value === 'dateOther');

+ 1 - 1
src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.ts

@@ -385,7 +385,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
385
   getStatisticsTypeList() {
385
   getStatisticsTypeList() {
386
     this.isLoading = true;
386
     this.isLoading = true;
387
     this.mainService
387
     this.mainService
388
-      .getDictionary("list", "statistics_date_type")
388
+      .getDictionary("list", "statistics_date_type", true)
389
       .subscribe((data) => {
389
       .subscribe((data) => {
390
 				this.statisticsTypeList = []
390
 				this.statisticsTypeList = []
391
         this.isLoading = false;
391
         this.isLoading = false;

+ 1 - 1
src/app/views/new-statistics/distribution-inspection-statistics/user-business-statistics/user-business-statistics.component.ts

@@ -146,7 +146,7 @@ export class UserBusinessStatisticsComponent implements OnInit, AfterViewInit {
146
   loading1 = false;
146
   loading1 = false;
147
   dictionaryList: any[] = [];
147
   dictionaryList: any[] = [];
148
   getList(num?: number, field?: string, sort?: string) {
148
   getList(num?: number, field?: string, sort?: string) {
149
-    this.mainService.getDictionary('list', 'statistics_date_type').subscribe((data) => {
149
+    this.mainService.getDictionary('list', 'statistics_date_type', true).subscribe((data) => {
150
       let dictionaryList = data || [];
150
       let dictionaryList = data || [];
151
       dictionaryList = cloneDeep(dictionaryList);
151
       dictionaryList = cloneDeep(dictionaryList);
152
       let flag = dictionaryList.some((item) => item.value === 'dateOther');
152
       let flag = dictionaryList.some((item) => item.value === 'dateOther');

+ 3 - 0
src/app/views/new-statistics/new-statistics.component.ts

@@ -33,6 +33,7 @@ export class NewStatisticsComponent implements OnInit, OnDestroy {
33
 
33
 
34
   ngOnDestroy(){
34
   ngOnDestroy(){
35
 		sessionStorage.removeItem('maintenanceData')
35
 		sessionStorage.removeItem('maintenanceData')
36
+    sessionStorage.removeItem('distributionData');
36
     this.tabService.deleteAllRouteSnapshot();
37
     this.tabService.deleteAllRouteSnapshot();
37
   }
38
   }
38
 
39
 
@@ -169,6 +170,7 @@ export class NewStatisticsComponent implements OnInit, OnDestroy {
169
     if(this.sign === 'nurse'){
170
     if(this.sign === 'nurse'){
170
       // 护士端跳转到统计
171
       // 护士端跳转到统计
171
       sessionStorage.removeItem('maintenanceData')
172
       sessionStorage.removeItem('maintenanceData')
173
+      sessionStorage.removeItem('distributionData');
172
       this.router.navigate(['/nurse']);
174
       this.router.navigate(['/nurse']);
173
       return;
175
       return;
174
     }
176
     }
@@ -177,6 +179,7 @@ export class NewStatisticsComponent implements OnInit, OnDestroy {
177
 		let gglb = false;
179
 		let gglb = false;
178
 		let gzgd = false;
180
 		let gzgd = false;
179
 		sessionStorage.removeItem('maintenanceData')
181
 		sessionStorage.removeItem('maintenanceData')
182
+    sessionStorage.removeItem('distributionData');
180
 		roleMenus.forEach((e) => {
183
 		roleMenus.forEach((e) => {
181
 			if (e.link == "home") {
184
 			if (e.link == "home") {
182
 			  sy = true;
185
 			  sy = true;

+ 8 - 0
src/app/views/sys-config/sys-config.component.html

@@ -236,6 +236,14 @@
236
 				    </nz-select>
236
 				    </nz-select>
237
 				  </nz-form-control>
237
 				  </nz-form-control>
238
 				</nz-form-item>
238
 				</nz-form-item>
239
+        <nz-form-item class="formItem">
240
+				  <nz-form-label [nzSpan]="24" nzFor="ui_colour" nzRequired class="label">系统颜色设置</nz-form-label>
241
+				  <nz-form-control [nzSpan]="24" nzErrorTip="系统颜色设置是必填项!">
242
+				    <nz-select nzPlaceHolder="请选择系统颜色设置" formControlName="ui_colour">
243
+				      <nz-option nzValue="{{item.id}}" nzLabel="{{item.name}}" *ngFor="let item of ui_colour"></nz-option>
244
+				    </nz-select>
245
+				  </nz-form-control>
246
+				</nz-form-item>
239
       </div>
247
       </div>
240
     </form>
248
     </form>
241
   </overlay-scrollbars>
249
   </overlay-scrollbars>

+ 19 - 3
src/app/views/sys-config/sys-config.component.ts

@@ -77,7 +77,8 @@ export class SysConfigComponent implements OnInit {
77
 			supportAppVersion: [null, [Validators.required]],
77
 			supportAppVersion: [null, [Validators.required]],
78
 			autoIncidentDegree: [null, [Validators.required]],
78
 			autoIncidentDegree: [null, [Validators.required]],
79
 			autoWechatDegree: [null, [Validators.required]],
79
 			autoWechatDegree: [null, [Validators.required]],
80
-			workorderEvaluation: [null, [Validators.required]]
80
+			workorderEvaluation: [null, [Validators.required]],
81
+			ui_colour: [null, [Validators.required]],
81
     });
82
     });
82
     this.getDeptType();
83
     this.getDeptType();
83
     this.coopBtns = this.tool.initCoopBtns(this.route);
84
     this.coopBtns = this.tool.initCoopBtns(this.route);
@@ -160,7 +161,8 @@ export class SysConfigComponent implements OnInit {
160
 				item.keyconfig === "supportAppVersion" ||
161
 				item.keyconfig === "supportAppVersion" ||
161
 				item.keyconfig === "autoIncidentDegree" ||
162
 				item.keyconfig === "autoIncidentDegree" ||
162
 				item.keyconfig === "autoWechatDegree" ||
163
 				item.keyconfig === "autoWechatDegree" ||
163
-				item.keyconfig === "workorderEvaluation"
164
+				item.keyconfig === "workorderEvaluation" ||
165
+				item.keyconfig === "ui_colour"
164
     );
166
     );
165
 		console.log(7777,this.validateForm.controls.repairs.value)
167
 		console.log(7777,this.validateForm.controls.repairs.value)
166
     filterData.forEach((item) => {
168
     filterData.forEach((item) => {
@@ -222,6 +224,8 @@ export class SysConfigComponent implements OnInit {
222
         item.valueconfig = this.validateForm.controls.autoWechatDegree.value;
224
         item.valueconfig = this.validateForm.controls.autoWechatDegree.value;
223
       }else if (item.keyconfig === "workorderEvaluation") {
225
       }else if (item.keyconfig === "workorderEvaluation") {
224
         item.valueconfig = this.validateForm.controls.workorderEvaluation.value;
226
         item.valueconfig = this.validateForm.controls.workorderEvaluation.value;
227
+      }else if (item.keyconfig === "ui_colour") {
228
+        item.valueconfig = this.validateForm.controls.ui_colour.value;
225
       }
229
       }
226
     });
230
     });
227
     const postData = filterData;
231
     const postData = filterData;
@@ -230,6 +234,11 @@ export class SysConfigComponent implements OnInit {
230
       (result) => {
234
       (result) => {
231
         this.loading2 = false;
235
         this.loading2 = false;
232
         if (result["status"] == 200) {
236
         if (result["status"] == 200) {
237
+          // 系统颜色设置
238
+          let ui_colour = this.ui_colour.find(v => v.id == this.validateForm.controls.ui_colour.value);
239
+          if(ui_colour){
240
+            this.tool.setUIColor(ui_colour.value);
241
+          }
233
           this.showPromptModal("保存", true, "");
242
           this.showPromptModal("保存", true, "");
234
         } else {
243
         } else {
235
           this.showPromptModal("保存", false, "");
244
           this.showPromptModal("保存", false, "");
@@ -245,6 +254,7 @@ export class SysConfigComponent implements OnInit {
245
   deptTypes: any = [];
254
   deptTypes: any = [];
246
 	evaluateData: any = [];
255
 	evaluateData: any = [];
247
 	workorderEvaluation: any = [];
256
 	workorderEvaluation: any = [];
257
+	ui_colour: any = [];
248
   getDeptType() {
258
   getDeptType() {
249
     this.loading1 = true;
259
     this.loading1 = true;
250
     this.mainService.getDictionary("list", "dept_type").subscribe((result) => {
260
     this.mainService.getDictionary("list", "dept_type").subscribe((result) => {
@@ -257,6 +267,9 @@ export class SysConfigComponent implements OnInit {
257
 		  this.workorderEvaluation = result;
267
 		  this.workorderEvaluation = result;
258
 		  this.getSysConfig();
268
 		  this.getSysConfig();
259
 		});
269
 		});
270
+		this.mainService.getDictionary("list", "ui_colour").subscribe((result) => {
271
+		  this.ui_colour = result;
272
+		});
260
   }
273
   }
261
   // 格式化自动关闭工单设置的数字选择框
274
   // 格式化自动关闭工单设置的数字选择框
262
   formatterPercent = (value: number) => `${value}小时`;
275
   formatterPercent = (value: number) => `${value}小时`;
@@ -354,7 +367,7 @@ export class SysConfigComponent implements OnInit {
354
 										this.checkOptionsOne[1].checked = false
367
 										this.checkOptionsOne[1].checked = false
355
 									}
368
 									}
356
 								  this.validateForm.controls.repairs.setValue(this.checkOptionsOne + "");
369
 								  this.validateForm.controls.repairs.setValue(this.checkOptionsOne + "");
357
-								  break;	
370
+								  break;
358
 								case "cmdbRepair":
371
 								case "cmdbRepair":
359
 								  this.validateForm.controls.cmdbRepair.setValue(c[1] + "");
372
 								  this.validateForm.controls.cmdbRepair.setValue(c[1] + "");
360
 								  break;
373
 								  break;
@@ -370,6 +383,9 @@ export class SysConfigComponent implements OnInit {
370
 								case "workorderEvaluation":
383
 								case "workorderEvaluation":
371
 								  this.validateForm.controls.workorderEvaluation.setValue(c[1] + "");
384
 								  this.validateForm.controls.workorderEvaluation.setValue(c[1] + "");
372
 								  break;
385
 								  break;
386
+								case "ui_colour":
387
+								  this.validateForm.controls.ui_colour.setValue(c[1] + "");
388
+								  break;
373
               }
389
               }
374
             });
390
             });
375
           } else {
391
           } else {