Commit 5c0993f3 authored by 罗超's avatar 罗超

1

parent 458bc903
...@@ -94,7 +94,7 @@ import { submitPaper } from "../../api/exam"; ...@@ -94,7 +94,7 @@ import { submitPaper } from "../../api/exam";
export default { export default {
props: { props: {
paperData: Object, paperData: Object,
ExamStuId: Number ExamStuId: Number,
}, },
setup(props, ctx) { setup(props, ctx) {
let Gid = uni.getStorageSync("userInfo").Id; let Gid = uni.getStorageSync("userInfo").Id;
...@@ -119,19 +119,21 @@ export default { ...@@ -119,19 +119,21 @@ export default {
async savePaper() { async savePaper() {
let obj = JSON.parse(JSON.stringify(props.paperData.Paper)); let obj = JSON.parse(JSON.stringify(props.paperData.Paper));
delete obj.Group_Id; delete obj.Group_Id;
obj.Exam_Student_Id = props.ExamStuId obj.Exam_Student_Id = props.ExamStuId;
let res = await submitPaper(obj); let res = await submitPaper(obj);
if (res) { if (res) {
console.log(119, res); console.log(119, res);
if(res.Code==1){ if (res.Code == 1) {
uni.showToast({ uni.showToast({
title: res.Message, title: res.Message,
icon: "none", icon: "none",
}); });
uni.navigateTo({ setTimeout(() => {
url: '/pages/index/index' uni.navigateTo({
}); url: "/pages/index/index",
} });
}, 1000);
}
} }
}, },
}; };
......
...@@ -358,7 +358,7 @@ export default { ...@@ -358,7 +358,7 @@ export default {
let data = reactive({ let data = reactive({
time: 1 * 60 * 60 * 1000, time: 1 * 60 * 60 * 1000,
statusBarHeight: 0, statusBarHeight: 0,
// msg: { GuestId: Gid, PaperId: 6, Id: 3 }, // msg: { GuestId: Gid, PaperId: 6, PublishId: 3 },
msg: { GuestId: Gid, PaperId: 0, PublishId: 0 }, msg: { GuestId: Gid, PaperId: 0, PublishId: 0 },
peaperDetail: {}, peaperDetail: {},
changeIndex: 0, //大题序号 changeIndex: 0, //大题序号
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
:key="index" :key="index"
class="exam-item" class="exam-item"
:style="{ 'background-image': `url(${item.PicList[0]})` }" :style="{ 'background-image': `url(${item.PicList[0]})` }"
@click="jumpPage(item.PaperId, item.Id)" @click="jumpPage(item.PaperId, item.Id, item.Exam_Student_Id)"
> >
<view class="testName"> <view class="testName">
{{ item.PaperName }} {{ item.PaperName }}
...@@ -111,9 +111,15 @@ export default { ...@@ -111,9 +111,15 @@ export default {
data.msg.pageIndex = 1; data.msg.pageIndex = 1;
methods.getList(); methods.getList();
}, },
jumpPage(PaperId, Id) { jumpPage(PaperId, Id, SId) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/exam/examPaper?PaperId=" + PaperId + "&&Id=" + Id, url:
"/pages/exam/examPaper?PaperId=" +
PaperId +
"&&Id=" +
Id +
"&&Exam_Student_Id=" +
SId,
}); });
}, },
lower(e) { lower(e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment