yujialong 3 months ago
parent 499ff58275
commit 65af806e19
  1. 1
      src/pages/ques/detail/index.vue
  2. 1
      src/pages/ques/list/index.vue
  3. 2
      src/pages/quesBank/index.vue
  4. 11
      src/pages/testPaper/detail/auto.vue
  5. 1
      src/pages/testPaper/preview/index.vue
  6. 5
      src/router/permission.js

@ -646,7 +646,6 @@ export default {
let spanRegex = new RegExp('<span class="gapfilling-span" (.*?)>(.*?)______(.*?)<\\/span>', 'g') let spanRegex = new RegExp('<span class="gapfilling-span" (.*?)>(.*?)______(.*?)<\\/span>', 'g')
let newFormItem = [] let newFormItem = []
let gapfillingItems = content.match(spanRegex) let gapfillingItems = content.match(spanRegex)
console.log("🚀 ~ questionItemReset ~ gapfillingItems:", gapfillingItems)
if (gapfillingItems !== null) { if (gapfillingItems !== null) {
gapfillingItems.forEach(function (span, index) { gapfillingItems.forEach(function (span, index) {
let pairRegex = /<span class="gapfilling-span" data-id="(.*?)">(.*?)______(.*?)<\/span>/ let pairRegex = /<span class="gapfilling-span" data-id="(.*?)">(.*?)______(.*?)<\/span>/

@ -298,7 +298,6 @@ export default {
}, },
mounted () { mounted () {
const { referrer1 } = this.$store.state.user const { referrer1 } = this.$store.state.user
console.log("🚀 ~ mounted ~ referrer1:", this.$route.query.questionTypes)
this.crumbs = [ this.crumbs = [
{ {
name: this.questionBankName || '题库管理', name: this.questionBankName || '题库管理',

@ -184,7 +184,7 @@ export default {
}) })
this.handleList(data) this.handleList(data)
this.types = data this.types = data
this.initData() this.getList()
} finally { } finally {
this.loading = false this.loading = false
} }

@ -393,7 +393,6 @@ export default {
// //
handleQuesList () { handleQuesList () {
this.list = _.cloneDeep(this.$parent.form.paperOutline) this.list = _.cloneDeep(this.$parent.form.paperOutline)
console.log("🚀 ~ handleQuesList ~ this.list:", this.list)
}, },
// //
async clearChecked () { async clearChecked () {
@ -452,18 +451,18 @@ export default {
this.$set(e, 'hardDifficulty', 0) this.$set(e, 'hardDifficulty', 0)
this.$set(e, 'veryHardDifficulty', 0) this.$set(e, 'veryHardDifficulty', 0)
} else if (val === 2) { } else if (val === 2) {
this.$set(e, 'basicDifficulty', Math.floor(total * 0.5)) this.$set(e, 'basicDifficulty', Math.floor(total * 0.45))
this.$set(e, 'normalDifficulty', Math.floor(total * 0.5)) this.$set(e, 'normalDifficulty', Math.floor(total * 0.55))
this.$set(e, 'hardDifficulty', 0) this.$set(e, 'hardDifficulty', 0)
this.$set(e, 'veryHardDifficulty', 0) this.$set(e, 'veryHardDifficulty', 0)
} else if (val === 3) { } else if (val === 3) {
this.$set(e, 'basicDifficulty', Math.floor(total * 0.3)) this.$set(e, 'basicDifficulty', Math.floor(total * 0.3))
this.$set(e, 'normalDifficulty', Math.floor(total * 0.4)) this.$set(e, 'normalDifficulty', Math.floor(total * 0.3))
this.$set(e, 'hardDifficulty', Math.floor(total * 0.3)) this.$set(e, 'hardDifficulty', Math.floor(total * 0.4))
this.$set(e, 'veryHardDifficulty', 0) this.$set(e, 'veryHardDifficulty', 0)
} else if (val === 4) { } else if (val === 4) {
this.$set(e, 'basicDifficulty', Math.floor(total * 0.1)) this.$set(e, 'basicDifficulty', Math.floor(total * 0.1))
this.$set(e, 'normalDifficulty', Math.floor(total * 0.2)) this.$set(e, 'normalDifficulty', Math.floor(total * 0.1))
this.$set(e, 'hardDifficulty', Math.floor(total * 0.3)) this.$set(e, 'hardDifficulty', Math.floor(total * 0.3))
this.$set(e, 'veryHardDifficulty', Math.floor(total * 0.5)) this.$set(e, 'veryHardDifficulty', Math.floor(total * 0.5))
} }

@ -229,7 +229,6 @@ export default {
}) })
this.calcProgress() this.calcProgress()
}) })
console.log("🚀 ~ getPaper ~ r:", r)
} }
} catch (e) { } } catch (e) { }
}, },

@ -1,9 +1,8 @@
import router from './index' import router from './index'
import Setting from '@/setting' import Setting from '@/setting'
import util from '@/libs/util'
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
document.title = Setting.titleSuffix document.title = Setting.titleSuffix
next() next()
localStorage.setItem('examPath', router.resolve(to.fullPath).href) to.path !== '/testPaper/preview' && localStorage.setItem('examPath', to.fullPath)
}) })

Loading…
Cancel
Save