|
|
@ -1,5 +1,6 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="flex flex-col p-3"> |
|
|
<view class="flex flex-col p-3"> |
|
|
|
|
|
<u-button @click="aaa">清缓存</u-button> |
|
|
<!-- 全局提示框 --> |
|
|
<!-- 全局提示框 --> |
|
|
<u-top-tips ref="uTips"></u-top-tips> |
|
|
<u-top-tips ref="uTips"></u-top-tips> |
|
|
|
|
|
|
|
|
@ -42,12 +43,21 @@ export default { |
|
|
...mapState('yanyuan', ['questionInfo', 'optionId', 'code', 'reportId']), |
|
|
...mapState('yanyuan', ['questionInfo', 'optionId', 'code', 'reportId']), |
|
|
...mapState('task', ['task']), |
|
|
...mapState('task', ['task']), |
|
|
...mapGetters('user', ['userId']), |
|
|
...mapGetters('user', ['userId']), |
|
|
|
|
|
...mapGetters('project', ['projectId']), |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
...mapMutations('task', ['setIsEvaluated', 'setTimeNode']), |
|
|
...mapMutations('task', ['setIsEvaluated', 'setTimeNode']), |
|
|
...mapMutations('yanyuan', ['setQuestionInfo', 'setAssessResult', 'setOptionId', 'setIsTest']), |
|
|
...mapMutations('yanyuan', ['setQuestionInfo', 'setAssessResult', 'setOptionId', 'setIsTest']), |
|
|
...mapActions('yanyuan', ['handleQuestion']), |
|
|
...mapActions('yanyuan', ['handleQuestion']), |
|
|
|
|
|
aaa() { |
|
|
|
|
|
if (this.code === 'NLCP') { |
|
|
|
|
|
this.$t.storage.setStorageSync('NLCPNum', this.projectId + '+' + 0); |
|
|
|
|
|
} |
|
|
|
|
|
if (this.code === 'ZARIT') { |
|
|
|
|
|
this.$t.storage.setStorageSync('ZARITNum', this.projectId + '+' + 0); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 第二页 |
|
|
// 第二页 |
|
|
openAnswerPage() { |
|
|
openAnswerPage() { |
|
|
@ -85,10 +95,10 @@ export default { |
|
|
this.$refs.child.closeLoading(); |
|
|
this.$refs.child.closeLoading(); |
|
|
// 存题号 |
|
|
// 存题号 |
|
|
if (this.code === 'NLCP') { |
|
|
if (this.code === 'NLCP') { |
|
|
this.$t.storage.setStorageSync('NLCPNum', this.questionInfo.num); |
|
|
this.$t.storage.setStorageSync('NLCPNum', this.projectId + '+' + this.questionInfo.num); |
|
|
} |
|
|
} |
|
|
if (this.code === 'ZARIT') { |
|
|
if (this.code === 'ZARIT') { |
|
|
this.$t.storage.setStorageSync('ZARITNum', this.questionInfo.num); |
|
|
this.$t.storage.setStorageSync('ZARITNum', this.projectId + '+' + this.questionInfo.num); |
|
|
} |
|
|
} |
|
|
await this.next(); |
|
|
await this.next(); |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
@ -123,6 +133,13 @@ export default { |
|
|
const params = { mentalTestId: this.task.id }; |
|
|
const params = { mentalTestId: this.task.id }; |
|
|
const data = await this.$u.api.mentalTestCalculate(params); |
|
|
const data = await this.$u.api.mentalTestCalculate(params); |
|
|
this.setAssessResult(data); |
|
|
this.setAssessResult(data); |
|
|
|
|
|
// 存题号 |
|
|
|
|
|
if (this.code === 'NLCP') { |
|
|
|
|
|
this.$t.storage.setStorageSync('NLCPNum', this.projectId + '+' + 0); |
|
|
|
|
|
} |
|
|
|
|
|
if (this.code === 'ZARIT') { |
|
|
|
|
|
this.$t.storage.setStorageSync('ZARITNum', this.projectId + '+' + 0); |
|
|
|
|
|
} |
|
|
this.$refs.uTips.show({ |
|
|
this.$refs.uTips.show({ |
|
|
title: '答案提交成功, 即将返回上一页', |
|
|
title: '答案提交成功, 即将返回上一页', |
|
|
type: 'success', |
|
|
type: 'success', |
|
|
|