master V1.0.1
yujialong 3 years ago
parent 34edeb2af3
commit 740ece1e0a
  1. 12
      src/layouts/header/index.vue
  2. 3
      src/pages/assessment/list/studentTree.vue
  3. 22
      src/pages/testPaper/list/myTestPaper.vue
  4. 2
      src/setting.js

@ -8,19 +8,24 @@
<span class="username">{{userName}}</span> <span class="username">{{userName}}</span>
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="help">用户手册</el-dropdown-item>
<el-dropdown-item command="person">个人资料</el-dropdown-item> <el-dropdown-item command="person">个人资料</el-dropdown-item>
<el-dropdown-item command="logout">退出登录</el-dropdown-item> <el-dropdown-item command="logout">退出登录</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
<pdf :visible.sync="pdfVisible" :src.sync="pdfSrc"></pdf>
</div> </div>
</template> </template>
<script> <script>
import { mapState,mapActions } from 'vuex' import { mapState,mapActions } from 'vuex'
import Setting from '@/setting' import Setting from '@/setting'
import pdf from '@/components/pdf'
export default { export default {
data() { data() {
return { return {
pdfVisible: false,
pdfSrc: '',
showBackList: Setting.layout.hideNavList, showBackList: Setting.layout.hideNavList,
}; };
}, },
@ -34,6 +39,7 @@ export default {
return false return false
} }
}, },
components: { pdf },
mounted(){ mounted(){
}, },
@ -42,8 +48,10 @@ export default {
'logout' 'logout'
]), ]),
userCommand(command){ userCommand(command){
console.log(command) if(command == 'help'){
if(command == 'person'){ this.pdfVisible = true
this.pdfSrc = 'http://39.108.250.202/template/%E8%B6%85%E7%AB%9E%E6%95%B0%E5%AD%97%E5%8C%96%E8%80%83%E8%AF%95%E7%B3%BB%E7%BB%9F-%E6%93%8D%E4%BD%9C%E6%89%8B%E5%86%8C%EF%BC%88%E5%AD%A6%E6%A0%A1%E7%AE%A1%E7%90%86%E7%AB%AF%EF%BC%89.pdf'
}else if(command == 'person'){
this.$router.push('/setting/person') this.$router.push('/setting/person')
}else{ }else{
this.logout() this.logout()

@ -6,7 +6,7 @@
<div v-for="(item,index) in classList" :key="index"> <div v-for="(item,index) in classList" :key="index">
<div class="item" @click.stop="open(item)"> <div class="item" @click.stop="open(item)">
<i class="empty"></i> <i class="empty"></i>
<i :class="item.ischeck ? 'checked' : 'checkbox'" @click.stop="fircheckitem(item)"></i> <i :class="item.ischeck ? 'checked' : 'checkbox'" @click.stop="threecheckitem(item)"></i>
<span>{{item.label}}</span> <span>{{item.label}}</span>
</div> </div>
</div> </div>
@ -98,7 +98,6 @@ export default {
if(this.keyword){ if(this.keyword){
let list = this.allClassList let list = this.allClassList
let result = [] let result = []
list.map((n,i) => { list.map((n,i) => {
if(n.label.includes(this.keyword)) result.push(n) if(n.label.includes(this.keyword)) result.push(n)
}) })

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-dialog title="导出" :visible.sync="exportVisible" width="100%" :modal="false" v-loading="loading" top="5500px"> <el-dialog title="导出" :visible.sync="exportVisible" width="1800px" :modal="false" v-loading="loading" top="5500px">
<div class="testpaper" id="pdfDom"> <div class="testpaper" id="pdfDom">
<h1 class="title">{{paperName}}</h1> <h1 class="title">{{paperName}}</h1>
<ul class="types"> <ul class="types">
@ -169,9 +169,9 @@ function getUrlBase64(url, ext, callback) {
img.crossOrigin = 'Anonymous'; img.crossOrigin = 'Anonymous';
img.src = url; img.src = url;
img.onload = function () { img.onload = function () {
canvas.height = 300; //, canvas.width = 1400; //
canvas.width = 300; // canvas.height = 800; //,
ctx.drawImage(img, 0, 0, 300, 300); // ctx.drawImage(img, 0, 0, 1400, 800); //
var dataURL = canvas.toDataURL("image/" + ext); var dataURL = canvas.toDataURL("image/" + ext);
callback.call(this, dataURL); //Base64 callback.call(this, dataURL); //Base64
canvas = null; canvas = null;
@ -335,10 +335,9 @@ export default {
list[i].map(n => { list[i].map(n => {
let src = reg.exec(n.questionStem) let src = reg.exec(n.questionStem)
if(src){ if(src){
console.log(11,src,src[0],reg.lastIndex)
src = src[0].replace('<img src="','').replace('">','') src = src[0].replace('<img src="','').replace('">','')
getUrlBase64(src, 'jpg', function (base64) { getUrlBase64(src, 'jpg', function (base64) {
n.questionStem = n.questionStem.replace(reg,`<img width="300" src="${base64}">`) n.questionStem = n.questionStem.replace(reg,`<img width="1400" height="800" src="${base64}">`)
}) })
} }
}) })
@ -500,15 +499,14 @@ export default {
.title{ .title{
margin-bottom: 30px; margin-bottom: 30px;
text-align: center; text-align: center;
font-size: 30px; font-size: 29px;
font-weight: bold;
} }
.types{ .types{
&>li{ &>li{
margin-bottom: 30px; margin-bottom: 30px;
.type{ .type{
margin-bottom: 10px; margin-bottom: 10px;
font-size: 16px; font-size: 18px;
} }
} }
.ques{ .ques{
@ -517,7 +515,8 @@ export default {
.stem{ .stem{
display: flex; display: flex;
margin-bottom: 10px; margin-bottom: 10px;
font-size: 14px; font-size: 16px;
line-height: 1.5;
.index{ .index{
margin: 2px 10px 0 0; margin: 2px 10px 0 0;
} }
@ -526,7 +525,8 @@ export default {
display: flex; display: flex;
p{ p{
margin-right: 20px; margin-right: 20px;
font-size: 12px; font-size: 16px;
line-height: 1.5;
} }
} }
} }

@ -16,7 +16,7 @@ const Setting = {
showProgressBar: true, showProgressBar: true,
// 接口请求地址 // 接口请求地址
// apiBaseURL: env === 'development' ? 'http://192.168.31.151:8001' : 'http://39.108.250.202:8000/', // apiBaseURL: env === 'development' ? 'http://192.168.31.151:8001' : 'http://39.108.250.202:8000/',
apiBaseURL: env === 'development' ? 'http://192.168.31.151:8001' : 'http://39.108.250.202:9000', apiBaseURL: env === 'development' ? 'http://39.108.250.202:9000' : 'http://39.108.250.202:9000',
// 接口请求返回错误时,弹窗的持续时间,单位:秒 // 接口请求返回错误时,弹窗的持续时间,单位:秒
modalDuration: 3, modalDuration: 3,
// 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice

Loading…
Cancel
Save