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

bug修改

parent 5e5ae87e
...@@ -23,6 +23,7 @@ const getters = { ...@@ -23,6 +23,7 @@ const getters = {
businessId: state => state.user.businessId, businessId: state => state.user.businessId,
unitUser: state => state.props.unitUser, unitUser: state => state.props.unitUser,
topE: state => state.app.topE, topE: state => state.app.topE,
scroll: state => state.app.scroll scroll: state => state.app.scroll,
answer: state => state.app.answer,
} }
export default getters export default getters
...@@ -8,7 +8,8 @@ const state = { ...@@ -8,7 +8,8 @@ const state = {
device: 'desktop', device: 'desktop',
loadingCount: 0, loadingCount: 0,
topE: null, topE: null,
scroll: null scroll: null,
answer: null
} }
const mutations = { const mutations = {
...@@ -37,6 +38,9 @@ const mutations = { ...@@ -37,6 +38,9 @@ const mutations = {
}, },
SCROLL: (state, e) => { SCROLL: (state, e) => {
state.scroll = e state.scroll = e
},
ANSWER: (state, e) => {
state.answer = e
} }
} }
...@@ -58,6 +62,9 @@ const actions = { ...@@ -58,6 +62,9 @@ const actions = {
}, },
scroll({ commit }, e) { scroll({ commit }, e) {
commit('SCROLL', e) commit('SCROLL', e)
},
answer({ commit }, e) {
commit('ANSWER', e)
} }
} }
......
...@@ -481,6 +481,12 @@ export default { ...@@ -481,6 +481,12 @@ export default {
} }
}, },
startExam(type = 'todo') { 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) console.log('startExam', this.jobClassifyOptions, this.difficultyGradeOptions, this.queryParams)
let jobClassifyText = '' let jobClassifyText = ''
let difficultyClassifyText = '' let difficultyClassifyText = ''
......
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters(['userId']) ...mapGetters(['userId', 'answer'])
}, },
mounted() { mounted() {
this.examInit() this.examInit()
...@@ -119,16 +119,18 @@ export default { ...@@ -119,16 +119,18 @@ export default {
}, },
// 单选题点击选项 // 单选题点击选项
exeSsSelect(i, event) { exeSsSelect(i, event) {
console.log('----------------') console.log('----------------', this.answer)
this.qsList[i].uanswer = event this.qsList[i].uanswer = event
const temp = { const temp = {
questionsId: this.qsList[i].businessId, questionsId: this.qsList[i].businessId,
recordId: this.qsList[i].recordId, recordId: this.qsList[i].recordId,
answer: this.qsList[i].uanswer answer: this.qsList[i].uanswer
} }
if (this.answer === '1') {
answerByOneClick(temp) answerByOneClick(temp)
} }
} }
}
} }
</script> </script>
<style lang="less" scoped> <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