|
|
|
@ -302,7 +302,6 @@ export default { |
|
|
|
|
projectManage: {} |
|
|
|
|
}, // 复制之后,提交到后台的数据 |
|
|
|
|
listDataAll: [], |
|
|
|
|
isFirst: true |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
@ -330,7 +329,6 @@ export default { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.getSystemData() |
|
|
|
|
this.getData() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
...mapActions("project", [ |
|
|
|
@ -338,14 +336,12 @@ export default { |
|
|
|
|
]), |
|
|
|
|
getData () { |
|
|
|
|
this.setSystemId(this.form.systemId); |
|
|
|
|
if (this.isFirst) this.page = +this.$route.query.page || 1 |
|
|
|
|
let data = { |
|
|
|
|
...this.form, |
|
|
|
|
pageNum: this.page, |
|
|
|
|
pageSize: this.pageSize, |
|
|
|
|
}; |
|
|
|
|
this.$post(this.api.queryProjectManage, data).then(res => { |
|
|
|
|
this.isFirst = false |
|
|
|
|
this.listData = res.data.records; |
|
|
|
|
this.total = res.data.total; |
|
|
|
|
}).catch(err => { |
|
|
|
@ -372,7 +368,7 @@ export default { |
|
|
|
|
e.children = all.filter(n => e.systemId.split(',').includes(n.id + '')) // 筛选出该课程下的系统 |
|
|
|
|
}) |
|
|
|
|
this.curs = data |
|
|
|
|
this.curChange(this.cid) |
|
|
|
|
this.curChange(this.cid, 1) |
|
|
|
|
} |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
}, |
|
|
|
@ -459,12 +455,10 @@ export default { |
|
|
|
|
this.$get(`${this.api.updateIsOpen}?isOpen=${row.ccupationlabOpen}&projectId=${row.projectId}&platformId=${this.form.platformId}`).then(res => { |
|
|
|
|
util.successMsg("更新启用状态成功"); |
|
|
|
|
this.getData(); |
|
|
|
|
}).catch(err => { |
|
|
|
|
console.log(err); |
|
|
|
|
}); |
|
|
|
|
}).catch(err => { }); |
|
|
|
|
}, |
|
|
|
|
// 课程选择回调 |
|
|
|
|
curChange (val) { |
|
|
|
|
curChange (val, first) { |
|
|
|
|
const mallId = val[0] |
|
|
|
|
if (val.length === 1) { |
|
|
|
|
// 如果选择的是课程,则默认选中下面第一个系统 |
|
|
|
@ -473,7 +467,7 @@ export default { |
|
|
|
|
this.form.mallId = mallId |
|
|
|
|
this.form.cid = this.curs.find(e => e.id === mallId).cid |
|
|
|
|
this.form.systemId = this.cid[1] |
|
|
|
|
this.initData() |
|
|
|
|
first ? this.getData() : this.initData() |
|
|
|
|
}, |
|
|
|
|
copyData (projectId) { // 复制,根据项目id查询详情 |
|
|
|
|
this.copyVisible = true; |
|
|
|
@ -530,6 +524,11 @@ export default { |
|
|
|
|
i.projectId = '' |
|
|
|
|
}); |
|
|
|
|
this.$post(`${this.api.copyProjectManage}`, row).then(res => { |
|
|
|
|
this.form.projectName = '' |
|
|
|
|
this.form.state = '' |
|
|
|
|
this.form.permissions = '' |
|
|
|
|
this.form.founder = 2 |
|
|
|
|
|
|
|
|
|
this.initData(); |
|
|
|
|
util.successMsg("复制实验项目成功"); |
|
|
|
|
this.copyVisible = false; |
|
|
|
|