期货套利

master
liangliang.Li 3 years ago
parent 4f18497aff
commit e6739924d8
  1. 25
      src/App.vue
  2. 438
      src/assets/css/main.css
  3. BIN
      src/assets/img/add.png
  4. BIN
      src/assets/img/equal.png
  5. BIN
      src/assets/img/indexBg.jpg
  6. BIN
      src/assets/img/left_up.png
  7. BIN
      src/assets/img/right_up.png
  8. 17
      src/components/common/Header.vue
  9. 6
      src/components/common/Studentcommon/registration.vue
  10. 47
      src/components/page/Dashboard.vue
  11. 66
      src/components/page/Index.vue
  12. 6
      src/components/page/Login.vue
  13. 8
      src/components/page/ProjectIntro.vue
  14. 31
      src/components/page/ProjectPattern.vue
  15. 25
      src/components/page/Record.vue
  16. 2
      src/components/page/RegisterForm.vue
  17. 276
      src/components/page/ShowExperiment.vue
  18. 1
      src/components/page/TeachingVideo.vue
  19. 20
      src/config/index.js
  20. 7
      src/utils/api.js
  21. 32
      src/utils/core.js

@ -12,7 +12,6 @@
if (sessionStorage.getItem("kd_client_store") ) { if (sessionStorage.getItem("kd_client_store") ) {
this.$store.replaceState(Object.assign({}, this.$store.state,JSON.parse(sessionStorage.getItem("kd_client_store")))) this.$store.replaceState(Object.assign({}, this.$store.state,JSON.parse(sessionStorage.getItem("kd_client_store"))))
} }
// vuexsessionStorage // vuexsessionStorage
window.addEventListener("beforeunload",()=>{ window.addEventListener("beforeunload",()=>{
sessionStorage.setItem("kd_client_store",JSON.stringify(this.$store.state)) sessionStorage.setItem("kd_client_store",JSON.stringify(this.$store.state))
@ -20,3 +19,27 @@
} }
} }
</script> </script>
<style>
.el-divider>.el-divider__text{
color: #5277F7;
font-size: 23px;
}
.el-page-header__left:hover{
opacity: 0.7;
}
.el-page-header{
position: fixed;
}
.el-page-header__left{
top: 20px;
left: 20px;
}
.el-page-header__left>.el-icon-back{
font-size: 20px;
color: #5277F7;
}
.el-page-header__left>.el-page-header__title{
font-size: 20px;
color: #5277F7;
}
</style>

