添加测试服,完善功能,优化代码

dev_2022-05-11
yujialong 3 years ago
parent ce7ee5a327
commit 365ec55cb5
  1. 16
      src/api/index.js
  2. 6
      src/pages/assessment/add/index.vue
  3. 11
      src/pages/assessment/list/index.vue
  4. 4
      src/pages/course/courseManagement/preview.vue
  5. 13
      src/pages/match/index.vue
  6. 76
      src/pages/project/add/index.vue
  7. 20
      src/pages/project/list/index.vue
  8. 58
      src/setting.js

@ -1,16 +1,9 @@
import Setting from "@/setting"; import Setting from "@/setting";
// let host = Setting.apiBaseURL let host = Setting.apiBaseURL
// let host = "http://192.168.31.151:9000/"; // 榕
// let host = 'http://192.168.31.125:9000/'; // 坤
let host = "http://39.108.250.202:9000/"; // 测试服
let uploadURL = Setting.upload.apiURL; let uploadURL = Setting.upload.apiURL;
let host1 = "http://39.108.250.202:8080/"; // 川大 let host1 = "http://39.108.250.202:8080/"; // 川大
export default { export default {
// fileupload: `${uploadURL}oss/manage/fileupload`,
queryToken: `${host}liuwanr/userInfo/queryToken`, queryToken: `${host}liuwanr/userInfo/queryToken`,
logins: `${host}users/users/user/login`, //登录 logins: `${host}users/users/user/login`, //登录
@ -75,6 +68,7 @@ export default {
deleteReportById: `${host}occupationlab/achievement/deleteReportById`, // 批量删除成绩管理中的项目/批量删除成绩管理中的考核 deleteReportById: `${host}occupationlab/achievement/deleteReportById`, // 批量删除成绩管理中的项目/批量删除成绩管理中的考核
// 项目管理 // 项目管理
getSystemIdBySchool: `${host}occupationlab/projectManage/getSystemIdBySchool`, // 获取学校下拥有的系统
avgValues: `${host}occupationlab/projectManage/avgValues`, // 平均分分配值 avgValues: `${host}occupationlab/projectManage/avgValues`, // 平均分分配值
deleteProjectManage: `${host}occupationlab/projectManage/deleteProjectManage`, // 新增项目管理 deleteProjectManage: `${host}occupationlab/projectManage/deleteProjectManage`, // 新增项目管理
getProjectBySystemId: `${host}occupationlab/projectManage/getProjectBySystemId`, // 根据系统id获取全部项目(项目中没有用上这个接口) getProjectBySystemId: `${host}occupationlab/projectManage/getProjectBySystemId`, // 根据系统id获取全部项目(项目中没有用上这个接口)
@ -160,9 +154,9 @@ export default {
getSubsection: `${host}occupationlab/management/edu/courseSubsection/getSubsection`, // 根据小节id获取预览文件地址 getSubsection: `${host}occupationlab/management/edu/courseSubsection/getSubsection`, // 根据小节id获取预览文件地址
// 阿里云文件/视频管理 // 阿里云文件/视频管理
fileDeletion: `${host}nakadai/nakadai/oss/fileDeletion`, // 删除OSS文件 fileDeletion: `${uploadURL}oss/manage/fileDeletion`, // 删除OSS文件
fileupload: `${host}nakadai/nakadai/oss/fileUpload`, // 文件上传 fileupload: `${uploadURL}oss/manage/fileUpload`, // 文件上传
getPlayAuth: `${host}nakadai/nakadai/oss/getPlayAuth`, // 获取播放凭证 getPlayAuth: `${uploadURL}oss/manage/getPlayAuth`, // 获取播放凭证

@ -373,9 +373,13 @@ export default {
return resolve([]); return resolve([]);
} }
}, },
getschoolCourse() { getschoolCourse() { //
this.$get(this.api.schoolCourse).then(res => { this.$get(this.api.schoolCourse).then(res => {
this.curriculumList = res.data; this.curriculumList = res.data;
if (this.curriculumList.length) {
this.form.curriculumId = this.curriculumList[0].cid;
this.getProjectData();
}
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
}); });

@ -152,10 +152,10 @@ export default {
}, },
{ {
value: 2, value: 2,
name: "已完成" name: "已结束"
} }
], ],
status: ["待开始", "进行中", "已完成"], status: ["待开始", "进行中", "已结束"],
dateList: [ dateList: [
{ {
id: "", id: "",
@ -248,6 +248,13 @@ export default {
const item = this.listData[i]; const item = this.listData[i];
if (item.countDown > 0) { if (item.countDown > 0) {
item.countDown--; item.countDown--;
} else {
if (item.status === 0 && item.type === 2) { // -
item.status = 1;
item.countDown = (new Date(item.stopTime).getTime() - new Date().getTime()) / 1000;
} else if (item.status === 1) {
item.status = 2;
}
} }
this.$set(this.listData, i, item); this.$set(this.listData, i, item);
} }

@ -7,8 +7,8 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20" style="background: none;">
<div class="flex p-40"> <div class="flex">
<div class="cover" :class="{'is-word': showMask1}"> <div class="cover" :class="{'is-word': showMask1}">
<img v-if="coverUrl" :src="coverUrl" alt="" width="100%" height="100%"> <img v-if="coverUrl" :src="coverUrl" alt="" width="100%" height="100%">
<template v-else-if="iframeSrc"> <template v-else-if="iframeSrc">

@ -35,14 +35,13 @@
{{ scope.$index + (pageNo - 1) * pageSize + 1 }} {{ scope.$index + (pageNo - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="竞赛名称"> <el-table-column prop="name" label="竞赛名称" align="center"></el-table-column>
</el-table-column> <el-table-column prop="applicantNum" label="报名人数" align="center" width="150">
<el-table-column prop="applicantNum" label="报名人数" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.applicantNum ? scope.row.applicantNum : 0 }} {{ scope.row.applicantNum ? scope.row.applicantNum : 0 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="status" label="状态" width="80" align="center"> <el-table-column prop="status" label="状态" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ transferPublishStatus[scope.row.publishStatus] }} {{ transferPublishStatus[scope.row.publishStatus] }}
</template> </template>
@ -52,10 +51,8 @@
{{ scope.row.playStartTime }} ~ {{ scope.row.playEndTime }} {{ scope.row.playStartTime }} ~ {{ scope.row.playEndTime }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="gmtCreate" label="创建时间" width="150" align="center"> <el-table-column prop="gmtCreate" label="创建时间" align="center" width="200"></el-table-column>
</el-table-column> <el-table-column prop="founder" label="创建人" align="center" width="200"></el-table-column>
<el-table-column prop="founder" width="100" label="创建人" align="center">
</el-table-column>
<el-table-column label="操作" align="center" width="100"> <el-table-column label="操作" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="manage(scope.row)" v-auth>管理</el-button> <el-button type="text" @click="manage(scope.row)" v-auth>管理</el-button>

@ -1,5 +1,5 @@
<template> <template>
<div ref="main" class="main"> <div>
<el-form :disabled="isDetail"> <el-form :disabled="isDetail">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-between"> <div class="flex-between">
@ -30,7 +30,7 @@
<el-select :disabled="isDetail" v-model="projectManage.systemId" placeholder="请选择" @change="systemChange"> <el-select :disabled="isDetail" v-model="projectManage.systemId" placeholder="请选择" @change="systemChange">
<el-option <el-option
v-for="item in systemList" v-for="item in systemList"
:key="item.value" :key="item.id"
:label="item.label" :label="item.label"
:value="item.id" :value="item.id"
></el-option> ></el-option>
@ -92,7 +92,6 @@
header-align="center" header-align="center"
@selection-change="handleSelectionProjectJudgment" @selection-change="handleSelectionProjectJudgment"
row-key="judgmentId" row-key="judgmentId"
v-loading="listLoading"
> >
<el-table-column type="selection" width="55" align="center"></el-table-column> <el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column prop="sort" label="序号" width="80" align="center"> <el-table-column prop="sort" label="序号" width="80" align="center">
@ -191,10 +190,8 @@ export default {
}, },
data() { data() {
return { return {
host: Setting.apiBaseURL,
isHh: Setting.isHh,
projectId: this.$route.query.projectId, projectId: this.$route.query.projectId,
systemList: Setting.systemList, systemList: [],
token: btoa(util.local.get(Setting.tokenKey)), token: btoa(util.local.get(Setting.tokenKey)),
isDetail: Boolean(this.$route.query.show), isDetail: Boolean(this.$route.query.show),
@ -227,7 +224,6 @@ export default {
searchTimer: null, searchTimer: null,
isToPoint: false, // isToPoint: false, //
visibleLoading:false,// visibleLoading:false,//
listLoading:false,//
}; };
}, },
computed: { computed: {
@ -247,16 +243,17 @@ export default {
// util.warningMsg(res.message); // util.warningMsg(res.message);
util.errorMsg("分配的数值已超过100"); util.errorMsg("分配的数值已超过100");
} }
console.log('chuli')
return score; return score;
} }
}, },
watch: { watch: {
// projectJudgmentData: { projectJudgmentData: {
// handler(newValue) { handler(newValue) {
// console.log("newValue", newValue); console.log("newValue:", newValue);
// }, },
// deep: true deep: true
// }, },
judgementpointsquery(n) { judgementpointsquery(n) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
@ -265,7 +262,8 @@ export default {
} }
}, },
created() { created() {
// console.log(this.projectManage.systemId, "this.projectManage.systemId", this.lastSystemId); this.getSystemData();
console.log(this.projectManage.systemId, "this.projectManage.systemId", this.lastSystemId);
}, },
mounted() { mounted() {
if (this.$route.query.projectId) { if (this.$route.query.projectId) {
@ -301,6 +299,11 @@ export default {
}); });
} }
}, },
getSystemData() {
this.$get(this.api.getSystemIdBySchool).then(res => {
this.systemList = res.data;
});
},
getInfoData() { // getInfoData() { //
this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => { this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => {
if (res.status === 200) { if (res.status === 200) {
@ -609,42 +612,42 @@ export default {
}, },
toJudgePoint(type, row) { // toJudgePoint(type, row) { //
this.handleCacheData(); this.handleCacheData();
// let host = this.host; let jumpPath = Setting.jumpPath;
let host = "http://192.168.31.154:8087/"; // // let jumpPath = "http://192.168.31.154:8087/"; //
let { systemId } = this.projectManage; let { systemId } = this.projectManage;
let href = ""; let href = "";
if (type === "view") { if (type === "view") {
// //
if (systemId == 2) { if (systemId == 2) {
href = `${host}jdTrials/#/programOption?id=${row.judgmentPointsId}`; console.log(systemId);
} else if (systemId == 3) { } else if (systemId == 3) {
href = `${host}jdTrials/#/programOptions?id=${row.judgmentPointsId}`; console.log(systemId);
} else if (systemId == 11) { } else if (systemId == 11) {
// //
href = `${host}jdTrials/#/Transaction?isView=true&systemId=${systemId}&lcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`; href = `${jumpPath}#/Transaction?isView=true&systemId=${systemId}&lcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`;
} else { } else {
// python // python
href = `${host}jdTrials/#/program?isView=true&systemId=${systemId}&bcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`; href = `${jumpPath}#/program?isView=true&systemId=${systemId}&bcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`;
} }
} else if (type === "edit") { } else if (type === "edit") {
// //
if (systemId == 2) { if (systemId == 2) {
href = `${host}jdTrials/#/programOption?id=${row.judgmentPointsId}`; console.log(systemId);
} else if (systemId == 3) { } else if (systemId == 3) {
href = `${host}jdTrials/#/programOptions?id=${row.judgmentPointsId}`; console.log(systemId);
} else if (systemId == 11) { } else if (systemId == 11) {
// //
href = `${host}jdTrials/#/Transaction?isEdit=true&systemId=${systemId}&lcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`; href = `${jumpPath}#/Transaction?isEdit=true&systemId=${systemId}&lcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`;
} else { } else {
// python // python
href = `${host}jdTrials/#/program?isEdit=true&systemId=${systemId}&bcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`; href = `${jumpPath}#/program?isEdit=true&systemId=${systemId}&bcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`;
} }
} else if (type === "home") { } else if (type === "home") {
if (systemId == 2 || systemId == 3) { if (systemId == 2 || systemId == 3) {
href = `${host}jdTrials/#/list`; console.log(systemId);
} else { } else {
// //
href = `${host}#/?systemId=${systemId}&token=${this.token}&referrer=${btoa(location.href)}`; href = `${jumpPath}#/?systemId=${systemId}&token=${this.token}&referrer=${btoa(location.href)}`;
} }
} }
location.href = href; location.href = href;
@ -667,10 +670,8 @@ export default {
_this.$set(e,'name',e.name+"?") _this.$set(e,'name',e.name+"?")
_this.$set(e,'name',e.name.slice(0,e.name.length-1)) // _this.$set(e,'name',e.name.slice(0,e.name.length-1)) //
}) })
// console.log('',_this.projectJudgmentData)
// //
if(_this.projectId){// if(_this.projectId){//
console.log('调接口')
_this.updateProjectJudgment() _this.updateProjectJudgment()
} }
} }
@ -738,21 +739,12 @@ export default {
}, },
// , // ,
listAgain(){ listAgain(){
this.listLoading = true
let scrollTop = this.$refs.main.scrollTop
this.projectJudgmentData = []
this.$refs.main.scrollTop = scrollTop
this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => { this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => {
let { projectManage, projectJudgmentVos } = res; let { projectManage, projectJudgmentVos } = res;
projectJudgmentVos.map((e,i)=>{
this.$set(e,'sort',i+1)//
this.$set(e,'name',e.name+"?")
this.$set(e,'name',e.name.slice(0,e.name.length-1)) //
});
this.projectJudgmentData = projectJudgmentVos; this.projectJudgmentData = projectJudgmentVos;
this.listLoading = false this.projectJudgmentData.map((e,i)=>{
}).catch(()=>{ e.sort = i+1
this.listLoading = false })
}) })
}, },
@ -768,8 +760,4 @@ export default {
padding: 0; padding: 0;
border-bottom: 0; border-bottom: 0;
} }
.main{
overflow: auto;
height: calc(100vh - 152px );
}
</style> </style>

