UI_2022-02-10
yujialong 3 years ago
parent e661c5679d
commit 63601317aa
  1. 16
      src/api/index.js
  2. 2
      src/main.js
  3. 4
      src/pages/account/login/index.vue
  4. 124
      src/pages/ass/list/index.vue
  5. 41
      src/pages/record/details/index.vue
  6. 33
      src/pages/record/list/ass.vue
  7. 40
      src/pages/record/list/index.vue
  8. 27
      src/pages/record/list/practice.vue
  9. 150
      src/pages/station/list/index.vue

@ -13,11 +13,7 @@ export default {
verification: `${host}users/users/user/captcha`,// 验证码图片
//实验台
experimentOverview: `${host}occupationlab/achievement/experimentOverview`, //实验概览
queryAssessmentByStudent: `${host}occupationlab/achievement/queryAssessmentByStudent`, //学生端考核成绩
queryPracticeByStudent: `${host}occupationlab/achievement/queryPracticeByStudent`, //学生端练习成绩
exportAssessmentInfo: `${host}occupationlab/achievement/exportAssessmentInfo`, // 批量导出考核成绩
exportPracticeInfo: `${host}occupationlab/achievement/exportPracticeInfo`, // 批量导出练习成绩
// 能力测评
canExperiment: `${host}occupationlab/occupationlab/evaluationrecord/can_experiment`, // 查询是否能够开启实验
@ -31,6 +27,16 @@ export default {
experimentStart: `${host}occupationlab/occupationlab/evaluationrecord/start`, // 开始测评
experimentSubmit: `${host}occupationlab/occupationlab/evaluationrecord/submit`, // 提交测评
// 实验记录
schoolCourse: `${host}nakadai/nakadai/curriculum/schoolCourse`, // 获取学校购买订单后的课程
experimentOverview: `${host}occupationlab/achievement/experimentOverview`, //实验概览
queryAssessmentByStudent: `${host}occupationlab/achievement/queryAssessmentByStudent`, //学生端考核成绩
queryPracticeByStudent: `${host}occupationlab/achievement/queryPracticeByStudent`, //学生端练习成绩
exportAssessmentInfo: `${host}occupationlab/achievement/exportAssessmentInfo`, // 批量导出考核成绩
exportPracticeInfo: `${host}occupationlab/achievement/exportPracticeInfo`, // 批量导出练习成绩
practiceByStudentDetail: `${host}occupationlab/achievement/practiceByStudentDetail`, // 学生端练习实验情况
exportPracticeByStudentDetail: `${host}occupationlab/achievement/exportPracticeByStudentDetail`, // 导出学生端练习实验情况
// 考核列表
pageStuAssessment: `${host}occupationlab/assessment/pageStuAssessment`, // 学生端——学生考核列表
getPythonSysByStuAccountId: `${host}occupationlab/assessment/getPythonSysByStuAccountId`, // 学生端——课程名称

@ -32,7 +32,7 @@ Vue.prototype.core = core
Vue.config.productionTip = false;
Vue.use(VueI18n);
Vue.use(ElementUI);
Vue.use(ElementUI, { size: "small" });
const i18n = new VueI18n({
locale: Setting.i18n.default,
messages

@ -165,12 +165,12 @@ export default {
activeName: "1",
isReg: false,
loginForm: {
account: "admin",
account: "xiaoliu",
password: "111aaa",
code: "", //
random: "", //
distinguish: null, // ,1,2
platform: 3 // 123
platform: 1 // 123
},
loginRules: {
account: [{ required: true, message: "请输入用户名", trigger: "blur" }],

@ -81,7 +81,7 @@
<el-table-column prop="stopTime" label="结束时间" align="center"></el-table-column>
<el-table-column label="倒计时" align="center">
<template slot-scope="scope">
<!-- <span v-countdown="scope.row.surplusTime">{{ scope.row.surplusTime }}</span>-->
<span>{{ scope.row.countDown | timeFilter }}</span>
</template>
</el-table-column>
<el-table-column label="实验状态" align="center">
@ -92,10 +92,16 @@
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<!--status:考核状态(0待开始 1进行中 2已结束); stuState:学生考试状态(0未考 1在考 2已考)-->
<el-button v-if="scope.row.status === 2 && scope.row.stuState === 0" type="text" disabled>未参加</el-button>
<el-button v-if="scope.row.status !== 2 && scope.row.stuState === 0" type="text" @click="entry(scope.row)" :disabled="scope.row.status !== 1">进入</el-button>
<el-button v-if="scope.row.status === 1 && scope.row.stuState === 2" type="text" disabled>已提交</el-button>
<el-button v-if="scope.row.status === 2 && scope.row.stuState === 2" type="text" @click="show(scope.row)">查看成绩</el-button>
<el-button v-if="scope.row.status === 2 && scope.row.stuState === 0" type="text" disabled>未参加
</el-button>
<el-button v-if="scope.row.status !== 2 && scope.row.stuState === 0" type="text"
@click="entry(scope.row)" :disabled="scope.row.status !== 1">进入
</el-button>
<el-button v-if="scope.row.status === 1 && scope.row.stuState === 2" type="text" disabled>已提交
</el-button>
<el-button v-if="scope.row.status === 2 && scope.row.stuState === 2" type="text"
@click="show(scope.row)">查看成绩
</el-button>
</template>
</el-table-column>
</el-table>
@ -154,7 +160,7 @@ export default {
endTime: "",
status: "",
systemId: "",
classId: "",
classId: ""
},
keyword: "",
dateList: [
@ -181,8 +187,8 @@ export default {
icVisible: false,
invitationCode: "",
searchTimer: null,
timerList: [],
curRow: {}
curRow: {},
ticker: null //
};
},
computed: {
@ -217,71 +223,85 @@ export default {
}
},
mounted() {
//
this.$once("hook:beforeDestroy", function() {
clearInterval(this.ticker);
this.ticker = null;
});
this.getData();
this.getCourseData();
this.getClassData();
this.$once("hook:beforeDestroy", function() {
this.timerList.forEach((n, k) => {
clearInterval(n);
});
this.timerList = [];
});
},
directives: {
countdown: {
bind: function(el, binding, vnode) {
let that = vnode.context;
let time = binding.value;
let timer = setInterval(() => {
let timeList = time.split(":");
let total = Number.parseInt(timeList[0] * 60 * 60) + Number.parseInt(timeList[1] * 60) + Number.parseInt(timeList[2]);
if (total > 0) {
--total;
let hours = Math.floor(total / (60 * 60));
let minutes = Math.floor(total % (60 * 60) / 60);
let seconds = Math.floor(total % (60 * 60) % 60);
time = `${util.formateTime(hours)}:${util.formateTime(minutes)}:${util.formateTime(seconds)}`;
} else {
clearInterval(timer);
}
el.innerHTML = time;
}, 1000);
that.timerList.push(timer);
filters: {
timeFilter(countDown) {
if (countDown > 0) {
let h = Math.floor(countDown / (60 * 60));
let m = Math.floor(countDown % (60 * 60) / 60);
let s = Math.floor(countDown % (60 * 60) % 60);
return `${h > 9 ? h : `0${h}`}:${m > 9 ? m : `0${m}`}:${s > 9 ? s : `0${s}`}`;
} else {
return "00:00:00";
}
}
},
methods: {
getCourseData () {
beginTimer() {
this.ticker = setInterval(() => {
for (let i = 0; i < this.listData.length; i++) {
const item = this.listData[i];
if (item.countDown > 0) {
item.countDown = item.countDown - 1;
}
this.$set(this.listData, i, item);
}
}, 1000);
},
getData() {
if (this.ticker) {
clearInterval(this.ticker);
}
let data = {
...this.form,
pageNum: this.page,
pageSize: this.pageSize
};
this.$post(this.api.pageStuAssessment, data).then(res => {
if (res.status === 200 && res.list && res.list.length) {
this.listData = res.list;
this.totals = res.total;
this.listData.forEach(i => {
if (i.status === 2) { //
i.countDown = 0;
} else if (i.status === 1) { //
i.countDown = (new Date(i.stopTime).getTime() - new Date().getTime()) / 1000;
} else if (i.status === 0) { //
i.countDown = (new Date(i.startTime).getTime() - new Date().getTime()) / 1000; //
}
});
this.beginTimer();
}
}).catch(err => {});
},
initData() {
this.page = 1;
this.getData();
},
getCourseData() {
this.$get(this.api.getPythonSysByStuAccountId).then(res => {
this.courseList = res.list;
}).catch(err => {
});
},
getClassData () {
getClassData() {
this.$post(this.api.myClassByStudent).then(res => {
if (res.status === 200) {
this.classList = res.data;
} else {
util.errorMsg(res.message);
}
}).catch(err => {});
},
getData() {
let data = {
...this.form,
pageNum: this.page,
pageSize: this.pageSize,
};
this.$post(this.api.pageStuAssessment, data).then(res => {
this.listData = res.list;
this.totals = res.page.totalCount;
}).catch(err => {
});
},
initData() {
this.page = 1;
this.getData();
},
handleCurrentChange(val) { //
this.page = val;
this.getData();
@ -293,7 +313,7 @@ export default {
return util.warningMsg("该实验已经结束");
} else {
this.curRow = row;
if (row.isCode == 1) {
if (row.isCode === 0) { // (0 1)
this.goSubSystem();
} else {
this.$get(this.api.checkInvitationCode, {

@ -7,6 +7,12 @@
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<div class="flex-between m-b-20">
<div></div>
<div>
<el-button round type="primary" @click="exportData">导出</el-button>
</div>
</div>
<el-table
ref="table"
class="table"
@ -16,12 +22,13 @@
:data="listData"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column prop="id" label="次序" width="120" align="center" type="index"></el-table-column>
<el-table-column prop="projectName" label="实验项目名称" align="center"></el-table-column>
<el-table-column prop="score" label="得分" align="center"></el-table-column>
<el-table-column prop="duration" label="耗时" align="center"></el-table-column>
<el-table-column prop="timeSum" label="耗时" align="center"></el-table-column>
<el-table-column prop="startTime" label="起始时间" align="center"></el-table-column>
<el-table-column prop="endTime" label="结束时间" align="center"></el-table-column>
<el-table-column prop="submitTime" label="结束时间" align="center"></el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="toReport(scope.row)">实验报告</el-button>
@ -45,34 +52,42 @@
export default {
data() {
return {
listData: [
{id: 1, name: 111},
{id: 2, name: 222},
{id: 3, name: 333}
],
curriculumId: this.$route.query.curriculumId,
projectId: this.$route.query.projectId,
listData: [],
total: 0,
page: 1,
pageSize: 10,
multipleSelection: [],
}
},
mounted() {
this.getData();
},
methods: {
goBack() {
this.$router.back();
},
getData() {
this.$post(`${this.api.practiceByStudentDetail}?curriculumId=${this.curriculumId}&projectId=${this.projectId}&pageNum=${this.page}&pageSize=${this.pageSize}`).then(res => {
this.listData = res.data.records;
this.total = res.data.total;
}).catch(err => {});
},
initData() {
this.page = 1;
handleCurrentChange(val) { //
this.page = val;
this.getData();
},
handleSelectionChange(val) { //
this.multipleSelection = val;
},
handleCurrentChange(val) { //
this.page = val;
this.getData();
exportData() { //
if (this.multipleSelection.length) {
let ids = this.multipleSelection.map(i => i.reportId);
location.href = `${this.api.exportPracticeByStudentDetail}?ids=${ids.toString()}`;
} else {
location.href = `${this.api.exportPracticeByStudentDetail}?ids=`;
}
},
tableRowStyle({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) {

@ -9,18 +9,18 @@
stripe
>
<el-table-column prop="id" label="次序" width="120" align="center" type="index"></el-table-column>
<el-table-column prop="experimentalName" label="课程名称" align="center"></el-table-column>
<el-table-column prop="curriculumName" label="课程名称" align="center"></el-table-column>
<el-table-column prop="experimentalName" label="考核名称" align="center"></el-table-column>
<el-table-column prop="projectName" label="实验项目名称" align="center"></el-table-column>
<el-table-column prop="score" label="得分" align="center"></el-table-column>
<el-table-column prop="className" label="实验班级" align="center"></el-table-column>
<el-table-column prop="duration" label="耗时" align="center">
<el-table-column prop="timeSum" label="耗时" align="center">
<template slot-scope="scope">
{{ scope.row.duration }}
{{ scope.row.timeSum }}
</template>
</el-table-column>
<el-table-column prop="startTime" label="起始时间" align="center"></el-table-column>
<el-table-column prop="endTime" label="结束时间" align="center"></el-table-column>
<el-table-column prop="submitTime" label="结束时间" align="center"></el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="toReport(scope.row)">实验成绩报告</el-button>
@ -34,12 +34,8 @@
</template>
<script>
import { mapState, mapActions } from "vuex";
import util from "@/libs/util";
import Setting from "@/setting";
export default {
props: ["systemId"],
props: ["curriculumId"],
data() {
return {
listData: [],
@ -48,18 +44,18 @@ export default {
total: 0
};
},
computed: {
...mapState("user", [
"userId"
])
watch: {
curriculumId: function(val) {
this.initData();
}
},
mounted() {
this.getData();
if (this.curriculumId) {
this.page = 1;
this.getData();
}
},
methods: {
...mapActions("project", [
"setSystemId"
]),
tableRowStyle({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) {
return "background-color: #FFF";
@ -75,14 +71,13 @@ export default {
this.$post(this.api.queryAssessmentByStudent, {
pageNum: this.page,
pageSize: this.pageSize,
systemId: this.systemId
curriculumId: this.curriculumId
}).then(res => {
this.listData = res.page.records;
this.total = res.page.total;
}).catch(err => {});
},
toReport(row) {
this.setSystemId(this.systemId);
this.$router.push(`show?id=${row.id}&recordId=${row.recordid}&reportId=${row.reportId}`);
}
}

@ -39,30 +39,27 @@
<ul class="filter" style="flex: 0 1 auto;">
<li style="margin-right: 0">
<label>课程选择</label>
<el-select size="small" v-model="systemId">
<el-select v-model="curriculumId">
<el-option
v-for="item in systemList"
:key="item.value"
:label="item.label"
:value="item.id"
v-for="item in curriculumList"
:key="item.cid"
:label="item.curriculumName"
:value="item.cid"
></el-option>
</el-select>
<el-button style="margin-left: 10px;" size="small" round type="primary" @click="exportData">导出
</el-button>
<el-button style="margin-left: 20px;" size="small" round type="primary" @click="exportData">导出</el-button>
</li>
</ul>
</div>
<practice v-if="active == 'practice'" :systemId.sync="systemId" :key="systemId"></practice>
<ass v-else :systemId.sync="systemId" :key="systemId"></ass>
<practice v-if="active == 'practice'" :curriculumId.sync="curriculumId" :key="curriculumId"></practice>
<ass v-else :curriculumId.sync="curriculumId" :key="curriculumId"></ass>
</div>
</div>
</template>
<script>
import { mapState, mapActions } from "vuex";
import util from "@/libs/util";
import Setting from "@/setting";
import practice from "./practice";
import ass from "./ass";
@ -73,8 +70,8 @@ export default {
},
data() {
return {
systemId: Setting.systemId,
systemList: Setting.systemList,
curriculumId: "",
curriculumList: [],
overview: {},
active: "practice",
tabList: {
@ -84,22 +81,29 @@ export default {
};
},
computed: {
...mapState("user", [
"userId"
]),
...mapState("project", [
"lastRecordType", "lastSystemId"
"lastRecordType"
])
},
mounted() {
this.systemId = this.lastSystemId ? this.lastSystemId : Setting.systemId;
this.active = this.lastRecordType ? this.lastRecordType : "practice";
this.getData();
this.getschoolCourse();
},
methods: {
...mapActions("user", [
"setRecord"
]),
getschoolCourse() { //
this.$get(this.api.schoolCourse).then(res => {
if (res.data && res.data.length) {
this.curriculumList = res.data;
this.curriculumId = this.curriculumList[0].cid;
}
}).catch(err => {
console.log(err);
});
},
getData() { //
this.$get(this.api.experimentOverview).then(res => {
this.overview = res.data;

@ -3,7 +3,7 @@
<el-table :cell-style="tableRowStyle" :header-cell-style="{background:'#9278FF',color:'#FFFFFF'}"
:data="listData" stripe>
<el-table-column prop="id" label="次序" width="120" align="center" type="index"></el-table-column>
<el-table-column prop="projectName" label="课程名称" align="center"></el-table-column>
<el-table-column prop="curriculumName" label="课程名称" align="center"></el-table-column>
<el-table-column prop="projectName" label="实验项目名称" align="center"></el-table-column>
<el-table-column prop="hightScore" label="实验最高得分" align="center"></el-table-column>
<el-table-column prop="practiceNum" label="练习次数" align="center"></el-table-column>
@ -23,12 +23,9 @@
</template>
<script>
import { mapState, mapActions } from "vuex";
import util from "@/libs/util";
import Setting from "@/setting";
export default {
props: ["systemId"],
props: ["curriculumId"],
data() {
return {
listData: [],
@ -37,18 +34,18 @@ export default {
total: 0
};
},
computed: {
...mapState("user", [
"userId"
])
watch: {
curriculumId: function(val) {
this.initData();
}
},
mounted() {
this.getData();
if (this.curriculumId) {
this.page = 1;
this.getData();
}
},
methods: {
...mapActions("project", [
"setSystemId"
]),
tableRowStyle({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) {
return "background-color: #FFF";
@ -64,14 +61,14 @@ export default {
this.$post(this.api.queryPracticeByStudent, {
pageNum: this.page,
pageSize: this.pageSize,
systemId: this.systemId
curriculumId: this.curriculumId
}).then(res => {
this.listData = res.page.records;
this.total = res.page.total;
}).catch(err => {});
},
toDetails(row) {
this.$router.push(`/record/details?id=${row.recordId}`);
this.$router.push(`/record/details?curriculumId=${this.curriculumId}&projectId=${row.projectId}`);
}
}
};

@ -5,11 +5,11 @@
<input type="text" placeholder="请输入关键词" v-model="keyword">
<button>搜索</button>
</div>
<div class="wrap" :class="isHh ? 'isHh' : (isBeta ? '' : 'isOccu')">
<template v-for="(item,index) in systemList">
<a class="item" @click="goPreview(item)" :key="index" v-if="!keyword || item.name.includes(keyword)">
<img :src="item.imgSrc" alt="">
<p class="text" v-html="item.name"></p>
<div class="wrap">
<template v-for="(item,index) in curriculumList">
<a class="item" @click="goPreview(item)" :key="index" v-if="!keyword || item.curriculumName.includes(keyword)">
<img :src="item.coverUrl" alt="">
<p class="text" v-html="item.curriculumName"></p>
</a>
</template>
</div>
@ -17,144 +17,28 @@
</template>
<script>
import { mapState, mapActions } from "vuex";
import util from "@/libs/util";
import Setting from "@/setting";
export default {
name: "backstage",
data() {
return {
host: Setting.apiBaseURL,
isHh: Setting.isHh,
isBeta: Setting.isBeta,
keyword: "",
searchTimer: null,
systemList: Setting.isHh ? [{
id: 1,
imgSrc: require("@/assets/img/station1.png"),
name: "Python程序设计<br>教学系统"
}, {
id: 4,
imgSrc: require("@/assets/img/station2.png"),
name: "经济金融建模<br>实验教学系统"
},
{
id: 6,
imgSrc: require("@/assets/img/station8.png"),
name: "金融随机过程<br>实验教学系统"
}, {
id: 7,
imgSrc: require("@/assets/img/station9.png"),
name: "量化投资策略建模<br>实验教学系统"
}, {
id: 8,
imgSrc: require("@/assets/img/station10.png"),
name: "大数据分析<br>实验教学系统"
}]
:
(Setting.isBeta ? [{
id: 1,
imgSrc: require("@/assets/img/station1.png"),
name: "Python程序设计<br>教学系统"
}, {
id: 4,
imgSrc: require("@/assets/img/station2.png"),
name: "经济金融建模<br>实验教学系统"
}, {
id: 5,
imgSrc: require("@/assets/img/station3.png"),
name: "Python可视化<br>实验教学系统"
}, {
id: 6,
imgSrc: require("@/assets/img/station8.png"),
name: "金融随机过程<br>实验教学系统"
}, {
id: 7,
imgSrc: require("@/assets/img/station9.png"),
name: "量化投资策略建模<br>实验教学系统"
}, {
id: 8,
imgSrc: require("@/assets/img/station10.png"),
name: "大数据分析<br>实验教学系统"
}, {
id: 9,
imgSrc: require("@/assets/img/station11.png"),
name: "Python数据清洗<br>教学实验系统"
}, {
id: 10,
imgSrc: require("@/assets/img/station12.png"),
name: "Python数据采集(爬虫)<br>教学实验系统"
}, {
id: 21,
imgSrc: require("@/assets/img/station4.png"),
name: "数字货币交易"
},
{
id: 22,
imgSrc: require("@/assets/img/station6.png"),
name: "担保实训教学系统"
}
// {
// imgSrc: require('@/assets/img/station5.png'),
// name: ''
// },
// {
// imgSrc: require('@/assets/img/station7.png'),
// name: ''
// },
]
:
[{
id: 1,
imgSrc: require("@/assets/img/station1.png"),
name: "Python程序设计<br>教学系统"
}, {
id: 4,
imgSrc: require("@/assets/img/station2.png"),
name: "经济金融建模<br>实验教学系统"
}, {
id: 5,
imgSrc: require("@/assets/img/station3.png"),
name: "Python可视化<br>实验教学系统"
}, {
id: 6,
imgSrc: require("@/assets/img/station8.png"),
name: "金融随机过程<br>实验教学系统"
}, {
id: 7,
imgSrc: require("@/assets/img/station9.png"),
name: "量化投资策略建模<br>实验教学系统"
}, {
id: 8,
imgSrc: require("@/assets/img/station10.png"),
name: "大数据分析<br>实验教学系统"
}, {
id: 9,
imgSrc: require("@/assets/img/station11.png"),
name: "Python数据清洗<br>教学实验系统"
}, {
id: 10,
imgSrc: require("@/assets/img/station12.png"),
name: "Python数据采集(爬虫)<br>教学实验系统"
}])
};
},
computed: {
...mapState("user", [
"userId", "schoolId", "studentId", "roleId", "userName"
])
curriculumList: []
}
},
mounted() {
util.getToken();
console.log(this.host, "host");
this.getschoolCourse();
},
methods: {
getschoolCourse() { //
this.$get(this.api.schoolCourse).then(res => {
this.curriculumList = res.data;
}).catch(err => {
console.log(err);
});
},
goPreview(item) {
let systemName = item.name.replace("<br>","")
this.$router.push(`/station/preview?systemId=${item.id}&systemName=${systemName}`);
// let systemName = item.name.replace("<br>","")
this.$router.push(`/station/preview?systemId=${item.cid}&systemName=${item.curriculumName}`);
},
}
};

Loading…
Cancel
Save