feat(admin): 优化用户界面交互与组件功能
- 在抽题页面添加开始抽题按钮并绑定事件 - 调整队伍列表动画延迟和分组页面样式 - 修复结果发布条件逻辑,允许无结束时间时发布 - 增强TypeIt组件,支持动态配置和实例管理 - 更新Competition API类型定义,使用枚举类型 - 优化CompetitionLayout组件按钮显示时机 - 修正分析页面API调用参数类型 - 在拼写检查词典中添加Typeit
This commit is contained in:
@ -582,7 +582,7 @@ const nowTs = ref(Date.now())
|
||||
const canPublish = computed(() => {
|
||||
const endTime = (currentQuestion.value as any)?.EndTime
|
||||
if (!endTime)
|
||||
return false
|
||||
return true
|
||||
const end = new Date(endTime).getTime()
|
||||
return nowTs.value >= end
|
||||
})
|
||||
|
||||
@ -74,7 +74,7 @@ async function initQuestions() {
|
||||
const { data: outlineData, error } = await fetchGetCurrentQuestion({
|
||||
ActivityID: Number(activityId.value),
|
||||
GroupID: Number(groupsId.value),
|
||||
RoundType: Number(currentQuestionMainInfo.value?.Activity_Question.RoundType) || 0,
|
||||
RoundType: (currentQuestionMainInfo.value?.Activity_Question.RoundType) || 0,
|
||||
})
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(outlineData, 'outlineData')
|
||||
@ -172,23 +172,18 @@ onBeforeUnmount(() => {
|
||||
<span class="text-lg text-white font-bold drop-shadow">{{ team.TeamName }}</span>
|
||||
<span class="ml-2 rounded-full bg-white/40 px-2 py-0.5 text-sm">正确 <span class="text-md text-blue">{{
|
||||
team.correctCount }}</span> 字</span>
|
||||
<span class="text-s rounded-full bg-white/40 px-2 py-0.5">积分 <span class="text-md text-blue">{{ team.Points
|
||||
<span class="text-s rounded-full bg-white/40 px-2 py-0.5">积分 <span class="text-md text-blue">{{
|
||||
team.Points
|
||||
}}</span></span>
|
||||
</div>
|
||||
|
||||
<!-- Answer Image Area -->
|
||||
<div
|
||||
class="relative mb-4 flex-1 overflow-hidden border border-gray-300 rounded bg-gray-50"
|
||||
>
|
||||
<div class="relative mb-4 flex-1 overflow-hidden border border-gray-300 rounded bg-gray-50">
|
||||
<!-- Grid Background Simulation -->
|
||||
<div class="pointer-events-none absolute inset-0 grid grid-cols-8 gap-px bg-gray-200 opacity-20">
|
||||
<!-- <div v-for="n in 64" :key="n" class="bg-white" /> -->
|
||||
</div>
|
||||
<NImage
|
||||
:src="team.UserAnswerPicture"
|
||||
class="h-full w-full"
|
||||
object-fit="contain"
|
||||
/>
|
||||
<NImage :src="team.UserAnswerPicture" class="h-full w-full" object-fit="contain" />
|
||||
</div>
|
||||
|
||||
<!-- Stats & Score -->
|
||||
|
||||
@ -135,7 +135,10 @@ const questionTitle = computed(() => question.value?.QuestionList?.QuestionConte
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<CompetitionLayout :show-back="true" :show-next="false" :title="questionMainTitle || '抽题'" @back="handleBack">
|
||||
<CompetitionLayout
|
||||
:show-back="true" :show-next="true" :title="questionMainTitle || '抽题'" next-btn-text="开始抽题"
|
||||
@next="handleCardClick(question as Api.Competition.CurrentQuestionResponse)" @back="handleBack"
|
||||
>
|
||||
<div class="h-full w-full flex flex-col items-center pt-10 font-sans">
|
||||
<div v-if="question" class="mb-10 max-w-4xl text-center">
|
||||
<div class="text-2xl text-gray-800 font-medium leading-relaxed tracking-wide">
|
||||
|
||||
@ -163,7 +163,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
margin: 0;
|
||||
margin-bottom: 30px;
|
||||
margin-bottom: 20px;
|
||||
|
||||
&.is-disabled {
|
||||
opacity: 0.6;
|
||||
@ -187,6 +187,7 @@ onMounted(() => {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-size: contain;
|
||||
margin-left: 20px;
|
||||
|
||||
.star-img {
|
||||
width: 100%;
|
||||
@ -212,14 +213,15 @@ onMounted(() => {
|
||||
// border: 1px solid #5d4037;
|
||||
|
||||
&.type-moon {
|
||||
padding-left: 27px; // 按比例调整 padding
|
||||
padding-top: 8px;
|
||||
padding-left: 20px;
|
||||
padding-top: 12px;
|
||||
margin-top: -5px; // 调整错落位置
|
||||
}
|
||||
|
||||
&.type-sun {
|
||||
padding-left: 40px; // 按比例调整 padding
|
||||
margin-top: 5px;
|
||||
padding-left: 30px;
|
||||
padding-top: -1px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
// .sun-icon {
|
||||
|
||||
@ -108,7 +108,7 @@ onMounted(() => {
|
||||
<TransitionGroup name="list-anim" tag="div" class="teams-grid">
|
||||
<div
|
||||
v-for="(item, index) in showList ? teams : []" :key="item.id" class="team-item"
|
||||
:style="{ '--delay': `${index * 0.8}s` }" @click="selectTeam(item.id)"
|
||||
:style="{ '--delay': `${index * 0.4}s` }" @click="selectTeam(item.id)"
|
||||
>
|
||||
<div class="icon-wrapper">
|
||||
<img src="@/assets/imgs/user/team-title-icon.svg" alt="team-icon" class="h-full w-full object-cover">
|
||||
|
||||
Reference in New Issue
Block a user