|
|
@ -385,18 +385,6 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { }) |
|
|
|
}).catch(err => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 课程选择回调 |
|
|
|
|
|
|
|
curChange (val) { |
|
|
|
|
|
|
|
const mallId = val[0] |
|
|
|
|
|
|
|
if (val.length === 1) { |
|
|
|
|
|
|
|
// 如果选择的是课程,则默认选中下面第一个系统 |
|
|
|
|
|
|
|
this.cid = [mallId, this.curs.find(e => e.id === mallId).children[0].id] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.queryData.mallId = mallId |
|
|
|
|
|
|
|
this.queryData.cid = this.curs.find(e => e.id === mallId).cid |
|
|
|
|
|
|
|
this.systemId = this.cid[1] |
|
|
|
|
|
|
|
this.initData() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 创建人选择回调 |
|
|
|
// 创建人选择回调 |
|
|
|
founderChange (val) { |
|
|
|
founderChange (val) { |
|
|
|
this.$router.push({ |
|
|
|
this.$router.push({ |
|
|
@ -482,17 +470,34 @@ export default { |
|
|
|
console.log(err); |
|
|
|
console.log(err); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 课程选择回调 |
|
|
|
|
|
|
|
curChange (val) { |
|
|
|
|
|
|
|
const mallId = val[0] |
|
|
|
|
|
|
|
if (val.length === 1) { |
|
|
|
|
|
|
|
// 如果选择的是课程,则默认选中下面第一个系统 |
|
|
|
|
|
|
|
this.cid = [mallId, this.curs.find(e => e.id === mallId).children[0].id] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.queryData.mallId = mallId |
|
|
|
|
|
|
|
this.queryData.cid = this.curs.find(e => e.id === mallId).cid |
|
|
|
|
|
|
|
this.systemId = this.cid[1] |
|
|
|
|
|
|
|
this.initData() |
|
|
|
|
|
|
|
}, |
|
|
|
copyData (projectId) { // 复制,根据项目id查询详情 |
|
|
|
copyData (projectId) { // 复制,根据项目id查询详情 |
|
|
|
this.copyVisible = true; |
|
|
|
this.copyVisible = true; |
|
|
|
this.$get(`${this.api.getProjectDetail}?projectId=${projectId}`).then(res => { |
|
|
|
this.$get(`${this.api.getProjectDetail}?projectId=${projectId}`).then(res => { |
|
|
|
const { systemId } = res.projectManage |
|
|
|
const { systemId } = res.projectManage |
|
|
|
// 沙盘、银行、众筹只能选各自的系统,因此如果是这3个系统的话,要把其他系统都过滤掉 |
|
|
|
// 沙盘、银行、众筹只能选各自的系统,因此如果是这3个系统的话,要把其他系统都过滤掉 |
|
|
|
this.copyCurs = this.lc.includes(systemId) ? this.curs.filter(e => e.systemId == systemId) : this.curs.filter(e => !this.lc.includes(+e.systemId)) |
|
|
|
const curs = this.lc.includes(systemId) ? this.curs.filter(e => e.systemId == systemId) : this.curs.filter(e => !this.lc.includes(+e.systemId)) |
|
|
|
console.log("🚀 ~ this.$get ~ this.curs:", this.copyCurs) |
|
|
|
curs.map(e => { |
|
|
|
this.copyMallId = [] |
|
|
|
if (e.children && e.children.length) { |
|
|
|
|
|
|
|
e.children = this.lc.includes(systemId) ? e.children.filter(n => n.id === systemId) : e.children.filter(n => !this.lc.includes(n.id)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.copyCurs = curs |
|
|
|
|
|
|
|
this.copyMallId = [this.queryData.mallId, this.systemId] |
|
|
|
this.copyForm = { |
|
|
|
this.copyForm = { |
|
|
|
projectName: res.projectManage.projectName, |
|
|
|
projectName: res.projectManage.projectName, |
|
|
|
mallId: '' |
|
|
|
mallId: this.queryData.mallId |
|
|
|
} |
|
|
|
} |
|
|
|
this.curRow = { |
|
|
|
this.curRow = { |
|
|
|
projectManage: JSON.parse(JSON.stringify(res.projectManage)), |
|
|
|
projectManage: JSON.parse(JSON.stringify(res.projectManage)), |
|
|
@ -516,17 +521,20 @@ export default { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
// 系统创建的才需要选择系统 |
|
|
|
// 系统创建的才需要选择系统 |
|
|
|
if (fromSystem && !form.mallId) { |
|
|
|
if (fromSystem && !this.copyMallId.length) { |
|
|
|
util.warningMsg("请选择课程"); |
|
|
|
util.warningMsg("请选择课程"); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
this.submiting = true |
|
|
|
this.submiting = true |
|
|
|
row.projectManage.projectName = form.projectName |
|
|
|
row.projectManage.projectName = form.projectName |
|
|
|
if (fromSystem) row.projectManage.mallId = form.mallId |
|
|
|
if (fromSystem) { |
|
|
|
row.projectManage.projectId = ""; |
|
|
|
row.projectManage.mallId = this.copyMallId[0] |
|
|
|
|
|
|
|
row.projectManage.systemId = this.copyMallId[1] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
row.projectManage.projectId = '' |
|
|
|
row.projectManage.founder = 1 |
|
|
|
row.projectManage.founder = 1 |
|
|
|
row.projectJudgmentList.forEach(i => { |
|
|
|
row.projectJudgmentList.forEach(i => { |
|
|
|
i.projectId = ""; |
|
|
|
i.projectId = '' |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.$post(`${this.api.copyProjectManage}`, row).then(res => { |
|
|
|
this.$post(`${this.api.copyProjectManage}`, row).then(res => { |
|
|
|
this.initData(); |
|
|
|
this.initData(); |
|
|
|