123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502 |
- // 自定义主题
- $primary-color: #1e40af; // 深蓝主色,传递可靠感
- $primary-light: #3b82f6; // 浅蓝色,用于悬停效果
- $secondary-color: #0d9488; // 薄荷绿,作为强调色
- $success-color: #10b981; // 成功色
- $warning-color: #f59e0b; // 警告色(浅橙)
- $error-color: #ef4444; // 错误色
- $text-primary: #1f2937; // 主要文本色
- $text-secondary: #4b5563; // 次要文本色
- $text-tertiary: #9ca3af; // 辅助文本色
- $bg-primary: #ffffff; // 主背景色
- $bg-secondary: #f9fafb; // 次要背景色
- $bg-tertiary: #f3f4f6; // 辅助背景色
- $border-color: #e5e7eb; // 边框色
- $shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
- $shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
- $shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
- $border-radius: 8px;
- $transition: all 0.2s ease;
- // 主容器样式
- .assets-container {
- padding: 24px;
- min-height: 100vh;
- background-color: $bg-secondary;
- font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
- }
- // 页面标题
- .page-header {
- margin-bottom: 24px;
- padding-bottom: 16px;
- border-bottom: 2px solid $border-color;
- h1 {
- font-size: 28px;
- font-weight: 700;
- color: $text-primary;
- margin: 0 0 8px 0;
- }
- .page-description {
- font-size: 16px;
- color: $text-secondary;
- margin: 0;
- }
- }
- // 顶部操作栏
- .action-bar {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 24px;
- padding: 16px 20px;
- background-color: $bg-primary;
- border-radius: $border-radius;
- box-shadow: $shadow-sm;
- flex-wrap: wrap;
- gap: 16px;
- .action-buttons {
- display: flex;
- align-items: center;
- gap: 12px;
- flex-wrap: wrap;
- }
- .add-btn {
- display: flex;
- align-items: center;
- gap: 8px;
- padding: 10px 20px;
- background-color: $primary-color;
- color: white;
- border: none;
- border-radius: $border-radius;
- font-size: 16px;
- font-weight: 500;
- cursor: pointer;
- transition: $transition;
- &:hover {
- background-color: $primary-light;
- transform: translateY(-1px);
- box-shadow: $shadow-md;
- }
- &:active {
- transform: translateY(0);
- box-shadow: $shadow-sm;
- }
- }
- .batch-actions {
- display: flex;
- align-items: center;
- gap: 8px;
- animation: slideIn 0.3s ease-out;
- &.hidden {
- display: none;
- }
- }
- .batch-btn {
- display: flex;
- align-items: center;
- gap: 6px;
- padding: 8px 12px;
- border: 1px solid $border-color;
- border-radius: $border-radius;
- background-color: $bg-primary;
- color: $text-secondary;
- font-size: 14px;
- cursor: pointer;
- transition: $transition;
- &:hover {
- background-color: $bg-tertiary;
- border-color: $text-tertiary;
- }
- &:active {
- transform: scale(0.98);
- }
- }
- .search-filters {
- display: flex;
- align-items: center;
- gap: 12px;
- flex-wrap: wrap;
- }
- .search-container {
- position: relative;
- display: flex;
- align-items: center;
- min-width: 280px;
- .search-icon {
- position: absolute;
- left: 12px;
- color: $text-tertiary;
- z-index: 1;
- }
- .search-input {
- width: 100%;
- padding: 10px 12px 10px 40px;
- border: 1px solid $border-color;
- border-radius: $border-radius;
- font-size: 14px;
- color: $text-primary;
- background-color: $bg-primary;
- transition: $transition;
- &:focus {
- outline: none;
- border-color: $primary-color;
- box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
- }
- &::placeholder {
- color: $text-tertiary;
- }
- }
- .clear-search {
- position: absolute;
- right: 8px;
- color: $text-tertiary;
- padding: 4px;
- transition: $transition;
- &:hover {
- color: $text-primary;
- }
- }
- }
- .filter-container {
- min-width: 150px;
- }
- .filter-btn {
- display: flex;
- align-items: center;
- gap: 6px;
- padding: 10px 16px;
- background-color: $secondary-color;
- color: white;
- border: none;
- border-radius: $border-radius;
- font-size: 14px;
- font-weight: 500;
- cursor: pointer;
- transition: $transition;
- &:hover {
- background-color: #0f766e;
- transform: translateY(-1px);
- box-shadow: $shadow-md;
- }
- &:active {
- transform: translateY(0);
- box-shadow: $shadow-sm;
- }
- }
- }
- // 表格容器
- .table-container {
- background-color: $bg-primary;
- border-radius: $border-radius;
- box-shadow: $shadow-sm;
- overflow: hidden;
- margin-bottom: 24px;
- }
- // 员工表格
- .employee-table {
- width: 100%;
- .mat-header-row {
- background-color: $bg-tertiary;
- font-weight: 600;
- color: $text-primary;
- .mat-header-cell {
- padding: 16px;
- font-size: 14px;
- color: $text-primary;
- font-weight: 600;
- border-bottom: 1px solid $border-color;
- }
- }
- .mat-row {
- transition: $transition;
- cursor: pointer;
- &:hover {
- background-color: color-mix(in srgb, $primary-color 2%, transparent);
- transform: translateY(-1px);
- }
- .mat-cell {
- padding: 16px;
- font-size: 14px;
- color: $text-secondary;
- border-bottom: 1px solid $border-color;
- vertical-align: middle;
- }
- &:last-child .mat-cell {
- border-bottom: none;
- }
- }
- .name-column {
- min-width: 150px;
- .employee-info {
- display: flex;
- align-items: center;
- gap: 10px;
- }
- .employee-avatar {
- width: 36px;
- height: 36px;
- border-radius: 50%;
- object-fit: cover;
- }
- .employee-name {
- font-weight: 500;
- color: $text-primary;
- }
- }
- .actions-column {
- min-width: 120px;
- .action-buttons {
- display: flex;
- align-items: center;
- gap: 8px;
- }
- .edit-btn,
- .delete-btn,
- .view-btn {
- color: $text-tertiary;
- transition: $transition;
- opacity: 0.8;
- &:hover {
- opacity: 1;
- transform: scale(1.1);
- }
- &.edit-btn:hover {
- color: $primary-color;
- }
- &.delete-btn:hover {
- color: $error-color;
- }
- &.view-btn:hover {
- color: $secondary-color;
- }
- }
- }
- // 合同信息样式
- .contract-info {
- display: flex;
- align-items: center;
- gap: 8px;
- .contract-date {
- font-size: 12px;
- color: $text-secondary;
- }
- .expiring-soon {
- background-color: color-mix(in srgb, $warning-color 15%, transparent);
- color: $warning-color;
- padding: 2px 8px;
- border-radius: 12px;
- font-size: 11px;
- font-weight: 500;
- animation: pulse 2s infinite;
- }
- .contract-btn {
- color: $primary-color;
- transition: $transition;
- &:hover {
- color: $primary-light;
- transform: scale(1.1);
- }
- }
- }
- .no-contract {
- color: $text-tertiary;
- font-size: 12px;
- font-style: italic;
- }
- // 状态选择器样式
- .status-select {
- min-width: 100px;
- .mat-select-trigger {
- font-size: 14px;
- }
- }
- // 空状态样式
- .empty-state {
- text-align: center;
- padding: 60px 20px;
- .empty-icon {
- font-size: 48px;
- color: $text-tertiary;
- margin-bottom: 16px;
- }
- p {
- color: $text-secondary;
- font-size: 16px;
- margin-bottom: 24px;
- }
- }
- }
- // 分页组件
- .pagination {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 16px;
- background-color: $bg-primary;
- border-radius: $border-radius;
- box-shadow: $shadow-sm;
- .pagination-info {
- font-size: 14px;
- color: $text-secondary;
- }
- .mat-paginator {
- display: flex;
- justify-content: flex-end;
- flex: 1;
- }
- }
- // 自定义对话框样式
- .custom-dialog {
- .mat-dialog-container {
- border-radius: $border-radius;
- box-shadow: $shadow-lg;
- overflow: hidden;
- }
- }
- // 自定义通知消息样式
- .success-snackbar {
- background-color: $success-color;
- color: white;
- }
- .error-snackbar {
- background-color: $error-color;
- color: white;
- }
- // 动画定义
- @keyframes slideIn {
- from {
- opacity: 0;
- transform: translateY(-10px);
- }
- to {
- opacity: 1;
- transform: translateY(0);
- }
- }
- @keyframes pulse {
- 0%, 100% {
- opacity: 1;
- }
- 50% {
- opacity: 0.7;
- }
- }
- // 响应式设计
- @media (max-width: 1200px) {
- .assets-container {
- padding: 16px;
- }
- .action-bar {
- flex-direction: column;
- align-items: stretch;
- .search-filters {
- justify-content: space-between;
- }
- }
- }
- @media (max-width: 768px) {
- .assets-container {
- padding: 12px;
- }
- .page-header {
- text-align: center;
- }
- .action-bar {
- padding: 12px;
- .search-filters {
- flex-direction: column;
- align-items: stretch;
- .search-container,
- .filter-container,
- .filter-btn {
- width: 100%;
- min-width: auto;
- }
- }
- }
- .table-container {
- overflow-x: auto;
- }
- .pagination {
- flex-direction: column;
- gap: 12px;
- align-items: center;
- .mat-paginator {
- justify-content: center;
- }
- }
- }
|