考试列表查询

This commit is contained in:
binbin_pan 2024-08-12 16:19:57 +08:00
parent fb1bd80d5a
commit bb437eec9e
9 changed files with 533 additions and 122 deletions

3
.gitignore vendored
View File

@ -19,6 +19,3 @@ selenium-debug.log
*.sln *.sln
*.local *.local
package-lock.json
yarn.lock
pnpm-lock.yaml

25
package-lock.json generated
View File

@ -1,8 +1,31 @@
{ {
"name": "hello-uniapp", "name": "hello-uniapp",
"version": "3.4.5", "version": "3.4.5",
"lockfileVersion": 1, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": {
"": {
"name": "hello-uniapp",
"version": "3.4.5",
"license": "MIT",
"dependencies": {
"luch-request": "^3.1.1"
}
},
"node_modules/@dcloudio/types": {
"version": "2.6.12",
"resolved": "https://registry.npmjs.org/@dcloudio/types/-/types-2.6.12.tgz",
"integrity": "sha512-mrCMwcINy1IFjU9VUqLeWBkj404yWs5paLDttBcA+eqUjanuUQbBcTVPqlrGgkyzLXDcV2oDDZRSNxNpXi4kMQ=="
},
"node_modules/luch-request": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/luch-request/-/luch-request-3.1.1.tgz",
"integrity": "sha512-p7+mlcEtgRcd0OfXC4XZbyiwSr1XgCeqNT7LlVUjnk7InYl/8d5Rk7BUqAYNA2WRafI1wRIUQWRWZRpeUwWR0w==",
"dependencies": {
"@dcloudio/types": "^2.0.16"
}
}
},
"dependencies": { "dependencies": {
"@dcloudio/types": { "@dcloudio/types": {
"version": "2.6.12", "version": "2.6.12",

View File

@ -1,121 +1,141 @@
{ {
// "easycom": { "easycom": {
// "^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue" "^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue"
// }, },
"pages": [ "pages": [
// pageshttps://uniapp.dcloud.io/collocation/pages // pageshttps://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/login", "path": "pages/login",
"style": { "style": {
"navigationBarTitleText": "登录", "navigationBarTitleText": "登录",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, { },
"path": "pages/webview", {
"style": { "path": "pages/webview",
"navigationBarTitleText": "作业管控智慧平台", "style": {
"navigationStyle": "custom" "navigationBarTitleText": "作业管控智慧平台",
} "navigationStyle": "custom"
}, { }
"path": "pages/message/index", },
"style": { {
"navigationBarTitleText": "消息" "path": "pages/message/index",
} "style": {
}, { "navigationBarTitleText": "消息"
"path": "pages/message/detail", }
"style": { },
"navigationBarTitleText": "消息" {
} "path": "pages/message/detail",
}, { "style": {
"path": "pages/gzt/index", "navigationBarTitleText": "消息"
"style": { }
"navigationBarTitleText": "作业管控智慧平台", },
"navigationStyle": "custom" {
} "path": "pages/gzt/index",
}, { "style": {
"path": "pages/txl/index", "navigationBarTitleText": "作业管控智慧平台",
"style": { "navigationStyle": "custom"
"navigationBarTitleText": "通讯录" }
} },
}, { {
"path": "pages/mine/index", "path": "pages/txl/index",
"style": { "style": {
"navigationBarTitleText": "我的", "navigationBarTitleText": "通讯录"
"navigationStyle": "custom" }
} },
}, { {
"path": "pages/YNEduApp/index/index", "path": "pages/mine/index",
"style": { "style": {
"navigationBarTitleText": "首页" "navigationBarTitleText": "我的",
} "navigationStyle": "custom"
}, { }
"path": "pages/YNEduApp/user/user", },
"style": { {
"navigationStyle": "custom" "path": "pages/YNEduApp/index/index",
} "style": {
}, { "navigationBarTitleText": "首页"
"path": "pages/YNEduApp/user/settings", }
"style": { },
"navigationBarTitleText": "设置" {
} "path": "pages/YNEduApp/user/user",
}, { "style": {
"path": "pages/YNEduApp/learnProj/learnProj", "navigationStyle": "custom"
"style": { }
"navigationBarTitleText": "学习项目" },
} {
}, { "path": "pages/YNEduApp/user/settings",
"path": "pages/YNEduApp/learnProj/learnProjDetail", "style": {
"style": { "navigationBarTitleText": "设置"
"navigationBarTitleText": "学习项目" }
} },
}, {
{ "path": "pages/YNEduApp/learnProj/learnProj",
"path" : "pages/YNEduApp/user/editProfile", "style": {
"style" : "navigationBarTitleText": "学习项目"
{ }
"navigationBarTitleText" : "编辑资料" },
} {
}, "path": "pages/YNEduApp/learnProj/learnProjDetail",
{ "style": {
"path" : "pages/YNEduApp/user/changeGate", "navigationBarTitleText": "学习项目"
"style" : }
{ },
"navigationBarTitleText" : "选择公司", {
"app-plus": { "path": "pages/YNEduApp/user/editProfile",
"titleNView": { "style": {
"buttons": [ "navigationBarTitleText": "编辑资料"
{ }
"text": "完成", },
"fontSize": "16px", {
"color": "#000", "path": "pages/YNEduApp/user/changeGate",
"float": "right" "style": {
} "navigationBarTitleText": "选择公司",
] "app-plus": {
} "titleNView": {
} "buttons": [
} {
} "text": "完成",
], "fontSize": "16px",
"globalStyle": { "color": "#000",
"fontFamily": "Helvetica, Arial, sans-serif", "float": "right"
"pageOrientation": "portrait", }
"navigationBarTitleText": "作业管控智慧平台", ]
"navigationBarTextStyle": "black", }
"navigationBarBackgroundColor": "#ffffff", }
"backgroundColor": "#F8F8F8", }
"backgroundColorTop": "#F4F5F6", },
"backgroundColorBottom": "#F4F5F6", {
"mp-360": { "path": "pages/YNEduApp/exam/exam",
"navigationStyle": "custom" "style": {
}, "navigationBarTitleText": "考试"
"h5": { }
"maxWidth": 1190, },
"navigationBarTextStyle": "black", {
"navigationBarBackgroundColor": "#F1F1F1" "path": "pages/YNEduApp/exam/beforeExam",
} "style": {
"navigationBarTitleText": ""
} }
/* "tabBar": { }
],
"globalStyle": {
"fontFamily": "Helvetica, Arial, sans-serif",
"pageOrientation": "portrait",
"navigationBarTitleText": "作业管控智慧平台",
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#ffffff",
"backgroundColor": "#F8F8F8",
"backgroundColorTop": "#F4F5F6",
"backgroundColorBottom": "#F4F5F6",
"mp-360": {
"navigationStyle": "custom"
},
"h5": {
"maxWidth": 1190,
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#F1F1F1"
}
}
/* "tabBar": {
"color": "#7A7E83", "color": "#7A7E83",
"selectedColor": "#007AFF", "selectedColor": "#007AFF",
"borderStyle": "black", "borderStyle": "black",
@ -144,4 +164,4 @@
} }
] ]
} */ } */
} }

View File

@ -0,0 +1,161 @@
<template>
<view class="view">
<div class="content">
<div class="title">{{ title }}</div>
<div class="subtitle">{{ subtitle }}</div>
<div class="info">
<div class="duration-wrapper">
<u-icon name="/static/images/time.png"></u-icon>
<div class="duration">{{ duration }}分钟</div>
<div class="explain">考试时长</div>
</div>
<div class="count-wrapper">
<u-icon name="/static/images/infinite.png"></u-icon>
<div class="count">{{ count }}</div>
<div class="explain">考试次数</div>
</div>
<div class="switch-count-wrapper">
<u-icon name="/static/images/qiehuan.png"></u-icon>
<div class="switch-count">{{ switchCount }}</div>
<div class="explain">切屏次数</div>
</div>
</div>
<div class="explain">*进入考试后计时结束将自动交卷退出后将会继续计时</div>
<!-- 底部固定按钮 -->
<div class="bottom-btn">
<div class="btn">
<u-button type="primary" size="small" shape="circle" text="进入考试" @click="openModal" />
</div>
</div>
<!-- 确认进入考试弹框 -->
<u-modal :show="showModal" title="提示" :content="content" showCancelButton @cancel="showModal = false" @confirm="handleEnterExam"></u-modal>
</div>
</view>
</template>
<script>
export default {
data() {
return {
showModal: false,
//
title: '2023年送配电线路架设工模拟考试',
//
subtitle: '不限期',
//
duration: '120',
//
count: '不限次',
//
switchCount: '不限次',
content: '是否确认进入考试?'
}
},
methods: {
openModal() {
this.showModal = true
},
//
handleEnterExam() {
// uni.navigateTo({
// url: '/pages/YNEduApp/exam/exam'
// })
}
}
}
</script>
<style lang="scss" scoped>
.view {
padding: 10px;
}
.content {
padding: 10px;
border-radius: 5px;
background-color: #fff;
height: 90vh;
box-sizing: border-box;
.title {
font-size: 18px;
font-weight: bold;
color: #333;
padding-top: 20px;
}
.subtitle {
font-size: 14px;
color: #666;
margin-top: 10px;
}
.info {
display: flex;
justify-content: space-between;
margin-top: 20px;
.duration-wrapper,
.count-wrapper,
.switch-count-wrapper {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100px;
height: 100px;
background: #f4f9fe;
border-radius: 4px;
margin-bottom: 20px;
.icon {
width: 20px;
height: 20px;
}
.duration,
.count,
.switch-count {
font-size: 16px;
color: #333;
margin-left: 5px;
}
.explain {
font-size: 12px;
color: #999;
margin-left: 5px;
}
}
}
.explain {
font-size: 12px;
color: #999;
}
.bottom-btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background-color: #fff;
padding: 10px 0;
display: flex;
justify-content: flex-end;
align-items: center;
.btn {
width: 33%;
margin-right: 10px;
}
}
}
::v-deep .u-modal__content {
flex-direction: column;
align-items: center;
}
</style>

View File

@ -0,0 +1,210 @@
<template>
<view>
<div class="tab-wrapper">
<div v-for="(item, index) in tabList" :key="index" class="tab-item" @click="handleTab(item, index)">
<div :style="{ color: activeIndex === index ? '#409eff' : '#333' }">
{{ item.name }}
</div>
<div :class="{ 'tab-line': activeIndex === index }"></div>
</div>
</div>
<div class="content">
<div v-for="(item, index) in list" :key="index" class="item-wrapper">
<div class="title">{{ item.title }}</div>
<div class="name-status">
<div class="name">
{{ item.name }}
<div class="name-sub">指派</div>
</div>
<div class="status">{{ item.status }}</div>
</div>
<div class="time">{{ item.time }}</div>
<div class="count-total">
<div class="count">考试{{ item.count }}</div>
<div class="total">总分{{ item.total }}</div>
</div>
<div class="bt-wrapper">
<div class="score">得分{{ item.score }}</div>
<div class="btn" @click="handleExamination">开始考试</div>
</div>
</div>
<!-- 暂无数据 -->
<div class="no-data" v-if="list.length == 0">
<image src="/static/images/zanwuneirong.png" mode="aspectFit" />
<view class="no-data-text">暂无内容</view>
</div>
</div>
</view>
</template>
<script>
export default {
data() {
return {
tabList: [{ name: '全部' }, { name: '待考' }, { name: '已考' }, { name: '缺考' }],
activeIndex: 0,
list: [],
//
allList: [
{
id: 1,
//
title: '送配电线路架设(初级)',
//
name: '张三',
//
status: '待考试',
//
time: '2020-12-12 12:00',
//
count: 1,
//
total: '--',
//
score: '暂无'
},
{
id: 2,
//
title: '送配电线路架设(初级)',
//
name: '张三',
//
status: '待考试',
//
time: '2020-12-12 12:00',
//
count: 1,
//
total: '--',
//
score: '暂无'
}
],
//
waitList: [],
//
alreadyList: [],
//
absentList: []
}
},
mounted() {
this.list = this.allList
},
methods: {
handleTab(item, index) {
this.activeIndex = index
if (index === 0) {
this.list = this.allList
} else if (index === 1) {
this.list = this.waitList
} else if (index === 2) {
this.list = this.alreadyList
} else if (index === 3) {
this.list = this.absentList
}
},
//
handleExamination() {
uni.navigateTo({
url: '/pages/YNEduApp/exam/beforeExam'
})
}
}
}
</script>
<style lang="scss" scoped>
.tab-wrapper {
display: flex;
justify-content: space-around;
background: #fff;
margin-bottom: 10px;
.tab-item {
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
padding: 10px 0;
.tab-line {
margin-top: 5px;
width: 30%;
height: 2px;
background-color: #409eff;
transition: width 0.3s;
}
}
}
.content {
padding: 0 10px;
.item-wrapper {
background: #fff;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
.title {
font-size: 16px;
font-weight: bold;
margin-bottom: 10px;
}
.name-status {
display: flex;
justify-content: space-between;
.name {
display: flex;
.name-sub {
margin-left: 5px;
color: #999;
}
}
.status {
color: #409eff;
}
}
.time {
color: #999;
margin-top: 10px;
}
.count-total {
display: flex;
justify-content: space-between;
margin-top: 10px;
.count {
color: #999;
}
.total {
color: #999;
}
}
.bt-wrapper {
display: flex;
justify-content: space-between;
margin-top: 10px;
.score {
color: #999;
}
.btn {
padding: 5px 10px;
background: #409eff;
color: #fff;
border-radius: 5px;
}
}
}
.no-data {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 100px;
.no-data-text {
margin-top: 10px;
color: #999;
}
}
}
</style>

BIN
static/images/infinite.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
static/images/qiehuan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

BIN
static/images/time.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB