diff --git a/src/api/index.js b/src/api/index.js index a80636a..9e2c2d6 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,15 +1,26 @@ -let host = 'http://192.168.31.152:8001' +import Setting from '@/setting' +// let host = 'http://192.168.31.152:8001' +let uploadURL = Setting.apiUploadURL export default { - logins: `management/userInfo/login`, //登录  + // 登录  + logins: `management/userInfo/login`, + + // oss文件管理 + fileDeletion: `${uploadURL}/oss/manage/fileDeletion`, + fileupload: `${uploadURL}/oss/manage/fileupload`, + getPlayAuth: `${uploadURL}/oss/manage/getPlayAuth`, + removeMoreVideo: `${uploadURL}/oss/manage/removeMoreVideo`, + removeVideo: `${uploadURL}/oss/manage/removeVideo`, // 查询省份城市 queryProvince: `cjEnterprise/province/queryProvince`, queryCity: `cjEnterprise/city/queryCity`, queryClient: `cjEnterprise/client/list`, - userinfoUpdate:`management/userInfo/update`,//个人中心信息修改 - userinfo:`management/userInfo/getUserInfo`,//个人中心信息展示 - getAccount:`management/userInfo/getAccount`,//账号判重 + // 个人中心 + userinfoUpdate:`management/userInfo/update`, + userinfo:`management/userInfo/getUserInfo`, + getAccount:`management/userInfo/getAccount`, // 学生班级 addClass: `management/class/addClass`, @@ -77,13 +88,6 @@ export default { queryPermissionMenu: `management/permission/queryManagementPermissionMenu`, toAssign: `management/permission/toAssign`, - // 视频管理 - fileDeletion: `oss/manage/fileDeletion`, //批量删除文件 - fileupload: `oss/manage/fileupload`, //文件上传 - getPlayAuth: `oss/manage/getPlayAuth`, //获取播放凭证 - removeMoreVideo: `oss/manage/removeMoreVideo`, //批量删除视频文件 - removeVideo: `oss/manage/removeVideo`, //删除视频文件 - getTypeByOneLever:`cjEnterprise/questionBank/getTypeByOneLever`, typesList:`cjEnterprise/questionTypes/typesList`, // 共享相关 @@ -109,6 +113,7 @@ export default { getModifyByList:`management/testPaper/getModifyByList`, modifyState:`management/testPaper/modifyState`, schoolTestPaperByRelease:`management/testPaper/schoolTestPaperByRelease`, + previewPaper:`/management/testPaper/previewPaper`, // 试题信息相关 addQuestions:`management/questions/addQuestions`, @@ -144,7 +149,7 @@ export default { getExcel:`cjEnterprise/questions/getExcel`, impExcel:`management/questions/impExcel`, - // 成绩管理 + // 考核成绩管理 answerDetail:`management/paperRecord/answerDetail`, findByIdpaperRecord:`management/paperRecord/findById`, getAssessmentByClass:`management/paperRecord/getAssessmentByClass`, @@ -152,4 +157,35 @@ export default { savepaperRecord:`management/paperRecord/save`, teacherByGetAchievement:`management/paperRecord/teacherByGetAchievement`, achievementStatistics:`/management/paperRecord/achievementStatistics`, + + // 留言板 + delComment:`/management/messageBoard/delComment`, + delReply:`/management/messageBoard/delReply`, + delMessageBoard:`/management/messageBoard/delMessageBoard`, + queryMessageBoard:`/management/messageBoard/queryMessageBoard`, + queryMessageBoardDetail:`/management/messageBoard/queryMessageBoardDetail`, + saveComment:`/management/messageBoard/saveComment`, + saveMessageBoard:`/management/messageBoard/saveMessageBoard`, + saveReply:`/management/messageBoard/saveReply`, + + // 练习管理 + cancelPractise:`/management/practise/cancelPractise`, + createPractise:`/management/practise/createPractise`, + pageByName:`/management/practise/pageByName`, + seeDetails:`/management/practise/seeDetails`, + updatePractise:`/management/practise/updatePractise`, + + // 练习批阅 + practiceReviewList:`/management/practise/review/reviewList`, + reviewListByStudent:`/management/practise/review/reviewListByStudent`, + reviewDetail:`/management/practise/review/reviewDetail`, + reviewByidPractice:`/management/practise/review/reviewByid`, + + // 练习成绩管理 + AchievementDetail:`/management/practise/review/AchievementDetail`, + AchievementList:`/management/practise/review/AchievementList`, + exportPractice:`/management/practise/review/export`, + getMineClass:`/management/practise/review/getMineClass`, + AchievementListByClassId:`/management/practise/review/AchievementListByClassId`, + byClassIdGetPractise:`/management/practise/review/byClassIdGetPractise`, } \ No newline at end of file diff --git a/src/assets/img/login_bg.png b/src/assets/img/login_bg.png index 03e46b2..72ea233 100644 Binary files a/src/assets/img/login_bg.png and b/src/assets/img/login_bg.png differ diff --git a/src/components/testPaperDetail/index.vue b/src/components/testPaperDetail/index.vue index 201f54d..abf7ca5 100644 --- a/src/components/testPaperDetail/index.vue +++ b/src/components/testPaperDetail/index.vue @@ -27,6 +27,7 @@

