Browse Source

更新 index.vue

pull/1/head
WN 1 year ago
parent
commit
df94c4b556
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      src/views/psychological-questionnaire/index.vue

+ 8
- 3
src/views/psychological-questionnaire/index.vue View File

@@ -4,11 +4,13 @@
<div class="schedule"> <div class="schedule">
<div class="progress"> <div class="progress">
<van-progress <van-progress
:percentage="(select.length / topic.length) * 100"
:percentage="
(select.length == 0 ? 0 : select.length / topic.length) * 100
"
stroke-width="10px" stroke-width="10px"
color="#638ee4" color="#638ee4"
:show-pivot="false" :show-pivot="false"
v-if="select.length / topic.length"
v-if="topic.length"
></van-progress> ></van-progress>
</div> </div>
<div class="text"> <div class="text">
@@ -187,7 +189,10 @@ export default {
this.topic.forEach((item) => { this.topic.forEach((item) => {
temp.answer.push({ temp.answer.push({
qid: item.QId, //问卷题目编号 qid: item.QId, //问卷题目编号
value: typeof item.select == 'object' ? item.select.join(',') : item.select, //用户所选答案的 id
value:
typeof item.select == 'object'
? item.select.join(',')
: item.select, //用户所选答案的 id
}) })
}) })
let re = await this.api('/api/Question/Rsults', { let re = await this.api('/api/Question/Rsults', {


Loading…
Cancel
Save