完善功能,bug修复

UI_2022-02-10
yujialong 3 years ago
parent 0fcf0c273e
commit fb76723fae
  1. 6
      src/api/index.js
  2. 12
      src/layouts/header/index.vue
  3. 1
      src/pages/account/login/index.vue
  4. 18
      src/pages/ass/list/index.vue
  5. 2
      src/pages/preview/list/index.vue
  6. 22
      src/pages/setting/person/index.vue
  7. 12
      src/pages/station/list/index.vue
  8. 62
      src/pages/station/preview/index.vue
  9. 3
      src/plugins/requests/index.js
  10. 21
      src/setting.js

@ -97,12 +97,6 @@ export default {
joinPractice: `${host}tms/classTech/joinPractice`, //通过邀请码进入实验
queryArchievement: `${host}tms/classTech/queryExperimentalReport`, //查看教学实验报告
queryVirtualReport: `${host}tms/classTech/queryVirtualReport`, //查看虚仿实验报告

@ -21,13 +21,11 @@
</template>
<script>
import { mapState, mapActions } from "vuex";
import util from "@/libs/util";
import Setting from "@/setting";
export default {
data() {
return {
isHh: Setting.isHh
};
},
computed: {
@ -45,11 +43,9 @@ export default {
]),
getSystemDetail () {
this.$get(this.api.logoDetail).then(res => {
if (res.status === 200) {
if (res.data) {
this.setTitle(res.data.title);
this.setLogoUrl(res.data.logoUrl);
}
if (res.data) {
this.setTitle(res.data.title);
this.setLogoUrl(res.data.logoUrl);
}
}).catch(res => {});
},

@ -84,6 +84,7 @@ export default {
code: "", //
random: "", //
distinguish: 1, // ,1,2
type: 1, // 0-> 1-> 2->
platform: Setting.platformId
},
loginRules: {

@ -321,11 +321,7 @@ export default {
},
getClassData() {
this.$post(this.api.myClassByStudent).then(res => {
if (res.status === 200) {
this.classList = res.data;
} else {
util.errorMsg(res.message);
}
this.classList = res.data;
}).catch(err => {
});
},
@ -369,13 +365,11 @@ export default {
invitationCode: Number(this.invitationCode)
};
this.$post(this.api.joinPractice, data).then(res => {
if (res.status == 200) {
util.successMsg("验证成功!");
this.icVisible = false;
setTimeout(() => {
this.goSubSystem();
}, 1000);
}
util.successMsg("验证成功!");
this.icVisible = false;
setTimeout(() => {
this.goSubSystem();
}, 1000);
}).catch(res => {
});
},

@ -546,7 +546,7 @@ export default {
document.body.removeChild(document.querySelector("#aliplayerScript"));
});
},
goSubSystem() {
goSubSystem() { //
util.cookies.set("assessmentId", "", -1);
util.cookies.set("studentId", this.studentId);
util.cookies.set("projectId", "", -1);

@ -720,10 +720,8 @@ export default {
data.userid = this.userId;
this.$post(this.api.examinePassword, data)
.then(res => {
if (res.status === 200) {
util.successMsg("更换成功");
this.passwordVisible = false;
}
util.successMsg("更换成功");
this.passwordVisible = false;
})
.catch(err => {
console.log(err);
@ -1004,11 +1002,9 @@ export default {
opener: this.emailOpener
};
this.$put(this.api.bindPhoneOrEmail, data).then(res => {
if(res.status == 200){
util.successMsg("绑定成功");
this.personalInformation.email = this.email;
this.emailVisible = false;
}
util.successMsg("绑定成功");
this.personalInformation.email = this.email;
this.emailVisible = false;
}).catch(res => {
});
},
@ -1047,11 +1043,9 @@ export default {
opener: this.phoneOpener
};
this.$put(this.api.bindPhoneOrEmail, data).then(res => {
if(res.status == 200){
util.successMsg("绑定成功");
this.personalInformation.phone = this.phone;
this.phoneVisible = false;
}
util.successMsg("绑定成功");
this.personalInformation.phone = this.phone;
this.phoneVisible = false;
}).catch(res => {
});
}

@ -118,17 +118,5 @@ export default {
color: #333;
}
}
&.isHh {
.item {
width: 16%;
}
}
&.isOccu {
.item {
width: 21%;
}
}
}
</style>

@ -48,13 +48,13 @@
</div>
<div class="catalog flex-1">
<div class="m-b-20">
<el-button type="primary" style="width: 100%; height: 50px; font-size: 18px"> </el-button>
<el-button type="primary" @click="goSystem" style="width: 100%; height: 50px; font-size: 18px"> </el-button>
</div>
<div class="list">
<h4 class="title">{{ courseName }}</h4>
<div class="chapters">
<template v-if="videoList.length">
<div class="chapter" v-for="(item,index) in videoList" :key="index">
<template v-if="chapterList.length">
<div class="chapter" v-for="(item,index) in chapterList" :key="index">
<div class="chapterName">{{ item.name }}</div>
<div class="section" v-if="item.subsectionList.length">
<div class="sectionName" v-for="(section,i) in item.subsectionList" :key="i"
@ -103,11 +103,13 @@ export default {
courseId: this.$route.query.courseId,
curriculumName: this.$route.query.curriculumName,
video: "http://liuwanr.oss-cn-shenzhen.aliyuncs.com/mp4/20200519/1589871025648.mp4",
videoList: [],
courseName: "",
briefIntroduction: "",
teachingObjectives: "",
coverUrl: "",
chapterList: [], //
coverUrl: "", //
courseName: "", //
briefIntroduction: "", //
teachingObjectives: "", //
assessmentList: "", //
playAuth: "",
player: null,
previewImg: "",
@ -150,13 +152,14 @@ export default {
// this.coverUrl = data.coverUrl;
this.briefIntroduction = data.briefIntroduction;
this.teachingObjectives = data.teachingObjectives;
this.assessmentList = data.assessmentConfig;
},
async getChapter() {
let res = await this.$get(`${this.api.curriculumChapter}/${this.courseId}`);
this.videoList = res.chapterList;
if (this.videoList.length && this.videoList[0].subsectionList && this.videoList[0].subsectionList.length) {
// console.log(this.videoList[0].subsectionList[0]);
this.preview(this.videoList[0].subsectionList[0]);
this.chapterList = res.chapterList;
if (this.chapterList.length && this.chapterList[0].subsectionList && this.chapterList[0].subsectionList.length) {
// console.log(this.chapterList[0].subsectionList[0]);
this.preview(this.chapterList[0].subsectionList[0]);
}
},
//
@ -278,38 +281,41 @@ export default {
loadPdfHandler(e) {
this.currentPage = 1;
},
goSubSystem() {
let type = this.systemId;
let host = Setting.apiBaseURL;
goSystem() { //
let id = this.assessmentList[0].systemId;
let host = Setting.systemPath;
let href = "";
let roleId = this.roleId == 4 ? 0 : 1;
let userName = window.btoa(encodeURIComponent(this.userName));
if (type == 1) {
href = `${host}pyTrials/#/`;
// if(process.env.NODE_ENV === 'development') href = 'http://120.78.198.231/'
} else if (type == 4) {
if (id == 1) {
// href = `${host}pyTrials/#/`;
if(process.env.NODE_ENV === 'development') href = 'http://192.168.31.154:8080/#/'
} else if (id == 4) {
href = `${host}pyFinance/#/`;
} else if (type == 5) {
} else if (id == 5) {
href = `${host}pyProjects/#/`;
} else if (type == 6) {
} else if (id == 6) {
href = `${host}pyRandom/#/`;
} else if (type == 7) {
} else if (id == 7) {
href = `${host}pyQuantification/#/`;
} else if (type == 8) {
} else if (id == 8) {
href = `${host}pyAnalysis/#/`;
} else if (type == 9) {
} else if (id == 9) {
href = `${host}pyDataclean/#/`;
} else if (type == 10) {
} else if (id == 10) {
href = `${host}pyAcquisition/#/`;
} else if (type == 21) {
} else if (id == 11) {
// href = `${host}bank/#/`;
href = "http://39.108.250.202/bank/#/";
} else if (id == 21) {
window.open(`http://121.37.29.24:80/yyyflogin?userId=${this.userId}&userName=${userName}&userType=${roleId}&reqType=1&reqId=3989a0ad671849b99dcbdcc208782333&caseId=9681f86902314b10bc752909121f9ab9&authorization=87DIVy348Oxzj3ha&classId=1876&courserId=7ff5d4715b114b7398b6f26c20fac460`);
} else if (type == 22) {
} else if (id == 22) {
window.open(`https://danbao.czcyedu.com/#/loginFromYyyf?userId=${this.userId}&userName=${userName}&userType=${roleId}&reqType=1&reqId=eb7d8355119d449184c548b07dc01ed9&caseId=1198241070647873538&authorization=87DIVy348Oxzj3ha&classId=1876&courserId=faaedd82adb9444285a5785e4a3dd4f9`);
}
if (type != 21 && type != 22) {
if (id != 21 && id != 22) {
util.cookies.set("userId", this.userId);
util.cookies.set("studentId", this.studentId);
util.cookies.set("assessmentId", "", -1);

@ -37,7 +37,8 @@ service.interceptors.response.use(
return Promise.resolve(res).catch(e => {});
} else {
util.errorMsg(res.message);
return Promise.resolve(res).catch(e => {});
return Promise.reject(res)
// return Promise.resolve(res).catch(e => {});
}
},
// 服务器状态码不是200的情况

@ -10,50 +10,45 @@ const isPro = url.includes("occupationlab.com"); //是否职站生产
const isTest = url.includes('39.108.250.202'); //是否中台测试服
let defaultSubSystem = "";
let systemPath = "";
let host = "";
let title = "";
let schoolId = null;
let systemList = [];
if (isHh) {
// 河海
host = "http://10.196.131.73/";
defaultSubSystem = "http://10.196.131.73/pyTrials/#/";
title = "学生端";
schoolId = 729;
} else if (isCH) {
// 巢湖
host = "http://120.78.127.12/";
defaultSubSystem = "http://120.78.127.12/pyTrials/#/";
title = "学生端";
schoolId = 1006;
} else if (isBeta) {
// 职站测试
host = "http://120.78.198.231/";
defaultSubSystem = "http://120.78.198.231/pyTrials/#/";
title = "职站";
schoolId = 2105;
} else if (isPro) {
// 职站生产
host = "http://www.occupationlab.com/";
defaultSubSystem = "http://www.occupationlab.com/pyTrials/#/";
title = "职站";
schoolId = 2105;
} else if (isTest){
// 中台测试
host = "http://39.108.250.202:9000/";
systemPath = "http://120.78.198.231/";
defaultSubSystem = "http://39.108.250.202/pyTrials/#/";
title = "职站";
schoolId = 2105;
} else if (isDev) {
// 本地
host = "http://39.108.250.202:9000/"; // 中台测试服
// host = "http://192.168.31.137:9000/"; // 赓
// host = "http://192.168.31.151:9000/"; // 榕
// host = "http://192.168.31.125:9000/"; // 坤
systemPath = "http://192.168.31.154/";
defaultSubSystem = "http://39.108.250.202/pyTrials/#/";
title = "职站";
schoolId = 2105;
} else {
console.log("其它版本");
}
@ -67,16 +62,8 @@ const Setting = {
routerMode: "hash", // 路由模式,可选值为 history 或 hash
showProgressBar: true, // 页面切换时,是否显示模拟的进度条
apiBaseURL: host, // 接口请求地址
isHh, // 是否是河海版本
isCH, // 是否是巢湖版本
isBeta, // 是否职站测试服
schoolId,// 学校id
systemPath, // 子系统地址前缀
defaultSubSystem, // 测评做完后跳转的默认子系统
// 子系统列表.改的时候留意要改的是哪个环境,别影响到了其他环境
// 以后如果卖给了其他学校,要给该学校单独开放子系统的话,就在下面这个数组里加判断就行,然后把需要开放的子系统放出来。不要复制这个职站项目另起一个项目,这样学校一多就很难维护了
systemList,
systemId: systemList.length && systemList[0].id, // 默认系统id
autoLogoutTime: 3600000, // 长时间未操作,自动退出登录时间
modalDuration: 3, // 接口请求返回错误时,弹窗的持续时间,单位:秒
errorModalType: "Message", // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice

Loading…
Cancel
Save