diff --git a/test_client/src/api/exam.js b/test_client/src/api/exam.js new file mode 100644 index 0000000..c87f665 --- /dev/null +++ b/test_client/src/api/exam.js @@ -0,0 +1,29 @@ +import request from '@/utils/request' + +export function getexamlist(query) { + return request({ + url: '/examtest/exam/', + method: 'get', + params: query + }) +} +export function createexam(data) { + return request({ + url: '/examtest/exam/', + method: 'post', + data + }) +} +export function updateexam(id, data) { + return request({ + url: `/examtest/exam/${id}/`, + method: 'put', + data + }) +} +export function deleteexam(id) { + return request({ + url: `/examtest/exam/${id}/`, + method: 'delete', + }) +} \ No newline at end of file diff --git a/test_client/src/api/examtest.js b/test_client/src/api/examtest.js index 4f64fbe..a415702 100644 --- a/test_client/src/api/examtest.js +++ b/test_client/src/api/examtest.js @@ -35,10 +35,11 @@ export function deleteTestRule(id) { }) } -export function getWorkScopeAll() { +export function getWorkScopeAll(query) { return request({ url: '/examtest/workscope/', method: 'get', + params: query }) } @@ -131,4 +132,19 @@ export function exportTest(query) { method: 'get', params: query }) +} + +export function exportwTest(id,data) { + return request({ + url: `/examtest/examtest/${id}/exportw/`, + method: 'post', + data: data + }) +} + +export function deleteExamtest(id) { + return request({ + url: `/examtest/examtest/${id}/`, + method: 'delete', + }) } \ No newline at end of file diff --git a/test_client/src/router/index.js b/test_client/src/router/index.js index 244fb43..bfb6fc2 100644 --- a/test_client/src/router/index.js +++ b/test_client/src/router/index.js @@ -247,6 +247,21 @@ export const asyncRoutes = [ }, ] }, + { + path: '/exammanage', + component: Layout, + redirect: '/exammanage/index', + name: 'Exammanage', + meta: { title: '考试管理', icon: '', perms: []}, + children: [ + { + path: 'index', + name: 'exam', + component: () => import('@/views/exam/index.vue'), + meta: { title: '考试管理', icon: 'component', perms: ['exam_view'] } + }, + ] + }, { path: '/analyse', component: Layout, @@ -268,6 +283,7 @@ export const asyncRoutes = [ }, ] }, + { path: '/qtest', component: Layout, diff --git a/test_client/src/styles/index.scss b/test_client/src/styles/index.scss index 4a25b38..059de63 100644 --- a/test_client/src/styles/index.scss +++ b/test_client/src/styles/index.scss @@ -64,9 +64,61 @@ div:focus { padding: 10px; } +.el-table--medium td,   .el-table--medium th { + padding: 2px 0; +} +.el-form-item { + margin-bottom: 16px; +} +.el-card, .el-message { + border-radius: 0px; + overflow: hidden; +} .el-card__body { padding: 6px; } .el-card__header { padding: 6px; -} \ No newline at end of file +} +.el-tabs--border-card>.el-tabs__content { + padding: 6px; +} +.el-dialog__header { + padding: 10px 10px 6px; +} +// .el-dialog{ +// display: flex; +// flex-direction: column; +// margin:0 !important; +// position:absolute; +// top:50%; +// left:50%; +// transform:translate(-50%,-50%); +// /*height:600px;*/ +// max-height:calc(100% - 30px); +// max-width:calc(100% - 30px); +// } +.el-dialog .el-dialog__body{ + // flex:1; + // overflow: auto; + padding: 8px 12px; +} + +.el-form--label-top .el-form-item__label { + line-height: 16px; +} +.el-button+.el-button { + margin-left: 1px; +} +.el-tabs__header { + margin: 0 0 6px; +} +.pagination-container { + padding: 0px 0px; +} +body .el-table th.gutter{ + display: table-cell!important; +} +.el-dialog__footer{ + padding: 6px 6px 6px; +} diff --git a/test_client/src/views/analyse/examtest.vue b/test_client/src/views/analyse/examtest.vue index 9f0d67f..deef5da 100644 --- a/test_client/src/views/analyse/examtest.vue +++ b/test_client/src/views/analyse/examtest.vue @@ -18,7 +18,7 @@ 刷新重置 - 导出Excel + 导出Excel
@@ -85,6 +85,9 @@ + + + @@ -94,14 +97,26 @@ - + @@ -116,7 +131,7 @@ diff --git a/test_client/src/views/crm/company.vue b/test_client/src/views/crm/company.vue index ab2415e..2fc62c7 100644 --- a/test_client/src/views/crm/company.vue +++ b/test_client/src/views/crm/company.vue @@ -212,12 +212,7 @@ export default { updateCompany(this.company.id, this.company).then(() => { this.getList(); this.dialogVisible = false; - this.$notify({ - title: "成功", - message: "编辑成功", - type: "success", - duration: 2000 - }); + this.$message.success('成功') }); } else { createCompany(this.company).then(res => { @@ -225,12 +220,7 @@ export default { // this.tableData.unshift(this.company) this.getList(); this.dialogVisible = false; - this.$notify({ - title: "成功", - message: "新增成功", - type: "success", - duration: 2000 - }); + this.$message.success('成功') }); } } else { diff --git a/test_client/src/views/crm/consumerrole.vue b/test_client/src/views/crm/consumerrole.vue index 02fcf2d..1942223 100644 --- a/test_client/src/views/crm/consumerrole.vue +++ b/test_client/src/views/crm/consumerrole.vue @@ -156,11 +156,7 @@ export default { const { description, name } = this.role this.dialogVisible = false - this.$notify({ - title: '成功', - dangerouslyUseHTMLString: true, - type: 'success' - }) + this.$message.success('成功') }, } } diff --git a/test_client/src/views/exam/index.vue b/test_client/src/views/exam/index.vue new file mode 100644 index 0000000..e6f3a2b --- /dev/null +++ b/test_client/src/views/exam/index.vue @@ -0,0 +1,274 @@ + + + diff --git a/test_client/src/views/examtest/workscope.vue b/test_client/src/views/examtest/workscope.vue index a08ae95..9854b30 100644 --- a/test_client/src/views/examtest/workscope.vue +++ b/test_client/src/views/examtest/workscope.vue @@ -20,14 +20,20 @@ row-key="id" > - + - + + + + - + - + + + + @@ -96,6 +99,9 @@ + + + + + + + + + + + + + + + + + + + + + + + + 确认 + + \ No newline at end of file diff --git a/test_mini/pages/exam/index.wxss b/test_mini/pages/exam/index.wxss new file mode 100644 index 0000000..a6a15b8 --- /dev/null +++ b/test_mini/pages/exam/index.wxss @@ -0,0 +1 @@ +/* pages/exam/index.wxss */ \ No newline at end of file diff --git a/test_mini/pages/exam/note.js b/test_mini/pages/exam/note.js new file mode 100644 index 0000000..af5bb1f --- /dev/null +++ b/test_mini/pages/exam/note.js @@ -0,0 +1,78 @@ +// pages/exam/note.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + try { + var value = wx.getStorageSync('examtest') + if (value) { + let examtest = value + delete examtest['questions'] + this.setData(examtest) + } + } catch (e) { } + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + startTest: function () { + wx.reLaunch({ + url: '/pages/test/test', + }) + }, +}) \ No newline at end of file diff --git a/test_mini/pages/exam/note.json b/test_mini/pages/exam/note.json new file mode 100644 index 0000000..28a2a8e --- /dev/null +++ b/test_mini/pages/exam/note.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "考试须知" +} \ No newline at end of file diff --git a/test_mini/pages/exam/note.wxml b/test_mini/pages/exam/note.wxml new file mode 100644 index 0000000..2628071 --- /dev/null +++ b/test_mini/pages/exam/note.wxml @@ -0,0 +1,24 @@ + + + + 正式考试须知 + 1.考试信息 + 名称:{{exam_.name}} + 监考人:{{exam_.proctor_name}}/{{exam_.proctor_phone}} + 2.试卷信息 + 答卷时长:{{limit}}分钟 + {{danxuan_count}}道单选题,每题{{danxuan_score}}分 + {{duoxuan_count}}道多选题,每题{{duoxuan_score}}分 + {{panduan_count}}道判断题,每题{{panduan_score}}分 + 多选题漏选每个正确选项得1分,错选0分 + 满分{{total_score}};{{pass_score}}以上通过 + 3.答题须知 + 进入答题后请不要后退或返回桌面 + 用户可点击上一题/下一题进行切换答题 + 可点击答题卡复查 + 请合理安排时间答题,可提前交卷,超时会自动提交 + + 开始考试 + + + \ No newline at end of file diff --git a/test_mini/pages/exam/note.wxss b/test_mini/pages/exam/note.wxss new file mode 100644 index 0000000..3592ee0 --- /dev/null +++ b/test_mini/pages/exam/note.wxss @@ -0,0 +1 @@ +/* pages/exam/note.wxss */ \ No newline at end of file diff --git a/test_mini/pages/lianxi/main.json b/test_mini/pages/lianxi/main.json index f70ab27..ad8534d 100644 --- a/test_mini/pages/lianxi/main.json +++ b/test_mini/pages/lianxi/main.json @@ -1,6 +1,6 @@ { "usingComponents": { - "parser": "/components/parser/parser" + "mp-html": "/components/mp-html/index" }, "navigationBarTitleText": "练习" } \ No newline at end of file diff --git a/test_mini/pages/lianxi/main.wxml b/test_mini/pages/lianxi/main.wxml index 8c7271f..df2c016 100644 --- a/test_mini/pages/lianxi/main.wxml +++ b/test_mini/pages/lianxi/main.wxml @@ -13,8 +13,7 @@ {{tm_current.type}} - - + @@ -25,15 +24,13 @@ {{item.key}}: - - + {{item.key}}: - - + @@ -52,15 +49,13 @@ {{item.key}}: - - + {{item.key}}: - - + diff --git a/test_mini/pages/my/index.wxml b/test_mini/pages/my/index.wxml index 66393a8..79baef9 100644 --- a/test_mini/pages/my/index.wxml +++ b/test_mini/pages/my/index.wxml @@ -4,21 +4,21 @@ - + 账号: {{userinfo.username}} - 账号: - 未登陆 + 账号: + 未登陆 昵称: - 单位: - {{ userinfo.company_name }} + 单位: + {{ userinfo.company_name }} 如需解绑账号请联系课程顾问 @@ -28,46 +28,55 @@ 统计分析 - + - + + 工作类别 - {{userinfo.workscope_name}} - + + {{userinfo.workscope_name}} + - + + - 模考次数 + 考试次数 {{total}} - - - + + + + 通过率 {{pass_rate}}% - - - + + + + 平均分 {{avg_score}} + + + + + + 正式考试入口 + + - - - 更多服务请联系课程顾问 - - - + + + 更多服务请联系课程顾问 + + + \ No newline at end of file diff --git a/test_mini/pages/question/detail.json b/test_mini/pages/question/detail.json index 6fea3ea..c77cd44 100644 --- a/test_mini/pages/question/detail.json +++ b/test_mini/pages/question/detail.json @@ -1,5 +1,5 @@ { "usingComponents": { - "parser": "/components/parser/parser" + "mp-html": "/components/mp-html/index" } } \ No newline at end of file diff --git a/test_mini/pages/question/detail.wxml b/test_mini/pages/question/detail.wxml index 85b1199..e19385d 100644 --- a/test_mini/pages/question/detail.wxml +++ b/test_mini/pages/question/detail.wxml @@ -8,7 +8,7 @@ {{tm_current.questioncat_name}} - + @@ -18,7 +18,7 @@ {{item.key}}: - + @@ -34,7 +34,7 @@ {{item.key}}: - + diff --git a/test_mini/pages/test/detail.js b/test_mini/pages/test/detail.js index d98994a..c145e8f 100644 --- a/test_mini/pages/test/detail.js +++ b/test_mini/pages/test/detail.js @@ -18,7 +18,12 @@ Page({ onLoad: function (options) { var that = this var query = {'examtest':options.id} + wx.showLoading({ + title: '加载中...', + mask:true + }) api.request('/examtest/answerdetail/', 'GET', query).then(res => { + wx.hideLoading() for (var i = 0; i < res.data.length; i++) { if(res.data[i].img){ res.data[i].img = getApp().globalData.mediahost + res.data[i].img @@ -29,7 +34,7 @@ Page({ that.setData({ tmtotal:res.data.length }) - }) + }).catch(e=>{wx.hideLoading()}) try { const res = wx.getSystemInfoSync() that.setData({ diff --git a/test_mini/pages/test/detail.json b/test_mini/pages/test/detail.json index 6fea3ea..c77cd44 100644 --- a/test_mini/pages/test/detail.json +++ b/test_mini/pages/test/detail.json @@ -1,5 +1,5 @@ { "usingComponents": { - "parser": "/components/parser/parser" + "mp-html": "/components/mp-html/index" } } \ No newline at end of file diff --git a/test_mini/pages/test/detail.wxml b/test_mini/pages/test/detail.wxml index c1f1b6f..62cd033 100644 --- a/test_mini/pages/test/detail.wxml +++ b/test_mini/pages/test/detail.wxml @@ -8,8 +8,7 @@ ({{tm_current.question.questioncat_name}}) - - + @@ -18,7 +17,7 @@ @@ -26,7 +26,9 @@