feat(training): 推送管理:学员开课通知、周一讲师汇总与企微推送闭环
[2026-11 推学员/推讲师需求] 培训提醒统一走 tr_notifications outbox(站内流水 +
企微 push_status 投递),推送文案可配置,管理端可查逐人投递明细。
后端 internal/application/service:
- training_notify.go(重写)推送管理核心:
- 学员开课通知 scene=session_notice_student:immediate 场次在名单保存/课件上传后
立即入队,day_before 场次由调度器 T-1 且课件就绪时入队;课件门控 +
(tenant,target,scene,ref) 唯一索引幂等,一人一场最多一条
- 周一讲师未完成汇总 scene=remind_monthly_lecturer:北京时间周一发送(时点可配),
轮次键 YYYY-MM-Wn 幂等,场次全部结束自然停推
- 提醒推送文案模板 notify_text_templates:配置中心可编辑,{占位符} 替换渲染,
空字段回落内置默认
- ListPushLogs 推送记录:逐人投递明细(push_status/重试/错误 + 员工姓名工号映射)
- training_scheduler.go:
- 学员提醒收敛到 session_notice_student 单通道,讲师 T-N 授课提醒与
课程维护提醒(临近开课仍缺课件)保持
- 新增每周一讲师未完成汇总生成(租户开关 + 发送小时可配)
- 企微外箱消费 dispatchPending:FOR UPDATE SKIP LOCKED 多实例安全,
sending 超时回收,重试上限置 dead
- PushTestNotification 推送链路自测(校验凭据与 userid 绑定)
- training_ops.go:默认规则种子追加企微推送开关键/周一讲师键/提醒文案默认模板
前端 frontend/src/views/training:
- RulePanel.vue:配置中心新增「提醒推送文案」编辑卡与「推送记录」明细表
(场景筛选、手动触发周一讲师提醒)
- CoursePanel.vue:场次通知模式新增 immediate「名单/课件就绪后立即推送」
- CourseCatalog.vue:「我的课程」角色标记(我主讲/我参加)、最近场次排期排序、
待维护统计改橙色(与草稿一致)
- MemberPanel.vue:员工档案支持企微账号绑定(培训提醒推送目标)
测试:training_notify_test.go(模板解析/占位符渲染)、training_scheduler_test.go
(生成幂等/课件门控/停推开关/投递结果/测试推送/文案渲染),go test 全部通过。
This commit is contained in:
1 parent
7ec21f35b0
commit
e378e8b7fd
10 files changed
+11344
No files matched your search
@@ -0,0 +1,996 @@
|
||||
<template>
|
||||
<div class="rule-panel">
|
||||
<!-- 卡片1:职称角色 · 角色与权限(点选式维护,自定义角色勾选权限分配即生效) -->
|
||||
<div class="panel-box">
|
||||
<div class="panel-box__header">
|
||||
<span class="panel-box__title">职称角色 · 角色与权限</span>
|
||||
<t-button variant="outline" size="small" @click="openRoleDialog()">新增角色</t-button>
|
||||
</div>
|
||||
<t-table :data="roleRows" :columns="roleColumns" row-key="key" size="small" :loading="roleLoading">
|
||||
<template #role="{ row }">
|
||||
<span class="role-name">{{ row.label }}</span>
|
||||
<t-tag v-if="row.system" theme="primary" variant="light" size="small" class="role-sys-tag">系统</t-tag>
|
||||
</template>
|
||||
<template #key="{ row }">
|
||||
<code class="role-key">{{ row.key }}</code>
|
||||
</template>
|
||||
<template #inherits="{ row }">
|
||||
<span v-if="!(row.inherits || []).length" class="perm-none">—</span>
|
||||
<t-tag
|
||||
v-for="p in row.inherits || []"
|
||||
:key="p"
|
||||
variant="light"
|
||||
size="small"
|
||||
class="perm-tag"
|
||||
>{{ roleLabelOf(p, roleRows, true) }}</t-tag>
|
||||
</template>
|
||||
<template #op="{ row }">
|
||||
<t-button variant="text" theme="primary" size="small" @click="openRoleDialog(row)">编辑</t-button>
|
||||
<t-popconfirm
|
||||
v-if="!row.system"
|
||||
content="删除该角色?仍持有该角色的成员将回退为普通学员权限。"
|
||||
theme="danger"
|
||||
@confirm="onDeleteRole(row)"
|
||||
>
|
||||
<t-button variant="text" theme="danger" size="small">删除</t-button>
|
||||
</t-popconfirm>
|
||||
</template>
|
||||
</t-table>
|
||||
<div class="form-hint">
|
||||
系统角色不可删除,展示名与权限分配可改;「权限分配」= 继承所选权限组的全部接口与页面权限,勾选多个取并集。学员为全员默认角色,无需配置。
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 卡片2:业务规则(全部点选式表单,不再手写 JSON) -->
|
||||
<div class="panel-box">
|
||||
<div class="panel-box__header">
|
||||
<span class="panel-box__title">业务规则</span>
|
||||
<t-button variant="outline" size="small" :loading="seeding" @click="onSeed">初始化默认配置</t-button>
|
||||
</div>
|
||||
<div class="panel-box__sub">点选即可修改,每项保存后立即生效;未保存的修改不生效。</div>
|
||||
<div v-for="schema in RULE_SCHEMAS" :key="schema.key" class="rule-section">
|
||||
<div class="rule-section__head">
|
||||
<span class="rule-section__title">{{ schema.title }}</span>
|
||||
<span class="rule-section__desc">{{ schema.desc }}</span>
|
||||
<t-button
|
||||
variant="outline"
|
||||
size="small"
|
||||
:disabled="!isDirty(schema.key)"
|
||||
:loading="savingKey === schema.key"
|
||||
@click="onSaveRule(schema.key)"
|
||||
>保存</t-button>
|
||||
</div>
|
||||
<div class="rule-section__fields">
|
||||
<div
|
||||
v-for="field in schema.fields"
|
||||
:key="field.key"
|
||||
class="rule-field"
|
||||
:class="{ 'rule-field--block': field.type === 'text' }"
|
||||
>
|
||||
<span class="rule-field__label">{{ field.label }}</span>
|
||||
<t-input-number
|
||||
v-if="field.type === 'number'"
|
||||
v-model="ruleValues[schema.key][field.key]"
|
||||
:min="field.min"
|
||||
:max="field.max"
|
||||
theme="normal"
|
||||
size="small"
|
||||
class="rule-field__input"
|
||||
/>
|
||||
<t-switch
|
||||
v-else-if="field.type === 'switch'"
|
||||
v-model="ruleValues[schema.key][field.key]"
|
||||
/>
|
||||
<!-- [2026-11 需求] 提醒推送文案等文本模板:整行多行文本,支持 {占位符} -->
|
||||
<t-textarea
|
||||
v-else
|
||||
v-model="ruleValues[schema.key][field.key]"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
:placeholder="field.placeholder"
|
||||
class="rule-field__textarea"
|
||||
/>
|
||||
<span v-if="field.unit" class="rule-field__unit">{{ field.unit }}</span>
|
||||
<span v-if="field.vars" class="rule-field__vars">可用变量:{{ field.vars }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="schema.key === 'lecturer_score_weight'" class="rule-sum" :class="{ 'rule-sum--warn': weightSum !== 100 }">
|
||||
三项权重合计:{{ weightSum }}<template v-if="weightSum !== 100">(建议合计 100)</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 高级配置:未提供点选表单的规则键,保留 JSON 编辑兜底 -->
|
||||
<div v-if="advancedRows.length" class="panel-box">
|
||||
<div class="panel-box__header">
|
||||
<span class="panel-box__title">高级配置</span>
|
||||
<span class="panel-box__sub">以下配置项暂无点选表单,按 JSON 格式编辑</span>
|
||||
</div>
|
||||
<t-table :data="advancedRows" :columns="advancedColumns" row-key="rule_key" size="small">
|
||||
<template #rule_key="{ row }"><code class="role-key">{{ row.rule_key }}</code></template>
|
||||
<template #rule_value="{ row }">
|
||||
<code class="rule-json">{{ stringify(row.rule_value) }}</code>
|
||||
</template>
|
||||
<template #op="{ row }">
|
||||
<t-button variant="text" theme="primary" size="small" @click="openEdit(row)">编辑</t-button>
|
||||
</template>
|
||||
</t-table>
|
||||
</div>
|
||||
|
||||
<!-- 卡片3:推送记录(逐人企微/站内投递明细;手动触发周一讲师提醒) -->
|
||||
<div class="panel-box">
|
||||
<div class="panel-box__header">
|
||||
<span class="panel-box__title">推送记录</span>
|
||||
<div class="push-toolbar">
|
||||
<t-select v-model="pushScene" class="push-scene-select" size="small" clearable placeholder="全部场景">
|
||||
<t-option v-for="opt in PUSH_SCENE_OPTIONS" :key="opt.value" :value="opt.value" :label="opt.label" />
|
||||
</t-select>
|
||||
<t-button variant="outline" size="small" :loading="pushLogsLoading" @click="loadPushLogs">刷新</t-button>
|
||||
<t-popconfirm content="立即执行一轮周一讲师未完成提醒?同一周重复执行不会重复推送。" theme="primary" @confirm="onRunWeekly">
|
||||
<t-button variant="outline" theme="primary" size="small" :loading="runningWeekly">立即推送讲师提醒</t-button>
|
||||
</t-popconfirm>
|
||||
</div>
|
||||
</div>
|
||||
<t-table :data="pushLogs" :columns="pushLogColumns" row-key="id" size="small" :loading="pushLogsLoading" max-height="360">
|
||||
<template #created_at="{ row }">{{ fmtTime(row.created_at) }}</template>
|
||||
<template #scene="{ row }"><code class="role-key">{{ row.scene }}</code></template>
|
||||
<template #target="{ row }">
|
||||
<span>{{ row.target_name || row.target_user_id }}</span>
|
||||
<span v-if="row.employee_no" class="push-empno">({{ row.employee_no }})</span>
|
||||
</template>
|
||||
<template #push_status="{ row }">
|
||||
<t-tag
|
||||
:theme="row.push_status === 'sent' ? 'success' : row.push_status === 'dead' || row.push_status === '' ? 'default' : row.push_status === 'pending' || row.push_status === 'sending' ? 'warning' : 'danger'"
|
||||
variant="light" size="small"
|
||||
>{{ pushStatusLabel(row.push_status) }}</t-tag>
|
||||
</template>
|
||||
<template #push_error="{ row }">
|
||||
<span class="push-error" :title="row.push_error">{{ row.push_error || '—' }}</span>
|
||||
</template>
|
||||
</t-table>
|
||||
<div class="form-hint">
|
||||
展示最近 {{ pushLogs.length }} 条;pending/sending=排队与投递中,sent=企微已送达,skipped=收件人未绑定企微等跳过,dead=重试耗尽,空=仅站内通知。
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 卡片4:导入模板管理(上传自定义 Excel 模板替换内置默认) -->
|
||||
<div class="panel-box">
|
||||
<div class="panel-box__header">
|
||||
<span class="panel-box__title">导入模板</span>
|
||||
<span class="panel-box__sub">上传后,培训计划批量导入与题库 Excel 导入的下载入口即刻使用新模板</span>
|
||||
</div>
|
||||
<t-table :data="templates" :columns="templateColumns" row-key="template_key" size="small" :loading="templateLoading">
|
||||
<template #file_name="{ row }">
|
||||
<span>{{ row.file_name }}</span>
|
||||
<t-tag v-if="row.source === 'custom'" theme="primary" variant="light" size="small" class="tpl-tag">自定义</t-tag>
|
||||
<t-tag v-else theme="default" variant="light" size="small" class="tpl-tag">内置默认</t-tag>
|
||||
</template>
|
||||
<template #file_size="{ row }">{{ fmtSize(row.file_size) }}</template>
|
||||
<template #updated_at="{ row }">{{ row.source === 'custom' ? fmtTime(row.updated_at) : '—' }}</template>
|
||||
<template #op="{ row }">
|
||||
<t-button variant="text" theme="primary" size="small" @click="onDownloadTemplate(row)">下载</t-button>
|
||||
<t-button variant="text" theme="primary" size="small" @click="onPickUpload(row)">上传更新</t-button>
|
||||
<t-popconfirm
|
||||
v-if="row.source === 'custom'"
|
||||
content="恢复为内置默认模板?"
|
||||
theme="danger"
|
||||
@confirm="onResetTemplate(row)"
|
||||
>
|
||||
<t-button variant="text" theme="danger" size="small">恢复默认</t-button>
|
||||
</t-popconfirm>
|
||||
</template>
|
||||
</t-table>
|
||||
<div class="form-hint">仅支持 .xls / .xlsx,不超过 10MB;上传后原有内置模板仍可通过「恢复默认」找回。</div>
|
||||
<!-- 复用的隐藏文件选择器:记录待上传模板键 -->
|
||||
<input
|
||||
ref="uploadInput"
|
||||
type="file"
|
||||
accept=".xls,.xlsx"
|
||||
class="tpl-upload-input"
|
||||
@change="onUploadFile"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 角色编辑弹窗 -->
|
||||
<t-dialog
|
||||
v-model:visible="roleDialogVisible"
|
||||
:header="roleForm.mode === 'add' ? '新增职称角色' : `编辑职称角色 · ${roleForm.label || roleForm.key}`"
|
||||
width="480"
|
||||
>
|
||||
<t-form label-width="88px">
|
||||
<t-form-item label="角色标识">
|
||||
<t-input
|
||||
v-model="roleForm.key"
|
||||
:disabled="roleForm.mode === 'edit'"
|
||||
placeholder="小写字母开头,仅含小写字母/数字/下划线,如 trainer"
|
||||
/>
|
||||
</t-form-item>
|
||||
<t-form-item label="显示名">
|
||||
<t-input v-model="roleForm.label" placeholder="如:培训专员" />
|
||||
</t-form-item>
|
||||
<t-form-item label="短名">
|
||||
<t-input v-model="roleForm.short" placeholder="成员列表标签展示,缺省同显示名" />
|
||||
</t-form-item>
|
||||
<t-form-item label="权限分配">
|
||||
<t-select v-model="roleForm.inherits" multiple clearable placeholder="点选要赋予的权限组(可多选)">
|
||||
<t-option
|
||||
v-for="r in inheritOptions"
|
||||
:key="r.key"
|
||||
:value="r.key"
|
||||
:label="`${r.label}权限组`"
|
||||
/>
|
||||
</t-select>
|
||||
</t-form-item>
|
||||
</t-form>
|
||||
<div class="form-hint">
|
||||
权限分配决定该角色能使用哪些功能:如勾选「课长权限组+讲师权限组」即可管理培训计划与维护课程(经理权限组已包含课长全部权限与审批决策)。保存后立即生效,无需重启。
|
||||
</div>
|
||||
<template #footer>
|
||||
<t-button theme="primary" :loading="roleSaving" @click="onSaveRole">保存</t-button>
|
||||
</template>
|
||||
</t-dialog>
|
||||
|
||||
<!-- 高级配置 JSON 编辑弹窗 -->
|
||||
<t-dialog v-model:visible="editVisible" :header="`编辑规则 · ${activeKey}`" width="560">
|
||||
<t-textarea v-model="editText" :autosize="{ minRows: 10 }" />
|
||||
<div class="form-hint">JSON 格式,保存后立即生效;历史数据不受影响。</div>
|
||||
<template #footer>
|
||||
<t-button theme="primary" :loading="saving" @click="onSave">保存</t-button>
|
||||
</template>
|
||||
</t-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, ref, watch } from 'vue'
|
||||
import { MessagePlugin } from 'tdesign-vue-next'
|
||||
import {
|
||||
ROLE_DICT_RULE_KEY,
|
||||
deleteTrainingTemplate,
|
||||
fetchRoleDict,
|
||||
listRuleConfigs,
|
||||
listTrainingPushLogs,
|
||||
listTrainingTemplates,
|
||||
roleLabelOf,
|
||||
runWeeklyLecturerReminders,
|
||||
saveRuleConfig,
|
||||
seedRuleConfigs,
|
||||
uploadTrainingTemplate,
|
||||
type TrainingPushLog,
|
||||
type TrainingRoleDef,
|
||||
type TrainingRuleConfig,
|
||||
type TrainingTemplateKey,
|
||||
type TrainingTemplateMeta,
|
||||
unwrap,
|
||||
} from '@/api/training'
|
||||
import { fmtBeijingTime } from '@/utils/datetime'
|
||||
import { downloadTrainingTemplate } from '../trainingTemplates'
|
||||
|
||||
const loading = ref(false)
|
||||
const saving = ref(false)
|
||||
const editVisible = ref(false)
|
||||
const editText = ref('')
|
||||
const activeKey = ref('')
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 职称角色 · 角色与权限
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const roleLoading = ref(false)
|
||||
const roleRows = ref<TrainingRoleDef[]>([])
|
||||
|
||||
const roleColumns = [
|
||||
{ colKey: 'role', title: '角色', width: 210 },
|
||||
{ colKey: 'key', title: '标识', width: 110 },
|
||||
{ colKey: 'inherits', title: '权限分配', minWidth: 200 },
|
||||
{ colKey: 'op', title: '操作', width: 130 },
|
||||
]
|
||||
|
||||
const loadRoles = async () => {
|
||||
roleLoading.value = true
|
||||
try {
|
||||
roleRows.value = await fetchRoleDict()
|
||||
} finally {
|
||||
roleLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const roleDialogVisible = ref(false)
|
||||
const roleSaving = ref(false)
|
||||
const roleForm = ref<{ mode: 'add' | 'edit'; key: string; label: string; short: string; inherits: string[] }>({
|
||||
mode: 'add',
|
||||
key: '',
|
||||
label: '',
|
||||
short: '',
|
||||
inherits: [],
|
||||
})
|
||||
|
||||
// 权限组选项 = 系统角色(排除自身,自分配无意义且后端会拦截)
|
||||
const inheritOptions = computed(() => roleRows.value.filter((r) => r.system && r.key !== roleForm.value.key))
|
||||
|
||||
const openRoleDialog = (row?: TrainingRoleDef) => {
|
||||
roleForm.value = row
|
||||
? { mode: 'edit', key: row.key, label: row.label, short: row.short || '', inherits: [...(row.inherits || [])] }
|
||||
: { mode: 'add', key: '', label: '', short: '', inherits: [] }
|
||||
roleDialogVisible.value = true
|
||||
}
|
||||
|
||||
// 与后端 ParseRoleDict 同口径的前端校验(点选场景先提示,不依赖 400)
|
||||
const ROLE_KEY_RE = /^[a-z][a-z0-9_]{0,31}$/
|
||||
|
||||
const onSaveRole = async () => {
|
||||
const f = roleForm.value
|
||||
const key = f.key.trim()
|
||||
const label = f.label.trim()
|
||||
if (f.mode === 'add' && !ROLE_KEY_RE.test(key)) {
|
||||
MessagePlugin.warning('角色标识需小写字母开头,仅含小写字母/数字/下划线')
|
||||
return
|
||||
}
|
||||
if (f.mode === 'add' && roleRows.value.some((r) => r.key === key)) {
|
||||
MessagePlugin.warning(`角色标识 ${key} 已存在`)
|
||||
return
|
||||
}
|
||||
if (!label) {
|
||||
MessagePlugin.warning('显示名不能为空')
|
||||
return
|
||||
}
|
||||
if (f.inherits.includes(key)) {
|
||||
MessagePlugin.warning('不能分配自身权限组')
|
||||
return
|
||||
}
|
||||
// 经理 = 课长全部权限 + 审批决策:必须分配课长权限组(与后端硬约束同口径)
|
||||
if (key === 'exec' && !f.inherits.includes('supervisor')) {
|
||||
MessagePlugin.warning('经理权限组必须分配课长权限组(经理 = 课长全部权限 + 审批决策)')
|
||||
return
|
||||
}
|
||||
const short = f.short.trim() || label
|
||||
const next: TrainingRoleDef[] =
|
||||
f.mode === 'add'
|
||||
? [...roleRows.value, { key, label, short, system: false, inherits: [...f.inherits] }]
|
||||
: roleRows.value.map((r) => (r.key === key ? { ...r, label, short, inherits: [...f.inherits] } : r))
|
||||
roleSaving.value = true
|
||||
try {
|
||||
await saveRuleConfig(ROLE_DICT_RULE_KEY, { roles: next })
|
||||
MessagePlugin.success('角色已保存并生效')
|
||||
roleDialogVisible.value = false
|
||||
roleRows.value = next
|
||||
} catch (err: any) {
|
||||
MessagePlugin.error(err?.response?.data?.message || '保存失败')
|
||||
} finally {
|
||||
roleSaving.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const onDeleteRole = async (row: TrainingRoleDef) => {
|
||||
const next = roleRows.value.filter((r) => r.key !== row.key)
|
||||
try {
|
||||
await saveRuleConfig(ROLE_DICT_RULE_KEY, { roles: next })
|
||||
MessagePlugin.success('角色已删除')
|
||||
roleRows.value = next
|
||||
} catch (err: any) {
|
||||
MessagePlugin.error(err?.response?.data?.message || '删除失败')
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 业务规则(点选式表单;字段描述驱动,与后端 defaultRuleSeed 同源)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
interface RuleFieldDesc {
|
||||
key: string
|
||||
label: string
|
||||
type: 'number' | 'switch' | 'text'
|
||||
min?: number
|
||||
max?: number
|
||||
unit?: string
|
||||
/** text 字段的输入提示 */
|
||||
placeholder?: string
|
||||
/** text 字段(文案模板)支持的 {占位符} 列表提示 */
|
||||
vars?: string
|
||||
}
|
||||
|
||||
interface RuleSchemaDesc {
|
||||
key: string
|
||||
title: string
|
||||
desc: string
|
||||
fields: RuleFieldDesc[]
|
||||
// serialize UI 表单值 → tr_rule_configs 落库值(默认原样 JSON);
|
||||
// notify_remind_days(数组)/notify_push_enabled(bool) 等非对象契约用。
|
||||
serialize?: (v: Record<string, any>) => any
|
||||
// parse 落库值 → UI 表单值(缺省视为对象原样)。
|
||||
parse?: (saved: any) => Record<string, any>
|
||||
}
|
||||
|
||||
const RULE_SCHEMAS: RuleSchemaDesc[] = [
|
||||
{
|
||||
key: 'sign_policy',
|
||||
title: '签到策略',
|
||||
desc: '课堂签到的迟到判定与定位校验',
|
||||
fields: [
|
||||
{ key: 'late_after_min', label: '迟到阈值', type: 'number', min: 1, max: 120, unit: '分钟后算迟到' },
|
||||
{ key: 'geo_radius_m', label: '定位有效半径', type: 'number', min: 50, max: 5000, unit: '米' },
|
||||
{ key: 'require_geo', label: '强制定位校验', type: 'switch' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'lecturer_score_weight',
|
||||
title: '讲师评分权重',
|
||||
desc: '讲师综合分的三个构成维度权重',
|
||||
fields: [
|
||||
{ key: 'on_time', label: '按时开课', type: 'number', min: 0, max: 100 },
|
||||
{ key: 'rating', label: '学员评分', type: 'number', min: 0, max: 100 },
|
||||
{ key: 'qa', label: '互动答疑', type: 'number', min: 0, max: 100 },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'point_rules',
|
||||
title: '积分规则',
|
||||
desc: '学员完成相应学习行为获得的积分',
|
||||
fields: [
|
||||
{ key: 'required', label: '完成必修课', type: 'number', min: 0, max: 1000 },
|
||||
{ key: 'score_90', label: '考试 ≥90 分', type: 'number', min: 0, max: 1000 },
|
||||
{ key: 'score_100', label: '考试 100 分', type: 'number', min: 0, max: 1000 },
|
||||
{ key: 'pass', label: '考试普通及格', type: 'number', min: 0, max: 1000 },
|
||||
{ key: 'elective', label: '完成选修课', type: 'number', min: 0, max: 1000 },
|
||||
{ key: 'self_study', label: '自学线上课件', type: 'number', min: 0, max: 1000 },
|
||||
],
|
||||
},
|
||||
{
|
||||
// [2026-11 推送管理] 接线真实调度器契约:scheduler 读 notify_remind_days 数组
|
||||
// (training_scheduler.go loadNotifyConfig);原 remind_policy(t3/t1/third_week/
|
||||
// month_end)从未被后端读取,由本卡替换(third_week/month_end 无实现,随卡移除)。
|
||||
key: 'notify_remind_days',
|
||||
title: '开课提醒时点',
|
||||
desc: '调度器按提前天数生成讲师授课提醒;学员开课通知由场次"通知方式"决定(立即或前一天),不受本项影响',
|
||||
fields: [
|
||||
{ key: 't3', label: '开课前 3 天提醒', type: 'switch' },
|
||||
{ key: 't1', label: '开课前 1 天提醒', type: 'switch' },
|
||||
],
|
||||
serialize: (v) => [...(v.t3 ? [3] : []), ...(v.t1 ? [1] : [])],
|
||||
// 配置行不存在时必须返回 {} 让 DEFAULT_RULE_VALUES 打底(true),不能显式 false。
|
||||
parse: (saved) =>
|
||||
saved === undefined || saved === null
|
||||
? {}
|
||||
: {
|
||||
t3: Array.isArray(saved) && saved.includes(3),
|
||||
t1: Array.isArray(saved) && saved.includes(1),
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'notify_push_enabled',
|
||||
title: '企微推送总开关',
|
||||
desc: '关闭后新产生的通知只保留站内流水,不再推送企业微信;已入队消息不受影响',
|
||||
fields: [{ key: 'enabled', label: '启用企微推送', type: 'switch' }],
|
||||
serialize: (v) => !!v.enabled,
|
||||
parse: (saved) =>
|
||||
saved === undefined || saved === null ? {} : { enabled: saved === true || saved?.enabled === true },
|
||||
},
|
||||
{
|
||||
key: 'notify_weekly_lecturer',
|
||||
title: '周一讲师未完成提醒',
|
||||
desc: '每周一上午向当月仍有未结束场次的讲师推送汇总提醒(标题带第 N 周);讲师场次全部结束即自动停推',
|
||||
fields: [
|
||||
{ key: 'enabled', label: '启用周一提醒', type: 'switch' },
|
||||
{ key: 'hour', label: '发送时刻', type: 'number', min: 0, max: 23, unit: '点(北京时间)' },
|
||||
],
|
||||
serialize: (v) => ({ enabled: !!v.enabled, hour: Number(v.hour) || 9 }),
|
||||
parse: (saved) =>
|
||||
saved === undefined || saved === null
|
||||
? {}
|
||||
: { enabled: saved?.enabled !== false, hour: Number(saved?.hour ?? 9) },
|
||||
},
|
||||
{
|
||||
// [2026-11 需求] 提醒推送文案可编辑:各提醒场景的标题/内容模板,保存后新推送即刻生效;
|
||||
// {占位符} 渲染时替换为实际值,清空保存即恢复内置默认文案(后端空值回落默认)。
|
||||
key: 'notify_text_templates',
|
||||
title: '提醒推送文案',
|
||||
desc: '各提醒推送的标题与内容模板,支持 {占位符} 替换实际值;清空并保存即恢复内置默认文案,对保存后的新推送生效',
|
||||
fields: [
|
||||
{
|
||||
key: 'student_notice_title',
|
||||
label: '学员开课通知 · 标题',
|
||||
type: 'text',
|
||||
placeholder: '培训开课通知',
|
||||
vars: '{course}(仅站内通知标题生效;企微消息自动追加「:课程名」)',
|
||||
},
|
||||
{
|
||||
key: 'student_notice_content',
|
||||
label: '学员开课通知 · 内容',
|
||||
type: 'text',
|
||||
vars: '{course} 课程名 / {time} 开课时间 / {place} 地点或线上说明 / {lecturer} 讲师(缺省「待定」)',
|
||||
},
|
||||
{
|
||||
key: 'lecturer_open_title',
|
||||
label: '讲师授课提醒 · 标题',
|
||||
type: 'text',
|
||||
placeholder: '授课提醒',
|
||||
vars: '无需变量(自动追加「:课程名」)',
|
||||
},
|
||||
{ key: 'lecturer_open_footer', label: '讲师授课提醒 · 结尾', type: 'text' },
|
||||
{
|
||||
key: 'lecturer_maintain_title',
|
||||
label: '课程维护提醒 · 标题',
|
||||
type: 'text',
|
||||
placeholder: '课程维护提醒',
|
||||
vars: '无需变量(自动追加「:课程名」)',
|
||||
},
|
||||
{ key: 'lecturer_maintain_footer', label: '课程维护提醒 · 结尾', type: 'text' },
|
||||
{ key: 'weekly_title', label: '周一讲师提醒 · 标题', type: 'text', vars: '{year} / {month} / {week}' },
|
||||
{
|
||||
key: 'weekly_content',
|
||||
label: '周一讲师提醒 · 内容',
|
||||
type: 'text',
|
||||
vars: '{year} / {month} / {week} / {week_start} / {week_end} 本周起止(MM-DD) / {count} 未结束场次',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'pass_line',
|
||||
title: '岗位胜任达标线',
|
||||
desc: '课程考试的默认及格分数线',
|
||||
fields: [{ key: 'default', label: '默认及格线', type: 'number', min: 0, max: 100, unit: '分' }],
|
||||
},
|
||||
{
|
||||
key: 'roll_policy',
|
||||
title: '滚动规则',
|
||||
desc: '连续未完成任务的升级提醒阈值',
|
||||
fields: [{ key: 'escalate_after', label: '连续未完成', type: 'number', min: 1, max: 12, unit: '次后升级提醒' }],
|
||||
},
|
||||
]
|
||||
|
||||
// 默认值打底(与后端 defaultRuleSeed 一致):规则键尚未初始化时也能直接点选配置
|
||||
const DEFAULT_RULE_VALUES: Record<string, Record<string, any>> = {
|
||||
lecturer_score_weight: { on_time: 40, rating: 50, qa: 10 },
|
||||
point_rules: { required: 10, score_90: 10, score_100: 20, pass: 5, elective: 5, self_study: 3 },
|
||||
sign_policy: { late_after_min: 15, geo_radius_m: 300, require_geo: false },
|
||||
pass_line: { default: 75 },
|
||||
roll_policy: { escalate_after: 2 },
|
||||
// [2026-11 推送管理] 企微推送卡默认值(与调度器缺省一致)
|
||||
notify_remind_days: { t3: true, t1: true },
|
||||
notify_push_enabled: { enabled: true },
|
||||
notify_weekly_lecturer: { enabled: true, hour: 9 },
|
||||
// [2026-11 需求] 提醒推送文案默认模板(与后端 defaultNotifyTextTemplates 逐字一致)
|
||||
notify_text_templates: {
|
||||
student_notice_title: '培训开课通知',
|
||||
student_notice_content: '您被点名参加「{course}」培训:{time},{place},讲师:{lecturer}。请准时参加。',
|
||||
lecturer_open_title: '授课提醒',
|
||||
lecturer_open_footer: '请准时参加,详情见培训平台。',
|
||||
lecturer_maintain_title: '课程维护提醒',
|
||||
lecturer_maintain_footer:
|
||||
'该课程尚未上传课件/学习材料,请尽快登录培训平台补齐,以免影响学员课前学习。',
|
||||
weekly_title: '{year}年{month}月教育训练(第{week}周提醒)',
|
||||
weekly_content:
|
||||
'{month} 月已进入第 {week} 周({week_start} 至 {week_end}),您本月仍有 {count} 场培训未结束,请与人事约定培训时间并于月内完成课件、签到与评价。',
|
||||
},
|
||||
}
|
||||
|
||||
const RULE_SCHEMA_KEYS = new Set(RULE_SCHEMAS.map((s) => s.key))
|
||||
|
||||
const ruleValues = ref<Record<string, Record<string, any>>>({})
|
||||
const savedSnapshot = ref<Record<string, string>>({})
|
||||
const savingKey = ref('')
|
||||
|
||||
const advancedRows = ref<TrainingRuleConfig[]>([])
|
||||
const advancedColumns = [
|
||||
{ colKey: 'rule_key', title: '规则', width: 220 },
|
||||
{ colKey: 'rule_value', title: '配置值' },
|
||||
{ colKey: 'op', title: '操作', width: 80 },
|
||||
]
|
||||
|
||||
const stringify = (v: any) => JSON.stringify(v ?? {})
|
||||
|
||||
const applyConfigs = (configs: TrainingRuleConfig[]) => {
|
||||
const values: Record<string, Record<string, any>> = {}
|
||||
const snapshot: Record<string, string> = {}
|
||||
for (const schema of RULE_SCHEMAS) {
|
||||
const savedRaw = configs.find((c) => c.rule_key === schema.key)?.rule_value
|
||||
// parse 转换落库契约(数组/bool)为 UI 表单形态;缺省视为对象。
|
||||
const saved = schema.parse ? schema.parse(savedRaw) : savedRaw || {}
|
||||
// 默认值打底 + 已保存值覆盖 + 保留配置中的其他键(保存时不丢字段)
|
||||
const merged: Record<string, any> = { ...(DEFAULT_RULE_VALUES[schema.key] || {}) }
|
||||
for (const k of Object.keys(saved)) merged[k] = saved[k]
|
||||
values[schema.key] = merged
|
||||
snapshot[schema.key] = JSON.stringify(merged)
|
||||
}
|
||||
ruleValues.value = values
|
||||
savedSnapshot.value = snapshot
|
||||
advancedRows.value = configs.filter(
|
||||
(c) => !RULE_SCHEMA_KEYS.has(c.rule_key) && c.rule_key !== ROLE_DICT_RULE_KEY,
|
||||
)
|
||||
}
|
||||
|
||||
const loadAll = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await listRuleConfigs()
|
||||
applyConfigs(unwrap<TrainingRuleConfig[]>(res) || [])
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// ---- 推送记录(2026-11 推学员/推讲师需求,逐人企微/站内投递明细) ----
|
||||
|
||||
const PUSH_SCENE_OPTIONS = [
|
||||
{ value: 'session_notice_student', label: '学员开课通知' },
|
||||
{ value: 'remind_monthly_lecturer', label: '周一讲师提醒' },
|
||||
{ value: 'remind_lecturer_maintain', label: '课程维护提醒' },
|
||||
]
|
||||
|
||||
const pushScene = ref('')
|
||||
const pushLogs = ref<TrainingPushLog[]>([])
|
||||
const pushLogsLoading = ref(false)
|
||||
const runningWeekly = ref(false)
|
||||
|
||||
const pushLogColumns = [
|
||||
{ colKey: 'created_at', title: '时间', width: 150 },
|
||||
{ colKey: 'scene', title: '场景', width: 180 },
|
||||
{ colKey: 'title', title: '标题', ellipsis: true },
|
||||
{ colKey: 'target', title: '收件人', width: 150 },
|
||||
{ colKey: 'push_status', title: '企微状态', width: 100 },
|
||||
{ colKey: 'push_error', title: '失败原因', ellipsis: true },
|
||||
]
|
||||
|
||||
const pushStatusLabel = (status: string) => {
|
||||
if (!status) return '仅站内'
|
||||
const map: Record<string, string> = {
|
||||
pending: '排队中',
|
||||
sending: '投递中',
|
||||
sent: '已送达',
|
||||
skipped: '已跳过',
|
||||
dead: '已失败',
|
||||
}
|
||||
return map[status] || status
|
||||
}
|
||||
|
||||
const loadPushLogs = async () => {
|
||||
pushLogsLoading.value = true
|
||||
try {
|
||||
const res = await listTrainingPushLogs({ scenes: pushScene.value || undefined, limit: 200 })
|
||||
pushLogs.value = unwrap<TrainingPushLog[]>(res) || []
|
||||
} finally {
|
||||
pushLogsLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const onRunWeekly = async () => {
|
||||
runningWeekly.value = true
|
||||
try {
|
||||
await runWeeklyLecturerReminders()
|
||||
MessagePlugin.success('已触发,讲师提醒将按轮次幂等入队并推送')
|
||||
loadPushLogs()
|
||||
} catch (err: any) {
|
||||
MessagePlugin.error(err?.response?.data?.message || '触发失败')
|
||||
} finally {
|
||||
runningWeekly.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const isDirty = (key: string) => JSON.stringify(ruleValues.value[key]) !== savedSnapshot.value[key]
|
||||
|
||||
const weightSum = computed(() => {
|
||||
const v = ruleValues.value.lecturer_score_weight || {}
|
||||
return (Number(v.on_time) || 0) + (Number(v.rating) || 0) + (Number(v.qa) || 0)
|
||||
})
|
||||
|
||||
// 数字字段被清空时回填默认值,避免保存出 null 破坏后端取值
|
||||
const buildRulePayload = (schemaKey: string) => {
|
||||
const schema = RULE_SCHEMAS.find((s) => s.key === schemaKey)
|
||||
const out: Record<string, any> = { ...(ruleValues.value[schemaKey] || {}) }
|
||||
for (const f of schema?.fields || []) {
|
||||
if (out[f.key] === null || out[f.key] === undefined || out[f.key] === '') {
|
||||
out[f.key] = DEFAULT_RULE_VALUES[schemaKey]?.[f.key] ?? 0
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
const onSaveRule = async (schemaKey: string) => {
|
||||
const schema = RULE_SCHEMAS.find((s) => s.key === schemaKey)
|
||||
savingKey.value = schemaKey
|
||||
try {
|
||||
const uiValues = buildRulePayload(schemaKey)
|
||||
// serialize:UI 表单值 → 落库契约(数组/bool 等,见 RuleSchemaDesc.serialize)。
|
||||
const payload = schema?.serialize ? schema.serialize(uiValues) : uiValues
|
||||
await saveRuleConfig(schemaKey, payload)
|
||||
ruleValues.value = { ...ruleValues.value, [schemaKey]: uiValues }
|
||||
savedSnapshot.value = { ...savedSnapshot.value, [schemaKey]: JSON.stringify(uiValues) }
|
||||
MessagePlugin.success('规则已保存并生效')
|
||||
} catch (err: any) {
|
||||
MessagePlugin.error(err?.response?.data?.message || '保存失败')
|
||||
} finally {
|
||||
savingKey.value = ''
|
||||
}
|
||||
}
|
||||
|
||||
// ---- 高级配置(JSON 兜底) ----
|
||||
|
||||
const openEdit = (row: TrainingRuleConfig) => {
|
||||
activeKey.value = row.rule_key
|
||||
editText.value = JSON.stringify(row.rule_value ?? {}, null, 2)
|
||||
editVisible.value = true
|
||||
}
|
||||
|
||||
const onSave = async () => {
|
||||
let parsed: any
|
||||
try {
|
||||
parsed = JSON.parse(editText.value)
|
||||
} catch {
|
||||
MessagePlugin.warning('请输入合法的 JSON')
|
||||
return
|
||||
}
|
||||
saving.value = true
|
||||
try {
|
||||
await saveRuleConfig(activeKey.value, parsed)
|
||||
MessagePlugin.success('规则已保存并生效')
|
||||
editVisible.value = false
|
||||
loadAll()
|
||||
} catch (err: any) {
|
||||
MessagePlugin.error(err?.response?.data?.message || '保存失败')
|
||||
} finally {
|
||||
saving.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const seeding = ref(false)
|
||||
const onSeed = async () => {
|
||||
seeding.value = true
|
||||
try {
|
||||
const res = await seedRuleConfigs()
|
||||
MessagePlugin.success(`已初始化 ${unwrap(res)?.seeded ?? 0} 条默认规则(已存在的键不覆盖)`)
|
||||
loadAll()
|
||||
loadRoles()
|
||||
} catch {
|
||||
MessagePlugin.error('初始化失败')
|
||||
} finally {
|
||||
seeding.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// ---- 导入模板 ----
|
||||
const templateLoading = ref(false)
|
||||
const templates = ref<TrainingTemplateMeta[]>([])
|
||||
const uploadInput = ref<HTMLInputElement | null>(null)
|
||||
const uploadKey = ref<TrainingTemplateKey | null>(null)
|
||||
|
||||
const templateColumns = [
|
||||
{ colKey: 'file_name', title: '模板' },
|
||||
{ colKey: 'file_size', title: '大小', width: 90 },
|
||||
{ colKey: 'updated_at', title: '上传时间', width: 160 },
|
||||
{ colKey: 'op', title: '操作', width: 210 },
|
||||
]
|
||||
|
||||
const fmtSize = (size: number) => (size >= 1024 ? `${(size / 1024).toFixed(1)} KB` : `${size} B`)
|
||||
const fmtTime = (raw: string) => fmtBeijingTime(raw) || '—'
|
||||
|
||||
const loadTemplates = async () => {
|
||||
templateLoading.value = true
|
||||
try {
|
||||
const res = await listTrainingTemplates()
|
||||
templates.value = unwrap(res) || []
|
||||
} catch {
|
||||
templates.value = []
|
||||
} finally {
|
||||
templateLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const onDownloadTemplate = (row: TrainingTemplateMeta) =>
|
||||
downloadTrainingTemplate(row.template_key, row.file_name)
|
||||
|
||||
// 每行「上传更新」复用同一个隐藏 input,先记录目标模板键
|
||||
const onPickUpload = (row: TrainingTemplateMeta) => {
|
||||
uploadKey.value = row.template_key
|
||||
uploadInput.value?.click()
|
||||
}
|
||||
|
||||
const onUploadFile = async (e: Event) => {
|
||||
const input = e.target as HTMLInputElement
|
||||
const file = input.files?.[0]
|
||||
input.value = ''
|
||||
const key = uploadKey.value
|
||||
if (!file || !key) return
|
||||
try {
|
||||
const fd = new FormData()
|
||||
fd.append('file', file)
|
||||
await uploadTrainingTemplate(key, fd)
|
||||
MessagePlugin.success('模板已上传,各下载入口即刻生效')
|
||||
loadTemplates()
|
||||
} catch (err: any) {
|
||||
MessagePlugin.error(err?.response?.data?.message || '上传失败,仅支持 .xls/.xlsx 且不超过 10MB')
|
||||
} finally {
|
||||
uploadKey.value = null
|
||||
}
|
||||
}
|
||||
|
||||
const onResetTemplate = async (row: TrainingTemplateMeta) => {
|
||||
try {
|
||||
await deleteTrainingTemplate(row.template_key)
|
||||
MessagePlugin.success('已恢复为内置默认模板')
|
||||
loadTemplates()
|
||||
} catch {
|
||||
MessagePlugin.error('操作失败')
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
loadAll()
|
||||
loadRoles()
|
||||
loadTemplates()
|
||||
loadPushLogs()
|
||||
})
|
||||
|
||||
// 场景筛选变化即重拉推送记录
|
||||
watch(pushScene, () => loadPushLogs())
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import (reference) '../training.less';
|
||||
|
||||
.panel-box {
|
||||
.training-panel-box();
|
||||
|
||||
& + .panel-box {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
&__sub {
|
||||
color: var(--td-text-color-placeholder);
|
||||
font-size: var(--app-text-sm);
|
||||
}
|
||||
}
|
||||
|
||||
.rule-json {
|
||||
font-size: var(--app-text-sm);
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.tpl-tag {
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
// 复用的隐藏文件选择器
|
||||
.tpl-upload-input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.form-hint {
|
||||
margin-top: 8px;
|
||||
color: var(--td-text-color-placeholder);
|
||||
font-size: var(--app-text-sm);
|
||||
}
|
||||
|
||||
// ---- 职称角色 ----
|
||||
.role-name {
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.role-sys-tag {
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.role-key {
|
||||
font-size: var(--app-text-sm);
|
||||
color: var(--td-text-color-secondary);
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.perm-tag {
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.perm-none {
|
||||
color: var(--td-text-color-placeholder);
|
||||
}
|
||||
|
||||
// ---- 业务规则点选式分区 ----
|
||||
.rule-section {
|
||||
padding: 12px 0;
|
||||
|
||||
& + .rule-section {
|
||||
border-top: 1px solid var(--td-component-stroke);
|
||||
}
|
||||
|
||||
&__head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 10px;
|
||||
|
||||
.t-button {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
&__title {
|
||||
font-weight: 600;
|
||||
font-size: var(--app-text-base);
|
||||
}
|
||||
|
||||
&__desc {
|
||||
color: var(--td-text-color-placeholder);
|
||||
font-size: var(--app-text-sm);
|
||||
}
|
||||
|
||||
&__fields {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.rule-field {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
|
||||
&__label {
|
||||
color: var(--td-text-color-secondary);
|
||||
font-size: var(--app-text-sm);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&__input {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
&__unit {
|
||||
color: var(--td-text-color-placeholder);
|
||||
font-size: var(--app-text-sm);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
// 文案模板等长文本:整行块状布局(标签一行 + 多行输入 + 变量提示)
|
||||
&--block {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
width: 100%;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
&__textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&__vars {
|
||||
color: var(--td-text-color-placeholder);
|
||||
font-size: var(--app-text-xs);
|
||||
}
|
||||
}
|
||||
|
||||
.rule-sum {
|
||||
margin-top: 8px;
|
||||
font-size: var(--app-text-sm);
|
||||
color: var(--td-text-color-secondary);
|
||||
|
||||
&--warn {
|
||||
color: var(--td-warning-color);
|
||||
}
|
||||
}
|
||||
|
||||
/* 推送记录工具行与明细(2026-11 推送管理) */
|
||||
.push-toolbar {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.push-scene-select {
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
.push-empno {
|
||||
margin-left: 4px;
|
||||
font-size: var(--app-text-xs);
|
||||
color: var(--td-text-color-secondary);
|
||||
}
|
||||
|
||||
.push-error {
|
||||
display: inline-block;
|
||||
max-width: 220px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: var(--td-error-color);
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user