fix: 答题样式调整
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="option_item" @click.stop="click_option()" :class="select_status">
|
||||
<view class="option_text">
|
||||
{{props.analysisVo.itemContent}}
|
||||
{{props.analysisVo.itemNo}}. {{props.analysisVo.itemContent}}
|
||||
</view>
|
||||
<!-- <image v-show="select_status==='primary'" class="img" src="@/static/images/common/primary.png" mode="heightFix">
|
||||
</image>
|
||||
@@ -47,9 +47,9 @@
|
||||
});
|
||||
const select_status = computed(() => {
|
||||
if (props.backend_answer.length === 0) {
|
||||
return props.my_answer.includes(props.analysisVo.itemId) ? 'primary' : 'info';
|
||||
return (props.my_answer||[]).includes(props.analysisVo.itemId) ? 'primary' : 'info';
|
||||
} else {
|
||||
return props.my_answer.includes(props.analysisVo.itemId) ? 'success' :
|
||||
return (props.my_answer||[]).includes(props.analysisVo.itemId) ? 'success' :
|
||||
'error';
|
||||
}
|
||||
})
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
<view class="type">
|
||||
{{subject_type_text}}
|
||||
</view>
|
||||
<view class="score">
|
||||
<view class="score" v-if="mode !== 'study'">
|
||||
5分
|
||||
</view>
|
||||
<view class="fl1">
|
||||
<view class="fl1" v-if="mode !== 'study'">
|
||||
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="right" v-if="mode !== 'study'">
|
||||
<view class="mark_and_feedback_div">
|
||||
<image :src="markIcon(props.item.mark?'#0066FF':'#ABABAB')" class="img" @click="mark_click()"></image>
|
||||
<image :src="feedbackIcon()" class="img" @click="feedback_click()"></image>
|
||||
@@ -23,13 +23,13 @@
|
||||
{{subject_data.qnsContent}}
|
||||
</view>
|
||||
<view class="option_div">
|
||||
<radioSubjectItem v-for="(analysisVo,index) in subject_data.itemVos" @click_option="click_option"
|
||||
:key="index" :analysisVo="analysisVo" :my_answer="props.item.my_answer"
|
||||
:backend_answer="props.item.backend_answer"></radioSubjectItem>
|
||||
<radioSubjectItem v-for="(analysisVo,index) in subject_data.itemVos" @click_option="click_option" :key="index"
|
||||
:analysisVo="analysisVo" :my_answer="props.item.my_answer" :backend_answer="props.item.backend_answer">
|
||||
</radioSubjectItem>
|
||||
</view>
|
||||
<view class="option_div_button" v-if="subject_data.qnsTyp==='MU' && props.mode=='practice'" >
|
||||
<view class="option_div_button" v-if="subject_data.qnsTyp==='MU' && ['practice','study'].includes(props.mode)">
|
||||
<uv-button type="primary" class="send_evaluate" :custom-style="customStyle" :throttleTime="300"
|
||||
:hairline="false" >确定</uv-button>
|
||||
@click="muCheckbox" :hairline="false">确定</uv-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -44,7 +44,8 @@
|
||||
} from 'vue'
|
||||
import radioSubjectItem from './radio-subject-item.vue'
|
||||
import {
|
||||
markIcon,feedbackIcon
|
||||
markIcon,
|
||||
feedbackIcon
|
||||
} from '@/common/imgSvg'
|
||||
import {
|
||||
SUBJECT_TYPE
|
||||
@@ -66,14 +67,14 @@
|
||||
required: true,
|
||||
}
|
||||
});
|
||||
|
||||
const feedback_click = () =>{
|
||||
|
||||
const feedback_click = () => {
|
||||
emit('subject_click', 'feedback', props.item)
|
||||
}
|
||||
const mark_click = () =>{
|
||||
const mark_click = () => {
|
||||
emit('subject_click', 'mark', props.item)
|
||||
}
|
||||
|
||||
|
||||
const subject_data = reactive({
|
||||
qnsId: '',
|
||||
qnsContent: '',
|
||||
@@ -97,35 +98,45 @@
|
||||
// // 无论什么类型如果表里已经有了,再次点击就是弹出
|
||||
if (props.item.my_answer.includes(analysisVo.itemId)) {
|
||||
props.item.my_answer = props.item.my_answer.filter(id => id !== analysisVo.itemId);
|
||||
}
|
||||
else if (props.item.qnsTyp === 'SN') { // 单选
|
||||
} else if (props.item.qnsTyp === 'SN') { // 单选
|
||||
// 单选插入,并且移除其他
|
||||
props.item.my_answer[0] = analysisVo.itemId
|
||||
}
|
||||
else if (props.item.qnsTyp === 'MU') { // 多选题
|
||||
muCheckbox()
|
||||
} else if (props.item.qnsTyp === 'MU') { // 多选题
|
||||
// 多选直接插入
|
||||
props.item.my_answer.push(analysisVo.itemId)
|
||||
} else if (props.item.qnsTyp === 'JD') { // 判断题
|
||||
// 判断插入,并且移除其他
|
||||
props.item.my_answer = [analysisVo.itemId]
|
||||
muCheckbox()
|
||||
}
|
||||
}
|
||||
const muCheckbox = () => {
|
||||
emit('subject_click', 'answer', {
|
||||
qnsTyp: props.item.qnsTyp,
|
||||
qnsId: props.item.qnsId,
|
||||
answer: props.item.my_answer,
|
||||
answerItems: subject_data.itemVos.filter(t=> props.item.my_answer.includes(t.itemId))
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.mark_and_feedback_div{
|
||||
.mark_and_feedback_div {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
.img{
|
||||
|
||||
.img {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
margin-left: 4rpx;
|
||||
padding: 4rpx;
|
||||
}
|
||||
}
|
||||
.option_div_button{
|
||||
|
||||
.option_div_button {
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
padding-top: 30rpx;
|
||||
@@ -134,16 +145,18 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item {
|
||||
// height: 170rpx;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-bottom: 40rpx;
|
||||
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.type {
|
||||
width: 108rpx;
|
||||
height: 46rpx;
|
||||
@@ -168,7 +181,7 @@
|
||||
.right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
||||
.right_text {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 600;
|
||||
@@ -178,9 +191,9 @@
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
.question_text {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
|
||||
Reference in New Issue
Block a user