Merge branch 'xgf-training-dev' of http://47.92.113.182:3000/guoyuepeng/qa-prevention-xgf-app into xgf-training-dev
commit
96303795ec
13
api/index.js
13
api/index.js
|
@ -72,14 +72,7 @@ export const getHistoricalApprovalRecords = (params) => post("/app/Task/getHis",
|
|||
// ****************************************************
|
||||
// ************* 以下接口培训管理流程使用 ***************
|
||||
// ********************* start ***********************
|
||||
|
||||
/**
|
||||
* 获取班级管理分页列表
|
||||
*/
|
||||
export const getClassList = (params) => post("/app/stagestudentrelation/pageTaskByUser", params);
|
||||
|
||||
/**
|
||||
* 获取是否上传人脸信息
|
||||
*/
|
||||
export const getIsUploadFace = (params) => post("/app/user/getUserFace", params);
|
||||
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); //实名认证信息提交
|
||||
// ********************* end ***********************
|
||||
|
|
|
@ -11,27 +11,27 @@
|
|||
<view class="content_text">
|
||||
<view>
|
||||
<text class="content_label">所属单位: </text>
|
||||
<text class="content_value">{{ item.unit }}</text>
|
||||
<text class="content_value">{{ item.corpinfoName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_text">
|
||||
<view>
|
||||
<text class="content_label">培训开始时间: </text>
|
||||
<text class="content_value">{{ item.trainStartTime }}</text>
|
||||
<text class="content_value">{{ item.startTime }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_text">
|
||||
<view>
|
||||
<text class="content_label">培训结束时间: </text>
|
||||
<text class="content_value">{{ item.trainEndTime }}</text>
|
||||
<text class="content_value">{{ item.endTime }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_text">
|
||||
<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">
|
||||
<u-button size="mini" type="primary" text="签到信息" @click="signInInformation(item.classId)" />
|
||||
<u-button size="mini" type="primary" text="考试记录" @click="ExamRecord(item.classId)" />
|
||||
<u-button size="mini" type="primary" text="签到信息" :disabled="item.userSignPath === '0'" @click="signInInformation(item.classId)" />
|
||||
<u-button size="mini" type="primary" text="考试记录" :disabled="item.stageexamstate === '1' || item.stageexamstate === '4'" @click="ExamRecord(item.classId)" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -45,7 +45,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getClassList, getIsUploadFace } from '../../api'
|
||||
import { getClassList } from '../../api'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
@ -55,22 +55,24 @@ export default {
|
|||
totalPage: 0,
|
||||
trainList: [],
|
||||
taskStatusMap: {
|
||||
0: '未开始',
|
||||
1: '进行中'
|
||||
1: '待完善',
|
||||
4: '待开班',
|
||||
5: '培训中',
|
||||
6: '培训结束'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
async onLoad(query) {
|
||||
console.log('页面加载完成 :>> ', query)
|
||||
// await this.getUserFaceCompleted()
|
||||
},
|
||||
|
||||
/* 监听页面显示,页面每次出现在屏幕上都触发,包括从下级页面点返回露出当前页面 */
|
||||
onShow() {
|
||||
this.resetList()
|
||||
},
|
||||
|
||||
async onLoad(query) {
|
||||
console.log('页面加载完成 :>> ', query)
|
||||
// await this.getUserFaceCompleted()
|
||||
},
|
||||
|
||||
methods: {
|
||||
async getData() {
|
||||
let resData = await getClassList({
|
||||
|
@ -90,31 +92,6 @@ export default {
|
|||
this.currentPage++
|
||||
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) {
|
||||
return this.taskStatusMap[type]
|
||||
},
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
<u-form-item labelWidth="70" label="姓名" prop="userInfo.name" borderBottom required>
|
||||
<u--input v-model="ruleFormData.userInfo.name" placeholder="请输入姓名..." border="none"></u--input>
|
||||
</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="请输入联系电话..."
|
||||
border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="70" label="身份证号" prop="userInfo.idCard" borderBottom required>
|
||||
<u--input v-model="ruleFormData.userInfo.idCard" placeholder="请输入身份证号..." border="none"></u--input>
|
||||
<u-form-item labelWidth="80" label="身份证号" prop="userInfo.userIdCard" borderBottom required>
|
||||
<u--input v-model="ruleFormData.userInfo.userIdCard" placeholder="请输入身份证号..." border="none"></u--input>
|
||||
</u-form-item>
|
||||
<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"
|
||||
|
@ -23,12 +23,12 @@
|
|||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="70" label="学历" prop="userInfo.education" borderBottom required
|
||||
@click="handleEducationClick">
|
||||
<u--input v-model="ruleFormData.userInfo.education" readonly placeholder="请选择学历..." border="none"></u--input>
|
||||
<u-action-sheet :show="showEducationPopper" :actions="educationActions" title="请选择学历"
|
||||
<u-form-item labelWidth="70" label="学历" prop="userInfo.degreeOfEducation" borderBottom required
|
||||
@click="handleEducationClick">
|
||||
<u--input v-model="ruleFormData.userInfo.degreeOfEducation" readonly placeholder="请选择学历..." border="none"></u--input>
|
||||
<!-- <u-action-sheet :show="showEducationPopper" :actions="educationActions" title="请选择学历"
|
||||
@close="showEducationPopper = false" @select="handleSelectEducation">
|
||||
</u-action-sheet>
|
||||
</u-action-sheet> -->
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="70" label="职业" prop="userInfo.job" borderBottom required>
|
||||
<u--input v-model="ruleFormData.userInfo.job" placeholder="请输入职业..." border="none"></u--input>
|
||||
|
@ -67,10 +67,14 @@
|
|||
'--picker-header-radius': '24rpx 24rpx 0 0',
|
||||
'--picker-confirm-radius': '12rpx'
|
||||
}" @confirm="handleCertificateGetTimeConfirm" @cancel="handleCertificateGetTimeCancel"></u-datetime-picker>
|
||||
|
||||
<u-picker ref="uPicker" :show="singleChoice" :columns="singleChoiceColumns" keyName="NAME"
|
||||
@confirm="fnSingleChoiceConfirm" @cancel="fnSingleChoiceCancel"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDataDictionary, joinClass } from '../../api'
|
||||
import Sign from '@/components/sign/sign.vue'
|
||||
import { validateFieldPhone, validateFieldIdCard } from '@/utils/formValidateField.js'
|
||||
|
||||
|
@ -88,7 +92,7 @@ export default {
|
|||
name: '女'
|
||||
}
|
||||
],
|
||||
showEducationPopper: false,
|
||||
singleChoice: false,
|
||||
showCertificateGetTimePopper: false,
|
||||
signVisible: false,
|
||||
educationActions: [
|
||||
|
@ -125,13 +129,14 @@ export default {
|
|||
name: '其他',
|
||||
}
|
||||
],
|
||||
singleChoiceColumns: [],
|
||||
ruleFormData: {
|
||||
userInfo: {
|
||||
name: '', // 姓名
|
||||
phone: '', // 联系电话
|
||||
idCard: '', // 身份证号
|
||||
userIdCard: '', // 身份证号
|
||||
sex: '男', // 性别
|
||||
education: '', // 学历
|
||||
degreeOfEducation: '', // 学历
|
||||
job: '', // 职业
|
||||
gradeCertificate: [], // 等级证书
|
||||
certificateAcquisitionTime: '', // 获取证书时间
|
||||
|
@ -156,7 +161,7 @@ export default {
|
|||
trigger: ['change', 'blur'],
|
||||
}
|
||||
],
|
||||
'userInfo.idCard': [
|
||||
'userInfo.userIdCard': [
|
||||
{
|
||||
type: 'string',
|
||||
required: true,
|
||||
|
@ -174,7 +179,7 @@ export default {
|
|||
message: '请选择性别',
|
||||
trigger: ['change']
|
||||
},
|
||||
'userInfo.education': {
|
||||
'userInfo.degreeOfEducation': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请选择学历',
|
||||
|
@ -224,10 +229,24 @@ export default {
|
|||
console.log('radioChange', n);
|
||||
},
|
||||
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) {
|
||||
this.ruleFormData.userInfo.education = event.name;
|
||||
this.ruleFormData.userInfo.degreeOfEducation = event.name;
|
||||
},
|
||||
async afterRead(event) {
|
||||
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
||||
|
@ -278,14 +297,11 @@ export default {
|
|||
try {
|
||||
console.log("this.ruleFormData.userInfo : >>", this.ruleFormData.userInfo);
|
||||
|
||||
// await setSubmitForm({
|
||||
// form: this.form,
|
||||
// formItems: this.formItems,
|
||||
// TYPE: this.type,
|
||||
// CORP_ID: this.form.CORP_ID,
|
||||
// EW_RU_TASK_ID: this.taskId
|
||||
// })
|
||||
// pages/train_management/face_authentication
|
||||
await joinClass({
|
||||
form: this.form,
|
||||
calssId: this.routeQuery.calssId,
|
||||
})
|
||||
uni.$u.toast('保存成功')
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/face_authentication',
|
||||
params: { ...this.routeQuery }
|
||||
|
|
Loading…
Reference in New Issue