实验报告导出等优化

UI_2022-02-10
yujialong 3 years ago
parent 00268f512f
commit 4e6fca85ad
  1. BIN
      src/assets/img/3.png
  2. BIN
      src/assets/img/cup.png
  3. BIN
      src/assets/img/date.png
  4. BIN
      src/assets/img/edit.png
  5. BIN
      src/assets/img/idcard.png
  6. BIN
      src/assets/img/login-bg.png
  7. BIN
      src/assets/img/login_icon_close.png
  8. BIN
      src/assets/img/open.png
  9. BIN
      src/assets/img/point.png
  10. BIN
      src/assets/img/school.png
  11. BIN
      src/assets/img/select.png
  12. 4
      src/pages/account/login/index.vue
  13. 6
      src/pages/course/details/index.vue
  14. 3
      src/pages/devPlatform/list/index.vue
  15. 41
      src/pages/index/list/index.vue
  16. 6
      src/pages/info/details/index.vue
  17. 10
      src/pages/match/details/index.vue
  18. 48
      src/pages/record/show/index.vue
  19. 11
      src/pages/station/preview/index.vue
  20. 4
      src/styles/common.scss
  21. BIN
      src/styles/font/din.otf

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 908 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

@ -15,11 +15,11 @@
<li v-for="(item,index) in tabList" :key="index" :class="{active: form.distinguish == item.id}" @click="typeClick(item)">{{item.label}}</li>
</ul>
<el-form :model="form" :rules="loginRules" ref="form" style="margin-top: 20px">
<el-form-item v-if="form.distinguish === '1'" prop="account">
<el-form-item v-if="form.distinguish == '1'" prop="account">
<label class="account"></label>
<el-input v-model.trim="form.account" placeholder="请输入账号"></el-input>
</el-form-item>
<el-form-item v-if="form.distinguish === '2'" prop="account">
<el-form-item v-if="form.distinguish == '2'" prop="account">
<label class="account"></label>
<el-input v-model.trim="form.account" placeholder="请输入手机号/邮箱"></el-input>
</el-form-item>

