|
|
@@ -95,7 +95,7 @@
|
|
|
:key="index"
|
|
|
:class="['step-cell', cell.tone === 'danger' ? 'notice-cell' : '']"
|
|
|
>
|
|
|
- <span class="cell-bookmark">{{ cellBookmarks[index] }}</span>
|
|
|
+ <span class="cell-bookmark">{{ row.bookmarks[index] }}</span>
|
|
|
|
|
|
<template v-if="cell.type === 'members'">
|
|
|
<button
|
|
|
@@ -548,6 +548,7 @@ type TableRow = {
|
|
|
teamName: string
|
|
|
education: string
|
|
|
searchText: string
|
|
|
+ bookmarks: string[]
|
|
|
tableWidth: string
|
|
|
backgroundColor: string
|
|
|
columnWidths: number[]
|
|
|
@@ -621,7 +622,6 @@ const wordCloudWords = [
|
|
|
{ text: '研究生', size: 16, rotate: -5, color: '#7f85b5', left: '79%', top: '28%' }
|
|
|
]
|
|
|
|
|
|
-const cellBookmarks = ['技术', '经营', '商务', '安全', '法务']
|
|
|
const selectedTeamNames = computed(() =>
|
|
|
selectedTeams.value.map((team) => team.teamName).join('、')
|
|
|
)
|
|
|
@@ -637,6 +637,7 @@ const rowStylePresets = [
|
|
|
{ tableWidth: '75%', backgroundColor: '#f2faef', columnWidths: [1.8, 1.8, 1.8, 1.8, 1.8] },
|
|
|
{ tableWidth: '100%', backgroundColor: '#fff8e8', columnWidths: [2, 2, 2, 2, 2] }
|
|
|
]
|
|
|
+const rankOptions = computed(() => getStrDictOptions(DICT_TYPE.RD_EXPERT_RANK))
|
|
|
|
|
|
const getDictLabel = (type: string, value: string | number | undefined | null) => {
|
|
|
if (value === undefined || value === null || value === '') return ''
|
|
|
@@ -709,6 +710,11 @@ const getColumnPercent = (row: TableRow, index: number) => {
|
|
|
const tableData = computed<TableRow[]>(() => {
|
|
|
return (list.value as ExpertGroup[]).map((group, index) => {
|
|
|
const preset = rowStylePresets[index] || rowStylePresets[rowStylePresets.length - 1]
|
|
|
+ const bookmarks = rankOptions.value.map((item) => item.label)
|
|
|
+ const columnWidths =
|
|
|
+ preset.columnWidths.length === rankOptions.value.length
|
|
|
+ ? preset.columnWidths
|
|
|
+ : Array(rankOptions.value.length).fill(1)
|
|
|
const educationLabels = Array.from(
|
|
|
new Set(
|
|
|
group.experts.map((expert) => getDictLabel(DICT_TYPE.RD_EXPERT_EDUCATION, expert.education))
|
|
|
@@ -726,24 +732,22 @@ const tableData = computed<TableRow[]>(() => {
|
|
|
)
|
|
|
.join(' ')
|
|
|
.toLowerCase()
|
|
|
+ const cells: CellItem[] = rankOptions.value.map((option) => ({
|
|
|
+ type: 'members',
|
|
|
+ members: group.experts.filter((expert) =>
|
|
|
+ (expert.expertRank || []).some((rank) => String(rank) === String(option.value))
|
|
|
+ )
|
|
|
+ }))
|
|
|
|
|
|
return {
|
|
|
teamName: group.echelonLabel,
|
|
|
education: educationLabels.join('、') || '-',
|
|
|
searchText,
|
|
|
+ bookmarks,
|
|
|
tableWidth: preset.tableWidth,
|
|
|
backgroundColor: preset.backgroundColor,
|
|
|
- columnWidths: preset.columnWidths,
|
|
|
- cells: [
|
|
|
- {
|
|
|
- type: 'members',
|
|
|
- members: group.experts
|
|
|
- },
|
|
|
- { type: 'text', text: '' },
|
|
|
- { type: 'text', text: '' },
|
|
|
- { type: 'text', text: '', tone: 'danger' },
|
|
|
- { type: 'text', text: '' }
|
|
|
- ]
|
|
|
+ columnWidths,
|
|
|
+ cells
|
|
|
}
|
|
|
})
|
|
|
})
|