|
@@ -19,9 +19,15 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div v-if="groups" class="tw-flex-grow tw-overflow-auto tw-my-5">
|
|
|
- <template v-for="(groupNumber, index) in groups" :key="index">
|
|
|
- <div class="tw-mb-4 tw-bg-white tw-p-4 tw-pl-5 tw-pr-3">
|
|
|
+ <div v-if="groups" class="question-list tw-flex-grow tw-overflow-auto">
|
|
|
+ <template
|
|
|
+ v-for="({ groupNumber, selectiveIndex }, index) in groups"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <div class="question-item tw-mb-4 tw-bg-white tw-p-4 tw-pl-5 tw-pr-3">
|
|
|
+ <div v-if="selectiveIndex" class="question-item-select-group">
|
|
|
+ {{ selectiveIndex }}
|
|
|
+ </div>
|
|
|
<div
|
|
|
class="tw-flex tw-justify-between tw-place-items-center hover:tw-bg-gray-200"
|
|
|
@mouseover="addFocusTrack(groupNumber, undefined, undefined)"
|
|
@@ -134,8 +140,16 @@ watch(
|
|
|
}
|
|
|
);
|
|
|
const groups = $computed(() => {
|
|
|
- const gs = store.currentTaskEnsured.questionList.map((q) => q.groupNumber);
|
|
|
- return [...new Set(gs)].sort((a, b) => a - b);
|
|
|
+ const gs = store.currentTaskEnsured.questionList.reduce((gs, q) => {
|
|
|
+ if (!gs[q.groupNumber]) {
|
|
|
+ gs[q.groupNumber] = {
|
|
|
+ groupNumber: q.groupNumber,
|
|
|
+ selectiveIndex: q.selectiveIndex,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ return gs;
|
|
|
+ }, {} as Record<number, { groupNumber: number; selectiveIndex: number | null }>);
|
|
|
+ return Object.values(gs);
|
|
|
});
|
|
|
|
|
|
const questions = $computed(() => {
|
|
@@ -214,7 +228,6 @@ function onConfirmReturn(reason: string) {
|
|
|
max-width: 290px;
|
|
|
min-width: 290px;
|
|
|
max-height: calc(100vh - 56px);
|
|
|
- padding: 20px;
|
|
|
z-index: 1001;
|
|
|
transition: margin-right 0.5s;
|
|
|
color: var(--app-small-header-text-color);
|
|
@@ -230,10 +243,37 @@ function onConfirmReturn(reason: string) {
|
|
|
background-color: var(--app-container-bg-color);
|
|
|
height: 86px;
|
|
|
border-radius: 5px;
|
|
|
-
|
|
|
+ margin: 20px;
|
|
|
+ margin-bottom: 0;
|
|
|
color: white;
|
|
|
background-color: var(--app-primary-button-bg-color);
|
|
|
}
|
|
|
+
|
|
|
+.question-list {
|
|
|
+ padding: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.question-item {
|
|
|
+ border-radius: 5px;
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+
|
|
|
+/** 选做题分组 */
|
|
|
+.question-item-select-group {
|
|
|
+ position: absolute;
|
|
|
+ left: -12px;
|
|
|
+ top: -12px;
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ background: #d3d9e6;
|
|
|
+ border-radius: 12px 12px 4px 12px;
|
|
|
+ color: #435488;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 24px;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+
|
|
|
.total-score {
|
|
|
color: var(--app-main-text-color);
|
|
|
font-size: 32px;
|