diff --git a/src/api/course/question/question.js b/src/api/course/question/question.js index 1664445..51c7556 100644 --- a/src/api/course/question/question.js +++ b/src/api/course/question/question.js @@ -1,24 +1,27 @@ import request from '@/utils/request' const questionApi = { -// add: 'sys/menu/add', + add: 'courseManagement/question/addOrUpdate', get: '/courseManagement/question/details', // update: 'sys/menu/update', -// del: 'courseManagement/course/delete', + del: 'courseManagement/question/delete', // updateStatus: 'sys/menu/updateStatus', // list: '/courseManagement/course/listPage', // coursewareList:'/courseManagement/course/courseware/details', -// questionList:'/courseManagement/course/questionList' +// questionList:'/courseManagement/course/questionList', + importTemplate: "courseManagement/question/importTemplate" } -// export function menuAdd (params) { -// return request({ -// url: menuApi.add, -// method: 'post', -// data: params -// }) -// } + +// 题目新增 +export function questionAdd (params) { + return request({ + url: questionApi.add, + method: 'post', + data: params + }) +} // export function menuGet (params) { // return request({ // url: menuApi.get, @@ -35,6 +38,14 @@ const questionApi = { // } +export function deleteQuestion (params) { + return request({ + url: questionApi.del, + method: 'delete', + params: params + }) +} + // 查看课程详情 export function getQuestionDeatil (params) { return request({ @@ -44,5 +55,13 @@ export function getQuestionDeatil (params) { }) } +// 题目批量导入 +export function importTemplate (params) { + return request({ + url: questionApi.importTemplate, + method: 'post', + params: params + }) +} diff --git a/src/api/person/personRegister.js b/src/api/person/personRegister.js new file mode 100644 index 0000000..f747205 --- /dev/null +++ b/src/api/person/personRegister.js @@ -0,0 +1,13 @@ +import request from '@/utils/request' + +const personRegisterApi = { + page: 'person/register/pageList' +} + +export function personRegisterPage (params) { + return request({ + url: personRegisterApi.page, + method: 'get', + params: params + }) +} diff --git a/src/api/project/terminalTrainSign.js b/src/api/project/terminalTrainSign.js new file mode 100644 index 0000000..88b218b --- /dev/null +++ b/src/api/project/terminalTrainSign.js @@ -0,0 +1,15 @@ +import request from '@/utils/request' + +const terminalTrainSignApi = { + list: 'project/terminalTrain/list', + +} + +export function terminalTrainSignList(params) { + console.log("terminalTrainList------------{}", params) + return request({ + url: terminalTrainSignApi.list, + method: 'get', + params: params + }) +} \ No newline at end of file diff --git a/src/api/security/user.js b/src/api/security/user.js index 659b2b5..f151cfd 100644 --- a/src/api/security/user.js +++ b/src/api/security/user.js @@ -14,7 +14,7 @@ const userApi = { const userPasswordApi = { update: '/sys/user/passwordUpdate', - reset: '/sys/user/passwordReset' + reset: '/sys/user/resetPwd' } export function userLogin (params) { @@ -85,7 +85,7 @@ export function passwordUpdate (params) { export function passwordReset (params) { return request({ url: userPasswordApi.reset, - method: 'post', - data: params + method: 'get', + params: params }) } diff --git a/src/api/sys/dictionaryItem.js b/src/api/sys/dictionaryItem.js index 07a72df..f82fa04 100644 --- a/src/api/sys/dictionaryItem.js +++ b/src/api/sys/dictionaryItem.js @@ -4,7 +4,8 @@ const dictionaryItemApi = { add: 'sys/dictionary/item/add', update: 'sys/dictionary/item/edit', del: 'sys/dictionary/item/del', - page: 'sys/dictionary/item/pageList' + page: 'sys/dictionary/item/pageList', + dropDown: 'sys/dictionary/item/dropDown' } export function dictionaryItemAdd (params) { @@ -35,3 +36,13 @@ export function dictionaryItemPage (params) { params: params }) } +/** + * 获取字典类型下所有字典,举例,返回格式为:[{value:"M",name:"男"},{code:"F",name:"女"}] + */ +export function dictionaryDropDown (params) { + return request({ + url: dictionaryItemApi.dropDown, + method: 'get', + params: params + }) +} diff --git a/src/api/sys/oss.js b/src/api/sys/oss.js index 76f55d0..f844ecf 100644 --- a/src/api/sys/oss.js +++ b/src/api/sys/oss.js @@ -1,7 +1,8 @@ import request from '@/utils/request' const ossApi = { - list: '/sys/oss/list' + list: '/sys/oss/list', + upload: '/sys/oss/upload' } export function ossList (params) { @@ -11,3 +12,7 @@ export function ossList (params) { params: params }) } + +export function ossUpload () { + return process.env.VUE_APP_API_BASE_URL + ossApi.upload; +} diff --git a/src/views/course/CourseAdd.vue b/src/views/course/CourseAdd.vue index 22db19b..e844101 100644 --- a/src/views/course/CourseAdd.vue +++ b/src/views/course/CourseAdd.vue @@ -1,6 +1,9 @@ @@ -118,10 +121,12 @@ export default { { id: '2', name: '人员类别2' }, { id: '3', name: '人员类别3' }, ], - + previewVisible: false, - fileList: [] + fileList: [], + previewImage :[ + ] } }, @@ -164,6 +169,11 @@ export default { }) }, + //返回 + goback(){ + this.$router.push({path:"/course/CourseList",query:{} }) + }, + getToken() { let hreader = {}; hreader[ACCESS_TOKEN] = storage.get(ACCESS_TOKEN); @@ -188,5 +198,18 @@ export default { }, }, + } + +// 图片预览Base64 +function getBase64(file) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => resolve(reader.result); + reader.onerror = error => reject(error); + }); +} + + diff --git a/src/views/course/CourseList.vue b/src/views/course/CourseList.vue index be21017..90924b6 100644 --- a/src/views/course/CourseList.vue +++ b/src/views/course/CourseList.vue @@ -1,5 +1,4 @@ - diff --git a/src/views/course/CoursewareList.vue b/src/views/course/CoursewareList.vue index 3490a3a..acd442e 100644 --- a/src/views/course/CoursewareList.vue +++ b/src/views/course/CoursewareList.vue @@ -1,9 +1,10 @@ - diff --git a/src/views/course/question/QuestionList.vue b/src/views/course/question/QuestionList.vue index 2073d34..ecc501d 100644 --- a/src/views/course/question/QuestionList.vue +++ b/src/views/course/question/QuestionList.vue @@ -1,72 +1,138 @@ + diff --git a/src/views/project/ProjectStepForm.vue b/src/views/project/ProjectStepForm.vue index 9a64d7a..2627017 100644 --- a/src/views/project/ProjectStepForm.vue +++ b/src/views/project/ProjectStepForm.vue @@ -1,7 +1,7 @@ @@ -54,6 +54,23 @@ export default { }, }) }, + editInfo(){ //修改信息按钮 + this.$router.push({ + path: '/project/terminalTrain/form', + query: { + id: this.detailData.id, + } + }) + }, + + signInfo(){ //跳转签到信息页面 + this.$router.push({ + path: '/project/terminalTrain/signList', + query: { + id: this.detailData.id, + } + }) + } }, } diff --git a/src/views/project/terminalTrain/TerminalTrainForm.vue b/src/views/project/terminalTrain/TerminalTrainForm.vue index 105ea96..a7564cf 100644 --- a/src/views/project/terminalTrain/TerminalTrainForm.vue +++ b/src/views/project/terminalTrain/TerminalTrainForm.vue @@ -1,6 +1,6 @@ @@ -66,7 +68,8 @@ export default { remark: '', status: 1, }, - titleName: '新增终端培训', + titleName: '终端培训表单', + layout: 'horizontal' } }, //计算属性 类似于data概念 diff --git a/src/views/project/terminalTrain/TerminalTrainList.vue b/src/views/project/terminalTrain/TerminalTrainList.vue index 4e68445..cd24188 100644 --- a/src/views/project/terminalTrain/TerminalTrainList.vue +++ b/src/views/project/terminalTrain/TerminalTrainList.vue @@ -78,40 +78,20 @@ export default { endDate: this.$route.query.terminalTrainEndDate || null, }, columns: [ - { - title: '序号', - width: 'auto', - align: 'center', - dataIndex: 'id', - key: 'id', - scopedSlots: { customRender: 'serial' }, - }, + { title: '序号', width: 'auto', align: 'center', dataIndex: 'id', key: 'id', scopedSlots: { customRender: 'serial' }, }, { title: '项目名称', width: 'auto', align: 'center', dataIndex: 'projectName', key: 'projectName' }, - { - title: '时间', - dataIndex: 'date', - key: 'date', + { title: '时间', dataIndex: 'date', key: 'date', customRender: (text, record, index) => { return record.startDate + ' - ' + record.endDate }, }, - { - title: '人数', - width: 'auto', - align: 'center', - dataIndex: 'num', - key: 'num', + { title: '人数', width: 'auto', align: 'center', dataIndex: 'num', key: 'num', customRender: (text, record, index) => { return record.signNum + ' / ' + record.personNum }, }, { title: '培训类型', width: 'auto', align: 'center', dataIndex: 'projectType', key: 'projectType' }, - { - title: '项目状态', - width: 'auto', - align: 'center', - dataIndex: 'status', - key: 'status', + { title: '项目状态', width: 'auto', align: 'center', dataIndex: 'status', key: 'status', customRender: (text, record, index) => { if (text == '1') return '未发布' else if (text == '2') return '未开始' diff --git a/src/views/project/terminalTrain/TerminalTrainSignList.vue b/src/views/project/terminalTrain/TerminalTrainSignList.vue new file mode 100644 index 0000000..b714af6 --- /dev/null +++ b/src/views/project/terminalTrain/TerminalTrainSignList.vue @@ -0,0 +1,163 @@ + + + + \ No newline at end of file diff --git a/src/views/sys/dictionary/DictionaryList.vue b/src/views/sys/dictionary/DictionaryList.vue index 02c2509..2c97272 100644 --- a/src/views/sys/dictionary/DictionaryList.vue +++ b/src/views/sys/dictionary/DictionaryList.vue @@ -7,6 +7,8 @@ @search="handleRefresh" @reset="() => {queryParam = {}, handleRefresh()}" > + + 新增 import { dictionaryItemPage, dictionaryItemDel } from '@/api/sys/dictionaryItem' -import { STable } from '@/components' +import { STable, GoBack } from '@/components' import DictionaryItemForm from './DictionaryItemForm' export default { name: 'DictionaryItemList', components: { STable, + GoBack, DictionaryItemForm }, data () { @@ -91,6 +92,10 @@ export default { } }, methods: { + goBack () { + // 返回到上一级 + this.$router.push({ path: '/dictionary' }) + }, // 增 handleCreate () { this.$refs.modal.add()