|
@@ -13,7 +13,7 @@
|
|
|
<view class="content">
|
|
<view class="content">
|
|
|
<view class="contentTitle">{{ nowPageData.content }}</view>
|
|
<view class="contentTitle">{{ nowPageData.content }}</view>
|
|
|
<view class="imageBox" v-if="nowPageData.imgUrl && nowPageData.imgUrl !== null">
|
|
<view class="imageBox" v-if="nowPageData.imgUrl && nowPageData.imgUrl !== null">
|
|
|
- <image :src="$method.splitImgHost(nowPageData.imgUrl)" mode="aspectFit" @click="seeBigImage(nowPageData.imgUrl)"></image>
|
|
|
|
|
|
|
+ <image :src="$method.splitImgHost(nowPageData.imgUrl)" mode="aspectFit" @click="seeBigImage(nowPageData.imgUrl)"></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<!---案例内容start -->
|
|
<!---案例内容start -->
|
|
@@ -25,7 +25,9 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="content">
|
|
<view class="content">
|
|
|
<view class="contentTitle">{{ itemst.content }}</view>
|
|
<view class="contentTitle">{{ itemst.content }}</view>
|
|
|
- <view class="imageBox" v-if="itemst.imgUrl && itemst.imgUrl !== null"><image :src="$method.splitImgHost(itemst.imgUrl)" mode="aspectFit" @click="seeBigImage(itemst.imgUrl)"></image></view>
|
|
|
|
|
|
|
+ <view class="imageBox" v-if="itemst.imgUrl && itemst.imgUrl !== null">
|
|
|
|
|
+ <image :src="$method.splitImgHost(itemst.imgUrl)" mode="aspectFit" @click="seeBigImage(itemst.imgUrl)"></image>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
<view
|
|
<view
|
|
|
class="banksChiList"
|
|
class="banksChiList"
|
|
@@ -37,7 +39,7 @@
|
|
|
<view class="leftIndex">{{ alphabet[indexs] }}.</view>
|
|
<view class="leftIndex">{{ alphabet[indexs] }}.</view>
|
|
|
<view class="bankTie">
|
|
<view class="bankTie">
|
|
|
<view>{{ items.content }}</view>
|
|
<view>{{ items.content }}</view>
|
|
|
- <image v-if="items.imgUrl && items.imgUrl !== null" :src="$method.splitImgHost(items.imgUrl)" mode="aspectFit" @click="seeBigImage(items.imgUrl)"></image>
|
|
|
|
|
|
|
+ <image v-if="items.imgUrl && items.imgUrl !== null" :src="$method.splitImgHost(items.imgUrl)" mode="aspectFit" @click="seeBigImage(items.imgUrl)"></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view v-if="itemst.type === 3" class="banksChiList" :class="isWrong === 1 ? 'activeListBt' : ''" @click="activePDs(1, indexst)">正确</view>
|
|
<view v-if="itemst.type === 3" class="banksChiList" :class="isWrong === 1 ? 'activeListBt' : ''" @click="activePDs(1, indexst)">正确</view>
|
|
@@ -126,7 +128,13 @@
|
|
|
<u-popup v-model="show" mode="bottom" :safe-area-inset-bottom="true">
|
|
<u-popup v-model="show" mode="bottom" :safe-area-inset-bottom="true">
|
|
|
<view class="popup_box">
|
|
<view class="popup_box">
|
|
|
<scroll-view scroll-y="true" class="popup_list">
|
|
<scroll-view scroll-y="true" class="popup_list">
|
|
|
- <view v-for="(item, index) in list" :key="index" class="btn_num" :class="index === numIndex ? 'btn_bac2' : 'btn_bac1'" @click="changeTM(index, 2)">
|
|
|
|
|
|
|
+ <view
|
|
|
|
|
+ v-for="(item, index) in list"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ class="btn_num"
|
|
|
|
|
+ :class="index === numIndex ? 'btn_bac2' : isWrites.indexOf(item.questionId) !== -1 ? 'btn_bac3' : 'btn_bac1'"
|
|
|
|
|
+ @click="changeTM(index, 2)"
|
|
|
|
|
+ >
|
|
|
<text class="">{{ index + 1 }}</text>
|
|
<text class="">{{ index + 1 }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
@@ -174,28 +182,33 @@ export default {
|
|
|
selects: [], //当前做了哪些题目
|
|
selects: [], //当前做了哪些题目
|
|
|
showJX: [], // 展开解析列表
|
|
showJX: [], // 展开解析列表
|
|
|
showJXanli: [], // 展开案例解析列表
|
|
showJXanli: [], // 展开案例解析列表
|
|
|
- collecStatus: false
|
|
|
|
|
|
|
+ collecStatus: false,
|
|
|
|
|
+ isWrites: [], //已做的题目id
|
|
|
|
|
+ sc: false, //收藏集进来的?
|
|
|
|
|
+ ct: false //错题进来的?
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
|
- this.titleListFn(option);
|
|
|
|
|
this.bankId = option.bankId;
|
|
this.bankId = option.bankId;
|
|
|
this.typeId = option.typeId;
|
|
this.typeId = option.typeId;
|
|
|
|
|
+ this.sc = option.sc;
|
|
|
|
|
+ this.ct = option.ct;
|
|
|
if (option.bankSectionId) {
|
|
if (option.bankSectionId) {
|
|
|
this.bankSectionId = option.bankSectionId;
|
|
this.bankSectionId = option.bankSectionId;
|
|
|
}
|
|
}
|
|
|
if (option.examId) {
|
|
if (option.examId) {
|
|
|
this.examId = option.examId;
|
|
this.examId = option.examId;
|
|
|
}
|
|
}
|
|
|
|
|
+ this.titleListFn(option);
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
//预览图片
|
|
//预览图片
|
|
|
- seeBigImage(url){
|
|
|
|
|
- var urlarr = []
|
|
|
|
|
- urlarr.push(this.$method.splitImgHost(url))
|
|
|
|
|
|
|
+ seeBigImage(url) {
|
|
|
|
|
+ var urlarr = [];
|
|
|
|
|
+ urlarr.push(this.$method.splitImgHost(url));
|
|
|
uni.previewImage({
|
|
uni.previewImage({
|
|
|
urls: urlarr
|
|
urls: urlarr
|
|
|
- })
|
|
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
favoritesStatus() {
|
|
favoritesStatus() {
|
|
|
this.$api.questionsystems(this.nowPageData.questionId).then(result => {
|
|
this.$api.questionsystems(this.nowPageData.questionId).then(result => {
|
|
@@ -223,6 +236,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
var data = {
|
|
var data = {
|
|
|
|
|
+ bankId: self.bankId,
|
|
|
questionId: self.nowPageData.questionId
|
|
questionId: self.nowPageData.questionId
|
|
|
};
|
|
};
|
|
|
this.$api.questionsystemadd(data).then(res => {
|
|
this.$api.questionsystemadd(data).then(res => {
|
|
@@ -262,8 +276,18 @@ export default {
|
|
|
this.initLint();
|
|
this.initLint();
|
|
|
this.getCooieds();
|
|
this.getCooieds();
|
|
|
this.favoritesStatus(self.nowPageData.questionId);
|
|
this.favoritesStatus(self.nowPageData.questionId);
|
|
|
|
|
+ this.getBGCchange();
|
|
|
this.show = false;
|
|
this.show = false;
|
|
|
},
|
|
},
|
|
|
|
|
+ //已做题目颜色变化
|
|
|
|
|
+ getBGCchange() {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ this.answerList.forEach((item, index) => {
|
|
|
|
|
+ if (this.isWrites.indexOf(item.questionId) === -1) {
|
|
|
|
|
+ self.isWrites.push(item.questionId);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
//数据清空
|
|
//数据清空
|
|
|
initDatas() {
|
|
initDatas() {
|
|
|
this.isWrong = -1;
|
|
this.isWrong = -1;
|
|
@@ -343,21 +367,88 @@ export default {
|
|
|
self.answerList[self.numIndex] = objList;
|
|
self.answerList[self.numIndex] = objList;
|
|
|
}
|
|
}
|
|
|
if (self.numIndex === self.list.length - 1) {
|
|
if (self.numIndex === self.list.length - 1) {
|
|
|
- uni.showModal({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- content: '是否确定交卷',
|
|
|
|
|
- success: function(res) {
|
|
|
|
|
- if (res.confirm) {
|
|
|
|
|
- self.carryOut();
|
|
|
|
|
- } else if (res.cancel) {
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ self.changeTM(self.numIndex, 2);
|
|
|
|
|
+ self.carryOut();
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
self.changeTM(self.numIndex, 1);
|
|
self.changeTM(self.numIndex, 1);
|
|
|
},
|
|
},
|
|
|
titleListFn(option) {
|
|
titleListFn(option) {
|
|
|
|
|
+ console.log(option)
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ if (option.sc === 'true') {
|
|
|
|
|
+ var data = {
|
|
|
|
|
+ bankId: self.bankId
|
|
|
|
|
+ };
|
|
|
|
|
+ self.$api.systemquestionList(data).then(res => {
|
|
|
|
|
+ if (res.data.rows.length) {
|
|
|
|
|
+ res.data.rows.forEach((items, indexs) => {
|
|
|
|
|
+ items.jsonStr = JSON.parse(items.jsonStr);
|
|
|
|
|
+ });
|
|
|
|
|
+ if (res.data.rows[self.numIndex].type === 4) {
|
|
|
|
|
+ self.replyL = [];
|
|
|
|
|
+ for (var i = 0; i < res.data.rows[self.numIndex].jsonStr.length; i++) {
|
|
|
|
|
+ self.replyL.push({ selectId: [] });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ self.nowPageData = res.data.rows[self.numIndex];
|
|
|
|
|
+ self.favoritesStatus(res.data.rows[self.numIndex].questionId);
|
|
|
|
|
+ self.list = res.data.rows;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '没有题目',
|
|
|
|
|
+ showCancel: false,
|
|
|
|
|
+ confirmText: '返回上级',
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ uni.navigateBack({
|
|
|
|
|
+ delta: 1
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (option.ct === 'true') {
|
|
|
|
|
+ var data = {
|
|
|
|
|
+ bankId: self.bankId
|
|
|
|
|
+ };
|
|
|
|
|
+ self.$api.questionListrecord(data).then(res => {
|
|
|
|
|
+ if (res.data.rows.length) {
|
|
|
|
|
+ res.data.rows.forEach((items, indexs) => {
|
|
|
|
|
+ items.jsonStr = JSON.parse(items.jsonStr);
|
|
|
|
|
+ });
|
|
|
|
|
+ if (res.data.rows[self.numIndex].type === 4) {
|
|
|
|
|
+ self.replyL = [];
|
|
|
|
|
+ for (var i = 0; i < res.data.rows[self.numIndex].jsonStr.length; i++) {
|
|
|
|
|
+ self.replyL.push({ selectId: [] });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ self.nowPageData = res.data.rows[self.numIndex];
|
|
|
|
|
+ self.favoritesStatus(res.data.rows[self.numIndex].questionId);
|
|
|
|
|
+ self.list = res.data.rows;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '没有题目',
|
|
|
|
|
+ showCancel: false,
|
|
|
|
|
+ confirmText: '返回上级',
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ uni.navigateBack({
|
|
|
|
|
+ delta: 1
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (option.bankSectionId) {
|
|
if (option.bankSectionId) {
|
|
|
var data = {
|
|
var data = {
|
|
|
bankSectionId: option.bankSectionId
|
|
bankSectionId: option.bankSectionId
|
|
@@ -368,9 +459,24 @@ export default {
|
|
|
examId: option.examId
|
|
examId: option.examId
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
- this.$api.questiondetailList(data).then(res => {
|
|
|
|
|
|
|
+ if (option.bankSectionId === undefined && option.examId === undefined) {
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '没有题目',
|
|
|
|
|
+ showCancel: false,
|
|
|
|
|
+ confirmText: '返回上级',
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ uni.navigateBack({
|
|
|
|
|
+ delta: 1
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ self.$api.questiondetailList(data).then(res => {
|
|
|
if (res.data.rows.length) {
|
|
if (res.data.rows.length) {
|
|
|
- let self = this;
|
|
|
|
|
res.data.rows.forEach((items, indexs) => {
|
|
res.data.rows.forEach((items, indexs) => {
|
|
|
items.jsonStr = JSON.parse(items.jsonStr);
|
|
items.jsonStr = JSON.parse(items.jsonStr);
|
|
|
});
|
|
});
|
|
@@ -509,69 +615,85 @@ export default {
|
|
|
//交卷
|
|
//交卷
|
|
|
carryOut() {
|
|
carryOut() {
|
|
|
var self = this;
|
|
var self = this;
|
|
|
- var correct = 0;
|
|
|
|
|
- var errorz = 0;
|
|
|
|
|
- var answerListString = JSON.parse(JSON.stringify(this.answerList));
|
|
|
|
|
- answerListString.forEach((item, index) => {
|
|
|
|
|
- if (item.isRight !== undefined) {
|
|
|
|
|
- if (item.isRight === 1) {
|
|
|
|
|
- correct++;
|
|
|
|
|
- } else {
|
|
|
|
|
- errorz++;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- item.selectIds = item.selectIds.toString();
|
|
|
|
|
- item.replyStr.forEach((items, indexs) => {
|
|
|
|
|
- if (items.selectId) {
|
|
|
|
|
- items.selectId = items.selectId.toString();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (this.isWrites.length !== this.list.length) {
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '请完成所有作答再交卷',
|
|
|
|
|
+ showCancel: false,
|
|
|
|
|
+ success: function(res) {}
|
|
|
});
|
|
});
|
|
|
- item.replyStr = JSON.stringify(item.replyStr);
|
|
|
|
|
- });
|
|
|
|
|
- var data = {
|
|
|
|
|
- bankId: this.bankId,
|
|
|
|
|
- type: this.typeId,
|
|
|
|
|
- answerList: answerListString
|
|
|
|
|
- };
|
|
|
|
|
- if (this.examId !== null) {
|
|
|
|
|
- data.examId = this.examId;
|
|
|
|
|
- }
|
|
|
|
|
- if (this.simulateId !== null) {
|
|
|
|
|
- data.simulateId = this.bankSectionId;
|
|
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
- this.$api.questiondetailrecord(data).then(res => {
|
|
|
|
|
- if (res.data.code === 200) {
|
|
|
|
|
- // uni.showModal({
|
|
|
|
|
- // title: '提示',
|
|
|
|
|
- // content: '提交成功返回上级',
|
|
|
|
|
- // showCancel: false,
|
|
|
|
|
- // confirmText: '返回上级',
|
|
|
|
|
- // success: function(ress) {
|
|
|
|
|
- // if (ress.confirm) {
|
|
|
|
|
- // uni.navigateBack({
|
|
|
|
|
- // delta: 1
|
|
|
|
|
- // });
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- // });
|
|
|
|
|
- var num = 0;
|
|
|
|
|
- self.list.forEach((item, index) => {
|
|
|
|
|
- if (item.type !== 4) {
|
|
|
|
|
- num++;
|
|
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '是否确定交卷',
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ var correct = 0;
|
|
|
|
|
+ var errorz = 0;
|
|
|
|
|
+ var answerListString = JSON.parse(JSON.stringify(self.answerList));
|
|
|
|
|
+ answerListString.forEach((item, index) => {
|
|
|
|
|
+ if (item.isRight !== undefined) {
|
|
|
|
|
+ if (item.isRight === 1) {
|
|
|
|
|
+ correct++;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ errorz++;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ item.selectIds = item.selectIds.toString();
|
|
|
|
|
+ item.replyStr.forEach((items, indexs) => {
|
|
|
|
|
+ if (items.selectId) {
|
|
|
|
|
+ items.selectId = items.selectId.toString();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ item.replyStr = JSON.stringify(item.replyStr);
|
|
|
|
|
+ });
|
|
|
|
|
+ var data = {
|
|
|
|
|
+ bankId: self.bankId,
|
|
|
|
|
+ type: self.typeId,
|
|
|
|
|
+ answerList: answerListString
|
|
|
|
|
+ };
|
|
|
|
|
+ if (self.examId !== null) {
|
|
|
|
|
+ data.examId = self.examId;
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
- uni.redirectTo({
|
|
|
|
|
- url: `/pages2/bank/endBG?bankId=${self.bankId}&type=${self.typeId}&allIndex=${num}&correct=${correct}&error=${errorz}`
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: '提交失败',
|
|
|
|
|
- icon: 'none',
|
|
|
|
|
- duration: 2000
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (self.simulateId !== null) {
|
|
|
|
|
+ data.simulateId = self.bankSectionId;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (self.sc === 'true') {
|
|
|
|
|
+ var num = 0;
|
|
|
|
|
+ self.list.forEach((item, index) => {
|
|
|
|
|
+ if (item.type !== 4) {
|
|
|
|
|
+ num++;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ uni.redirectTo({
|
|
|
|
|
+ url: `/pages2/bank/endBG?bankId=${self.bankId}&type=${self.typeId}&allIndex=${num}&correct=${correct}&error=${errorz}`
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ self.$api.questiondetailrecord(data).then(res => {
|
|
|
|
|
+ if (res.data.code === 200) {
|
|
|
|
|
+ var num = 0;
|
|
|
|
|
+ self.list.forEach((item, index) => {
|
|
|
|
|
+ if (item.type !== 4) {
|
|
|
|
|
+ num++;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ uni.redirectTo({
|
|
|
|
|
+ url: `/pages2/bank/endBG?bankId=${self.bankId}&type=${self.typeId}&allIndex=${num}&correct=${correct}&error=${errorz}`
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '提交失败',
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ duration: 2000
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (res.cancel) {
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- console.log(data);
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
@@ -655,6 +777,10 @@ export default {
|
|
|
.banksChiList > .bankTie > image {
|
|
.banksChiList > .bankTie > image {
|
|
|
max-width: 95%;
|
|
max-width: 95%;
|
|
|
}
|
|
}
|
|
|
|
|
+.btn_bac3 {
|
|
|
|
|
+ background: #4d6dbd;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+}
|
|
|
.btn_bac2 {
|
|
.btn_bac2 {
|
|
|
background: #32467b;
|
|
background: #32467b;
|
|
|
color: #fff;
|
|
color: #fff;
|