实验报告

20240205 20230705
yujialong 1 year ago
parent 2cf63091a1
commit a823365509
  1. 161
      src/App.vue
  2. 1558
      src/components/case/index.vue
  3. 386
      src/components/selectBusiness/index.vue
  4. 152
      src/layouts/header/index.vue
  5. 548
      src/pages/index/list/index.vue
  6. 653
      src/pages/report/index.vue

@ -1,84 +1,88 @@
<template>
<div id="app" >
<select-business class="selectBusiness" :showIt.sync="showIt" v-show="!showIt && showBusiness" />
<router-view></router-view>
<vCase :showIt.sync="showIt"></vCase>
<tip-dialog class="Z-9999" />
</div>
<div id="app">
<select-business class="selectBusiness"
:showIt.sync="showIt"
v-show="!showIt && showBusiness" />
<router-view></router-view>
<vCase :showIt.sync="showIt"></vCase>
<tip-dialog class="Z-9999" />
</div>
</template>
<script>
import vCase from '@/components/case'
import Setting from '@/setting';
import util from '@/libs/util';
import selectBusiness from '@/components/selectBusiness'
import TipDialog from '@/components/tipDialog'
import { mapState, mapMutations } from 'vuex'
export default {
name: 'App',
components: {
vCase,
selectBusiness,
TipDialog
},
created () {
//localStorage
if (util.local.get(Setting.storeKey) ) {
this.$store.replaceState(Object.assign({}, this.$store.state,util.local.get(Setting.storeKey)))
this.$store.system.replaceState(Object.assign({}, sessionStorage.getItem('systemData')))
}
import vCase from '@/components/case'
import Setting from '@/setting';
import util from '@/libs/util';
import selectBusiness from '@/components/selectBusiness'
import TipDialog from '@/components/tipDialog'
import { mapState, mapMutations } from 'vuex'
export default {
name: 'App',
components: {
vCase,
selectBusiness,
TipDialog
},
created () {
//localStorage
if (util.local.get(Setting.storeKey)) {
this.$store.replaceState(Object.assign({}, this.$store.state, util.local.get(Setting.storeKey)))
this.$store.system.replaceState(Object.assign({}, sessionStorage.getItem('systemData')))
//vuexlocalStorage
window.addEventListener("beforeunload",()=>{
if(this.$route.fullPath.includes('/counter/list/manage')) {
sessionStorage.setItem('computerPath', this.$route.fullPath)
}
util.local.get(Setting.tokenKey) && util.local.set(Setting.storeKey,this.$store.state)
sessionStorage.setItem('systemData', this.$store.system.state)
})
},
data() {
return {
showIt: true,
showSelect: false
}
},
methods: {
...mapMutations({
setShowBusiness: 'system/setShowBusiness',
setTipsOperate: 'system/setTipsOperate'
}),
},
watch: {
showIt: {
handler(newVal) {
if(!newVal && !this.businessKey) {
this.setShowBusiness(true)
}else {
if(!newVal) {
//
if(!this.businessKey) {
this.$nextTick(() => { this.setShowBusiness(true) })
}else {
// this.setTipsOperate('' + this.businessKey + ',');
}
}else {
this.$nextTick(() => { this.setShowBusiness(false) })
}
}
},
immediate: true
}
//vuexlocalStorage
window.addEventListener("beforeunload", () => {
if (this.$route.fullPath.includes('/counter/list/manage')) {
sessionStorage.setItem('computerPath', this.$route.fullPath)
}
util.local.get(Setting.tokenKey) && util.local.set(Setting.storeKey, this.$store.state)
sessionStorage.setItem('systemData', this.$store.system.state)
})
},
data () {
return {
showIt: true,
showSelect: false
}
},
methods: {
...mapMutations({
setShowBusiness: 'system/setShowBusiness',
setTipsOperate: 'system/setTipsOperate'
}),
},
watch: {
showIt: {
handler (newVal) {
console.log("🚀 ~ file: App.vue:58 ~ handler ~ newVal:", newVal, this.businessKey, sessionStorage.getItem('submited'))
if (!newVal && !this.businessKey && !sessionStorage.getItem('submited')) {
this.setShowBusiness(true)
} else {
if (!newVal) {
//
if (!this.businessKey && !sessionStorage.getItem('submited')) {
console.log("🚀 ~ file: App.vue:65 ~ handler ~ submited:", sessionStorage.getItem('submited'))
this.$nextTick(() => { this.setShowBusiness(true) })
} else {
// this.setTipsOperate('' + this.businessKey + ',');
}
},
computed: {
...mapState({
businessKey: state => state.system.businessKey,
showBusiness: state => state.system.showBusiness,
businessKey: state => state.system.businessKey
})
},
} else {
this.$nextTick(() => { this.setShowBusiness(false) })
}
}
},
immediate: true
}
},
computed: {
...mapState({
businessKey: state => state.system.businessKey,
showBusiness: state => state.system.showBusiness,
businessKey: state => state.system.businessKey
})
},
}
</script>
<style lang="scss" scoped>
@ -91,11 +95,12 @@
height: 100%;
}
.fade-enter-active, .fade-leave-active {
transition: opacity .5s;
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.5s;
}
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
opacity: 0;
opacity: 0;
}
.Z-9999 {

File diff suppressed because it is too large Load Diff

@ -1,173 +1,190 @@
<template>
<!-- 业务选择列表 -->
<el-dialog :visible="true" class="" :modal="false" @close="closeData" :close-on-click-modal="false" :show-close="false" custom-class="data-dia 2xl:w-7/12 xl:w-9/12 lg:w-full h-9/12">
<div slot="title" class="dia-header2">
<div class="data-title2">业务选择</div>
<div class="close"><img v-lazy="closeImg" alt="" @click="showBusinessSelect(false)" /></div>
</div>
<p class="tips2">请选择您要办理的业务:</p>
<ul class="take-list2">
<li v-for="(item) in getBusinessSelectList" :class="{checked: takeCheck == item.myKey}" :key="item.myKey" @click="checkTake(item.myKey)">
<img v-lazy="businessImg" alt="">
<p>{{ item.myKey + item.text}}</p>
</li>
<li v-for="(item) in (3 - getBusinessSelectList.length%3)" class="sitting" :key="item"></li>
</ul>
<div class="dia-footer2">
<div class='busyButtonBox'>
<el-button @click="showBusinessSelect(false)">取消</el-button>
<el-button type="primary" @click="selectBusiness()">确定</el-button>
</div>
</div>
</el-dialog>
<!-- 业务选择列表 -->
<el-dialog :visible="true"
class=""
:modal="false"
@close="closeData"
:close-on-click-modal="false"
:show-close="false"
custom-class="data-dia 2xl:w-7/12 xl:w-9/12 lg:w-full h-9/12">
<div slot="title"
class="dia-header2">
<div class="data-title2">业务选择</div>
<div class="close"><img v-lazy="closeImg"
alt=""
@click="showBusinessSelect(false)" /></div>
</div>
<p class="tips2">请选择您要办理的业务:</p>
<ul class="take-list2">
<li v-for="(item) in getBusinessSelectList"
:class="{checked: takeCheck == item.myKey}"
:key="item.myKey"
@click="checkTake(item.myKey)">
<img v-lazy="businessImg"
alt="">
<p>{{ item.myKey + item.text}}</p>
</li>
<li v-for="(item) in (3 - getBusinessSelectList.length%3)"
class="sitting"
:key="item"></li>
</ul>
<div class="dia-footer2">
<div class='busyButtonBox'>
<el-button @click="showBusinessSelect(false)">取消</el-button>
<el-button type="primary"
@click="selectBusiness()">确定</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
import { mapState, mapMutations, mapGetters } from 'vuex';
export default {
props: {
// showBusiness: {
// type: Boolean,
// default: false
// }
// default: ''
props: {
// showBusiness: {
// type: Boolean,
// default: false
// }
// default: ''
},
mounted () {
if (this.businessKey) {
//
this.takeCheck = this.businessKey
}
},
data () {
return {
checkList: [],
takeCheck: '',
businessImg: require('@/assets/img/业务列表2.png'),
closeImg: require('@/assets/svg/close.svg'),
//
}
},
methods: {
...mapMutations({
setBusinessKey: 'system/setBusinessKey',
setShowBusiness: 'system/setShowBusiness',
setTipsOperate: 'system/setTipsOperate',
}),
closeData () {
this.checkList = [];
},
mounted() {
if(this.businessKey) {
//
this.takeCheck = this.businessKey
}
// /
showBusinessSelect (judge) {
//
if (!judge && !this.businessKey) {
this.$confirm('由于您未选择一个业务,这将回到业务列表,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
center: true,
type: 'warning'
}).then(() => {
this.$emit('update:showIt', true)
this.setShowBusiness(false)
}).catch(() => {
this.$message({
type: 'info',
message: '请选择一个业务'
});
});
return
}
this.setShowBusiness(judge)
//
this.setTipsOperate('您正在进行' + this.businessKey + ',加油!');
},
data() {
return {
checkList: [],
takeCheck: '',
businessImg: require('@/assets/img/业务列表2.png'),
closeImg: require('@/assets/svg/close.svg'),
//
}
checkTake (myKey) {
//
if (this.takeCheck === myKey) {
this.takeCheck = ''
} else {
this.takeCheck = myKey
}
},
methods: {
...mapMutations({
setBusinessKey: 'system/setBusinessKey',
setShowBusiness: 'system/setShowBusiness',
setTipsOperate: 'system/setTipsOperate',
}),
closeData() {
this.checkList = [];
},
// /
showBusinessSelect (judge) {
//
if(!judge && !this.businessKey) {
this.$confirm('由于您未选择一个业务,这将回到业务列表,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
center: true,
type: 'warning'
}).then(() => {
this.$emit('update:showIt', true)
this.setShowBusiness(false)
}).catch(() => {
this.$message({
type: 'info',
message: '请选择一个业务'
});
});
return
}
this.setShowBusiness(judge)
//
this.setTipsOperate('您正在进行' + this.businessKey + ',加油!');
},
checkTake(myKey){
//
if(this.takeCheck === myKey) {
this.takeCheck = ''
}else {
this.takeCheck = myKey
}
},
selectBusiness() {
//
if(!this.takeCheck) {
this.$message({
type: 'info',
message: '请选择一个业务'
});
return
}
// systemselectBusinessid
this.setBusinessKey(this.takeCheck)
// this.$store.dispatch('system/getJudgeData')
// id
if(!this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id) {
this.$message({
type: 'info',
message: '业务开发中,尽请期待!'
});
return
}
selectBusiness () {
//
if (!this.takeCheck) {
this.$message({
type: 'info',
message: '请选择一个业务'
});
return
}
// systemselectBusinessid
this.setBusinessKey(this.takeCheck)
// this.$store.dispatch('system/getJudgeData')
// id
if (!this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id) {
this.$message({
type: 'info',
message: '业务开发中,尽请期待!'
});
return
}
//
this.setShowBusiness(false)
//
this.setShowBusiness(false)
// clearStore
let systemData = sessionStorage.getItem('systemData')
let token = sessionStorage.getItem('token')
let cid = sessionStorage.getItem('cid')
let systemId = sessionStorage.getItem('systemId')
let projectId = sessionStorage.getItem('projectId')
let assessmentId = sessionStorage.getItem('assessmentId')
let classId = sessionStorage.getItem('classId')
let timestamp = sessionStorage.getItem('timestamp')
let startTime = sessionStorage.getItem('startTime')
const storeProjectId = sessionStorage.getItem('storeProjectId')
sessionStorage.clear()
sessionStorage.setItem('token', token)
sessionStorage.setItem('cid', cid)
sessionStorage.setItem('systemId', systemId)
sessionStorage.setItem('projectId', projectId)
if(assessmentId) {
sessionStorage.setItem('assessmentId', assessmentId)
}
if(classId) {
sessionStorage.setItem('classId', classId)
}
if(timestamp) {
sessionStorage.setItem('timestamp', timestamp)
}
if(startTime) {
sessionStorage.setItem('startTime', startTime)
}
if(storeProjectId) {
sessionStorage.setItem('storeProjectId', storeProjectId)
}
// sessionStorage.setItem('systemData', systemData)
// clearStore
let systemData = sessionStorage.getItem('systemData')
let token = sessionStorage.getItem('token')
let cid = sessionStorage.getItem('cid')
let systemId = sessionStorage.getItem('systemId')
let projectId = sessionStorage.getItem('projectId')
let assessmentId = sessionStorage.getItem('assessmentId')
let classId = sessionStorage.getItem('classId')
let timestamp = sessionStorage.getItem('timestamp')
let startTime = sessionStorage.getItem('startTime')
const storeProjectId = sessionStorage.getItem('storeProjectId')
sessionStorage.clear()
sessionStorage.setItem('token', token)
sessionStorage.setItem('cid', cid)
sessionStorage.setItem('systemId', systemId)
sessionStorage.setItem('projectId', projectId)
sessionStorage.removeItem('submited')
if (assessmentId) {
sessionStorage.setItem('assessmentId', assessmentId)
}
if (classId) {
sessionStorage.setItem('classId', classId)
}
if (timestamp) {
sessionStorage.setItem('timestamp', timestamp)
}
if (startTime) {
sessionStorage.setItem('startTime', startTime)
}
if (storeProjectId) {
sessionStorage.setItem('storeProjectId', storeProjectId)
}
// sessionStorage.setItem('systemData', systemData)
sessionStorage.setItem('businessKey', this.$store.state.system.businessKey)
sessionStorage.setItem('businessKey', this.$store.state.system.businessKey)
},
},
computed: {
...mapState({
showBusiness: state => state.system.showBusiness,
businessKey: state => state.system.businessKey
}),
...mapGetters({
getBusinessSelectList: 'system/getBusinessSelectList'
})
},
watch: {
showBusiness(newVal) {
console.log('what')
if(newVal) {
this.takeCheck = this.businessKey
}
}
},
computed: {
...mapState({
showBusiness: state => state.system.showBusiness,
businessKey: state => state.system.businessKey
}),
...mapGetters({
getBusinessSelectList: 'system/getBusinessSelectList'
})
},
watch: {
showBusiness (newVal) {
console.log('what')
if (newVal) {
this.takeCheck = this.businessKey
}
}
}
}
</script>
@ -187,7 +204,7 @@ export default {
max-height: 600px;
overflow: auto;
//
.take-list2{
.take-list2 {
width: 100%;
display: flex;
justify-content: space-around;
@ -195,30 +212,30 @@ export default {
flex-wrap: wrap;
height: 40vh;
overflow: auto;
li{
li {
display: inline-flex;
align-items: center;
width: 30%;
height: 10vh;
font-size: 16px;
margin: 1vh 0;
border: 4px solid #DBDBDB;
border: 4px solid #dbdbdb;
border-radius: 20px;
cursor: pointer;
background-color: rgba(216,216,216,0.10);
background-color: rgba(216, 216, 216, 0.1);
// &:first-child{
// margin: 0 0px 50px 0;
// }
// &:last-child{
// margin-left: 50px;
// }
img{
img {
width: 15%;
margin: 0;
//height: 154px;
//margin: 0 45px;
}
p{
p {
font-size: 16px;
color: #000;
text-align: left;
@ -231,27 +248,28 @@ export default {
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical
-webkit-box-orient: vertical;
}
&.checked{
background: rgba(97,145,255,0.10) url('../../assets/svg/checked.svg') 96% 7%/auto no-repeat;
border-color: #6191FF;
&.checked {
background: rgba(97, 145, 255, 0.1) url('../../assets/svg/checked.svg') 96% 7% / auto no-repeat;
border-color: #6191ff;
}
}
}
.dia-header2 {
position: relative;height: 50px;
position: relative;
height: 50px;
line-height: 50px;
background-color: rgb(98, 149, 243) ;
border-top-left-radius:14px;
border-top-right-radius:14px;
background-color: rgb(98, 149, 243);
border-top-left-radius: 14px;
border-top-right-radius: 14px;
.data-title2 {
position: absolute;
left: 15px;
height: 50px;
font-size: 16px;
line-height: 50px;
color:#fff;
color: #fff;
}
.close {
height: 50px;
@ -280,7 +298,7 @@ export default {
margin: 0 auto;
display: flex;
align-items: center;
.img-wrap{
.img-wrap {
background: url('../../assets/img/data-frame.png') 0 0 / cover no-repeat;
width: 180px;
height: 180px;
@ -294,7 +312,7 @@ export default {
max-width: 180px;
max-height: 130px;
text-align: center;
margin: 10px 10px ;
margin: 10px 10px;
img {
margin-top: 45px;
}
@ -308,13 +326,13 @@ export default {
color: #000;
}
}
.text{
.text {
font-size: 18px;
white-space:nowrap;
white-space: nowrap;
position: absolute;
bottom: 15px;
left: 50%;
transform: translate(-50%,0);
transform: translate(-50%, 0);
}
&.checked {
background: url('../../assets/img/data-frame-checked.png') 0 0 / cover no-repeat,
@ -325,19 +343,19 @@ export default {
}
}
}
.seal{
.seal {
width: 1100px;
padding: 0 5%;
display: flex;
justify-content: space-between;
.box{
.box {
border: 2px solid #e6e6e6;
width: 45%;
min-height: 300px;
border-radius: 10px;
padding: 10px;
}
.left{
.left {
display: flex;
width: 50%;
flex-wrap: wrap;
@ -349,14 +367,14 @@ export default {
background: url('../../assets/img/data-frame.png') 0 0 / cover no-repeat;
cursor: pointer;
margin: 5px 7px;
img{
img {
width: 130px;
max-height: 90px;
}
&:last-child {
margin-right: 0;
}
&:nth-child(n>1){
&:nth-child(n > 1) {
margin-top: 0;
}
img {
@ -377,7 +395,7 @@ export default {
&.checked {
background: url('../../assets/img/data-frame-checked.png') 0 0 / cover no-repeat,
url('../../assets/svg/checked.svg') 163px 7% / auto no-repeat;
p {
color: #fff;
}
@ -394,10 +412,10 @@ export default {
}
}
}
.right{
.right {
margin-left: 5%;
}
.else{
.else {
width: 100%;
}
}
@ -416,6 +434,6 @@ export default {
.sitting {
opacity: 0;
cursor: default!important;
cursor: default !important;
}
</style>

@ -1,91 +1,97 @@
<template>
<div class="header" ref="exitHeader">
<div class="inner" style="width: 100%">
<div class="logo" @click="toIndex" style="float: left">
<img src="../../assets/img/logo.png" alt="">
</div>
<div style="float: right;margin:0 60px;font-size: 18px">
<span style="cursor:pointer" @click="exit">
退出<i class="icon el-icon-s-unfold"></i>
</span>
</div>
</div>
<div class="header"
ref="exitHeader">
<div class="inner"
style="width: 100%">
<div class="logo"
@click="toIndex"
style="float: left">
<img src="../../assets/img/logo.png"
alt="">
</div>
<div style="float: right;margin:0 60px;font-size: 18px">
<span style="cursor:pointer"
@click="exit">
退出<i class="icon el-icon-s-unfold"></i>
</span>
</div>
</div>
</div>
</template>
<script>
import { mapState,mapActions } from 'vuex'
import { mapState, mapActions } from 'vuex'
import Setting from '@/setting'
import util from '@/libs/util'
import Cookie from 'js-cookie'
export default {
data() {
return {
token: util.local.get(Setting.tokenKey),
};
data () {
return {
token: util.local.get(Setting.tokenKey),
};
},
mounted () {
this.$route.query.manager && Cookie.set('manager', 1)
},
methods: {
toIndex () {
this.$refs.nav.jump({
index: '/index/list',
title: '首页'
})
},
mounted(){
this.$route.query.manager && Cookie.set('manager', 1)
exit () {
const url = location.href
let href = process.env.NODE_ENV === 'development' ?
`http://${location.hostname}:8082/#/` :
`${url.includes('huorantech.cn') ? `https://www.occupationlab.com` : location.origin}${Cookie.get('manager') ?
'/admin' :
(url.includes('huorantech.cn') || url.includes('izhixinyun.com')) ?
'' :
'/student'}/#/`
let assessmentId = sessionStorage.getItem('assessmentId')
if (assessmentId != 'null' && assessmentId != null && assessmentId != '') {
href += `ass/list`
} else {
const cid = sessionStorage.getItem('cid')
href += `station/preview?courseId=${cid}&curriculumName=银行项目`
}
location.href = href
},
methods: {
toIndex(){
this.$refs.nav.jump({
index: '/index/list',
title: '首页'
})
},
exit(){
const url = location.href
let href = process.env.NODE_ENV === 'development' ?
`http://${location.hostname}:8082/#/` :
`${url.includes('huorantech.cn') ? `http://www.occupationlab.com` : location.origin}${Cookie.get('manager') ?
'/admin' :
(url.includes('huorantech.cn') || url.includes('izhixinyun.com')) ?
'' :
'/student'}/#/`
let assessmentId = sessionStorage.getItem('assessmentId')
if (assessmentId != 'null' && assessmentId != null && assessmentId != ''){
href += `ass/list`
}else{
const cid = sessionStorage.getItem('cid')
href += `station/preview?courseId=${cid}&curriculumName=银行项目`
}
location.href = href
},
watch: {
'$route.path': {
handler (newVal) {
this.$nextTick(() => {
console.log(newVal)
if (newVal === '/index/list') {
this.$refs.exitHeader.style.backgroundColor = 'rgb(250, 250, 250)'
} else {
this.$refs.exitHeader.style.backgroundColor = 'rgb(244, 245, 248)'
}
})
},
},
watch: {
'$route.path': {
handler(newVal) {
this.$nextTick(() => {
console.log(newVal)
if(newVal === '/index/list') {
this.$refs.exitHeader.style.backgroundColor = 'rgb(250, 250, 250)'
}else {
this.$refs.exitHeader.style.backgroundColor = 'rgb(244, 245, 248)'
}
})
},
immediate: true
}
immediate: true
}
}
};
</script>
<style lang="scss" scoped>
.header{
width:100%;
display: flex;
align-items: center;
position: relative;
height: 68px;
// background-color: #fff;
background-color: rgb(244,245,248);
z-index: 1001;
.logo{
width: 500px;
margin-left: 42px;
cursor: pointer;
img{
width: 100%;
}
.header {
width: 100%;
display: flex;
align-items: center;
position: relative;
height: 68px;
// background-color: #fff;
background-color: rgb(244, 245, 248);
z-index: 1001;
.logo {
width: 500px;
margin-left: 42px;
cursor: pointer;
img {
width: 100%;
}
}
}
</style>

@ -1,300 +1,320 @@
<template>
<div class="wrap">
<img class="sth bg" src="@/assets/img/index-bg.png" alt="">
<div class="case" @click="setShowBusiness(true)">业务选择</div>
<div class="wrap">
<img class="sth bg"
src="@/assets/img/index-bg.png"
alt="">
<div class="case"
@click="setShowBusiness(true)">业务选择</div>
<!-- 业务选择 --弹框 -->
<div class="sth integrated-counter cp">
<img width="100%" v-lazy="lazy1" alt="" @click="toPart('/counter')">
<!-- src="@/assets/img/integrated-counter.png" -->
<div class="name" @click="toPart('/counter')">综合柜台</div>
</div>
<!-- 业务选择 --弹框 -->
<div class="sth international cp">
<!-- <img width="100%" v-lazy="lazy1" alt="" @click="toPart('/counter')"> -->
<img width="100%" v-lazy="lazy2" alt="" @click="showComing" />
<!-- src="@/assets/img/integrated-counter.png" -->
<!-- <div class="name" @click="showComing">国际结算部</div> -->
</div>
<!-- <img class="sth international cp" v-lazy="lazy2" alt="" @click="showComing"> -->
<div class="sth manager cp" @click="toPart('/lobbyManager')">
<img width="100%" v-lazy="lazy3" alt="">
<div class="name">大堂经理</div>
</div>
<img class="sth credit-dep cp" v-lazy="lazy4" alt="" @click="showComing">
<img class="sth company-finance cp" v-lazy="lazy5" alt="" @click="showComing">
<img class="sth personal-finance cp" v-lazy="lazy6" alt="" @click="showComing">
<div class="sth integrated-counter cp">
<img width="100%"
v-lazy="lazy1"
alt=""
@click="toPart('/counter')">
<!-- src="@/assets/img/integrated-counter.png" -->
<div class="name"
@click="toPart('/counter')">综合柜台</div>
</div>
<div class="sth international cp">
<!-- <img width="100%" v-lazy="lazy1" alt="" @click="toPart('/counter')"> -->
<img width="100%"
v-lazy="lazy2"
alt=""
@click="showComing" />
<!-- src="@/assets/img/integrated-counter.png" -->
<!-- <div class="name" @click="showComing">国际结算部</div> -->
</div>
<!-- <img class="sth international cp" v-lazy="lazy2" alt="" @click="showComing"> -->
<div class="sth manager cp"
@click="toPart('/lobbyManager')">
<img width="100%"
v-lazy="lazy3"
alt="">
<div class="name">大堂经理</div>
</div>
<img class="sth credit-dep cp"
v-lazy="lazy4"
alt=""
@click="showComing">
<img class="sth company-finance cp"
v-lazy="lazy5"
alt=""
@click="showComing">
<img class="sth personal-finance cp"
v-lazy="lazy6"
alt=""
@click="showComing">
<div class="coming" :class="{active: comingVisible}">
<div style="width: 20%;margin: auto">
<img style="width: 100%" v-lazy="lazy7" alt="">
</div>
<p class="text">敬请期待</p>
</div>
<div class="coming"
:class="{active: comingVisible}">
<div style="width: 20%;margin: auto">
<img style="width: 100%"
v-lazy="lazy7"
alt="">
</div>
<p class="text">敬请期待</p>
</div>
</div>
</template>
<script>
import { mapMutations, mapState } from 'vuex';
import saveSystemModule from '@/mixins/saveSystemModule'
export default {
name: 'index',
mixins: [ saveSystemModule ],
data() {
return {
caseVisible: true,
comingVisible: false,
timer: null,
lazy1: require('@/assets/img/integrated-counter.png'),
lazy2: require('@/assets/img/international.png'),
lazy3: require('@/assets/img/manager-index.png'),
lazy4: require('@/assets/img/credit-dep.png'),
lazy5: require('@/assets/img/company-finance.png'),
lazy6: require('@/assets/img/personal-finance.png'), // @/assets/svg/coming.svg
lazy7: require('@/assets/svg/coming.svg')
}
},
created() {
if(!sessionStorage.getItem('firstLoad2')) {
const loading = this.$loading({
lock: true,
// text: 'Loading',
text: '努力加载中,请稍等...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => {
loading.close();
sessionStorage.setItem('firstLoad2', true)
}, 1000);
}
name: 'index',
mixins: [saveSystemModule],
data () {
return {
caseVisible: true,
comingVisible: false,
timer: null,
lazy1: require('@/assets/img/integrated-counter.png'),
lazy2: require('@/assets/img/international.png'),
lazy3: require('@/assets/img/manager-index.png'),
lazy4: require('@/assets/img/credit-dep.png'),
lazy5: require('@/assets/img/company-finance.png'),
lazy6: require('@/assets/img/personal-finance.png'), // @/assets/svg/coming.svg
lazy7: require('@/assets/svg/coming.svg')
}
},
created () {
if (!sessionStorage.getItem('firstLoad2')) {
const loading = this.$loading({
lock: true,
// text: 'Loading',
text: '努力加载中,请稍等...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => {
loading.close();
sessionStorage.setItem('firstLoad2', true)
}, 1000);
}
if(!this.businessKey) {
this.setShowBusiness(true)
}
},
mounted() {
let token = this.getQueryVariable('token')
let cid = this.getQueryVariable('cid')
let systemId = this.getQueryVariable('systemId')
let stopTime = this.getQueryVariable('stopTime')
let timestamp =+stopTime;
if (token != null){
sessionStorage.setItem('token', token)
sessionStorage.setItem('cid', cid)
sessionStorage.setItem('systemId', systemId)
sessionStorage.setItem('timestamp', timestamp)
if (!this.businessKey) {
this.setShowBusiness(true)
}
},
mounted () {
let token = this.getQueryVariable('token')
let cid = this.getQueryVariable('cid')
let systemId = this.getQueryVariable('systemId')
let stopTime = this.getQueryVariable('stopTime')
let timestamp = +stopTime;
if (token != null) {
sessionStorage.setItem('token', token)
sessionStorage.setItem('cid', cid)
sessionStorage.setItem('systemId', systemId)
sessionStorage.setItem('timestamp', timestamp)
}
},
computed: {
...mapState({
showBusiness: state => state.system.showBusiness,
businessKey: state => state.system.businessKey
})
},
methods: {
...mapMutations({
setShowBusiness: 'system/setShowBusiness'
}),
getQueryVariable (name) {
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')
if (window.location.href.split('?')[1]) {
var r = window.location.href.split('?')[1].match(reg)
if (r != null) {
return (r[2])
} else {
return null
}
}
},
computed: {
...mapState({
showBusiness: state => state.system.showBusiness,
businessKey: state => state.system.businessKey
})
toPart (path) {
this.$router.push(path)
},
methods: {
...mapMutations({
setShowBusiness: 'system/setShowBusiness'
}),
getQueryVariable(name) {
var reg = new RegExp('(^|&)'+name+'=([^&]*)(&|$)')
if( window.location.href.split('?')[1]){
var r = window.location.href.split('?')[1].match(reg)
if (r != null){
return (r[2])
}else{
return null
}
}
},
toPart(path){
this.$router.push(path)
},
showComing(){
this.comingVisible = true
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.comingVisible = false
},1500)
}
showComing () {
this.comingVisible = true
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.comingVisible = false
}, 1500)
}
}
};
</script>
<style lang="scss" scoped>
//
@mixin nameTip {
width: 200px;
height: 70px;
line-height: 60px;
text-align: center;
font-size: 20px;
background: url(../../../assets/img/index-btn-bg.png);
// background-position: center center;
background-size: 100%;
color: #fff;
border-radius: 16px;
// box-shadow: 0 6px 8px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
z-index: 100;
}
//
@mixin nameTip {
width: 200px;
height: 70px;
line-height: 60px;
text-align: center;
font-size: 20px;
background: url(../../../assets/img/index-btn-bg.png);
// background-position: center center;
background-size: 100%;
color: #fff;
border-radius: 16px;
// box-shadow: 0 6px 8px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
z-index: 100;
}
.wrap{
position: relative;
min-height: calc(100vh - 68px);
.sth{
position: absolute;
&.cp{
cursor: pointer;
}
}
.bg{
top: 0;
left: 0;
width: 100%;
height: 100%;
.wrap {
position: relative;
min-height: calc(100vh - 68px);
.sth {
position: absolute;
&.cp {
cursor: pointer;
}
.integrated-counter{
top: -14%;
left: 24%;
width: 43%;
transition: all .5s;
&:hover{
margin-top: -10px;
}
.name{
position: absolute;
top: 23%;
left: 20%;
@include nameTip;
}
}
.bg {
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.integrated-counter {
top: -14%;
left: 24%;
width: 43%;
transition: all 0.5s;
&:hover {
margin-top: -10px;
}
.international{
top: -9%;
left: 72%;
width: 28%;
transition: all .5s;
// &:hover{
// margin-top: -10px;
// }
// img{
// transition: all .5s;
// &:hover{
// margin-top: -10px;
// }
// }
.name{
position: absolute;
top: 23%;
right: 0;
@include nameTip;
}
.name {
position: absolute;
top: 23%;
left: 20%;
@include nameTip;
}
.manager{
bottom: 0;
left: 57%;
width: 39%;
transition: all .5s;
&:hover{
bottom: 10px;
}
.name {
position: absolute;
top: 65%;
left: 37%;
@include nameTip;
}
}
.international {
top: -9%;
left: 72%;
width: 28%;
transition: all 0.5s;
// &:hover{
// margin-top: -10px;
// }
// img{
// transition: all .5s;
// &:hover{
// margin-top: -10px;
// }
// }
.name {
position: absolute;
top: 23%;
right: 0;
@include nameTip;
}
.credit-dep{
top: 31%;
left: 0;
width: 20%;
transition: all .5s;
// &:hover{
// top: 29%;
// }
}
.manager {
bottom: 0;
left: 57%;
width: 39%;
transition: all 0.5s;
&:hover {
bottom: 10px;
}
.company-finance{
top: 52%;
left: 9%;
width: 28%;
transition: all .5s;
// &:hover{
// top: 50%;
// }
.name {
position: absolute;
top: 65%;
left: 37%;
@include nameTip;
}
.personal-finance{
bottom: 0;
left: 25%;
width: 30%;
transition: all .5s;
// &:hover{
// bottom: 10px;
// }
}
.credit-dep {
top: 31%;
left: 0;
width: 20%;
transition: all 0.5s;
// &:hover{
// top: 29%;
// }
}
.company-finance {
top: 52%;
left: 9%;
width: 28%;
transition: all 0.5s;
// &:hover{
// top: 50%;
// }
}
.personal-finance {
bottom: 0;
left: 25%;
width: 30%;
transition: all 0.5s;
// &:hover{
// bottom: 10px;
// }
}
.case {
position: absolute;
top: 92px;
left: 150px;
width: 150px;
height: 50px;
line-height: 50px;
text-align: center;
color: #fff;
font-size: 24px;
background: url(../../../assets/img/case.png) 0 0 / cover no-repeat;
background-size: 150px 50px;
cursor: pointer;
// &:hover{
// top: 76px;
// }
}
@media (max-width: 1440px) {
.credit-dep {
top: 32%;
}
.case{
position: absolute;
top: 92px;
left: 150px;
width: 150px;
height: 50px;
line-height: 50px;
text-align: center;
color: #fff;
font-size: 24px;
background: url(../../../assets/img/case.png) 0 0 /cover no-repeat;
background-size: 150px 50px;
cursor: pointer;
// &:hover{
// top: 76px;
// }
.company-finance {
top: 53%;
}
@media(max-width: 1440px){
.credit-dep{
top: 32%;
}
.company-finance{
top: 53%;
}
.personal-finance{
top: 72%;
}
.integrated-counter{
width: 44%;
}
.personal-finance {
top: 72%;
}
@media(max-width: 1300px){
& {
min-height: calc(100vh - 76px);
}
.integrated-counter {
width: 44%;
}
}
.coming{
position: fixed;
top: -200%;
left: 50%;
width: 376px;
padding: 40px 0;
text-align: center;
transform: translate(-50%,-50%);
border-radius: 16px;
background-color: rgba(0,0,0,0.80);
transition: all .3s;
&.active{
top: 50%;
}
.text{
margin-top: 24px;
font-size: 22px;
font-weight: 400;
color: #fff;
@media (max-width: 1300px) {
& {
min-height: calc(100vh - 76px);
}
}
}
.coming {
position: fixed;
top: -200%;
left: 50%;
width: 376px;
padding: 40px 0;
text-align: center;
transform: translate(-50%, -50%);
border-radius: 16px;
background-color: rgba(0, 0, 0, 0.8);
transition: all 0.3s;
&.active {
top: 50%;
}
.text {
margin-top: 24px;
font-size: 22px;
font-weight: 400;
color: #fff;
}
}
</style>

@ -1,142 +1,216 @@
<template>
<!-- 实验报告 -->
<div class="wrap">
<breadcrumb data="返回实验/我的数据"></breadcrumb>
<div class="content" :class="{loading}" id="pdfDom">
<div style="text-align: right" v-if="!loading">
<el-button size="mini" @click="editReport">
{{ editing ? "保存" : "编辑" }}
</el-button>
<el-button type="primary" size="mini" @click="exportPage">导出报告</el-button>
</div>
<h6 class="r-title">标准实验报告</h6>
<div class="info">
<h6 class="l-title">
<img src="@/assets/img/report1.png" alt="">
基本信息
</h6>
<ul :class="['info-list', {edit: editing}]">
<li>
<label>学生姓名</label>
<el-input v-if="editing" v-model="infoData.userName" disabled></el-input>
<span v-else>{{ infoData.userName }}</span>
</li>
<li>
<label>学生学号</label>
<el-input v-if="editing" v-model="infoData.workNumber" disabled></el-input>
<span v-else>{{ infoData.workNumber }}</span>
</li>
<li>
<label>实验时间</label>
<el-input v-if="editing" v-model="infoData.submitTime" disabled></el-input>
<span v-else>{{ infoData.submitTime }}</span>
</li>
<li>
<label>实验成绩</label>
<el-input v-if="editing" v-model="infoData.score" disabled></el-input>
<div v-else class="score-wrap">
<em>{{ infoData.score }}</em>
<img src="@/assets/img/point.png" alt="">
</div>
</li>
<li>
<label>学生班级</label>
<el-input v-if="editing" v-model="infoData.className"></el-input>
<span v-else>{{ infoData.className }}</span>
</li>
<li>
<label>指导老师</label>
<el-input v-if="editing" v-model="infoData.instructor"></el-input>
<span v-else>{{ infoData.instructor }}</span>
</li>
<li>
<label>实验学时</label>
<el-input v-if="editing" v-model="infoData.period"></el-input>
<span v-else>{{ infoData.period }}</span>
</li>
</ul>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report2.png" alt="">
实验项目名称
</h6>
<el-input v-if="editing" v-model="infoData.projectName" type="textarea"></el-input>
<div v-else class="pre-wrap" v-html="infoData.projectName"></div>
</div>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report3.png" alt="">
实验目的
</h6>
<quill v-if="editing" :border="true" v-model="infoData.purpose" :height="150" />
<div v-else :class="['pre-wrap', {edit: editing}]" v-html="infoData.purpose"></div>
</div>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report4.png" alt="">
实验数据
</h6>
<el-table :data="expData" class="table" border stripe header-align="center">
<el-table-column type="index" label="序号" align="center" width="60">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="judgmentName" label="判分点" width="270" align="center"></el-table-column>
<el-table-column v-if='project' prop="judgmentName" label="考核点" align="center" width="150">
<template slot-scope="scope">
<div v-for="(item, index) in scope.row.lcRuleRecords" :key="index">
<span>
<span>{{index+1}}. </span>{{item.name}}
</span>
</div>
</template>
</el-table-column>
<el-table-column prop="ruleAnswer" label="参考答案" style='word-wrap: break-word'>
<template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords" :key="index">
<span>
<span>{{index+1}}. </span>{{item.ruleAnswer}}
</span>
</div>
</div>
<div v-else v-html="scope.row.referenceAnswer"></div>
</template>
</el-table-column>
<el-table-column prop="userAnswer" label="学生答案">
<template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords" :key="index">
<span v-if='item.userAnswer'>
<span>{{index+1}}. </span>{{item.userAnswer}}
</span>
<span v-else>
<span>{{index+1}}. </span>未填写
</span>
</div>
</div>
<div v-else v-html='scope.row.answer' style='white-space: pre-wrap'></div>
<template v-if="scope.row.runThePictureList">
<img v-for="(img, i) in scope.row.runThePictureList" :key="i" width="200" class="result-pic" :src="img" alt="">
</template>
</template>
</el-table-column>
<el-table-column prop="quesScore" label="分值" width="80" align="center"></el-table-column>
<el-table-column prop="score" label="得分" width="80" align="center"></el-table-column>
</el-table>
</div>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report5.png" alt="">
实验总结与体会
</h6>
<quill v-show="editing" :border="true" v-model="infoData.summarize" :height="150" />
<div v-show="!editing" class="pre-wrap" v-html="infoData.summarize"></div>
</div>
</div>
<!-- 实验报告 -->
<div class="wrap">
<breadcrumb data="返回实验/实验报告"></breadcrumb>
<div class="content"
:class="{loading}"
id="pdfDom">
<div style="text-align: right"
v-if="!loading">
<el-button size="mini"
@click="editReport">
{{ editing ? "保存" : "编辑" }}
</el-button>
<el-button type="primary"
size="mini"
@click="exportPage">导出报告</el-button>
</div>
<h6 class="r-title">标准实验报告</h6>
<div class="info">
<h6 class="l-title">
<img src="@/assets/img/report1.png"
alt="">
基本信息
</h6>
<ul :class="['info-list', {edit: editing}]">
<li>
<label>学生姓名</label>
<el-input v-if="editing"
v-model="infoData.userName"
disabled></el-input>
<span v-else>{{ infoData.userName }}</span>
</li>
<li>
<label>学生学号</label>
<el-input v-if="editing"
v-model="infoData.workNumber"
disabled></el-input>
<span v-else>{{ infoData.workNumber }}</span>
</li>
<li>
<label>实验时间</label>
<el-input v-if="editing"
v-model="infoData.submitTime"
disabled></el-input>
<span v-else>{{ infoData.submitTime }}</span>
</li>
<li>
<label>实验成绩</label>
<el-input v-if="editing"
v-model="infoData.score"
disabled></el-input>
<div v-else
class="score-wrap">
<em>{{ infoData.score }}</em>
<img src="@/assets/img/point.png"
alt="">
</div>
</li>
<li>
<label>学生班级</label>
<el-input v-if="editing"
v-model="infoData.className"></el-input>
<span v-else>{{ infoData.className }}</span>
</li>
<li>
<label>指导老师</label>
<el-input v-if="editing"
v-model="infoData.instructor"></el-input>
<span v-else>{{ infoData.instructor }}</span>
</li>
<li>
<label>实验学时</label>
<el-input v-if="editing"
v-model="infoData.period"></el-input>
<span v-else>{{ infoData.period }}</span>
</li>
</ul>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report2.png"
alt="">
实验项目名称
</h6>
<el-input v-if="editing"
v-model="infoData.projectName"
type="textarea"></el-input>
<div v-else
class="pre-wrap"
v-html="infoData.projectName"></div>
</div>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report3.png"
alt="">
实验目的
</h6>
<quill v-if="editing"
:border="true"
v-model="infoData.purpose"
:height="150" />
<div v-else
:class="['pre-wrap', {edit: editing}]"
v-html="infoData.purpose"></div>
</div>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report4.png"
alt="">
实验数据
</h6>
<el-table :data="expData"
class="table"
border
stripe
header-align="center">
<el-table-column type="index"
label="序号"
align="center"
width="60">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="judgmentName"
label="判分点"
width="200"
align="center"></el-table-column>
<el-table-column v-if='project'
prop="judgmentName"
label="考核点"
align="center"
width="150">
<template slot-scope="scope">
<div v-for="(item, index) in scope.row.lcRuleRecords"
:key="index">
<span>
<span>{{index+1}}. </span>{{item.name}}
</span>
</div>
</template>
</el-table-column>
<el-table-column prop="ruleAnswer"
label="参考答案"
width="280"
style='word-wrap: break-word'>
<template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords"
:key="index">
<span>
<span>{{index+1}}. </span>{{item.ruleAnswer}}
</span>
</div>
</div>
<div v-else
v-html="scope.row.referenceAnswer"></div>
</template>
</el-table-column>
<el-table-column prop="userAnswer"
width="280"
label="学生答案">
<template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords"
:key="index">
<span v-if='item.userAnswer'>
<span>{{index+1}}. </span>{{item.userAnswer}}
</span>
<span v-else>
<span>{{index+1}}. </span>未填写
</span>
</div>
</div>
<div v-else
v-html='scope.row.answer'
style='white-space: pre-wrap'></div>
<template v-if="scope.row.runThePictureList">
<img v-for="(img, i) in scope.row.runThePictureList"
:key="i"
width="200"
class="result-pic"
:src="img"
alt="">
</template>
</template>
</el-table-column>
<el-table-column prop="quesScore"
label="分值"
width="80"
align="center"></el-table-column>
<el-table-column prop="score"
label="得分"
width="80"
align="center"></el-table-column>
</el-table>
</div>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report5.png"
alt="">
实验总结与体会
</h6>
<quill v-show="editing"
:border="true"
v-model="infoData.summarize"
:height="150" />
<div v-show="!editing"
class="pre-wrap"
v-html="infoData.summarize"></div>
</div>
</div>
</div>
</div>
</template>
<script>
@ -144,153 +218,149 @@ import { Loading } from "element-ui";
import util from '@/libs/util'
import breadcrumb from '@/components/breadcrumb'
import quill from "@/components/quill";
import {reportDetail,exportBankExperimentReport,updateReport} from "@/api/http.js";
import { reportDetail, exportBankExperimentReport, updateReport } from "@/api/http.js";
export default {
data() {
return {
reportId: this.$route.query.reportId,
title: "实验报告",
form: {},
infoData: {},
expData: [],
editing: false,
loadIns: null,
loading: false,
project:false,
userScores: []
};
data () {
return {
reportId: this.$route.query.reportId,
title: "实验报告",
form: {},
infoData: {},
expData: [],
editing: false,
loadIns: null,
loading: false,
project: false,
userScores: []
};
},
components: {
breadcrumb,
quill
},
mounted () {
this.getData()
},
methods: {
getData () { //
const { reportId } = this
reportDetail(reportId).then(({ data }) => {
const { report, userScores } = data
this.form = report
const form = this.form
this.infoData = {
reportId,
className: form.className,
workNumber: form.workNumber,
experimentalClassName: form.experimentalClassName,
instructor: form.instructor,
period: form.period,
laboratory: form.laboratory,
submitTime: form.submitTime,
score: form.score,
userName: form.userName,
projectName: form.projectName,
purpose: form.purpose,
summarize: form.summarize
}
const expData = report.data
this.userScores = userScores
// data使
if (!expData) {
this.handleList(userScores)
this.$post(this.api.editExperimentalData, {
reportId,
data: JSON.stringify(userScores)
}).then(res => { }).catch(err => { })
} else {
this.handleList(userScores)
}
}).catch(res => { })
},
components: {
breadcrumb,
quill
//
handleList (list) {
list.map(e => {
e.assessmentPoint = ''
e.referenceAnswer = ''
e.answer = ''
e.lcRuleRecords.map((n, i) => {
e.assessmentPoint += `${i + 1}.${n.name}`
e.referenceAnswer += `${i + 1}.${n.ruleAnswer}`
e.answer += `${i + 1}.${n.userAnswer}`
})
})
this.expData = list
},
mounted() {
this.getData()
exportPage () {
const form = Object.assign(this.form, this.infoData)
const list = JSON.parse(JSON.stringify(this.expData))
list.map((e, i) => {
const item = this.userScores.find(n => n.judgmentId == e.judgmentId)
if (item && item.runThePicture) e.runThePicture = item.runThePicture
if (item && item.runThePictureList) e.runThePictureList = item.runThePictureList
e.id = i + 1
if (e.referenceAnswer && typeof e.referenceAnswer === 'string') e.referenceAnswer = e.referenceAnswer.replace(/<[^>]+>/g, '').replace(/(&nbsp;|&amp;|%s)/g, '').replace(/>/g, '&gt;').replace(/</g, '&lt;')
if (e.answer && typeof e.answer === 'string') e.answer = e.answer.replace(/<[^>]+>/g, '').replace(/(&nbsp;|&amp;|%s)/g, '').replace(/>/g, '&gt;').replace(/</g, '&lt;')
})
for (const i in form) {
if (form[i] && typeof form[i] === 'string') form[i] = form[i].replace(/<[^>]+>/g, '')
}
form.purpose = form.purpose.replace(/<[^>]+>/g, '')
this.loading = true;
this.loadIns = Loading.service({
background: "#fff"
});
exportBankExperimentReport({
...form,
experimentalData: list
}).then(res => {
this.loadIns.close();
this.loading = false;
util.downloadFileDirect(`实验报告.docx`, new Blob([res.data]))
}).catch(res => {
this.loadIns.close();
this.loading = false;
})
},
methods: {
getData() { //
const { reportId } = this
reportDetail({
reportId
}).then((data)=>{
console.log(33, data)
// this.$get(`${this.api.reportDetail}?reportId=${reportId}`).then(({ report, userScores }) => {
this.form = report
const form = this.form
this.infoData = {
reportId,
className: form.className,
workNumber: form.workNumber,
experimentalClassName: form.experimentalClassName,
instructor: form.instructor,
period: form.period,
laboratory: form.laboratory,
submitTime: form.submitTime,
score: form.score,
userName: form.userName,
projectName: form.projectName,
purpose: form.purpose,
summarize: form.summarize
}
// const data = report.data
// this.userScores = userScores
// // data使
// if (!data) {
// this.handleList(userScores)
// this.$post(this.api.editExperimentalData, {
// reportId,
// data: JSON.stringify(userScores)
// }).then(res => {}).catch(err => {})
// } else {
// this.handleList(userScores.find(e => e.lcRuleRecords) ? userScores : JSON.parse(data))
// }
}).catch(res => {})
},
//
handleList(list) {
this.project = list.find(e => e.lcRuleRecords) // lcRuleRecords
if (this.project) {
list.map(e => {
e.assessmentPoint = ''
e.referenceAnswer = ''
e.answer = ''
e.lcRuleRecords.map((n, i) => {
e.assessmentPoint += `${i + 1}.${n.name}`
e.referenceAnswer += `${i + 1}.${n.ruleAnswer}`
e.answer += `${i + 1}.${n.userAnswer}`
})
})
}
this.expData = list
},
exportPage() {
const form = Object.assign(this.form, this.infoData)
const list = JSON.parse(JSON.stringify(this.expData))
list.map((e, i) => {
const item = this.userScores.find(n => n.judgmentId == e.judgmentId)
if (item && item.runThePicture) e.runThePicture = item.runThePicture
if (item && item.runThePictureList) e.runThePictureList = item.runThePictureList
e.id = i + 1
if (e.referenceAnswer && typeof e.referenceAnswer === 'string') e.referenceAnswer = e.referenceAnswer.replace(/<[^>]+>/g, '').replace(/(&nbsp;|&amp;|%s)/g, '').replace(/>/g, '&gt;').replace(/</g, '&lt;')
if (e.answer && typeof e.answer === 'string') e.answer = e.answer.replace(/<[^>]+>/g, '').replace(/(&nbsp;|&amp;|%s)/g, '').replace(/>/g, '&gt;').replace(/</g, '&lt;')
})
for (const i in form) {
if (form[i] && typeof form[i] === 'string') form[i] = form[i].replace(/<[^>]+>/g, '')
}
form.purpose = form.purpose.replace(/<[^>]+>/g, '')
this.loading = true;
this.loadIns = Loading.service({
background: "#fff"
});
this.$post(this.project ? this.api.exportBankExperimentReport : this.api.exportLabReport, {
...form,
experimentalData: list
}).then(res => {
this.loadIns.close();
this.loading = false;
util.downloadFileDirect(`实验报告.docx`,new Blob([res]))
}).catch(res => {
this.loadIns.close();
this.loading = false;
})
},
editReport() { //
if (this.editing) {
this.$post(`${this.api.updateReport}`, this.infoData).then(res => {
this.editing = false;
this.$message.success('修改成功')
}).catch(err => {});
} else {
this.editing = true;
}
}
editReport () { //
if (this.editing) {
updateReport(this.infoData).then(res => {
this.editing = false;
this.$message.success('修改成功')
}).catch(err => { });
} else {
this.editing = true;
}
}
}
};
</script>
<style lang="scss" scoped>
.m-b-20 {
margin-bottom: 20px;
margin-bottom: 20px;
}
.wrap {
padding: 12px 300px 20px;
}
code, kbd, samp{
font-family: 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif;
code,
kbd,
samp {
font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, STHeiTi, sans-serif;
word-wrap: break-word;
white-space: pre-wrap;
}
/deep/ pre{
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
word-break:break-all;
overflow:hidden;
/deep/ pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
word-break: break-all;
overflow: hidden;
font-size: 12px;
font-weight:400;
font-family:'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif
font-weight: 400;
font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, STHeiTi, sans-serif;
}
.content {
padding: 16px 0;
@ -306,19 +376,19 @@ code, kbd, samp{
}
.info {
padding: 20px 16px;
border: 1px solid #E1E6F2;
border: 1px solid #e1e6f2;
}
.l-title{
display: flex;
align-items: center;
padding: 5px 8px;
margin-bottom: 12px;
font-size: 14px;
color: #333;
background-color: #F7F9FC;
img{
margin-right: 5px;
}
.l-title {
display: flex;
align-items: center;
padding: 5px 8px;
margin-bottom: 12px;
font-size: 14px;
color: #333;
background-color: #f7f9fc;
img {
margin-right: 5px;
}
}
.info-list {
display: flex;
@ -343,7 +413,7 @@ code, kbd, samp{
span {
min-width: 150px;
padding: 0 10px 3px;
border-bottom: 1px solid #E1E6F2;
border-bottom: 1px solid #e1e6f2;
}
/deep/.el-input {
width: 174px;
@ -352,7 +422,7 @@ code, kbd, samp{
.score-wrap {
position: relative;
min-width: 150px;
border-bottom: 1px solid #E1E6F2;
border-bottom: 1px solid #e1e6f2;
em {
position: absolute;
top: -12px;
@ -360,7 +430,7 @@ code, kbd, samp{
font-family: din;
font-size: 30px;
font-weight: 600;
color: #0B1D30;
color: #0b1d30;
}
img {
position: absolute;
@ -368,16 +438,17 @@ code, kbd, samp{
left: 0;
}
}
/deep/.el-textarea .el-textarea__inner, .pre-wrap {
/deep/.el-textarea .el-textarea__inner,
.pre-wrap {
min-height: 72px;
padding: 10px 16px;
font-size: 14px;
color: #333;
&.edit {
color: #ABB3C6;
border: 1px solid #CACFDB;
color: #abb3c6;
border: 1px solid #cacfdb;
border-radius: 4px;
background-color: #F6F7F9;
background-color: #f6f7f9;
}
}
/deep/ .table th {
@ -388,8 +459,20 @@ code, kbd, samp{
}
}
}
/deep/ .el-table {
width: 100%;
.el-table__header-wrapper table,
.el-table__body-wrapper table {
width: 100% !important;
}
.el-table__body,
.el-table__footer,
.el-table__header {
table-layout: auto;
}
}
.result-pic {
margin: 10px 0;
margin: 10px 0;
}
@media (max-width: 1650px) {
.wrap {

Loading…
Cancel
Save