期货跳转

chengdu
liangliang.Li 4 years ago
parent 063bf79433
commit f12767b69d
  1. 10
      src/components/common/Studentcommon/FictitiousList.vue
  2. 7
      src/components/common/Studentcommon/TeachingList.vue
  3. 7
      src/components/common/Studentcommon/competitionList.vue
  4. 32
      src/components/page/Assessment.vue
  5. 3
      src/components/page/ClientLogin.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. 13
      src/components/page/TeachingVideo.vue
  12. 6
      src/config/index.js
  13. 20
      src/main.js
  14. 9
      src/router/index.js
  15. 10
      src/store/index.js
  16. 9
      src/utils/api.js
  17. 10
      src/utils/core.js
  18. 39
      src/utils/http.js

@ -33,10 +33,7 @@
export default {
data() {
return {
<<<<<<< HEAD
pattern: Number(sessionStorage.getItem('pattern')),
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
totals: 0,
tableData: [],
userId: this.$store.state.userId,
@ -45,10 +42,7 @@ export default {
};
},
created() {
<<<<<<< HEAD
console.log(11,this.$route)
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
this.getData();
},
methods: {
@ -69,12 +63,8 @@ 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,10 +45,7 @@
export default {
data() {
return {
<<<<<<< HEAD
pattern: Number(sessionStorage.getItem('pattern')),
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
totals: 0,
tableData: [],
userId: this.$store.state.userId,
@ -95,12 +92,8 @@ 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,10 +35,7 @@
export default {
data() {
return {
<<<<<<< HEAD
pattern: Number(sessionStorage.getItem('pattern')),
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
totals: 0,
tableData: [],
userId: this.$store.state.userId,
@ -67,12 +64,8 @@ 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,22 +11,14 @@
<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>
@ -106,10 +98,7 @@ 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'),
@ -152,19 +141,12 @@ 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)
@ -185,10 +167,7 @@ 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
@ -238,13 +217,6 @@ 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)
@ -267,11 +239,7 @@ 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) {

@ -207,7 +207,6 @@ export default {
this.studentId = this.schoolList[0].studentId
// this.getRole()
this.roleId = 4
this.$store.commit("tokenData", {loginToken: res.message.loginToken})
this.submitForm(form)
}else{
this.$message.error('账号不存在')
@ -284,7 +283,7 @@ export default {
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})
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});

@ -1,13 +1,8 @@
<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>
@ -26,12 +21,8 @@
<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>
@ -162,11 +153,7 @@ export default {
}
},
mounted() {
<<<<<<< HEAD
// this.getClass()
=======
this.getClass()
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
this.addDefault()
this.$once('hook:beforeDestroy', function () {
clearInterval(this.timer)
@ -184,13 +171,10 @@ 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){
@ -222,11 +206,7 @@ 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){
@ -428,7 +408,6 @@ export default {
outline: none;
box-shadow: none !important;
}
<<<<<<< HEAD
.back_index:hover{
opacity: 0.8;
cursor: pointer;
@ -449,8 +428,6 @@ export default {
font-weight: 600;
line-height: 80px;
}
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
h3{
color: #328aff;
margin-bottom: 10px;
@ -610,10 +587,7 @@ h3{
max-height:calc(100% - 30px);
max-width:calc(100% - 30px);
}
<<<<<<< HEAD
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
/deep/.evaluation_dialog .el-dialog__body{
flex:1;
overflow: auto;

@ -1,5 +1,4 @@
<template>
<<<<<<< HEAD
<div class="wrap">
<div class="button_wrap">
<div class="button_item" @click="toNext(0)"><i class="iconfont icon-arrowRight"></i></div>
@ -21,46 +20,12 @@ 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)
@ -113,73 +78,4 @@ 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,6 +1,5 @@
<template>
<div class="wrap">
<<<<<<< HEAD
<!-- 顶部栏目 -->
<div class="bar flex-between">
<div class="icon_wrap">
@ -33,151 +32,10 @@
<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() {
@ -372,435 +230,4 @@ 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,11 +875,7 @@ 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,11 +11,7 @@
<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"
@ -23,11 +19,7 @@
</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>
@ -114,10 +106,7 @@ 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'),
@ -194,11 +183,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
<<<<<<< HEAD
this.getData()
=======
this.initData()
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
},500)
}
},
@ -226,12 +211,8 @@ export default {
page: this.pageNo,
size: this.pageSize,
rowId: '',
<<<<<<< HEAD
projectId: '',
pattern: this.pattern
=======
projectId: ''
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
}
this.$get(this.api.userRecord,data).then(res => {
@ -255,13 +236,6 @@ 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');

@ -1,14 +1,11 @@
<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>
@ -207,12 +204,9 @@ export default {
})
},
methods: {
<<<<<<< HEAD
toPreview(){
this.$router.push(`ProjectIntro`)
},
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
async getData(){
let res = await this.$get(this.api.getCoursevideo, {
page: 1,
@ -409,16 +403,11 @@ 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;
@ -446,8 +435,6 @@ export default {
background: #FF5288;
}
}
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
.video_wid{
width: 100%;
height: 650px;

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

@ -21,7 +21,6 @@ const store = new Vuex.Store({
userId: '',
accountRole: '',
userName:'',
loginToken: '',
token: '',
avatar:'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png',
courseId:'',
@ -30,10 +29,7 @@ const store = new Vuex.Store({
studentId: '',
answerHistory: [],
dataTime: '',
<<<<<<< HEAD
pattern: 0
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
},
mutations:{
courseIdData(state,payload){
@ -88,9 +84,6 @@ const store = new Vuex.Store({
state.schoolId = payload.schoolId
state.token = payload.token
},
tokenData (state, payload) {
state.loginToken = payload.loginToken
},
assesmentData (state, payload) {
state.assesmentId = payload.assesmentId
},
@ -100,12 +93,9 @@ const store = new Vuex.Store({
answerHistoryData (state, payload) {
state.answerHistory = payload.answerHistory
},
<<<<<<< HEAD
patternData (state, payload) {
state.pattern = payload.pattern
},
=======
>>>>>>> 6028c3bb7c7bd21a7d0eeb951358865241b4ecb9
}
});

@ -10,10 +10,7 @@ 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`, //用户登录修改登录次数和登陆时间
@ -37,11 +34,8 @@ 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`,//个人中心信息修改
@ -63,10 +57,7 @@ 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,11 +1,7 @@
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) {
@ -164,7 +160,6 @@ 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);//用户名
@ -202,11 +197,6 @@ 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) {

@ -23,7 +23,7 @@ axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8';
// 请求拦截器
axios.interceptors.request.use(config => {
let token = store.state.loginToken
let token = store.state.token
if(token){
config.headers.token = token
}
@ -102,17 +102,10 @@ 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('您已在另一台设备登录,本次登录已下线!')
@ -126,16 +119,6 @@ export function getToken(){
}
}
function logouts(){
store.replaceState({})
sessionStorage.removeItem('kd_client_username')
location.reload()
}
let tokenStatus = {
0: '用户未登录,请登录后操作!',
1: 'token错误,请重新登录!'
}
/**
* get方法对应get请求
*/
@ -146,11 +129,6 @@ export function get(url, params){
params: params
})
.then(res => {
if(typeof res.data == 'number'){
this.$message.error(tokenStatus[res.data])
setTimeout(logouts,1500)
return false
}
if(res.data.code == 99999){
this.$message.error(
res.data.message
@ -231,11 +209,6 @@ export function post(url, params) {
return new Promise((resolve, reject) => {
axios.post(url,params)
.then(res => {
if(typeof res.data == 'number'){
this.$message.error(tokenStatus[res.data])
setTimeout(logouts,1500)
return false
}
if(res.data.code == 99999){
this.$message.error(
res.data.message
@ -311,11 +284,6 @@ export function post(url, params) {
params: params
})
.then(res => {
if(typeof res.data == 'number'){
this.$message.error(tokenStatus[res.data])
setTimeout(logouts,1500)
return false
}
if(res.data.code == 99999){
this.$message.error(
res.data.message
@ -389,11 +357,6 @@ export function put(url, params){
return new Promise((resolve, reject) =>{
axios.put(url, params)
.then(res => {
if(typeof res.data == 'number'){
this.$message.error(tokenStatus[res.data])
setTimeout(logouts,1500)
return false
}
if(res.data.code == 99999){
this.$message.error(
res.data.message

Loading…
Cancel
Save