題目列表、課程列表、課件列表
This commit is contained in:
parent
2053181a9d
commit
1b177f15f9
|
@ -2596,6 +2596,17 @@
|
|||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"cliui": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
|
||||
|
@ -2631,6 +2642,25 @@
|
|||
"ms": "2.1.2"
|
||||
}
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"loader-utils": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
|
||||
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^3.0.0",
|
||||
"json5": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
|
@ -2655,6 +2685,28 @@
|
|||
"ansi-regex": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"vue-loader-v16": {
|
||||
"version": "npm:vue-loader@16.5.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.5.0.tgz",
|
||||
"integrity": "sha512-WXh+7AgFxGTgb5QAkQtFeUcHNIEq3PGVQ8WskY5ZiFbWBkOwcCPRs4w/2tVyTbh2q6TVRlO3xfvIukUtjsu62A==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"chalk": "^4.1.0",
|
||||
"hash-sum": "^2.0.0",
|
||||
"loader-utils": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"wrap-ansi": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
|
||||
|
@ -6480,6 +6532,16 @@
|
|||
"minimatch": "^3.0.4"
|
||||
}
|
||||
},
|
||||
"draftjs-to-html": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/draftjs-to-html/-/draftjs-to-html-0.9.1.tgz",
|
||||
"integrity": "sha512-fFstE6+IayaVFBEvaFt/wN8vdj8FsTRzij7dy7LI9QIwf5LgfHFi9zSpvCg+feJ2tbYVqHxUkjcibwpsTpgFVQ=="
|
||||
},
|
||||
"draftjs-utils": {
|
||||
"version": "0.10.2",
|
||||
"resolved": "https://registry.npmjs.org/draftjs-utils/-/draftjs-utils-0.10.2.tgz",
|
||||
"integrity": "sha512-EstHqr3R3JVcilJrBaO/A+01GvwwKmC7e4TCjC7S94ZeMh4IVmf60OuQXtHHpwItK8C2JCi3iljgN5KHkJboUg=="
|
||||
},
|
||||
"duplexer": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz",
|
||||
|
@ -8569,6 +8631,11 @@
|
|||
"integrity": "sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg==",
|
||||
"dev": true
|
||||
},
|
||||
"html-to-draftjs": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/html-to-draftjs/-/html-to-draftjs-1.5.0.tgz",
|
||||
"integrity": "sha512-kggLXBNciKDwKf+KYsuE+V5gw4dZ7nHyGMX9m0wy7urzWjKGWyNFetmArRLvRV0VrxKN70WylFsJvMTJx02OBQ=="
|
||||
},
|
||||
"html-webpack-plugin": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz",
|
||||
|
@ -11374,6 +11441,14 @@
|
|||
"integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=",
|
||||
"dev": true
|
||||
},
|
||||
"linkify-it": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz",
|
||||
"integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==",
|
||||
"requires": {
|
||||
"uc.micro": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"load-json-file": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
|
||||
|
@ -13884,6 +13959,16 @@
|
|||
"sisteransi": "^1.0.5"
|
||||
}
|
||||
},
|
||||
"prop-types": {
|
||||
"version": "15.7.2",
|
||||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz",
|
||||
"integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==",
|
||||
"requires": {
|
||||
"loose-envify": "^1.4.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"react-is": "^16.8.1"
|
||||
}
|
||||
},
|
||||
"proto-list": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
|
||||
|
@ -14105,11 +14190,22 @@
|
|||
"resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz",
|
||||
"integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao="
|
||||
},
|
||||
"react-draft-wysiwyg": {
|
||||
"version": "1.14.7",
|
||||
"resolved": "https://registry.npmjs.org/react-draft-wysiwyg/-/react-draft-wysiwyg-1.14.7.tgz",
|
||||
"integrity": "sha512-D4X8F/ourvQZuqHzCQ6Vs6Tnt6TbGH58kvHQxC+aZGq+45ko2EyatL6G5C/paMaNKDZq2JRe7yAzykneMLpNOg==",
|
||||
"requires": {
|
||||
"classnames": "^2.2.6",
|
||||
"draftjs-utils": "^0.10.2",
|
||||
"html-to-draftjs": "^1.5.0",
|
||||
"linkify-it": "^2.2.0",
|
||||
"prop-types": "^15.7.2"
|
||||
}
|
||||
},
|
||||
"react-is": {
|
||||
"version": "16.13.1",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
||||
},
|
||||
"read-pkg": {
|
||||
"version": "5.2.0",
|
||||
|
@ -16335,6 +16431,11 @@
|
|||
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
|
||||
"dev": true
|
||||
},
|
||||
"uc.micro": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
|
||||
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="
|
||||
},
|
||||
"uglify-js": {
|
||||
"version": "2.8.29",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
|
||||
|
@ -16884,87 +16985,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"vue-loader-v16": {
|
||||
"version": "npm:vue-loader@16.5.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.5.0.tgz",
|
||||
"integrity": "sha512-WXh+7AgFxGTgb5QAkQtFeUcHNIEq3PGVQ8WskY5ZiFbWBkOwcCPRs4w/2tVyTbh2q6TVRlO3xfvIukUtjsu62A==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"chalk": "^4.1.0",
|
||||
"hash-sum": "^2.0.0",
|
||||
"loader-utils": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"loader-utils": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
|
||||
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^3.0.0",
|
||||
"json5": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"vue-quill-editor": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/vue-quill-editor/-/vue-quill-editor-3.0.6.tgz",
|
||||
|
|
|
@ -16,8 +16,10 @@
|
|||
"ant-design-vue": "^1.6.2",
|
||||
"axios": "^0.19.0",
|
||||
"core-js": "^3.1.2",
|
||||
"draftjs-to-html": "^0.9.1",
|
||||
"enquire.js": "^2.1.6",
|
||||
"file-saver": "^2.0.5",
|
||||
"html-to-draftjs": "^1.5.0",
|
||||
"js-export-excel": "^1.1.4",
|
||||
"jszip": "^3.7.1",
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
|
@ -27,6 +29,7 @@
|
|||
"mockjs2": "1.0.8",
|
||||
"moment": "^2.24.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"react-draft-wysiwyg": "^1.14.7",
|
||||
"store": "^2.0.12",
|
||||
"viser-vue": "^2.4.6",
|
||||
"vue": "^2.6.10",
|
||||
|
|
|
@ -4,9 +4,12 @@ const courseApi = {
|
|||
// add: 'sys/menu/add',
|
||||
get: '/courseManagement/course/details',
|
||||
// update: 'sys/menu/update',
|
||||
// del: 'sys/menu/delete',
|
||||
del: 'courseManagement/course/delete',
|
||||
// updateStatus: 'sys/menu/updateStatus',
|
||||
list: '/courseManagement/course/listPage'
|
||||
list: '/courseManagement/course/listPage',
|
||||
coursewareList:'/courseManagement/course/courseware/details',
|
||||
questionList:'/courseManagement/course/questionList'
|
||||
|
||||
}
|
||||
|
||||
// export function menuAdd (params) {
|
||||
|
@ -30,13 +33,14 @@ const courseApi = {
|
|||
// data: params
|
||||
// })
|
||||
// }
|
||||
// export function menuDelete (params) {
|
||||
// return request({
|
||||
// url: menuApi.del,
|
||||
// method: 'post',
|
||||
// data: params
|
||||
// })
|
||||
// }
|
||||
|
||||
export function deleteCourse (params) {
|
||||
return request({
|
||||
url: courseApi.del,
|
||||
method: 'delete',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
// 查询课程列表
|
||||
export function getCourseList (params) {
|
||||
|
@ -56,12 +60,20 @@ export function getCourseDetails (params) {
|
|||
})
|
||||
}
|
||||
|
||||
//通过课程ID获取课件列表
|
||||
export function getCoursewareListByCourseId (params) {
|
||||
return request({
|
||||
url: courseApi.coursewareList,
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// export function menuUpdateStatus (params) {
|
||||
// return request({
|
||||
// url: menuApi.updateStatus,
|
||||
// method: 'post',
|
||||
// data: params
|
||||
// })
|
||||
// }
|
||||
//通过课程ID获取题目列表
|
||||
export function getQuestionListByCourseId (params) {
|
||||
return request({
|
||||
url: courseApi.questionList,
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
const questionApi = {
|
||||
// add: 'sys/menu/add',
|
||||
get: '/courseManagement/question/details',
|
||||
// update: 'sys/menu/update',
|
||||
// del: 'courseManagement/course/delete',
|
||||
// updateStatus: 'sys/menu/updateStatus',
|
||||
// list: '/courseManagement/course/listPage',
|
||||
// coursewareList:'/courseManagement/course/courseware/details',
|
||||
// questionList:'/courseManagement/course/questionList'
|
||||
|
||||
}
|
||||
|
||||
// export function menuAdd (params) {
|
||||
// return request({
|
||||
// url: menuApi.add,
|
||||
// method: 'post',
|
||||
// data: params
|
||||
// })
|
||||
// }
|
||||
// export function menuGet (params) {
|
||||
// return request({
|
||||
// url: menuApi.get,
|
||||
// method: 'post',
|
||||
// data: params
|
||||
// })
|
||||
// }
|
||||
// export function menuUpdate (params) {
|
||||
// return request({
|
||||
// url: menuApi.update,
|
||||
// method: 'post',
|
||||
// data: params
|
||||
// })
|
||||
// }
|
||||
|
||||
|
||||
// 查看课程详情
|
||||
export function getQuestionDeatil (params) {
|
||||
return request({
|
||||
url:questionApi.get,
|
||||
method:'get',
|
||||
params:params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
<template>
|
||||
<page-header-wrapper>
|
||||
<a-card :bordered="false">
|
||||
<a-steps class="steps" :current="currentTab">
|
||||
<a-step title="课程基本信息" />
|
||||
<a-step title="课件信息" />
|
||||
<a-step title="完成" />
|
||||
</a-steps>
|
||||
<div class="content">
|
||||
<step1 v-if="currentTab === 0" @nextStep="nextStep"/>
|
||||
<step2 v-if="currentTab === 1" @nextStep="nextStep" @prevStep="prevStep"/>
|
||||
<step3 v-if="currentTab === 2" @prevStep="prevStep" @finish="finish"/>
|
||||
</div>
|
||||
</a-card>
|
||||
</page-header-wrapper>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Step1 from './coursestep/Step1'
|
||||
import Step2 from './coursestep/Step2'
|
||||
import Step3 from '../form/stepForm/Step3'
|
||||
|
||||
export default {
|
||||
name: 'StepForm',
|
||||
components: {
|
||||
Step1,
|
||||
Step2,
|
||||
Step3
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
currentTab: 0,
|
||||
form: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
// handler
|
||||
nextStep () {
|
||||
if (this.currentTab < 2) {
|
||||
this.currentTab += 1
|
||||
}
|
||||
},
|
||||
prevStep () {
|
||||
if (this.currentTab > 0) {
|
||||
this.currentTab -= 1
|
||||
}
|
||||
},
|
||||
finish () {
|
||||
this.currentTab = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.steps {
|
||||
max-width: 750px;
|
||||
margin: 16px auto;
|
||||
}
|
||||
</style>
|
|
@ -1,198 +1,83 @@
|
|||
<template>
|
||||
<div>
|
||||
<page-header-wrapper :title="false">
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-form-item label="课程名称">
|
||||
<a-input v-model="queryParam.courseName" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="(!advanced && 8) || 24" :sm="24">
|
||||
<span
|
||||
class="table-page-search-submitButtons"
|
||||
:style="(advanced && { float: 'right', overflow: 'hidden' }) || {}"
|
||||
>
|
||||
<a-button type="primary" icon="search" @click="$refs.table.refresh(true)">查询</a-button>
|
||||
<a-button style="margin-left: 8px" icon="redo" @click="() => (queryParam = {})">重置</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<SearchCom :form="queryParam" :list="queryOptions" @search="handleRefresh" @reset="() => {queryParam = {}, handleRefresh()}" ></SearchCom>
|
||||
<div style="width: 100%; height: 32px; margin-bottom: 8px;">
|
||||
<a-button type="primary">新建课程</a-button>
|
||||
</div>
|
||||
|
||||
<div class="table-operator">
|
||||
<a-button type="primary" icon="plus" @click="handleEdit()">新建</a-button>
|
||||
<a-button type="primary" icon="minus" @click="handleEdit()">删除</a-button>
|
||||
<!-- <a-button type="dashed" @click="tableOption">{{ (optionAlertShow && '关闭') || '开启' }} alert</a-button> -->
|
||||
<a-dropdown v-action:edit v-if="selectedRowKeys.length > 0">
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item key="1"><a-icon type="delete" />删除</a-menu-item>
|
||||
</a-menu>
|
||||
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /> </a-button>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
rowKey="key"
|
||||
:columns="columns"
|
||||
:data="loadData"
|
||||
:alert="options.alert"
|
||||
:rowSelection="options.rowSelection"
|
||||
>
|
||||
|
||||
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData" :pageNum="Number(this.$route.query.PageNum) || 1">
|
||||
<template slot="action" slot-scope="text, record">
|
||||
<a href="javascript:;" @click="handleEdit(record)">详情</a>
|
||||
<a href="javascript:;" @click="detail(record)">详情</a>
|
||||
<a-divider type="vertical" />
|
||||
<a href="javascript:;" @click="handleDetail(record)">课程</a>
|
||||
<a href="javascript:;" @click="courseWare(record)">课件</a>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="是否删除?" @confirm="() => handleDelete(record)">
|
||||
<a-popconfirm title="是否删除?" @confirm="() => del(record)">
|
||||
<a href="javascript:;">删除</a>
|
||||
<a-divider type="vertical" />
|
||||
</a-popconfirm>
|
||||
<router-link :to="'/dictionary/dictionaryItem/list/' + record.dictionaryCode">题库</router-link>
|
||||
<a-divider type="vertical" />
|
||||
<a href="javascript:;" @click="courseQuestion(record)">题库</a>
|
||||
</template>
|
||||
|
||||
</s-table>
|
||||
</div>
|
||||
</a-card>
|
||||
</page-header-wrapper>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
import { STable } from '@/components'
|
||||
import { getCourseList } from '@/api/course/course'
|
||||
import { STable, SearchCom } from '@/components'
|
||||
import { getCourseList,deleteCourse } from '@/api/course/course'
|
||||
|
||||
export default {
|
||||
name: 'TableList',
|
||||
components: {
|
||||
STable,
|
||||
STable, SearchCom
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mdl: {},
|
||||
// 高级搜索 展开/关闭
|
||||
advanced: false,
|
||||
// 查询参数
|
||||
queryParam: {},
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
width: 60,
|
||||
customRender: (text, record, index) => {
|
||||
return index + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '课程编号',
|
||||
dataIndex: 'id',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title:'课程名称',
|
||||
dataIndex:'courseName',
|
||||
align:'center'
|
||||
},
|
||||
{
|
||||
title: '课时/分',
|
||||
dataIndex: 'hour',
|
||||
align:'center'
|
||||
},
|
||||
{
|
||||
title: '数量',
|
||||
dataIndex: 'questionCount',
|
||||
align:'center'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'operation',
|
||||
width: 300,
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
queryParam: { courseName : this.$route.query.courseName || ''},//, orgId: this.$route.query.courseUserOrgId || ''
|
||||
queryOptions: [
|
||||
{ type: 'input', placeholder: '课程名称', key: 'courseName' },
|
||||
],
|
||||
|
||||
// 加载数据方法 必须为 Promise 对象
|
||||
loadData: parameter => {
|
||||
return getCourseList(Object.assign(parameter, this.queryParam))
|
||||
.then(res => {
|
||||
return res
|
||||
})
|
||||
return getCourseList(Object.assign(parameter, this.queryParam)).then(res => { return res });
|
||||
},
|
||||
|
||||
selectedRowKeys: [],
|
||||
selectedRows: [],
|
||||
|
||||
// custom table alert & rowSelection
|
||||
options: {
|
||||
alert: {
|
||||
show: true,
|
||||
clear: () => {
|
||||
this.selectedRowKeys = []
|
||||
},
|
||||
},
|
||||
rowSelection: {
|
||||
selectedRowKeys: this.selectedRowKeys,
|
||||
onChange: this.onSelectChange,
|
||||
},
|
||||
},
|
||||
optionAlertShow: false,
|
||||
columns: [
|
||||
{ title: '课程编号', width: '160px', align: 'center', dataIndex: 'courseCode', key: 'courseCode' },
|
||||
{ title: '课程名称', width: 'auto', align: 'center', dataIndex: 'courseName', key: 'courseName' },
|
||||
{ title: '课时/分', width: '160px', align: 'center', dataIndex: 'hour', key: 'hour' },
|
||||
{ title: '数量', width: '160px', align: 'center', dataIndex: 'questionCount', key: 'questionCount' },
|
||||
{ title: '操作', key: 'operation', width: '200px', align: 'center', scopedSlots: { customRender: 'action' } }
|
||||
],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.tableOption()
|
||||
getRoleList({ t: new Date() })
|
||||
},
|
||||
methods: {
|
||||
tableOption() {
|
||||
if (!this.optionAlertShow) {
|
||||
this.options = {
|
||||
alert: {
|
||||
show: true,
|
||||
clear: () => {
|
||||
this.selectedRowKeys = []
|
||||
handleRefresh () {
|
||||
this.$refs.table.refresh(true)
|
||||
},
|
||||
detail(record){
|
||||
this.$router.push({ path: '/course/CourseDetail', query: { id: record.id } });
|
||||
},
|
||||
rowSelection: {
|
||||
selectedRowKeys: this.selectedRowKeys,
|
||||
onChange: this.onSelectChange,
|
||||
courseWare(record){
|
||||
this.$router.push({ path: '/course/CoursewareList', query: { id: record.id } });
|
||||
},
|
||||
}
|
||||
this.optionAlertShow = true
|
||||
} else {
|
||||
this.options = {
|
||||
alert: false,
|
||||
rowSelection: null,
|
||||
}
|
||||
this.optionAlertShow = false
|
||||
}
|
||||
del(record){
|
||||
deleteCourse({ids:record.id}).then(res => {
|
||||
if(res.code == 200) this.$refs.table.refresh(true);
|
||||
});
|
||||
},
|
||||
|
||||
handleEdit(record) {
|
||||
this.$emit('onEdit', record)
|
||||
},
|
||||
handleOk() {},
|
||||
|
||||
onSelectChange(selectedRowKeys, selectedRows) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
this.selectedRows = selectedRows
|
||||
},
|
||||
toggleAdvanced() {
|
||||
this.advanced = !this.advanced
|
||||
},
|
||||
|
||||
resetSearchForm() {
|
||||
this.queryParam = {
|
||||
date: moment(new Date()),
|
||||
}
|
||||
//题库
|
||||
courseQuestion(record){
|
||||
this.$router.push({
|
||||
path: '/course/question/QuestionList', query :{
|
||||
id: record.id,
|
||||
courseName : this.queryParam.courseName,
|
||||
// courseUserOrgId : this.queryParam.orgId,
|
||||
PageNum : this.$refs.table.localPagination.current
|
||||
}});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,54 @@
|
|||
<template>
|
||||
<page-header-wrapper :title="false">
|
||||
<a-card :bordered="false">
|
||||
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData">
|
||||
<template slot="action" slot-scope="text, record">
|
||||
<a href="javascript:;" @click="detail(record)">预览</a>
|
||||
<a-divider type="vertical" />
|
||||
<a href="javascript:;" @click="courseWare(record)">重新上传</a>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="是否删除?" @confirm="() => del(record)">
|
||||
<a href="javascript:;">删除</a>
|
||||
</a-popconfirm>
|
||||
<a-divider type="vertical" />
|
||||
<a href="javascript:;" @click="courseQuestion(record)">抽考题</a>
|
||||
</template>
|
||||
</s-table>
|
||||
</a-card>
|
||||
</page-header-wrapper>
|
||||
</template>
|
||||
<script>
|
||||
import { STable, SearchCom } from '@/components'
|
||||
import { getCoursewareListByCourseId } from '@/api/course/course'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
STable,
|
||||
SearchCom,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryParam: { id: this.$route.query.id },
|
||||
|
||||
loadData: (parameter) => {
|
||||
return getCoursewareListByCourseId(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
columns: [
|
||||
{ title: '课程名称', width: '160px', align: 'center', dataIndex: 'name', key: 'name' },
|
||||
{ title: '课程分类',width: '300px',align: 'center', dataIndex: 'coursewareClassifyId', key: 'coursewareClassifyId',},
|
||||
{ title: '课时/分', width: '160px', align: 'center', dataIndex: 'hour', key: 'hour' },
|
||||
{ title: '课件大小', width: '160px', align: 'center', dataIndex: 'coursewareSize', key: 'coursewareSize' },
|
||||
{ title: '操作', key: 'operation', width: '200px', align: 'center', scopedSlots: { customRender: 'action' } },
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
del(record){
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
|
@ -1,27 +1,56 @@
|
|||
<template>
|
||||
<a-descriptions title="User Info">
|
||||
<a-descriptions-item label="UserName">
|
||||
Zhou Maomao
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="Telephone">
|
||||
1810000000
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="Live">
|
||||
Hangzhou, Zhejiang
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="Remark">
|
||||
empty
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="Address">
|
||||
No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China
|
||||
</a-descriptions-item>
|
||||
<page-header-wrapper :title="false">
|
||||
<a-card :bordered="false">
|
||||
<a-descriptions title="课程详情" layout="horizontal" bordered size="small" :column="1">
|
||||
<a-descriptions-item label="课程编号"> {{ detailData.courseCode }} </a-descriptions-item>
|
||||
<a-descriptions-item label="课程名称"> {{ detailData.courseName }} </a-descriptions-item>
|
||||
<a-descriptions-item label="课程类别"> {{ detailData.courseName }} </a-descriptions-item>
|
||||
<a-descriptions-item label="课时"> {{ detailData.hour }} </a-descriptions-item>
|
||||
<a-descriptions-item label="试题数量"> {{ detailData.questionCount }} </a-descriptions-item>
|
||||
<a-descriptions-item label="学习内容"> {{ detailData.courseName }} </a-descriptions-item>
|
||||
<a-descriptions-item label="备注"> {{ detailData.courseName }} </a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<div class="buttonGroup">
|
||||
<a-button type="primary" @click="close"> 返回 </a-button>
|
||||
<a-button type="primary"> 编辑 </a-button>
|
||||
</div>
|
||||
</a-card>
|
||||
</page-header-wrapper>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
import { STable } from '@/components'
|
||||
import { getCourseList } from '@/api/course/course'
|
||||
import { getCourseDetails } from '@/api/course/course'
|
||||
|
||||
export default {
|
||||
name: 'details',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
queryParam: { id: this.$route.query.id },
|
||||
detailData: {}
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
let parameter = {};
|
||||
getCourseDetails(Object.assign(parameter, this.queryParam)).then(res => { this.detailData = res.data });
|
||||
},
|
||||
methods: {
|
||||
close () {
|
||||
this.$router.push({ path: '/course/CourseList', query: { } });
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.ant-descriptions-item-label {
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
.buttonGroup{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,164 @@
|
|||
<template>
|
||||
<a-form-model :model="form">
|
||||
<a-row>
|
||||
<!-- 课程名称 -->
|
||||
<a-col :span="18" :offset="3">
|
||||
<a-form-model-item label="课程名称" :label-col="{ span: 4 }" :wrapper-col="{ span: 15 }">
|
||||
<a-input
|
||||
v-model="form.courseName"
|
||||
v-decorator="['courseName', { rules: [{ required: true, message: '请填写课程名称' }] }]"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
||||
<!-- 课程类别 -->
|
||||
<a-col :span="9" :offset="3">
|
||||
<a-form-model-item label="课程类别" :label-col="{ span: 8 }" :wrapper-col="{ span: 12 }">
|
||||
<a-select v-model="form.courseType" placeholder="--请选择--">
|
||||
<a-select-option value="shangye"> 商业 </a-select-option>
|
||||
<a-select-option value="zhengwu"> 政务 </a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
||||
<!-- 课时 -->
|
||||
<a-col :span="9">
|
||||
<a-form-item label="课时" :label-col="{ span: 4 }" :wrapper-col="{ span: 10 }">
|
||||
<a-input-number
|
||||
id="hour"
|
||||
v-model="dataValue"
|
||||
:min="1"
|
||||
:max="1000"
|
||||
@change="onChange"
|
||||
:style="{ display: 'ln', width: '100%' }"
|
||||
/>
|
||||
{{dataValue}}分钟
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<!-- 学习内容简介 -->
|
||||
<a-col :span="18" :offset="3">
|
||||
<a-form-model-item label="学习内容" :label-col="{ span: 4 }" :wrapper-col="{ span: 15 }">
|
||||
<a-input v-model="form.learningContent" type="textarea" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
||||
<!-- 所属行业 -->
|
||||
<a-col :span="9" :offset="3">
|
||||
<a-form-model-item label="所属行业" :label-col="{ span: 8 }" :wrapper-col="{ span: 12 }">
|
||||
<a-select v-model="form.industryInvolved" placeholder="--请选择--">
|
||||
<a-select-option value="1"> 医疗 </a-select-option>
|
||||
<a-select-option value="0"> 建筑 </a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
||||
<!-- 是否为必修课程 -->
|
||||
<a-col :span="9">
|
||||
<a-form-model-item label="是否为必修" :label-col="{ span: 6 }" :wrapper-col="{ span: 6 }">
|
||||
<a-select v-model="form.isRequired" placeholder="--请选择--">
|
||||
<a-select-option value="1"> 是 </a-select-option>
|
||||
<a-select-option value="0"> 否 </a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
||||
<!-- 选择岗位-人员类型 -->
|
||||
<a-col :span="9" :offset="3">
|
||||
<a-form-model-item label="选择岗位" :label-col="{ span: 8 }" :wrapper-col="{ span: 12 }">
|
||||
<a-select v-model="form.job" placeholder="--请选择--">
|
||||
<a-select-option v-for="item in personType" :key="item.id"> {{ item.name }} </a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
||||
<!-- 备注 -->
|
||||
<a-col :span="18" :offset="3">
|
||||
<a-form-model-item label="备注" :label-col="{ span: 4 }" :wrapper-col="{ span: 15 }">
|
||||
<a-input v-model="form.remark" type="textarea" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
||||
<!-- 上传封面图片 -->
|
||||
<!-- <a-col :span="18" :offset="3">
|
||||
<a-form-model-item label="上传封面图片" :label-col="{ span: 4 }" :wrapper-col="{ span: 15 }">
|
||||
<a-upload
|
||||
name="avatar"
|
||||
list-type="picture-card"
|
||||
class="avatar-uploader"
|
||||
:show-upload-list="false"
|
||||
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
|
||||
:before-upload="beforeUpload"
|
||||
@change="handleChange"
|
||||
>
|
||||
<img v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
||||
<div v-else>
|
||||
<a-icon :type="loading ? 'loading' : 'plus'" />
|
||||
<div class="ant-upload-text">封面图片</div>
|
||||
</div>
|
||||
</a-upload>
|
||||
</a-form-model-item>
|
||||
</a-col> -->
|
||||
</a-row>
|
||||
<a-col>
|
||||
<a-form-model-item :wrapper-col="{ span: 14, offset: 10 }">
|
||||
<a-button type="primary" @click="toNext"> 下一步 </a-button>
|
||||
<a-button style="margin-left: 10px"> 取消 </a-button>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
||||
</a-form-model>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { dictGet } from '@/api/project/project'
|
||||
|
||||
export default {
|
||||
name:'step1',
|
||||
data() {
|
||||
return {
|
||||
dataValue: 1,
|
||||
form: {},
|
||||
personType: [
|
||||
{id: '1', name: '人员类别1'},
|
||||
{id: '2', name: '人员类别2'},
|
||||
{id: '3', name: '人员类别3'}
|
||||
]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
// dictGet,
|
||||
|
||||
},
|
||||
created () {},
|
||||
methods: {
|
||||
//获取字典值
|
||||
// getPersonType() {
|
||||
// return dictGet(Object.assign(parameter)).then((res) => {
|
||||
// return res
|
||||
// })
|
||||
// },
|
||||
|
||||
//显示页面上的数字
|
||||
onChange(dataValue) {
|
||||
console.log('changed', dataValue)
|
||||
},
|
||||
|
||||
toNext () {
|
||||
const { form: { validateFields } } = this
|
||||
// 先校验,通过表单校验后,才进入下一步
|
||||
validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.$emit('toNext')
|
||||
}
|
||||
})
|
||||
}
|
||||
// //下一步,跳转页面带上from对象
|
||||
// toNext() {
|
||||
// console.log('toNext', this.form)
|
||||
// },
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,110 @@
|
|||
<template>
|
||||
<div>
|
||||
<a-form :form="form" style="max-width: 500px; margin: 40px auto 0;">
|
||||
<a-alert
|
||||
:closable="true"
|
||||
message="确认转账后,资金将直接打入对方账户,无法退回。"
|
||||
style="margin-bottom: 24px;"
|
||||
/>
|
||||
<a-form-item
|
||||
label="付款账户"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
class="stepFormText"
|
||||
>
|
||||
ant-design@alipay.com
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="收款账户"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
class="stepFormText"
|
||||
>
|
||||
test@example.com
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="收款人姓名"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
class="stepFormText"
|
||||
>
|
||||
Alex
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="转账金额"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
class="stepFormText"
|
||||
>
|
||||
¥ 5,000.00
|
||||
</a-form-item>
|
||||
<a-divider />
|
||||
<a-form-item
|
||||
label="支付密码"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
class="stepFormText"
|
||||
>
|
||||
<a-input
|
||||
type="password"
|
||||
style="width: 80%;"
|
||||
v-decorator="['paymentPassword', { initialValue: '123456', rules: [{required: true, message: '请输入支付密码'}] }]" />
|
||||
</a-form-item>
|
||||
<a-form-item :wrapperCol="{span: 19, offset: 5}">
|
||||
<a-button :loading="loading" type="primary" @click="nextStep">提交</a-button>
|
||||
<a-button style="margin-left: 8px" @click="prevStep">上一步</a-button>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Step2',
|
||||
data () {
|
||||
return {
|
||||
labelCol: { lg: { span: 5 }, sm: { span: 5 } },
|
||||
wrapperCol: { lg: { span: 19 }, sm: { span: 19 } },
|
||||
form: this.$form.createForm(this),
|
||||
loading: false,
|
||||
timer: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
nextStep () {
|
||||
const that = this
|
||||
const { form: { validateFields } } = this
|
||||
that.loading = true
|
||||
validateFields((err, values) => {
|
||||
if (!err) {
|
||||
console.log('表单 values', values)
|
||||
that.timer = setTimeout(function () {
|
||||
that.loading = false
|
||||
that.$emit('nextStep')
|
||||
}, 1500)
|
||||
} else {
|
||||
that.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
prevStep () {
|
||||
this.$emit('prevStep')
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
clearTimeout(this.timer)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.stepFormText {
|
||||
margin-bottom: 24px;
|
||||
|
||||
.ant-form-item-label,
|
||||
.ant-form-item-control {
|
||||
line-height: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
|
@ -0,0 +1,185 @@
|
|||
<template>
|
||||
<page-header-wrapper>
|
||||
<a-card :bordered="false">
|
||||
<div class="questionLeft">
|
||||
<div class="div-button">
|
||||
<a-button type="primary" class="close-button" style="font-size: 15px" @click="questionColse"> 关闭 </a-button>
|
||||
<a-button type="primary" class="create-button" style="font-size: 15px" @click="questionSave"> 新增 </a-button>
|
||||
</div>
|
||||
<h1 class="questionNumber">题序</h1>
|
||||
<!-- 题目序号 -->
|
||||
<div v-for="(item, index) in quesitonList" :key="item" class="questionLeftItem" @click="quesionId(item)">{{ index+1 }}</div>
|
||||
</div>
|
||||
|
||||
<div class="questionDetail">
|
||||
<br />
|
||||
<b><h1 class="questionContent">课程题目库预览</h1></b>
|
||||
<a-divider :style="{ backgroundColor: '#000' }" />
|
||||
<div class="question">
|
||||
<h1 class="questionName">
|
||||
({{ questionDetail.questionType }}){{questionDetail.questionName}}
|
||||
<span class="edit" @click="edit(i)">编辑</span>
|
||||
</h1>
|
||||
<div class="answer">A. {{ questionDetail.answerA }}</div>
|
||||
<div class="answer">B. {{ questionDetail.answerB }}</div>
|
||||
<div class="answer">C. {{ questionDetail.answerC }}</div>
|
||||
<div class="answer">D. {{ questionDetail.answerD }}</div>
|
||||
<div class="info_parent">
|
||||
<div class="info">解析</div>
|
||||
<div class="info_main">
|
||||
{{questionDetail.asnwerParse}}
|
||||
</div>
|
||||
</div>
|
||||
<a-divider :style="{ backgroundColor: '#000' }" />
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
</page-header-wrapper>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getQuestionListByCourseId } from '@/api/course/course'
|
||||
import { getQuestionDeatil } from '@/api/course/question/question'
|
||||
import get from 'lodash.get'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
queryParam: { id: this.$route.query.id },
|
||||
quesitonList: [],
|
||||
questionDetail: {},
|
||||
}
|
||||
},
|
||||
|
||||
created: function () {
|
||||
let parameter = {}
|
||||
// 查询所有题目id列表
|
||||
getQuestionListByCourseId(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||
this.quesitonList = res.data
|
||||
|
||||
if (!res.data.length) return
|
||||
this.quesionId(this.quesitonList[0])
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
//题目ID
|
||||
quesionId: function (i) {
|
||||
getQuestionDeatil({ id: i }).then((res) => {
|
||||
this.questionDetail = res.data
|
||||
})
|
||||
},
|
||||
|
||||
//关闭按钮
|
||||
questionColse() {
|
||||
this.$router.push({
|
||||
path: '/course/CourseList',
|
||||
query: {
|
||||
// courseName: this.$$router.query.courseName,
|
||||
// PageNum: this.$$router.query.PageNum,
|
||||
// courseUserOrgId : this.$$router.query.courseUserOrgId,
|
||||
},
|
||||
})
|
||||
},
|
||||
questionSave() {
|
||||
alert('還在對接中~~~')
|
||||
},
|
||||
edit: function (i) {
|
||||
alert('题目ID:' + i)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.questionLeft {
|
||||
width: 300px;
|
||||
height: auto;
|
||||
float: left;
|
||||
background-color: #f0f2f5;
|
||||
}
|
||||
.questionLeftItem {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
float: left;
|
||||
text-align: center;
|
||||
border: 1px solid #000;
|
||||
margin: 5px 5px;
|
||||
cursor: pointer;
|
||||
background-color: wheat;
|
||||
}
|
||||
.questionDetail {
|
||||
width: calc(100% - 300px - 20px);
|
||||
height: auto;
|
||||
float: left;
|
||||
margin-left: 20px;
|
||||
background-color: #f0f2f5;
|
||||
}
|
||||
.div-button {
|
||||
margin-bottom: 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.create-button {
|
||||
float: right;
|
||||
width: 135px;
|
||||
height: 35px;
|
||||
}
|
||||
.close-button {
|
||||
width: 135px;
|
||||
height: 35px;
|
||||
float: left;
|
||||
}
|
||||
.questionNumber {
|
||||
width: 300px;
|
||||
height: 40px;
|
||||
text-align: center;
|
||||
font-size: 23px;
|
||||
font: bold;
|
||||
background-color: gainsboro;
|
||||
margin-top: 45px;
|
||||
}
|
||||
.questionContent {
|
||||
margin-left: 10px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.question {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.questionName {
|
||||
font-weight: bold;
|
||||
}
|
||||
.edit {
|
||||
float: right;
|
||||
margin-right: 30px;
|
||||
color: #1890ff;
|
||||
cursor: pointer;
|
||||
}
|
||||
.answer {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
font-size: 13px;
|
||||
}
|
||||
.info_parent {
|
||||
margin-top: 10px;
|
||||
height: auto;
|
||||
}
|
||||
.info {
|
||||
width: 50px;
|
||||
height: 20px;
|
||||
line-height: 15px;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
border: 1px solid #000;
|
||||
background-color: white;
|
||||
}
|
||||
.info_main {
|
||||
width: calc(100% - 50px - 20px);
|
||||
margin-left: 20px;
|
||||
font-size: 13px;
|
||||
margin-left: 70px;
|
||||
margin-top: -20px;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue