|
|
|
@ -106,13 +106,13 @@ |
|
|
|
|
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="auth" label="项目权限" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ permissionsKeys[scope.row.permissions] }} |
|
|
|
|
{{ permissionsKeys[scope.row.projectPermissions] }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<!-- <el-table-column prop="createUser" label="创建人" align="center"></el-table-column> --> |
|
|
|
|
<el-table-column prop="founder" label="创建人" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ founderKeys[scope.row.founder] }} |
|
|
|
|
{{ founderKeys[scope.row.cid] }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> |
|
|
|
@ -397,67 +397,16 @@ export default { |
|
|
|
|
n.enable || result.push(n); |
|
|
|
|
}); |
|
|
|
|
this.projectDataAll = result; |
|
|
|
|
console.log(result) |
|
|
|
|
this.total = result.length; |
|
|
|
|
this.handlePage(); |
|
|
|
|
} |
|
|
|
|
}).catch(err => { |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// test |
|
|
|
|
// for(let i=0; i<this.cidList.length; i++) { |
|
|
|
|
// this.$get(`${this.api.projectListByCourseId}?cid=${this.cidList[i]}&permissions=1&projectName=${this.keyword}`).then(res => { |
|
|
|
|
// let { status, data } = res; |
|
|
|
|
// console.log('---') |
|
|
|
|
// console.log(data) |
|
|
|
|
// if (status === 200 && data) { |
|
|
|
|
// let list = data; |
|
|
|
|
// let result = []; |
|
|
|
|
// list.map(n => { |
|
|
|
|
// n.enable || result.push(n); |
|
|
|
|
// }); |
|
|
|
|
// this.projectDataAll = result; |
|
|
|
|
// console.log(result) |
|
|
|
|
// this.total = result.length; |
|
|
|
|
// this.handlePage(); |
|
|
|
|
// } |
|
|
|
|
// }).catch(err => { |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.$get(this.api.getSystemIdBySchool).then(res => { |
|
|
|
|
|
|
|
|
|
// if (res.status == 200){ |
|
|
|
|
// this.systemList = res.data; |
|
|
|
|
// // 如果systemId有历史记录,就取历史记录里的systemId,否则就取默认的systemId |
|
|
|
|
// const systemId = this.systemList[0].id; |
|
|
|
|
// let data = { |
|
|
|
|
// platformId: 1, // 平台:职站:1 中台:3 |
|
|
|
|
// founder: 2, // 创建人角色(0:系统 1:老师 2:全部) |
|
|
|
|
// state: "", // 状态(0:草稿箱 1:已发布) |
|
|
|
|
// permissions: 1, // 项目权限(0:练习 1:考核 2:竞赛) |
|
|
|
|
// projectName: this.keyword, |
|
|
|
|
// pageNum: this.page, |
|
|
|
|
// pageSize: this.pageSize, |
|
|
|
|
// systemId |
|
|
|
|
// }; |
|
|
|
|
// this.$post(this.api.queryProjectManage, data).then(res => { |
|
|
|
|
// const { data: { records } } = res |
|
|
|
|
// this.projectDataAll = records; |
|
|
|
|
// this.total = records.length; |
|
|
|
|
// this.handlePage(); |
|
|
|
|
// }).catch(err => { |
|
|
|
|
// }); |
|
|
|
|
// }else{ |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
// }); |
|
|
|
|
}, |
|
|
|
|
handlePage() { |
|
|
|
|
let result = this.projectDataAll.slice((this.page - 1) * this.pageSize, this.page * this.pageSize); |
|
|
|
|
this.projectData = result; |
|
|
|
|
console.log(this.projectData) |
|
|
|
|
}, |
|
|
|
|
initData() { |
|
|
|
|
this.page = 1; |
|
|
|
|