|
|
@ -189,7 +189,7 @@ |
|
|
|
<el-form-item v-if="!curRow.projectManage.founder" |
|
|
|
<el-form-item v-if="!curRow.projectManage.founder" |
|
|
|
label="课程"> |
|
|
|
label="课程"> |
|
|
|
<el-cascader v-model="copyMallId" |
|
|
|
<el-cascader v-model="copyMallId" |
|
|
|
:options="curs" |
|
|
|
:options="copyCurs" |
|
|
|
:props="{ checkStrictly: true, value: 'id' }" |
|
|
|
:props="{ checkStrictly: true, value: 'id' }" |
|
|
|
popper-class="course-cas" |
|
|
|
popper-class="course-cas" |
|
|
|
@expand-change="copySystemChange" |
|
|
|
@expand-change="copySystemChange" |
|
|
@ -200,6 +200,7 @@ |
|
|
|
class="dialog-footer"> |
|
|
|
class="dialog-footer"> |
|
|
|
<el-button @click="copyVisible = false">取 消</el-button> |
|
|
|
<el-button @click="copyVisible = false">取 消</el-button> |
|
|
|
<el-button type="primary" |
|
|
|
<el-button type="primary" |
|
|
|
|
|
|
|
:loading="submiting" |
|
|
|
@click="copySubmit">确 定</el-button> |
|
|
|
@click="copySubmit">确 定</el-button> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
@ -214,6 +215,7 @@ export default { |
|
|
|
data () { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
showBack: Boolean(this.$route.query.show), |
|
|
|
showBack: Boolean(this.$route.query.show), |
|
|
|
|
|
|
|
lc: [11, 12, 19], |
|
|
|
cid: [], |
|
|
|
cid: [], |
|
|
|
curs: [], |
|
|
|
curs: [], |
|
|
|
systemId: "", |
|
|
|
systemId: "", |
|
|
@ -288,10 +290,12 @@ export default { |
|
|
|
page: +this.$route.query.page || 1, |
|
|
|
page: +this.$route.query.page || 1, |
|
|
|
pageSize: 10, |
|
|
|
pageSize: 10, |
|
|
|
multipleSelection: [], |
|
|
|
multipleSelection: [], |
|
|
|
|
|
|
|
submiting: false, |
|
|
|
copyVisible: false, |
|
|
|
copyVisible: false, |
|
|
|
|
|
|
|
copyCurs: [], |
|
|
|
copyForm: { |
|
|
|
copyForm: { |
|
|
|
projectName: '', |
|
|
|
projectName: '', |
|
|
|
mallId: [] |
|
|
|
mallId: '' |
|
|
|
}, |
|
|
|
}, |
|
|
|
copyMallId: [], |
|
|
|
copyMallId: [], |
|
|
|
curRow: { |
|
|
|
curRow: { |
|
|
@ -481,8 +485,15 @@ export default { |
|
|
|
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 |
|
|
|
|
|
|
|
// 沙盘、银行、众筹只能选各自的系统,因此如果是这3个系统的话,要把其他系统都过滤掉 |
|
|
|
|
|
|
|
this.copyCurs = 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) |
|
|
|
this.copyMallId = [] |
|
|
|
this.copyMallId = [] |
|
|
|
this.copyForm.projectName = res.projectManage.projectName; |
|
|
|
this.copyForm = { |
|
|
|
|
|
|
|
projectName: res.projectManage.projectName, |
|
|
|
|
|
|
|
mallId: '' |
|
|
|
|
|
|
|
} |
|
|
|
this.curRow = { |
|
|
|
this.curRow = { |
|
|
|
projectManage: JSON.parse(JSON.stringify(res.projectManage)), |
|
|
|
projectManage: JSON.parse(JSON.stringify(res.projectManage)), |
|
|
|
projectJudgmentList: JSON.parse(JSON.stringify(res.projectJudgmentVos)) |
|
|
|
projectJudgmentList: JSON.parse(JSON.stringify(res.projectJudgmentVos)) |
|
|
@ -496,8 +507,9 @@ export default { |
|
|
|
this.copyForm.mallId = val[0] |
|
|
|
this.copyForm.mallId = val[0] |
|
|
|
}, |
|
|
|
}, |
|
|
|
copySubmit () { |
|
|
|
copySubmit () { |
|
|
|
|
|
|
|
if (this.submiting) return false |
|
|
|
const form = this.copyForm |
|
|
|
const form = this.copyForm |
|
|
|
const row = this.curRow |
|
|
|
const row = JSON.parse(JSON.stringify(this.curRow)) |
|
|
|
const fromSystem = !row.projectManage.founder |
|
|
|
const fromSystem = !row.projectManage.founder |
|
|
|
if (!form.projectName) { |
|
|
|
if (!form.projectName) { |
|
|
|
util.warningMsg("请输入项目名称"); |
|
|
|
util.warningMsg("请输入项目名称"); |
|
|
@ -508,6 +520,7 @@ export default { |
|
|
|
util.warningMsg("请选择课程"); |
|
|
|
util.warningMsg("请选择课程"); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.submiting = true |
|
|
|
row.projectManage.projectName = form.projectName |
|
|
|
row.projectManage.projectName = form.projectName |
|
|
|
if (fromSystem) row.projectManage.mallId = form.mallId |
|
|
|
if (fromSystem) row.projectManage.mallId = form.mallId |
|
|
|
row.projectManage.projectId = ""; |
|
|
|
row.projectManage.projectId = ""; |
|
|
@ -519,8 +532,9 @@ export default { |
|
|
|
this.initData(); |
|
|
|
this.initData(); |
|
|
|
util.successMsg("复制实验项目成功"); |
|
|
|
util.successMsg("复制实验项目成功"); |
|
|
|
this.copyVisible = false; |
|
|
|
this.copyVisible = false; |
|
|
|
|
|
|
|
this.submiting = false |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
|
console.log(err); |
|
|
|
this.submiting = false |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
goBack () { // 返回 |
|
|
|
goBack () { // 返回 |
|
|
|