mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-10 19:36:48 +08:00
fix:评估题目排序显示问题
This commit is contained in:
@@ -45,7 +45,167 @@
|
|||||||
<!-- 基本信息 -->
|
<!-- 基本信息 -->
|
||||||
<div class="bascinfo">
|
<div class="bascinfo">
|
||||||
<div>
|
<div>
|
||||||
|
<!-- {{ [data.assessmentEssayQuestionDtoList,data.assessmentMultipleChoiceDtoList,data.assessmentScoringQuestionDtoList,data.assessmentSingleChoiceDtoList].sort((a,b)=>{
|
||||||
|
return a[0].orderNumber - b[0].orderNumber
|
||||||
|
}) }} -->
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
class="question"
|
||||||
|
v-for="(value, index) in [data.assessmentEssayQuestionDtoList,data.assessmentMultipleChoiceDtoList,data.assessmentScoringQuestionDtoList,data.assessmentSingleChoiceDtoList].sort((a,b)=>{
|
||||||
|
return a[0].orderNumber - b[0].orderNumber
|
||||||
|
}) "
|
||||||
|
:key="index"
|
||||||
|
:style="{ 'margin-top': index === 0 ? '57px' : '41px' }"
|
||||||
|
>
|
||||||
|
<div v-if="value[0].questionType=='4'">
|
||||||
|
<div
|
||||||
|
class="question"
|
||||||
|
v-for="(value, index) in data.assessmentScoringQuestionDtoList"
|
||||||
|
:key="index"
|
||||||
|
:style="{ 'margin-top': index === 0 ? '57px' : '41px' }"
|
||||||
|
>
|
||||||
|
<div class="text">{{ value.assessmentScTitle }}</div>
|
||||||
|
<div class="answer">
|
||||||
|
<div class="answerL">完全没用</div>
|
||||||
|
<div class="answerC">
|
||||||
|
<div
|
||||||
|
class="answerCitem"
|
||||||
|
v-for="(item, key) in Array.from(
|
||||||
|
{ length: value.assessmentMaxScore },
|
||||||
|
(k, i) => i
|
||||||
|
)"
|
||||||
|
:key="key"
|
||||||
|
:style="{
|
||||||
|
'margin-left': key === 0 ? '15px' : '10px',
|
||||||
|
background:
|
||||||
|
value.selectAnswer === item
|
||||||
|
? 'rgba(86, 163, 249, 1)'
|
||||||
|
: 'rgba(86, 163, 249, 0)',
|
||||||
|
color:
|
||||||
|
value.selectAnswer === item
|
||||||
|
? '#fff'
|
||||||
|
: 'rgba(86, 163, 249, 1)',
|
||||||
|
}"
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
if (data.isSubmit) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
value.selectAnswer = item;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div>{{ item + 1 }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="answerR">非常有帮助/启发</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else-if="value[0].questionType=='1'">
|
||||||
|
<div
|
||||||
|
class="question"
|
||||||
|
style="margin-top: 41px"
|
||||||
|
v-if="
|
||||||
|
data.assessmentSingleChoiceDtoList &&
|
||||||
|
data.assessmentSingleChoiceDtoList.length
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div class="text">
|
||||||
|
{{ data.assessmentSingleChoiceDtoList[0]?.singleStemName }}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-for="(value, index) in data.assessmentSingleChoiceDtoList"
|
||||||
|
:key="index"
|
||||||
|
style="display: flex; align-items: center"
|
||||||
|
:style="{
|
||||||
|
'margin-top': index === 0 ? '29px' : '22px',
|
||||||
|
cursor: 'pointer',
|
||||||
|
}"
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
if (data.isSubmit) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
data.assessmentSingleChoiceDtoList.forEach((e) => {
|
||||||
|
e.select = false;
|
||||||
|
});
|
||||||
|
value.select = true;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
style="width: 19px; height: 18px; cursor: pointer"
|
||||||
|
:src="value.select ? checkbox : checkbox2"
|
||||||
|
/>
|
||||||
|
<div class="people">{{ value.singleOptionName }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else-if="value[0].questionType=='2'">
|
||||||
|
<div
|
||||||
|
class="question"
|
||||||
|
style="margin-top: 41px"
|
||||||
|
v-if="
|
||||||
|
data.assessmentMultipleChoiceDtoList &&
|
||||||
|
data.assessmentMultipleChoiceDtoList.length
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div class="text">
|
||||||
|
{{ data.assessmentMultipleChoiceDtoList[0]?.multipleStemName }}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-for="(value, index) in data.assessmentMultipleChoiceDtoList"
|
||||||
|
:key="index"
|
||||||
|
style="display: flex; align-items: center"
|
||||||
|
:style="{
|
||||||
|
'margin-top': index === 0 ? '29px' : '22px',
|
||||||
|
cursor: 'pointer',
|
||||||
|
}"
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
if (data.isSubmit) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
value.select = !value.select;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
style="width: 19px; height: 18px; cursor: pointer"
|
||||||
|
:src="value.select ? checkbox : checkbox2"
|
||||||
|
/>
|
||||||
|
<div class="people">{{ value.multipleOptionName }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else-if="value[0].questionType=='3'">
|
||||||
|
<div
|
||||||
|
class="question"
|
||||||
|
style="margin-top: 41px"
|
||||||
|
v-for="(item, i) in data.assessmentEssayQuestionDtoList"
|
||||||
|
:key="i"
|
||||||
|
>
|
||||||
|
<div class="text">{{ item.assessmentQaTitle }}</div>
|
||||||
|
<div style="width: 713px; margin-top: 31px; position: relative">
|
||||||
|
<el-input
|
||||||
|
v-model="item.content"
|
||||||
|
:autosize="{ minRows: 5, maxRows: 5 }"
|
||||||
|
resize="none"
|
||||||
|
maxlength="200"
|
||||||
|
type="textarea"
|
||||||
|
:readonly="!!data.isSubmit"
|
||||||
|
/>
|
||||||
|
<div class="words">{{ item.content?.length || 0 }}/200</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <div
|
||||||
class="question"
|
class="question"
|
||||||
v-for="(value, index) in data.assessmentScoringQuestionDtoList"
|
v-for="(value, index) in data.assessmentScoringQuestionDtoList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -88,6 +248,7 @@
|
|||||||
<div class="answerR">非常有帮助/启发</div>
|
<div class="answerR">非常有帮助/启发</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="question"
|
class="question"
|
||||||
style="margin-top: 41px"
|
style="margin-top: 41px"
|
||||||
@@ -162,6 +323,7 @@
|
|||||||
<div class="people">{{ value.multipleOptionName }}</div>
|
<div class="people">{{ value.multipleOptionName }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="question"
|
class="question"
|
||||||
style="margin-top: 41px"
|
style="margin-top: 41px"
|
||||||
@@ -180,7 +342,8 @@
|
|||||||
/>
|
/>
|
||||||
<div class="words">{{ item.content?.length || 0 }}/200</div>
|
<div class="words">{{ item.content?.length || 0 }}/200</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div
|
<div
|
||||||
style="display: flex; justify-content: center"
|
style="display: flex; justify-content: center"
|
||||||
v-if="
|
v-if="
|
||||||
@@ -235,6 +398,8 @@ const returnclick = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const { data } = useRequest(ASSESSMENT_QUERY(courseId), { id: courseId });
|
const { data } = useRequest(ASSESSMENT_QUERY(courseId), { id: courseId });
|
||||||
|
console.log('我是需要排序得题目', data )
|
||||||
|
|
||||||
const centerDialogVisible =ref(false);
|
const centerDialogVisible =ref(false);
|
||||||
const open=()=>{
|
const open=()=>{
|
||||||
centerDialogVisible.value = true
|
centerDialogVisible.value = true
|
||||||
|
|||||||
Reference in New Issue
Block a user