fix: 修正管理面板权限组、公告发布人与问卷选项显示
- 用户列表新增权限组列,展示权限标签 - 公告发布人由 UUID 解析为用户名 - 问卷选择题作答由选项 ID 解析为选项文字 - 维基默认打开首页,内部链接标题不再被替换下划线
This commit is contained in:
1 parent
52b3606062
commit
227af685d4
7 files changed
+78
-7
No files matched your search
@@ -270,9 +270,18 @@ function questionFor(submission: SkinSiteReviewSubmission, questionId: string) {
|
||||
return submission.paper?.questions?.find((q) => q.id === questionId)
|
||||
}
|
||||
|
||||
function answerText(answer: SkinSiteReviewAnswer): string {
|
||||
function answerText(
|
||||
submission: SkinSiteReviewSubmission,
|
||||
answer: SkinSiteReviewAnswer,
|
||||
): string {
|
||||
if (answer.text) return answer.text
|
||||
if (Array.isArray(answer.values) && answer.values.length) return answer.values.join(', ')
|
||||
if (Array.isArray(answer.values) && answer.values.length) {
|
||||
const question = answer.questionId ? questionFor(submission, answer.questionId) : undefined
|
||||
const options = question?.options ?? []
|
||||
return answer.values
|
||||
.map((value) => options.find((o) => o.id === value)?.description ?? value)
|
||||
.join(', ')
|
||||
}
|
||||
return '—'
|
||||
}
|
||||
|
||||
@@ -1046,7 +1055,7 @@ onMounted(() => void load())
|
||||
<span
|
||||
class="mt-1 rounded-lg bg-bg px-3 py-2 text-sm break-words whitespace-pre-wrap text-contrast"
|
||||
>
|
||||
{{ answerText(answer) }}
|
||||
{{ answerText(detailSubmission, answer) }}
|
||||
</span>
|
||||
<span
|
||||
v-if="answer.awardedScore !== null && answer.awardedScore !== undefined"
|
||||
|
||||
Reference in new issue
Block a user