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

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

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

@ -152,10 +152,10 @@ export default {
},
{
value: 2,
name: "已完成"
name: "已结束"
}
],
status: ["待开始", "进行中", "已完成"],
status: ["待开始", "进行中", "已结束"],
dateList: [
{
id: "",
@ -248,6 +248,13 @@ export default {
const item = this.listData[i];
if (item.countDown > 0) {
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);
}

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

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

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

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

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

Loading…
Cancel
Save