题干:

+

选项:

@@ -52,6 +53,7 @@ import mixins from '@/mixins/setBackground' import { mapState } from 'vuex' export default { + props: ['data'], mixins: [ mixins ], data() { return { @@ -77,6 +79,7 @@ export default { } ], active: 1, + allData: {}, curType: [] }; }, @@ -89,33 +92,66 @@ export default { ]) }, mounted() { + this.insertScript() this.getData() }, methods: { getData() { - this.$post(`${this.api.previewtestPaper}?id=${this.id}`) - .then(res => { - this.allData = res.data - this.curType = this.allData.list1 - this.handleOptions() - }) - .catch(err => { - - }); + if(this.data){ + this.initData(this.data) + }else{ + this.$post(`${this.api.previewtestPaper}?id=${this.id}`) + .then(res => { + this.initData(res.data) + }).catch(err => {}) + } + }, + initData(data){ + let index = 0 + for(let i in data){ + data[i].map(n => { + index++ + n.mediaEleId = `player${index}` + }) + } + this.allData = data + this.curType = this.allData.list1 + this.handleOptions() + }, + initMedia(item){ + if(item.videoAudio && !item.player){ + // let fileId = '312d8a6efd1747ae9de519da574195db' + this.$get(`${this.api.getPlayAuth}/${item.videoAudio}`).then(res => { + let playAuth = res.data.playAuth + this.$nextTick(() => { + console.log('初始化开始',item.mediaEleId) + item.player = new Aliplayer({ + id: item.mediaEleId, + width: '100%', + autoplay: false, + vid : item.videoAudio, + playauth : playAuth, + encryptType:1, //当播放私有加密流时需要设置。 + }) + console.log('初始化结束') + }) + }).catch(res => {}) + } }, tabChange(id){ this.active = id this.curType = this.allData[`list${id}`] + this.handleOptions() }, handleOptions(){ let curType = this.curType curType.forEach(n => { + this.initMedia(n) if(!n.options){ let options = {} for(let i in n){ if(i.includes('option') && n[i]){ - console.log(i.replace('option','')) options[i.replace('option','')] = n[i] } } @@ -123,13 +159,24 @@ export default { } }) this.curType = curType - console.log(22,this.curType) - } + }, + insertScript(){ + const linkTag = document.createElement('link') + linkTag.rel = 'stylesheet' + linkTag.href = 'https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css' + document.body.appendChild(linkTag) + + const scriptTag = document.createElement('script') + scriptTag.type = 'text/javascript' + scriptTag.src = 'https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js' + document.body.appendChild(scriptTag) + }, }, }; diff --git a/src/layouts/navbar/index.vue b/src/layouts/navbar/index.vue index 9a83cf3..64ec10e 100644 --- a/src/layouts/navbar/index.vue +++ b/src/layouts/navbar/index.vue @@ -74,6 +74,11 @@ export default { index: '/testPaper/list', title: '试卷管理' }, + { + icon: 'el-icon-s-order', + index: '/practice/list', + title: '练习管理' + }, { icon: 'el-icon-data-analysis', index: '/assessment/list', @@ -88,6 +93,11 @@ export default { icon: 'el-icon-setting', index: '/system/list', title: '系统设置' + }, + { + icon: 'el-icon-chat-dot-round', + index: '/messageBoard/list', + title: '交流互动' } ], menus: [] @@ -103,8 +113,8 @@ export default { // 通过 Event Bus 进行组件间通信,来折叠侧边栏 bus.$on('collapse', msg => { this.collapse = msg; - bus.$emit('collapse-content', msg); - }); + bus.$emit('collapse-content', msg) + }) }, methods: { initMenu(){ diff --git a/src/libs/util.js b/src/libs/util.js index 12204d9..f342b94 100644 --- a/src/libs/util.js +++ b/src/libs/util.js @@ -57,6 +57,21 @@ const util = { break; } } + }, + // 传入文件后缀判断是否是视频 + isVideo(ext) { + if('mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv'.includes(ext)) return true + return false + }, + // 传入文件后缀判断是否是音频 + isAudio(ext) { + if('mp3,aac,ape,flac,wav,wma,amr,mid'.includes(ext)) return true + return false + }, + // 传入文件后缀判断是否是图片 + isImg(ext) { + if('jpg,jpeg,png,gif,svg,psd'.includes(ext)) return true + return false } }; diff --git a/src/pages/account/login/index.vue b/src/pages/account/login/index.vue index 1e0a108..40e70b4 100644 --- a/src/pages/account/login/index.vue +++ b/src/pages/account/login/index.vue @@ -58,7 +58,6 @@ export default { data: function() { return { loginForm: { - // username: '18818574533', username: 'manager', password: 'huoran123', }, @@ -110,7 +109,7 @@ export default { display: flex; justify-content: center; align-items: center; - background-color: #333; + background-color: rgba(51,51,51,.7); .inner{ display: inline-flex; justify-content: space-between; diff --git a/src/pages/achievement/list/examResults.vue b/src/pages/achievement/list/examResults.vue index bc8f42c..730659b 100644 --- a/src/pages/achievement/list/examResults.vue +++ b/src/pages/achievement/list/examResults.vue @@ -15,7 +15,7 @@ - + @@ -137,7 +137,7 @@ export default { }, methods: { ...mapActions('achievement', [ - 'setInfo' + 'setAssListInfo','setAssDetailInfo' ]), getData() { this.$post(this.api.teacherByGetAchievement, { @@ -189,7 +189,7 @@ export default { this.multipleSelection = val; }, show(row){ - this.setInfo({ + this.setAssDetailInfo({ id: row.paperId, assessmentId: row.id, stuId: row.stuId @@ -198,7 +198,7 @@ export default { }, toStat(){ if(this.listData.length){ - this.setInfo({ + this.setAssDetailInfo({ id: this.listData[0].paperId, assessmentId: this.assessmentId, assessmentName: this.assessmentName, @@ -212,7 +212,7 @@ export default { }, exportData(){ - } + }, } }; diff --git a/src/pages/achievement/list/practiceResults.vue b/src/pages/achievement/list/practiceResults.vue index 6e1d4ef..801b456 100644 --- a/src/pages/achievement/list/practiceResults.vue +++ b/src/pages/achievement/list/practiceResults.vue @@ -8,10 +8,15 @@ 筛选
- + - - + + + + + + + @@ -32,7 +37,7 @@

- 练习成绩 + 考试成绩
{{scope.$index + (page - 1) * pageSize + 1}} - - - - - + + + + + @@ -89,77 +94,90 @@ - +
@@ -206,31 +260,4 @@ export default { /deep/.no-mb.el-form-item{ margin-bottom: 0; } - /deep/.el-radio{ - margin-right: 15px; - } - ::v-deep .el-checkbox-group{ - font-size: 2px; - } - .Upload { - text-align: center; - } - .bt { - margin-bottom: 15px; - } - .flex_around { - display: flex; - justify-content: space-around; - align-items: center; - } - .card_m { - margin: 10px 0 20px 0; - } - .input ::v-deep .el-input { - width: 50%; - } - .radio { - margin: 0 15px 0 30px; - font-weight: 600; - } \ No newline at end of file diff --git a/src/pages/assessment/detail/index.vue b/src/pages/assessment/detail/index.vue new file mode 100644 index 0000000..c12fca6 --- /dev/null +++ b/src/pages/assessment/detail/index.vue @@ -0,0 +1,262 @@ + + + + \ No newline at end of file diff --git a/src/pages/assessment/list/index.vue b/src/pages/assessment/list/index.vue index a5b3629..3e73a8d 100644 --- a/src/pages/assessment/list/index.vue +++ b/src/pages/assessment/list/index.vue @@ -61,13 +61,37 @@