@ -46,7 +46,7 @@
<el-select size="small" v-model="systemId" placeholder="请选择" @change="initData"> <el-select size="small" v-model="systemId" placeholder="请选择" @change="initData">
<el-option <el-option
v-for="item in systemList" v-for="item in systemList"
:key="item.value" :key="item.id"
:label="item.label" :label="item.label"
:value="item.id" :value="item.id"
></el-option> ></el-option>
@ -129,16 +129,15 @@
</template> </template>
<script> <script>
import Setting from "@/setting";
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import util from "@/libs/util";
export default { export default {
data() { data() {
return { return {
showBack: Boolean(this.$route.query.show), showBack: Boolean(this.$route.query.show),
roleIdEd: this.roleId ? 13 : this.roleId,// roleId13roleId14113,1413> roleIdEd: this.roleId ? 13 : this.roleId,// roleId13roleId14113,1413>
systemId: "", systemId: "",
systemList: Setting.systemList, systemList: [],
queryData: { queryData: {
platformId: 1, // :1 :3 platformId: 1, // :1 :3
founder: 0, // (0: 1:) founder: 0, // (0: 1:)
@ -230,15 +229,20 @@ export default {
} }
}, },
mounted() { mounted() {
// systemIdsystemIdsystemId this.getSystemData();
this.systemId = this.lastSystemId ? this.lastSystemId : Setting.systemId;
// console.log(this.systemId, "sysid");
this.getData();
}, },
methods: { methods: {
...mapActions("project", [ ...mapActions("project", [
"setSystemId" "setSystemId"
]), ]),
getSystemData() {
this.$get(this.api.getSystemIdBySchool).then(res => {
this.systemList = res.data;
// systemIdsystemIdsystemId
this.systemId = this.lastSystemId ? this.lastSystemId : this.systemList[0].id;
this.getData();
});
},
getData() { getData() {
this.setSystemId(this.systemId); this.setSystemId(this.systemId);
let data = { let data = {

@ -3,11 +3,13 @@
* */ * */
const url = location.host; const url = location.host;
const isDev = process.env.NODE_ENV === "development"; // 开发环境 const isDev = process.env.NODE_ENV === "development"; // 开发环境
const isHh = url.includes("10.196.131.73"); //是否是河海版本 const isHh = url.includes("10.196.131.73"); //是否河海版本
const isCH = url.includes("120.78.127.12"); //是否是巢湖版本 const isCH = url.includes("120.78.127.12"); //是否巢湖版本
const isBeta = isDev || url.includes("120.78.198.231"); //是否是职站测试(本地亦调用测试服接口) const isBeta = url.includes("120.78.198.231"); //是否职站测试(本地亦调用测试服接口)
const isPro = location.host.includes("occupationlab.com"); //是否是职站生产 const isPro = url.includes("occupationlab.com"); //是否职站生产
const isTest = url.includes('39.108.250.202'); //是否中台测试服
let jumpPath = "";
let host = ""; let host = "";
let title = ""; let title = "";
let schoolId = null; let schoolId = null;
@ -18,54 +20,33 @@ if (isHh) {
host = "http://10.196.131.73/"; host = "http://10.196.131.73/";
title = "教师管理端"; title = "教师管理端";
schoolId = 729; schoolId = 729;
systemList = [
{ id: 1, label: "Python程序设计教学系统" },
{ id: 4, label: "经济金融建模实验教学系统" },
{ id: 6, label: "金融随机过程实验教学系统" },
{ id: 7, label: "量化投资策略建模实验教学系统" },
{ id: 8, label: "大数据分析实验教学系统" }
];
} else if (isCH) { } else if (isCH) {
// 巢湖 // 巢湖
host = "http://120.78.127.12/"; host = "http://120.78.127.12/";
title = "教师管理端"; title = "教师管理端";
schoolId = 1006; schoolId = 1006;
systemList = [
{ id: 8, label: "大数据分析实验教学系统" }
];
} else if (isBeta) { } else if (isBeta) {
// 职站测试 // 职站测试
host = "http://120.78.198.231/"; host = "http://120.78.198.231/";
title = "职站服务端管理系统"; title = "职站服务端管理系统";
schoolId = 2105; schoolId = 2105;
systemList = [
{ id: 1, label: "Python程序设计教学系统" },
// { id: 2, label: '跨国仿真系统' },
// { id: 3, label: '期权期货系统' },
{ id: 4, label: "经济金融建模实验教学系统" },
{ id: 5, label: "Python可视化实验教学系统" },
{ id: 6, label: "金融随机过程实验教学系统" },
{ id: 7, label: "量化投资策略建模实验教学系统" },
{ id: 8, label: "大数据分析实验教学系统" },
{ id: 9, label: "Python数据清洗教学实验系统" },
{ id: 10, label: "Python数据采集(爬虫)教学实验系统" },
{ id: 11, label: "银行综合系统" }
];
} else if (isPro) { } else if (isPro) {
// 职站生产 // 职站生产
host = "http://www.occupationlab.com/"; host = "http://www.occupationlab.com/";
title = "职站服务端管理系统"; title = "职站服务端管理系统";
schoolId = 2105; schoolId = 2105;
systemList = [ } else if (isTest){
{ id: 1, label: "Python程序设计教学系统" }, jumpPath = "http://39.108.250.202/judgmentPoint/";
{ id: 4, label: "经济金融建模实验教学系统" }, host = "http://39.108.250.202:9000/";
{ id: 5, label: "Python可视化实验教学系统" }, title = "职站服务端管理系统";
{ id: 6, label: "金融随机过程实验教学系统" }, schoolId = 2105;
{ id: 7, label: "量化投资策略建模实验教学系统" }, } else if (isDev) {
{ id: 8, label: "大数据分析实验教学系统" }, jumpPath = "http://192.168.31.154:8087/";
{ id: 9, label: "Python数据清洗教学实验系统" }, // host = "http://39.108.250.202:9000/"; // 中台测试服
{ id: 10, label: "Python数据采集(爬虫)教学实验系统" } // host = "http://192.168.31.151:9000/"; // 榕
]; host = "http://192.168.31.125:9000/"; // 坤
title = "职站服务端管理系统";
schoolId = 2105;
} else { } else {
console.log("其它版本"); console.log("其它版本");
} }
@ -78,6 +59,7 @@ const Setting = {
routerMode: "hash", // 路由模式,可选值为 history 或 hash routerMode: "hash", // 路由模式,可选值为 history 或 hash
showProgressBar: true, // 页面切换时,是否显示模拟的进度条 showProgressBar: true, // 页面切换时,是否显示模拟的进度条
apiBaseURL: host, // 接口请求地址 apiBaseURL: host, // 接口请求地址
jumpPath, // 判分点系统前缀
isHh, // 是否是河海版本 isHh, // 是否是河海版本
isCH, // 是否是巢湖版本 isCH, // 是否是巢湖版本
isBeta, // 是否是职站测试 isBeta, // 是否是职站测试
@ -127,7 +109,7 @@ const Setting = {
dynamicRoute: false, dynamicRoute: false,
// 文件上传 // 文件上传
upload: { upload: {
apiURL: "http://8.134.8.197:8001/", apiURL: "http://39.108.250.202:10000/",
maxSize: 30 maxSize: 30
} }
}; };

Loading…
Cancel
Save