dev_2022-05-11 V2.2.2
yujialong 3 years ago
parent 5637e7930a
commit 209660f910
  1. 4
      src/api/index.js
  2. BIN
      src/assets/img/none.png
  3. 167
      src/pages/course/contentSettings/index.vue
  4. 23
      src/pages/station/list/index.vue
  5. 11
      src/pages/station/preview/index.vue
  6. 2
      src/pages/student/list/index.vue
  7. 2
      src/store/modules/user.js

@ -68,8 +68,8 @@ export default {
// 成绩管理
deleteExperimentalReport: `occupationlab/achievement/deleteExperimentalReport`, // 单个、批量删除实验报告
exportAssessmentInfo: `occupationlab/achievement/exportAssessmentInfo`, // 批量导出考核成绩
exportPracticeInfo: `occupationlab/achievement/exportPracticeInfo`, // 批量导出练习成绩
exportAssessmentInfo: `${host}occupationlab/achievement/exportAssessmentInfo`, // 批量导出考核成绩
exportPracticeInfo: `${host}occupationlab/achievement/exportPracticeInfo`, // 批量导出练习成绩
getAchievementInfo: `occupationlab/achievement/getAchievementInfo`, // 管理端成绩管理
getAssessmentDetail: `occupationlab/achievement/getAssessmentDetail`, // 管理端考核成绩详情
getPracticeDetail: `occupationlab/achievement/getPracticeDetail`, // 管理端练习成绩详情

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@ -2,7 +2,7 @@
<div>
<el-card shadow="hover" class="m-b-20">
<div class="flex-between">
<el-page-header @back="goBack" :content="'内容设置'"></el-page-header>
<el-page-header @back="goBack" :content="sorting? '更改排序' : '内容设置'"></el-page-header>
</div>
</el-card>
<!--内容设置-->
@ -16,6 +16,7 @@
<el-button type="primary" round v-throttle @click="sort">编辑顺序</el-button>
</template>
<template v-else>
<el-button type="primary" round @click="move">批量移动</el-button>
<el-button type="primary" round v-throttle @click="cancelSort">取消</el-button>
<el-button type="primary" round v-throttle @click="saveSort">保存</el-button>
</template>
@ -40,6 +41,11 @@
</div>
<el-table :data="chapter.subsectionList" class="table" stripe header-align="center">
<el-table-column v-if="sorting" width="55" align="center">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.check"></el-checkbox>
</template>
</el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="name" label="资源名称">
</el-table-column>
@ -77,7 +83,7 @@
</span>
</el-dialog>
<el-dialog title="添加小节" :visible.sync="sectionVisible" width="24%" @close="closeSection" :close-on-click-modal="false">
<el-dialog title="添加小节" :visible.sync="sectionVisible" width="28%" @close="closeSection" :close-on-click-modal="false">
<el-form label-width="80px">
<el-form-item label="资源添加">
<el-upload
@ -178,6 +184,25 @@
</div>
</div>
</el-card>
<el-dialog title="资源移动" :visible.sync="moveVisible" :close-on-click-modal="false" width="330px">
<el-form>
<el-form-item label="目标章节">
<el-select v-model="moveForm.id" placeholder="请选择目标章节" @change="chapterChange">
<el-option v-for="(item, i) in chapters" :key="i" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目标排序">
<el-select v-model="moveForm.sort" placeholder="请选择目标排序">
<el-option v-for="(item, i) in sortList" :key="i" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="moveVisible = false">取消</el-button>
<el-button type="primary" @click="moveConfirm">确定</el-button>
</span>
</el-dialog>
</div>
</template>
@ -195,6 +220,7 @@ export default {
token: util.local.get(Setting.tokenKey)
},
id: "",
originChapters: [],
chapters: [],
sorting: false,
uploading: false,
@ -227,7 +253,24 @@ export default {
loadIns: null,
pdfVisible: false,
pdfSrc: "",
previewing: false
previewing: false,
moveVisible: false,
checkList: [],
sortList: [
{
id: 'bottom',
name: '置末'
},
{
id: 'top',
name: '置顶'
}
],
moveForm: {
id: '',
sort: 'bottom'
},
moved: false //
};
},
components: { pdf },
@ -255,11 +298,30 @@ export default {
});
},
goBack() {
if (this.previewing) {
this.closeIframe();
//
if (this.previewing) {
this.closeIframe();
} else {
//
if (this.sorting) {
//
if (this.moved) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
}).then(() => {
this.saveSort()
this.moved = false
}).catch(() => {
this.sorting = false
this.chapters = JSON.parse(JSON.stringify(this.originChapters))
})
} else {
this.sorting = false
}
} else {
this.$router.push("/course/list");
this.$router.back()
}
}
},
iframeOnload() {
document.querySelector("#fileIframe").onload = e => {
@ -353,16 +415,96 @@ export default {
this.chapterVisible = true;
},
sort() {
this.sorting = true;
this.originChapters = JSON.parse(JSON.stringify(this.chapters))
this.sorting = true;
},
//
move() {
const list = this.chapters
const checkList = []
list.map(e => {
e.subsectionList.map(n => {
n.check && checkList.push(n)
})
})
this.checkList = checkList
if (checkList.length) {
this.moveForm = {
id: '',
sort: 'bottom'
}
this.sortList = [
{
id: 'bottom',
name: '置末'
},
{
id: 'top',
name: '置顶'
}
]
this.moveVisible = true
} else {
this.$message.warning('请选择小节!')
}
},
//
chapterChange(id) {
const list = []
//
this.chapters.find(e => e.id === id).subsectionList.map((e, i) => {
list.push({
id: i,
name: i+1
})
})
//
this.sortList = [
{
id: 'bottom',
name: '置末'
},
...list,
{
id: 'top',
name: '置顶'
}
]
},
//
moveConfirm() {
let { id, sort } = this.moveForm
if (!id) return this.$message.warning('请选择目标章节')
if (sort === '') return this.$message.warning('请选择目标排序')
if (typeof sort === 'string') sort = sort === 'top' ? 0 : this.sortList.length - 2 //
this.moveVisible = false
const list = this.checkList
list.map(e => e.check = false)
const ids = list.map(e => e.id)
const { chapters } = this
chapters.map(e => {
e.children = []
e.subsectionList.map(n => {
if (!ids.includes(n.id)) {
e.children.push(n)
}
})
e.subsectionList = e.children
delete e.children
if (e.id === id) e.subsectionList.splice(sort, 0, ...list)
})
this.moved = true
},
cancelSort() {
this.sorting = false;
this.chapters = JSON.parse(JSON.stringify(this.originChapters))
this.sorting = false;
},
saveSort() {
this.chapters.forEach((n, k) => {
n.sort = k + 1;
n.subsectionList.forEach((j, i) => {
j.sort = i + 1;
j.sort = i + 1
j.chapterId = n.id
});
});
let data = {
@ -370,7 +512,6 @@ export default {
};
this.$post(this.api.reorder, data).then(res => {
this.sorting = false;
this.getData();
}).catch(res => {
});
},
@ -599,6 +740,7 @@ export default {
},
sortSection(chapterIndex, type, disabled, index) {
if (!disabled) {
this.moved = true
let list = this.chapters[chapterIndex].subsectionList;
if (type == "up") {
let tempItem = list.splice(index - 1, 1)[0];
@ -652,7 +794,10 @@ export default {
font-size: 14px;
}
}
/deep/.el-progress-bar {
padding-right: 70px;
margin-right: -70px;
}
.sort-icon {
font-size: 24px;
cursor: pointer;

@ -10,6 +10,7 @@
</div>
<div class="station">
<div class="inner">
<template v-if="curriculumList.length">
<template v-for="(item,index) in curriculumList">
<div class="item" :title="item.curriculumName" @click="goPreview(item)" :key="index" v-if="!keyword || item.curriculumName.includes(keyword)">
<img :src="item.coverUrl" alt="">
@ -19,6 +20,13 @@
</div>
</div>
</template>
</template>
<div class="empty flex-1" v-else>
<div>
<img src="@/assets/img/none.png" alt="">
<p>暂无数据</p>
</div>
</div>
</div>
</div>
</div>
@ -145,4 +153,19 @@ export default {
}
}
}
.empty{
display: flex;
justify-content: center;
align-items: center;
padding: 50px 0;
text-align: center;
img{
width: 471px;
}
p{
margin-top: 40px;
font-size: 18px;
color: rgba(0, 0, 0, 0.25);
}
}
</style>

@ -47,7 +47,7 @@
<div class="video_wid" id="player"></div>
</div>
</div>
<div class="catalog flex-1">
<div class="catalog">
<div class="m-b-20">
<el-button type="primary" @click="goSystem" style="width: 100%; height: 50px; font-size: 18px"> </el-button>
</div>
@ -59,7 +59,7 @@
<div class="chapterName">{{ item.name }}</div>
<div class="section" v-if="item.subsectionList.length">
<div v-for="(section,i) in item.subsectionList" :key="i" @click="preview(section, item.name)">
<p class="sectionName" :class="{active: curLink === `${item.name}${section.name}`}">{{ section.name }}</p>
<p class="sectionName" :title="section.name" :class="{active: curLink === `${item.name}${section.name}`}">{{ section.name }}</p>
</div>
</div>
</div>
@ -330,6 +330,10 @@ $height: 700px;
height: $height !important;
border: 0;
}
.cover {
flex: 1;
width: auto;
}
.cover{
img{
border-radius: 8px;
@ -357,7 +361,8 @@ $height: 700px;
outline: none;
}
.catalog{
margin-left: 40px;
width: 330px;
margin-left: 20px;
}
.list{
height: calc(700px - 70px) ;

@ -30,6 +30,7 @@
:load="loadNodeTree"
:expand-on-click-node="false"
@node-click="handleNodeClick"
:current-node-key="architectureId"
:props="{children: 'children', label: 'organizationName', isLeaf: 'leaf'}"
>
<span class="custom-tree-node" slot-scope="{ node, data }">
@ -502,6 +503,7 @@ export default {
util.successMsg("编辑成功!");
this.handleClose();
this.handleRefresh();
this.getOrgStudentData()
}).catch(err => {
});
}

@ -92,7 +92,7 @@ export default {
return new Promise((resolve, reject) => {
util.local.remove(Setting.storeKey);
util.local.remove(Setting.tokenKey);
if (util.cookies.get('serverLogin')) {
if (state.fromClient) {
util.cookies.remove('serverLogin')
location.href = Setting.isDev
? `http://192.168.31.125:8082/#/`

Loading…
Cancel
Save