diff --git a/src/pages/examination/detail.vue b/src/pages/examination/detail.vue
index cf16c27..8c6f4c0 100644
--- a/src/pages/examination/detail.vue
+++ b/src/pages/examination/detail.vue
@@ -44,7 +44,9 @@
:customStyle="{ margin: '8px' }"
v-for="(op, i) in item.options"
:activeColor="
- (op.selected!=op.is_true && op.selected) ? '#e3e3e3' : '#3678f7'
+ op.selected != op.is_true && op.selected
+ ? '#e3e3e3'
+ : '#3678f7'
"
:key="i"
:label="op.text"
@@ -53,9 +55,13 @@
{{ op.text }}
@@ -78,7 +84,7 @@
{{ op.text }}
@@ -87,30 +93,38 @@
-
-
- {{ op.text }}
-
-
-
-
+
+
+ {{ op.text }}
+
+
+
+
@@ -148,19 +162,21 @@ const loading = ref(false)
const list = computed(() => {
const content = info.value?.content ?? []
content.forEach((item) => {
- const trueIndices = item.options.reduce((indices, item, index) => {
- if (item.is_true || item.selected) {
- indices.push(index)
+ if (readonly.value) {
+ const trueIndices = item.options.reduce((indices, item, index) => {
+ if (item.is_true || item.selected) {
+ indices.push(index)
+ }
+ return indices
+ }, [])
+ item.answer = trueIndices
+ } else {
+ if (item.cate == 1) {
+ item.answer = item.user_answer?.[0] ?? ''
+ } else {
+ item.answer = item.user_answer ?? []
}
- return indices
- }, [])
-
- item.answer = trueIndices
- // if (item.cate == 1) {
- // item.answer = item.user_answer?.[0] ?? ''
- // } else {
- // item.answer = item.user_answer ?? []
- // }
+ }
})
return info.value.content || []
})