|
|
|
@ -41,7 +41,7 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item class="req" label="适用专业" required> |
|
|
|
|
<div class="subject"> |
|
|
|
|
<div v-if="form.curriculumDisciplines && form.curriculumDisciplines.length" class="subject"> |
|
|
|
|
<div v-for="(item, i) in form.curriculumDisciplines" :key="i" class="line"> |
|
|
|
|
<el-form-item label="学科类别"> |
|
|
|
|
<el-select v-model="item.categoryId" @change="getProfessionalClass(item)"> |
|
|
|
@ -222,7 +222,8 @@ |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- 配置弹窗 --> |
|
|
|
|
<el-dialog :visible.sync="configVisible" width="1200px" center custom-class="config-dia"> |
|
|
|
|
<el-drawer title="添加系统资源" :visible.sync="configVisible" size="1200px" :close-on-click-modal="false" |
|
|
|
|
custom-class="config-dia"> |
|
|
|
|
<div class="config-wrap"> |
|
|
|
|
<div class="item system"> |
|
|
|
|
<div class="title-wrap flex-center"> |
|
|
|
@ -267,37 +268,39 @@ |
|
|
|
|
<p class="addhr_tag"></p> |
|
|
|
|
<span>已选择项目({{ checkeds.length }}个)</span> |
|
|
|
|
</div> |
|
|
|
|
<el-input style="width: 200px;margin-bottom: 20px;" placeholder="请输入项目名称" prefix-icon="el-icon-search" |
|
|
|
|
<el-input style="width: 200px;" placeholder="请输入项目名称" prefix-icon="el-icon-search" |
|
|
|
|
v-model.trim="checkedKeyword" clearable></el-input> |
|
|
|
|
<el-table :data="checkeds" class="table" header-align="center" max-height="470"> |
|
|
|
|
<el-table-column type="index" width="55" label="序号" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="systemName" label="系统名称" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="projectName" width="80" label="系统类型" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.type === 1 ? '流程类' : scope.row.type === 3 ? '理论' : '编程类' }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="projectName" label="项目名称" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.projectName || scope.row.paperName }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center" width="55"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<i :class="['el-icon-delete rm', { disabled: scope.row.disabled }]" |
|
|
|
|
@click="delProject(scope.$index, scope.row)"></i> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
<div class="systems"> |
|
|
|
|
<el-table :data="checkeds" class="table" header-align="center"> |
|
|
|
|
<el-table-column type="index" width="55" label="序号" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="systemName" label="系统名称" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="projectName" width="80" label="系统类型" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.type === 1 ? '流程类' : scope.row.type === 3 ? '理论' : '编程类' }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="projectName" label="项目名称" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.projectName || scope.row.paperName }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center" width="55"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<i :class="['el-icon-delete rm', { disabled: scope.row.disabled }]" |
|
|
|
|
@click="delProject(scope.$index, scope.row)"></i> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<div class="btns"> |
|
|
|
|
<el-button @click="configVisible = false">取 消</el-button> |
|
|
|
|
<el-button type="primary" @click="handleConfirm">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
</el-drawer> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -382,7 +385,6 @@ export default { |
|
|
|
|
multiplePractice: [], |
|
|
|
|
|
|
|
|
|
submiting: false, // 新增编辑防抖标识 |
|
|
|
|
loadIns: null, |
|
|
|
|
updateTime: 0, |
|
|
|
|
systems: [], |
|
|
|
|
systemsAll: [], |
|
|
|
@ -442,6 +444,7 @@ export default { |
|
|
|
|
methods: { |
|
|
|
|
getInfoData () { |
|
|
|
|
this.$post(`${this.api.curriculumDetail}?cid=${this.cid}`).then(({ data }) => { |
|
|
|
|
if (!data.coverUrl) data.coverUrl = 'https://izhixinyun.com/images/course-cover.png' |
|
|
|
|
if (data.supplier) data.supplier = data.supplier.split(',').map(e => +e) |
|
|
|
|
this.form = data |
|
|
|
|
this.$nextTick(() => { |
|
|
|
@ -807,17 +810,17 @@ export default { |
|
|
|
|
this.step-- |
|
|
|
|
}, |
|
|
|
|
async save (next) { |
|
|
|
|
if (this.submiting) return false |
|
|
|
|
const { step, cid } = this |
|
|
|
|
// 第一步 |
|
|
|
|
if (step === 1) { |
|
|
|
|
this.$refs.form.validate(async (valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
if (this.submiting) return false |
|
|
|
|
const form = JSON.parse(JSON.stringify(this.form)) |
|
|
|
|
form.supplier = form.supplier.join() |
|
|
|
|
form.platformId = Setting.platformId |
|
|
|
|
this.submiting = true |
|
|
|
|
this.loadIns = this.$loading({ |
|
|
|
|
const load = this.$loading({ |
|
|
|
|
lock: true, |
|
|
|
|
text: 'Loading', |
|
|
|
|
spinner: 'el-icon-loading', |
|
|
|
@ -825,7 +828,6 @@ export default { |
|
|
|
|
}) |
|
|
|
|
try { |
|
|
|
|
const res = await this.$post(this.api[cid ? 'modifyCourse' : 'createCurriculum'], form) |
|
|
|
|
this.loadIns.close() |
|
|
|
|
if (next) { |
|
|
|
|
this.step = 2 |
|
|
|
|
if (!cid) { |
|
|
|
@ -837,7 +839,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
} finally { |
|
|
|
|
this.submiting = false |
|
|
|
|
this.loadIns.close() |
|
|
|
|
load.close() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -846,6 +848,13 @@ export default { |
|
|
|
|
if (!this.practiceData.length) { |
|
|
|
|
return this.$message.warning("请添加练习项目配置") |
|
|
|
|
} else { |
|
|
|
|
this.submiting = true |
|
|
|
|
const load = this.$loading({ |
|
|
|
|
lock: true, |
|
|
|
|
text: 'Loading', |
|
|
|
|
spinner: 'el-icon-loading', |
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
|
}) |
|
|
|
|
const list = this.practiceData.map(i => { |
|
|
|
|
let obj = { |
|
|
|
|
isShow: i.isShow, |
|
|
|
@ -857,14 +866,19 @@ export default { |
|
|
|
|
return obj |
|
|
|
|
}); |
|
|
|
|
list.sort((a, b) => a.sort - b.sort) |
|
|
|
|
await this.$post(this.api.configureCourseProject, { |
|
|
|
|
cid: this.cid, |
|
|
|
|
systemIdByPractice: list |
|
|
|
|
}) |
|
|
|
|
if (next) { |
|
|
|
|
this.step = 3 |
|
|
|
|
} else { |
|
|
|
|
this.back() |
|
|
|
|
try { |
|
|
|
|
await this.$post(this.api.configureCourseProject, { |
|
|
|
|
cid: this.cid, |
|
|
|
|
systemIdByPractice: list |
|
|
|
|
}) |
|
|
|
|
if (next) { |
|
|
|
|
this.step = 3 |
|
|
|
|
} else { |
|
|
|
|
this.back() |
|
|
|
|
} |
|
|
|
|
} finally { |
|
|
|
|
this.submiting = false |
|
|
|
|
load.close() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else if (step === 3) { |
|
|
|
@ -872,6 +886,13 @@ export default { |
|
|
|
|
if (!this.assessmentData.length) { |
|
|
|
|
return this.$message.warning("请添加考核项目配置") |
|
|
|
|
} else { |
|
|
|
|
this.submiting = true |
|
|
|
|
const load = this.$loading({ |
|
|
|
|
lock: true, |
|
|
|
|
text: 'Loading', |
|
|
|
|
spinner: 'el-icon-loading', |
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
|
}) |
|
|
|
|
const list = this.assessmentData.map(i => { |
|
|
|
|
let obj = { |
|
|
|
|
isShow: i.isShow, |
|
|
|
@ -883,11 +904,16 @@ export default { |
|
|
|
|
return obj; |
|
|
|
|
}); |
|
|
|
|
list.sort((a, b) => a.sort - b.sort) |
|
|
|
|
await this.$post(this.api.configureCourseProject, { |
|
|
|
|
cid: this.cid, |
|
|
|
|
systemIdByAssessment: list |
|
|
|
|
}) |
|
|
|
|
this.step = 4 |
|
|
|
|
try { |
|
|
|
|
await this.$post(this.api.configureCourseProject, { |
|
|
|
|
cid: this.cid, |
|
|
|
|
systemIdByAssessment: list |
|
|
|
|
}) |
|
|
|
|
this.step = 4 |
|
|
|
|
} finally { |
|
|
|
|
this.submiting = false |
|
|
|
|
load.close() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -1068,8 +1094,16 @@ export default { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/.config-dia { |
|
|
|
|
.el-drawer__header { |
|
|
|
|
padding-bottom: 20px; |
|
|
|
|
margin-bottom: 0; |
|
|
|
|
border-bottom: 1px solid #eee; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.config-wrap { |
|
|
|
|
display: flex; |
|
|
|
|
padding: 15px; |
|
|
|
|
gap: 20px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.title-wrap { |
|
|
|
@ -1078,9 +1112,8 @@ export default { |
|
|
|
|
|
|
|
|
|
.item { |
|
|
|
|
width: 250px; |
|
|
|
|
max-height: 600px; |
|
|
|
|
height: calc(100vh - 161px); |
|
|
|
|
padding: 10px; |
|
|
|
|
margin-right: 20px; |
|
|
|
|
overflow: hidden; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1089,8 +1122,8 @@ export default { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.systems { |
|
|
|
|
max-height: calc(100vh - 230px); |
|
|
|
|
margin-top: 10px; |
|
|
|
|
max-height: 520px; |
|
|
|
|
overflow: auto; |
|
|
|
|
|
|
|
|
|
li { |
|
|
|
|