dev_202412
yujialong 1 month ago
parent f58e39192b
commit 33787eadf1
  1. 1
      src/api/index.js
  2. 5
      src/pages/achievement/list/index.vue
  3. 3
      src/pages/achievement/list/project.vue
  4. 16
      src/pages/lesson/content/index.vue
  5. 14
      src/pages/lesson/content/source.vue
  6. 85
      src/pages/lesson/detail/index.vue
  7. 9
      src/pages/lesson/list/index.vue
  8. 2
      src/pages/project/add/index.vue
  9. 2
      src/pages/project/list/index.vue

@ -548,6 +548,7 @@ export default {
editSubsectionCurriculm: `nakadai/nakadai/curriculum/subsection/editSubsection`,
deleteSubsectionCurriculm: `nakadai/nakadai/curriculum/subsection/deleteSubsection`,
schoolCourseShelf: `nakadai/nakadai/curriculum/schoolCourseShelf`,
copySelfBuildCourse: `nakadai/nakadai/curriculum/copySelfBuildCourse`,
resourceLibrary: `nakadai/resourceLibrary/resourceLibrary`,
resourceDel: `nakadai/resourceLibrary/batchDeletion`,

@ -53,7 +53,10 @@ export default {
this.active = i
const el = this.$refs.project
el && el.getCourse && el.getCourse()
if (el && el.getCourse) {
el.form.curriculumId = ''
el.getCourse()
}
},
initTabs () {
const { btns } = this

@ -210,12 +210,13 @@ export default {
...this.form,
mallId: cur.mallId || '',
systemId: cur.systemId || '',
courseType: this.$parent.active === 'tab2' ? 1 : 0,
pageNum: this.page,
pageSize: this.pageSize,
};
this.$post(this.api.getAchievementInfo, data).then(res => {
let list = []
if (permissions == 0) {
if (this.$parent.active === 'tab3' && !permissions) {
list = res.page
this.total = res.total
} else {

@ -83,7 +83,7 @@
:close-on-click-modal="false">
<el-form>
<el-form-item>
<el-input placeholder="请输入章节名称,便于对小节归类" v-model="chapterName" maxlength="50"></el-input>
<el-input placeholder="请输入章节名称,便于对资源归类" v-model="chapterName" maxlength="50"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -103,8 +103,8 @@
</template>
</Upload>
</el-form-item>
<el-form-item label="小节名称">
<el-input placeholder="请输入小节名称" v-model.trim="sectionForm.sectionName" maxlength="50"
<el-form-item label="资源名称">
<el-input placeholder="请输入资源名称" v-model.trim="sectionForm.sectionName" maxlength="50"
@keyup.enter.native="sectionSubmit()"></el-input>
</el-form-item>
</el-form>
@ -128,10 +128,10 @@
</span>
</el-dialog>
<el-dialog title="修改小节名称" :visible.sync="sectionNameVisible" width="540px" :close-on-click-modal="false">
<el-dialog title="修改资源名称" :visible.sync="sectionNameVisible" width="540px" :close-on-click-modal="false">
<el-form @submit.native.prevent>
<el-form-item>
<el-input placeholder="请输入小节名称" v-model="sectionForm.sectionName" maxlength="50"
<el-input placeholder="请输入资源名称" v-model="sectionForm.sectionName" maxlength="50"
@keyup.enter.native="sectionNameSubmit()"></el-input>
</el-form-item>
</el-form>
@ -248,7 +248,7 @@ export default {
rules: {
sectionName: [
{ required: true, message: "请输入小节名称", trigger: "blur" }
{ required: true, message: "请输入资源名称", trigger: "blur" }
],
},
sectionForm: {
@ -622,7 +622,7 @@ export default {
}
},
async sectionSubmit (e) {
if (!this.sectionForm.sectionName) return this.$message.warning('请填写小节名称')
if (!this.sectionForm.sectionName) return this.$message.warning('请填写资源名称')
if (this.uploading) return this.$message.warning('资源正在上传中,请稍候')
if (!this.fileUrl && !this.fileId) return this.$message.warning('请上传资源')
const data = {
@ -792,7 +792,7 @@ export default {
}
},
sectionNameSubmit () {
if (!this.sectionForm.sectionName) return this.$message.warning("请填写小节名称")
if (!this.sectionForm.sectionName) return this.$message.warning("请填写资源名称")
this.$put(this.api.editSubsectionCurriculm, {
id: this.sectionId,
cid: this.id,

@ -142,8 +142,8 @@ export default {
tab2: '精品课程',
tab3: '文件素材',
},
sourceType: SourceConst.types,
curType: '',
sourceType: [],
curType: '全部',
sources: [],
checkAll: false,
keyword: '',
@ -176,6 +176,14 @@ export default {
init () {
this.getCourse()
this.checked = []
this.curType = '全部'
this.sourceType = [
{
id: '',
name: '全部'
},
...SourceConst.types
]
this.sourceType.forEach(e => {
e.check = false
})
@ -193,7 +201,7 @@ export default {
platformId: Setting.platformId,
type: 2,
keyword: this.keyword,
displayFileType: this.curType ? [this.curType] : [],
displayFileType: this.curType === '全部' ? [] : [this.curType],
})
const list = page.records
list.forEach(e => {

@ -222,28 +222,11 @@
<div class="item system">
<h6 class="p-title" style="margin-bottom: 0;">课程系统列表</h6>
<ul class="systems">
<li v-for="(item, i) in systems" :key="i" :title="item.systemName">
<div class="line">
<!-- <el-checkbox v-model="item.check" @change="val => courseChange(val, item)"></el-checkbox> -->
<div :class="['name', { active: curCourse == item.cid }]" @click="getProject(item)">
<span>{{ item.label }}</span>
<i class="el-icon-arrow-right"></i>
</div>
</div>
<div v-if="item.systemInfo" class="children">
<div v-for="(system, j) in item.systemInfo" :key="j" :title="system.label" class="line">
<!-- <el-checkbox v-model="system.check" @change="val => systemChange(val, system, item)"></el-checkbox> -->
<div :class="['name', { active: curCourse == item.cid && curSystem == system.systemId }]"
@click="getProject(item, system)">
<span>{{ system.systemName }}</span>
<i class="el-icon-arrow-right"></i>
</div>
</div>
</div>
</li>
</ul>
<div class="systems">
<el-tree ref="systems" :data="systems" :props="{
children: 'systemInfo',
}" :expand-on-click-node="false" @node-click="getProject"></el-tree>
</div>
</div>
<div class="item project">
@ -464,6 +447,10 @@ export default {
e.label = e.curriculumName
e.check = false
e.systemInfo && e.systemInfo.map(n => {
n.cid = e.cid || ''
n.mallId = e.mallId || ''
n.id = +n.systemId
n.label = n.systemName
n.check = false
})
})
@ -560,58 +547,17 @@ export default {
this.form.coverUrl = this.defaultCover
},
//
courseChange (val, item) {
item.systemInfo && item.systemInfo.map(e => e.check = val)
this.systemChange(val, {
systemId: item.systemInfo ? item.systemInfo.map(e => e.systemId).join() : ''
}, item)
},
//
async systemChange (val, system, course) {
//
const { projects, checkeds } = this
if (projects.length && projects[0].systemId == system.systemId) {
projects.map(e => {
e.check = val
})
}
this.projectKeyword = ''
const res = await this.$post(this.api.configureCourseProjectBySchool, {
projectName: this.projectKeyword,
permissions: this.permissions,
cid: course.cid,
systemId: system.systemId
})
const list = res.projectManages
list.forEach(e => {
const i = checkeds.findIndex(n => (e.projectId && n.projectId == e.projectId && n.systemId == e.systemId) || (e.paperId && e.paperId == n.paperId))
if (val) {
i === -1 && checkeds.push(e)
} else if (i !== -1) {
checkeds.splice(i, 1)
}
})
this.checkedAll = _.cloneDeep(checkeds) //
},
//
async getProject (item, system) {
async getProject (row) {
const checked = this.checkeds
if (system) {
this.curCourse = item.cid
this.curSystem = +system.systemId
this.curSystemIds = ''
} else if (item) {
this.curCourse = item.cid
this.curSystem = ''
this.curSystemIds = item.systemInfo ? item.systemInfo.map(e => e.systemId).join() : ''
}
let systemId = row.systemId || ''
if (row.systemInfo) systemId = row.systemInfo.map(e => e.systemId).join()
const res = await this.$post(this.api.configureCourseProjectBySchool, {
projectName: this.projectKeyword,
permissions: this.permissions,
cid: this.curCourse,
systemId: this.curSystem || this.curSystemIds,
cid: row.cid || '',
systemId,
mallId: row.mallId || '',
})
const list = res.projectManages
list.map(e => {
@ -1120,7 +1066,6 @@ export default {
.system {
width: 350px;
background-color: #f9f9f9;
}
.systems {

@ -251,6 +251,15 @@ export default {
},
//
async copy (row) {
this.$confirm('确定要复制吗', "提示", {
type: "warning"
}).then(async () => {
await this.$post(`${this.api.copySelfBuildCourse}?cid=${row.cid}`)
Util.successMsg('复制成功')
this.initData()
}).catch(() => { })
return
this.$router.push(`detail?cid=${row.cid}&copy=1`)
},
//

@ -362,7 +362,7 @@ export default {
res.data.map(e => {
e.id = e.mallId
e.label = e.curriculumName
e.children = data.filter(n => e.systemId.split(',').includes(n.id + '') && n.id !== 21) //
if (e.systemId) e.children = data.filter(n => e.systemId.split(',').includes(n.id + '') && n.id !== 21) //
})
this.curs = res.data
}

@ -307,7 +307,7 @@ export default {
data.map(e => {
e.id = e.mallId
e.label = e.curriculumName
e.children = all.filter(n => e.systemId.split(',').includes(n.id + '')) //
if (e.systemId) e.children = all.filter(n => e.systemId.split(',').includes(n.id + '')) //
})
this.curs = data
this.curChange(this.cid, 1)

Loading…
Cancel
Save