deploy-hxtesting / build-and-deploy (push) Successful in 1m14s
课程管理:canDeleteCourse 超管不限状态/部门(已审核/已发布行可删,确认弹窗文案区分);批量删除按钮超管可见 月培训计划:已发布行的「删除」仅超管可见(普通维护角色仍只能删未发布计划),行内确认弹窗替代原 window.confirm,失败时透出后端文案 Training.vue:canManageTabs 加入 super_admin,纯超管(未兼其他角色)也能进入这三个页面执行删除
296 lines
6.5 KiB
Plaintext
296 lines
6.5 KiB
Plaintext
// 企业培训模块共享样式 mixin。
|
||
// 与「AI助理 / 知识库 / 工具箱」等页面保持同一套视觉语言:
|
||
// 页面容器 .resource-list-content、卡片 .resource-card 规范、工具箱式横向页签。
|
||
@import (reference) '@/components/css/resource-card.less';
|
||
|
||
// 页面容器:与知识库 / 工具箱页同款(统一内边距与滚动结构)
|
||
.training-page-frame() {
|
||
.resource-list-content();
|
||
color: var(--td-text-color-primary);
|
||
}
|
||
|
||
// 页头:24px 资源图标 + 页签名称 + 角色标签,下配副标题(同知识库页头层级)
|
||
.training-header() {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 4px;
|
||
margin-bottom: 12px;
|
||
flex-shrink: 0;
|
||
|
||
.training-title-row {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: var(--app-space-4);
|
||
}
|
||
|
||
.training-title-group {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
min-width: 0;
|
||
}
|
||
|
||
h2 {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
margin: 0;
|
||
font-family: var(--app-font-family);
|
||
font-size: var(--app-text-4xl);
|
||
font-weight: 600;
|
||
line-height: 32px;
|
||
}
|
||
|
||
.training-subtitle {
|
||
margin: 0;
|
||
color: var(--td-text-color-secondary);
|
||
font-family: var(--app-font-family);
|
||
font-size: var(--app-text-base);
|
||
font-weight: 400;
|
||
line-height: 20px;
|
||
}
|
||
}
|
||
|
||
// 横向页签条:与工具箱页 toolbox-tabbar 同款交互(底部描边 + 品牌色下划线)
|
||
.training-tabbar() {
|
||
flex-shrink: 0;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 16px;
|
||
border-bottom: 1px solid var(--td-component-stroke);
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
.training-tabs() {
|
||
flex: 1;
|
||
min-width: 0;
|
||
display: flex;
|
||
gap: 24px;
|
||
overflow-x: auto;
|
||
scrollbar-width: none;
|
||
}
|
||
|
||
.training-tab() {
|
||
position: relative;
|
||
flex-shrink: 0;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
height: 44px;
|
||
padding: 0 2px;
|
||
border: 0;
|
||
background: transparent;
|
||
color: var(--td-text-color-secondary);
|
||
font: inherit;
|
||
font-size: var(--app-text-base);
|
||
font-weight: 500;
|
||
cursor: pointer;
|
||
transition: color var(--app-motion-fast) ease;
|
||
|
||
&::after {
|
||
content: '';
|
||
position: absolute;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: -1px;
|
||
height: 2px;
|
||
border-radius: var(--app-radius-pill);
|
||
background: transparent;
|
||
transition: background var(--app-motion-fast) ease;
|
||
}
|
||
|
||
&:hover {
|
||
color: var(--td-text-color-primary);
|
||
}
|
||
|
||
&[aria-selected='true'] {
|
||
color: var(--td-text-color-primary);
|
||
|
||
> .t-icon,
|
||
> svg {
|
||
color: var(--td-brand-color);
|
||
}
|
||
|
||
&::after {
|
||
background: var(--td-brand-color);
|
||
}
|
||
}
|
||
|
||
&:focus-visible {
|
||
outline: 2px solid var(--td-brand-color);
|
||
outline-offset: -2px;
|
||
border-radius: var(--app-radius-sm);
|
||
}
|
||
}
|
||
|
||
// 列表页满屏布局(年培训计划/月培训计划/课程管理):页头(标题)固定不动,
|
||
// 面板占满页身剩余高度,内部「面板标题/筛选区/分页」固定,仅表格数据区滚动。
|
||
// 约定:panel-box 收为 flex 列,表格外包一层 .table-scroll(flex:1 撑满剩余
|
||
// 高度),表格传 height="100%" 启用 TDesign 固定表头(thead sticky + 数据行滚动)。
|
||
.training-fill-panel() {
|
||
height: 100%;
|
||
min-height: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
|
||
> .panel-box {
|
||
flex: 1;
|
||
min-height: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
> .panel-box > .panel-box__header,
|
||
> .panel-box > .panel-box__sub {
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
> .panel-box > .table-scroll {
|
||
flex: 1;
|
||
min-height: 0;
|
||
|
||
// 满屏关键:TDesign 的 height="100%" 落在内部 .t-table__content 上,而其父级
|
||
// .t-table 根默认 auto 高,百分比会退化为内容高(表头固定不生效);给根也撑满
|
||
// 100% 形成确定高度链,数据区才会真正滚动
|
||
> .t-table {
|
||
height: 100%;
|
||
}
|
||
}
|
||
|
||
> .panel-box > .training-pagination {
|
||
flex-shrink: 0;
|
||
}
|
||
}
|
||
|
||
// 内容卡片:对齐知识库 resource-card 规范(描边 + 8px 圆角 + 容器底色)
|
||
.training-panel-box() {
|
||
background: var(--td-bg-color-container);
|
||
border: 1px solid var(--td-component-stroke);
|
||
border-radius: var(--app-radius-md);
|
||
padding: 14px 16px;
|
||
|
||
&__header {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
gap: 12px;
|
||
margin-bottom: 10px;
|
||
}
|
||
|
||
&__title {
|
||
font-weight: 600;
|
||
font-size: var(--app-text-lg);
|
||
}
|
||
|
||
&__actions {
|
||
display: flex;
|
||
gap: 8px;
|
||
flex-shrink: 0;
|
||
}
|
||
}
|
||
|
||
// 双列卡片网格(同 Dashboard / Learning / Exam 面板布局)
|
||
.training-panel-grid() {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 12px;
|
||
margin-bottom: 12px;
|
||
|
||
@media (max-width: 900px) {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
}
|
||
|
||
// 统计卡片组(工作台 / 签到页使用)
|
||
.training-stat-cards() {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||
gap: 12px;
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
// 表单项内提示文案统一另起一行(000163):t-form__controls-content 为 flex 行排布,
|
||
// 控件后的提示块(bank-hint/form-hint)会被排到控件右侧,此处强制换行占满整行,
|
||
// 统一展示在控件下方
|
||
.training-form-hints-below() {
|
||
:deep(.t-form__controls-content) {
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
:deep(.t-form__controls-content .bank-hint),
|
||
:deep(.t-form__controls-content .form-hint) {
|
||
flex-basis: 100%;
|
||
}
|
||
}
|
||
|
||
.training-stat-card() {
|
||
background: var(--td-bg-color-secondarycontainer);
|
||
border-radius: var(--app-radius-md);
|
||
padding: 14px 16px;
|
||
|
||
&__label {
|
||
color: var(--td-text-color-secondary);
|
||
font-size: var(--app-text-md);
|
||
}
|
||
|
||
&__value {
|
||
font-size: 26px;
|
||
font-weight: 700;
|
||
margin-top: 4px;
|
||
}
|
||
|
||
&__sub {
|
||
color: var(--td-text-color-placeholder);
|
||
font-size: var(--app-text-sm);
|
||
margin-top: 2px;
|
||
}
|
||
}
|
||
|
||
.training-tone() {
|
||
&.tone-good {
|
||
color: var(--td-success-color);
|
||
}
|
||
|
||
&.tone-warn {
|
||
color: var(--td-warning-color);
|
||
}
|
||
|
||
&.tone-bad {
|
||
color: var(--td-error-color);
|
||
}
|
||
}
|
||
|
||
// 进度行 / 列表行(工作台排名、AI 盘点等)
|
||
.training-progress-row() {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
padding: 6px 0;
|
||
|
||
.progress-row__name {
|
||
width: 90px;
|
||
flex-shrink: 0;
|
||
font-size: var(--app-text-md);
|
||
}
|
||
|
||
.progress-row__bar {
|
||
flex: 1;
|
||
}
|
||
|
||
.progress-row__meta {
|
||
width: 80px;
|
||
text-align: right;
|
||
color: var(--td-text-color-secondary);
|
||
font-size: var(--app-text-sm);
|
||
}
|
||
}
|
||
|
||
.training-list-row() {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
padding: 6px 0;
|
||
font-size: var(--app-text-md);
|
||
}
|