123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405 |
- /* HR板块统一样式文件 */
- /* 主题色彩变量 */
- $hr-primary: #1e40af;
- $hr-primary-light: #3b82f6;
- $hr-secondary: #0d9488;
- $hr-success: #10b981;
- $hr-warning: #f59e0b;
- $hr-error: #ef4444;
- $hr-info: #3b82f6;
- $hr-text-primary: #1f2937;
- $hr-text-secondary: #4b5563;
- $hr-text-tertiary: #9ca3af;
- $hr-bg-primary: #ffffff;
- $hr-bg-secondary: #f9fafb;
- $hr-bg-tertiary: #f3f4f6;
- $hr-border: #e5e7eb;
- /* 统一卡片样式 */
- .hr-card {
- background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
- border: 1px solid rgba(226, 232, 240, 0.8);
- border-radius: 12px;
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
- transition: all 0.3s ease;
- overflow: hidden;
-
- &:hover {
- box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
- transform: translateY(-2px);
- }
-
- .hr-card-header {
- background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
- padding: 16px 20px;
- border-bottom: 1px solid $hr-border;
-
- .hr-card-title {
- display: flex;
- align-items: center;
- gap: 12px;
- margin: 0;
- font-size: 18px;
- font-weight: 600;
- color: $hr-text-primary;
-
- mat-icon {
- background: linear-gradient(135deg, #e6f7ff 0%, #f3e8ff 100%);
- color: $hr-primary;
- padding: 8px;
- border-radius: 50%;
- font-size: 20px;
- width: 36px;
- height: 36px;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- }
- }
-
- .hr-card-content {
- padding: 20px;
- }
- }
- /* 统一表格样式 */
- .hr-table {
- width: 100%;
- background: white;
- border-radius: 8px;
- overflow: hidden;
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-
- .mat-header-cell {
- background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
- color: $hr-text-primary;
- font-weight: 600;
- font-size: 14px;
- border-bottom: 2px solid $hr-border;
- padding: 16px 12px;
- }
-
- .mat-cell {
- padding: 16px 12px;
- font-size: 14px;
- border-bottom: 1px solid rgba(226, 232, 240, 0.5);
-
- &:last-child {
- text-align: center;
- }
- }
-
- .mat-row {
- transition: all 0.2s ease;
-
- &:hover {
- background-color: rgba(59, 130, 246, 0.05);
- }
-
- &:last-child .mat-cell {
- border-bottom: none;
- }
- }
-
- .no-data {
- text-align: center;
- color: $hr-text-tertiary;
- font-style: italic;
- padding: 40px 20px;
- }
- }
- /* 统一按钮样式 */
- .hr-btn {
- border-radius: 8px;
- font-weight: 500;
- transition: all 0.3s ease;
-
- &.hr-btn-primary {
- background: linear-gradient(135deg, $hr-primary 0%, $hr-primary-light 100%);
- color: white;
- border: none;
-
- &:hover {
- transform: translateY(-1px);
- box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
- }
- }
-
- &.hr-btn-secondary {
- background: linear-gradient(135deg, $hr-secondary 0%, #14b8a6 100%);
- color: white;
- border: none;
-
- &:hover {
- transform: translateY(-1px);
- box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
- }
- }
-
- &.hr-btn-outline {
- background: transparent;
- border: 2px solid $hr-primary;
- color: $hr-primary;
-
- &:hover {
- background: $hr-primary;
- color: white;
- transform: translateY(-1px);
- }
- }
-
- &.hr-btn-icon {
- display: flex;
- align-items: center;
- gap: 8px;
-
- mat-icon {
- font-size: 18px !important;
- width: 18px !important;
- height: 18px !important;
- line-height: 18px !important;
- }
- }
- }
- /* 统一状态徽章样式 */
- .hr-badge {
- padding: 4px 12px;
- border-radius: 20px;
- font-size: 12px;
- font-weight: 500;
- text-align: center;
- display: inline-block;
-
- &.hr-badge-success {
- background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.2));
- color: $hr-success;
- border: 1px solid rgba(16, 185, 129, 0.3);
- }
-
- &.hr-badge-warning {
- background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.2));
- color: $hr-warning;
- border: 1px solid rgba(245, 158, 11, 0.3);
- }
-
- &.hr-badge-error {
- background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.2));
- color: $hr-error;
- border: 1px solid rgba(239, 68, 68, 0.3);
- }
-
- &.hr-badge-info {
- background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.2));
- color: $hr-info;
- border: 1px solid rgba(59, 130, 246, 0.3);
- }
- }
- /* 统一表单样式 */
- .hr-form {
- .mat-form-field {
- width: 100%;
- margin-bottom: 16px;
-
- .mat-form-field-outline {
- border-radius: 8px;
- }
-
- &.mat-focused .mat-form-field-outline-thick {
- border-color: $hr-primary;
- }
- }
-
- .form-row {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
- gap: 16px;
- margin-bottom: 16px;
- }
-
- .form-actions {
- display: flex;
- justify-content: flex-end;
- gap: 12px;
- margin-top: 24px;
- padding-top: 16px;
- border-top: 1px solid $hr-border;
- }
- }
- /* 统一进度条样式 */
- .hr-progress {
- height: 8px;
- border-radius: 4px;
- overflow: hidden;
- background-color: rgba(226, 232, 240, 0.5);
-
- .progress-fill {
- height: 100%;
- border-radius: 4px;
- transition: width 0.6s ease;
-
- &.hr-progress-primary {
- background: linear-gradient(90deg, $hr-primary, $hr-primary-light);
- }
-
- &.hr-progress-success {
- background: linear-gradient(90deg, $hr-success, #34d399);
- }
-
- &.hr-progress-warning {
- background: linear-gradient(90deg, $hr-warning, #fbbf24);
- }
-
- &.hr-progress-error {
- background: linear-gradient(90deg, $hr-error, #f87171);
- }
- }
- }
- /* 统一统计卡片样式 */
- .hr-stat-card {
- background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
- border: 1px solid rgba(226, 232, 240, 0.8);
- border-radius: 12px;
- padding: 20px;
- text-align: center;
- transition: all 0.3s ease;
- position: relative;
- overflow: hidden;
-
- &::before {
- content: '';
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- height: 4px;
- background: linear-gradient(90deg, $hr-primary, $hr-secondary);
- }
-
- &:hover {
- transform: translateY(-4px);
- box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.15);
- }
-
- &.hr-stat-warning::before {
- background: linear-gradient(90deg, $hr-warning, #fbbf24);
- }
-
- &.hr-stat-error::before {
- background: linear-gradient(90deg, $hr-error, #f87171);
- }
-
- &.hr-stat-info::before {
- background: linear-gradient(90deg, $hr-info, #60a5fa);
- }
-
- &.hr-stat-success::before {
- background: linear-gradient(90deg, $hr-success, #34d399);
- }
-
- .stat-value {
- font-size: 28px;
- font-weight: 700;
- margin-bottom: 8px;
- background: linear-gradient(135deg, $hr-text-primary, $hr-text-secondary);
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- background-clip: text;
- }
-
- .stat-label {
- font-size: 14px;
- color: $hr-text-secondary;
- font-weight: 500;
- margin-bottom: 4px;
- }
-
- .stat-sub {
- font-size: 12px;
- color: $hr-text-tertiary;
- font-weight: 400;
- }
- }
- /* 统一Material图标修复 */
- mat-icon {
- font-family: 'Material Icons' !important;
- font-feature-settings: 'liga' 1;
- -webkit-font-feature-settings: 'liga';
- -moz-font-feature-settings: 'liga';
- font-variant-ligatures: common-ligatures;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- font-size: inherit;
- line-height: inherit;
- vertical-align: middle;
-
- &::before {
- content: none !important;
- }
- }
- /* 响应式设计 */
- @media (max-width: 768px) {
- .hr-card {
- margin: 0 8px;
- border-radius: 8px;
- }
-
- .hr-table {
- font-size: 12px;
-
- .mat-header-cell,
- .mat-cell {
- padding: 8px 6px;
- }
- }
-
- .hr-form .form-row {
- grid-template-columns: 1fr;
- }
-
- .hr-stat-card {
- .stat-value {
- font-size: 24px;
- }
- }
- }
- /* 动画效果 */
- @keyframes fadeIn {
- from {
- opacity: 0;
- transform: translateY(20px);
- }
- to {
- opacity: 1;
- transform: translateY(0);
- }
- }
- @keyframes slideInUp {
- from {
- opacity: 0;
- transform: translateY(30px);
- }
- to {
- opacity: 1;
- transform: translateY(0);
- }
- }
- .hr-fade-in {
- animation: fadeIn 0.3s ease-in-out;
- }
- .hr-slide-in-up {
- animation: slideInUp 0.3s ease-out;
- }
|