diff --git a/pages/personLocation/exam/beginexam/beginexam.vue b/pages/personLocation/exam/beginexam/beginexam.vue
index 7e55c282..dbaab726 100644
--- a/pages/personLocation/exam/beginexam/beginexam.vue
+++ b/pages/personLocation/exam/beginexam/beginexam.vue
@@ -36,16 +36,10 @@
}
},
mounted() {
- var tab = document.querySelector('.uni-progress-inner-bar');
- console.log(tab);
- var p = document.createElement('p');
- p.className = "uni-progress-info"
- p.innerText = ((this.stIndex + 1) * 100).toFixed(0) + '%'
- tab.appendChild(p);
+ this.getDataFn();
},
onLoad(options) {
this.pageData = JSON.parse(options.transportData)
- this.getDataFn();
},
methods: {
getDataFn() {
@@ -61,6 +55,11 @@
console.log('试题信息', res)
if (res.result) {
that.stList = res.result;
+ var tab = document.querySelector('.uni-progress-inner-bar');
+ var p = document.createElement('p');
+ p.className = "uni-progress-info"
+ p.innerText = (((that.stIndex + 1) * 100) / that.stList.length).toFixed(0) + '%'
+ tab.appendChild(p);
that.stList.map(item => {
item.trainRecordId = that.pageData.trainRecordId
})
@@ -70,8 +69,6 @@
},
radioChange(evt) {
console.log(evt)
- var progressTip = document.querySelector('.uni-progress-info');
- progressTip.innerText = ((this.stIndex + 1) * 100).toFixed(0) + '%'
this.stList[this.stIndex].answer = evt.detail.value
let that = this;
// 当到达最后一题时
@@ -81,6 +78,8 @@
uni.showLoading()
setTimeout(function() {
that.stIndex++;
+ var progressTip = document.querySelector('.uni-progress-info');
+ progressTip.innerText = (((that.stIndex + 1) * 100) / that.stList.length).toFixed(0) + '%'
uni.hideLoading()
}, 500)
},
diff --git a/pages/personLocation/exam/studydetails/studydetails.vue b/pages/personLocation/exam/studydetails/studydetails.vue
index 9174bdb8..09c24588 100644
--- a/pages/personLocation/exam/studydetails/studydetails.vue
+++ b/pages/personLocation/exam/studydetails/studydetails.vue
@@ -20,7 +20,7 @@
{{responseData.courseName}}
-
+
diff --git a/pages/projectEnd/trainPlan/addPlan.vue b/pages/projectEnd/trainPlan/addPlan.vue
index 3655330a..a9490687 100644
--- a/pages/projectEnd/trainPlan/addPlan.vue
+++ b/pages/projectEnd/trainPlan/addPlan.vue
@@ -31,7 +31,7 @@
@input='supplementTextarea' :value="form.title" placeholder="请输入">
- *培训课件:
+ 培训课件:
bindPickerChange(e,2)" :value="trainKjIndex" class="picker"
:range="trainKjList" range-key="courseName">
@@ -45,7 +45,7 @@
- *考试试卷:
+ 考试试卷:
bindPickerChange(e,3)" :value="examSjIndex" class="picker"
:range="examSjList" range-key="name">
@@ -340,16 +340,9 @@
})
return
}
- if(!this.form.courseId){
+ if(!this.form.courseId && !this.form.examPaperId){
uni.showToast({
- title: '请选择培训课件',
- icon: 'none'
- })
- return
- }
- if(!this.form.examPaperId){
- uni.showToast({
- title: '请选择考试试卷',
+ title: '请选择至少选择培训课件或考试试卷一种',
icon: 'none'
})
return