123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542 |
- // 全局变量定义
- $primary-color: #165DFF;
- $primary-dark: #0E42CB;
- $secondary-color: #4E5BA6;
- $success-color: #00B42A;
- $warning-color: #FF7D00;
- $danger-color: #F53F3F;
- $text-primary: #1D2129;
- $text-secondary: #4E5969;
- $text-tertiary: #86909C;
- $border-color: #E5E6EB;
- $background-primary: #FFFFFF;
- $background-secondary: #F2F3F5;
- $background-tertiary: #F7F8FA;
- $shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
- $shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
- $shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
- $border-radius: 8px;
- $transition: all 0.3s ease;
- // 欢迎区域
- .welcome-section {
- margin-bottom: 24px;
- h2 {
- font-size: 24px;
- font-weight: 600;
- margin-bottom: 8px;
- color: $text-primary;
- }
- p {
- font-size: 14px;
- color: $text-secondary;
- }
- }
- // 数据看板
- .stats-dashboard {
- margin-bottom: 24px;
- .stats-grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
- gap: 16px;
- }
- .stat-card {
- display: flex;
- align-items: center;
- gap: 16px;
- padding: 20px;
- background-color: $background-primary;
- border-radius: $border-radius;
- box-shadow: $shadow-sm;
- transition: $transition;
- &:hover {
- box-shadow: $shadow-md;
- transform: translateY(-2px);
- }
- .stat-icon {
- width: 48px;
- height: 48px;
- border-radius: 12px;
- display: flex;
- align-items: center;
- justify-content: center;
- color: white;
- &.primary {
- background-color: $primary-color;
- }
- &.secondary {
- background-color: $secondary-color;
- }
- &.warning {
- background-color: $warning-color;
- }
- &.success {
- background-color: $success-color;
- }
- }
- .stat-content {
- flex: 1;
- .stat-value {
- font-size: 28px;
- font-weight: 600;
- color: $text-primary;
- margin-bottom: 4px;
- }
- .stat-label {
- font-size: 14px;
- color: $text-secondary;
- }
- }
- .stat-trend {
- padding: 4px 10px;
- border-radius: 12px;
- font-size: 12px;
- font-weight: 500;
- &.positive {
- background-color: color-mix(in srgb, $success-color 10%, transparent);
- color: $success-color;
- }
- &.negative {
- background-color: color-mix(in srgb, $danger-color 10%, transparent);
- color: $danger-color;
- }
- &.neutral {
- background-color: color-mix(in srgb, $text-tertiary 10%, transparent);
- color: $text-tertiary;
- }
- }
- }
- }
- // 内容网格
- .content-grid {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 24px;
- margin-bottom: 24px;
- }
- // 通用区块头部
- .section-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 16px;
- h3 {
- font-size: 18px;
- font-weight: 600;
- color: $text-primary;
- }
- .view-all-link {
- color: $primary-color;
- text-decoration: none;
- font-size: 14px;
- transition: $transition;
- &:hover {
- text-decoration: underline;
- }
- }
- .search-box {
- max-width: 200px;
- .search-input {
- width: 100%;
- padding: 6px 12px;
- border: 1px solid $border-color;
- border-radius: $border-radius;
- font-size: 14px;
- background-color: $background-primary;
- color: $text-primary;
- &::placeholder {
- color: $text-tertiary;
- }
- &:focus {
- outline: none;
- border-color: $primary-color;
- box-shadow: 0 0 0 2px color-mix(in srgb, $primary-color 20%, transparent);
- }
- }
- }
- }
- // 紧急待办列表
- .urgent-tasks-section {
- background-color: $background-primary;
- border-radius: $border-radius;
- padding: 24px;
- box-shadow: $shadow-sm;
- .tasks-list {
- display: flex;
- flex-direction: column;
- gap: 12px;
- }
- .empty-state {
- text-align: center;
- padding: 40px 20px;
- color: $text-tertiary;
- svg {
- margin-bottom: 16px;
- opacity: 0.5;
- }
- p {
- font-size: 14px;
- }
- }
- .task-item {
- display: flex;
- align-items: flex-start;
- gap: 12px;
- padding: 16px;
- border: 1px solid $border-color;
- border-radius: $border-radius;
- transition: $transition;
- &:hover {
- border-color: $primary-color;
- box-shadow: 0 2px 8px color-mix(in srgb, $primary-color 10%, transparent);
- }
- &.completed {
- opacity: 0.6;
- background-color: $background-tertiary;
- }
- &.overdue {
- border-color: $danger-color;
- background-color: color-mix(in srgb, $danger-color 5%, transparent);
- }
- .task-checkbox {
- margin-top: 2px;
- input[type="checkbox"] {
- width: 18px;
- height: 18px;
- cursor: pointer;
- }
- }
- .task-content {
- flex: 1;
- .task-title {
- font-size: 16px;
- font-weight: 500;
- color: $text-primary;
- margin-bottom: 4px;
- }
- .task-project {
- font-size: 13px;
- color: $text-secondary;
- margin-bottom: 8px;
- }
- .task-meta {
- display: flex;
- gap: 16px;
- font-size: 12px;
- color: $text-tertiary;
- }
- }
- .task-actions {
- display: flex;
- align-items: flex-start;
- }
- }
- }
- // 项目动态流
- .project-updates-section {
- background-color: $background-primary;
- border-radius: $border-radius;
- padding: 24px;
- box-shadow: $shadow-sm;
- .updates-list {
- display: flex;
- flex-direction: column;
- gap: 16px;
- }
- .empty-state {
- text-align: center;
- padding: 40px 20px;
- color: $text-tertiary;
- svg {
- margin-bottom: 16px;
- opacity: 0.5;
- }
- p {
- font-size: 14px;
- }
- }
- .update-item {
- display: flex;
- gap: 12px;
- padding: 16px;
- border: 1px solid $border-color;
- border-radius: $border-radius;
- transition: $transition;
- &:hover {
- border-color: $primary-color;
- box-shadow: 0 2px 8px color-mix(in srgb, $primary-color 10%, transparent);
- }
- .update-icon {
- width: 40px;
- height: 40px;
- border-radius: 10px;
- background-color: color-mix(in srgb, $primary-color 10%, transparent);
- display: flex;
- align-items: center;
- justify-content: center;
- color: $primary-color;
- flex-shrink: 0;
- }
- .update-content {
- flex: 1;
- .update-title {
- font-size: 15px;
- font-weight: 500;
- color: $text-primary;
- margin-bottom: 4px;
- }
- .update-text {
- font-size: 14px;
- color: $text-secondary;
- margin-bottom: 8px;
- line-height: 1.5;
- }
- .update-meta {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .update-time {
- font-size: 12px;
- color: $text-tertiary;
- }
- .update-status {
- font-size: 12px;
- font-weight: 500;
- padding: 2px 8px;
- border-radius: 10px;
- &.completed {
- background-color: color-mix(in srgb, $success-color 10%, transparent);
- color: $success-color;
- }
- &.pending {
- background-color: color-mix(in srgb, $primary-color 10%, transparent);
- color: $primary-color;
- }
- &.exception {
- background-color: color-mix(in srgb, $danger-color 10%, transparent);
- color: $danger-color;
- }
- }
- }
- }
- }
- }
- // 按钮样式
- .btn-primary {
- padding: 8px 16px;
- background-color: $primary-color;
- color: white;
- border: none;
- border-radius: $border-radius;
- font-size: 14px;
- font-weight: 500;
- cursor: pointer;
- transition: $transition;
- &:hover {
- background-color: $primary-dark;
- transform: translateY(-1px);
- box-shadow: $shadow-md;
- }
- &:active {
- transform: translateY(0);
- }
- &:disabled {
- background-color: $text-tertiary;
- cursor: not-allowed;
- transform: none;
- box-shadow: none;
- }
- }
- // 回到顶部按钮
- .back-to-top {
- position: fixed;
- bottom: 20px;
- right: 20px;
- width: 40px;
- height: 40px;
- border-radius: 50%;
- background-color: #1976d2;
- color: white;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- opacity: 0;
- visibility: hidden;
- transition: opacity 0.3s, visibility 0.3s;
- border: none;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
- }
- .back-to-top.visible {
- opacity: 1;
- visibility: visible;
- }
- .back-to-top:hover {
- background-color: #1565c0;
- }
- // 响应式设计
- @media (max-width: 1024px) {
- .content-grid {
- grid-template-columns: 1fr;
- }
- .stats-dashboard .stats-grid {
- grid-template-columns: repeat(2, 1fr);
- }
- }
- @media (max-width: 768px) {
- .welcome-section {
- margin-bottom: 16px;
- h2 {
- font-size: 20px;
- }
- }
- .stats-dashboard {
- margin-bottom: 16px;
- .stats-grid {
- grid-template-columns: 1fr;
- gap: 12px;
- }
- .stat-card {
- padding: 16px;
- .stat-icon {
- width: 40px;
- height: 40px;
- }
- .stat-value {
- font-size: 24px;
- }
- }
- }
- .content-grid {
- gap: 16px;
- margin-bottom: 16px;
- }
- .section-header {
- flex-direction: column;
- align-items: flex-start;
- gap: 12px;
- h3 {
- font-size: 16px;
- }
- .search-box {
- max-width: 100%;
- width: 100%;
- }
- }
- .urgent-tasks-section,
- .project-updates-section {
- padding: 16px;
- }
- .task-item,
- .update-item {
- padding: 12px;
- }
- .back-to-top {
- bottom: 16px;
- right: 16px;
- width: 36px;
- height: 36px;
- }
- }
- @media (max-width: 480px) {
- .task-item {
- flex-direction: column;
- align-items: flex-start;
- .task-actions {
- margin-top: 12px;
- align-self: flex-end;
- }
- }
- .update-item {
- .update-icon {
- width: 32px;
- height: 32px;
- }
- }
- }
|