Merge branch 'xgf-training-dev' of http://47.92.113.182:3000/guoyuepeng/qa-prevention-xgf-app into xgf-training-dev
commit
23a9a42cbf
|
@ -68,3 +68,7 @@ export const setSecurityMeasuresSave = (params) => post("/app/Task/setQues", par
|
||||||
export const setOtherSecurityMeasuresSave = (params) => post("/app/Task/setOtherQues", params) //其它安全措施提交
|
export const setOtherSecurityMeasuresSave = (params) => post("/app/Task/setOtherQues", params) //其它安全措施提交
|
||||||
export const getHistoricalApprovalRecords = (params) => post("/app/Task/getHis", params); // 历史审批记录
|
export const getHistoricalApprovalRecords = (params) => post("/app/Task/getHis", params); // 历史审批记录
|
||||||
// 结束
|
// 结束
|
||||||
|
|
||||||
|
// 以下接口培训管理流程使用
|
||||||
|
export const getClassList = (params) => post("/app/stagestudentrelation/pageTaskByUser", params); // 历史审批记录
|
||||||
|
// 结束
|
||||||
|
|
|
@ -1,222 +1,220 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<u-list @scrolltolower="scrolltolower">
|
<u-list @scrolltolower="scrolltolower">
|
||||||
<u-list-item v-for="(item, index) in trainList" :key="index">
|
<u-list-item v-for="(item, index) in trainList" :key="index">
|
||||||
<view class="container_item">
|
<view class="container_item">
|
||||||
<view class="container_item_name">
|
<view class="container_item_name">
|
||||||
<text>{{ item.className }}</text>
|
<text>{{ item.className }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="container_item_content">
|
<view class="container_item_content">
|
||||||
<view class="content_text">
|
<view class="content_text">
|
||||||
<view>
|
<view>
|
||||||
<text class="content_label">所属单位: </text>
|
<text class="content_label">所属单位: </text>
|
||||||
<text class="content_value">{{ item.unit }}</text>
|
<text class="content_value">{{ item.unit }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content_text">
|
<view class="content_text">
|
||||||
<view>
|
<view>
|
||||||
<text class="content_label">培训开始时间: </text>
|
<text class="content_label">培训开始时间: </text>
|
||||||
<text class="content_value">{{ item.trainStartTime }}</text>
|
<text class="content_value">{{ item.trainStartTime }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content_text">
|
<view class="content_text">
|
||||||
<view>
|
<view>
|
||||||
<text class="content_label">培训结束时间: </text>
|
<text class="content_label">培训结束时间: </text>
|
||||||
<text class="content_value">{{ item.trainEndTime }}</text>
|
<text class="content_value">{{ item.trainEndTime }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content_text">
|
<view class="content_text">
|
||||||
<view class="content_bottom">
|
<view class="content_bottom">
|
||||||
<view>
|
<view>
|
||||||
<text class="content_label">任务状态: </text>{{ handleCalcTaskStatus(item.taskStatus) }}
|
<text class="content_label">任务状态: </text>{{ handleCalcTaskStatus(item.taskStatus) }}
|
||||||
</view>
|
</view>
|
||||||
<view class="action-row">
|
<view class="action-row">
|
||||||
<u-button size="mini" type="primary" text="签到信息" @click="signInInformation(item.classId)" />
|
<u-button size="mini" type="primary" text="签到信息"
|
||||||
<u-button size="mini" type="primary" text="考试记录" @click="ExamRecord(item.classId)" />
|
@click="signInInformation(item.classId)" />
|
||||||
</view>
|
<u-button size="mini" type="primary" text="考试记录"
|
||||||
</view>
|
@click="ExamRecord(item.classId)" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-list-item>
|
</view>
|
||||||
</u-list>
|
</view>
|
||||||
</view>
|
</u-list-item>
|
||||||
|
</u-list>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getCertificateInformationList } from "@/api/index.js";
|
import { getClassList } from '../../api';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageSize: 10,
|
||||||
|
currentPage: 1,
|
||||||
|
totalPage: 0,
|
||||||
|
trainList: [],
|
||||||
|
taskStatusMap: {
|
||||||
|
0: '未开始',
|
||||||
|
1: '进行中'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
export default {
|
/* 监听页面显示,页面每次出现在屏幕上都触发,包括从下级页面点返回露出当前页面 */
|
||||||
data() {
|
onShow() {
|
||||||
return {
|
this.resetList()
|
||||||
pageSize: 10,
|
},
|
||||||
currentPage: 1,
|
|
||||||
totalPage: 0,
|
|
||||||
trainList: [],
|
|
||||||
taskStatusMap: {
|
|
||||||
0: '未开始',
|
|
||||||
1: '进行中'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/* 监听页面显示,页面每次出现在屏幕上都触发,包括从下级页面点返回露出当前页面 */
|
methods: {
|
||||||
onShow() {
|
async getData() {
|
||||||
this.resetList()
|
let resData = await getClassList({
|
||||||
},
|
showCount: this.pageSize,
|
||||||
|
currentPage: this.currentPage,
|
||||||
methods: {
|
});
|
||||||
async getData() {
|
console.log(resData);
|
||||||
let resData = await getCertificateInformationList({
|
// this.trainList = [{
|
||||||
showCount: this.pageSize,
|
// classId: 'f34dzfgerg',
|
||||||
currentPage: this.currentPage,
|
// className: '班级名称1',
|
||||||
});
|
// unit: '所属单位1所属单位1所属单位1所属单位1所属单位1',
|
||||||
this.trainList = [
|
// trainStartTime: '2025-02-14 09: 40',
|
||||||
{
|
// trainEndTime: '2025-02-14 18: 00',
|
||||||
classId: 'f34dzfgerg',
|
// taskStatus: 0 // 未开始
|
||||||
className: '班级名称1',
|
// },
|
||||||
unit: '所属单位1所属单位1所属单位1所属单位1所属单位1',
|
// {
|
||||||
trainStartTime: '2025-02-14 09: 40',
|
// classId: 'f34dzfger6',
|
||||||
trainEndTime: '2025-02-14 18: 00',
|
// className: '班级名称2',
|
||||||
taskStatus: 0 // 未开始
|
// unit: '所属单位2',
|
||||||
},
|
// trainStartTime: '2025-02-12 09: 40',
|
||||||
{
|
// trainEndTime: '2025-02-12 18: 00',
|
||||||
classId: 'f34dzfger6',
|
// taskStatus: 1 // 进行中
|
||||||
className: '班级名称2',
|
// }
|
||||||
unit: '所属单位2',
|
// ]
|
||||||
trainStartTime: '2025-02-12 09: 40',
|
// this.totalPage = 2
|
||||||
trainEndTime: '2025-02-12 18: 00',
|
},
|
||||||
taskStatus: 1 // 进行中
|
resetList() {
|
||||||
}
|
this.pageSize = 10
|
||||||
]
|
this.currentPage = 1
|
||||||
this.totalPage = 2
|
this.trainList = []
|
||||||
},
|
this.getData()
|
||||||
resetList() {
|
},
|
||||||
this.pageSize = 10
|
scrolltolower() {
|
||||||
this.currentPage = 1
|
this.currentPage++
|
||||||
this.trainList = []
|
if (this.totalPage >= this.currentPage) this.getData()
|
||||||
this.getData()
|
},
|
||||||
},
|
/**
|
||||||
scrolltolower() {
|
* 右上角自定义扫码图标触发事件
|
||||||
this.currentPage++
|
*/
|
||||||
if (this.totalPage >= this.currentPage) this.getData()
|
onNavigationBarButtonTap(e) {
|
||||||
},
|
// 只允许通过手机相机扫码
|
||||||
/**
|
uni.scanCode({
|
||||||
* 右上角自定义扫码图标触发事件
|
// scanType: ['qrCode'], // 仅支持二维码扫码
|
||||||
*/
|
onlyFromCamera: false, // 是否只能从相机扫码,不允许从相册选择图片
|
||||||
onNavigationBarButtonTap(e) {
|
hideAlbum: false, // 隐藏相册,不允许从相册选择图片,只能从相机扫码
|
||||||
// 只允许通过手机相机扫码
|
success: function(res) {
|
||||||
uni.scanCode({
|
if (res.result === '0') {
|
||||||
// scanType: ['qrCode'], // 仅支持二维码扫码
|
// 签到二维码方式进入
|
||||||
onlyFromCamera: false, // 是否只能从相机扫码,不允许从相册选择图片
|
uni.$u.route({
|
||||||
hideAlbum: false, // 隐藏相册,不允许从相册选择图片,只能从相机扫码
|
url: '/pages/train_management/realname_info_auth',
|
||||||
success: function (res) {
|
params: {
|
||||||
const { id, type } = JSON.parse(res.result); // id 字段为班级ID, type 字段为二维码进入方式类型 ['0' --> 签到方式进入, '1' --> 考试方式进入]
|
type: 'scan_face',
|
||||||
if (type === '0') {
|
}
|
||||||
// 签到二维码方式进入
|
})
|
||||||
uni.$u.route({
|
} else if (res.result === '1') {
|
||||||
url: '/pages/train_management/realname_info_auth',
|
// 考试二维码方式进入
|
||||||
params: {
|
uni.$u.route({
|
||||||
type: 'scan_face',
|
url: '/pages/train_management/face_authentication',
|
||||||
id
|
params: {
|
||||||
}
|
type: 'learning_certification'
|
||||||
})
|
}
|
||||||
} else if (type === '1') {
|
})
|
||||||
// 考试二维码方式进入
|
}
|
||||||
uni.$u.route({
|
},
|
||||||
url: '/pages/train_management/face_authentication',
|
fail: function(error) {
|
||||||
params: {
|
console.log("error :>> ", error)
|
||||||
type: 'learning_certification',
|
},
|
||||||
id
|
complete: function(result) {
|
||||||
}
|
console.log("扫码完成,正在跳转功能页!")
|
||||||
})
|
}
|
||||||
}
|
});
|
||||||
},
|
},
|
||||||
fail: function (error) {
|
handleCalcTaskStatus(type) {
|
||||||
console.log("error :>> ", error)
|
return this.taskStatusMap[type]
|
||||||
},
|
},
|
||||||
complete: function (result) {
|
/**
|
||||||
console.log("扫码完成,正在跳转功能页!")
|
* 签到信息
|
||||||
}
|
*/
|
||||||
});
|
signInInformation(classId) {
|
||||||
},
|
uni.$u.route({
|
||||||
handleCalcTaskStatus(type) {
|
url: '/pages/train_management/sign_information',
|
||||||
return this.taskStatusMap[type]
|
params: {
|
||||||
},
|
classId
|
||||||
/**
|
}
|
||||||
* 签到信息
|
})
|
||||||
*/
|
},
|
||||||
signInInformation(classId) {
|
/**
|
||||||
uni.$u.route({
|
* 考试记录
|
||||||
url: '/pages/train_management/sign_information',
|
*/
|
||||||
params: {
|
ExamRecord(classId) {
|
||||||
classId
|
uni.$u.route({
|
||||||
}
|
url: '/pages/train_management/exam_record',
|
||||||
})
|
params: {
|
||||||
},
|
classId
|
||||||
/**
|
}
|
||||||
* 考试记录
|
})
|
||||||
*/
|
}
|
||||||
ExamRecord(classId) {
|
}
|
||||||
uni.$u.route({
|
}
|
||||||
url: '/pages/train_management/exam_record',
|
|
||||||
params: {
|
|
||||||
classId
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.container_item {
|
.container_item {
|
||||||
padding-left: 16rpx;
|
padding-left: 16rpx;
|
||||||
|
|
||||||
.container_item_name {
|
.container_item_name {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container_item_content {
|
.container_item_content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 8rpx;
|
gap: 8rpx;
|
||||||
|
|
||||||
.content_text {
|
.content_text {
|
||||||
color: #acafb3;
|
color: #acafb3;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
|
||||||
.content_label {
|
.content_label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 220rpx;
|
width: 220rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content_value {
|
.content_value {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
transform: translateY(8rpx);
|
transform: translateY(8rpx);
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 452rpx;
|
width: 452rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content_bottom {
|
.content_bottom {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-row {
|
.action-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 16rpx;
|
gap: 16rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue