期货跳转

chengdu
liangliang.Li 4 years ago
commit 623b1b2e89
  1. BIN
      src.rar
  2. 10
      src/components/common/Studentcommon/FictitiousList.vue
  3. 7
      src/components/common/Studentcommon/TeachingList.vue
  4. 7
      src/components/common/Studentcommon/competitionList.vue
  5. 32
      src/components/page/Assessment.vue
  6. 26
      src/components/page/Dashboard.vue
  7. 104
      src/components/page/Index.vue
  8. 573
      src/components/page/Login.vue
  9. 4
      src/components/page/PersonalCenter.vue
  10. 26
      src/components/page/Project.vue
  11. 2
      src/components/page/ProjectIntro.vue
  12. 13
      src/components/page/TeachingVideo.vue
  13. 6
      src/config/index.js
  14. 20
      src/main.js
  15. 9
      src/router/index.js
  16. 6
      src/store/index.js
  17. 9
      src/utils/api.js
  18. 10
      src/utils/core.js
  19. 7
      src/utils/http.js

Binary file not shown.

@ -33,7 +33,10 @@
export default {
data() {
return {
<<<<<<< HEAD
pattern: Number(sessionStorage.getItem('pattern')),
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
totals: 0,
tableData: [],
userId: this.$store.state.userId,
@ -42,7 +45,10 @@ export default {
};
},
created() {
<<<<<<< HEAD
console.log(11,this.$route)
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
this.getData();
},
methods: {
@ -63,8 +69,12 @@ export default {
page: this.pageNo,
size: this.pageSize,
source: 0,
<<<<<<< HEAD
systemId: 3,
pattern: this.pattern
=======
systemId: 3
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
})
.then(res => {
let data = res.data

@ -45,7 +45,10 @@
export default {
data() {
return {
<<<<<<< HEAD
pattern: Number(sessionStorage.getItem('pattern')),
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
totals: 0,
tableData: [],
userId: this.$store.state.userId,
@ -92,8 +95,12 @@ export default {
size: this.pageSize,
searchContent: this.core.encodeString(this.searchContent),
source: 2,
<<<<<<< HEAD
systemId: 3,
pattern: this.pattern
=======
systemId: 3
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
})
.then(res => {
let data = res.data

@ -35,7 +35,10 @@
export default {
data() {
return {
<<<<<<< HEAD
pattern: Number(sessionStorage.getItem('pattern')),
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
totals: 0,
tableData: [],
userId: this.$store.state.userId,
@ -64,8 +67,12 @@ export default {
page: this.pageNo,
size: this.pageSize,
source: 1,
<<<<<<< HEAD
systemId: 3,
pattern: this.pattern
=======
systemId: 3
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
})
.then(res => {
let data = res.data

@ -11,14 +11,22 @@
<div>
<el-form label-width="80px">
<el-form-item label="实验班级" class="userRadio">
<<<<<<< HEAD
<el-radio-group v-model="form.classId" @change="getData">
=======
<el-radio-group v-model="form.classId" @change="initData">
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
<el-radio label="" border>不限</el-radio>
<el-radio v-for="(item,index) in classList" :key="index" :label="item.classId" border>{{item.className}}</el-radio>
</el-radio-group>
</el-form-item>
<div class="flex-between no-mb">
<el-form-item label="考核状态">
<<<<<<< HEAD
<el-select v-model="form.status" clearable placeholder="请选择实验状态" @change="getData">
=======
<el-select v-model="form.status" clearable placeholder="请选择实验状态" @change="initData">
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
@ -98,7 +106,10 @@ export default {
name: 'project',
data() {
return {
<<<<<<< HEAD
pattern: Number(sessionStorage.getItem('pattern')),
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
userId: this.$store.state.userId,
roleId: this.$store.state.accountRole,
name: sessionStorage.getItem('ms_username'),
@ -141,12 +152,19 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
<<<<<<< HEAD
this.getData()
=======
this.initData()
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
},500)
}
},
mounted() {
<<<<<<< HEAD
console.log(22,this.pattern)
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
this.getClass()
this.getData()
this.timer = setInterval(this.getData,1000)
@ -167,7 +185,10 @@ export default {
status: this.form.status,
pageNum: 1,
pageSize: 10000,
<<<<<<< HEAD
pattern: this.pattern
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
}
this.$post(this.api.stuAssessmentByScreen,data).then(res => {
let list = res.list.list
@ -217,6 +238,13 @@ export default {
this.handlePage()
}).catch(err => {})
},
<<<<<<< HEAD
=======
initData(){
this.pageNo = 1
this.getData()
},
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
handlePage(){
let list = this.listDataAll
this.listData = list.slice((this.pageNo - 1) * this.pageSize,this.pageNo * this.pageSize)
@ -239,7 +267,11 @@ export default {
}else if(row.status == 3){
return this.$message.warning('该实验已经结束')
}else{
<<<<<<< HEAD
this.core.toSubSystem(row.className,row.id,row.classId,this.pattern)
=======
this.core.toSubSystem(row.className,row.id,row.classId)
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
}
},
show(row) {

@ -1,8 +1,13 @@
<template>
<div>
<<<<<<< HEAD
<div v-show="activeName!='index'" class="back_index" @click="toIndex"><i class="iconfont icon-home"></i></div>
<div class="header_tab">
<!-- <el-tabs v-model="activeName" @tab-click="tabChange" :before-leave="saveActive">
=======
<div class="header_tab">
<el-tabs v-model="activeName" @tab-click="tabChange" :before-leave="saveActive">
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
<el-tab-pane label="首页" name="index">
</el-tab-pane>
@ -21,8 +26,12 @@
<el-tab-pane label="实验记录" name="fifth">
</el-tab-pane>
<<<<<<< HEAD
</el-tabs> -->
=======
</el-tabs>
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
<Index v-if="activeName=='index'"></Index>
<TeachingVideo v-if="!showProject && activeName!='fourth' && activeName!='fifth' && activeName!='index' && activeName!='second'"></TeachingVideo>
<Project v-if="showProject"></Project>
@ -153,7 +162,11 @@ export default {
}
},
mounted() {
<<<<<<< HEAD
// this.getClass()
=======
this.getClass()
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
this.addDefault()
this.$once('hook:beforeDestroy', function () {
clearInterval(this.timer)
@ -171,10 +184,13 @@ export default {
Assessment
},
methods: {
<<<<<<< HEAD
toIndex() {
// this.$router.push('dashboard')
this.activeName = 'index'
},
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
getClass(){
this.$get(`${this.api.mineClass}?userId=${this.userId}`).then(res => {
if(!res.list.length){
@ -206,7 +222,11 @@ export default {
if(hash == this.routeName){
location.hash = `${hash}#0`
}else{
<<<<<<< HEAD
let index = hash.replace(`${this.routeName}#`,'').replace(/\?pattern=\d/,'')
=======
let index = hash.replace(`${this.routeName}#`,'')
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
this.activeName = this.tabNameList[index]
if(index == 3 && !isIndex){
@ -408,6 +428,7 @@ export default {
outline: none;
box-shadow: none !important;
}
<<<<<<< HEAD
.back_index:hover{
opacity: 0.8;
cursor: pointer;
@ -428,6 +449,8 @@ export default {
font-weight: 600;
line-height: 80px;
}
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
h3{
color: #328aff;
margin-bottom: 10px;
@ -587,7 +610,10 @@ h3{
max-height:calc(100% - 30px);
max-width:calc(100% - 30px);
}
<<<<<<< HEAD
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
/deep/.evaluation_dialog .el-dialog__body{
flex:1;
overflow: auto;

@ -1,4 +1,5 @@
<template>
<<<<<<< HEAD
<div class="wrap">
<div class="button_wrap">
<div class="button_item" @click="toNext(0)"><i class="iconfont icon-arrowRight"></i></div>
@ -20,12 +21,46 @@ export default {
data() {
return {
=======
<div class="box">
<h1>欢迎来到{{systemName}}</h1>
<h2>以下是本实验系统的使用说明点击上方导航中的按钮可进入相关模块</h2>
<ul class="list">
<li @click="toTab(1)">
<p class="title">①课前预习</p>
<p class="text">在开始{{systemName}}需要先在课前预习中完成能力测试正确率达到80%才可进入实验;如果觉得自己的基础较差可以点击课前预习中由电子科技学大李强教授主讲的国家级精品在线开放课程金融学基础相关内容进行学习学习相关的课程资料后再进行能力测试</p>
</li>
<li @click="toTab(2)">
<p class="title">②练习模式</p>
<p class="text">点击进入{{systemName}}共3个模式包括基础模式挑战模式对抗模式其中基础模式和挑战模式需要提交实验报告交易对抗模式以游戏对抗为主无需提交实验报告</p>
</li>
<li @click="toTab(3)">
<p class="title">③考核模式</p>
<p class="text">在教学实验中可以查看到老师发布的实验任务</p>
</li>
<li @click="toTab(4)">
<p class="title">④实验记录</p>
<p class="text">在实验记录中可以查看自己已完成实验的实验报告</p>
</li>
</ul>
</div>
</template>
<script>
import bus from '../common/bus'
export default {
name: 'index',
data() {
return {
systemName: '面向粮食安全的期货和期权套期保值虚拟仿真实验'
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
};
},
mounted() {
},
methods: {
<<<<<<< HEAD
toFuture(){
sessionStorage.setItem("model",0);//
this.core.toSubSystem('','','',0)
@ -78,4 +113,73 @@ export default {
}
}
=======
toTab(index){
bus.$emit('tabChange',{index},1)
}
}
};
</script>
<style lang="scss" scoped>
.box{
min-height: calc(100vh - 120px);
padding: 45px 6%;
background: url(../../assets/img/index-bg.jpg) 0 0/100% 100% no-repeat;
h1{
font-size: 36px;
color: #95c2ff;
text-align: center;
}
h2{
margin: 78px 0 65px;
font-size: 23px;
color: #fff;
}
.list{
display: flex;
flex-wrap: wrap;
justify-content: space-between;
li{
position: relative;
width: 43%;
height: 260px;
padding: 45px 25px 25px;
background: url(../../assets/img/index-bd.png) 0 0/100% 100% no-repeat;
box-sizing: border-box;
cursor: pointer;
.title{
position: absolute;
top: 0;
left: 0;
width: 100%;
font-size: 21px;
color: #fff;
text-align: center;
font-weight: bold;
}
.text{
height: 100%;
padding: 40px 20px;
background-color: rgba(51,64,255,.7);
color: #fff;
font-size: 17px;
line-height: 1.6;
box-sizing: border-box;
}
&:nth-child(odd){
margin-right: 10%;
}
&:first-child,&:nth-child(2){
margin-bottom: 50px;
}
&:last-child,&:nth-child(3){
.text{
background-color: rgba(138,40,226,.7);
}
}
}
}
}
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
</style>

@ -1,5 +1,6 @@
<template>
<div class="wrap">
<<<<<<< HEAD
<!-- 顶部栏目 -->
<div class="bar flex-between">
<div class="icon_wrap">
@ -32,10 +33,151 @@
<div class="count_people">实验人数&nbsp;{{proAccessNum.testNum}}</div>
</div>
</div>
=======
<div class="left">
<img src="../../assets/img/logo.png" alt="">
<div class="text">
<p>欢迎进入面向粮食安全的</p>
<p>期货和期权套期保值</p>
<p>虚拟仿真实验</p>
</div>
</div>
<div class="right">
<div class="back" v-show="isReg" @click="toReg(false)">
<i class="el-icon-back"></i>
</div>
<div v-if="!isReg" class="ms-login">
<el-tabs v-model="activeName">
<el-tab-pane label="账号登录" name="0">
<el-form :model="loginForm" :rules="loginRules" ref="loginForm" style="margin-top: 20px">
<el-form-item label="用户名" prop="username">
<el-input v-model="loginForm.username" placeholder="请输入账号"></el-input>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-input
type="password"
placeholder="请输入密码"
v-model="loginForm.password"
@keyup.enter.native="getSchool('loginForm')"
>
</el-input>
</el-form-item>
<el-button class="submit" type="primary" @click="getSchool('loginForm')">登录</el-button>
</el-form>
</el-tab-pane>
<el-tab-pane label="手机号/邮箱登录" name="1">
<el-form :model="phoneParam" :rules="phoneRules" ref="phoneParam" style="margin-top: 20px">
<el-form-item label="手机号/邮箱" prop="userphone">
<el-input v-model="phoneParam.userphone" placeholder="请输入手机号/邮箱"></el-input>
</el-form-item>
<el-form-item label="密码" prop="phonePassword">
<el-input
type="password"
placeholder="请输入密码"
v-model="phoneParam.phonePassword"
@keyup.enter.native="getSchool('phoneParam')"
>
</el-input>
</el-form-item>
<el-button class="submit" type="primary" @click="getSchool('phoneParam')">登录</el-button>
</el-form>
</el-tab-pane>
</el-tabs>
<div class="links flex-between">
<el-button type="text" class="ques" @click="toReg(true)">前往注册</el-button>
<el-button type="text" class="forget" @click="forget">忘记密码</el-button>
</div>
<!-- <h2>密码登录</h2>
<el-form :model="loginForm" :rules="loginRules" ref="login" label-width="0px">
<el-form-item prop="username">
<p class="label">用户名</p>
<el-input v-model="loginForm.username" placeholder="请输入账号/手机号" @keyup.enter.native="submitForm()"></el-input>
</el-form-item>
<el-form-item prop="password">
<p class="label">密码</p>
<el-input
type="password"
placeholder="请输入密码"
v-model="loginForm.password"
@keyup.enter.native="getSchool()"
>
</el-input>
</el-form-item>
<el-button class="submit" type="primary" @click="getSchool">登录</el-button>
<div class="links flex-between">
<el-button type="text" class="ques" @click="toReg(true)">前往注册</el-button>
<el-button type="text" class="forget" @click="forget">忘记密码</el-button>
</div>
</el-form> -->
</div>
<register v-else :isReg.sync="isReg" @updateInfo="updateInfo"></register>
</div>
<!-- 选择角色 -->
<el-dialog title="选择角色" :visible.sync="roleDialog" width="24%" center :close-on-click-modal="false">
<div>
<el-select v-model="roleId" placeholder="请选择角色">
<el-option v-for="(item,index) in roleList" :key="index" :label="item.roleName" :value="item.roleId"></el-option>
</el-select>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="cancleRoleDia"> </el-button>
<el-button v-if="activeName == '0'" type="primary" @click="roleSure('loginForm')"> </el-button>
<el-button v-else type="primary" @click="roleSure('phoneParam')"> </el-button>
</span>
</el-dialog>
<el-dialog :title="phoneReset ? '手机重置密码' : '邮箱重置密码'" :visible.sync="forgetVisible" :close-on-click-modal="false" @close="closeForget" width="30%">
<template v-if="phoneReset">
<el-form ref="form" label-width="60px">
<el-form-item label="手机号">
<el-input placeholder="请输入手机号" v-model.number="phone" maxlength="11"></el-input>
</el-form-item>
<el-form-item label="验证码">
<div class="flex-between">
<el-input v-model.number="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input>
<el-button style="margin-left: 10px" type="text" @click="sendPhoneCode" :disabled="phoneDisabled">{{phoneBtnText}}</el-button>
</div>
</el-form-item>
<el-form-item label="新密码">
<el-input type="password" placeholder="请输入新密码" v-model="newPassword"></el-input>
</el-form-item>
</el-form>
<div class="switch" @click="switchType(false)"><span>邮箱重置密码</span></div>
<span slot="footer" class="dialog-footer">
<el-button @click="phoneVisible = false"> </el-button>
<el-button type="primary" @click="updatePassword(1)"> </el-button>
</span>
</template>
<template v-else>
<el-form ref="form" label-width="60px">
<el-form-item label="邮箱">
<el-input placeholder="请输入邮箱" v-model="email"></el-input>
</el-form-item>
<el-form-item label="验证码">
<div class="flex-between">
<el-input v-model.number="emailCode" placeholder="请输入验证码" maxlength="6"></el-input>
<el-button style="margin-left: 10px" type="text" @click="sendEmailCode" :disabled="emailDisabled">{{emailBtnText}}</el-button>
</div>
</el-form-item>
<el-form-item label="新密码">
<el-input type="password" placeholder="请输入新密码" v-model="newPassword"></el-input>
</el-form-item>
</el-form>
<div class="switch" @click="switchType(true)"><span>手机重置密码</span></div>
<span slot="footer" class="dialog-footer">
<el-button @click="emailVisible = false"> </el-button>
<el-button type="primary" @click="updatePassword"> </el-button>
</span>
</template>
</el-dialog>
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
</div>
</template>
<script>
<<<<<<< HEAD
import { Loading } from 'element-ui'
export default {
data() {
@ -230,4 +372,435 @@ export default {
font-weight: 50;
}
}
=======
import register from './RegisterForm';
export default {
data: function() {
return {
activeName: '0',
isReg: false,
loginForm: {
username: '15794146134',
password: '111aaa',
},
loginRules: {
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
},
phoneParam: {
userphone: '',
phonePassword: ''
},
phoneRules: {
userphone: [{ required: true, message: '请输入手机号/邮箱', trigger: 'blur' }],
phonePassword: [{ required: true, message: '请输入密码', trigger: 'blur' }],
},
roleDialog: false,
userId: '',
schoolId: '',
roleId: '',
roleList: [],
studentId: '',
forgetVisible: false,
phoneReset: true,
email: '',
emailBtnText: '发送验证码',
emailCode: '',
emailDisabled: false,
emailTimer: null,
phone: '',
phoneBtnText: '发送验证码',
phoneCode: '',
phoneDisabled: false,
phoneTimer: null,
newPassword: '',
emailOpener: '',
phoneOpener: ''
};
},
components: {
register
},
mounted(){
this.$once('hook:beforeDestroy', function () {
clearInterval(this.phoneTimer)
this.phoneTimer = null
clearInterval(this.emailTimer)
this.emailTimer = null
})
},
methods: {
getSchool(form) {
this.$refs[form].validate(valid => {
if (valid) {
let data = {
account: this.activeName == '0' ? this.loginForm.username : this.phoneParam.userphone,
password: this.activeName == '0' ? this.loginForm.password : this.phoneParam.phonePassword,
schoolId: 2105,
source: this.activeName
};
this.$get(this.api.loginSchool, data)
.then(res => {
if(res.status == 200){
this.schoolList = [...res.message.staffList,...res.message.studentList]
let indexs = {}
this.schoolList = this.schoolList.reduce((cur,next) => {
indexs[next.schoolId] ? '' : indexs[next.schoolId] = true && cur.push(next)
return cur
},[])
if(this.schoolList.length >= 1) {
this.schoolId = this.schoolList[0].schoolId
this.userId = this.schoolList[0].userId
this.studentId = this.schoolList[0].studentId
// this.getRole()
this.roleId = 4
this.submitForm(form)
}else{
this.$message.error('账号不存在')
}
}else{
this.$message.error(res.errmessage);
}
})
.catch(res => {});
} else {
this.$message.error('请输入账号和密码');
return false;
}
});
},
getRole(form) {
// this.userId = this.schoolList.find((n,k) => {
// return n.schoolId == this.schoolId
// }).userId
let data = {
userId: this.userId,
schoolId: this.schoolId
};
this.$get(this.api.loginRole, data)
.then(res => {
this.roleList = [...res.message.staffList,...res.message.studentList]
let indexs = {}
this.roleList = this.roleList.reduce((cur,next) => {
indexs[next.roleId] ? '' : indexs[next.roleId] = true && cur.push(next)
return cur
},[])
this.roleList.forEach((n,k) => {
switch(n.roleId){
case 2:
n.roleName = '管理员'
break
case 3:
n.roleName = '老师'
break
case 4:
n.roleName = '学生'
break
}
})
if(this.roleList.length > 1) {
this.roleDialog = true
}else{
this.roleId = this.roleList[0].roleId
this.submitForm(form)
}
})
.catch(res => {});
},
updateInfo(data){
this.loginForm.username = data.username
this.loginForm.password = data.password
},
roleSure(form){
if(this.roleId){
this.submitForm(form)
}else{
this.$message.error('请选择角色!');
}
},
submitForm(form) {
this.$refs[form].validate(valid => {
if (valid) {
let data = {
roleId: this.roleId,
userId: this.userId,
schoolId: this.schoolId
}
this.$get(this.api.logins,data).then(res => {
this.$post(this.api.updateLogInNumber,{userId: this.userId}).then(res => {}).catch(res => {});
this.$message.success('登录成功');
sessionStorage.setItem('kd_client_username', this.activeName == '0' ? this.loginForm.username : this.phoneParam.userphone);
this.$store.commit("userLoginData", { userId : this.userId,accountRole: this.roleId,studentId : this.studentId,schoolId: this.schoolId,token: res.message.user.token});
res.message.user.userAvatars && this.$store.commit("userPhoto", { avatar : res.message.user.userAvatars});
this.$store.commit("userName", { userName : res.message.user.userName});
this.$store.commit("dataTime", { dataTime : res.message.user.dataTime});
let redirect = decodeURIComponent(this.$route.query.redirect || '/dashboard')
this.$router.replace(redirect)
}).catch(res => {});
} else {
// this.$message.error('');
return false;
}
});
},
cancleRoleDia() {
this.roleId = ''
this.roleDialog = false
},
toReg(status) {
this.isReg = status
},
forget(){
this.forgetVisible = true
},
emailCountdown(){
let count = 60
if(!this.emailTimer){
this.emailDisabled = true
this.emailTimer = setInterval(() => {
if(count > 0){
count--
this.emailBtnText = `${count}秒后重试`
}else{
this.emailDisabled = false
clearInterval(this.emailTimer)
this.emailTimer = null
this.emailBtnText = `发送验证码`
}
},1000)
}
},
phoneCountdown(){
let count = 60
if(!this.phoneTimer){
this.phoneDisabled = true
this.phoneTimer = setInterval(() => {
if(count > 0){
count--
this.phoneBtnText = `${count}秒后重试`
}else{
this.phoneDisabled = false
clearInterval(this.phoneTimer)
this.phoneTimer = null
this.phoneBtnText = `发送验证码`
}
},1000)
}
},
closeForget(){
this.phoneCode = ''
this.emailCode = ''
this.userId = ''
this.newPassword = ''
},
sendEmailCode(){
if(!this.email) return this.$message.warning('请输入邮箱')
if(!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return this.$message.warning('请输入正确的邮箱')
let data = {
email: this.email
}
this.$get(this.api.findPasswordByEmail,data).then(res => {
if(res.errmessage == 'success'){
this.$message.success('发送成功')
this.emailCountdown()
this.userId = res.data.userId
this.emailOpener = res.data.opener
}
}).catch(res => {});
},
sendPhoneCode(){
if(!this.phone) return this.$message.warning('请输入手机号')
if(!/^1[3456789]\d{9}$/.test(this.phone)) return this.$message.warning('请输入正确的手机号')
let data = {
phone: this.phone
}
this.$get(this.api.findPasswordByPhone,data).then(res => {
if(res.errmessage == 'success'){
this.$message.success('发送成功')
this.phoneCountdown()
this.userId = res.data.userId
this.phoneOpener = res.data.opener
}
}).catch(res => {});
},
async updatePassword(type){
if(type == 1){
if(!this.phone) return this.$message.warning('请输入手机号')
if(!/^1[3456789]\d{9}$/.test(this.phone)) return this.$message.warning('请输入正确的手机号')
if(!this.phoneCode) return this.$message.warning('请输入验证码')
}else{
if(!this.email) return this.$message.warning('请输入邮箱')
if(!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return this.$message.warning('请输入正确的邮箱')
if(!this.emailCode) return this.$message.warning('请输入验证码')
}
if(!this.newPassword) return this.$message.warning('请输入新密码')
let checkData = {
code: type == 1 ? this.phoneCode : this.emailCode,
opener: type == 1 ? this.phoneOpener : this.emailOpener
}
let checkRes = await this.$post(this.api.checkCode,checkData)
if(checkRes.errmessage == 'success'){
let resetData = {
userId: this.userId,
password: this.newPassword
}
let resetRes = await this.$post(this.api.resetPassword,resetData)
if(resetRes.errmessage == 'success'){
this.$message.success('重置成功')
this.forgetVisible = false
}
}
},
switchType(type){
this.phoneReset = type
}
},
};
</script>
<style scoped lang="scss">
.wrap {
position: relative;
width: 100%;
height: 100%;
background: url(../../assets/img/login_bg.png) 0 0/100% 100% no-repeat;
overflow: hidden;
.logo{
position: absolute;
top: 20px;
left: 72px;
width: 240px;
}
.left{
position: absolute;
top: 50%;
left: 221px;
transform: translateY(-60%);
img{
width: 447px;;
margin-bottom: 30px;
}
.text{
font-size: 47px;
color: #fff;
p{
margin-bottom: 15px;
&:last-child{
margin-bottom: 0;
}
}
}
}
.right{
position: absolute;
top: 50%;
right: 100px;
transform: translateY(-50%);
width: 700px;
padding: 50px 90px 20px;
background-color: #fff;
box-sizing: border-box;
box-shadow: 0 1px 20px rgba(0,0,0,0.16);
.back{
position: absolute;
top: 20px;
left: 20px;
font-size: 24px;
color: #105cb2;
cursor: pointer;
&:hover{
opacity: .8;
}
}
h2{
padding-bottom: 10px;
font-size: 24px;
font-weight: 400;
color: #303d4c;
text-align: center;
border-bottom: 1px solid #E5E5E5;
}
/deep/.el-form{
margin-top: 30px;
.label{
margin-bottom: 10px;
color: #105CB2;
}
/deep/.el-input__inner{
height: 46px;
padding: 0 23px;
line-height: 46px;
border: 1px solid #AFB5BB;
border-radius: 23px !important;
}
/deep/.el-form-item__error{
top: 105%;
left: auto;
right: 0;
color: #FFA94E;
}
.submit{
width: 100%;
height: 48px;
margin-top: 60px;
line-height: 48px;
padding: 0;
font-size: 20px;
background-color: #105cb2;
border-radius: 23px;
border: 0;
}
.login-tips{
margin-bottom: 20px;
font-size: 16px;
color: #105CB2;
text-align: center;
}
.thirdParty{
.item{
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
padding: 10px 0;
color: #AFB5BB;
font-size: 16px;
background-color: #eff0f1;
border-radius: 36px;
cursor: pointer;
img{
width: 40px;
margin-right: 10px;
}
}
}
}
}
}
.switch{
span{
cursor: pointer;
color: #9076FF;
}
}
.links{
margin: 20px 0 20px;
}
.ques{
color: #105cb2;
font-size: 14px;
}
.forget{
color: #ffa94e;
font-size: 14px;
}
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
</style>

@ -875,7 +875,11 @@ export default {
personalFileEntities
}
this.$put(this.api.userinfoUpdate,data).then(res => {
<<<<<<< HEAD
bus.$emit('updateAccount',personalInformation.userName)
=======
bus.$emit('updateAccount',personalInformation.account)
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
this.$message.success('提交成功!')
}).catch(res => {});
},

@ -11,7 +11,11 @@
<div>
<el-form label-width="80px">
<el-form-item label="实验时间" class="userRadio">
<<<<<<< HEAD
<el-radio-group v-model="form.month" @change="getData">
=======
<el-radio-group v-model="form.month" @change="initData">
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
<el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{item.name}}</el-radio>
</el-radio-group>
<el-date-picker v-model="date" align="right" unlink-panels type="daterange"
@ -19,7 +23,11 @@
</el-form-item>
<div class="flex-between no-mb">
<el-form-item label="实验状态">
<<<<<<< HEAD
<el-select v-model="form.status" clearable placeholder="请选择实验状态" @change="getData">
=======
<el-select v-model="form.status" clearable placeholder="请选择实验状态" @change="initData">
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
@ -106,7 +114,10 @@ export default {
name: 'project',
data() {
return {
<<<<<<< HEAD
pattern: Number(this.$store.state.pattern),
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
userId: this.$store.state.userId,
schoolId: this.$store.state.schoolId,
name: sessionStorage.getItem('ms_username'),
@ -183,7 +194,11 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
<<<<<<< HEAD
this.getData()
=======
this.initData()
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
},500)
}
},
@ -211,8 +226,12 @@ export default {
page: this.pageNo,
size: this.pageSize,
rowId: '',
<<<<<<< HEAD
projectId: '',
pattern: this.pattern
=======
projectId: ''
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
}
this.$get(this.api.userRecord,data).then(res => {
@ -236,6 +255,13 @@ export default {
}).catch(err => {})
}).catch(res => {});
},
<<<<<<< HEAD
=======
initData(){
this.pageNo = 1
this.getData()
},
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
add(){
this.$store.commit("customerData", { customer_id : ''});
this.$router.push('/addclass');

@ -19,6 +19,8 @@
<div class="icon_one icon_wrap"><i class="iconfont icon-arrowRight"></i></div>
<div class="select_title one_title">期货套期保值实验</div>
</div>
<div class="select_item" >
</div>
</div>
<div class="select_wrap" v-else>
<div class="select_item" @click="toEvaluation(1,2)">

@ -1,11 +1,14 @@
<template>
<div class="box">
<<<<<<< HEAD
<!-- 项目介绍与视频导航栏 -->
<div class="nav_wrap">
<div class="introduce" @click="toPreview">项目介绍</div>
<div class="preview" >课前预习</div>
</div>
<!-- 视频区 -->
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
<el-row :gutter="24">
<el-col :span="18">
<div>
@ -204,9 +207,12 @@ export default {
})
},
methods: {
<<<<<<< HEAD
toPreview(){
this.$router.push(`ProjectIntro`)
},
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
async getData(){
let res = await this.$get(this.api.getCoursevideo, {
page: 1,
@ -403,11 +409,16 @@ export default {
<style lang="scss" scoped>
.box{
<<<<<<< HEAD
height: calc(100vh - 60px);
=======
height: calc(100vh - 119px);
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
padding: 20px;
background: url(../../assets/img/eva-bg.jpg) 0 0/100% 100% no-repeat;
overflow: auto;
}
<<<<<<< HEAD
.back_index:hover{
opacity: 0.8;
cursor: pointer;
@ -435,6 +446,8 @@ export default {
background: #FF5288;
}
}
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
.video_wid{
width: 100%;
height: 650px;

@ -10,6 +10,7 @@ export default {
*/
locale: 'zh',
/**
<<<<<<< HEAD
* @description 基础模式子系统链接
*/
subSystem1: location.host.includes('116.63.168.79') ? 'http://116.63.168.79/kd/#/Dashboard' : 'http://122.9.154.146/kd/#/Dashboard',
@ -25,4 +26,9 @@ export default {
* @description 专家账号
*/
studentIds: [1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513]
=======
* @description 跳转子系统链接
*/
subSystem: location.host.includes('116.63.168.79') ? 'http://116.63.168.79/first' : 'http://122.9.154.146/first'
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
}

@ -14,7 +14,10 @@ import store from './store'
import core from './utils/core.js'
import echarts from 'echarts'
import config from '@/config'
<<<<<<< HEAD
import './assets/icon/iconfont.css';//iconfont样式
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
import preventReClick from './store/preventReClick' //防多次点击,重复提交
Vue.prototype.$echarts = echarts
@ -52,12 +55,29 @@ Vue.prototype.NumberMul = function(arg1, arg2) {
router.beforeEach((to, from, next) => {
document.title = config.title;
const role = sessionStorage.getItem('kd_client_username');
<<<<<<< HEAD
if (!role && to.path !== '/login' && to.path !== '/clientLogin') {
next('/clientLogin')
} else if (to.meta.permission) {
// 如果是管理员权限则可进入,这里只是简单的模拟管理员权限而已
role === 'admin' ? next() : next('/403');
} else if(role && to.path == '/clientLogin') {
=======
if (!role && to.path !== '/login') {
next('/login')
// if(to.fullPath != '/404' && to.fullPath != '/'){
// next({
// path: '/login',
// query: {redirect: to.fullPath}
// })
// }else{
// next('/login')
// }
} else if (to.meta.permission) {
// 如果是管理员权限则可进入,这里只是简单的模拟管理员权限而已
role === 'admin' ? next() : next('/403');
} else if(role && to.path == '/login') {
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
next('/dashboard')
} else {
// 简单的判断IE10及以下不进入富文本编000000000000辑器,该组件不兼容

@ -10,7 +10,10 @@ export default new Router({
{
path: '/',
redirect: '/login',
<<<<<<< HEAD
// redirect: '/index',
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
},
{
path: '/teachingVideo',
@ -34,6 +37,7 @@ export default new Router({
meta: { title: '管理员' }
},
{
<<<<<<< HEAD
path: '/ProjectIntro',
component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/ProjectIntro.vue'),
meta: { title: '管理员' }
@ -44,6 +48,8 @@ export default new Router({
meta: { title: '管理员' }
},
{
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
path: '/showExperiment',
component: () => import(/* webpackChunkName: "403" */ '../components/page/ShowExperiment.vue')
},
@ -78,11 +84,14 @@ export default new Router({
meta: { title: '登录' }
},
{
<<<<<<< HEAD
path: '/clientLogin',
component: () => import(/* webpackChunkName: "login" */ '../components/page/ClientLogin.vue'),
meta: { title: '首页' }
},
{
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
path: '*',
redirect: '/404'
}

@ -29,7 +29,10 @@ const store = new Vuex.Store({
studentId: '',
answerHistory: [],
dataTime: '',
<<<<<<< HEAD
pattern: 0
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
},
mutations:{
courseIdData(state,payload){
@ -93,9 +96,12 @@ const store = new Vuex.Store({
answerHistoryData (state, payload) {
state.answerHistory = payload.answerHistory
},
<<<<<<< HEAD
patternData (state, payload) {
state.pattern = payload.pattern
},
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
}
});

@ -10,7 +10,10 @@ if(process.env.NODE_ENV === 'development'){
export default {
logins: `${host}/liuwanr/userInfo/logins`, //登录 
<<<<<<< HEAD
getAccountPassword: `${host}/evaluation/tms/userInfo/getAccountPassword`, //获取账号密码
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
queryToken: `${host}/liuwanr/userInfo/queryToken`,
save: `${host}/evaluation/tms/userInfo/add`, //注册
updateLogInNumber: `${host}/liuwanr/userInfo/updateLogInNumber`, //用户登录修改登录次数和登陆时间
@ -34,8 +37,11 @@ export default {
checkCode: `${host}/evaluation/tms/userInfo/checkCode`,
getCoursevideo:`${host}/evaluation/tms/classTech/simulationPlayList`,//开始课程-课程视频
queryPersonalCenter:`${host}/evaluation/personalCenter/queryPersonalCenter`,
<<<<<<< HEAD
getAccessNum:`${host}/evaluation/tms/userInfo/getAccessNum`,//获取项目访问量
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
examinePassword:`${host}/evaluation/tms/user/examinePassword`,//更换密码
userinfoUpdate:`${host}/evaluation/tms/user/update`,//个人中心信息修改
@ -57,7 +63,10 @@ export default {
experimentRemaining: `${host}/evaluation/tms/evaluationrecord/remaining`, //获取测评剩余时间
experimentStart: `${host}/evaluation/tms/evaluationrecord/start`, //开始测评
experimentSubmit: `${host}/evaluation/tms/evaluationrecord/submit`, //提交测评
<<<<<<< HEAD
queryProjectIdAndPattenById: `${host}/evaluation/tms/exp/queryProjectIdAndPattenById`,//基于考核id查询项目id
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
// 实验记录
fictitiousRecord: `${host}/evaluation/fictitious/projectrecord/user/kdRecord`, //用户端实验记录

@ -1,7 +1,11 @@
import config from '@/config'
import store from '@/store'
<<<<<<< HEAD
import api from '@/utils/api'
import {get} from '@/utils/http'
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
const pad2 = str => ('0' + str).substr(-2)
function fMoney (s, n) {
@ -160,6 +164,7 @@ function getCaption(obj){
return obj;
}
<<<<<<< HEAD
function toSubSystem(className = '',id = '',classId = '',pattern = ''){
sessionStorage.setItem("token",store.state.token);//token
sessionStorage.setItem("userName",store.state.userName);//用户名
@ -197,6 +202,11 @@ function toSubSystem(className = '',id = '',classId = '',pattern = ''){
location.href = pattern === 0 ? config.subSystem1 : config.subSystem2
}
}
=======
function toSubSystem(className = '',id = '',classId = ''){
let href = `${config.subSystem}?auth=${btoa(store.state.token)}&userName=${store.state.userName}&class=${className}&id=${id}&classId=${classId}`
location.href = href
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
}
function encodeString(str) {

@ -102,10 +102,17 @@ axios.interceptors.request.use(config => {
// );
let logout = false
<<<<<<< HEAD
let studentIds = [1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513]
export function getToken(){
if(process.env.NODE_ENV == 'production'){
if(store.state.dataTime && !logout && !studentIds.includes(store.state.studentId)){
=======
export function getToken(){
// console.log(store.state.dataTime)
if(process.env.NODE_ENV == 'production'){
if(store.state.dataTime && !logout){
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
axios.get(`${api.queryToken}?token=${store.state.token}`).then(res => {
if(store.state.dataTime && (res.data.message != store.state.dataTime)){
logout || Message.error('您已在另一台设备登录,本次登录已下线!')

Loading…
Cancel
Save