|
|
@ -73,6 +73,14 @@ |
|
|
|
:value="item.cid"> |
|
|
|
:value="item.cid"> |
|
|
|
</el-option> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
|
|
|
|
<!-- <el-select v-model="form.curriculumId" @change="initData"> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in systemList" |
|
|
|
|
|
|
|
:key="item.id" |
|
|
|
|
|
|
|
:label="item.label" |
|
|
|
|
|
|
|
:value="item.id"> |
|
|
|
|
|
|
|
</el-option> |
|
|
|
|
|
|
|
</el-select> --> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
@ -245,7 +253,8 @@ export default { |
|
|
|
page: 1, |
|
|
|
page: 1, |
|
|
|
pageSize: 5, |
|
|
|
pageSize: 5, |
|
|
|
total: 0, |
|
|
|
total: 0, |
|
|
|
isToProject: false |
|
|
|
isToProject: false, |
|
|
|
|
|
|
|
systemList: [] |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
@ -311,7 +320,7 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
// 缓存全选和半选状态下的所有节点 |
|
|
|
// 缓存全选和半选状态下的所有节点 |
|
|
|
this.allCheckedNodes = [...checked.checkedNodes, ...checked.halfCheckedNodes]; |
|
|
|
this.allCheckedNodes = [...checked.checkedNodes, ...checked.halfCheckedNodes]; |
|
|
|
console.log(this.allCheckedNodes) |
|
|
|
// console.log(this.allCheckedNodes) |
|
|
|
}, |
|
|
|
}, |
|
|
|
filterNode(value, data) { // 对树节点进行过滤 |
|
|
|
filterNode(value, data) { // 对树节点进行过滤 |
|
|
|
if (!value) return true; |
|
|
|
if (!value) return true; |
|
|
@ -379,8 +388,27 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
getProjectData() { |
|
|
|
getProjectData() { |
|
|
|
// this.$get(`${this.api.projectListByCourseId}?cid=${this.form.curriculumId}&permissions=1&projectName=${this.keyword}`).then(res => { |
|
|
|
this.$get(`${this.api.projectListByCourseId}?cid=${this.form.curriculumId}&permissions=1&projectName=${this.keyword}`).then(res => { |
|
|
|
|
|
|
|
let { status, data } = res; |
|
|
|
|
|
|
|
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 => { |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 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; |
|
|
|
// let { status, data } = res; |
|
|
|
|
|
|
|
// console.log('---') |
|
|
|
// console.log(data) |
|
|
|
// console.log(data) |
|
|
|
// if (status === 200 && data) { |
|
|
|
// if (status === 200 && data) { |
|
|
|
// let list = data; |
|
|
|
// let list = data; |
|
|
@ -391,49 +419,41 @@ export default { |
|
|
|
// this.projectDataAll = result; |
|
|
|
// this.projectDataAll = result; |
|
|
|
// console.log(result) |
|
|
|
// console.log(result) |
|
|
|
// this.total = result.length; |
|
|
|
// this.total = result.length; |
|
|
|
// // this.handlePage(); |
|
|
|
// this.handlePage(); |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }).catch(err => { |
|
|
|
// }).catch(err => { |
|
|
|
// }); |
|
|
|
// }); |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.$get(this.api.getSystemIdBySchool).then(res => { |
|
|
|
|
|
|
|
|
|
|
|
this.$get(this.api.getSystemIdBySchool).then(res => { |
|
|
|
// if (res.status == 200){ |
|
|
|
|
|
|
|
// this.systemList = res.data; |
|
|
|
if (res.status == 200){ |
|
|
|
// // 如果systemId有历史记录,就取历史记录里的systemId,否则就取默认的systemId |
|
|
|
const systemList = res.data; |
|
|
|
// const systemId = this.systemList[0].id; |
|
|
|
// 如果systemId有历史记录,就取历史记录里的systemId,否则就取默认的systemId |
|
|
|
// let data = { |
|
|
|
const systemId = systemList[0].id; |
|
|
|
// platformId: 1, // 平台:职站:1 中台:3 |
|
|
|
console.log(this.keyword, |
|
|
|
// founder: 2, // 创建人角色(0:系统 1:老师 2:全部) |
|
|
|
this.page, |
|
|
|
// state: "", // 状态(0:草稿箱 1:已发布) |
|
|
|
this.pageSize) |
|
|
|
// permissions: 1, // 项目权限(0:练习 1:考核 2:竞赛) |
|
|
|
console.log(systemId) |
|
|
|
// projectName: this.keyword, |
|
|
|
let data = { |
|
|
|
// pageNum: this.page, |
|
|
|
platformId: 1, // 平台:职站:1 中台:3 |
|
|
|
// pageSize: this.pageSize, |
|
|
|
founder: 2, // 创建人角色(0:系统 1:老师 2:全部) |
|
|
|
// systemId |
|
|
|
state: "", // 状态(0:草稿箱 1:已发布) |
|
|
|
// }; |
|
|
|
permissions: 1, // 项目权限(0:练习 1:考核 2:竞赛) |
|
|
|
// this.$post(this.api.queryProjectManage, data).then(res => { |
|
|
|
projectName: this.keyword, |
|
|
|
// const { data: { records } } = res |
|
|
|
pageNum: this.page, |
|
|
|
// this.projectDataAll = records; |
|
|
|
pageSize: this.pageSize, |
|
|
|
// this.total = records.length; |
|
|
|
systemId |
|
|
|
// this.handlePage(); |
|
|
|
}; |
|
|
|
// }).catch(err => { |
|
|
|
this.$post(this.api.queryProjectManage, data).then(res => { |
|
|
|
// }); |
|
|
|
// this.listData = res.data.records; |
|
|
|
// }else{ |
|
|
|
// this.total = res.data.total; |
|
|
|
// } |
|
|
|
console.log(res.data) |
|
|
|
|
|
|
|
const { data: { records } } = res |
|
|
|
|
|
|
|
this.projectDataAll = records; |
|
|
|
|
|
|
|
this.total = records.length; |
|
|
|
|
|
|
|
console.log(this.projectDataAll) |
|
|
|
|
|
|
|
this.handlePage(); |
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
// }); |
|
|
|
}, |
|
|
|
}, |
|
|
|
handlePage() { |
|
|
|
handlePage() { |
|
|
|
let result = this.projectDataAll.slice((this.page - 1) * this.pageSize, this.page * this.pageSize); |
|
|
|
let result = this.projectDataAll.slice((this.page - 1) * this.pageSize, this.page * this.pageSize); |
|
|
|