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`,// 验证码图片 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`, // 查询是否能够开启实验 canExperiment: `${host}occupationlab/occupationlab/evaluationrecord/can_experiment`, // 查询是否能够开启实验
@ -31,6 +27,16 @@ export default {
experimentStart: `${host}occupationlab/occupationlab/evaluationrecord/start`, // 开始测评 experimentStart: `${host}occupationlab/occupationlab/evaluationrecord/start`, // 开始测评
experimentSubmit: `${host}occupationlab/occupationlab/evaluationrecord/submit`, // 提交测评 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`, // 学生端——学生考核列表 pageStuAssessment: `${host}occupationlab/assessment/pageStuAssessment`, // 学生端——学生考核列表
getPythonSysByStuAccountId: `${host}occupationlab/assessment/getPythonSysByStuAccountId`, // 学生端——课程名称 getPythonSysByStuAccountId: `${host}occupationlab/assessment/getPythonSysByStuAccountId`, // 学生端——课程名称

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

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

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

@ -7,6 +7,12 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="m-b-20"> <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 <el-table
ref="table" ref="table"
class="table" class="table"
@ -16,12 +22,13 @@
:data="listData" :data="listData"
@selection-change="handleSelectionChange" @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="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="projectName" label="实验项目名称" align="center"></el-table-column>
<el-table-column prop="score" 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="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"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="toReport(scope.row)">实验报告</el-button> <el-button type="text" @click="toReport(scope.row)">实验报告</el-button>
@ -45,34 +52,42 @@
export default { export default {
data() { data() {
return { return {
listData: [ curriculumId: this.$route.query.curriculumId,
{id: 1, name: 111}, projectId: this.$route.query.projectId,
{id: 2, name: 222}, listData: [],
{id: 3, name: 333}
],
total: 0, total: 0,
page: 1, page: 1,
pageSize: 10, pageSize: 10,
multipleSelection: [], multipleSelection: [],
} }
}, },
mounted() {
this.getData();
},
methods: { methods: {
goBack() { goBack() {
this.$router.back(); this.$router.back();
}, },
getData() { 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() { handleCurrentChange(val) { //
this.page = 1; this.page = val;
this.getData(); this.getData();
}, },
handleSelectionChange(val) { // handleSelectionChange(val) { //
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange(val) { // exportData() { //
this.page = val; if (this.multipleSelection.length) {
this.getData(); 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 }) { tableRowStyle({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) { if (rowIndex % 2 === 0) {

@ -9,18 +9,18 @@
stripe stripe
> >
<el-table-column prop="id" label="次序" width="120" align="center" type="index"></el-table-column> <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="experimentalName" label="考核名称" align="center"></el-table-column>
<el-table-column prop="projectName" 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="score" label="得分" align="center"></el-table-column>
<el-table-column prop="className" 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"> <template slot-scope="scope">
{{ scope.row.duration }} {{ scope.row.timeSum }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="startTime" 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"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="toReport(scope.row)">实验成绩报告</el-button> <el-button type="text" @click="toReport(scope.row)">实验成绩报告</el-button>
@ -34,12 +34,8 @@
</template> </template>
<script> <script>
import { mapState, mapActions } from "vuex";
import util from "@/libs/util";
import Setting from "@/setting";
export default { export default {
props: ["systemId"], props: ["curriculumId"],
data() { data() {
return { return {
listData: [], listData: [],
@ -48,18 +44,18 @@ export default {
total: 0 total: 0
}; };
}, },
computed: { watch: {
...mapState("user", [ curriculumId: function(val) {
"userId" this.initData();
]) }
}, },
mounted() { mounted() {
this.getData(); if (this.curriculumId) {
this.page = 1;
this.getData();
}
}, },
methods: { methods: {
...mapActions("project", [
"setSystemId"
]),
tableRowStyle({ row, column, rowIndex, columnIndex }) { tableRowStyle({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) { if (rowIndex % 2 === 0) {
return "background-color: #FFF"; return "background-color: #FFF";
@ -75,14 +71,13 @@ export default {
this.$post(this.api.queryAssessmentByStudent, { this.$post(this.api.queryAssessmentByStudent, {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
systemId: this.systemId curriculumId: this.curriculumId
}).then(res => { }).then(res => {
this.listData = res.page.records; this.listData = res.page.records;
this.total = res.page.total; this.total = res.page.total;
}).catch(err => {}); }).catch(err => {});
}, },
toReport(row) { toReport(row) {
this.setSystemId(this.systemId);
this.$router.push(`show?id=${row.id}&recordId=${row.recordid}&reportId=${row.reportId}`); 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;"> <ul class="filter" style="flex: 0 1 auto;">
<li style="margin-right: 0"> <li style="margin-right: 0">
<label>课程选择</label> <label>课程选择</label>
<el-select size="small" v-model="systemId"> <el-select v-model="curriculumId">
<el-option <el-option
v-for="item in systemList" v-for="item in curriculumList"
:key="item.value" :key="item.cid"
:label="item.label" :label="item.curriculumName"
:value="item.id" :value="item.cid"
></el-option> ></el-option>
</el-select> </el-select>
<el-button style="margin-left: 10px;" size="small" round type="primary" @click="exportData">导出 <el-button style="margin-left: 20px;" size="small" round type="primary" @click="exportData">导出</el-button>
</el-button>
</li> </li>
</ul> </ul>
</div> </div>
<practice v-if="active == 'practice'" :systemId.sync="systemId" :key="systemId"></practice> <practice v-if="active == 'practice'" :curriculumId.sync="curriculumId" :key="curriculumId"></practice>
<ass v-else :systemId.sync="systemId" :key="systemId"></ass> <ass v-else :curriculumId.sync="curriculumId" :key="curriculumId"></ass>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import util from "@/libs/util";
import Setting from "@/setting";
import practice from "./practice"; import practice from "./practice";
import ass from "./ass"; import ass from "./ass";
@ -73,8 +70,8 @@ export default {
}, },
data() { data() {
return { return {
systemId: Setting.systemId, curriculumId: "",
systemList: Setting.systemList, curriculumList: [],
overview: {}, overview: {},
active: "practice", active: "practice",
tabList: { tabList: {
@ -84,22 +81,29 @@ export default {
}; };
}, },
computed: { computed: {
...mapState("user", [
"userId"
]),
...mapState("project", [ ...mapState("project", [
"lastRecordType", "lastSystemId" "lastRecordType"
]) ])
}, },
mounted() { mounted() {
this.systemId = this.lastSystemId ? this.lastSystemId : Setting.systemId;
this.active = this.lastRecordType ? this.lastRecordType : "practice"; this.active = this.lastRecordType ? this.lastRecordType : "practice";
this.getData(); this.getData();
this.getschoolCourse();
}, },
methods: { methods: {
...mapActions("user", [ ...mapActions("user", [
"setRecord" "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() { // getData() { //
this.$get(this.api.experimentOverview).then(res => { this.$get(this.api.experimentOverview).then(res => {
this.overview = res.data; this.overview = res.data;

@ -3,7 +3,7 @@
<el-table :cell-style="tableRowStyle" :header-cell-style="{background:'#9278FF',color:'#FFFFFF'}" <el-table :cell-style="tableRowStyle" :header-cell-style="{background:'#9278FF',color:'#FFFFFF'}"
:data="listData" stripe> :data="listData" stripe>
<el-table-column prop="id" label="次序" width="120" align="center" type="index"></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="curriculumName" label="课程名称" align="center"></el-table-column>
<el-table-column prop="projectName" 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="hightScore" label="实验最高得分" align="center"></el-table-column>
<el-table-column prop="practiceNum" label="练习次数" align="center"></el-table-column> <el-table-column prop="practiceNum" label="练习次数" align="center"></el-table-column>
@ -23,12 +23,9 @@
</template> </template>
<script> <script>
import { mapState, mapActions } from "vuex";
import util from "@/libs/util";
import Setting from "@/setting";
export default { export default {
props: ["systemId"], props: ["curriculumId"],
data() { data() {
return { return {
listData: [], listData: [],
@ -37,18 +34,18 @@ export default {
total: 0 total: 0
}; };
}, },
computed: { watch: {
...mapState("user", [ curriculumId: function(val) {
"userId" this.initData();
]) }
}, },
mounted() { mounted() {
this.getData(); if (this.curriculumId) {
this.page = 1;
this.getData();
}
}, },
methods: { methods: {
...mapActions("project", [
"setSystemId"
]),
tableRowStyle({ row, column, rowIndex, columnIndex }) { tableRowStyle({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) { if (rowIndex % 2 === 0) {
return "background-color: #FFF"; return "background-color: #FFF";
@ -64,14 +61,14 @@ export default {
this.$post(this.api.queryPracticeByStudent, { this.$post(this.api.queryPracticeByStudent, {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
systemId: this.systemId curriculumId: this.curriculumId
}).then(res => { }).then(res => {
this.listData = res.page.records; this.listData = res.page.records;
this.total = res.page.total; this.total = res.page.total;
}).catch(err => {}); }).catch(err => {});
}, },
toDetails(row) { 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"> <input type="text" placeholder="请输入关键词" v-model="keyword">
<button>搜索</button> <button>搜索</button>
</div> </div>
<div class="wrap" :class="isHh ? 'isHh' : (isBeta ? '' : 'isOccu')"> <div class="wrap">
<template v-for="(item,index) in systemList"> <template v-for="(item,index) in curriculumList">
<a class="item" @click="goPreview(item)" :key="index" v-if="!keyword || item.name.includes(keyword)"> <a class="item" @click="goPreview(item)" :key="index" v-if="!keyword || item.curriculumName.includes(keyword)">
<img :src="item.imgSrc" alt=""> <img :src="item.coverUrl" alt="">
<p class="text" v-html="item.name"></p> <p class="text" v-html="item.curriculumName"></p>
</a> </a>
</template> </template>
</div> </div>
@ -17,144 +17,28 @@
</template> </template>
<script> <script>
import { mapState, mapActions } from "vuex";
import util from "@/libs/util";
import Setting from "@/setting";
export default { export default {
name: "backstage", name: "backstage",
data() { data() {
return { return {
host: Setting.apiBaseURL,
isHh: Setting.isHh,
isBeta: Setting.isBeta,
keyword: "", keyword: "",
searchTimer: null, curriculumList: []
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"
])
}, },
mounted() { mounted() {
util.getToken(); this.getschoolCourse();
console.log(this.host, "host");
}, },
methods: { methods: {
getschoolCourse() { //
this.$get(this.api.schoolCourse).then(res => {
this.curriculumList = res.data;
}).catch(err => {
console.log(err);
});
},
goPreview(item) { goPreview(item) {
let systemName = item.name.replace("<br>","") // let systemName = item.name.replace("<br>","")
this.$router.push(`/station/preview?systemId=${item.id}&systemName=${systemName}`); this.$router.push(`/station/preview?systemId=${item.cid}&systemName=${item.curriculumName}`);
}, },
} }
}; };

Loading…
Cancel
Save