提交 7d3c9951 编写于 作者: xiaoping.di's avatar xiaoping.di

考试优化

上级 1d993e9a
/h5-submodules-master
/node_modules
/src
......@@ -16,7 +16,7 @@ export const getCoopExamQuest = async (param) => {
});
};
//教培中间模块
// 教培中间模块
export const getCoopExam = async (param) => {
return request({
url: 'app/projectExam/exam',
......
......@@ -7,7 +7,7 @@ export const getCoopTop = async (param) => {
params: param,
});
};
//教培底部模块
// 教培底部模块
export const getCoopBottom = async (param) => {
return request({
url: 'contents/projects/bottom',
......@@ -16,7 +16,7 @@ export const getCoopBottom = async (param) => {
});
};
//教培中间模块
// 教培中间模块
export const getCoopMiddle = async (param) => {
return request({
url: 'contents/projects/middle',
......@@ -25,7 +25,7 @@ export const getCoopMiddle = async (param) => {
});
};
//教培考试信息模块
// 教培考试信息模块
export const getCoopLiveExam = async (param) => {
return request({
url: `contents/projects/live/${param.id}`,
......
......@@ -198,7 +198,7 @@
}));
}
});
}catch(error){
}catch(error) {
console.log(122);
}
},
......
......@@ -3,28 +3,41 @@
<!--A Cell -->
<template>
<div :class="['wxc-cell', hasTopBorder && 'cell-top-border', hasBottomBorder && 'cell-bottom-border', hasMargin && 'cell-margin', hasVerticalIndent && 'cell-indent', desc && 'has-desc']"
<div
:class="['wxc-cell', hasTopBorder && 'cell-top-border', hasBottomBorder && 'cell-bottom-border', hasMargin && 'cell-margin', hasVerticalIndent && 'cell-indent', desc && 'has-desc']"
:style="cellStyle"
:accessible="autoAccessible"
:aria-label="`${label},${title},${desc}`"
@click="cellClicked">
@click="cellClicked"
>
<slot name="label">
<div v-if="label">
<div class="cell-label-text">{{label}}</div>
<div class="cell-label-text">
{{ label }}
</div>
</div>
</slot>
<div class="cell-title">
<slot name="title">
<div class="cell-content">{{title}}</div>
<div class="cell-desc-text" v-if="desc">{{desc}}</div>
<div class="cell-content">
{{ title }}
</div>
<div
v-if="desc"
class="cell-desc-text"
>
{{ desc }}
</div>
</slot>
</div>
<slot name="value"></slot>
<slot></slot>
<img :src="arrowIcon"
<slot name="value" />
<slot />
<img
v-if="hasArrow"
:src="arrowIcon"
class="cell-arrow-icon"
:aria-hidden="true"
v-if="hasArrow"/>
>
</div>
</template>
......@@ -92,7 +105,7 @@
</style>
<script>
//import {Utils} from 'weex-ui';
// import {Utils} from 'weex-ui';
export default {
props: {
......@@ -149,7 +162,7 @@
cellClicked (e) {
const link = this.link;
this.$emit('wxcCellClicked', { e });
//link && Utils.goToH5Page(link, true);
// link && Utils.goToH5Page(link, true);
}
}
};
......
......@@ -4,11 +4,13 @@
<template>
<div>
<wxc-radio v-for="(item,i) in updateList"
<wxc-radio
v-for="(item,i) in updateList"
:key="i"
:config="config"
v-bind="item"
@wxcRadioItemChecked="wxcRadioItemChecked(i,$event)"
:key="i"></wxc-radio>
/>
</div>
</template>
......@@ -54,7 +56,7 @@
this.setListChecked(this.list);
},
methods: {
setListChecked(list){
setListChecked(list) {
if (list && list.length > 0) {
list.forEach((item, i) => {
item.checked && (this.checkedIndex = i);
......@@ -65,8 +67,8 @@
const oldIndex = this.checkedIndex;
const { value, title } = this.list[i];
this.checkedIndex = i;
this.$emit('wxcRadioListChecked', { value, title, oldIndex, index: i,item: this.list[i] })
}
this.$emit('wxcRadioListChecked', { value, title, oldIndex, index: i, item: this.list[i] });
}
}
};
</script>
......@@ -3,16 +3,25 @@
<template>
<div>
<div :has-bottom-border="false" class="radio-all"
@click="wxcCellClicked"
<div
:has-bottom-border="false"
class="radio-all"
:accessible="true"
:aria-label="`${title},状态为${checked?'已选中':'未选中'},${disabled?'不可更改':''}`">
<img :src="radioIcon"
:aria-label="`${title},状态为${checked?'已选中':'未选中'},${disabled?'不可更改':''}`"
@click="wxcCellClicked"
>
<img
slot="label"
class="radio"/>
<div :style="{color:color}"
:src="radioIcon"
class="radio"
>
<div
slot="title"
:style="{color:color}"
class="title-text"
slot="title">{{title}}</div>
>
{{ title }}
</div>
</div>
</div>
</template>
......@@ -38,7 +47,7 @@
</style>
<script>
import WxcCell from './cell.vue'
import WxcCell from './cell.vue';
const CHECKED = 'https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/radio_checked.png';
const UNCHECKED = 'https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/radio_unchecked.png';
......@@ -97,9 +106,9 @@
wxcCellClicked () {
const { disabled, value } = this;
if (!disabled) {
this.$emit('wxcRadioItemChecked', { value, disabled })
}
this.$emit('wxcRadioItemChecked', { value, disabled });
}
}
}
};
</script>
......@@ -18,7 +18,7 @@
<img
class="see_more_img"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/arrow_right_gray%403x.png"
/>
>
</div>
</div>
<div
......@@ -42,7 +42,7 @@
<img
class="course_img"
:src="value.app_course_url"
/>
>
<div class="course_info">
{{ messages(value.course_name, 18) }}
</div>
......@@ -51,7 +51,7 @@
<img
class="play_img"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/play_gray%403x.png"
/>
>
<div class="play_count">
{{ value.join_num }}
</div>
......@@ -70,7 +70,7 @@
<script>
// text collapse
//const configurationModule = weex.requireModule('configurationModule');
// const configurationModule = weex.requireModule('configurationModule');
export default {
components: {},
......@@ -105,8 +105,8 @@
enterCourse(obj) {
this.intoCourse(obj);
},
intoCourseMore(obj){
let appModuleModel=[
intoCourseMore(obj) {
const appModuleModel = [
{
'key':'className',
'value':'value=com.picahealth.yunque.activitys.famousteacherschool.AllDiseaseActivity###MicroProfessionTableController'
......@@ -121,8 +121,8 @@
jsonString: appModuleModel,
});
},
intoCourse(obj){
let appModuleModel=[
intoCourse(obj) {
const appModuleModel = [
{
'key':'className',
'value':'value=com.picahealth.yunque.activitys.courseplaynew.CourseIntroduceActivity###WeexCourseIntroViewController'
......
......@@ -33,7 +33,7 @@
import textCollapse from './textCollapse';
import projectContent from './projectContent';
import aboutCourse from './aboutCourse';
//const globalEvent = weex.requireModule('globalEvent');
// const globalEvent = weex.requireModule('globalEvent');
export default {
components: {
headerSlider,
......
......@@ -34,7 +34,9 @@
:maxlength="number"
autofocus="true"
autocorrect="off"
autocomplete="off" autocapitalize="off" @keyup="handleInput($event)"
autocomplete="off"
autocapitalize="off"
@keyup="handleInput($event)"
>
<label for="code">
<div class="code-input-wrap">
......
......@@ -18,7 +18,7 @@
<img
class="history_title_img"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/arrow_right_gray%403x.png"
/>
>
</div>
</div>
<div
......@@ -34,12 +34,12 @@
v-if="value.passFlag == 5"
class="history_item_radio"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/eee%403x.png"
/>
>
<img
v-if="value.passFlag != 5"
class="history_item_radio"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/ee%403x.png"
/>
>
<div
v-if="key+1<historyList.length"
class="history_item_radio_bottom"
......@@ -82,7 +82,7 @@
v-if="value.wrongNo > 0"
class="history_item_right_img"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/arrow_right_gray%403x.png"
/>
>
</div>
</div>
</div>
......
......@@ -5,17 +5,17 @@
v-if="type == 0"
class="result_image"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/yh%403x.png"
/>
>
<img
v-if="type == 1"
class="result_image"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/tg%403x.png"
/>
>
<img
v-if="type == 2"
class="result_image"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/ks%403x.png"
/>
>
<div class="exam_name">
<div
v-if="type == 2"
......@@ -66,7 +66,7 @@
<img
class="exam_time_img"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/arrow_right_black%403x.png"
/>
>
</div>
</div>
<div
......@@ -113,11 +113,11 @@
<script>
// text collapse
//const modal = weex.requireModule('modal');
// const modal = weex.requireModule('modal');
// import {click_start_test, click_test_completed, click_retest, click_mid_wrong_collection} from '../../util/buryingPoint';
//import WxcDialog from '../../components/wxc-dialog';
// import WxcDialog from '../../components/wxc-dialog';
export default {
//components: {WxcDialog},
// components: {WxcDialog},
props:['type', 'exam', 'startNum', 'endNum', 'examType', 'options', 'hasWrong'],
data() {
return{
......@@ -166,9 +166,9 @@
this.showExamFinishedTip = true;
this.$dialog.alert({
title: '',
message: "考试已结束",
confirmButtonText:"我知道了"
})
message: '考试已结束',
confirmButtonText:'我知道了'
});
return;
}
}
......@@ -178,12 +178,12 @@
// });
const query = {
examId: obj.examId,
// examType: this.options.examType,
examType: this.$route.query.examType,
endDate: this.$route.query.endDate
};
if (this.startNum > 0) {
Vue.set(query, 'startNum', this.startNum);
query.startNum = this.startNum;
// Vue.set(query, 'startNum', this.startNum);
}
this.$router.push({
path: '/exam',
......@@ -198,7 +198,7 @@
this.$router.push({
path: '/stoke'
});
//weex.requireModule('CourseModule').goBack(2);
// weex.requireModule('CourseModule').goBack(2);
} else {
this.$router.push({
path: '/'
......@@ -206,16 +206,12 @@
}
}
},
goExamStart(obj) { // 我要重考
goExamStart() { // 我要重考
if (!this.endNum) {
this.$toast('您尚未完成相关培训课程的学习')
this.$toast('您尚未完成相关培训课程的学习');
}else {
this.$emit('reExamStart');
}
// this.appBuryingPointEntrust({
// ...click_retest,
// createdTime: new Date().getTime()
// });
},
},
......
......@@ -17,7 +17,7 @@
v-lazy="img.image_url"
class="image"
resize="stretch"
/>
>
</van-swipe-item>
</van-swipe>
</div>
......
......@@ -18,7 +18,7 @@
<img
class="history_title_img"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/arrow_right_gray%403x.png"
/>
>
</div>
</div>
......@@ -46,7 +46,7 @@
<img
class="item3_right_arrow"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/arrow_right_black%403x.png"
/>
>
</div>
<div
v-if="value.restTimes > 0 || value.restTimes == -1"
......@@ -65,7 +65,7 @@
<img
class="empty-img"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/wu%402x.png"
/>
>
<div class="empty-text">
暂无现场考试记录
</div>
......
......@@ -18,7 +18,7 @@
<img
class="history_title_img"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/arrow_right_gray%403x.png"
/>
>
</div>
</div>
......@@ -46,7 +46,7 @@
<img
class="item3_right_arrow"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/arrow_right_black%403x.png"
/>
>
</div>
<div
v-if="value.restTimes > 0 || value.restTimes == -1"
......@@ -65,7 +65,7 @@
<img
class="empty-img"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/wu%402x.png"
/>
>
<div class="empty-text">
暂无现场考试记录
</div>
......
......@@ -13,18 +13,19 @@
src="http://pica-pro.oss-cn-shanghai.aliyuncs.com/md_resources/back_gray.png"
style="width: 25px; height: 25px;"
@click="goBack"
/>
>
<div
v-if="!showHeader"
style="width:25px;height: 25px;"
>&nbsp;
>
&nbsp;
</div>
<img
v-if="type == 2"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/close%403x.png"
style="width: 35px; height: 35px;"
@click="goBack"
/>
>
<div class="title">
{{ title }}
</div>
......
......@@ -20,7 +20,7 @@
<img
class="advice_auth_img"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/cup%403x.png"
/>
>
<div class="advice_auth_text">
<div class="advice_auth_text_content">
{{ examContent.all_exam_writing }}
......@@ -37,7 +37,7 @@
v-if="examContent.exam_order == 5"
class="circle_gray"
:src="examContent.allowFlag==1 ? circleYellow: circleGray"
/>
>
<div
v-if="examContent.exam_order == 1"
class="order_number"
......@@ -125,34 +125,17 @@
<img
class="item3_right_arrow"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/arrow_right_black%403x.png"
/>
>
</div>
</div>
</div>
</div>
<!-- <wxc-dialog
title=""
:content="setContent"
:show="isQuery"
cancel-text="取消"
confirm-text="去考试"
main-btn-color="#35cbca"
@wxcDialogCancelBtnClicked="wxcDialogCancelBtnClicked"
@wxcDialogConfirmBtnClicked="wxcDialogConfirmBtnClicked"
/> 1111-->
</div>
</template>
<script>
// text collapse
import Vue from 'vue';
// const modal = weex.requireModule('modal');
// const configurationModule = weex.requireModule('configurationModule');
// import wxcDialog from '../wxc-dialog';
// const storage = weex.requireModule('storage');
import {getCoopRoleCode} from '@/api/content.js';
export default {
//components: {wxcDialog},
props:['examContent', 'hasAuth', 'keyIndex'],
data() {
return{
......@@ -240,45 +223,28 @@
roleCode: 'R001',
user_role_list: ''
};
getCoopRoleCode().catch(res=>{
getCoopRoleCode().catch(res => {
if(res.data && res.data.respCode == 200) {
sendObj.roleCode = res.data.roleCode;
const mess = obj.field_requirement ? obj.field_requirement : -1;
sendObj.field_requirement = mess;
sendObj.user_role_list = obj.user_role_list;
console.log(sendObj,"sendObjsendObj")
if(sendObj.user_role_list=="R004"){
console.log(sendObj, 'sendObjsendObj');
if(sendObj.user_role_list == 'R004') {
this.dataOkForExam();
}
//configurationModule.checkIDCardAndEducation(sendObj); 111
// configurationModule.checkIDCardAndEducation(sendObj); 111
}else {
this.$toast("网络异常,请稍后再试");
this.$toast('网络异常,请稍后再试');
}
});
// this.GET('contents/projects/guestRoleCode', {}, (res) => {
// // modal.alert({message:'goIDCardAndEdu ' + res})
// const configurationModule = weex.requireModule('configurationModule');
// if(res.data && res.data.respCode == 200) {
// sendObj.roleCode = res.data.roleCode;
// const mess = obj.field_requirement ? obj.field_requirement : -1;
// sendObj.field_requirement = mess;
// sendObj.user_role_list = obj.user_role_list;
// // modal.alert({message:'goIDCardAndEdu 200' + JSON.stringify(sendObj)})
// configurationModule.checkIDCardAndEducation(sendObj);
// }else {
// modal.toast({
// message: '网络异常,请稍后再试',
// duration: 1.0
// });
// }
// });
},
dataOkForExam() {
this.addLogicForExam();
},
goExam(index, obj) {
this.$storejs.set('keyIndex',this.keyIndex)
//localStorage.setItem('keyIndex', this.keyIndex)
this.$storejs.set('keyIndex', this.keyIndex);
// localStorage.setItem('keyIndex', this.keyIndex)
if (this.examContent.allowFlag == 1) {// 加入项目(项目考试组件有权限)
this.currentIndex = index;
this.currentObj = obj;
......@@ -315,7 +281,6 @@
const isGoExam = this.getBoolForExam(obj);
if (isGoExam) {// 去重考
if ((index == 0 || index == 1) || (index > 0 && !this.examContent.allLists[index - 1].course_id)) {//
// modal.alert({message:'111'})
this.query = {
examId: obj.exam_id,
origin: 'start'
......@@ -345,11 +310,7 @@
this.isQuery = true;
this.diaLogConfirm();
}else{
this.$toast('您尚未完成“' + course_name + '”培训课程的学习。')
// modal.toast({
// message: ,
// duration: 1.0
// });
this.$toast('您尚未完成“' + course_name + '”培训课程的学习。');
}
}
}
......@@ -364,16 +325,13 @@
const lastItem = this.examContent.allLists[index - 1];
if (lastItem.progress < 100) {
this.beforeLearningExamNumber = obj.times == -1 ? 100 : (obj.times - obj.exam_num);
Vue.set(this.query, 'endNum', this.beforeLearningExamNumber);
this.$set(this.query, 'endNum', this.beforeLearningExamNumber);
// Vue.set(this.query, 'endNum', this.beforeLearningExamNumber);
}
}
this.currentIndex = index;
this.currentObj = obj;
this.goIDCardAndEdu(obj);
// this.$router.push({
// path:'/exam_result',
// query: this.query
// })
}
}else{// 没有考试
if (index > 0) {// 大于第一项
......@@ -388,12 +346,7 @@
this.currentIndex = index;
this.currentObj = obj;
this.goIDCardAndEdu(obj);
// this.$router.push({
// path:'/exam_result',
// query: this.query
// })
}else {
// modal.alert({message:'666'})
let flag = false;
if (this.examContent.exam_order == 1) {// 考试顺序--序贯
for (let i = 0; i < index; i++) {
......@@ -409,10 +362,6 @@
}
if (flag) {
this.$toast('请按顺序完成学习及考试');
// modal.toast({
// message: '请按顺序完成学习及考试',
// duration: 1.0
// });
}else {
const course_name = this.examContent.allLists[index - 1].course_name;
if (obj.times > 0 || obj.times == -1) {// 学习课程前的考试次数
......@@ -424,7 +373,7 @@
this.isQuery = true;
this.diaLogConfirm();
}else{
this.$toast('您尚未完成“' + course_name + '”培训课程的学习。')
this.$toast('您尚未完成“' + course_name + '”培训课程的学习。');
}
}
}
......@@ -440,10 +389,7 @@
this.currentObj = obj;
this.goIDCardAndEdu(obj);
}else {
// modal.toast({
// message: '请按顺序完成学习及考试',
// duration: 1.0
// });
this.$toast('请按顺序完成学习及考试');
}
}
}else { // 第一项
......@@ -457,24 +403,22 @@
}
}
}else {// 课程项
console.log(obj,"iiiiiiiiiii")
console.log(obj, 'iiiiiiiiiii');
if (this.examContent.exam_order == 5 || index == 0) { // 顺序并列, 或者顺序贯序但为第一项
// modal.alert({message:'999'})
//configurationModule.intoCourse(obj);
this.goStudyNative(obj)
this.goStudyNative(obj);
}else {
const lastItem = this.examContent.allLists[index - 1];
if ((lastItem.testNumFlag > 0 && lastItem.answerResultModel.pass_flag == 5) || lastItem.progress >= 0) {
//configurationModule.intoCourse(obj);
this.goStudyNative(obj)
// configurationModule.intoCourse(obj);
this.goStudyNative(obj);
}else {
this.$toast('请按顺序完成学习及考试')
this.$toast('请按顺序完成学习及考试');
}
}
}
},
goStudyNative(obj){
let appModuleModel=[
goStudyNative(obj) {
const appModuleModel = [
{
'key':'className',
'value':'value=com.picahealth.yunque.activitys.courseplaynew.CourseIntroduceActivity###WeexCourseIntroViewController'
......@@ -489,7 +433,7 @@
jsonString: appModuleModel,
});
},
diaLogConfirm(){
diaLogConfirm() {
this.$dialog
.confirm({
title: '提醒',
......@@ -518,7 +462,8 @@
origin: 'start'
};
if (this.beforeLearningExamNumber > 0) {
Vue.set(this.query, 'startNum', this.beforeLearningExamNumber);
this.$set(this.query, 'startNum', this.beforeLearningExamNumber);
// Vue.set(this.query, 'startNum', this.beforeLearningExamNumber);
}
this.goIDCardAndEdu(this.currentObj);
}
......
......@@ -3,11 +3,19 @@
<div
ref="textRef"
>
<div class="ele-content" :class="{'ele-contentOther':status}">
<div
class="ele-content"
:class="{'ele-contentOther':status}"
>
<span>简介:</span>
{{ message }}
</div>
<div @click="seeMore" class="ele-content-btn"> {{ status ? '显示全部' : '收起' }}</div>
<div
class="ele-content-btn"
@click="seeMore"
>
{{ status ? '显示全部' : '收起' }}
</div>
</div>
<div
class="see_more"
......@@ -21,9 +29,6 @@
</template>
<script>
// text collapse
// const dom = weex.requireModule('dom');
export default {
components: {},
props:['infoMsg'],
......@@ -35,31 +40,19 @@
},
computed: {
message: function() {
return this.infoMsg.textModuleList[0].content
return this.infoMsg.textModuleList[0].content;
}
},
created () {
},
mounted() {
this.init();
},
methods: {
getShortBrief(str) {
},
init() {
console.log(this.infoMsg.textModuleList[0])
},
seeMore() {
this.status=!this.status;
this.status = !this.status;
}
},
};
</script>
<style scoped>
.message-backups {
position: fixed;
......
......@@ -35,7 +35,8 @@ import {
Sticky,
Collapse,
CollapseItem,
CountDown
CountDown,
PullRefresh
} from 'vant';
Vue.use(List)
......@@ -73,4 +74,5 @@ Vue.use(List)
.use(Sticky)
.use(Collapse)
.use(CollapseItem)
.use(CountDown);
.use(CountDown)
.use(PullRefresh);
......@@ -20,22 +20,22 @@ const routerConfig = [
},
{
path: '/exam-result',
name: 'exam-result',
name: 'examResult',
component: () => import('@/views/examResult/index.vue')
},
{
path: '/exam-wrong',
name: 'exam-wrong',
name: 'examWrong',
component: () => import('@/views/exam/exam_wrong.vue')
},
{
path: '/exam-history',
name: 'exam-history',
name: 'examHistory',
component: () => import('@/views/exam/exam_history.vue')
},
{
path: '/local-exam-history',
name: 'local-exam-history',
name: 'localExamHistory',
component: () => import('@/views/exam/local_exam_history')
},
{
......
......@@ -38,20 +38,20 @@
import { listRelatives, list } from '@/api/home';
export default {
name: 'Home',
data() {
return {
token:'F65FDAEE03F34EA78490050B8A83BF95'
};
},
computed: {
count () {
return this.$store.state.home.count;
}
},
data(){
return {
token:"F65FDAEE03F34EA78490050B8A83BF95"
}
},
mounted () {
getCoopTop({id:4,token:this.token}).then((res)=>{
getCoopTop({id:4, token:this.token}).then((res) => {
console.log(res);
if(res && res.data){
if(res && res.data) {
this.infoLists = res.data.texts; // 简介(文案)组件
this.sliderLists = res.data.carousels; // 轮播图组件
this.projectName = res.data.projectName; // 项目名称
......
<template>
<scroller show-scrollbar="false" class="back-fff">
<template>
<scroller
show-scrollbar="false"
class="back-fff"
>
<div class="contenter">
<exam-history :showHeaderH="showHeaderH" :historyList="historyList" :examId="id" :examType="examType"></exam-history>
<pica-header title="考试记录" @goBack="goBack" showHeader="true"></pica-header>
<div class="history-nomore" v-if="historyList.length > 0">
<div class="nomore-text">没有更多记录了</div>
<exam-history
:show-header-h="showHeaderH"
:history-list="historyList"
:exam-id="id"
:exam-type="examType"
/>
<pica-header
title="考试记录"
show-header="true"
@goBack="goBack"
/>
<div
v-if="historyList.length > 0"
class="history-nomore"
>
<div class="nomore-text">
没有更多记录了
</div>
</div>
</div>
</scroller>
</template>
......@@ -23,42 +39,42 @@
<script>
import storejs from 'storejs';
import picaHeader from '@/components/stroke/picaHeader'
import examHistory from '@/components/stroke/examHistory'
import { getCoopExamResultNews ,getCoopResultNewsLocal} from '@/api/exam.js';
import picaHeader from '@/components/stroke/picaHeader';
import examHistory from '@/components/stroke/examHistory';
import { getCoopExamResultNews, getCoopResultNewsLocal} from '@/api/exam.js';
export default {
components:{picaHeader, examHistory},
data: () => ({
id: '',
isPassExam: false,
showHeaderH:false,
historyList:[],
examType: '',
token:""
token:''
}),
computed: {
},
components:{picaHeader,examHistory},
created () {
// this.historyList = this.$route.query.historyList
// this.historyList = this.$route.query.historyList
this.id = this.$route.query.examId;
this.token=storejs.get('token');
this.init()
this.token = storejs.get('token');
this.init();
},
methods: {
init(){
let funCoop = getCoopExamResultNews
if(this.$route.query.examType == 'local'){
funCoop=getCoopResultNewsLocal
}
funCoop({examId:this.id,token:this.token}).catch(res=>{
this.historyList = res.data.examRecordList
this.historyList.map(res=>{
res.createdTime = res.createdTime.substring(0,10)
})
})
init() {
let funCoop = getCoopExamResultNews;
if(this.$route.query.examType == 'local') {
funCoop = getCoopResultNewsLocal;
}
funCoop({examId:this.id, token:this.token}).catch(res => {
this.historyList = res.data.examRecordList;
this.historyList.map(res => {
res.createdTime = res.createdTime.substring(0, 10);
});
});
}
}
};
</script>
<style scoped>
.history-nomore{
......
......@@ -2,31 +2,69 @@
<list>
<cell>
<div class="head-fixed">
<div class="head-bg" :style="{backgroundColor: headBg, height: '5px'}"></div>
<div
class="head-bg"
:style="{backgroundColor: headBg, height: '5px'}"
/>
<div class="head wrap">
<img @click="back" src="http://pica-pro.oss-cn-shanghai.aliyuncs.com/md_resources/back_gray.png" style="width: 25px; height: 25px;"/>
<text class="title">错题集</text>
<text class="empty"></text>
<img
src="http://pica-pro.oss-cn-shanghai.aliyuncs.com/md_resources/back_gray.png"
style="width: 25px; height: 25px;"
@click="back"
>
<text class="title">
错题集
</text>
<text class="empty" />
</div>
</div>
<div class="img-wrap">
<img src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/icon_report_grey.png" style="width: 53px; height: 65px;"/>
<img
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/icon_report_grey.png"
style="width: 53px; height: 65px;"
>
</div>
<div class="result-wrap">
<div style="font-size: 16px;">正确题目数 :{{rightNum}}</div>
<div style="padding-left: 15px;font-size: 16px;">错误题目数 :</div>
<div style="color: #d84a38;font-size: 16px;">{{wrongNum}}</div>
<div style="font-size: 16px;">
正确题目数 :{{ rightNum }}
</div>
<div style="padding-left: 15px;font-size: 16px;">
错误题目数 :
</div>
<div style="color: #d84a38;font-size: 16px;">
{{ wrongNum }}
</div>
</div>
<div style="padding: 0 15px">
<div class="separator"></div>
<div class="separator" />
</div>
<div class="info">
<div style="font-size: 20px; padding-bottom: 20px; padding-top: 10px;">试题分析</div>
<div class="detail" v-for="(wrong,index) in wrongList" :key="index">
<div class="question-index">{{wrong.seqNo}}题:</div>
<div class="question-title">{{wrong.question}}</div>
<div class="answer" style="color: #d84a38;">您的答案:{{wrong.answer}}</div>
<div class="answer" style="color: #35CBCA;">正确答案:{{wrong.correctAnswer}}</div>
<div style="font-size: 20px; padding-bottom: 20px; padding-top: 10px;">
试题分析
</div>
<div
v-for="(wrong,index) in wrongList"
:key="index"
class="detail"
>
<div class="question-index">
{{ wrong.seqNo }}题:
</div>
<div class="question-title">
{{ wrong.question }}
</div>
<div
class="answer"
style="color: #d84a38;"
>
您的答案:{{ wrong.answer }}
</div>
<div
class="answer"
style="color: #35CBCA;"
>
正确答案:{{ wrong.correctAnswer }}
</div>
</div>
</div>
<!-- <wxc-loading :show="showLoading"></wxc-loading> -->
......@@ -114,11 +152,11 @@
<script>
// import { WxcLoading } from 'weex-ui'
// import WxcLoading from '../../components/wxc-loading'
//let modal = weex.requireModule('modal')
//import WxcLoading from '../../components/wxc-loading'
// let modal = weex.requireModule('modal')
// import WxcLoading from '../../components/wxc-loading'
import { getCoopExamWrongRecords} from '@/api/exam.js';
export default {
//components: { WxcLoading },
// components: { WxcLoading },
data: () => ({
showLoading: false,
wrongList: [],
......@@ -126,33 +164,33 @@
wrongNum: '',
headBg: '#ffffff',
headHeight: 0,
token:""
token:''
}),
computed: {
},
created () {
this.token=this.$storejs.get('token');
this.token = this.$storejs.get('token');
this.init();
},
methods: {
init() {
this.showLoading = true;
let para = {
const para = {
answerResultId: this.$route.query.answerResultId,
type: 5,
token:this.token
};
getCoopExamWrongRecords(para).catch(res=>{
this.showLoading = false
let data = res.data;
getCoopExamWrongRecords(para).catch(res => {
this.showLoading = false;
const data = res.data;
if(data.respCode == 200) {
this.wrongList = data.wrongList
this.rightNum = data.correctNo
this.wrongNum = data.wrongNo
this.wrongList = data.wrongList;
this.rightNum = data.correctNo;
this.wrongNum = data.wrongNo;
} else {
this.$toast(data.respMsg);
}
})
});
// this.GET('app/projectExam/wrongs', para, res => {
// this.showLoading = false
// let data = res.data;
......@@ -166,8 +204,8 @@
// })
},
back() {
this.$router.go(-1)
}
this.$router.go(-1);
}
}
};
</script>
\ No newline at end of file
此差异已折叠。
<template>
<div class="contenter">
<lives-exam-history :showHeaderH="false" :localHistoryList="historyList" @goExamStart="goExamStart" @watchResult="watchResult"></lives-exam-history>
<div class="history-nomore" v-if="historyList.length > 0">
<div class="nomore-text">没有更多记录了</div>
<lives-exam-history
:show-header-h="false"
:local-history-list="historyList"
@goExamStart="goExamStart"
@watchResult="watchResult"
/>
<div
v-if="historyList.length > 0"
class="history-nomore"
>
<div class="nomore-text">
没有更多记录了
</div>
<pica-header title="考试记录" @goBack="goBack" showHeader="true"></pica-header>
</div>
<pica-header
title="考试记录"
show-header="true"
@goBack="goBack"
/>
</div>
</template>
......@@ -19,10 +33,13 @@
</style>
<script>
import picaHeader from '@/components/stroke/picaHeader'
import livesExamHistory from "@/components/stroke/livesExamHistory";
import picaHeader from '@/components/stroke/picaHeader';
import livesExamHistory from '@/components/stroke/livesExamHistory';
import { getCoopLiveExam } from '@/api/storke.js';
export default {
components:{
livesExamHistory,
picaHeader},
data: () => ({
id: '',
isPassExam: false,
......@@ -33,43 +50,33 @@
examResultId: '',
endDate: ''
},
token:""
token:''
}),
computed: {
},
components:{
livesExamHistory,
picaHeader},
created () {
this.token=this.$storejs.get('token');
this.id = this.$route.query.projectId
this.init()
this.token = this.$storejs.get('token');
this.id = this.$route.query.projectId;
this.init();
},
methods: {
init(){
/*this.GET('app/exam/lives/results',{examId:id,pageNo:1,pageSize:15},res=>{
console.log("所有现场考试记录",res)
this.historyList = res.data.examRecordList
this.historyList.map(res=>{
// res.createdTime = res.createdTime.substring(0,10)
})
})*/
let _self = this
getCoopLiveExam({id:id,token:this.token}).catch(res=>{
if (res && res.data){
if (res.data.pLiveExamList && res.data.pLiveExamList.length){
_self.historyList = res.data.pLiveExamList
_self.historyList = _self.historyList.concat([])
init() {
const _self = this;
getCoopLiveExam({id:this.id, token:this.token}).catch(res => {
if (res && res.data) {
if (res.data.pLiveExamList && res.data.pLiveExamList.length) {
_self.historyList = res.data.pLiveExamList;
_self.historyList = _self.historyList.concat([]);
}else {
_self.historyList = []
_self.historyList = [];
}
}else{
this.$toast('网络异常,请稍后再试');
}
});
},
//重考
goExamStart(obj){
// 重考
goExamStart(obj) {
this.$router.push({
path: '/exam-result',
query:{
......@@ -79,10 +86,10 @@
endDate: obj.endDate,
answerResultId: obj.examResultId
}
})
});
},
//查看
watchResult(obj){
// 查看
watchResult(obj) {
this.$router.push({
path: '/exam-result',
query:{
......@@ -92,10 +99,10 @@
endDate: obj.endDate,
answerResultId: obj.examResultId
}
})
}
});
}
}
};
</script>
<style scoped>
.history-nomore{
......
<template>
<template>
<!-- <scroller show-scrollbar="false" style="background-color: white;"> -->
<div>
<div class="body_background">
<pica-header @goBack="goBack" :type="type" :showHeader="showHeader"></pica-header>
<exam-info :exam="exam" :type="type" @reExamStart="reExamStart" :startNum="startNum" :endNum="endNum" :examType="examType" v-bind:hasWrong="hasWrong"></exam-info>
<exam-history :showHeaderH="showHeaderH" :historyList="historyList" :examId="examId" :exam="exam"></exam-history>
<pica-header
:type="type"
:show-header="showHeader"
@goBack="goBack"
/>
<exam-info
:exam="exam"
:type="type"
:start-num="startNum"
:end-num="endNum"
:exam-type="examType"
:has-wrong="hasWrong"
@reExamStart="reExamStart"
/>
<exam-history
:show-header-h="showHeaderH"
:history-list="historyList"
:exam-id="examId"
:exam="exam"
/>
</div>
</div>
<!-- <wxc-loading :show="isShow"></wxc-loading> -->
......@@ -18,14 +35,19 @@
}
</style>
<script>
import examInfo from '@/components/stroke/examInfo'
import examHistory from '@/components/stroke/examHistory'
import picaHeader from '@/components/stroke/picaHeader'
import { getCoopExam ,getCoopExamResultNew,getCoopExamResultNews} from '@/api/exam.js';
//import WxcLoading from '../../components/wxc-loading'
//let configurationModule = weex.requireModule('configurationModule')
//let modal = weex.requireModule('modal')
import examInfo from '@/components/stroke/examInfo';
import examHistory from '@/components/stroke/examHistory';
import picaHeader from '@/components/stroke/picaHeader';
import { getCoopExam, getCoopExamResultNew, getCoopExamResultNews} from '@/api/exam.js';
// import WxcLoading from '../../components/wxc-loading'
// let configurationModule = weex.requireModule('configurationModule')
// let modal = weex.requireModule('modal')
export default {
components:{
examInfo,
examHistory, picaHeader,
// WxcLoading
},
data: () => ({
answerResultId: '',
......@@ -33,10 +55,10 @@ import { getCoopExam ,getCoopExamResultNew,getCoopExamResultNews} from '@/api/ex
examId: '',
isPassExam: false,
showHeader: true,
showHeaderH: true, //历史记录的header
exam:{},//考试基本信息
showHeaderH: true, // 历史记录的header
exam:{}, // 考试基本信息
historyList:[],
type: 2, //2 考试开始, 0 考试失败, 1 考试成功
type: 2, // 2 考试开始, 0 考试失败, 1 考试成功
source: '',
startNum: -1,
endNum: -1,
......@@ -45,56 +67,51 @@ import { getCoopExam ,getCoopExamResultNew,getCoopExamResultNews} from '@/api/ex
testMsg: '',
examType: 'common',
hasWrong:false,
token:""
token:''
}),
computed: {},
components:{
examInfo,
examHistory,picaHeader,
//WxcLoading
},
created () {
this.token=this.$storejs.get('token');
this.examId = this.$route.query.examId
this.from = this.$route.query.from
this.showHeader = this.from != 'exam'
this.answerResultId = this.$route.query.answerResultId || 0
let startNum = this.$route.query.startNum
let endNum = this.$route.query.endNum
this.startNum = startNum >= 0 ? startNum : -1
this.endNum = endNum >= 0 ? endNum : -1
this.token = this.$storejs.get('token');
this.examId = this.$route.query.examId;
this.from = this.$route.query.from;
this.showHeader = this.from != 'exam';
this.answerResultId = this.$route.query.answerResultId || 0;
const startNum = this.$route.query.startNum;
const endNum = this.$route.query.endNum;
this.startNum = startNum >= 0 ? startNum : -1;
this.endNum = endNum >= 0 ? endNum : -1;
},
mounted(){
this.init()
mounted() {
this.init();
},
methods: {
init(){
this.isShow = true
init() {
this.isShow = true;
this.hasWrong = false;
if (this.from !== "exam" && !(this.answerResultId > 0)){//开始页面
this.type = 2
getCoopExam({"examId":this.examId, "type": 5,token:this.token}).catch(res=>{
if(res.data){
if (this.from !== 'exam' && !(this.answerResultId > 0)) {// 开始页面
this.type = 2;
getCoopExam({'examId':this.examId, 'type': 5, token:this.token}).catch(res => {
if(res.data) {
if (res.data.respCode == 1000) {
return this.$toast(res.data.respMsg);
} else if (res.data.respCode == 401 || res.data.respCode == 404) {
return this.$rocNative.gotoLogin();
};
if(res.data.respCode == 200){
this.exam = res.data.examBaseInfo
}
if(res.data.respCode == 200) {
this.exam = res.data.examBaseInfo;
}
}else{
this.hasWrong = true;
this.$toast(res.data.respMsg)
this.$toast(res.data.respMsg);
}
})
}else{//结果页面
});
}else{// 结果页面
this.hasWrong = false;
getCoopExamResultNew({answerResultId:this.answerResultId, type: 5,token:this.token}).catch(res=>{
if(res.data){
if (res.data.respCode == 200){
getCoopExamResultNew({answerResultId:this.answerResultId, type: 5, token:this.token}).catch(res => {
if(res.data) {
if (res.data.respCode == 200) {
// weex.requireModule('CourseModule').finishTest(res.data)
this.exam = res.data.answerResult
this.exam = res.data.answerResult;
this.type = this.exam.passFlag == 5 ? 1 : 0;
}else if (res.data.respCode == 1000) {
return this.$toast(res.data.respMsg);
......@@ -102,36 +119,36 @@ import { getCoopExam ,getCoopExamResultNew,getCoopExamResultNews} from '@/api/ex
return this.$rocNative.gotoLogin();
}else{
this.hasWrong = true;
this.$toast(res.data.respMsg)
this.$toast(res.data.respMsg);
}
}else{
this.hasWrong = true;
this.$toast(res.data.respMsg)
this.$toast(res.data.respMsg);
}
});
}
this.hasWrong = false;
getCoopExamResultNews({examId:this.examId,pageNo:1,pageSize:3, type: 5,token:this.token}).catch(res=>{
this.isShow = false
if(res.data){
if (res.data.respCode == 200){
this.historyList = res.data.examRecordList
this.historyList.map(res=>{
res.createdTime = res.createdTime.substring(0,10)
})
getCoopExamResultNews({examId:this.examId, pageNo:1, pageSize:3, type: 5, token:this.token}).catch(res => {
this.isShow = false;
if(res.data) {
if (res.data.respCode == 200) {
this.historyList = res.data.examRecordList;
this.historyList.map(res => {
res.createdTime = res.createdTime.substring(0, 10);
});
}else if (res.data.respCode == 1000) {
return this.$toast(res.data.respMsg);
}else if (res.data.respCode == 401 || res.data.respCode == 404) {
return this.$rocNative.gotoLogin();
}else{
this.hasWrong = true;
this.$toast(res.data.respMsg)
this.$toast(res.data.respMsg);
}
}else{
this.hasWrong = true;
this.$toast(res.data.respMsg)
this.$toast(res.data.respMsg);
}
})
});
// this.GET('app/projectExam/results',{examId:this.examId,pageNo:1,pageSize:3, type: 5},res=>{
// this.isShow = false
// if (res.data && res.data.respCode == 200){
......@@ -149,19 +166,19 @@ import { getCoopExam ,getCoopExamResultNew,getCoopExamResultNews} from '@/api/ex
// })
},
goBack(){
goBack() {
this.$router.go(-1);
},
reExamStart(){
this.from = "start"
this.type = 2
this.showHeader = true
if (this.endNum > 0){
this.startNum = this.endNum
}
this.answerResultId = -1
this.init()
reExamStart() {
this.from = 'start';
this.type = 2;
this.showHeader = true;
if (this.endNum > 0) {
this.startNum = this.endNum;
}
this.answerResultId = -1;
this.init();
}
}
};
</script>
\ No newline at end of file
此差异已折叠。
<template>
<div>
<div class="stroke_container" v-if="this.flagLoading==5">
<van-pull-refresh
v-model="isLoading"
@refresh="onRefresh"
>
<div class="stroke_container">
<common-header
:bg-color="bgColor"
:title="title"
......@@ -18,10 +22,9 @@
ref="mainCp"
:type="value.slot"
:datas="allComponentLists[key]"
:keyIndex="key"
:key-index="key"
@click.native="getCurrentIndex(key)"
/>
</div>
</template>
<!--</stroke-slot>-->
......@@ -39,12 +42,13 @@
{{ pLiveMapping.examName }}
</div>
<div class="code-btn-wrap">
<div :class="{'code-btn': (allowFlag == 0),'code-active-btn': (allowFlag != 0)}"
<div
:class="{'code-btn': (allowFlag == 0),'code-active-btn': (allowFlag != 0)}"
:style="codeBtn"
@click="codeBtnClicked"
>
<!-- :textStyle="allowFlag == 0 ? codeTextStyleNo : codeTextStyle" -->
{{pLiveMapping.buttonName}}
{{ pLiveMapping.buttonName }}
</div>
</div>
</div>
......@@ -68,7 +72,6 @@
>
</div>
</div>
<lives-exam-history
:show-header-h="false"
:local-history-list="localHistoryList.slice(0,5)"
......@@ -139,24 +142,86 @@
</div>
</div>
</wxc-mask> 11-->
<van-overlay :show="showCodeInputDialog" @click="showCodeInputDialog = false">
<div class="wrapper" @click.stop>
<van-overlay
:show="showCodeInputDialog"
@click="showCodeInputDialog = false"
>
<div
class="wrapper"
@click.stop
>
<div class="code-content">
<div class="code-title-wrap">
<img class="code-img" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/close%403x.png" @click="showCodeInputDialog=false"/>
<div class="code-title">请输入考试码</div>
<img
class="code-img"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/close%403x.png"
@click="showCodeInputDialog=false"
>
<div class="code-title">
请输入考试码
</div>
</div>
<div class="code-input-wrap">
<input type="text" class="code-input" :class="[code1.length > 0 ? 'code-active': '']" v-model="code1" maxlength="1" @input="codeChange(code1, 'code2')" ref="code1" autofocus="true"/>
<input type="text" class="code-input" :class="[code2.length > 0 ? 'code-active': '']" v-model="code2" maxlength="1" @input="codeChange(code2, 'code3')" ref="code2"/>
<input type="text" class="code-input" :class="[code3.length > 0 ? 'code-active': '']" v-model="code3" maxlength="1" @input="codeChange(code3, 'code4')" ref="code3"/>
<input type="text" class="code-input" :class="[code4.length > 0 ? 'code-active': '']" v-model="code4" maxlength="1" @input="codeChange(code4, 'code5')" ref="code4"/>
<input type="text" class="code-input" :class="[code5.length > 0 ? 'code-active': '']" v-model="code5" maxlength="1" @input="codeChange(code5, 'code6')" ref="code5"/>
<input type="text" class="code-input" :class="[code6.length > 0 ? 'code-active': '']" v-model="code6" maxlength="1" @input="codeChange(code6, '')" ref="code6"/>
<input
ref="code1"
v-model="code1"
type="text"
class="code-input"
:class="[code1.length > 0 ? 'code-active': '']"
maxlength="1"
autofocus="true"
@input="codeChange(code1, 'code2')"
>
<input
ref="code2"
v-model="code2"
type="text"
class="code-input"
:class="[code2.length > 0 ? 'code-active': '']"
maxlength="1"
@input="codeChange(code2, 'code3')"
>
<input
ref="code3"
v-model="code3"
type="text"
class="code-input"
:class="[code3.length > 0 ? 'code-active': '']"
maxlength="1"
@input="codeChange(code3, 'code4')"
>
<input
ref="code4"
v-model="code4"
type="text"
class="code-input"
:class="[code4.length > 0 ? 'code-active': '']"
maxlength="1"
@input="codeChange(code4, 'code5')"
>
<input
ref="code5"
v-model="code5"
type="text"
class="code-input"
:class="[code5.length > 0 ? 'code-active': '']"
maxlength="1"
@input="codeChange(code5, 'code6')"
>
<input
ref="code6"
v-model="code6"
type="text"
class="code-input"
:class="[code6.length > 0 ? 'code-active': '']"
maxlength="1"
@input="codeChange(code6, '')"
>
</div>
</div>
</div>
</van-overlay>
</van-pull-refresh>
</div>
</template>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册