Commit 360d3979 authored by 张伯涛's avatar 张伯涛

bug修改

parent 5e5ae87e
......@@ -23,6 +23,7 @@ const getters = {
businessId: state => state.user.businessId,
unitUser: state => state.props.unitUser,
topE: state => state.app.topE,
scroll: state => state.app.scroll
scroll: state => state.app.scroll,
answer: state => state.app.answer,
}
export default getters
......@@ -8,7 +8,8 @@ const state = {
device: 'desktop',
loadingCount: 0,
topE: null,
scroll: null
scroll: null,
answer: null
}
const mutations = {
......@@ -37,6 +38,9 @@ const mutations = {
},
SCROLL: (state, e) => {
state.scroll = e
},
ANSWER: (state, e) => {
state.answer = e
}
}
......@@ -58,6 +62,9 @@ const actions = {
},
scroll({ commit }, e) {
commit('SCROLL', e)
},
answer({ commit }, e) {
commit('ANSWER', e)
}
}
......
......@@ -481,6 +481,12 @@ export default {
}
},
startExam(type = 'todo') {
console.log('type', type)
if (type === 'todo') {
this.$store.dispatch('app/answer', '1') // 1: 调用answerByOneClick接口,2:不调用
} else {
this.$store.dispatch('app/answer', '2') // 1: 调用answerByOneClick接口,2:不调用
}
console.log('startExam', this.jobClassifyOptions, this.difficultyGradeOptions, this.queryParams)
let jobClassifyText = ''
let difficultyClassifyText = ''
......
......@@ -72,7 +72,7 @@ export default {
}
},
computed: {
...mapGetters(['userId'])
...mapGetters(['userId', 'answer'])
},
mounted() {
this.examInit()
......@@ -119,16 +119,18 @@ export default {
},
// 单选题点击选项
exeSsSelect(i, event) {
console.log('----------------')
console.log('----------------', this.answer)
this.qsList[i].uanswer = event
const temp = {
questionsId: this.qsList[i].businessId,
recordId: this.qsList[i].recordId,
answer: this.qsList[i].uanswer
}
if (this.answer === '1') {
answerByOneClick(temp)
}
}
}
}
</script>
<style lang="less" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment