employee-records.scss 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  1. @import '../../../shared/styles/variables';
  2. @import '../../../shared/styles/ios-theme';
  3. .employee-records-container {
  4. padding: $ios-spacing-lg;
  5. .page-header {
  6. display: flex;
  7. justify-content: space-between;
  8. align-items: center;
  9. margin-bottom: $ios-spacing-lg;
  10. .title-section {
  11. h1 {
  12. margin: 0;
  13. font-size: $ios-font-size-title-1;
  14. font-weight: $ios-font-weight-semibold;
  15. color: $ios-text-primary;
  16. font-family: $ios-font-family;
  17. }
  18. .subtitle {
  19. margin: $ios-spacing-xs 0 0;
  20. color: $ios-text-secondary;
  21. font-size: $ios-font-size-subhead;
  22. font-family: $ios-font-family;
  23. }
  24. }
  25. .action-buttons {
  26. display: flex;
  27. gap: $ios-spacing-sm;
  28. button[mat-raised-button][color='warn'] {
  29. background: $ios-error;
  30. color: white;
  31. }
  32. button[mat-raised-button][color='primary'] {
  33. background: $ios-primary;
  34. color: white;
  35. }
  36. }
  37. }
  38. .filter-card {
  39. margin-bottom: $ios-spacing-lg;
  40. background: $ios-card-background;
  41. border-radius: $ios-radius-lg;
  42. box-shadow: $ios-shadow-card;
  43. border: 1px solid $ios-border;
  44. .filter-form {
  45. display: flex;
  46. flex-wrap: wrap;
  47. gap: $ios-spacing-md;
  48. align-items: center;
  49. mat-form-field {
  50. flex: 1;
  51. min-width: 200px;
  52. }
  53. }
  54. }
  55. .employee-table-container {
  56. background-color: $ios-card-background;
  57. border-radius: $ios-radius-lg;
  58. box-shadow: $ios-shadow-card;
  59. margin-bottom: $ios-spacing-lg;
  60. overflow: auto;
  61. border: 1px solid $ios-border;
  62. .employee-table {
  63. width: 100%;
  64. th.mat-header-cell {
  65. background: $ios-background-secondary;
  66. color: $ios-text-primary;
  67. font-weight: $ios-font-weight-semibold;
  68. padding: $ios-spacing-sm $ios-spacing-md;
  69. font-family: $ios-font-family;
  70. }
  71. td.mat-cell {
  72. padding: $ios-spacing-sm $ios-spacing-md;
  73. font-family: $ios-font-family;
  74. }
  75. .status-badge {
  76. display: inline-block;
  77. padding: $ios-spacing-xs $ios-spacing-sm;
  78. border-radius: $ios-radius-full;
  79. font-size: $ios-font-size-caption-1;
  80. font-weight: $ios-font-weight-medium;
  81. text-align: center;
  82. min-width: 60px;
  83. font-family: $ios-font-family;
  84. &.status-active {
  85. background-color: rgba(52, 199, 89, 0.1);
  86. color: $ios-success;
  87. }
  88. &.status-probation {
  89. background-color: rgba(255, 149, 0, 0.1);
  90. color: $ios-warning;
  91. }
  92. &.status-resigned {
  93. background-color: $ios-background-secondary;
  94. color: $ios-text-tertiary;
  95. }
  96. }
  97. }
  98. .empty-state {
  99. display: flex;
  100. flex-direction: column;
  101. align-items: center;
  102. justify-content: center;
  103. padding: $ios-spacing-xxl $ios-spacing-lg;
  104. text-align: center;
  105. mat-icon {
  106. font-size: 48px;
  107. height: 48px;
  108. width: 48px;
  109. color: $ios-text-tertiary;
  110. margin-bottom: $ios-spacing-md;
  111. }
  112. p {
  113. color: $ios-text-secondary;
  114. margin-bottom: $ios-spacing-md;
  115. font-family: $ios-font-family;
  116. }
  117. }
  118. }
  119. mat-paginator {
  120. margin-bottom: $ios-spacing-lg;
  121. background: $ios-card-background;
  122. border-radius: $ios-radius-md;
  123. box-shadow: $ios-shadow-sm;
  124. border: 1px solid $ios-border;
  125. }
  126. .quick-actions {
  127. display: grid;
  128. grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  129. gap: $ios-spacing-lg;
  130. margin-bottom: $ios-spacing-lg;
  131. .quick-action-card {
  132. background: $ios-card-background;
  133. border-radius: $ios-radius-lg;
  134. transition: all $ios-transition-duration $ios-transition-timing-function;
  135. box-shadow: $ios-shadow-card;
  136. border: 1px solid $ios-border;
  137. &:hover {
  138. transform: translateY(-2px);
  139. box-shadow: $ios-shadow-lg;
  140. }
  141. mat-card-header {
  142. margin-bottom: $ios-spacing-md;
  143. mat-icon {
  144. background: rgba(0, 122, 255, 0.1);
  145. color: $ios-primary;
  146. display: flex;
  147. align-items: center;
  148. justify-content: center;
  149. border-radius: 50%;
  150. }
  151. }
  152. mat-card-content {
  153. font-family: $ios-font-family;
  154. .highlight-count {
  155. font-weight: $ios-font-weight-semibold;
  156. color: $ios-text-primary;
  157. font-size: $ios-font-size-lg;
  158. }
  159. }
  160. mat-card-actions {
  161. padding: $ios-spacing-sm $ios-spacing-md $ios-spacing-md;
  162. }
  163. }
  164. }
  165. // Material 选择面板样式
  166. :host ::ng-deep .hr-select-panel {
  167. background: $ios-card-background;
  168. border-radius: $ios-radius-md !important;
  169. box-shadow: $ios-shadow-lg;
  170. border: 1px solid $ios-border;
  171. .mat-mdc-option.mdc-list-item {
  172. padding: $ios-spacing-sm $ios-spacing-md;
  173. font-family: $ios-font-family;
  174. }
  175. .mdc-list-item__primary-text {
  176. color: $ios-text-primary;
  177. }
  178. .mat-mdc-option.mdc-list-item--selected .mdc-list-item__primary-text {
  179. color: $ios-primary;
  180. font-weight: $ios-font-weight-semibold;
  181. }
  182. }
  183. // Material 菜单面板样式
  184. :host ::ng-deep .hr-menu-panel {
  185. background: $ios-card-background;
  186. border-radius: $ios-radius-md !important;
  187. box-shadow: $ios-shadow-lg;
  188. border: 1px solid $ios-border;
  189. }
  190. // HR 对话框统一样式
  191. :host ::ng-deep .hr-dialog {
  192. .mat-mdc-dialog-container .mdc-dialog__surface {
  193. border-radius: $ios-radius-lg;
  194. background: $ios-card-background;
  195. box-shadow: $ios-shadow-lg;
  196. border: 1px solid $ios-border;
  197. }
  198. .mat-mdc-dialog-title {
  199. color: $ios-text-primary;
  200. font-weight: $ios-font-weight-semibold;
  201. font-family: $ios-font-family;
  202. }
  203. .mat-mdc-dialog-actions {
  204. padding: $ios-spacing-sm $ios-spacing-lg $ios-spacing-md;
  205. .mat-mdc-raised-button {
  206. background: $ios-primary;
  207. color: white;
  208. }
  209. }
  210. }
  211. }
  212. // 响应式布局调整
  213. @media (max-width: 768px) {
  214. .employee-records-container {
  215. padding: $ios-spacing-md;
  216. .page-header {
  217. flex-direction: column;
  218. align-items: flex-start;
  219. gap: $ios-spacing-md;
  220. .action-buttons {
  221. width: 100%;
  222. justify-content: flex-start;
  223. flex-wrap: wrap;
  224. }
  225. }
  226. .quick-actions {
  227. grid-template-columns: 1fr;
  228. }
  229. }
  230. }
  231. .actions-cell {
  232. display: flex;
  233. align-items: center;
  234. gap: $ios-spacing-xs;
  235. min-height: $ios-list-item-height;
  236. }
  237. .view-detail-chip {
  238. cursor: pointer;
  239. height: 32px;
  240. line-height: 32px;
  241. border-radius: $ios-radius-md;
  242. padding: 0 $ios-spacing-sm;
  243. display: flex;
  244. align-items: center;
  245. justify-content: center;
  246. font-family: $ios-font-family;
  247. mat-icon {
  248. font-size: 18px;
  249. height: 18px;
  250. width: 18px;
  251. margin-right: $ios-spacing-xs;
  252. }
  253. }
  254. // 修复表格行高度对齐问题
  255. .employee-records-container {
  256. // 当有敏感信息展开时,轻微扩大表格容器可视宽度(通过阴影与过渡体现)
  257. &.sensitive-expanded .employee-table-container {
  258. box-shadow: $ios-shadow-lg;
  259. transition: box-shadow $ios-transition-duration ease;
  260. }
  261. }
  262. .employee-table-container {
  263. .employee-table {
  264. .idcard,
  265. .bankcard {
  266. font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  267. letter-spacing: 0.3px;
  268. white-space: nowrap;
  269. max-width: 160px;
  270. display: inline-block;
  271. overflow: hidden;
  272. text-overflow: ellipsis;
  273. transition: max-width $ios-transition-duration ease;
  274. &.expanded {
  275. max-width: 360px;
  276. }
  277. }
  278. .muted {
  279. color: $ios-text-tertiary;
  280. }
  281. td.mat-cell {
  282. .mat-icon {
  283. color: $ios-primary;
  284. }
  285. button.mat-icon-button:hover .mat-icon {
  286. color: rgba(0, 122, 255, 0.8);
  287. }
  288. }
  289. }
  290. }
  291. // 三点图标按钮样式 - iOS风格
  292. .more-actions-btn {
  293. width: 32px !important;
  294. height: 32px !important;
  295. border-radius: $ios-radius-md !important;
  296. background: transparent !important;
  297. border: none !important;
  298. transition: all $ios-transition-duration $ios-transition-timing-function !important;
  299. display: flex !important;
  300. align-items: center !important;
  301. justify-content: center !important;
  302. cursor: pointer !important;
  303. // iOS风格的悬停效果
  304. &:hover {
  305. background: rgba(0, 122, 255, 0.08) !important;
  306. transform: scale(1.05) !important;
  307. }
  308. // iOS风格的点击反馈
  309. &:active {
  310. transform: scale(0.95) !important;
  311. background: rgba(0, 122, 255, 0.12) !important;
  312. }
  313. // 图标样式
  314. .mat-icon {
  315. font-size: 20px !important;
  316. width: 20px !important;
  317. height: 20px !important;
  318. color: $ios-text-secondary !important;
  319. transition: color $ios-transition-duration $ios-transition-timing-function !important;
  320. }
  321. // 悬停时图标颜色变化
  322. &:hover .mat-icon {
  323. color: $ios-primary !important;
  324. }
  325. // 焦点状态
  326. &:focus {
  327. outline: none !important;
  328. background: rgba(0, 122, 255, 0.08) !important;
  329. box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2) !important;
  330. }
  331. }