|
@@ -2,7 +2,7 @@
|
|
|
<GlobalHeader/>
|
|
<GlobalHeader/>
|
|
|
<div id="portal-body">
|
|
<div id="portal-body">
|
|
|
|
|
|
|
|
-<!-- <InfoCard/>-->
|
|
|
|
|
|
|
+ <!-- <InfoCard/>-->
|
|
|
|
|
|
|
|
<CarouselCard id="portal-carousel-card"/>
|
|
<CarouselCard id="portal-carousel-card"/>
|
|
|
|
|
|
|
@@ -17,7 +17,8 @@
|
|
|
<MyCourseCard :courseVO="course" v-for="course in myCourseList" :key="course.id"/>
|
|
<MyCourseCard :courseVO="course" v-for="course in myCourseList" :key="course.id"/>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-else :style="{height: (courseRowHeight - 63) + 'px', marginTop: (courseRowHeight / 2 - 120) + 'px'}" class="portal-card-main">
|
|
|
|
|
|
|
+ <div v-else :style="{height: (courseRowHeight - 63) + 'px', marginTop: (courseRowHeight / 2 - 120) + 'px'}"
|
|
|
|
|
+ class="portal-card-main">
|
|
|
<div>
|
|
<div>
|
|
|
<svg class="icon" height="128" viewBox="0 0 1024 1024" width="128" xmlns="http://www.w3.org/2000/svg">
|
|
<svg class="icon" height="128" viewBox="0 0 1024 1024" width="128" xmlns="http://www.w3.org/2000/svg">
|
|
|
<path
|
|
<path
|
|
@@ -60,7 +61,8 @@
|
|
|
<MyTestCard :testVO="test" v-for="test in myTestList" :key="test.id"/>
|
|
<MyTestCard :testVO="test" v-for="test in myTestList" :key="test.id"/>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-else :style="{height: (testRowHeight - 63) + 'px', marginTop: (testRowHeight / 2 - 120) + 'px'}" class="portal-card-main">
|
|
|
|
|
|
|
+ <div v-else :style="{height: (testRowHeight - 63) + 'px', marginTop: (testRowHeight / 2 - 120) + 'px'}"
|
|
|
|
|
+ class="portal-card-main">
|
|
|
<div>
|
|
<div>
|
|
|
<svg class="icon" height="128" viewBox="0 0 1024 1024" width="128" xmlns="http://www.w3.org/2000/svg">
|
|
<svg class="icon" height="128" viewBox="0 0 1024 1024" width="128" xmlns="http://www.w3.org/2000/svg">
|
|
|
<path
|
|
<path
|
|
@@ -87,14 +89,16 @@
|
|
|
<el-tabs v-model="activeTestName" @tab-click="changeTestPane">
|
|
<el-tabs v-model="activeTestName" @tab-click="changeTestPane">
|
|
|
<el-tab-pane label="评测题" name="eval">
|
|
<el-tab-pane label="评测题" name="eval">
|
|
|
<el-row justify="space-around">
|
|
<el-row justify="space-around">
|
|
|
- <el-col v-for="item in evalExamList.slice(0, cardRowLength)" :key="item.id" :lg="7" :md="11" :sm="11" :xs="11">
|
|
|
|
|
|
|
+ <el-col v-for="item in evalExamList.slice(0, cardRowLength)" :key="item.id" :lg="7" :md="11" :sm="11"
|
|
|
|
|
+ :xs="11">
|
|
|
<EvalCard :examVO="item"></EvalCard>
|
|
<EvalCard :examVO="item"></EvalCard>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="代码题" name="coder">
|
|
<el-tab-pane label="代码题" name="coder">
|
|
|
<el-row justify="space-around">
|
|
<el-row justify="space-around">
|
|
|
- <el-col v-for="item in coderExamList.slice(0, cardRowLength)" :key="item.id" :lg="7" :md="11" :sm="11" :xs="11">
|
|
|
|
|
|
|
+ <el-col v-for="item in coderExamList.slice(0, cardRowLength)" :key="item.id" :lg="7" :md="11" :sm="11"
|
|
|
|
|
+ :xs="11">
|
|
|
<CoderCard :coder-v-o="item"></CoderCard>
|
|
<CoderCard :coder-v-o="item"></CoderCard>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -121,7 +125,7 @@ import MyTestCard from "@/views/PortalPage/components/MyTestCard";
|
|
|
export default {
|
|
export default {
|
|
|
//属性
|
|
//属性
|
|
|
name: "PortalPage",
|
|
name: "PortalPage",
|
|
|
- components: { MyTestCard, CoderCard, GlobalFooter, CourseCard, CarouselCard, GlobalHeader, EvalCard, MyCourseCard },
|
|
|
|
|
|
|
+ components: {MyTestCard, CoderCard, GlobalFooter, CourseCard, CarouselCard, GlobalHeader, EvalCard, MyCourseCard},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
isLogin: this.$store.state.user.token !== undefined,
|
|
isLogin: this.$store.state.user.token !== undefined,
|
|
@@ -132,6 +136,8 @@ export default {
|
|
|
courseList: [],
|
|
courseList: [],
|
|
|
coderExamList: [],
|
|
coderExamList: [],
|
|
|
myCourseList: [],
|
|
myCourseList: [],
|
|
|
|
|
+ myEvalExamList: [],
|
|
|
|
|
+ myCoderExamList: [],
|
|
|
myTestList: [],
|
|
myTestList: [],
|
|
|
courseRowHeight: 0,
|
|
courseRowHeight: 0,
|
|
|
testRowHeight: 0,
|
|
testRowHeight: 0,
|
|
@@ -165,10 +171,14 @@ export default {
|
|
|
this.coderExamList = this.$apis.getAllCoderExams().data.data["res"];
|
|
this.coderExamList = this.$apis.getAllCoderExams().data.data["res"];
|
|
|
|
|
|
|
|
if (this.isLogin) {
|
|
if (this.isLogin) {
|
|
|
- this.myCourseList = this.$apis.getStudentCourses({ "studentId": this.$store.state.user.id }).then(res => {
|
|
|
|
|
|
|
+ this.myCourseList = this.$apis.getStudentCourses({"studentId": this.$store.state.user.id}).then(res => {
|
|
|
this.myCourseList = res.data.data;
|
|
this.myCourseList = res.data.data;
|
|
|
});
|
|
});
|
|
|
- this.myTestList = [].concat(this.evalExamList).concat(this.coderExamList);
|
|
|
|
|
|
|
+ const evalRes = await this.$apis.getStudentEvalExams({state: 0});
|
|
|
|
|
+ this.myEvalExamList = evalRes.data.data.examVOList;
|
|
|
|
|
+ const coderRes = await this.$apis.getStudentCoderExams({});
|
|
|
|
|
+ this.myCoderExamList = coderRes.data.data.res;
|
|
|
|
|
+ this.myTestList = [].concat(this.myEvalExamList).concat(this.myCoderExamList);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
await this.$nextTick(() => {
|
|
await this.$nextTick(() => {
|