@ -1,6 +1,6 @@
<template>
<div class="wrap pb">
<breadcrumb :data="'课程学习/' + courseName"></breadcrumb>
<breadcrumb ref="breadcrumb" :data="'课程学习/' + courseName"></breadcrumb>
<div class="flex">
<div class="cover" :class="{'is-word': showMask1}">
<img v-if="coverUrl" :src="coverUrl" alt="" width="100%" height="100%">
@ -118,14 +118,12 @@ export default {
this.getChapter()
},
methods: {
goBack() {
this.$router.back();
},
async getData(){
let res = await this.$get(`${this.api.getCourseById}/${this.id}`)
this.courseName = res.course.name
this.description = res.course.description
this.coverUrl = res.course.coverUrl
this.$refs.breadcrumb.update('课程学习/' + this.courseName)
},
async getChapter(){
let res = await this.$get(`${this.api.queryChaptersAndSubsections}/${this.id}`)

@ -110,7 +110,7 @@ export default {
margin: 0 auto;
}
.about {
margin-top: -60px;
margin: -60px 0 20px;
.inner {
padding: 40px 0 60px;
text-align: center;
@ -187,6 +187,7 @@ export default {
}
}
.profit {
margin-bottom: 70px;
text-align: center;
.item1 {
line-height: 250px;

@ -48,8 +48,13 @@
</ul>
<!-- 关于 -->
<div class="about" id="part1">
<div class="inner">
<div class="inner" style="padding-bottom: 0">
<h6 class="i-title">关于职站</h6>
<p class="en">ABOUT OCCUPATION LAB</p>
</div>
</div>
<div class="about bg-white">
<div class="inner">
<div class="desc">职站是一款辅助院校教师开展虚拟仿真实验教学的智能云实践平台极简的平台操作可帮助老师轻松开展实验教学并支持自定义发布考核和练习检验学生的日常实训练习效果老师还可以通过可视化图表报告直观查看学生实训成绩评估教学效果</div>
</div>
</div>
@ -60,6 +65,7 @@
<img src="@/assets/img/index/index10.png" alt="" class="shape shape3">
<div class="inner">
<h6 class="i-title">特色与优势</h6>
<p class="en">FEATURES AND ADVANTAGES</p>
<ul class="list">
<li>
<img src="@/assets/img/index/index3.png" alt="">
@ -83,6 +89,7 @@
<div class="product" id="part3">
<div class="inner">
<h6 class="i-title">平台产品介绍</h6>
<p class="en">PRODUCT DISPLAY</p>
<div class="pics">
<div class="text">
<img src="@/assets/img/index/index11.png" alt="" class="icon">
@ -127,11 +134,17 @@ export default {
name: 'index',
data() {
return {
token: util.local.get(Setting.tokenKey)
token: util.local.get(Setting.tokenKey),
active: ''
}
},
mounted() {},
methods: {}
methods: {
toPart(i){
this.active = i
document.querySelector(`#part${i}`).scrollIntoView()
}
}
};
</script>
@ -164,6 +177,7 @@ export default {
height: 100%;
}
.i-title{
z-index: 1;
position: relative;
margin-bottom: 37px;
font-size: 30px;
@ -211,10 +225,22 @@ export default {
}
}
.inner{
position: relative;
width: 1200px;
padding: 67px 0;
margin: 0 auto;
}
.en {
position: absolute;
top: 77px;
left: 50%;
width: 100%;
text-align: center;
font-size: 28px;
font-family: PingFangSC-Semibold, PingFang SC;
color: #E5EBF1;
transform: translate(-50%);
}
.about{
.inner{
padding: 67px;
@ -236,7 +262,7 @@ export default {
}
.shape1{
top: 25px;
right: 0;
right: 10px;
}
.shape2{
bottom: 30px;
@ -309,11 +335,4 @@ export default {
}
}
}
/deep/.preview-dia{
padding: 20px;
.preview-wrap{
height: calc(100vh - 80px);
overflow: auto;
}
}
</style>

@ -1,6 +1,6 @@
<template>
<div class="wrap">
<breadcrumb :data="breadcrumbTitle"></breadcrumb>
<breadcrumb ref="breadcrumb" data="资讯"></breadcrumb>
<div class="page">
<h6 class="title">{{title}}</h6>
<div class="metas">
@ -30,7 +30,6 @@ export default {
firstName: this.$route.query.first,
secondName: this.$route.query.second,
id: this.$route.query.id,
breadcrumbTitle: this.$route.query.first + '/',
coverUrl: '',
author: '',
date: '',
@ -58,9 +57,8 @@ export default {
this.title = data.title
this.content = data.content
this.viewCount = data.viewCount
this.breadcrumbTitle = this.firstName + '/' + this.title
this.$forceUpdate()
console.log(33, this.breadcrumbTitle)
this.$refs.breadcrumb.update(this.firstName + '/' + this.title)
this.loadIns.close()
})
.catch(err => {

@ -2,12 +2,7 @@
<div class="wrap index">
<div class="banner" :style="{backgroundImage: coverUrlComputed}"></div>
<div class="center-wrap">
<breadcrumb :data="'全部赛事/' + title"></breadcrumb>
<!-- <div class="nav">
<div class="sidebar">
<div class="item" :class="{ active: curType === item.id }" v-for="(item, index) in typeList" :key="index" @click="tabChange(item.id)">{{item.name}}</div>
</div>
</div> -->
<breadcrumb ref="breadcrumb" :data="'全部赛事/' + title"></breadcrumb>
<div class="content">
<div class="flex-between">
<el-tabs v-model="curType">
@ -82,7 +77,8 @@ export default {
this.description = data.description
this.title = data.name
this.gmtModified = data.gmtModified
}).catch(err => {});
this.$refs.breadcrumb.update('全部赛事/' + data.name)
}).catch(err => {})
},
getProgress() { //
this.$get(this.api.getContestProgress + '/' + this.id).then(res => {

@ -3,8 +3,8 @@
<div class="wrap">
<breadcrumb data="实验记录/实验情况/实验情况"></breadcrumb>
<div class="content" :class="{loading}" id="pdfDom">
<div class="text-right">
<el-button v-if="!loading" @click="editReport">
<div class="text-right" v-if="!loading">
<el-button @click="editReport">
{{ editing ? "保存" : "编辑" }}
</el-button>
<el-button type="primary" @click="exportPage">导出报告</el-button>
@ -34,7 +34,10 @@
<li>
<label>实验成绩</label>
<el-input v-if="editing" v-model="infoData.score" disabled></el-input>
<span v-else>{{ infoData.score }}</span>
<div v-else class="score-wrap">
<em>{{ infoData.score }}</em>
<img src="@/assets/img/point.png" alt="">
</div>
</li>
<li>
<label>学生班级</label>
@ -169,9 +172,6 @@ export default {
this.getData();
},
methods: {
goBack() { //
this.$router.go(-1);
},
getData() { //
this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`).then(res => {
this.form = res.report
@ -191,11 +191,12 @@ export default {
}).catch(res => {})
},
exportPage() { //
document.querySelector("body").setAttribute("style", "overflow: visible");
this.loading = true;
this.loadIns = Loading.service({
background: "#fff"
});
const edit = this.editing // false
this.editing = false
document.querySelector("#pdfDom").scrollTop = 0;
var title = this.title;
let dom = document.querySelector("#pdfDom");
@ -206,11 +207,11 @@ export default {
}).then((canvas) => {
let contentWidth = canvas.width;
let contentHeight = canvas.height;
let pageHeight = contentWidth / 592.28 * 841.89;
let imgWidth = 595.28
let pageHeight = contentWidth / imgWidth * 841.89;
let leftHeight = contentHeight;
let position = 0;
let imgWidth = 595.28;
let imgHeight = 592.28 / contentWidth * contentHeight;
let imgHeight = imgWidth / contentWidth * contentHeight;
let pageData = canvas.toDataURL("image/jpeg", 1.0);
let PDF = new JsPDF("", "pt", "a4");
if (leftHeight < pageHeight) {
@ -225,9 +226,9 @@ export default {
}
}
}
this.editing = edit
this.loadIns.close();
this.loading = false;
document.querySelector("body").setAttribute("style", "overflow: hidden");
PDF.save(title + ".pdf");
}
);
@ -252,6 +253,9 @@ export default {
</script>
<style lang="scss" scoped>
.wrap {
padding: 12px 300px 20px;
}
/deep/ pre, code, kbd, samp{
font-family: 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif;
word-wrap: break-word;
@ -264,8 +268,7 @@ export default {
padding: 16px 40px;
background: #fff;
&.loading {
height: auto;
overflow: visible;
padding-top: 30px;
}
.r-title {
margin-bottom: 40px;
@ -308,6 +311,25 @@ export default {
width: 174px;
}
}
.score-wrap {
position: relative;
min-width: 150px;
border-bottom: 1px solid #E1E6F2;
em {
position: absolute;
top: -12px;
left: 30px;
font-family: din;
font-size: 30px;
font-weight: 600;
color: #0B1D30;
}
img {
position: absolute;
bottom: -15px;
left: 0;
}
}
/deep/.el-textarea .el-textarea__inner, .pre-wrap {
min-height: 72px;
padding: 10px 16px;

@ -152,7 +152,6 @@ export default {
async getChapter() {
let res = await this.$get(`${this.api.curriculumChapter}/${this.courseId}`);
this.chapterList = res.chapterList;
console.log(res.chapterList);
if (this.chapterList.length && this.chapterList[0].subsectionList && this.chapterList[0].subsectionList.length) {
this.preview(this.chapterList[0].subsectionList[0], this.chapterList[0].name);
}
@ -182,7 +181,6 @@ export default {
},
preview(row, chapterName) {
this.curLink = `${chapterName}${row.name}`; // +
this.player = null;
this.playauth = "";
this.coverUrl = "";
this.pdfSrc = "";
@ -193,6 +191,11 @@ export default {
if (this.transferType(row.fileType) == "视频") {
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => {
this.playAuth = res.data.playAuth;
//
if (this.player) {
this.player.dispose()
this.player = null
}
this.$nextTick(() => {
if (this.player) {
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth);
@ -253,10 +256,6 @@ export default {
}).catch(err => {});
}
},
closePlayer() {
this.playAuth = "";
this.player.pause();
},
closeIframe() {
this.iframeSrc = "";
this.showMask = false;

@ -5,6 +5,10 @@
font-family: youshe;
src: url('font/YouSheBiaoTiHei.ttf');
}
@font-face {
font-family: din;
src: url('font/din.otf');
}
[v-cloak] {
display: none;

Binary file not shown.
Loading…
Cancel
Save