| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022 |
- .employees-container {
- padding: 24px;
- background: #f5f5f5;
- min-height: 100vh;
- }
- .page-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 24px;
- h1 {
- font-size: 24px;
- font-weight: 600;
- margin: 0 0 8px 0;
- }
- .subtitle {
- color: #666;
- margin: 0;
- font-size: 14px;
- }
- }
- .stats-cards {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
- gap: 16px;
- margin-bottom: 24px;
- }
- .stat-card {
- background: white;
- border-radius: 8px;
- padding: 20px;
- text-align: center;
- cursor: pointer;
- border: 2px solid transparent;
- transition: all 0.3s;
- &:hover {
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
- }
- &.active {
- border-color: #165DFF;
- background: #E6F7FF;
- }
- .stat-value {
- font-size: 32px;
- font-weight: 600;
- margin-bottom: 8px;
- }
- .stat-label {
- color: #666;
- font-size: 14px;
- }
- }
- .filter-bar {
- background: white;
- border-radius: 8px;
- padding: 16px;
- margin-bottom: 16px;
- display: flex;
- gap: 12px;
- .search-input {
- flex: 1;
- padding: 8px 12px;
- border: 1px solid #ddd;
- border-radius: 4px;
- }
- }
- .data-table {
- background: white;
- border-radius: 8px;
- overflow: hidden;
- table {
- width: 100%;
- border-collapse: collapse;
- th, td {
- padding: 12px 16px;
- text-align: left;
- border-bottom: 1px solid #f0f0f0;
- }
- th {
- background: #fafafa;
- font-weight: 600;
- }
- tr.disabled {
- opacity: 0.5;
- }
- .badge {
- padding: 4px 8px;
- background: #E6F7FF;
- color: #165DFF;
- border-radius: 4px;
- font-size: 12px;
- }
- .status {
- padding: 4px 8px;
- border-radius: 4px;
- font-size: 12px;
- &.active {
- background: #E6F9F0;
- color: #00B42A;
- }
- &.disabled {
- background: #FFECE8;
- color: #F53F3F;
- }
- }
- .empty-state {
- text-align: center;
- padding: 60px;
- color: #999;
- }
- }
- }
- .btn {
- padding: 8px 16px;
- border-radius: 4px;
- border: none;
- cursor: pointer;
- &.btn-primary {
- background: #165DFF;
- color: white;
- }
- &.btn-secondary {
- background: white;
- border: 1px solid #ddd;
- }
- &.btn-default {
- background: white;
- border: 1px solid #ddd;
- }
- &.btn-text {
- background: none;
- color: #165DFF;
- }
- }
- .btn-icon {
- background: none;
- border: none;
- cursor: pointer;
- padding: 4px 8px;
- }
- // 侧边面板(与departments样式相同,省略...)
- .side-panel {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- pointer-events: none;
- z-index: 1000;
- &.open {
- pointer-events: auto;
- .panel-overlay {
- opacity: 1;
- }
- .panel-content {
- transform: translateX(0);
- }
- }
- .panel-overlay {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.4);
- opacity: 0;
- transition: opacity 0.3s;
- }
- .panel-content {
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- width: 480px;
- background: white;
- display: flex;
- flex-direction: column;
- transform: translateX(100%);
- transition: transform 0.3s;
- }
- .panel-header {
- padding: 20px;
- border-bottom: 1px solid #f0f0f0;
- display: flex;
- justify-content: space-between;
- align-items: center;
- h2 {
- margin: 0;
- font-size: 18px;
- font-weight: 600;
- }
- .btn-close {
- background: none;
- border: none;
- font-size: 24px;
- cursor: pointer;
- }
- }
- .panel-body {
- padding: 24px;
- overflow: auto;
- background: #fafafa;
- }
- .panel-footer {
- padding: 16px 24px;
- border-top: 1px solid #f0f0f0;
- display: flex;
- justify-content: flex-end;
- gap: 12px;
- background: white;
- .btn {
- min-width: 80px;
- padding: 10px 20px;
- font-size: 14px;
- font-weight: 500;
- border-radius: 6px;
- transition: all 0.2s;
- &.btn-default {
- background: white;
- border: 1px solid #ddd;
- color: #666;
- &:hover {
- border-color: #165DFF;
- color: #165DFF;
- }
- }
- &.btn-primary {
- background: #165DFF;
- color: white;
- border: none;
- &:hover {
- background: #0E4BD8;
- box-shadow: 0 2px 8px rgba(22, 93, 255, 0.3);
- }
- }
- }
- }
- // 详情视图 - 全新精美设计
- .detail-view {
- display: flex;
- flex-direction: column;
- gap: 20px;
- }
- // 详情头部
- .detail-header {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- border-radius: 16px;
- padding: 24px;
- color: white;
- box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
- }
- .detail-avatar-section {
- position: relative;
- display: flex;
- flex-direction: column;
- align-items: center;
- margin-bottom: 20px;
- .detail-avatar {
- width: 96px;
- height: 96px;
- border-radius: 50%;
- object-fit: cover;
- border: 4px solid rgba(255, 255, 255, 0.3);
- box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
- transition: transform 0.3s;
- &:hover {
- transform: scale(1.05);
- }
- }
- .detail-badge-container {
- display: flex;
- gap: 8px;
- margin-top: 12px;
- }
- .detail-role-badge {
- padding: 6px 14px;
- background: rgba(255, 255, 255, 0.25);
- backdrop-filter: blur(10px);
- border-radius: 20px;
- font-size: 12px;
- font-weight: 600;
- border: 1px solid rgba(255, 255, 255, 0.3);
- }
- .detail-status-badge {
- padding: 6px 14px;
- border-radius: 20px;
- font-size: 12px;
- font-weight: 600;
- border: 1px solid rgba(255, 255, 255, 0.3);
- &.active {
- background: rgba(0, 180, 42, 0.3);
- backdrop-filter: blur(10px);
- }
- &.disabled {
- background: rgba(245, 63, 63, 0.3);
- backdrop-filter: blur(10px);
- }
- }
- }
- .detail-info-section {
- text-align: center;
- }
- .detail-name-block {
- margin-bottom: 12px;
- .detail-realname {
- font-size: 24px;
- font-weight: 700;
- margin: 0 0 8px 0;
- text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
- }
- .detail-nickname {
- display: inline-block;
- padding: 4px 12px;
- background: rgba(255, 255, 255, 0.2);
- backdrop-filter: blur(10px);
- border-radius: 16px;
- font-size: 12px;
- font-weight: 500;
- border: 1px solid rgba(255, 255, 255, 0.3);
- }
- }
- .detail-position {
- display: inline-flex;
- align-items: center;
- gap: 6px;
- padding: 6px 14px;
- background: rgba(255, 255, 255, 0.2);
- backdrop-filter: blur(10px);
- border-radius: 20px;
- font-size: 13px;
- font-weight: 500;
- margin-bottom: 12px;
- border: 1px solid rgba(255, 255, 255, 0.3);
- svg {
- opacity: 0.9;
- }
- }
- .detail-meta {
- display: flex;
- justify-content: center;
- gap: 16px;
- flex-wrap: wrap;
- }
- .detail-meta-item {
- display: flex;
- align-items: center;
- gap: 6px;
- font-size: 12px;
- opacity: 0.95;
- svg {
- opacity: 0.8;
- }
- }
- // 详情分组
- .detail-section {
- background: white;
- border-radius: 12px;
- padding: 20px;
- border: 1px solid #f0f0f0;
- transition: all 0.3s;
- &:hover {
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
- border-color: #165DFF;
- }
- }
- .detail-section-title {
- display: flex;
- align-items: center;
- gap: 8px;
- font-size: 15px;
- font-weight: 600;
- color: #333;
- margin-bottom: 16px;
- padding-bottom: 12px;
- border-bottom: 2px solid #f0f0f0;
- svg {
- color: #165DFF;
- flex-shrink: 0;
- }
- }
- .detail-grid {
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 16px;
- }
- .detail-item {
- label {
- display: block;
- color: #888;
- font-size: 12px;
- margin-bottom: 6px;
- font-weight: 500;
- text-transform: uppercase;
- letter-spacing: 0.5px;
- }
- .detail-value {
- font-size: 14px;
- color: #333;
- font-weight: 600;
- word-break: break-word;
- }
- .badge {
- display: inline-block;
- padding: 4px 12px;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- color: white;
- border-radius: 16px;
- font-size: 12px;
- font-weight: 600;
- }
- }
- // 保留旧的样式支持
- .grid {
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 12px;
- }
- .avatar {
- width: 72px;
- height: 72px;
- border-radius: 50%;
- object-fit: cover;
- border: 3px solid #f0f0f0;
- }
- .title-block {
- .name {
- font-size: 20px;
- font-weight: 600;
- color: #333;
- margin-bottom: 4px;
- }
- .position {
- font-size: 13px;
- color: #888;
- }
- }
- .skills {
- margin-top: 8px;
- padding: 16px;
- background: white;
- border-radius: 12px;
- label {
- display: block;
- color: #666;
- font-size: 13px;
- margin-bottom: 12px;
- font-weight: 500;
- }
- }
- .tags {
- display: flex;
- gap: 8px;
- flex-wrap: wrap;
- }
- .tag {
- padding: 6px 12px;
- border-radius: 16px;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- color: white;
- font-size: 12px;
- font-weight: 500;
- }
- .workload {
- padding: 16px;
- background: white;
- border-radius: 12px;
- label {
- display: block;
- color: #666;
- font-size: 13px;
- margin-bottom: 12px;
- font-weight: 500;
- }
- }
- // 表单视图
- .form-view {
- display: flex;
- flex-direction: column;
- gap: 24px;
- }
- .form-avatar-section {
- display: flex;
- align-items: center;
- gap: 16px;
- padding: 20px;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- border-radius: 12px;
- color: white;
- .form-avatar {
- width: 64px;
- height: 64px;
- border-radius: 50%;
- object-fit: cover;
- border: 3px solid rgba(255, 255, 255, 0.3);
- }
- .form-avatar-info {
- flex: 1;
- .form-avatar-name {
- font-size: 18px;
- font-weight: 600;
- margin-bottom: 4px;
- }
- .form-avatar-id {
- font-size: 12px;
- opacity: 0.9;
- }
- }
- }
- .form-section {
- padding: 20px;
- background: white;
- border-radius: 12px;
- border: 1px solid #f0f0f0;
- .form-section-title {
- display: flex;
- align-items: center;
- gap: 8px;
- font-size: 15px;
- font-weight: 600;
- color: #333;
- margin-bottom: 20px;
- padding-bottom: 12px;
- border-bottom: 2px solid #f0f0f0;
- svg {
- color: #165DFF;
- }
- }
- }
- .form-group {
- margin-bottom: 20px;
- &:last-child {
- margin-bottom: 0;
- }
- .form-label {
- display: block;
- font-size: 13px;
- font-weight: 500;
- color: #333;
- margin-bottom: 8px;
- &.required::after {
- content: ' *';
- color: #F53F3F;
- }
- }
- .form-input,
- .form-select {
- width: 100%;
- padding: 10px 14px;
- border: 1px solid #ddd;
- border-radius: 8px;
- font-size: 14px;
- color: #333;
- transition: all 0.2s;
- background: white;
- &:focus {
- outline: none;
- border-color: #165DFF;
- box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
- }
- &:disabled {
- background: #f5f5f5;
- color: #999;
- cursor: not-allowed;
- }
- &::placeholder {
- color: #bbb;
- }
- }
- .form-hint {
- margin-top: 6px;
- font-size: 12px;
- color: #888;
- }
- }
- .status-toggle {
- display: flex;
- gap: 12px;
- .status-option {
- flex: 1;
- display: flex;
- align-items: center;
- gap: 10px;
- padding: 12px 16px;
- border: 2px solid #e5e7eb;
- border-radius: 8px;
- cursor: pointer;
- transition: all 0.2s;
- background: white;
- input[type="radio"] {
- display: none;
- }
- .status-dot {
- width: 12px;
- height: 12px;
- border-radius: 50%;
- &.active {
- background: #00B42A;
- box-shadow: 0 0 0 3px rgba(0, 180, 42, 0.2);
- }
- &.disabled {
- background: #F53F3F;
- box-shadow: 0 0 0 3px rgba(245, 63, 63, 0.2);
- }
- }
- span:not(.status-dot) {
- font-size: 14px;
- font-weight: 500;
- color: #666;
- }
- &.active {
- border-color: #165DFF;
- background: #f0f7ff;
- span:not(.status-dot) {
- color: #165DFF;
- }
- }
- &:hover {
- border-color: #165DFF;
- }
- }
- }
- .form-notice {
- display: flex;
- gap: 12px;
- padding: 16px;
- background: #fff7e6;
- border: 1px solid #ffd666;
- border-radius: 8px;
- svg {
- flex-shrink: 0;
- color: #fa8c16;
- margin-top: 2px;
- }
- .form-notice-title {
- font-size: 13px;
- font-weight: 600;
- color: #d46b08;
- margin-bottom: 4px;
- }
- .form-notice-text {
- font-size: 12px;
- color: #ad6800;
- line-height: 1.5;
- }
- }
- .panel-header h2 {
- display: flex;
- align-items: center;
- gap: 10px;
- &::before {
- content: "👤";
- font-size: 20px;
- }
- }
- }
- // ========================================
- // 员工管理移动端适配
- // ========================================
- @media (max-width: 768px) {
- .employees-container {
- padding: 12px;
- }
- .page-header {
- flex-direction: column;
- align-items: flex-start;
- gap: 16px;
- h1 {
- font-size: 20px;
- }
- .header-actions {
- width: 100%;
- button {
- width: 100%;
- }
- }
- }
- // 统计卡片适配
- .stats-cards {
- grid-template-columns: repeat(2, 1fr);
- gap: 12px;
- }
- .stat-card {
- padding: 16px;
- .stat-value {
- font-size: 24px;
- }
- .stat-label {
- font-size: 12px;
- }
- }
- // 搜索筛选区域
- .search-filter-section {
- flex-direction: column;
- gap: 12px;
- .search-input,
- .department-filter,
- .status-filter {
- width: 100%;
- min-width: 100%;
- }
- }
- // 员工列表表格卡片式
- .employees-table {
- thead {
- display: none;
- }
- tbody {
- display: block;
- }
- tr {
- display: block;
- border: 1px solid #e5e7eb;
- border-radius: 12px;
- padding: 16px;
- margin-bottom: 12px;
- background: white;
- }
- td {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 10px 0;
- border: none;
- &::before {
- content: attr(data-label);
- font-weight: 600;
- color: #666;
- font-size: 13px;
- margin-right: 12px;
- }
- &:not(:last-child) {
- border-bottom: 1px solid #f5f5f5;
- }
- }
- .employee-info {
- flex-direction: row;
- justify-content: flex-start;
- .avatar {
- width: 40px;
- height: 40px;
- }
- .info {
- .name {
- font-size: 14px;
- }
- .mobile,
- .userid {
- font-size: 12px;
- }
- }
- }
- .action-buttons {
- justify-content: center;
- gap: 8px;
- button {
- min-width: 32px;
- padding: 6px;
- }
- }
- }
- // 编辑面板全屏显示
- .edit-panel-overlay {
- padding: 0;
- }
- .edit-panel {
- width: 100vw;
- max-width: 100vw;
- height: 100vh;
- max-height: 100vh;
- border-radius: 0;
- .panel-header {
- padding: 16px;
- position: sticky;
- top: 0;
- z-index: 10;
- h2 {
- font-size: 18px;
- }
- .close-btn {
- width: 36px;
- height: 36px;
- }
- }
- .panel-body {
- padding: 16px;
- height: calc(100vh - 140px);
- .form-avatar-section {
- padding: 20px 16px;
- .avatar-container {
- width: 80px;
- height: 80px;
- }
- .employee-name {
- font-size: 18px;
- }
- .employee-id {
- font-size: 13px;
- }
- }
- .form-section {
- padding: 16px;
- margin-bottom: 12px;
- .section-title {
- font-size: 15px;
- }
- .form-group {
- margin-bottom: 16px;
- .form-label {
- font-size: 13px;
- }
- .form-input,
- .form-select {
- font-size: 16px; // 防止iOS自动缩放
- padding: 12px;
- }
- }
- .status-toggle {
- .toggle-option {
- padding: 12px;
- .option-label {
- font-size: 14px;
- }
- }
- }
- }
- .form-notice {
- padding: 12px;
- font-size: 12px;
- }
- }
- .panel-footer {
- padding: 16px;
- position: sticky;
- bottom: 0;
- flex-direction: column;
- gap: 12px;
- button {
- width: 100%;
- }
- }
- }
- }
- @media (max-width: 480px) {
- .employees-container {
- padding: 8px;
- }
- .page-header h1 {
- font-size: 18px;
- }
- .stats-cards {
- grid-template-columns: 1fr;
- }
- .stat-card {
- padding: 12px;
- .stat-value {
- font-size: 20px;
- }
- }
- }
|