@ -0,0 +1,438 @@
* {
margin: 0;
padding: 0;
}
html,
body,
#app,
.wrapper {
width: 100%;
height: 100%;
overflow: hidden;
}
body {
font-family: 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif;
font-size: 16px;
}
a {
text-decoration: none
}
i{
font-style: normal;
cursor: pointer;
}
li {
list-style-type:none;
}
img{
cursor: pointer;
}
.content-box {
height: 100%;
-webkit-transition: left .3s ease-in-out;
transition: left .3s ease-in-out;
background: #fff;
}
.clearfix::after {
display: block;
content: ".";
height: 0;
clear: both;
visibility: hidden;
}
.content {
height: 100vh;
width: auto;
overflow-y: auto;
/* width: 1960px; */
overflow-x: hidden;
/* height: 100%; */
box-sizing: border-box;
position: relative;
}
.content_back{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 530px;
}
/* .content-collapse {
left: 65px;
} */
.scroll_wrap{
height: 100vh;
overflow-y: auto;
}
.container {
padding: 30px;
background: #fff;
border: 1px solid #ddd;
border-radius: 5px;
}
.crumbs {
margin: 10px 0;
}
.el-table tr:hover {
background: #f5f7fa;
}
#app .el-table thead{
color: #2D2D2D;
}
/* table表格 */
.el-table th{
/* background-color: #E5E5E5!important; */
font-size: 18px;
font-weight: normal;
}
.el-table td{
font-size: 16px;
font-weight: normal;
}
/* 分页按钮 */
.pagination {
margin: 20px 0;
text-align: right;
}
.pagination .el-pagination__total{
font-size: 16px!important;
}
#app .el-pagination.is-background .btn-next:last-child{
margin-right: 0!important;
/* background-color: #fff!important; */
}
#app .pagination_pageNumber{
color: #ccc;
margin-right: 4px;
margin-bottom: 20px;
}
#app .el-cascader{
display: block!important;
}
.plugins-tips {
padding: 20px 10px;
margin-bottom: 20px;
}
.el-button+.el-tooltip {
margin-left: 10px;
}
#app .el-row {
margin-left: 0!important;
margin-right: 0!important;
}
#app .information .el-col-24{
padding-left: 0!important;
padding-right: 0!important;
}
/* 边距 */
.mab20{
margin-bottom: 20px;
}
.mar20{
margin-right: 20px;
}
.mat20 {
margin-top: 20px;
}
.mar50{
margin: 50px 0;
}
.ml20{
margin-left: 20px;
}
.hr_tag{
width: 8px;
height: 18px;
background: #2D2D2D;
}
.hr_text{
font-size: 18px;
color: #2D2D2D;
margin-left: 10px;
}
.hr_tag_red{
width: 8px;
height: 20px;
background: #BB2A17;
}
.hr_text_red{
font-size: 18px;
color: #2D2D2D;
font-weight: bold;
margin-left: 10px;
}
/* 下拉选择框 */
#app .el-select{
display: block!important;
}
.move-enter-active,
.move-leave-active {
transition: opacity .5s;
}
.move-enter,
.move-leave {
opacity: 0;
}
/*BaseForm*/
.form-box {
width: 600px;
}
.form-box .line {
text-align: center;
}
/* form-item的label */
#app .el-form-item__label{
font-size: 16px;
}
.el-time-panel__content::after,
.el-time-panel__content::before {
margin-top: -7px;
}
.el-time-spinner__wrapper .el-scrollbar__wrap:not(.el-scrollbar__wrap--hidden-default) {
padding-bottom: 0;
}
/*Upload*/
.pure-button {
width: 150px;
height: 40px;
line-height: 40px;
text-align: center;
color: #fff;
border-radius: 3px;
}
.g-core-image-corp-container .info-aside {
height: 45px;
}
/*VueEditor*/
.ql-container {
min-height: 400px;
}
.ql-snow .ql-tooltip {
transform: translateX(117.5px) translateY(10px) !important;
}
.editor-btn {
margin-top: 20px;
}
#app .ml10{
margin-left: 10px;
}
#app .mr10{
margin-right: 10px;
}
.mab200{
margin-bottom: 200px;
}
.mat40{
margin-top: 40px;
}
.mat25{
margin-top: 25px;
}
.mat10{
margin-top: 10px;
}
.hr_tag{
width: 8px;
height: 18px;
background: white;
}
.hr_text{
font-size: 16px;
color: #2D2D2D;
margin-left: 10px;
}
/*flex*/
.flex-center{
display: flex;
align-items: center;
}
.flex-end{
display: flex;
/* justify-content: space-between;
align-items: flex-end; */
justify-content:end
}
.flex-start{
display: flex;
align-items: flex-start;
}
.flex-between{
display: flex;
align-items: center;
justify-content: space-between;
}
.flex-column-between{
display: flex;
justify-content: space-between;
flex-direction: column;
}
.flex-start-between{
display: flex;
align-items: flex-start;
justify-content: space-between;
}
.flex-around{
display: flex;
align-items: center;
justify-content: space-around;
}
.flex-start-around{
display: flex;
align-items: flex-start;
justify-content: center;
}
.flex-end-content{
display: flex;
align-items: center;
justify-content: flex-end;
}
.flex-justify-content{
display: flex;
align-items: center;
justify-content: center;
}
.flex-column-content{
display: flex;
align-items: center;
flex-direction: column;
}
/* 输入框圆角 */
#app .el-input--suffix .el-input__inner{
border-radius: 8px;
}
/* 输入框圆角 */
/* #app .dialog .el-input--suffix .el-input__inner{
border-radius: 0;
} */
#app .el-date-editor--daterange.el-input__inner{
width: 100%;
border-radius: 8px;
}
#app .bondDate .el-date-editor--daterange.el-input__inner{
width: 30%;
margin: 0 25px 0 10px;
}
/* 消除数字input箭头 */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
}
input[type="number"]{
-moz-appearance: textfield;
}
.class_name .el-form-item__content{
margin-left: 0!important;
}
.class_detail .el-row{
margin-left: 20px!important;
margin-right: 20px!important;
}
[v-cloak] {
display: none;
}
/* 溢出省略号 */
.ellipsis{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.search_view{
padding: 30px 0 20px 0;
border-bottom: 1px solid #e5e5e5;
}
.mal10{
margin-left: 10px;
}
.pab0{
padding-bottom: 0;
}
.two_nxetStep{
margin-top: 20px;
text-align: center;
}
.el-divider>.el-divider__text{
color: #5277F7;
font-size: 23px;
}
.el-page-header__left:hover{
opacity: 0.7;
}
.el-page-header{
position: fixed;
}
.el-page-header__left{
top: 40px;
left: 20px;
}
.el-page-header__left>.el-icon-back{
font-size: 20px;
color: #5277F7;
}
.el-page-header__left>.el-page-header__title{
font-size: 20px;
color: #5277F7;
}
/*滚动条样式*/
::-webkit-scrollbar {
width: 1px;
height: 1px;
}
::-webkit-scrollbar-thumb {
border-radius: 1px;
-webkit-box-shadow: inset 0 0 1px white;
background: white;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 1px white;
border-radius: 0;
background:white;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 703 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -36,15 +36,16 @@ export default {
}, },
methods: { methods: {
loginout() { loginout() {
this.$get(this.api.logout,{
token:this.$store.state.token
}).then(res => {
this.$store.replaceState({})
sessionStorage.removeItem('kd_client_username');
this.$router.push('/login') this.$router.push('/login')
}) this.$store.replaceState({})
sessionStorage.clear()
// location.reload() // this.$get(this.api.logout,{
// token:this.$store.state.token
// }).then(res => {
// this.$store.replaceState({})
// sessionStorage.clear()
// this.$router.push('/login')
// })
}, },
toPersonalCenter(){ toPersonalCenter(){
this.$router.push('/personalcenter') this.$router.push('/personalcenter')

@ -1,9 +1,6 @@
<template> <template>
<div class="Achievement-container"> <div class="Achievement-container">
<!-- <el-tabs v-model="activeName">
<el-tab-pane label="虚拟实验" name="first"></el-tab-pane>
<el-tab-pane label="教学实验" name="second"></el-tab-pane>
</el-tabs> -->
<div class="tabs"> <div class="tabs">
<a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == activeName}" @click="tabChange(index)">{{item}}</a> <a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == activeName}" @click="tabChange(index)">{{item}}</a>
</div> </div>
@ -52,6 +49,7 @@ export default {
// this.$refs.message.href = `http://liuwanr.cn:8080/attendance/exportPractice?studentId=${this.studentId}&courseId=${this.$store.state.courseId}&titles=%E5%BA%8F%E5%8F%B7,%E9%A1%B9%E7%9B%AE%E5%90%8D%E7%A7%B0,%E5%AE%9E%E9%AA%8C%E9%A1%B9%E7%9B%AE,%E8%80%83%E5%8B%A4%E8%AE%B0%E5%BD%95,%E7%AD%BE%E5%88%B0%E6%97%B6%E9%97%B4`; // this.$refs.message.href = `http://liuwanr.cn:8080/attendance/exportPractice?studentId=${this.studentId}&courseId=${this.$store.state.courseId}&titles=%E5%BA%8F%E5%8F%B7,%E9%A1%B9%E7%9B%AE%E5%90%8D%E7%A7%B0,%E5%AE%9E%E9%AA%8C%E9%A1%B9%E7%9B%AE,%E8%80%83%E5%8B%A4%E8%AE%B0%E5%BD%95,%E7%AD%BE%E5%88%B0%E6%97%B6%E9%97%B4`;
}, },
methods: { methods: {
exportData() { exportData() {
if(this.activeName == 'first'){ if(this.activeName == 'first'){
location.href = `${this.api.exportProjectRecord}?userId=${this.userId}` location.href = `${this.api.exportProjectRecord}?userId=${this.userId}`

@ -1,28 +1,6 @@
<template> <template>
<div> <div>
<div v-show="activeName!='index'" class="back_index" @click="toIndex"><i class="iconfont icon-home"></i></div>
<div class="header_tab"> <div class="header_tab">
<!-- <el-tabs v-model="activeName" @tab-click="tabChange" :before-leave="saveActive">
<el-tab-pane label="首页" name="index">
</el-tab-pane>
<el-tab-pane label="课前预习" name="first">
</el-tab-pane>
<el-tab-pane label="练习模式" name="second">
</el-tab-pane>
<el-tab-pane label="竞赛列表" name="third">
</el-tab-pane>
<el-tab-pane label="考核列表" name="fourth" v-if="shwoAss">
</el-tab-pane>
<el-tab-pane label="实验记录" name="fifth">
</el-tab-pane>
</el-tabs> -->
<Index v-if="activeName=='index'"></Index> <Index v-if="activeName=='index'"></Index>
<TeachingVideo v-if="!showProject && activeName!='fourth' && activeName!='fifth' && activeName!='index' && activeName!='second'"></TeachingVideo> <TeachingVideo v-if="!showProject && activeName!='fourth' && activeName!='fifth' && activeName!='index' && activeName!='second'"></TeachingVideo>
<Project v-if="showProject"></Project> <Project v-if="showProject"></Project>
@ -171,10 +149,6 @@ export default {
Assessment Assessment
}, },
methods: { methods: {
toIndex() {
// this.$router.push('dashboard')
this.activeName = 'index'
},
getClass(){ getClass(){
this.$get(`${this.api.mineClass}?userId=${this.userId}`).then(res => { this.$get(`${this.api.mineClass}?userId=${this.userId}`).then(res => {
if(!res.list.length){ if(!res.list.length){
@ -412,26 +386,7 @@ export default {
outline: none; outline: none;
box-shadow: none !important; box-shadow: none !important;
} }
.back_index:hover{
opacity: 0.8;
cursor: pointer;
}
.back_index{
position: fixed;
right: 0px;
top: 48%;
width: 80px;
height: 80px;
background: white;
text-align: center;
z-index: 100;
}
.icon-home{
font-size: 50px;
color: #FF5288;
font-weight: 600;
line-height: 80px;
}
h3{ h3{
color: #328aff; color: #328aff;
margin-bottom: 10px; margin-bottom: 10px;

@ -1,8 +1,20 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<div class="button_wrap"> <div class="button_wrap flex-between">
<div class="button_item" @click="toNext(0)"><i class="iconfont icon-arrowRight"></i></div> <div class="button_item left" @click="toNext(0)">
<div class="button_item" @click="toNext(1)"><i class="iconfont icon-arrowRight"></i></div> <div class="text_wrap">
<div>期货交易</div>
<div>虚仿实验</div>
</div>
<div class="img_wrap"><img src="../../assets/img/left_up.png" alt=""></div>
</div>
<div class="button_item right" @click="toNext(1)">
<div class="text_wrap">
<div>期权交易</div>
<div>需仿实验</div>
</div>
<div class="img_wrap"><img src="../../assets/img/right_up.png" alt=""></div>
</div>
</div> </div>
<div class="notice"> <div class="notice">
<div></div> <div></div>
@ -49,8 +61,8 @@ export default {
}; };
}, },
mounted() { mounted() {
// sessionStorage.removeItem('model')
this.showChangePass() this.showChangePass()
}, },
methods:{ methods:{
setPassword(){ setPassword(){
@ -93,34 +105,44 @@ export default {
position: fixed; position: fixed;
background: url('../../assets/img/indexBg.jpg'); background: url('../../assets/img/indexBg.jpg');
background-size: 100%; background-size: 100%;
box-sizing: border-box;
padding: 0px 180px;
.button_wrap{ .button_wrap{
width: 920px; width: 600px;
height: 60px; margin:37vh auto 0 auto;
// background: red;
margin-top: 600px;
margin-left: 350px;
display: flex;
justify-content: space-between;
.button_item{ .button_item{
width: 60px; height: 100px;
height: 60px; margin-bottom: 230px;
background: #FF5288; .text_wrap{
.icon-arrowRight{ div{
font-size: 55px; width: 200px;
color: white; text-align:justify;
text-justify:distribute-all-lines;
font-size: 40px;
font-weight: bold;
margin: 20px 0px;
text-align-last:justify
}
margin-bottom: 30px;
}
.img_wrap{
text-align: center;
} }
} }
.button_item:hover{ .button_item:hover{
background: #002E66; opacity: 0.7;
cursor: pointer cursor: pointer;
}
.left{
color: #FF5288;
}
.right{
color: #3677ED;
} }
} }
.notice{ .notice{
width: 900px; width: 900px;
margin-top: 100px;
margin-left: 100px;
display: flex; display: flex;
// color: #002E66;
color: #7AA0B7; color: #7AA0B7;
font-size: 24px; font-size: 24px;
letter-spacing:4px; letter-spacing:4px;

@ -74,7 +74,7 @@ export default {
// //
userAuth(){ userAuth(){
location.href = 'https://finance.uestc.cn/liuwanr/userInfo/loginSchoolPerson' location.href = 'http://116.63.168.79/liuwanr/userInfo/loginSchoolPerson'
}, },
accessNum(){ accessNum(){
this.$get(this.api.getAccessNum).then(res =>{ this.$get(this.api.getAccessNum).then(res =>{
@ -84,12 +84,12 @@ export default {
}).catch(err=>{}) }).catch(err=>{})
}, },
toClient(){ toClient(){
location.href = location.host.includes('116.63.168.79') ? 'http://116.63.168.79/kdclient/#/clientLogin?type=0' : 'https://finance.uestc.cn/kdclient/#/clientLogin?type=0' location.href = location.host.includes('116.63.168.79') ? 'http://116.63.168.79/kdclient/#/clientLogin?type=0' : 'http://122.9.154.146/kdclient/#/clientLogin?type=0'
// this.$router.push(`/clientLogin?type=0`) // this.$router.push(`/clientLogin?type=0`)
this.visiteShow = false this.visiteShow = false
}, },
toMang(){ toMang(){
location.href = location.host.includes('116.63.168.79') ? 'http://116.63.168.79/kdserver/#/login' : 'https://finance.uestc.cn/kdserver/#/login' location.href = location.host.includes('116.63.168.79') ? 'http://116.63.168.79/kdserver/#/login' : 'http://122.9.154.146/kdserver/#/login'
}, },
toExpert(){ toExpert(){
this.loadIns = Loading.service({ this.loadIns = Loading.service({

@ -1,5 +1,6 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<el-page-header @back="core.goBack" ></el-page-header>
<!-- 项目介绍+课前预习 --> <!-- 项目介绍+课前预习 -->
<div class="nav_wrap"> <div class="nav_wrap">
<div class="introduce">项目介绍</div> <div class="introduce">项目介绍</div>
@ -10,7 +11,7 @@
<div class="project_title">{{title}}</div> <div class="project_title">{{title}}</div>
<div class="peoject_content"> <div class="peoject_content">
<div class="content_text">{{contentText}}</div> <div class="content_text">{{contentText}}</div>
<div class="back_index" @click="toIndex"><i class="iconfont icon-home"></i></div> <!-- <div class="back_index" @click="toIndex"><i class="iconfont icon-home"></i></div> -->
</div> </div>
</div> </div>
<!-- 选择期权模式基础+挑战 --> <!-- 选择期权模式基础+挑战 -->
@ -19,7 +20,9 @@
<div class="icon_one icon_wrap"><i class="iconfont icon-arrowRight"></i></div> <div class="icon_one icon_wrap"><i class="iconfont icon-arrowRight"></i></div>
<div class="select_title one_title">期货套期保值实验</div> <div class="select_title one_title">期货套期保值实验</div>
</div> </div>
<div class="select_item" > <div class="select_item" @click="toNext(3)">
<div class="icon_two icon_wrap"><i class="iconfont icon-arrowRight"></i></div>
<div class="select_title two_title">期货套利实验</div>
</div> </div>
</div> </div>
<div class="select_wrap" v-else> <div class="select_wrap" v-else>
@ -334,6 +337,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.wrap{ .wrap{
width: 100%; width: 100%;
height: 100%; height: 100%;

@ -1,5 +1,6 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<el-page-header @back="core.goBack" ></el-page-header>
<div class="content_one"> <div class="content_one">
<div class="content_one_title"> <div class="content_one_title">
{{projectList[pattern].title}} {{projectList[pattern].title}}
@ -39,29 +40,36 @@
</div> </div>
</div> </div>
</div> </div>
<div class="back_index" @click="toIndex"><i class="iconfont icon-home"></i></div> <!-- <div class="back_index" @click="toIndex"><i class="iconfont icon-home"></i></div> -->
</div> </div>
</template> </template>
<script> <script>
import config from '@/config'
export default { export default {
data() { data() {
return { return {
pattern: Number(this.$route.query.pattern), pattern: Number(this.$route.query.pattern),
projectList:[{ projectList:[{
title:'期权套期保值实验', title:'期权套期保值实验',
url:'https://finance.uestc.cn/kd/#/Dashboard', url:`${this.$config.baseUrl}/kd/#/Dashboard`,
principle:'本实验根据《金融交易策略设计与模拟》等理论课程的大纲要求,将期权基础知识考核、期权实战规则、模拟开户和期权策略设计等内容融会贯通于十个步骤,考察学生利用期权策略减少价格波动对企业经营影响的能力。', principle:'本实验根据《金融交易策略设计与模拟》等理论课程的大纲要求,将期权基础知识考核、期权实战规则、模拟开户和期权策略设计等内容融会贯通于十个步骤,考察学生利用期权策略减少价格波动对企业经营影响的能力。',
step:'1. 实验背景介绍;2. 期权实战规则;3. 模拟开户;4. 银期转账;5. 实验角色选择;6. 行情查看与期权选择;7. 期权开仓;8. 期权平仓;9. 核算损益;10. 填写实验报告', step:'1. 实验背景介绍;2. 期权实战规则;3. 模拟开户;4. 银期转账;5. 实验角色选择;6. 行情查看与期权选择;7. 期权开仓;8. 期权平仓;9. 核算损益;10. 填写实验报告',
prepare:'完成此实验前,应该了解期货期权的相关定义、期权的交易规则、期权交易的核算规则等相关知识点。' prepare:'完成此实验前,应该了解期货期权的相关定义、期权的交易规则、期权交易的核算规则等相关知识点。'
},{ },{
title:'期权组合保险实验', title:'期权组合保险实验',
url:'https://finance.uestc.cn/kdChallenge/#/Dashboard', url:`${this.$config.baseUrl}/kdChallenge/#/Dashboard`,
principle:'本实验根据《金融交易策略设计与模拟》等理论课程的大纲要求,将期权delta风险中性策略、交叉对冲和期权组合策略设计等知识点融会贯通于十个步骤,考察学生利用期权组合策略减少价格波动对企业经营影响的能力。', principle:'本实验根据《金融交易策略设计与模拟》等理论课程的大纲要求,将期权delta风险中性策略、交叉对冲和期权组合策略设计等知识点融会贯通于十个步骤,考察学生利用期权组合策略减少价格波动对企业经营影响的能力。',
step:'1.关于delta动态调仓的实验背景;2.关于交叉对冲的实验背景;3.实验案例;4.最优对冲比率计算;5.合约选择;6.期权组合开仓;7.期权组合调仓;8.期权组合平仓;9.核算损益;10.填写实验报告;', step:'1.关于delta动态调仓的实验背景;2.关于交叉对冲的实验背景;3.实验案例;4.最优对冲比率计算;5.合约选择;6.期权组合开仓;7.期权组合调仓;8.期权组合平仓;9.核算损益;10.填写实验报告;',
prepare:'开始实验前,应了解期权定义、期权交易规则、希腊字母delta、交叉对冲和不同期权组合策略的盈亏图。' prepare:'开始实验前,应了解期权定义、期权交易规则、希腊字母delta、交叉对冲和不同期权组合策略的盈亏图。'
},{ },{
title:'期货套期保值实验', title:'期货套期保值实验',
url:'https://finance.uestc.cn/future/#/Dashboard', url:`${this.$config.baseUrl}/future/#/Dashboard`,
principle:'本实验根据《金融交易策略设计与模拟》等理论课程的大纲要求,将期货基础知识考核、期货实战规则、模拟开户和期货策略设计等内容融会贯通于十个步骤,考察学生利用期货策略减少价格波动对企业经营影响的能力。',
step:'1. 期货交易实例;2. 期货实战规则;3. 期货账户开户;4. 银期转账;5. 实验案例和实验角色选择;6. 期货合约选择;7. 期货合约开仓;8. 期货合约平仓;9.核算损益;10. 填写实验报告',
prepare:'完成此实验前,应该了解期货的相关定义、期货的交易规则、期货交易的核算规则等相关知识点。'
},{
title:'期货套利实验',
url: `${this.$config.baseUrl}/future/#/Dashboard`,
principle:'本实验根据《金融交易策略设计与模拟》等理论课程的大纲要求,将期货基础知识考核、期货实战规则、模拟开户和期货策略设计等内容融会贯通于十个步骤,考察学生利用期货策略减少价格波动对企业经营影响的能力。', principle:'本实验根据《金融交易策略设计与模拟》等理论课程的大纲要求,将期货基础知识考核、期货实战规则、模拟开户和期货策略设计等内容融会贯通于十个步骤,考察学生利用期货策略减少价格波动对企业经营影响的能力。',
step:'1. 期货交易实例;2. 期货实战规则;3. 期货账户开户;4. 银期转账;5. 实验案例和实验角色选择;6. 期货合约选择;7. 期货合约开仓;8. 期货合约平仓;9.核算损益;10. 填写实验报告', step:'1. 期货交易实例;2. 期货实战规则;3. 期货账户开户;4. 银期转账;5. 实验案例和实验角色选择;6. 期货合约选择;7. 期货合约开仓;8. 期货合约平仓;9.核算损益;10. 填写实验报告',
prepare:'完成此实验前,应该了解期货的相关定义、期货的交易规则、期货交易的核算规则等相关知识点。' prepare:'完成此实验前,应该了解期货的相关定义、期货的交易规则、期货交易的核算规则等相关知识点。'
@ -76,16 +84,21 @@ export default {
this.$router.go(-1) this.$router.go(-1)
}, },
toPrac(){ toPrac(){
if(this.pattern == 2){
sessionStorage.setItem("model",0);
this.core.toSubSystem('','','',0)
}else{
this.core.toSubSystem('','','',this.pattern) this.core.toSubSystem('','','',this.pattern)
} // if(this.pattern == 2){
// sessionStorage.setItem("model",this.pattern);
// this.core.toSubSystem('','','',0)
// }else if(this.pattern == 3){
// sessionStorage.setItem("model",this.pattern);
// this.core.toSubSystem('','','',0)
// }else{
// this.core.toSubSystem('','','',this.pattern)
// }
}, },
toNext(index) { toNext(index) {
sessionStorage.setItem('pattern',this.pattern) sessionStorage.setItem('pattern',this.pattern)
this.$router.push(`dashboard#${index}`) this.$router.push(`dashboard#${index}`)
sessionStorage.setItem('isOld',true)
}, },
}, },
}; };

@ -1,5 +1,8 @@
<template> <template>
<div class="pd20"> <div class="pd20">
<div class="back">
<i class="el-icon-back" @click="toBack">&nbsp;返回</i>
</div>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="mgb20">
<div class="cka-Overview"> <div class="cka-Overview">
<p style="padding-bottom: 10px;font-size: 16px">实验概览</p> <p style="padding-bottom: 10px;font-size: 16px">实验概览</p>
@ -51,6 +54,18 @@ export default {
this.getData(); this.getData();
}, },
methods: { methods: {
//
toBack(){
if(sessionStorage.getItem('isOld')){
this.$router.go(-1)
sessionStorage.removeItem('isOld')
}else{
this.$router.push(`/dashboard#0`)
location.reload()
}
},
getData() { getData() {
this.$get(`${this.api.fictitiousScore}/${this.userId}`, {}) this.$get(`${this.api.fictitiousScore}/${this.userId}`, {})
.then(res => { .then(res => {
@ -69,6 +84,16 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.back{
height: 40px;
line-height: 40px;
font-size: 20px;
color: #5277F7;
i:hover{
cursor: pointer;
opacity: 0.7;
}
}
.horizontalVerticalCenter { .horizontalVerticalCenter {
display: flex; display: flex;
align-items: center; align-items: center;

@ -133,7 +133,7 @@ export default {
methods: { methods: {
// //
getVerificationCode(){ getVerificationCode(){
this.verifyCode = `https://finance.uestc.cn/evaluation/tms/userInfo/getValidateCode?id=${Math.random()}` this.verifyCode = `http://116.63.168.79/evaluation/tms/userInfo/getValidateCode?id=${Math.random()}`
}, },
getProvince(){ getProvince(){
this.$get(this.api.queryProvince).then(res => { this.$get(this.api.queryProvince).then(res => {

@ -116,9 +116,17 @@
<div class="meta-title-wrap"> <div class="meta-title-wrap">
<p class="meta-title"><i class="el-icon-discount"></i> 实验数据及结果分析</p> <p class="meta-title"><i class="el-icon-discount"></i> 实验数据及结果分析</p>
</div> </div>
<div class="reportCard_view reportCard_bck mat20" v-if="pattern == 0">
<div class="reportCard_bor mat20">
<div class="flex-between ">
<div> <div>
<div class="data-wrap"> <div class="flex-between">
<el-table :data="goodsData" :span-method="objectSpanMethod" stripe header-align="center" style="flex: 1;margin-right: 10px"> <div class="flex-center">
<p class="hr_tag"></p>
<span class="hr_text"> &nbsp;&nbsp;现货盈亏</span>
</div>
</div>
<el-table :data="patternOne.goodsData" :span-method="objectSpanMethod" stripe header-align="center" class="mat10">
<el-table-column prop="name" label="现货" align="center"></el-table-column> <el-table-column prop="name" label="现货" align="center"></el-table-column>
<el-table-column prop="num" label="数量" align="center"></el-table-column> <el-table-column prop="num" label="数量" align="center"></el-table-column>
<el-table-column prop="time" label="时间" align="center"></el-table-column> <el-table-column prop="time" label="时间" align="center"></el-table-column>
@ -126,7 +134,18 @@
<el-table-column prop="marketValue" label="现货市值" align="center"></el-table-column> <el-table-column prop="marketValue" label="现货市值" align="center"></el-table-column>
<el-table-column prop="proftAndLoss" label="累计盈亏" align="center"></el-table-column> <el-table-column prop="proftAndLoss" label="累计盈亏" align="center"></el-table-column>
</el-table> </el-table>
<el-table :data="futuresData" :span-method="objectSpanMethod1" stripe header-align="center" style="flex: 1;margin-right: 10px"> </div>
<div class="add_img">
<img src="../../assets/img/add.png" alt="">
</div>
<div>
<div class="flex-between">
<div class="flex-center">
<p class="hr_tag"></p>
<span class="hr_text"> &nbsp;&nbsp;期权盈亏</span>
</div>
</div>
<el-table :data="patternOne.futuresData" :span-method="objectSpanMethod1" stripe header-align="center" class="mat10">
<el-table-column prop="name" label="期权名称" align="center"></el-table-column> <el-table-column prop="name" label="期权名称" align="center"></el-table-column>
<el-table-column prop="dir" label="交易方向" align="center"></el-table-column> <el-table-column prop="dir" label="交易方向" align="center"></el-table-column>
<el-table-column prop="num" label="数量" align="center"></el-table-column> <el-table-column prop="num" label="数量" align="center"></el-table-column>
@ -136,16 +155,177 @@
<el-table-column prop="proftAndLoss" label="累计盈亏" align="center"></el-table-column> <el-table-column prop="proftAndLoss" label="累计盈亏" align="center"></el-table-column>
</el-table> </el-table>
</div> </div>
<div class="add_img">
<div class="data-wrap"> <img src="../../assets/img/equal.png" alt="">
<el-table :data="futuresLoss" stripe header-align="center"> </div>
<el-table-column prop="futuresLoss" label="策略总盈亏" align="center"></el-table-column> <div>
<div class="flex-between">
<div class="flex-center">
<p class="hr_tag"></p>
<span class="hr_text"> &nbsp;&nbsp;策略总盈亏</span>
</div>
</div>
<el-table :data="patternOne.futuresLoss" stripe header-align="center" class="mat10">
<el-table-column prop="futuresLoss" width="110" label="策略总盈亏" align="center"></el-table-column>
</el-table>
</div>
</div>
<div class="mat20">
<div class="flex-between">
<div class="flex-center">
<p class="hr_tag"></p>
<span class="hr_text"> &nbsp;&nbsp;套期保值率</span>
</div>
</div>
<el-table :data="patternOne.hisPositionData1" stripe header-align="center" class="mat10" >
<el-table-column prop="percent" label="套期保值率" align="center"></el-table-column> </el-table>
</div>
</div>
</div>
<div class="reportCard_bor mat20" v-if="pattern == 1">
<div class="history_content">
<div >
<div class="flex-between">
<div class="flex-center">
<p class="hr_tag"></p>
<span class="hr_text"> &nbsp;&nbsp;现货盈亏情况</span>
</div>
</div>
<div>
<el-table
:data="patternTwo.goodsData"
stripe
header-align="center"
class="mat10"
>
<el-table-column prop="endTime" label="数据时间" width="180" align="center"></el-table-column>
<el-table-column prop="timeForStock" label="持仓时间段" align="center"></el-table-column>
<el-table-column prop="stackName" label="现货" align="center"></el-table-column>
<el-table-column prop="trading" label="头寸" align="center"></el-table-column>
<el-table-column prop="num" label="数量" align="center"></el-table-column>
<el-table-column prop="startPrice" label="启始价格" align="center"></el-table-column>
<el-table-column prop="stockPrice" label="当日价格" align="center"></el-table-column>
<el-table-column prop="stageLoss" label="阶段盈亏" align="center"></el-table-column>
<el-table-column prop="totalLossDto" label="累计盈亏" align="center"></el-table-column>
</el-table> </el-table>
<el-table :data="hisPositionData1" stripe header-align="center" class="mat20"> </div>
</div>
</div>
<div>
<div>
<div class="flex-between">
<div class="flex-center">
<p class="hr_tag"></p>
<span class="hr_text"> &nbsp;&nbsp;期权持仓与盈亏情况</span>
</div>
</div>
<div>
<el-table
:data="patternTwo.hisPositionData"
stripe
header-align="center"
class="mat10"
>
<el-table-column prop="openTime" label="数据时间" width="180" align="center"></el-table-column>
<el-table-column prop="endTime" label="持仓时间段" align="center"></el-table-column>
<el-table-column prop="optionName" label="期权合约名称" align="center"></el-table-column>
<el-table-column prop="trading" label="交易方向" align="center"></el-table-column>
<el-table-column prop="num" label="数量(手)" align="center"></el-table-column>
<el-table-column prop="openPrice" label="启始价格" align="center"></el-table-column>
<el-table-column prop="endPrice" label="当日价格" align="center"></el-table-column>
<el-table-column prop="totalLoss" label="阶段盈亏" align="center"></el-table-column>
<el-table-column prop="delta" label="当日delta" align="center"></el-table-column>
<el-table-column prop="totalLoss" label="累计盈亏" align="center"></el-table-column>
</el-table>
</div>
</div>
<div>
<el-table
:data="patternTwo.hisPositionData1"
stripe
header-align="center"
class="mat10"
>
<el-table-column prop="totalLoss" label="总盈亏" align="center"></el-table-column>
<el-table-column prop="percent" label="套期保值率" align="center"></el-table-column> <el-table-column prop="percent" label="套期保值率" align="center"></el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
</div>
<div class="reportCard_view reportCard_bck mat20" v-if="pattern == 2">
<div class="flex-center">
<p class="hr_tag"></p>
<span class="hr_text">实验数据</span>
</div>
<div class="reportCard_bor mat20">
<div class="flex-between ">
<div>
<div class="flex-between">
<div class="flex-center">
<p class="hr_tag"></p>
<span class="hr_text"> &nbsp;&nbsp;现货盈亏</span>
</div>
</div>
<el-table :data="patternThree.goodsData" :span-method="objectSpanMethod" stripe header-align="center" class="mat10">
<el-table-column prop="name" label="现货" align="center"></el-table-column>
<el-table-column prop="num" label="数量" align="center"></el-table-column>
<el-table-column prop="time" label="时间" align="center"></el-table-column>
<el-table-column prop="price" label="价格" align="center"></el-table-column>
<el-table-column prop="marketValue" label="现货市值" align="center"></el-table-column>
<el-table-column prop="proftAndLoss" label="累计盈亏" align="center"></el-table-column>
</el-table>
</div>
<div class="add_img">
<img src="../../assets/img/add.png" alt="">
</div>
<div>
<div class="flex-between">
<div class="flex-center">
<p class="hr_tag"></p>
<span class="hr_text"> &nbsp;&nbsp;期货盈亏</span>
</div>
</div>
<el-table :data="patternThree.futuresData" :span-method="objectSpanMethod1" stripe header-align="center" class="mat10">
<el-table-column prop="name" label="期货名称" align="center"></el-table-column>
<el-table-column prop="dir" label="交易方向" align="center"></el-table-column>
<el-table-column prop="num" label="数量" align="center"></el-table-column>
<el-table-column prop="time" label="时间" align="center"></el-table-column>
<el-table-column prop="price" label="价格" align="center"></el-table-column>
<el-table-column prop="marketValue" label="期货市值" align="center"></el-table-column>
<el-table-column prop="proftAndLoss" label="累计盈亏" align="center"></el-table-column>
</el-table>
</div>
<div class="add_img">
<img src="../../assets/img/equal.png" alt="">
</div>
<div>
<div class="flex-between">
<div class="flex-center">
<p class="hr_tag"></p>
<span class="hr_text"> &nbsp;&nbsp;策略总盈亏</span>
</div>
</div>
<el-table :data="patternThree.futuresLoss" stripe header-align="center" class="mat10">
<el-table-column prop="futuresLoss" width="110" label="策略总盈亏" align="center"></el-table-column>
</el-table>
</div>
</div>
<div class="mat20">
<div class="flex-between">
<div class="flex-center">
<p class="hr_tag"></p>
<span class="hr_text"> &nbsp;&nbsp;套期保值率</span>
</div>
</div>
<el-table :data="patternThree.hisPositionData1" stripe header-align="center" class="mat10" >
<el-table-column prop="level" label="套期保值率" align="center"></el-table-column>
</el-table>
</div>
</div>
</div>
<div v-if="pattern == 3">
</div>
<el-input style="margin-top: 20px" v-model="form.analysis" type="textarea" :disabled="true" rows="5"></el-input> <el-input style="margin-top: 20px" v-model="form.analysis" type="textarea" :disabled="true" rows="5"></el-input>
</div> </div>
@ -200,6 +380,7 @@
userId: this.$store.state.userId, userId: this.$store.state.userId,
studentId: this.$store.state.studentId, studentId: this.$store.state.studentId,
userName: this.$store.state.userName, userName: this.$store.state.userName,
pattern:Number(sessionStorage.getItem('pattern')),
form: { form: {
analysis: '', analysis: '',
conclusion: '', conclusion: '',
@ -226,13 +407,29 @@
comment: '' comment: ''
}, },
signSrc: '', signSrc: '',
sjData: [], patternOne:{
infoData: [],
expData: [],
goodsData:[], goodsData:[],
futuresData:[], futuresData:[],
futuresLoss:[], futuresLoss:[],
hisPositionData1:[] hisPositionData1:[]
},
patternTwo:{
goodsData:[],
hisPositionData:[],
hisPositionData1:[]
},
patternThree:{
goodsData:[],
futuresData:[],
futuresLoss:[],
hisPositionData1:[]
},
patternFour:{
},
sjData: [],
infoData: [],
expData: [],
} }
}, },
mounted(){ mounted(){
@ -252,13 +449,37 @@
if(i.includes('steps') && report[i]) steps.push(JSON.parse(report[i])) if(i.includes('steps') && report[i]) steps.push(JSON.parse(report[i]))
} }
this.form = report this.form = report
switch(this.pattern)
{
case 0:
if(report.steps9){
let steps9 = JSON.parse(report.steps9)
this.patternOne.goodsData = steps9.goodsData ? steps9.goodsData: []
this.patternOne.futuresData = steps9.futuresData ? steps9.futuresData: []
this.patternOne.futuresLoss = steps9.futuresLoss ? steps9.futuresLoss: []
this.patternOne.hisPositionData1 = steps9.hisPositionData1 ? steps9.hisPositionData1: []
}
break;
case 1:
if(report.steps9){
let steps9 = JSON.parse(report.steps9)
this.patternTwo.goodsData = steps9.goodsData ? steps9.goodsData: []
this.patternTwo.hisPositionData = steps9.hisPositionData ? steps9.hisPositionData: []
this.patternTwo.hisPositionData1 = steps9.hisPositionData1 ? steps9.hisPositionData1: []
}
break;
case 2:
if(report.steps9){ if(report.steps9){
let steps9 = JSON.parse(report.steps9) let steps9 = JSON.parse(report.steps9)
this.goodsData = steps9.goodsData ? steps9.goodsData: [] this.patternThree.goodsData = steps9.goodsData ? steps9.goodsData: []
this.futuresData = steps9.futuresData ? steps9.futuresData: [] this.patternThree.futuresData = steps9.futuresData ? steps9.futuresData: []
this.futuresLoss = steps9.futuresLoss ? steps9.futuresLoss: [] this.patternThree.futuresLoss = steps9.futuresLoss ? steps9.futuresLoss: []
this.hisPositionData1 = steps9.hisPositionData1 ? steps9.hisPositionData1: [] this.patternThree.hisPositionData1 = steps9.hisPositionData1 ? steps9.hisPositionData1: []
} }
break;
}
let score = res.data.score let score = res.data.score
let answerList = [] let answerList = []
@ -388,6 +609,30 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.mat10{
margin-top: 10px;
margin-bottom: 10px;
}
.reportCard_view {
padding: 20px 40px;
}
.reportCard_bck {
background-color: #f9f9f9;
}
.add_img{
img{
width: 80px;
min-width: 50px;
max-width: 100px;
}
}
.reportCard_bor {
width: 100%;
overflow: auto;
border: 1px solid #b2b2b2;
border-radius: 6px;
padding: 20px 10px;
}
.box{ .box{
background-color: #fff; background-color: #fff;
} }
@ -491,5 +736,6 @@
} }
/deep/.data-wrap{ /deep/.data-wrap{
display: flex; display: flex;
} }
</style> </style>

@ -1,5 +1,6 @@
<template> <template>
<div class="box"> <div class="box">
<el-page-header @back="core.goBack" ></el-page-header>
<!-- 项目介绍与视频导航栏 --> <!-- 项目介绍与视频导航栏 -->
<div class="nav_wrap"> <div class="nav_wrap">
<div class="introduce" @click="toPreview">项目介绍</div> <div class="introduce" @click="toPreview">项目介绍</div>

@ -9,20 +9,32 @@ export default {
* 用来在菜单中显示文字 * 用来在菜单中显示文字
*/ */
locale: 'zh', locale: 'zh',
/**
* @description 基础url
*/
baseUrl: location.host.includes('116.63.168.79') ? 'http://116.63.168.79' : 'http://122.9.154.146',
/** /**
* @description 基础模式子系统链接 * @description 基础模式子系统链接
*/ */
subSystem1: location.host.includes('116.63.168.79') ? 'http://116.63.168.79/kd/#/Dashboard' : 'https://finance.uestc.cn/kd/#/Dashboard', subSystem1: location.host.includes('116.63.168.79') ? 'http://116.63.168.79/kd/#/Dashboard' : 'http://122.9.154.146/kd/#/Dashboard',
/** /**
* @description 挑战模式子系统链接 * @description 挑战模式子系统链接
*/ */
subSystem2: location.host.includes('116.63.168.79') ? 'http://116.63.168.79/kdChallenge/#/Dashboard' : 'https://finance.uestc.cn/kdChallenge/#/Dashboard', subSystem2: location.host.includes('116.63.168.79') ? 'http://116.63.168.79/kdChallenge/#/Dashboard' : 'http://122.9.154.146/kdChallenge/#/Dashboard',
/** /**
* @description 期货模式 * @description 期货模式
*/ */
subSystem3: location.host.includes('116.63.168.79') ? 'http://116.63.168.79/future/#/Dashboard' : 'https://finance.uestc.cn/future/#/Dashboard', subSystem3: location.host.includes('116.63.168.79') ? 'http://116.63.168.79/future/#/Dashboard' : 'http://122.9.154.146//future/#/Dashboard',
/**
* @description 期货套利模式
*/
subSystem4: location.host.includes('116.63.168.79') ? 'http://116.63.168.79/futureArbitrage/#/Dashboard' : 'http://122.9.154.146/futureArbitrage/#/Dashboard',
/** /**
* @description 专家账号 * @description 专家账号
*/ */
studentIds: [1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513] studentIds: [1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513],
/**
* @description 半个小时未操作自动退出登录时间
*/
autoLogoutTime: 1800000,
} }

@ -3,13 +3,11 @@ import axios from 'axios';
// let host = 'http://192.168.31.151:9090'//榕 // let host = 'http://192.168.31.151:9090'//榕
// let host = 'http://192.168.31.137:9090'//陈 // let host = 'http://192.168.31.137:9090'//陈
// let host = 'http://192.168.31.205:9090'//杨 // let host = 'http://192.168.31.205:9090'//杨
// let host = 'https://finance.uestc.cn'
// let host = 'https://finance.uestc.cn'//学校内网 // let host = 'https://finance.uestc.cn/'//学校内网
let host = '' let host = ''
if(process.env.NODE_ENV === 'development'){ if(process.env.NODE_ENV === 'development'){
// host = 'https://finance.uestc.cn' host = 'http://122.9.154.146'
host = 'https://finance.uestc.cn'
} }
export default { export default {
@ -45,7 +43,6 @@ export default {
getAccessNum:`${host}/evaluation/tms/userInfo/getAccessNum`,//获取项目访问量 getAccessNum:`${host}/evaluation/tms/userInfo/getAccessNum`,//获取项目访问量
getValidateCode:`${host}/evaluation/tms/userInfo/getValidateCode`,//获取图形验证码 getValidateCode:`${host}/evaluation/tms/userInfo/getValidateCode`,//获取图形验证码
examinePassword:`${host}/evaluation/tms/user/examinePassword`,//更换密码 examinePassword:`${host}/evaluation/tms/user/examinePassword`,//更换密码
userinfoUpdate:`${host}/evaluation/tms/user/update`,//个人中心信息修改 userinfoUpdate:`${host}/evaluation/tms/user/update`,//个人中心信息修改
userinfo:`${host}/evaluation/tms/user/userinfo`,//个人中心信息展示 userinfo:`${host}/evaluation/tms/user/userinfo`,//个人中心信息展示

@ -2,6 +2,7 @@ import config from '@/config'
import store from '@/store' import store from '@/store'
import api from '@/utils/api' import api from '@/utils/api'
import {get} from '@/utils/http' import {get} from '@/utils/http'
import router from '@/router/index.js';
const pad2 = str => ('0' + str).substr(-2) const pad2 = str => ('0' + str).substr(-2)
function fMoney (s, n) { function fMoney (s, n) {
@ -169,6 +170,8 @@ function toSubSystem(className = '',id = '',classId = '',pattern = ''){
sessionStorage.setItem("kdAssessmentId",id);//竞赛id sessionStorage.setItem("kdAssessmentId",id);//竞赛id
sessionStorage.setItem("classId",classId);//班级id sessionStorage.setItem("classId",classId);//班级id
sessionStorage.setItem("userId",store.state.userId);//用户id sessionStorage.setItem("userId",store.state.userId);//用户id
sessionStorage.setItem("pattern",pattern);//用户id
// 空为练习,不是空即为考核或者竞赛,
if(sessionStorage.getItem('id') != ''){ if(sessionStorage.getItem('id') != ''){
//如果班级id不为空,即为考核模式,否则为竞赛模式 //如果班级id不为空,即为考核模式,否则为竞赛模式
let source = '' let source = ''
@ -190,12 +193,26 @@ function toSubSystem(className = '',id = '',classId = '',pattern = ''){
location.href = pattern === 0 ? config.subSystem1 : config.subSystem2 location.href = pattern === 0 ? config.subSystem1 : config.subSystem2
}) })
}else{ }else{
//如果session中存在model,即为期货,否则为期权 switch(pattern)
if(sessionStorage.getItem('model')){ {
case 0:
location.href = config.subSystem1
break;
case 1:
location.href = config.subSystem2
break;
case 2:
location.href = config.subSystem3 location.href = config.subSystem3
}else{ break;
location.href = pattern === 0 ? config.subSystem1 : config.subSystem2 case 3:
location.href = config.subSystem4
break;
} }
// if(sessionStorage.getItem('model')){
// location.href = sessionStorage.getItem('model') == 2 ? config.subSystem3 : config.subSystem4
// }else{
// location.href = pattern === 0 ? config.subSystem1 : config.subSystem2
// }
} }
} }
@ -220,6 +237,12 @@ function logout(){
location.reload() location.reload()
} }
//返回上一页
function goBack(){
router.go(-1)
}
function autoLogout(){ function autoLogout(){
let lastTime = new Date().getTime() let lastTime = new Date().getTime()
document.onmousedown = () => { document.onmousedown = () => {
@ -239,6 +262,7 @@ export default{
orderfounder, orderfounder,
projectPermissions, projectPermissions,
orderassesmentState, orderassesmentState,
goBack,
fMoney, fMoney,
fMoney2, fMoney2,
toDateTime, toDateTime,

Loading…
Cancel
Save