diff --git a/src/api/index.js b/src/api/index.js
index 7f9379a..e420000 100644
--- a/src/api/index.js
+++ b/src/api/index.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`, // 管理端练习成绩详情
diff --git a/src/assets/img/none.png b/src/assets/img/none.png
new file mode 100644
index 0000000..88c0085
Binary files /dev/null and b/src/assets/img/none.png differ
diff --git a/src/pages/course/contentSettings/index.vue b/src/pages/course/contentSettings/index.vue
index 2f26cc0..aaf93d9 100644
--- a/src/pages/course/contentSettings/index.vue
+++ b/src/pages/course/contentSettings/index.vue
@@ -2,7 +2,7 @@
-
+
@@ -16,6 +16,7 @@
编辑顺序
+ 批量移动
取消
保存
@@ -40,6 +41,11 @@
+
+
+
+
+
@@ -77,7 +83,7 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -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;
diff --git a/src/pages/station/list/index.vue b/src/pages/station/list/index.vue
index a879977..2241321 100644
--- a/src/pages/station/list/index.vue
+++ b/src/pages/station/list/index.vue
@@ -10,6 +10,7 @@
+
@@ -19,6 +20,13 @@
+
+
+
+
+
暂无数据
+
+
@@ -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);
+ }
+}
\ No newline at end of file
diff --git a/src/pages/station/preview/index.vue b/src/pages/station/preview/index.vue
index dcb0437..179a2bf 100644
--- a/src/pages/station/preview/index.vue
+++ b/src/pages/station/preview/index.vue
@@ -47,7 +47,7 @@
-
+
进 入 实 验
@@ -59,7 +59,7 @@
{{ item.name }}
-
{{ section.name }}
+
{{ section.name }}
@@ -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) ;
diff --git a/src/pages/student/list/index.vue b/src/pages/student/list/index.vue
index 44cd8aa..35fd188 100644
--- a/src/pages/student/list/index.vue
+++ b/src/pages/student/list/index.vue
@@ -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'}"
>
@@ -502,6 +503,7 @@ export default {
util.successMsg("编辑成功!");
this.handleClose();
this.handleRefresh();
+ this.getOrgStudentData()
}).catch(err => {
});
}
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index bf51025..7d5d3e4 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -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/#/`