协助后端修改接口与接收参数

dev_2022-05-11
e 3 years ago
parent 95a42a09f3
commit cca23884ed
  1. 2
      src/api/index.js
  2. 37
      src/pages/assessment/add/index.vue
  3. 6
      src/pages/project/list/index.vue
  4. 4
      src/setting.js

@ -57,7 +57,7 @@ export default {
deleteAssessment: `${host}occupationlab/assessment/deleteAssessment`, // 单个、批量删除 deleteAssessment: `${host}occupationlab/assessment/deleteAssessment`, // 单个、批量删除
collectPaper: `${host}occupationlab/assessment/collectPaper`, // 收卷(提前结束) collectPaper: `${host}occupationlab/assessment/collectPaper`, // 收卷(提前结束)
schoolCourse: `${host}nakadai/nakadai/curriculum/schoolCourse`, // 获取学校购买订单后的课程 schoolCourse: `${host}nakadai/nakadai/curriculum/schoolCourse`, // 获取学校购买订单后的课程
projectListByCourseId: `${host}nakadai/nakadai/curriculum/projectListByCourseId`, // 根据课程id获取实训项目列表 projectListByCourseId: `${host}occupationlab/projectManage/getSchoolProjectByAssessent`, // 根据课程id获取实训项目列表
// 成绩管理 // 成绩管理
deleteExperimentalReport: `${host}occupationlab/achievement/deleteExperimentalReport`, // 单个、批量删除实验报告 deleteExperimentalReport: `${host}occupationlab/achievement/deleteExperimentalReport`, // 单个、批量删除实验报告

@ -106,13 +106,13 @@
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column> <el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column prop="auth" label="项目权限" align="center"> <el-table-column prop="auth" label="项目权限" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ permissionsKeys[scope.row.projectPermissions] }} {{ permissionsKeys[scope.row.permissions] }}
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="createUser" label="创建人" align="center"></el-table-column> --> <!-- <el-table-column prop="createUser" label="创建人" align="center"></el-table-column> -->
<el-table-column prop="founder" label="创建人" align="center"> <el-table-column prop="founder" label="创建人" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ founderKeys[scope.row.cid] }} {{ scope.row.createUser }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
@ -266,8 +266,8 @@ export default {
// console.log(22,this.assFields) // console.log(22,this.assFields)
this.date = [util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(new Date().getTime() + 300000)), util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(new Date().getTime() + 300000))]; this.date = [util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(new Date().getTime() + 300000)), util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(new Date().getTime() + 300000))];
this.form.id && this.getData(); this.form.id && this.getData();
this.getschoolCourse();
this.recoveryData(); this.recoveryData();
this.getschoolCourse();
}, },
beforeDestroy() { beforeDestroy() {
if (!this.isToProject) this.setAss({}); if (!this.isToProject) this.setAss({});
@ -377,21 +377,37 @@ export default {
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) { if (this.curriculumList.length) {
this.form.curriculumId = this.curriculumList[0].cid; console.log(this.form.curriculumId)
for(let i=0;i<this.curriculumList.length; i++) { if (this.form.curriculumId){
this.cidList.push(this.curriculumList[i].cid) for(let i=0;i<this.curriculumList.length; i++) {
if(this.curriculumList[i].cid == this.form.curriculumId){
this.getProjectData();
}
}
}else{
this.form.curriculumId = this.curriculumList[0].cid;
for(let i=0;i<this.curriculumList.length; i++) {
this.cidList.push(this.curriculumList[i].cid)
}
this.getProjectData();
} }
this.getProjectData();
} }
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
}); });
}, },
getProjectData() { getProjectData() {
this.$get(`${this.api.projectListByCourseId}?cid=${this.form.curriculumId}&permissions=1&projectName=${this.keyword}`).then(res => { let data={
pageNum:this.page,
pageSize:this.pageSize,
cid:this.form.curriculumId,
projectName:this.keyword
}
this.$post(this.api.projectListByCourseId,data).then(res => {
console.log(res)
let { status, data } = res; let { status, data } = res;
if (status === 200 && data) { if (status === 200 && data.records) {
let list = data; let list = data.records;
let result = []; let result = [];
list.map(n => { list.map(n => {
n.enable || result.push(n); n.enable || result.push(n);
@ -470,6 +486,7 @@ export default {
this.$get(`${this.api.getDetailById}?id=${this.form.id}`).then(res => { this.$get(`${this.api.getDetailById}?id=${this.form.id}`).then(res => {
this.form = res.data; this.form = res.data;
this.formatDuration(); this.formatDuration();
this.getschoolCourse();
}).catch(err => { }).catch(err => {
}); });
}, },

@ -92,8 +92,8 @@
<el-button v-if="auth('复制')" type="text" @click="copyData(scope.row.projectId)">复制</el-button> <el-button v-if="auth('复制')" type="text" @click="copyData(scope.row.projectId)">复制</el-button>
<el-switch <el-switch
v-if="auth('禁用')" v-if="auth('禁用')"
v-model="scope.row.isOpen" v-model="scope.row.ccupationlabOpen"
:active-text="scope.row.isOpen ? '关闭' : '启用'" :active-text="scope.row.ccupationlabOpen ? '关闭' : '启用'"
:active-value="0" :active-value="0"
:inactive-value="1" :inactive-value="1"
style="margin: 0 10px 0 10px" style="margin: 0 10px 0 10px"
@ -323,7 +323,7 @@ export default {
}); });
}, },
switchOff(row) { // switchOff(row) { //
this.$get(`${this.api.updateIsOpen}?isOpen=${row.isOpen}&projectId=${row.projectId}&platformId=${this.queryData.platformId}`).then(res => { this.$get(`${this.api.updateIsOpen}?isOpen=${row.ccupationlabOpen}&projectId=${row.projectId}&platformId=${this.queryData.platformId}`).then(res => {
util.successMsg("更新启用状态成功"); util.successMsg("更新启用状态成功");
this.getData(); this.getData();
}).catch(err => { }).catch(err => {

@ -36,8 +36,8 @@ if (isHh) {
} else if (isDev) { } else if (isDev) {
jumpPath = "http://192.168.31.154:8087/"; jumpPath = "http://192.168.31.154:8087/";
// host = "http://www.occupationlab.com:9000/";//线上 // host = "http://www.occupationlab.com:9000/";//线上
host = "http://39.108.250.202:9000/"; // 中台测试服 // host = "http://39.108.250.202:9000/"; // 中台测试服
// host = "http://192.168.31.151:9000/"; // 榕 host = "http://192.168.31.151:9000/"; // 榕
// host = "http://192.168.31.125:9000/"; // 坤 // host = "http://192.168.31.125:9000/"; // 坤
// host = 'http://192.168.31.137:9000/'; // 赓 // host = 'http://192.168.31.137:9000/'; // 赓
title = "职站服务端管理系统"; title = "职站服务端管理系统";

Loading…
Cancel
Save