fix: BUG修改
This commit is contained in:
parent
bbb423b1d6
commit
d2a246f07a
4
main.js
4
main.js
@ -38,11 +38,11 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
// Vue.prototype.url_config = 'http://47.93.215.234:9809/' // 鞍钢正式地址(弃用)
|
// Vue.prototype.url_config = 'http://47.93.215.234:9809/' // 鞍钢正式地址(弃用)
|
||||||
// Vue.prototype.url_config = 'http://42.180.188.17:9809/' // 鞍钢正式地址
|
// Vue.prototype.url_config = 'http://42.180.188.17:9809/' // 鞍钢正式地址
|
||||||
// Vue.prototype.url_config = 'http://42.180.188.17:11211/' // 鞍钢测试地址
|
// Vue.prototype.url_config = 'http://42.180.188.17:11211/' // 鞍钢测试地址
|
||||||
// Vue.prototype.url_config = 'http://182.90.224.237:51234/' //雄哥内网穿透地址
|
Vue.prototype.url_config = 'http://182.90.224.237:51234/' //雄哥内网穿透地址
|
||||||
// Vue.prototype.url_config = 'http://jxj.zhgdyun.com:61212/' //杰哥内网穿透地址
|
// Vue.prototype.url_config = 'http://jxj.zhgdyun.com:61212/' //杰哥内网穿透地址
|
||||||
// Vue.prototype.url_config = ' http://192.168.34.221:28888/' //郭圣雄本地
|
// Vue.prototype.url_config = ' http://192.168.34.221:28888/' //郭圣雄本地
|
||||||
// Vue.prototype.url_config = 'http://192.168.34.221:9111/' //郭圣雄本地
|
// Vue.prototype.url_config = 'http://192.168.34.221:9111/' //郭圣雄本地
|
||||||
Vue.prototype.url_config = 'http://192.168.34.155:19111/' //彭洁本地
|
// Vue.prototype.url_config = 'http://192.168.34.155:19111/' //彭洁本地
|
||||||
// Vue.prototype.work_url = 'http://47.93.215.234:19997' // 工作流线上地址(弃用)
|
// Vue.prototype.work_url = 'http://47.93.215.234:19997' // 工作流线上地址(弃用)
|
||||||
// Vue.prototype.work_url = 'http://42.180.188.17:19997' // 工作流线上地址
|
// Vue.prototype.work_url = 'http://42.180.188.17:19997' // 工作流线上地址
|
||||||
// Vue.prototype.work_url = 'http://42.180.188.17:19097' // 工作流测试地址
|
// Vue.prototype.work_url = 'http://42.180.188.17:19097' // 工作流测试地址
|
||||||
|
|||||||
@ -36,16 +36,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
var tab = document.querySelector('.uni-progress-inner-bar');
|
this.getDataFn();
|
||||||
console.log(tab);
|
|
||||||
var p = document.createElement('p');
|
|
||||||
p.className = "uni-progress-info"
|
|
||||||
p.innerText = ((this.stIndex + 1) * 100).toFixed(0) + '%'
|
|
||||||
tab.appendChild(p);
|
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.pageData = JSON.parse(options.transportData)
|
this.pageData = JSON.parse(options.transportData)
|
||||||
this.getDataFn();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDataFn() {
|
getDataFn() {
|
||||||
@ -61,6 +55,11 @@
|
|||||||
console.log('试题信息', res)
|
console.log('试题信息', res)
|
||||||
if (res.result) {
|
if (res.result) {
|
||||||
that.stList = 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 => {
|
that.stList.map(item => {
|
||||||
item.trainRecordId = that.pageData.trainRecordId
|
item.trainRecordId = that.pageData.trainRecordId
|
||||||
})
|
})
|
||||||
@ -70,8 +69,6 @@
|
|||||||
},
|
},
|
||||||
radioChange(evt) {
|
radioChange(evt) {
|
||||||
console.log(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
|
this.stList[this.stIndex].answer = evt.detail.value
|
||||||
let that = this;
|
let that = this;
|
||||||
// 当到达最后一题时
|
// 当到达最后一题时
|
||||||
@ -81,6 +78,8 @@
|
|||||||
uni.showLoading()
|
uni.showLoading()
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
that.stIndex++;
|
that.stIndex++;
|
||||||
|
var progressTip = document.querySelector('.uni-progress-info');
|
||||||
|
progressTip.innerText = (((that.stIndex + 1) * 100) / that.stList.length).toFixed(0) + '%'
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<text>{{responseData.courseName}}</text>
|
<text>{{responseData.courseName}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<button type="primary" :disabled="isStartExam" class="btn" @click="goHiidden" v-if="pageData.examPaperId">开始考试</button>
|
<button type="primary" class="btn" @click="goHiidden" v-if="pageData.examPaperId">开始考试</button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
@input='supplementTextarea' :value="form.title" placeholder="请输入"></textarea>
|
@input='supplementTextarea' :value="form.title" placeholder="请输入"></textarea>
|
||||||
</view>
|
</view>
|
||||||
<view class="type flex" v-if="typeCheck == 'type1'">
|
<view class="type flex" v-if="typeCheck == 'type1'">
|
||||||
<view class="name"><text class="star">*</text>培训课件:</view>
|
<view class="name">培训课件:</view>
|
||||||
<picker @change="(e)=>bindPickerChange(e,2)" :value="trainKjIndex" class="picker"
|
<picker @change="(e)=>bindPickerChange(e,2)" :value="trainKjIndex" class="picker"
|
||||||
:range="trainKjList" range-key="courseName">
|
:range="trainKjList" range-key="courseName">
|
||||||
<view class="uni-input uni-select cl" v-if="form.courseId==''">
|
<view class="uni-input uni-select cl" v-if="form.courseId==''">
|
||||||
@ -45,7 +45,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="type flex" v-if="typeCheck == 'type1'">
|
<view class="type flex" v-if="typeCheck == 'type1'">
|
||||||
<view class="name"><text class="star">*</text>考试试卷:</view>
|
<view class="name">考试试卷:</view>
|
||||||
<picker @change="(e)=>bindPickerChange(e,3)" :value="examSjIndex" class="picker"
|
<picker @change="(e)=>bindPickerChange(e,3)" :value="examSjIndex" class="picker"
|
||||||
:range="examSjList" range-key="name">
|
:range="examSjList" range-key="name">
|
||||||
<view class="uni-input uni-select cl" v-if="form.examPaperId==''">
|
<view class="uni-input uni-select cl" v-if="form.examPaperId==''">
|
||||||
@ -340,16 +340,9 @@
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(!this.form.courseId){
|
if(!this.form.courseId && !this.form.examPaperId){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请选择培训课件',
|
title: '请选择至少选择培训课件或考试试卷一种',
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if(!this.form.examPaperId){
|
|
||||||
uni.showToast({
|
|
||||||
title: '请选择考试试卷',
|
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user