diff --git a/src/api/index.js b/src/api/index.js index e534e76..dc87af0 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -74,6 +74,7 @@ export default { getDetailByAccount: `occupationlab/occupationlab/architecture/getDetailByAccount`, // 新增用户前调用:按帐户获取详细信息 importStudent: `${host}occupationlab/occupationlab/architecture/importStudent`, // 批量导入学生 exportFailure: `${host}occupationlab/occupationlab/architecture/exportFailure`, // 批量导入学生失败数据导出 + excelExportStudentList: `${host}occupationlab/occupationlab/architecture/excelExportStudentList`, removeStudent: `occupationlab/occupationlab/architecture/removeStudent`, // 移除学生 organizationalStudentList: `occupationlab/occupationlab/architecture/organizationalStudentList`, // 根据组织架构筛选学生列表 studentList: `occupationlab/occupationlab/architecture/studentList`, // 学生列表 diff --git a/src/pages/achievement/list/index.vue b/src/pages/achievement/list/index.vue index acf36b4..c87bfbf 100644 --- a/src/pages/achievement/list/index.vue +++ b/src/pages/achievement/list/index.vue @@ -1,15 +1,12 @@ @@ -32,7 +29,7 @@ export default { tabs: { tab1: '课程维度', tab2: '项目维度', - // tab3: '多维评分', + tab3: '我的课程', }, }; }, @@ -66,5 +63,4 @@ export default { }; - \ No newline at end of file + \ No newline at end of file diff --git a/src/pages/lesson/content/index.vue b/src/pages/lesson/content/index.vue index f7e9504..4489420 100644 --- a/src/pages/lesson/content/index.vue +++ b/src/pages/lesson/content/index.vue @@ -96,8 +96,8 @@ :close-on-click-modal="false"> - + @@ -117,8 +117,8 @@
- +
@@ -389,6 +389,10 @@ export default { this.fileType = file.format this.fileUrl = file.url this.fileName = file.name + this.uploadList = [{ + name: file.name, + url: file.url, + }] }, uploadError (err, file, fileList) { this.$message({ @@ -586,9 +590,13 @@ export default { }, // 本地上传编辑资源 editSection () { - this.sectionForm.sectionName = this.curSection.name + const row = this.curSection + this.sectionForm.sectionName = row.name this.fileUrl = '' - this.uploadList = [] + this.uploadList = [{ + name: row.originalFileName, + url: row.fileUrl, + }] this.isAddSection = false this.sectionVisible = true }, diff --git a/src/pages/lesson/content/source.vue b/src/pages/lesson/content/source.vue index 0338066..e44718d 100644 --- a/src/pages/lesson/content/source.vue +++ b/src/pages/lesson/content/source.vue @@ -63,9 +63,8 @@ 资源类型
    -
  • - -
  • +
  • {{ item.name }}
@@ -144,6 +143,7 @@ export default { tab3: '文件素材', }, sourceType: SourceConst.types, + curType: '', sources: [], checkAll: false, keyword: '', @@ -193,7 +193,7 @@ export default { platformId: Setting.platformId, type: 2, keyword: this.keyword, - displayFileType: this.sourceType.filter(e => e.check).map(e => e.name), + displayFileType: this.curType ? [this.curType] : [], }) const list = page.records list.forEach(e => { @@ -315,6 +315,11 @@ export default { this.sourceChange(e) }) }, + // 资源类型选择回调 + checkType ({ name }) { + this.curType = name + this.getCourse() + }, // 资源列表选择回调 sourceChange (row) { const { check } = row @@ -575,6 +580,12 @@ export default { .line { margin-bottom: 10px; + cursor: pointer; + + &.active { + font-weight: 600; + color: #062c87; + } } } diff --git a/src/pages/project/list/index.vue b/src/pages/project/list/index.vue index bc53a51..0c8ff55 100644 --- a/src/pages/project/list/index.vue +++ b/src/pages/project/list/index.vue @@ -6,7 +6,7 @@
筛选
-
    +
    • @@ -28,6 +28,13 @@ :value="item.value">
    • +
    • + + + {{ item.name + }} + +
    • @@ -105,6 +105,11 @@ export default { this.form.fileUrl = res.url this.form.fileName = res.name this.handleType(res.format) + + this.uploadList = [{ + name: res.name, + url: res.url + }] }) }, uploadError () { diff --git a/src/pages/student/list/index.vue b/src/pages/student/list/index.vue index 9580b53..45279b9 100644 --- a/src/pages/student/list/index.vue +++ b/src/pages/student/list/index.vue @@ -73,6 +73,8 @@ 一键批量生成账号 新增学生 批量导入 + {{ exporting ? '正在导出' : '批量导出' + }} 批量删除
@@ -213,6 +215,7 @@ import Setting from '@/setting' import OrgTree from "@/components/org-tree/src/tree"; import { mapState } from "vuex"; import _ from 'lodash' +import axios from 'axios' export default { components: { OrgTree }, data () { @@ -357,6 +360,8 @@ export default { { required: true, message: '请输入账号数', trigger: 'blur' } ], }, + + exporting: false, }; }, computed: { @@ -999,7 +1004,21 @@ export default { this.handleClose(); this.handleRefresh(); this.initData(); - } + }, + // 导出(有勾选:就导勾选中的;没有勾选:就导全部) + async exportData () { + if (this.listData.length) { + this.exporting = true + // 有选择数据,则导出已选择的,否则导出全部 + const res = await axios.post(this.api.excelExportStudentList, this.multipleSelection.length ? this.multipleSelection : [], { + headers: this.headers, + responseType: 'blob' + }) + const name = res.headers['content-disposition'] + Util.downloadFileDirect(name ? decodeURI(name) : '学生列表.xlsx', new Blob([res.data])) + this.exporting = false + } + }, } }; diff --git a/src/pages/system/list/index.vue b/src/pages/system/list/index.vue index 83b54eb..7c2ac7c 100644 --- a/src/pages/system/list/index.vue +++ b/src/pages/system/list/index.vue @@ -1,13 +1,17 @@ @@ -20,12 +24,21 @@ import logo from "./logo"; export default { data () { return { - active: "staff", - tabs: { - staff: "教师管理", - role: "角色权限", - logo: "系统logo设置", - } + active: '1', + tabs: [ + { + id: '1', + name: '教师管理' + }, + { + id: '2', + name: '角色权限' + }, + { + id: '3', + name: '系统logo设置' + }, + ], }; }, computed: { @@ -42,9 +55,6 @@ export default { Setting.dynamicRoute && this.initTabs() }, methods: { - tabChange (index) { - this.active = index - }, initTabs () { const { btns } = this const tab1 = btns.includes('/system/list:教师管理') diff --git a/src/pages/theoryExam/index.vue b/src/pages/theoryExam/index.vue index 4b99c48..42173d4 100644 --- a/src/pages/theoryExam/index.vue +++ b/src/pages/theoryExam/index.vue @@ -178,7 +178,7 @@ export default { token: Util.local.get(Setting.tokenKey), paperId: +this.$route.query.paperId, // 试卷id(练习专用) cid: +this.$route.query.cid, - mallId: +this.$route.query.mallId, + mallId: +this.$route.query.mallId || '', curriculumName: this.$route.query.curriculumName, assessmentId: this.$route.query.assessmentId, // 考核id classId: this.$route.query.classId,