yujialong 3 months ago
parent 032c20ce80
commit 1b62d07994
  1. 3
      src/pages/ques/detail/index.vue
  2. 14
      src/pages/ques/list/index.vue
  3. 10
      src/pages/testPaper/detail/index.vue
  4. 9
      src/pages/testPaper/preview/index.vue
  5. 9
      src/styles/common.scss

@ -120,7 +120,8 @@
</div> </div>
<div class="score-wrap"> <div class="score-wrap">
<span>分值占比</span> <span>分值占比</span>
<el-input class="score" placeholder="请输入" size="small" v-model="item.scoreProportion" /> <el-input class="score hide-spin" type="number" placeholder="请输入" size="small"
v-model.number="item.scoreProportion" />
<span>%</span> <span>%</span>
</div> </div>
</div> </div>

@ -71,9 +71,11 @@
</li> </li>
<li> <li>
<label>正确率</label> <label>正确率</label>
<el-input style="width: 90px;" placeholder="请输入" v-model="filter.correctRateStart" clearable /> <el-input class="hide-spin" style="width: 90px;" placeholder="请输入" type="number"
v-model.number="filter.correctRateStart" clearable />
<span style="margin: 0 10px;">% -- </span> <span style="margin: 0 10px;">% -- </span>
<el-input style="width: 90px;" placeholder="请输入" v-model="filter.correctRateEnd" clearable /> <el-input class="hide-spin" style="width: 90px;" placeholder="请输入" type="number"
v-model.number="filter.correctRateEnd" clearable />
<span style="margin-left: 10px;">%</span> <span style="margin-left: 10px;">%</span>
</li> </li>
<li> <li>
@ -249,6 +251,14 @@ export default {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(this.initData, 500) this.searchTimer = setTimeout(this.initData, 500)
}, },
'filter.correctRateStart': function () {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(this.initData, 500)
},
'filter.correctRateEnd': function () {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(this.initData, 500)
},
}, },
mounted () { mounted () {
const { referrer1 } = this.$store.state.user const { referrer1 } = this.$store.state.user

@ -742,11 +742,11 @@ export default {
this.addQuesVisible = false this.addQuesVisible = false
}, },
// //
updateQues (ques) { async updateQues (ques) {
ques.questionAnswerVersionsList = ques.questionAnswerVersions const res = await this.$post(`${this.api.findQuestion}?questionId=${ques.questionId}&version=${ques.version}`)
delete ques.questionAnswerVersions const r = res.message
ques.score = '' r.score = ''
this.curType.examQuestions[this.curQuesIndex] = Object.assign(this.curRow, ques) this.curType.examQuestions[this.curQuesIndex] = Object.assign(this.curRow, r)
this.handleQuesInfo(this.curType.examQuestions[this.curQuesIndex]) this.handleQuesInfo(this.curType.examQuestions[this.curQuesIndex])
this.calcDifficult() this.calcDifficult()
}, },

@ -31,7 +31,7 @@
<li <li
v-if="!sheetStatus || (sheetStatus === 1 && !ques.answered) || (sheetStatus === 2 && ques.answered) || (sheetStatus === 3 && ques.partAnswer) || (sheetStatus === 4 && ques.sign)" v-if="!sheetStatus || (sheetStatus === 1 && !ques.answered) || (sheetStatus === 2 && ques.answered) || (sheetStatus === 3 && ques.partAnswer) || (sheetStatus === 4 && ques.sign)"
:key="j" :class="{ answered: ques.answered, partAnswer: ques.partAnswer }" :key="j" :class="{ answered: ques.answered, partAnswer: ques.partAnswer }"
@click="scrollToQues(ques)"> @click="scrollToQues(ques, item)">
<img v-if="ques.sign" class="tag" src="@/assets/images/tag-active.svg" alt=""> <img v-if="ques.sign" class="tag" src="@/assets/images/tag-active.svg" alt="">
{{ j + 1 }} {{ j + 1 }}
</li> </li>
@ -290,9 +290,12 @@ export default {
window.requestAnimationFrame(scroll) window.requestAnimationFrame(scroll)
}, },
// //
scrollToQues (e) { scrollToQues (e, item) {
item.shrink = false
const el = document.querySelector('#ques' + e.id) const el = document.querySelector('#ques' + e.id)
el && this.scrollToSmooth(el.offsetTop - document.querySelector('#quesWrap').offsetTop, 200) this.$nextTick(() => {
el && this.scrollToSmooth(el.offsetTop - document.querySelector('#quesWrap').offsetTop, 200)
})
}, },
// //
filterStatus (e) { filterStatus (e) {

@ -433,6 +433,15 @@
text-align: center; text-align: center;
color: #a3a3a3; color: #a3a3a3;
} }
.hide-spin {
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
input::-webkit-outer-spin-button {
-webkit-appearance: none !important;
}
}
.fill-scores { .fill-scores {
.fill-title { .fill-title {
margin-bottom: 10px; margin-bottom: 10px;

Loading…
Cancel
Save