diff --git a/package-lock.json b/package-lock.json index fc37380..066a91e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -820,6 +820,24 @@ } } }, + "@babel/runtime-corejs3": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.12.5.tgz", + "integrity": "sha512-roGr54CsTmNPPzZoCP1AmDXuBoNao7tnSA83TXTwt+UK5QVyh1DIJnrgYRPWKCF2flqZQXwa7Yr8v7VmLzF0YQ==", + "optional": true, + "requires": { + "core-js-pure": "^3.0.0", + "regenerator-runtime": "^0.13.4" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", + "optional": true + } + } + }, "@babel/template": { "version": "7.7.4", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", @@ -1048,6 +1066,12 @@ "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==", "dev": true }, + "@types/raf": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@types/raf/-/raf-3.4.0.tgz", + "integrity": "sha512-taW5/WYqo36N7V39oYyHP9Ipfd5pNFvGTIQsNGj86xV88YQ7GnI30/yMfKDF7Zgin0m3e+ikX88FvImnK4RjGw==", + "optional": true + }, "@vue/babel-helper-vue-jsx-merge-props": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.0.0.tgz", @@ -2156,6 +2180,11 @@ } } }, + "base64-arraybuffer": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz", + "integrity": "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ==" + }, "base64-js": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", @@ -2440,6 +2469,11 @@ "node-releases": "^1.1.41" } }, + "btoa": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", + "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==" + }, "buffer": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", @@ -2611,6 +2645,20 @@ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001012.tgz", "integrity": "sha512-7RR4Uh04t9K1uYRWzOJmzplgEOAXbfK72oVNokCdMzA67trrhPzy93ahKk1AWHiA0c58tD2P+NHqxrA8FZ+Trg==" }, + "canvg": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.7.tgz", + "integrity": "sha512-4sq6iL5Q4VOXS3PL1BapiXIZItpxYyANVzsAKpTPS5oq4u3SKbGfUcbZh2gdLCQ3jWpG/y5wRkMlBBAJhXeiZA==", + "optional": true, + "requires": { + "@babel/runtime-corejs3": "^7.9.6", + "@types/raf": "^3.4.0", + "raf": "^3.4.1", + "rgbcolor": "^1.0.1", + "stackblur-canvas": "^2.0.0", + "svg-pathdata": "^5.0.5" + } + }, "case-sensitive-paths-webpack-plugin": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.2.0.tgz", @@ -3262,6 +3310,12 @@ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.10.tgz", "integrity": "sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA==" }, + "core-js-pure": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.8.2.tgz", + "integrity": "sha512-v6zfIQqL/pzTVAbZvYUozsxNfxcFb6Ks3ZfEbuneJl3FW9Jb8F6vLWB6f+qTmAu72msUdyb84V8d/yBFf7FNnw==", + "optional": true + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -3395,6 +3449,14 @@ "timsort": "^0.3.0" } }, + "css-line-break": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-1.1.1.tgz", + "integrity": "sha512-1feNVaM4Fyzdj4mKPIQNL2n70MmuYzAXZ1aytlROFX1JsOo070OsugwGjj7nl6jnDJWHDM8zRZswkmeYVWZJQA==", + "requires": { + "base64-arraybuffer": "^0.2.0" + } + }, "css-loader": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-1.0.1.tgz", @@ -4062,6 +4124,12 @@ "domelementtype": "1" } }, + "dompurify": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.6.tgz", + "integrity": "sha512-7b7ZArhhH0SP6W2R9cqK6RjaU82FZ2UPM7RO8qN1b1wyvC/NY1FNWcX1Pu00fFOAnzEORtwXe4bPaClg6pUybQ==", + "optional": true + }, "domutils": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", @@ -6878,6 +6946,14 @@ } } }, + "html2canvas": { + "version": "1.0.0-rc.7", + "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.0.0-rc.7.tgz", + "integrity": "sha512-yvPNZGejB2KOyKleZspjK/NruXVQuowu8NnV2HYG7gW7ytzl+umffbtUI62v2dCHQLDdsK6HIDtyJZ0W3neerA==", + "requires": { + "css-line-break": "1.1.1" + } + }, "htmlparser2": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", @@ -7630,6 +7706,28 @@ "graceful-fs": "^4.1.6" } }, + "jspdf": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/jspdf/-/jspdf-2.2.0.tgz", + "integrity": "sha512-kz6blXdM+wQ0vWMDJsa7GW9Ya79DHQBWQL14urVsbr6mk9nsJCSqZuIgE1CPZ78i5Yih2uW4tqOTiLf5xSpT9Q==", + "requires": { + "atob": "^2.1.2", + "btoa": "^1.2.1", + "canvg": "^3.0.6", + "core-js": "^3.6.0", + "dompurify": "^2.2.0", + "html2canvas": "^1.0.0-rc.5", + "pako": "^1.0.11" + }, + "dependencies": { + "core-js": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.2.tgz", + "integrity": "sha512-FfApuSRgrR6G5s58casCBd9M2k+4ikuu4wbW6pJyYU7bd9zvFc9qf7vr5xmrZOhT9nn+8uwlH1oRR9jTnFoA3A==", + "optional": true + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -9050,8 +9148,7 @@ "pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" }, "parallel-transform": { "version": "1.2.0", @@ -10292,6 +10389,15 @@ "fast-diff": "1.1.2" } }, + "raf": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", + "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", + "optional": true, + "requires": { + "performance-now": "^2.1.0" + } + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -10770,6 +10876,12 @@ "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", "dev": true }, + "rgbcolor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rgbcolor/-/rgbcolor-1.0.1.tgz", + "integrity": "sha1-1lBezbMEplldom+ktDMHMGd1lF0=", + "optional": true + }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -11623,6 +11735,12 @@ "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", "dev": true }, + "stackblur-canvas": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.4.0.tgz", + "integrity": "sha512-Z+HixfgYV0ss3C342DxPwc+UvN1SYWqoz7Wsi3xEDWEnaBkSCL3Ey21gF4io+WlLm8/RIrSnCrDBIEcH4O+q5Q==", + "optional": true + }, "stackframe": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.1.0.tgz", @@ -11860,6 +11978,12 @@ "has-flag": "^3.0.0" } }, + "svg-pathdata": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-5.0.5.tgz", + "integrity": "sha512-TAAvLNSE3fEhyl/Da19JWfMAdhSXTYeviXsLSoDT1UM76ADj5ndwAPX1FKQEgB/gFMPavOy6tOqfalXKUiXrow==", + "optional": true + }, "svg-tags": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", diff --git a/package.json b/package.json index c989653..b7c4a64 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,9 @@ "echarts": "^4.9.0", "element-theme": "^2.0.1", "element-ui": "^2.13.0", + "html2canvas": "^1.0.0-rc.7", "js-cookie": "^2.2.1", + "jspdf": "^2.2.0", "lodash": "^4.17.20", "mavon-editor": "^2.6.17", "postcss-px2rem": "^0.3.0", diff --git a/src/api/index.js b/src/api/index.js index 949b97f..47157c2 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -123,7 +123,6 @@ export default { pageByChoiceList:`management/questions/pageByChoiceList`, statistical:`management/questions/statistical`, getQuestionListBySelect:`management/questions/getQuestionListBySelect`, - listByPage:`cjEnterprise/questionBank/listByPage`, // 考核管理 addAssessment:`/management/assessment/addAssessment`, @@ -143,6 +142,14 @@ export default { reviewByid:`/management/review/reviewByid`, reviewList:`/management/review/reviewList`, + // 题库分类 + AddOneLevel:`cjEnterprise/questionBank/AddOneLevel`, + AddSecondLevel:`cjEnterprise/questionBank/AddSecondLevel`, + deleteById:`cjEnterprise/questionBank/deleteById`, + getTypeByOneLever:`cjEnterprise/questionBank/getTypeByOneLever`, + listByPage:`cjEnterprise/questionBank/listByPage`, + modifyLevel:`cjEnterprise/questionBank/modifyLevel`, + // 题库管理 deleteByOne:`cjEnterprise/questions/deleteByOne`, findById:`cjEnterprise/questions/findById`, diff --git a/src/components/testPaperDetail/index.vue b/src/components/testPaperDetail/index.vue index 8636601..e6623ba 100644 --- a/src/components/testPaperDetail/index.vue +++ b/src/components/testPaperDetail/index.vue @@ -6,7 +6,7 @@ 总分: 100分 -
+
考试时长: {{totalDuration}}分钟
@@ -66,28 +66,28 @@ export default { { id: 1, name: '单选题', - show: true + show: false },{ id: 2, name: '多选题', - show: true + show: false },{ id: 3, name: '填空题', - show: true + show: false },{ id: 4, name: '判断题', - show: true + show: false },{ id: 5, name: '简答题', - show: true + show: false } ], active: 1, allData: {}, - curType: [] + curType: [], }; }, computed: { @@ -123,12 +123,18 @@ export default { } this.allData = data let tabs = this.tabs - data.list1.length || (tabs[0].show = false) - data.list2.length || (tabs[1].show = false) - data.list3.length || (tabs[2].show = false) - data.list4.length || (tabs[3].show = false) - data.list5.length || (tabs[4].show = false) - this.curType = this.allData.list1 + data.list1.length && (tabs[0].show = true) + data.list2.length && (tabs[1].show = true) + data.list3.length && (tabs[2].show = true) + data.list4.length && (tabs[3].show = true) + data.list5.length && (tabs[4].show = true) + for(let n of tabs){ + if(n.show){ + this.active = n.id + this.curType = this.allData[`list${n.id}`] + break + } + } this.handleOptions() }, initMedia(item){ diff --git a/src/pages/achievement/detail/index.vue b/src/pages/achievement/detail/index.vue index 94f9069..de8a429 100644 --- a/src/pages/achievement/detail/index.vue +++ b/src/pages/achievement/detail/index.vue @@ -21,9 +21,9 @@
@@ -81,23 +81,23 @@ export default { { id: 1, name: '单选题', - show: true + show: false },{ id: 2, name: '多选题', - show: true + show: false },{ id: 3, name: '判断题', - show: true + show: false },{ id: 4, name: '简答题', - show: true + show: false },{ id: 5, name: '填空题', - show: true + show: false } ], active: 1, @@ -124,12 +124,18 @@ export default { this.ranking = res.ranking this.allData = res.data let tabs = this.tabs - res.data.list1.length || (tabs[0].show = false) - res.data.list2.length || (tabs[1].show = false) - res.data.list3.length || (tabs[2].show = false) - res.data.list4.length || (tabs[3].show = false) - res.data.list5.length || (tabs[4].show = false) - this.curType = this.allData.list1 + res.data.list1.length && (tabs[0].show = true) + res.data.list2.length && (tabs[1].show = true) + res.data.list3.length && (tabs[2].show = true) + res.data.list4.length && (tabs[3].show = true) + res.data.list5.length && (tabs[4].show = true) + for(let n of tabs){ + if(n.show){ + this.active = n.id + this.curType = this.allData[`list${n.id}`] + break + } + } this.handleOptions() }) .catch(err => {}) diff --git a/src/pages/achievement/list/examResults.vue b/src/pages/achievement/list/examResults.vue index 527d643..17db4f0 100644 --- a/src/pages/achievement/list/examResults.vue +++ b/src/pages/achievement/list/examResults.vue @@ -5,13 +5,13 @@
- + - - + + @@ -161,8 +161,7 @@ export default { }) .then(res => { this.assessmentNameList = res.data.list - this.assessmentId = this.classList.find(n => n.classId == this.classId).assessmentId - this.assessmentName = this.assessmentNameList[0].assessmentName + this.assessmentId = this.assessmentNameList[0].assessmentId this.getData() }).catch(err => {}) }, @@ -175,7 +174,7 @@ export default { this.resetForm() }, handleSelectionChange(val) { - this.multipleSelection = val; + this.multipleSelection = val }, show(row){ this.setAssDetailInfo({ @@ -188,6 +187,7 @@ export default { }, toStat(){ if(this.listData.length){ + this.assessmentName = this.assessmentNameList.find(n => n.assessmentId == this.assessmentId).assessmentName this.setAssDetailInfo({ id: this.listData[0].paperId, assessmentId: this.assessmentId, diff --git a/src/pages/assessment/detail/index.vue b/src/pages/assessment/detail/index.vue index 295b6db..05e7377 100644 --- a/src/pages/assessment/detail/index.vue +++ b/src/pages/assessment/detail/index.vue @@ -17,9 +17,9 @@
@@ -76,23 +76,23 @@ export default { { id: 1, name: '单选题', - show: true + show: false },{ id: 2, name: '多选题', - show: true + show: false },{ id: 3, name: '判断题', - show: true + show: false },{ id: 4, name: '简答题', - show: true + show: false },{ id: 5, name: '填空题', - show: true + show: false } ], active: 1, @@ -118,12 +118,18 @@ export default { this.time = res.time this.allData = res.data let tabs = this.tabs - res.data.list1.length || (tabs[0].show = false) - res.data.list2.length || (tabs[1].show = false) - res.data.list3.length || (tabs[2].show = false) - res.data.list4.length || (tabs[3].show = false) - res.data.list5.length || (tabs[4].show = false) - this.curType = this.allData.list1 + res.data.list1.length && (tabs[0].show = true) + res.data.list2.length && (tabs[1].show = true) + res.data.list3.length && (tabs[2].show = true) + res.data.list4.length && (tabs[3].show = true) + res.data.list5.length && (tabs[4].show = true) + for(let n of tabs){ + if(n.show){ + this.active = n.id + this.curType = this.allData[`list${n.id}`] + break + } + } this.handleOptions() }) .catch(err => {}) diff --git a/src/pages/practice/detail/index.vue b/src/pages/practice/detail/index.vue index 4c61ba1..df5696e 100644 --- a/src/pages/practice/detail/index.vue +++ b/src/pages/practice/detail/index.vue @@ -17,9 +17,9 @@
@@ -76,23 +76,23 @@ export default { { id: 1, name: '单选题', - show: true + show: false },{ id: 2, name: '多选题', - show: true + show: false },{ id: 3, name: '判断题', - show: true + show: false },{ id: 4, name: '简答题', - show: true + show: false },{ id: 5, name: '填空题', - show: true + show: false } ], typeNameList: ['单项选择','多项选择','判断题','简答题','填空题'], @@ -131,11 +131,17 @@ export default { }) this.list = data.list let tabs = this.tabs - data.list.find(n => n.typeName == '单项选择') || (tabs[0].show = false) - data.list.find(n => n.typeName == '多项选择') || (tabs[1].show = false) - data.list.find(n => n.typeName == '判断题') || (tabs[2].show = false) - data.list.find(n => n.typeName == '简答题') || (tabs[3].show = false) - data.list.find(n => n.typeName == '填空题') || (tabs[4].show = false) + data.list.find(n => n.typeName == '单项选择') && (tabs[0].show = true) + data.list.find(n => n.typeName == '多项选择') && (tabs[1].show = true) + data.list.find(n => n.typeName == '判断题') && (tabs[2].show = true) + data.list.find(n => n.typeName == '简答题') && (tabs[3].show = true) + data.list.find(n => n.typeName == '填空题') && (tabs[4].show = true) + for(let n of tabs){ + if(n.show){ + this.active = n.id + break + } + } this.handleOptions() this.paperName = data.paperName this.userName = data.stuName diff --git a/src/pages/quesBank/list/globalQuesBank.vue b/src/pages/quesBank/list/globalQuesBank.vue index be3a7b6..b079e01 100644 --- a/src/pages/quesBank/list/globalQuesBank.vue +++ b/src/pages/quesBank/list/globalQuesBank.vue @@ -31,8 +31,7 @@
公共题库
- - 批量删除 + 批量取消共享
@@ -49,7 +48,7 @@ @@ -141,12 +140,12 @@ export default { this.multipleSelection = val; }, delData(row) { - this.$confirm('确定要删除吗?', '提示', { + this.$confirm('确定要取消共享吗?', '提示', { type: 'warning' }) .then(() => { this.$post(`${this.api.deleteByMeSubjectBySharing}?identification=2&ids=${row.id}`).then(res => { - this.$message.success('删除成功') + this.$message.success('取消共享成功') this.getData() }).catch(res => {}); }) @@ -159,13 +158,13 @@ export default { return item.id }) - this.$confirm('确定要删除吗?', '提示', { + this.$confirm('确定要取消共享吗?', '提示', { type: 'warning' }) .then(() => { this.$post(`${this.api.deleteByMeSubjectBySharing}?identification=2&ids=${delList.join()}`).then(res => { this.multipleSelection = []; - this.$message.success('删除成功') + this.$message.success('取消共享成功') this.getData() }).catch(res => {}); }) diff --git a/src/pages/quesBank/list/index.vue b/src/pages/quesBank/list/index.vue index aebe988..7170eb1 100644 --- a/src/pages/quesBank/list/index.vue +++ b/src/pages/quesBank/list/index.vue @@ -4,24 +4,28 @@ {{item}}
- + +
+ + \ No newline at end of file diff --git a/src/pages/quesBank/list/quesDialog.vue b/src/pages/quesBank/list/quesDialog.vue index 288bb24..381dd64 100644 --- a/src/pages/quesBank/list/quesDialog.vue +++ b/src/pages/quesBank/list/quesDialog.vue @@ -11,7 +11,12 @@ > - + @@ -51,44 +56,44 @@