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

考试优化

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