diff --git a/client_mp/common/http.api.js b/client_mp/common/http.api.js
index fdb7fbc..9c4ad3d 100644
--- a/client_mp/common/http.api.js
+++ b/client_mp/common/http.api.js
@@ -37,7 +37,7 @@ const install = (Vue, vm) => {
let getExamList = (params={})=>vm.$u.get('/exam/exam/', params);//考试列表
let startExam = (id)=>vm.$u.post(`/exam/exam/${id}/start/`);//开始考试
let submitExam = (id,params={})=>vm.$u.post(`/exam/examrecord/${id}/submit/`,params);//开始考试
- let examRecord = (id,params={})=>vm.$u.get(`/exam/examrecord/self/`,params);//我的考试记录
+ let examRecord = (id,params={})=>vm.$u.get(`/exam/examrecord/`,params);//我的考试记录
let examRecordDetail = (id,params={})=>vm.$u.get(`/exam/examrecord/${id}/`,params);//我的考试记录
let paperDetail = (id,params={})=>vm.$u.get(`/exam/paper/${id}/`,params);//测试
let questionList = (params={})=>vm.$u.get(`/exam/question/`,params);//题目
diff --git a/client_mp/pages.json b/client_mp/pages.json
index 751275d..31d5ba3 100644
--- a/client_mp/pages.json
+++ b/client_mp/pages.json
@@ -137,39 +137,12 @@
}
}
- // ,{
- // "path" : "pages/exam/test",
- // "style" :
- // {
- // "navigationBarTitleText": "练习",
- // "enablePullDownRefresh": false
- // }
-
- // }
- // ,{
- // "path" : "pages/exam/question",
- // "style" :
- // {
- // "navigationBarTitleText": "专题练习",
- // "enablePullDownRefresh": false
- // }
-
- // }
- // ,{
- // "path" : "pages/exam/testDetail",
- // "style" :
- // {
- // "navigationBarTitleText": "练习题目",
- // "enablePullDownRefresh": false
- // }
-
- // }
,{
"path" : "pages/exam/exam",
"style" :
{
"navigationBarTitleText": "考试列表",
- "enablePullDownRefresh": false
+ "enablePullDownRefresh": true
}
}
@@ -243,12 +216,12 @@
"selectedIconPath": "static/common/homec.png",
"text": "主页"
},
- {
- "pagePath": "pages/exam/index",
- "iconPath": "static/common/dati.png",
- "selectedIconPath": "static/common/datic.png",
- "text": "考试"
- },
+ // {
+ // "pagePath": "pages/exam/index",
+ // "iconPath": "static/common/dati.png",
+ // "selectedIconPath": "static/common/datic.png",
+ // "text": "考试"
+ // },
// {
// "pagePath": "pages/vod/video",
// "iconPath": "static/common/play.png",
diff --git a/client_mp/pages/document/index.vue b/client_mp/pages/document/index.vue
index 3470d13..71de7a8 100644
--- a/client_mp/pages/document/index.vue
+++ b/client_mp/pages/document/index.vue
@@ -46,6 +46,7 @@
})
var filePath = res.tempFilePath;
uni.openDocument({
+ showMenu:true,
filePath: filePath,
success: function (res) {
uni.hideLoading()
diff --git a/client_mp/pages/exam/exam.vue b/client_mp/pages/exam/exam.vue
index 085c88e..c1ad426 100644
--- a/client_mp/pages/exam/exam.vue
+++ b/client_mp/pages/exam/exam.vue
@@ -1,60 +1,229 @@
-
-
-
-
-
- {{item.name}}
-
-
-
-
- 开启时间: {{item.open_time}}至{{item.close_time}}
- 考试机会: {{item.chance}}次
-
-
-
-
-
-
-
-
+
+
+
+ {{tab.name}}
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+ 开启时间: {{item.open_time}}
+ 结束时间: {{item.close_time}}
+ 考试机会: {{item.chance}}次
+
+
+
+
+
+
+
+
+
+ 已经到底了
+
-
diff --git a/client_mp/pages/exam/index.vue b/client_mp/pages/exam/index.vue
index 2d362cb..cf60dc8 100644
--- a/client_mp/pages/exam/index.vue
+++ b/client_mp/pages/exam/index.vue
@@ -2,10 +2,26 @@
-
+
+
+
{{item.title}}
+
@@ -17,8 +33,8 @@
page: 1
},
cellList: [
- {img:'../../static/exam/exam.png',title:'正式考试',id:'exam'},
- {img:'../../static/exam/test.png',title:'考试记录',id:'test'},
+ {img:'../../static/exam/exam.png',title:'正式考试',id:'exam',class:'exam'},
+ {img:'../../static/exam/test.png',title:'考试记录',id:'test',class:'test'},
// {img:'../../static/exam/question.png',title:'专题练习',id:'question'},
// {img:'../../static/exam/errorIcon.png',title:'错题记录',id:'record'},
]
@@ -91,4 +107,20 @@
.cellItem:nth-of-type(4) .cellText{
color: #d81e06;
}
+.exam{
+ width: 200rpx;
+ height: 200rpx;
+ background: #46bb5a;
+ border-radius: 40rpx;
+ padding: 36rpx;
+ margin: auto;
+}
+.test{
+ width: 200rpx;
+ height: 200rpx;
+ background: #ecc041;
+ border-radius: 40rpx;
+ padding: 36rpx;
+ margin: auto;
+}
diff --git a/client_mp/pages/exam/main.vue b/client_mp/pages/exam/main.vue
index aff9d3c..321ec50 100644
--- a/client_mp/pages/exam/main.vue
+++ b/client_mp/pages/exam/main.vue
@@ -22,7 +22,7 @@
- {{currentIndex}}·{{currentQuestion.name}}
+ {{currentIndex+1}}·{{currentQuestion.name}}
{{currentQuestion.img}}
@@ -153,11 +153,16 @@
questions_.push(obj);
}
that.$u.api.submitExam(that.currentExam.examrecord,{questions_:questions_}).then(res=>{
+ uni.showToast({
+ title:"提交成功",
+ icon:"none"
+ })
uni.setStorageSync('currentExam',res.data)
uni.hideLoading()
- uni.redirectTo({
+ uni.reLaunch({
url:'/pages/exam/result'
})
+
}).catch(e=>{
if(res.msg){
uni.showModal({
@@ -166,12 +171,11 @@
showCancel:false,
success(res) {
uni.reLaunch({
- url:'/pages/index/index'
+ url:'/pages/exam/exam'
})
}
})
}
-
})
// let questions = this.currentExam.questions
// let score=0
diff --git a/client_mp/pages/exam/preview.vue b/client_mp/pages/exam/preview.vue
index 440ddc9..8963f0f 100644
--- a/client_mp/pages/exam/preview.vue
+++ b/client_mp/pages/exam/preview.vue
@@ -11,16 +11,17 @@
题目分布:单选{{currentExam.paper_.danxuan_count}}道;多选{{currentExam.paper_.duoxuan_count}}道;判断{{currentExam.paper_.panduan_count}}道
判分规则:单选{{currentExam.paper_.danxuan_score}}分,多选{{currentExam.paper_.duoxuan_score}}分,多选{{currentExam.paper_.panduan_score}}分,错选少选均不得分
- 答题须知
+
+ - 答题须知。
- 1.进入答题后请不要后退或返回。
- 2.可点击上一题/下一题切换。
- 3.可点击答题卡复查
- 4.请合理安排时间答题,可提前交卷
- 开始答题
+ 开始答题
@@ -53,31 +54,55 @@
diff --git a/client_mp/pages/exam/record.vue b/client_mp/pages/exam/record.vue
index 9facd81..c1ea30a 100644
--- a/client_mp/pages/exam/record.vue
+++ b/client_mp/pages/exam/record.vue
@@ -1,11 +1,14 @@
-
-
+
+
+
{{item.exam_name}}
(补)
@@ -13,7 +16,7 @@
耗时:
- {{item.took_format}}
+ {{item.took_format}}
@@ -37,7 +40,8 @@
return {
listQuery: {
page: 1,
- page_size: 20
+ page_size: 20,
+ can_attend:true,
},
list: [],
loadingText: '加载中...'
@@ -76,16 +80,23 @@
this.$u.api.examRecordDetail(id).then(res=>{
uni.hideLoading()
uni.setStorageSync('currentExam', res.data)
- if (res.data.questions_.length>0){
+ if (res.data.questions_&&res.data.questions_.length>0){
uni.navigateTo({
url:'/pages/exam/detail?examrecord='+id
})
}
else{
- uni.showToast({
- title:'获取失败',
- icon:'none'
- })
+ uni.showModal({
+ title: '提示',
+ content: '考试未结束,请考试结束后再查看',
+ success: function (res) {
+
+ }
+ });
+ // uni.showToast({
+ // title:'考试未结束,请考试结束后再查看',
+ // icon:'none'
+ // })
return
}
}).catch(e=>{
@@ -110,9 +121,23 @@
diff --git a/client_mp/pages/exam/result.vue b/client_mp/pages/exam/result.vue
index 4a71fcc..4bd834b 100644
--- a/client_mp/pages/exam/result.vue
+++ b/client_mp/pages/exam/result.vue
@@ -20,7 +20,7 @@
export default {
data() {
return {
- imageSrcPass: '/static/exam/result.png',
+ imageSrcPass: '/static/exam/cross.png',
imageSrc: '/static/exam/error.png',
currentExam:{}
}
@@ -48,7 +48,7 @@
},
backToHome(){
uni.reLaunch({
- url:'/pages/exam/index'
+ url:'/pages/home/home'
})
}
},
diff --git a/client_mp/pages/home/home.vue b/client_mp/pages/home/home.vue
index d00c4bf..26062d0 100644
--- a/client_mp/pages/home/home.vue
+++ b/client_mp/pages/home/home.vue
@@ -2,7 +2,7 @@
-
+
欢迎您:{{vuex_user.name}}!
@@ -11,7 +11,7 @@
:indicator-pos="indicatorPos" :mode="mode" :interval="3000" @click="click"> -->
-
+
{{item.name}}
@@ -91,17 +91,17 @@
},
{
name: '考试',
- icon: 'file-text',
+ icon: 'order',
path: '/pages/exam/exam',
},
{
name: '考试记录',
- icon: 'file-text',
+ icon: 'list-dot',
path: '/pages/exam/record',
},
{
name: '证书查询',
- icon: 'file-text',
+ icon: 'qzone-circle-fill',
path: '/pages/certificate/index',
}
],
@@ -178,12 +178,17 @@
diff --git a/client_mp/pages/subtask/my.vue b/client_mp/pages/subtask/my.vue
index 4bdcaff..a82d6f4 100644
--- a/client_mp/pages/subtask/my.vue
+++ b/client_mp/pages/subtask/my.vue
@@ -32,7 +32,19 @@
export default {
data() {
return {
- myinspecttaskList: [],
+ myinspecttaskList: [
+ {
+ state:'已完成',
+ name:'石静',
+ inspecttask_:{
+ name:'任务一',
+ start_date:'2024-05-20',
+ end_date:'2024-05-25',
+ },
+ members:[],
+ depts_count:3,
+ }
+ ],
headstyle: {
"padding-top": "12rpx",
"padding-bottom": "12rpx"
@@ -45,7 +57,16 @@
methods: {
getMyInspectTaskList() {
this.$u.api.getMyInspectTaskList({}).then(res => {
- this.myinspecttaskList = res.data
+ this.myinspecttaskList = res.data;
+ if(res.data.length>0){}else{
+ uni.showModal({
+ title: '提示',
+ content: '您还没有巡查任务,请分配任务后查看',
+ success: function (res) {
+ uni.navigateBack(1)
+ }
+ });
+ }
}).catch(e => {})
},
taskClick(index) {
diff --git a/client_mp/uview-ui/theme.scss b/client_mp/uview-ui/theme.scss
index 37264d5..8991675 100644
--- a/client_mp/uview-ui/theme.scss
+++ b/client_mp/uview-ui/theme.scss
@@ -10,7 +10,7 @@ $u-light-color: #c0c4cc;
$u-border-color: #e4e7ed;
$u-bg-color: #f3f4f6;
-$u-type-primary: #2979ff;
+$u-type-primary: #2581e4;
$u-type-primary-light: #ecf5ff;
$u-type-primary-disabled: #a0cfff;
$u-type-primary-dark: #2b85e4;