@@ -135,6 +139,7 @@ export default {
// 初始化
init () {
this.getCourse()
+ this.checked = []
},
// 课程列表
async getCourse () {
@@ -253,21 +258,25 @@ export default {
async submit () {
try {
if (this.submiting) return false
- this.submiting = true
const { checked } = this
- const { chapterId, id } = this.$parent
- const result = checked.map(e => {
- return {
- chapterId,
- cid: id,
- resourceId: e.id,
- type: e.cid ? 0 : 1,
- }
- })
- const res = await this.$post(this.api.combinationResource, result)
- this.sourceVisible = false
- this.$parent.getData()
- this.submiting = false
+ if (checked.length) {
+ this.submiting = true
+ const { chapterId, id } = this.$parent
+ const result = checked.map(e => {
+ return {
+ chapterId,
+ cid: id,
+ resourceId: e.id,
+ type: e.cid ? 0 : 1,
+ }
+ })
+ await this.$post(this.api.combinationResource, result)
+ this.sourceVisible = false
+ this.$parent.getData()
+ this.submiting = false
+ } else {
+ Util.warningMsg('请选择资源')
+ }
} catch (e) {
this.submiting = false
}
@@ -357,6 +366,7 @@ export default {
width: 100px;
max-height: 80px;
margin-right: 15px;
+ border-radius: 6px;
}
.course-name {
@@ -387,6 +397,12 @@ export default {
flex: 1;
padding: 15px;
+ .total {
+ font-size: 15px;
+ color: #333;
+ font-weight: 600;
+ }
+
.lines {
height: calc(100vh - 228px);
padding-right: 10px;
diff --git a/src/views/course/detail.vue b/src/views/course/detail.vue
index 7f3e156..8405a79 100644
--- a/src/views/course/detail.vue
+++ b/src/views/course/detail.vue
@@ -314,9 +314,6 @@ export default {
data () {
return {
cid: this.$route.query.cid,
- headers: {
- token: sessionStorage.getItem("token")
- },
editorConfig,
step: 1,
form: {
@@ -370,8 +367,6 @@ export default {
],
},
subjectList: [],
- ProfessionalClassList: [],
- ProfessionalList: [],
pageNo: 1,
pageSize: 10,
@@ -385,9 +380,6 @@ export default {
practiceTotal: 0,
multiplePractice: [],
- matches: [],
- matcheTotal: 0,
- multipleMatch: [],
submiting: false, // 新增编辑防抖标识
loadIns: null,
updateTime: 0,
@@ -405,17 +397,6 @@ export default {
suppliers: [],
mulSystem: this.$store.state.btns.includes('/curriculum:支持多系统组课'), // 是否支持多系统组课
-
- status: [
- {
- id: 0,
- name: '正常'
- }
- ],
- practiceData: [],
- practiceTotal: 0,
- multiplePractice: [],
-
assessmentData: [],
assessmentTotal: 0,
multipleAssessment: [],
@@ -756,11 +737,11 @@ export default {
}
}
},
- handleSelectionPractice (val) { // 多选练习项目
- this.multiplePractice = val;
+ handleSelectionPractice (val) {
+ this.multiplePractice = val
},
- handleSelectionMatch (val) { // 多选竞赛项目
- this.multipleMatch = val;
+ handleSelectionAssessment (val) {
+ this.multipleAssessment = val
},
// 练习考核弹框
@@ -782,9 +763,6 @@ export default {
} else if (!type && !this.multiplePractice.length) {
this.$message.warning("请勾选练习项目!");
return;
- } else if (type == 2 && !this.multipleMatch.length) {
- this.$message.warning("请勾选竞赛项目!");
- return;
}
this.$confirm("此操作将批量移除项目, 是否继续?", "提示", {
type: "warning"
@@ -807,15 +785,6 @@ export default {
}
}
this.practiceData = tempArr;
- } else {
- let ids = this.multipleMatch.map(i => i.projectId);
- let tempArr = [];
- for (let i = 0; i < this.matches.length; i++) {
- if (!ids.includes(this.matches[i].projectId)) {
- tempArr.push(this.matches[i]);
- }
- }
- this.matches = tempArr;
}
this.$message.success("批量移除成功");
}).catch(() => {
diff --git a/src/views/course/list.vue b/src/views/course/list.vue
index a35bc1c..eed0d27 100644
--- a/src/views/course/list.vue
+++ b/src/views/course/list.vue
@@ -106,6 +106,7 @@