|
28 | 28 | <survey-item |
29 | 29 | :key="'c' + content['@id']" |
30 | 30 | v-if="shouldShow[index]" |
31 | | - :item="content" :index="contextReverse.length - index - 1" |
| 31 | + :item="content" |
| 32 | + :index="contextReverse.length - index - 1" |
32 | 33 | :init="responses[content['@id']]" |
33 | 34 | v-on:skip="nextQuestion(contextReverse.length - index - 1, 1, 0)" |
34 | 35 | v-on:dontKnow="nextQuestion(contextReverse.length - index - 1, 0, 1)" |
|
245 | 246 | return criteria1 && criteria2; |
246 | 247 | }); |
247 | 248 | }, |
248 | | - setResponse(val, index) { |
| 249 | + setResponse(val, index, mp_progress=100) { |
249 | 250 | const itemUrl = this.context[index]['@id']; |
250 | 251 | let exportVal = val; |
251 | 252 | let usedList = []; |
|
319 | 320 | this.$emit('saveScores', this.srcUrl, this.scores); |
320 | 321 | } |
321 | 322 | } |
322 | | - this.updateProgress(); |
| 323 | + this.updateProgress(mp_progress); |
323 | 324 | }, |
324 | 325 | setScore(scoreObj, index) { |
325 | 326 | this.$emit('saveScores', this.context[index]['@id'], scoreObj); |
|
406 | 407 | } |
407 | 408 | return {}; |
408 | 409 | }, |
409 | | - updateProgress() { |
| 410 | + updateProgress(mp_pr=100) { |
410 | 411 | let totalQ = this.context.length; |
411 | 412 | if (!_.isEmpty(this.visibility)) { |
412 | 413 | totalQ = 0; |
|
420 | 421 | }); |
421 | 422 | // totalQ = _.filter(this.visibility).length; |
422 | 423 | } |
423 | | - const progress = ((Object.keys(this.responses).length) / totalQ) * 100; |
| 424 | + const progress = ((Object.keys(this.responses).length - 1 + mp_pr/100) / totalQ) * 100; |
424 | 425 | // console.log(401, 'updateProgress------ ', Object.keys(this.responses).length, totalQ, this.context, this.context.length, progress) |
425 | 426 | this.$emit('updateProgress', progress); |
426 | 427 | }, |
|
0 commit comments