Merge branch 'xgf-training-dev' of http://47.92.113.182:3000/guoyuepeng/qa-prevention-xgf-app into xgf-training-dev

xgf-training-dev
mengfanliang 2025-02-18 17:01:44 +08:00
commit 96303795ec
3 changed files with 83 additions and 72 deletions

View File

@ -72,14 +72,7 @@ export const getHistoricalApprovalRecords = (params) => post("/app/Task/getHis",
// **************************************************** // ****************************************************
// ************* 以下接口培训管理流程使用 *************** // ************* 以下接口培训管理流程使用 ***************
// ********************* start *********************** // ********************* start ***********************
export const getIsUploadFace = (params) => post("/app/user/getUserFace", params); // 获取是否上传人脸信息
/** export const getClassList = (params) => post("/app/stagestudentrelation/pageTaskByUser", params); //获取班级列表
* 获取班级管理分页列表 export const joinClass = (params) => post("/app/student/joinClass", params); //实名认证信息提交
*/
export const getClassList = (params) => post("/app/stagestudentrelation/pageTaskByUser", params);
/**
* 获取是否上传人脸信息
*/
export const getIsUploadFace = (params) => post("/app/user/getUserFace", params);
// ********************* end *********************** // ********************* end ***********************

View File

@ -11,27 +11,27 @@
<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.corpinfoName }}</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.startTime }}</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.endTime }}</text>
</view> </view>
</view> </view>
<view class="content_text"> <view class="content_text">
<view class="content_bottom"> <view class="content_bottom">
<view> <text class="content_label">任务状态: </text>{{ handleCalcTaskStatus(item.taskStatus) }} </view> <view> <text class="content_label">任务状态: </text>{{ handleCalcTaskStatus(item.state) }} </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="签到信息" :disabled="item.userSignPath === '0'" @click="signInInformation(item.classId)" />
<u-button size="mini" type="primary" text="考试记录" @click="ExamRecord(item.classId)" /> <u-button size="mini" type="primary" text="考试记录" :disabled="item.stageexamstate === '1' || item.stageexamstate === '4'" @click="ExamRecord(item.classId)" />
</view> </view>
</view> </view>
</view> </view>
@ -45,7 +45,7 @@
</template> </template>
<script> <script>
import { getClassList, getIsUploadFace } from '../../api' import { getClassList } from '../../api'
export default { export default {
data() { data() {
@ -55,22 +55,24 @@ export default {
totalPage: 0, totalPage: 0,
trainList: [], trainList: [],
taskStatusMap: { taskStatusMap: {
0: '未开始', 1: '待完善',
1: '进行中' 4: '待开班',
5: '培训中',
6: '培训结束'
} }
} }
}, },
async onLoad(query) {
console.log('页面加载完成 :>> ', query)
// await this.getUserFaceCompleted()
},
/* 监听页面显示,页面每次出现在屏幕上都触发,包括从下级页面点返回露出当前页面 */ /* 监听页面显示,页面每次出现在屏幕上都触发,包括从下级页面点返回露出当前页面 */
onShow() { onShow() {
this.resetList() this.resetList()
}, },
async onLoad(query) {
console.log('页面加载完成 :>> ', query)
// await this.getUserFaceCompleted()
},
methods: { methods: {
async getData() { async getData() {
let resData = await getClassList({ let resData = await getClassList({
@ -90,31 +92,6 @@ export default {
this.currentPage++ this.currentPage++
if (this.totalPage >= this.currentPage) this.getData() if (this.totalPage >= this.currentPage) this.getData()
}, },
/**
* 获取是否已经完成上传人脸信息
*/
// async getUserFaceCompleted() {
// const userFaceData = await getIsUploadFace()
// console.log('userFaceData :>> ', userFaceData)
// if (!userFaceData?.data) {
// uni.showModal({
// title: '',
// content: '!',
// success: function (res) {
// if (res.confirm) {
// uni.$u.route({
// url: '/pages/train_management/face_authentication',
// params: {
// type: 'facial_input'
// }
// })
// } else if (res.cancel) {
// uni.navigateBack({ delta: 1 });
// }
// }
// })
// }
// },
/** /**
* 右上角自定义扫码图标触发事件 * 右上角自定义扫码图标触发事件
*/ */
@ -151,6 +128,31 @@ export default {
} }
}) })
}, },
/**
* 获取是否已经完成上传人脸信息
*/
// async getUserFaceCompleted() {
// const userFaceData = await getIsUploadFace()
// console.log('userFaceData :>> ', userFaceData)
// if (!userFaceData?.data) {
// uni.showModal({
// title: '',
// content: '!',
// success: function (res) {
// if (res.confirm) {
// uni.$u.route({
// url: '/pages/train_management/face_authentication',
// params: {
// type: 'facial_input'
// }
// })
// } else if (res.cancel) {
// uni.navigateBack({ delta: 1 });
// }
// }
// })
// }
// },
handleCalcTaskStatus(type) { handleCalcTaskStatus(type) {
return this.taskStatusMap[type] return this.taskStatusMap[type]
}, },

View File

@ -9,12 +9,12 @@
<u-form-item labelWidth="70" label="姓名" prop="userInfo.name" borderBottom required> <u-form-item labelWidth="70" label="姓名" prop="userInfo.name" borderBottom required>
<u--input v-model="ruleFormData.userInfo.name" placeholder="请输入姓名..." border="none"></u--input> <u--input v-model="ruleFormData.userInfo.name" placeholder="请输入姓名..." border="none"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="70" label="联系电话" prop="userInfo.phone" borderBottom required> <u-form-item labelWidth="80" label="联系电话" prop="userInfo.phone" borderBottom required>
<u--input v-model="ruleFormData.userInfo.phone" type="number" placeholder="请输入联系电话..." <u--input v-model="ruleFormData.userInfo.phone" type="number" placeholder="请输入联系电话..."
border="none"></u--input> border="none"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="70" label="身份证号" prop="userInfo.idCard" borderBottom required> <u-form-item labelWidth="80" label="身份证号" prop="userInfo.userIdCard" borderBottom required>
<u--input v-model="ruleFormData.userInfo.idCard" placeholder="请输入身份证号..." border="none"></u--input> <u--input v-model="ruleFormData.userInfo.userIdCard" placeholder="请输入身份证号..." border="none"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="70" label="性别" prop="userInfo.sex" borderBottom required> <u-form-item labelWidth="70" label="性别" prop="userInfo.sex" borderBottom required>
<u-radio-group v-model="ruleFormData.userInfo.sex" placement="row" class="radio-group__style" <u-radio-group v-model="ruleFormData.userInfo.sex" placement="row" class="radio-group__style"
@ -23,12 +23,12 @@
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="70" label="学历" prop="userInfo.education" borderBottom required <u-form-item labelWidth="70" label="学历" prop="userInfo.degreeOfEducation" borderBottom required
@click="handleEducationClick"> @click="handleEducationClick">
<u--input v-model="ruleFormData.userInfo.education" readonly placeholder="请选择学历..." border="none"></u--input> <u--input v-model="ruleFormData.userInfo.degreeOfEducation" readonly placeholder="请选择学历..." border="none"></u--input>
<u-action-sheet :show="showEducationPopper" :actions="educationActions" title="请选择学历" <!-- <u-action-sheet :show="showEducationPopper" :actions="educationActions" title="请选择学历"
@close="showEducationPopper = false" @select="handleSelectEducation"> @close="showEducationPopper = false" @select="handleSelectEducation">
</u-action-sheet> </u-action-sheet> -->
</u-form-item> </u-form-item>
<u-form-item labelWidth="70" label="职业" prop="userInfo.job" borderBottom required> <u-form-item labelWidth="70" label="职业" prop="userInfo.job" borderBottom required>
<u--input v-model="ruleFormData.userInfo.job" placeholder="请输入职业..." border="none"></u--input> <u--input v-model="ruleFormData.userInfo.job" placeholder="请输入职业..." border="none"></u--input>
@ -67,10 +67,14 @@
'--picker-header-radius': '24rpx 24rpx 0 0', '--picker-header-radius': '24rpx 24rpx 0 0',
'--picker-confirm-radius': '12rpx' '--picker-confirm-radius': '12rpx'
}" @confirm="handleCertificateGetTimeConfirm" @cancel="handleCertificateGetTimeCancel"></u-datetime-picker> }" @confirm="handleCertificateGetTimeConfirm" @cancel="handleCertificateGetTimeCancel"></u-datetime-picker>
<u-picker ref="uPicker" :show="singleChoice" :columns="singleChoiceColumns" keyName="NAME"
@confirm="fnSingleChoiceConfirm" @cancel="fnSingleChoiceCancel"></u-picker>
</view> </view>
</template> </template>
<script> <script>
import { getDataDictionary, joinClass } from '../../api'
import Sign from '@/components/sign/sign.vue' import Sign from '@/components/sign/sign.vue'
import { validateFieldPhone, validateFieldIdCard } from '@/utils/formValidateField.js' import { validateFieldPhone, validateFieldIdCard } from '@/utils/formValidateField.js'
@ -88,7 +92,7 @@ export default {
name: '女' name: '女'
} }
], ],
showEducationPopper: false, singleChoice: false,
showCertificateGetTimePopper: false, showCertificateGetTimePopper: false,
signVisible: false, signVisible: false,
educationActions: [ educationActions: [
@ -125,13 +129,14 @@ export default {
name: '其他', name: '其他',
} }
], ],
singleChoiceColumns: [],
ruleFormData: { ruleFormData: {
userInfo: { userInfo: {
name: '', // name: '', //
phone: '', // phone: '', //
idCard: '', // userIdCard: '', //
sex: '男', // sex: '男', //
education: '', // degreeOfEducation: '', //
job: '', // job: '', //
gradeCertificate: [], // gradeCertificate: [], //
certificateAcquisitionTime: '', // certificateAcquisitionTime: '', //
@ -156,7 +161,7 @@ export default {
trigger: ['change', 'blur'], trigger: ['change', 'blur'],
} }
], ],
'userInfo.idCard': [ 'userInfo.userIdCard': [
{ {
type: 'string', type: 'string',
required: true, required: true,
@ -174,7 +179,7 @@ export default {
message: '请选择性别', message: '请选择性别',
trigger: ['change'] trigger: ['change']
}, },
'userInfo.education': { 'userInfo.degreeOfEducation': {
type: 'string', type: 'string',
required: true, required: true,
message: '请选择学历', message: '请选择学历',
@ -224,10 +229,24 @@ export default {
console.log('radioChange', n); console.log('radioChange', n);
}, },
handleEducationClick() { handleEducationClick() {
this.showEducationPopper = true; this.$refs.uPicker.setIndexs([0])
this.fnGetDataDictionary('d7d80f08d73a4accbccf4fd3d8d1d867')
this.singleChoice = true
}, },
fnSingleChoiceConfirm(event) {
console.log(event, "sdfasdgf")
this.$set(this.ruleFormData.userInfo, 'degreeOfEducation', event.value[0].NAME)
this.$set(this.ruleFormData.userInfo, 'degreeOfEducation' + '_BIANMA', event.value[0].BIANMA)
this.singleChoice = false
},
async fnGetDataDictionary(DICTIONARIES_ID) {
let resData = await getDataDictionary({
DICTIONARIES_ID
})
this.singleChoiceColumns = [resData.list]
},
handleSelectEducation(event) { handleSelectEducation(event) {
this.ruleFormData.userInfo.education = event.name; this.ruleFormData.userInfo.degreeOfEducation = event.name;
}, },
async afterRead(event) { async afterRead(event) {
// multiple true , file // multiple true , file
@ -278,14 +297,11 @@ export default {
try { try {
console.log("this.ruleFormData.userInfo : >>", this.ruleFormData.userInfo); console.log("this.ruleFormData.userInfo : >>", this.ruleFormData.userInfo);
// await setSubmitForm({ await joinClass({
// form: this.form, form: this.form,
// formItems: this.formItems, calssId: this.routeQuery.calssId,
// TYPE: this.type, })
// CORP_ID: this.form.CORP_ID, uni.$u.toast('保存成功')
// EW_RU_TASK_ID: this.taskId
// })
// pages/train_management/face_authentication
uni.$u.route({ uni.$u.route({
url: '/pages/train_management/face_authentication', url: '/pages/train_management/face_authentication',
params: { ...this.routeQuery } params: { ...this.routeQuery }