Commit d5234f7f authored by 李文光's avatar 李文光

feat: 重构岗位评估标准配置页

parent 11457fc4
......@@ -786,16 +786,29 @@ const mainAction = async () => {
<RoleEvaluationCardPanel :job="job" />
<section class="quick-match-panel">
<span class="quick-match-mark" aria-hidden="true">
<el-icon><Histogram /></el-icon>
</span>
<div class="quick-match-copy">
<span class="section-kicker">快速匹配规则</span>
<h3>简历库快速匹配</h3>
<p>用于简历库快速排序,与上方岗位评估卡相互独立,不作为正式 AI 评估标准。</p>
<div class="quick-match-title">
<span class="section-kicker">辅助排序</span>
<h3>简历库快速匹配</h3>
</div>
<p>按当前 JD 与硬性条件做本地初步筛选和排序,不生成 HR 决策报告,也不替代正式 AI 评估。</p>
<div class="quick-match-facts">
<span>规则来源:当前 JD</span>
<span>输出用途:简历排序</span>
<span>正式报告:不生成</span>
</div>
</div>
<div class="quick-match-action">
<el-tag :type="job.matchRuleStatus === '已确认' ? 'success' : 'info'" effect="plain">
{{ job.matchRuleStatus || '未配置' }}
</el-tag>
<el-button type="primary" plain @click="confirmMatchRules">确认匹配规则</el-button>
<el-button type="primary" plain @click="confirmMatchRules">
<el-icon><Checked /></el-icon>
{{ job.matchRuleStatus === '已确认' ? '重新确认规则' : '确认匹配规则' }}
</el-button>
</div>
</section>
</section>
......@@ -1647,30 +1660,36 @@ const mainAction = async () => {
// ---- 评估标准:快速匹配规则 ----
.quick-match-panel {
display: flex;
display: grid;
grid-template-columns: 42px minmax(0, 1fr) auto;
align-items: center;
justify-content: space-between;
gap: 20px;
gap: 16px;
margin-top: 18px;
padding: 16px 20px;
background: var(--panel);
border: 1px solid var(--line);
border-radius: 10px;
padding: 18px 20px;
background: color-mix(in srgb, var(--blue) 3%, var(--panel));
border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line));
border-radius: 12px;
.quick-match-copy {
min-width: 0;
}
.quick-match-title {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 9px;
}
.section-kicker {
display: block;
color: var(--blue);
font-size: 12px;
font-size: 11px;
font-weight: 600;
}
h3 {
margin: 5px 0 0;
font-size: 16px;
margin: 0;
font-size: 15px;
}
p {
......@@ -1682,6 +1701,34 @@ const mainAction = async () => {
}
}
.quick-match-mark {
display: inline-flex;
align-items: center;
justify-content: center;
width: 42px;
height: 42px;
color: var(--blue);
background: color-mix(in srgb, var(--blue) 10%, var(--panel));
border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line));
border-radius: 10px;
.el-icon {
font-size: 19px;
}
}
.quick-match-facts {
display: flex;
flex-wrap: wrap;
gap: 6px 14px;
margin-top: 8px;
span {
color: var(--muted);
font-size: 11px;
}
}
.quick-match-action {
display: flex;
flex: 0 0 auto;
......@@ -2093,12 +2140,14 @@ const mainAction = async () => {
}
.quick-match-panel {
grid-template-columns: 42px minmax(0, 1fr);
align-items: flex-start;
flex-direction: column;
}
.quick-match-action {
grid-column: 2;
width: 100%;
flex-wrap: wrap;
}
.publish-align-panel {
......
<script setup>
import { computed, onMounted, ref } from 'vue'
import { computed, nextTick, onMounted, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import {
CircleCheckFilled,
Delete,
DocumentChecked,
Lock,
MagicStick,
Plus,
RefreshRight,
WarningFilled,
} from '@element-plus/icons-vue'
import * as api from '@/api/recruitment'
import { useRecruitmentStore } from '@/stores/recruitment'
......@@ -15,6 +25,7 @@ const store = useRecruitmentStore()
const generating = ref(false)
const activeMatchSurface = ref('contextFit')
const activeCompetency = ref('professionalDepth')
const activeAdvancedSections = ref([])
const matchSurfaces = [
{ key: 'contextFit', label: '岗位情境' },
......@@ -38,6 +49,52 @@ const history = computed(() => (Array.isArray(props.job?.evaluationCardHistory)
const statusMeta = computed(() => roleCardStatusMeta(props.job))
const stale = computed(() => roleCardNeedsRefresh(props.job))
const editable = computed(() => card.value?.status === 'draft')
const matchCriterionCount = computed(() =>
matchSurfaces.reduce((sum, item) => sum + (card.value?.matchCriteria?.[item.key]?.length || 0), 0)
)
const coveredMatchSurfaceCount = computed(
() => matchSurfaces.filter((item) => (card.value?.matchCriteria?.[item.key]?.length || 0) > 0).length
)
const competencyAnchorCount = computed(() =>
competencyRulers.reduce((sum, item) => sum + (card.value?.competencyCriteria?.[item.key]?.length || 0), 0)
)
const coveredCompetencyCount = computed(
() => competencyRulers.filter((item) => (card.value?.competencyCriteria?.[item.key]?.length || 0) > 0).length
)
const gateCount = computed(() => card.value?.hardGates?.length || 0)
const highlightCount = computed(() => card.value?.highlights?.length || 0)
const requiredChecks = computed(() => [
{
key: 'match',
label: '岗位匹配判据',
detail: matchCriterionCount.value
? `${matchCriterionCount.value} 条 · 覆盖 ${coveredMatchSurfaceCount.value}/3 个匹配面`
: '至少添加一条可复核判据',
ready: matchCriterionCount.value > 0,
},
{
key: 'competency',
label: '四把能力尺子',
detail:
coveredCompetencyCount.value === competencyRulers.length
? `${competencyAnchorCount.value} 条锚点 · 四个尺子均已配置`
: `${coveredCompetencyCount.value}/4 个尺子已有锚点,冻结前需补齐`,
ready: coveredCompetencyCount.value === competencyRulers.length,
},
])
const requiredReadyCount = computed(() => requiredChecks.value.filter((item) => item.ready).length)
const readinessPercent = computed(() => Math.round((requiredReadyCount.value / requiredChecks.value.length) * 100))
const standardReady = computed(() => requiredReadyCount.value === requiredChecks.value.length)
const readinessKicker = computed(() => {
if (stale.value) return '版本状态'
return editable.value ? '冻结前检查' : '冻结标准'
})
const readinessHint = computed(() => {
if (stale.value) return '岗位信息已经变化,请基于当前岗位重新生成并冻结标准。'
if (!editable.value) return '当前冻结版本正在用于该岗位所有候选人的正式 AI 评估。'
if (standardReady.value) return '当前标准已满足冻结条件,冻结后将用于所有候选人的正式 AI 评估。'
return '补齐岗位匹配判据和四把能力尺子后即可冻结。'
})
const canFreeze = computed(() => {
if (!editable.value) return false
const matchCount = matchSurfaces.reduce((sum, item) => sum + (card.value?.matchCriteria?.[item.key]?.length || 0), 0)
......@@ -47,6 +104,54 @@ const canFreeze = computed(() => {
return matchCount > 0 && competencyReady
})
const sourceLabel = (value) =>
({
'job.context': '岗位情境',
'job.responsibilities': '岗位职责',
'job.mustHave': '硬性要求',
'job.niceToHave': '加分项',
'job.competency': '能力项',
'job.nonCompete': '竞业限制',
manual: '手动添加',
})[value] ||
value ||
'未标记'
const gateKindLabel = (value) =>
({
must: '硬门槛',
years: '年限',
exclusion: '排除项',
non_compete: '竞业',
lifeline: '命脉',
})[value] ||
value ||
'未标记'
const sourceModeLabel = (value) => (value === 'grill' ? 'Grill 岗位' : '直接创建岗位')
const internalRuleLabel = (key) =>
({
sensitive: '内部备注',
genderRestriction: '性别要求',
ageRestriction: '年龄要求',
internalFeasibility: '为什么必须外招',
verification: '简历验证信号',
probationPeriod: '试用期时长',
probationCriteria: '转正标准',
nonCompete: '竞业协议',
nonCompeteContent: '竞业协议内容',
internalNote: '对内笔记',
})[key] || key
function internalRuleValue(value) {
if (value === null || value === undefined || value === '') return '未填写'
if (typeof value === 'object') {
return Object.keys(value).length ? JSON.stringify(value) : '未填写'
}
return value || '未填写'
}
function ensureCardShape(target) {
target.matchCriteria = target.matchCriteria || {}
target.competencyCriteria = target.competencyCriteria || {}
......@@ -214,6 +319,17 @@ function viewHistory(item) {
ElMessage.info(`${item.version || '历史版本'} · ${item.frozenAt || '未记录冻结时间'}`)
}
async function openVersionHistory() {
if (!activeAdvancedSections.value.includes('internal')) {
activeAdvancedSections.value = [...activeAdvancedSections.value, 'internal']
}
await nextTick()
document.getElementById('role-card-version-history')?.scrollIntoView({
behavior: window.matchMedia?.('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth',
block: 'start',
})
}
onMounted(() => {
if (card.value?.status !== 'draft') return
const before = JSON.stringify(card.value?.matchCriteria?.contextFit || [])
......@@ -226,31 +342,59 @@ onMounted(() => {
<template>
<section class="role-card-panel">
<div class="role-card-head">
<div>
<span class="section-kicker">岗位评估标准</span>
<header class="role-card-hero">
<div class="role-card-heading">
<div class="role-card-heading-top">
<span class="section-kicker">岗位评估标准</span>
<el-tag :type="statusMeta.tone" effect="light">{{ statusMeta.value }}</el-tag>
</div>
<h3>岗位评估卡</h3>
<p>冻结后供该岗位所有候选人共用;岗位信息变更会标记旧卡过期,不会静默重算。</p>
<div v-if="card" class="role-card-meta">
<span>
<small>版本</small>
<b>{{ card.version || '草稿未编号' }}</b>
</span>
<span>
<small>规则</small>
<b>{{ card.rubricVersion || 'RR-2.0' }}</b>
</span>
<span>
<small>来源</small>
<b>{{ sourceModeLabel(card.sourceMode) }}</b>
</span>
<span>
<small>完整度</small>
<b>{{ card.completeness === 'complete' ? '完整' : '暂定' }}</b>
</span>
</div>
</div>
<div class="role-card-actions">
<el-button v-if="!card || stale" :loading="generating" type="primary" @click="generateDraft">
{{ stale ? '按当前岗位生成新草稿' : '生成评估卡草稿' }}
<el-button v-if="!card" :loading="generating" type="primary" @click="generateDraft">
<el-icon><MagicStick /></el-icon>
生成评估卡草稿
</el-button>
<el-button v-else-if="stale" :loading="generating" type="primary" @click="generateDraft">
<el-icon><RefreshRight /></el-icon>
按当前岗位生成新草稿
</el-button>
<template v-else>
<el-button v-if="editable" @click="saveDraft">保存草稿</el-button>
<el-button v-if="editable" type="primary" :disabled="!canFreeze" @click="freezeCard">冻结当前版本</el-button>
<el-button v-else @click="startNewDraft">创建新版本</el-button>
<el-button v-if="editable" @click="saveDraft">
<el-icon><DocumentChecked /></el-icon>
保存草稿
</el-button>
<el-button v-if="editable" type="primary" :disabled="!canFreeze" @click="freezeCard">
<el-icon><Lock /></el-icon>
冻结当前版本
</el-button>
<el-button v-else @click="startNewDraft">
<el-icon><RefreshRight /></el-icon>
创建新版本
</el-button>
</template>
</div>
</div>
</header>
<div class="role-card-status">
<el-tag :type="statusMeta.tone" effect="light">{{ statusMeta.value }}</el-tag>
<span v-if="card?.version">版本 {{ card.version }}</span>
<span v-if="card?.rubricVersion">规则 {{ card.rubricVersion }}</span>
<span v-if="card?.sourceMode">来源 {{ card.sourceMode === 'grill' ? 'Grill 岗位' : '直接创建岗位' }}</span>
<span v-if="card?.completeness">完整度 {{ card.completeness === 'complete' ? '完整' : '暂定' }}</span>
</div>
<el-alert
v-if="stale"
type="warning"
......@@ -267,20 +411,43 @@ onMounted(() => {
/>
<div v-if="!card" class="role-card-empty">
<p>该岗位还没有评估卡。系统会从岗位职责、任职要求、命脉和加分项归并草稿,再由 HR 复核。</p>
<span class="role-card-empty-mark">
<el-icon><MagicStick /></el-icon>
</span>
<div>
<strong>还没有岗位评估卡</strong>
<p>系统会从岗位职责、任职要求、能力和加分项归并草稿,再由 HR 复核并冻结。</p>
</div>
</div>
<template v-else>
<el-collapse class="role-card-sections" :model-value="['match', 'competency', 'gates', 'internal']">
<el-collapse-item name="match">
<template #title>
<b>① 岗位匹配度 · 3 个匹配面</b>
</template>
<el-tabs v-model="activeMatchSurface">
<el-tab-pane v-for="surface in matchSurfaces" :key="surface.key" :label="surface.label" :name="surface.key">
<div v-else class="role-card-workspace">
<div class="role-card-main">
<section class="criteria-section">
<header class="criteria-section-head">
<span class="criteria-step">01</span>
<div>
<h4>岗位匹配度</h4>
<p>从岗位情境、工作内容和职责产出三个面确认候选人的岗位适配。</p>
</div>
<span class="criteria-count"
><b>{{ matchCriterionCount }}</b> 条判据</span
>
</header>
<el-tabs v-model="activeMatchSurface" class="criteria-tabs">
<el-tab-pane v-for="surface in matchSurfaces" :key="surface.key" :name="surface.key">
<template #label>
<span class="criteria-tab-label">
{{ surface.label }}
<i>{{ card.matchCriteria[surface.key]?.length || 0 }}</i>
</span>
</template>
<div class="criteria-toolbar">
<span>判据权重:必须项 3 / 重要项 2 / 加分项 1</span>
<el-button v-if="editable" size="small" @click="addMatchCriterion(surface.key)">新增判据</el-button>
<el-button v-if="editable" size="small" @click="addMatchCriterion(surface.key)">
<el-icon><Plus /></el-icon>
新增判据
</el-button>
</div>
<el-table
:data="card.matchCriteria[surface.key] || []"
......@@ -310,28 +477,52 @@ onMounted(() => {
</template>
</el-table-column>
<el-table-column prop="weight" label="权重" width="70" align="center" />
<el-table-column prop="source" label="来源" min-width="140" />
<el-table-column label="来源" min-width="120">
<template #default="{ row }">{{ sourceLabel(row.source) }}</template>
</el-table-column>
<el-table-column v-if="editable" label="操作" width="76" align="center">
<template #default="{ $index }">
<el-button link type="danger" @click="removeCriterion(card.matchCriteria[surface.key], $index)"
>删除</el-button
<el-button
link
type="danger"
:aria-label="`删除第 ${$index + 1} 条判据`"
@click="removeCriterion(card.matchCriteria[surface.key], $index)"
>
<el-icon><Delete /></el-icon>
</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</el-collapse-item>
<el-collapse-item name="competency">
<template #title>
<b>② 能力证据 · 4 把能力尺子</b>
</template>
<el-tabs v-model="activeCompetency">
<el-tab-pane v-for="ruler in competencyRulers" :key="ruler.key" :label="ruler.label" :name="ruler.key">
</section>
<section class="criteria-section">
<header class="criteria-section-head">
<span class="criteria-step">02</span>
<div>
<h4>能力证据</h4>
<p>用四把能力尺子判断深度、复杂度、交付结果与迁移能力。</p>
</div>
<span class="criteria-count"
><b>{{ competencyAnchorCount }}</b> 条锚点</span
>
</header>
<el-tabs v-model="activeCompetency" class="criteria-tabs">
<el-tab-pane v-for="ruler in competencyRulers" :key="ruler.key" :name="ruler.key">
<template #label>
<span class="criteria-tab-label">
{{ ruler.label }}
<i>{{ card.competencyCriteria[ruler.key]?.length || 0 }}</i>
</span>
</template>
<div class="criteria-toolbar">
<span>默认等权,每条锚点取最高有效证据强度。</span>
<el-button v-if="editable" size="small" @click="addCompetencyAnchor(ruler.key)">新增锚点</el-button>
<el-button v-if="editable" size="small" @click="addCompetencyAnchor(ruler.key)">
<el-icon><Plus /></el-icon>
新增锚点
</el-button>
</div>
<el-table :data="card.competencyCriteria[ruler.key] || []" size="small" border>
<el-table-column label="岗位能力锚点" min-width="300">
......@@ -346,30 +537,53 @@ onMounted(() => {
<span v-else>{{ row.weight }}</span>
</template>
</el-table-column>
<el-table-column prop="source" label="来源" min-width="140" />
<el-table-column label="来源" min-width="120">
<template #default="{ row }">{{ sourceLabel(row.source) }}</template>
</el-table-column>
<el-table-column v-if="editable" label="操作" width="76" align="center">
<template #default="{ $index }">
<el-button link type="danger" @click="removeCriterion(card.competencyCriteria[ruler.key], $index)"
>删除</el-button
<el-button
link
type="danger"
:aria-label="`删除第 ${$index + 1} 条能力锚点`"
@click="removeCriterion(card.competencyCriteria[ruler.key], $index)"
>
<el-icon><Delete /></el-icon>
</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</el-collapse-item>
</section>
<section class="criteria-section">
<header class="criteria-section-head">
<span class="criteria-step">03</span>
<div>
<h4>门槛、红线与加分项</h4>
<p>硬门槛优先排除,加分项只影响相对排序,不抵消红线。</p>
</div>
<span class="criteria-count"
><b>{{ gateCount + highlightCount }}</b> 条规则</span
>
</header>
<el-collapse-item name="gates">
<template #title>
<b>③ 硬门槛、红线与加分项</b>
</template>
<div class="criteria-toolbar">
<span>直接创建岗位默认无内部门槛;Grill 岗位按冻结规则执行。</span>
<span class="criteria-actions">
<el-button v-if="editable" size="small" @click="addGate">新增门槛</el-button>
<el-button v-if="editable" size="small" @click="addHighlight">新增加分项</el-button>
<el-button v-if="editable" size="small" @click="addGate">
<el-icon><Plus /></el-icon>
新增门槛
</el-button>
<el-button v-if="editable" size="small" @click="addHighlight">
<el-icon><Plus /></el-icon>
新增加分项
</el-button>
</span>
</div>
<h5 class="criteria-subhead">硬门槛与红线</h5>
<el-table :data="card.hardGates || []" size="small" border>
<el-table-column label="门槛 / 红线" min-width="300">
<template #default="{ row }">
......@@ -386,17 +600,27 @@ onMounted(() => {
<el-option label="竞业" value="non_compete" />
<el-option label="命脉" value="lifeline" />
</el-select>
<span v-else>{{ row.kind }}</span>
<span v-else>{{ gateKindLabel(row.kind) }}</span>
</template>
</el-table-column>
<el-table-column prop="source" label="来源" min-width="140" />
<el-table-column label="来源" min-width="120">
<template #default="{ row }">{{ sourceLabel(row.source) }}</template>
</el-table-column>
<el-table-column v-if="editable" label="操作" width="76" align="center">
<template #default="{ $index }">
<el-button link type="danger" @click="removeCriterion(card.hardGates, $index)">删除</el-button>
<el-button
link
type="danger"
:aria-label="`删除第 ${$index + 1} 条门槛`"
@click="removeCriterion(card.hardGates, $index)"
>
<el-icon><Delete /></el-icon>
</el-button>
</template>
</el-table-column>
</el-table>
<h4 class="role-card-subhead">加分亮点</h4>
<h5 class="criteria-subhead">加分亮点</h5>
<el-table :data="card.highlights || []" size="small" border>
<el-table-column label="加分项" min-width="320">
<template #default="{ row }">
......@@ -404,42 +628,146 @@ onMounted(() => {
<span v-else>{{ row.label || '未填写' }}</span>
</template>
</el-table-column>
<el-table-column prop="source" label="来源" min-width="140" />
<el-table-column label="来源" min-width="120">
<template #default="{ row }">{{ sourceLabel(row.source) }}</template>
</el-table-column>
<el-table-column v-if="editable" label="操作" width="76" align="center">
<template #default="{ $index }">
<el-button link type="danger" @click="removeCriterion(card.highlights, $index)">删除</el-button>
<el-button
link
type="danger"
:aria-label="`删除第 ${$index + 1} 条加分项`"
@click="removeCriterion(card.highlights, $index)"
>
<el-icon><Delete /></el-icon>
</el-button>
</template>
</el-table-column>
</el-table>
</el-collapse-item>
<el-collapse-item name="internal">
<template #title>
<b>岗位内部信息与版本历史</b>
</template>
<div class="internal-rules">
<div v-for="(value, key) in card.internalRules || {}" :key="key">
<span>{{ key }}</span>
<strong>{{ typeof value === 'object' ? JSON.stringify(value) : value || '未填写' }}</strong>
</section>
<el-collapse v-model="activeAdvancedSections" class="role-card-advanced">
<el-collapse-item name="internal">
<template #title>
<div class="advanced-title">
<span>岗位内部信息与版本历史</span>
<small>仅内部使用,不进入对外 JD</small>
</div>
</template>
<h5 class="criteria-subhead">内部判据</h5>
<div class="internal-rules">
<div v-for="(value, key) in card.internalRules || {}" :key="key">
<span>{{ internalRuleLabel(key) }}</span>
<strong>{{ internalRuleValue(value) }}</strong>
</div>
</div>
<div id="role-card-version-history" class="role-card-history-block">
<div class="history-block-head">
<div>
<h5 class="criteria-subhead">冻结版本</h5>
<p>冻结版本保留当时使用的评估标准,后续修改不会覆盖历史记录。</p>
</div>
<span>{{ history.length }} 个版本</span>
</div>
<div v-if="history.length" class="role-card-history">
<article v-for="item in [...history].reverse()" :key="`${item.version}-${item.frozenAt}`">
<div>
<b>{{ item.version || '未命名版本' }}</b>
<el-tag size="small" :type="item.version === card.version ? 'success' : 'info'">
{{ item.version === card.version ? '当前版本' : '历史版本' }}
</el-tag>
</div>
<p>{{ item.frozenAt || '未记录冻结时间' }} · {{ sourceModeLabel(item.sourceMode) }}</p>
<el-button link @click="viewHistory(item)">查看信息</el-button>
</article>
</div>
<div v-else class="job-empty-inline">暂无冻结版本。</div>
</div>
</el-collapse-item>
</el-collapse>
</div>
<aside class="role-card-side">
<section class="readiness-panel" :class="{ ready: standardReady }">
<header class="readiness-head">
<div>
<span class="section-kicker">{{ readinessKicker }}</span>
<h4>标准完整度</h4>
</div>
<strong>{{ requiredReadyCount }} / {{ requiredChecks.length }}</strong>
</header>
<div
class="readiness-progress"
role="progressbar"
aria-label="评估卡冻结准备度"
aria-valuemin="0"
aria-valuemax="100"
:aria-valuenow="readinessPercent"
>
<i :style="{ width: `${readinessPercent}%` }"></i>
</div>
<h4 class="role-card-subhead">冻结版本</h4>
<div v-if="history.length" class="role-card-history">
<article v-for="item in [...history].reverse()" :key="`${item.version}-${item.frozenAt}`">
<ul class="readiness-list">
<li v-for="item in requiredChecks" :key="item.key" :class="{ done: item.ready }">
<el-icon>
<CircleCheckFilled v-if="item.ready" />
<WarningFilled v-else />
</el-icon>
<div>
<b>{{ item.version || '未命名版本' }}</b>
<el-tag size="small" :type="item.version === card.version ? 'success' : 'info'">
{{ item.version === card.version ? '当前版本' : '历史版本' }}
</el-tag>
<b>{{ item.label }}</b>
<span>{{ item.detail }}</span>
</div>
<p>{{ item.frozenAt || '未记录冻结时间' }} · {{ item.sourceMode || 'direct' }}</p>
<el-button link @click="viewHistory(item)">查看信息</el-button>
</article>
</li>
</ul>
<div class="readiness-facts">
<div>
<span>硬门槛</span>
<b>{{ gateCount }}</b>
</div>
<div>
<span>加分项</span>
<b>{{ highlightCount }}</b>
</div>
<div>
<span>冻结版本</span>
<b>{{ history.length }}</b>
</div>
</div>
<div v-else class="job-empty-inline">暂无冻结版本。</div>
</el-collapse-item>
</el-collapse>
</template>
<p class="readiness-hint">{{ readinessHint }}</p>
</section>
<section class="version-summary-panel">
<header>
<div>
<span class="section-kicker">版本摘要</span>
<h4>{{ card.version || '未编号草稿' }}</h4>
</div>
<el-tag :type="statusMeta.tone" effect="plain">{{ statusMeta.value }}</el-tag>
</header>
<dl class="version-summary-list">
<div>
<dt>规则版本</dt>
<dd>{{ card.rubricVersion || 'RR-2.0' }}</dd>
</div>
<div>
<dt>评估来源</dt>
<dd>{{ sourceModeLabel(card.sourceMode) }}</dd>
</div>
<div>
<dt>标准完整度</dt>
<dd>{{ card.completeness === 'complete' ? '完整' : '暂定' }}</dd>
</div>
<div>
<dt>冻结时间</dt>
<dd>{{ card.frozenAt || '尚未冻结' }}</dd>
</div>
</dl>
<button v-if="history.length" type="button" class="history-link" @click="openVersionHistory">
查看 {{ history.length }} 个冻结版本
</button>
</section>
</aside>
</div>
</section>
</template>
......@@ -447,20 +775,37 @@ onMounted(() => {
.role-card-panel {
display: flex;
flex-direction: column;
gap: 14px;
gap: 16px;
}
.role-card-head {
.role-card-hero {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 18px;
gap: 24px;
padding: 22px 24px;
background: var(--panel);
border: 1px solid var(--line);
border-radius: 12px;
}
.role-card-heading {
min-width: 0;
.section-kicker {
color: var(--blue);
font-size: 12px;
font-weight: 600;
}
h3 {
margin: 4px 0 6px;
margin: 7px 0 6px;
font-size: 22px;
line-height: 1.35;
}
p {
max-width: 760px;
margin: 0;
color: var(--muted);
font-size: 13px;
......@@ -468,32 +813,219 @@ onMounted(() => {
}
}
.role-card-heading-top {
display: flex;
align-items: center;
gap: 10px;
}
.role-card-meta {
display: flex;
flex-wrap: wrap;
gap: 8px 16px;
margin-top: 14px;
> span {
display: inline-flex;
align-items: baseline;
gap: 6px;
min-width: 0;
padding-right: 16px;
border-right: 1px solid var(--line);
&:last-child {
padding-right: 0;
border-right: 0;
}
}
small {
color: var(--muted);
font-size: 11px;
}
b {
max-width: 220px;
overflow: hidden;
color: var(--ink);
font-size: 12px;
font-weight: 600;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.role-card-actions {
display: flex;
flex: 0 0 auto;
flex-wrap: wrap;
justify-content: flex-end;
gap: 8px;
}
.role-card-status {
.role-card-empty {
display: flex;
flex-wrap: wrap;
gap: 8px 16px;
align-items: center;
align-items: flex-start;
gap: 14px;
padding: 24px;
border: 1px dashed var(--line);
border-radius: 12px;
background: color-mix(in srgb, var(--panel) 72%, transparent);
color: var(--muted);
font-size: 12px;
strong {
display: block;
color: var(--ink);
font-size: 15px;
}
p {
max-width: 760px;
margin: 6px 0 0;
font-size: 13px;
line-height: 1.6;
}
}
.role-card-empty {
padding: 22px;
border: 1px dashed var(--line);
.role-card-empty-mark {
display: inline-flex;
flex: 0 0 auto;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
color: var(--blue);
background: color-mix(in srgb, var(--blue) 10%, var(--panel));
border-radius: 10px;
background: var(--surface-soft, rgba(255, 255, 255, 0.55));
.el-icon {
font-size: 19px;
}
}
.role-card-workspace {
display: grid;
grid-template-columns: minmax(0, 1fr) 310px;
align-items: start;
gap: 16px;
}
.role-card-main {
display: flex;
flex-direction: column;
gap: 16px;
min-width: 0;
}
.criteria-section {
min-width: 0;
padding: 20px 22px;
background: var(--panel);
border: 1px solid var(--line);
border-radius: 12px;
}
.criteria-section-head {
display: grid;
grid-template-columns: 38px minmax(0, 1fr) auto;
align-items: start;
gap: 13px;
margin-bottom: 15px;
h4 {
margin: 0;
font-size: 16px;
line-height: 1.45;
}
p {
max-width: 680px;
margin: 4px 0 0;
color: var(--muted);
font-size: 12px;
line-height: 1.6;
}
}
.criteria-step {
display: inline-flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
color: var(--blue);
background: color-mix(in srgb, var(--blue) 9%, var(--panel));
border: 1px solid color-mix(in srgb, var(--blue) 20%, var(--line));
border-radius: 9px;
font-size: 12px;
font-weight: 700;
font-variant-numeric: tabular-nums;
}
.criteria-count {
display: inline-flex;
align-items: baseline;
gap: 4px;
padding: 6px 9px;
color: var(--muted);
background: var(--bg);
border-radius: 7px;
font-size: 11px;
white-space: nowrap;
b {
color: var(--ink);
font-size: 13px;
font-variant-numeric: tabular-nums;
}
}
.role-card-sections {
border-top: 1px solid var(--line);
.criteria-tabs {
:deep(.el-tabs__header) {
margin-bottom: 13px;
}
:deep(.el-tabs__nav-wrap::after) {
height: 1px;
background: var(--line);
}
:deep(.el-tabs__item) {
height: 40px;
padding: 0 14px;
color: var(--muted);
font-size: 13px;
}
:deep(.el-tabs__item.is-active) {
color: var(--blue);
font-weight: 600;
}
:deep(.el-tabs__active-bar) {
height: 2px;
background: var(--blue);
border-radius: 2px;
}
}
.criteria-tab-label {
display: inline-flex;
align-items: center;
gap: 6px;
i {
min-width: 18px;
padding: 1px 5px;
color: var(--muted);
background: var(--bg);
border-radius: 999px;
font-size: 10px;
font-style: normal;
font-weight: 600;
line-height: 1.5;
text-align: center;
}
}
.criteria-toolbar {
......@@ -501,19 +1033,88 @@ onMounted(() => {
align-items: center;
justify-content: space-between;
gap: 12px;
margin: 6px 0 10px;
margin: 2px 0 10px;
color: var(--muted);
font-size: 12px;
line-height: 1.55;
}
.criteria-actions {
display: flex;
flex: 0 0 auto;
flex-wrap: wrap;
gap: 8px;
}
.role-card-subhead {
.criteria-subhead {
margin: 18px 0 8px;
font-size: 14px;
color: var(--ink);
font-size: 13px;
line-height: 1.45;
&:first-child {
margin-top: 0;
}
}
.criteria-section :deep(.el-table) {
--el-table-border-color: var(--line);
--el-table-header-bg-color: color-mix(in srgb, var(--bg) 62%, var(--panel));
--el-table-row-hover-bg-color: color-mix(in srgb, var(--blue) 4%, var(--panel));
border-radius: 8px;
overflow: hidden;
}
.criteria-section :deep(.el-table th.el-table__cell) {
color: var(--muted);
font-size: 11px;
font-weight: 600;
}
.criteria-section :deep(.el-table .cell) {
line-height: 1.5;
}
.role-card-advanced {
overflow: hidden;
background: var(--panel);
border: 1px solid var(--line);
border-radius: 12px;
:deep(.el-collapse) {
border: 0;
}
:deep(.el-collapse-item__header) {
min-height: 60px;
height: auto;
padding: 0 20px;
color: var(--ink);
font-size: 14px;
font-weight: 600;
}
:deep(.el-collapse-item__wrap) {
border-bottom: 0;
}
:deep(.el-collapse-item__content) {
padding: 2px 20px 22px;
}
}
.advanced-title {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 8px;
small {
color: var(--muted);
font-size: 11px;
font-weight: 400;
}
}
.internal-rules {
......@@ -544,6 +1145,36 @@ onMounted(() => {
}
}
.role-card-history-block {
margin-top: 20px;
scroll-margin-top: 140px;
}
.history-block-head {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 16px;
margin-bottom: 10px;
.criteria-subhead {
margin-bottom: 3px;
}
p {
margin: 0;
color: var(--muted);
font-size: 11px;
line-height: 1.5;
}
> span {
flex: 0 0 auto;
color: var(--muted);
font-size: 11px;
}
}
.role-card-history {
display: flex;
flex-direction: column;
......@@ -572,22 +1203,301 @@ onMounted(() => {
}
}
@media (max-width: 760px) {
.role-card-head {
.role-card-side {
position: sticky;
top: 136px;
display: flex;
flex-direction: column;
gap: 14px;
min-width: 0;
}
.readiness-panel,
.version-summary-panel {
padding: 18px;
background: var(--panel);
border: 1px solid var(--line);
border-radius: 12px;
}
.readiness-panel {
&.ready {
border-color: color-mix(in srgb, var(--green) 42%, var(--line));
}
}
.readiness-head,
.version-summary-panel > header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
.section-kicker {
color: var(--blue);
font-size: 11px;
font-weight: 600;
}
h4 {
margin: 4px 0 0;
font-size: 15px;
line-height: 1.4;
}
}
.readiness-head {
> strong {
color: var(--muted);
font-size: 16px;
font-variant-numeric: tabular-nums;
}
}
.readiness-progress {
height: 6px;
margin: 14px 0;
overflow: hidden;
background: var(--bg);
border-radius: 999px;
i {
display: block;
height: 100%;
background: var(--blue);
border-radius: inherit;
transition: width 0.2s ease;
}
}
.readiness-panel.ready .readiness-progress i {
background: var(--green);
}
.readiness-list {
display: flex;
flex-direction: column;
gap: 10px;
margin: 0;
padding: 0;
list-style: none;
li {
display: flex;
align-items: flex-start;
gap: 8px;
.el-icon {
flex: 0 0 auto;
margin-top: 2px;
color: var(--yellow);
font-size: 15px;
}
&.done .el-icon {
color: var(--green);
}
}
b {
display: block;
font-size: 12px;
line-height: 1.5;
}
span {
display: block;
margin-top: 2px;
color: var(--muted);
font-size: 11px;
line-height: 1.5;
}
}
.readiness-facts {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 8px;
margin-top: 14px;
padding-top: 14px;
border-top: 1px solid var(--line);
> div {
min-width: 0;
}
span {
display: block;
color: var(--muted);
font-size: 10px;
}
b {
display: block;
margin-top: 3px;
font-size: 14px;
font-variant-numeric: tabular-nums;
}
}
.readiness-hint {
margin: 14px 0 0;
color: var(--muted);
font-size: 11px;
line-height: 1.55;
}
.version-summary-list {
display: flex;
flex-direction: column;
gap: 0;
margin: 14px 0 0;
> div {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
padding: 8px 0;
border-top: 1px solid var(--line);
}
dt {
flex: 0 0 auto;
color: var(--muted);
font-size: 11px;
}
dd {
min-width: 0;
margin: 0;
color: var(--ink);
font-size: 11px;
line-height: 1.5;
text-align: right;
overflow-wrap: anywhere;
}
}
.history-link {
width: 100%;
min-height: 36px;
margin-top: 12px;
color: var(--blue);
background: color-mix(in srgb, var(--blue) 7%, var(--panel));
border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
border-radius: 8px;
font-size: 12px;
cursor: pointer;
transition:
background 0.18s ease,
border-color 0.18s ease;
&:hover {
background: color-mix(in srgb, var(--blue) 11%, var(--panel));
border-color: color-mix(in srgb, var(--blue) 38%, var(--line));
}
&:focus-visible {
outline: 2px solid var(--cyan);
outline-offset: 2px;
}
}
@media (prefers-reduced-motion: reduce) {
.readiness-progress i,
.history-link {
transition: none;
}
}
@media (max-width: 1180px) {
.role-card-workspace {
grid-template-columns: minmax(0, 1fr);
}
.role-card-side {
position: static;
order: -1;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 900px) {
.role-card-hero {
flex-direction: column;
padding: 18px;
}
.role-card-actions {
justify-content: flex-start;
}
.role-card-meta {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
> span {
padding-right: 0;
border-right: 0;
}
}
.criteria-section {
padding: 17px 16px;
}
.criteria-section-head {
grid-template-columns: 34px minmax(0, 1fr);
.criteria-count {
grid-column: 2;
justify-self: start;
}
}
.criteria-toolbar {
align-items: flex-start;
flex-direction: column;
}
.role-card-side {
grid-template-columns: minmax(0, 1fr);
}
.internal-rules {
grid-template-columns: 1fr;
}
.history-block-head {
align-items: flex-start;
flex-direction: column;
gap: 4px;
}
.role-card-history article {
align-items: flex-start;
flex-direction: column;
}
}
@media (max-width: 520px) {
.role-card-heading-top {
align-items: flex-start;
flex-direction: column;
}
.role-card-meta {
grid-template-columns: minmax(0, 1fr);
}
.criteria-tabs :deep(.el-tabs__item) {
padding: 0 10px;
}
.criteria-tab-label {
gap: 4px;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment