Merge remote-tracking branch 'origin/hyx_2025-01-13_xgf2.0' into hyx_2025-01-13_xgf2.0
commit
28a6a65387
|
@ -435,8 +435,7 @@ export default {
|
|||
}, 2000)
|
||||
}).catch((e) => {
|
||||
console.info(e)
|
||||
// uni.$u.toast('请补全必填项')
|
||||
uni.$u.toast(e)
|
||||
uni.$u.toast('请补全必填项')
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
|
@ -26,16 +26,9 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-modal
|
||||
:show="updateVersion.modalShow"
|
||||
title="温馨提示"
|
||||
:showConfirmButton="updateVersion.showConfirmButton"
|
||||
:showCancelButton="updateVersion.showCancelButton"
|
||||
:confirmText="updateVersion.confirmText"
|
||||
:cancelText="updateVersion.cancelText"
|
||||
@cancel="modalCancel"
|
||||
@confirm="modalConfirm"
|
||||
>
|
||||
<u-modal :show="updateVersion.modalShow" title="温馨提示" :showConfirmButton="updateVersion.showConfirmButton"
|
||||
:showCancelButton="updateVersion.showCancelButton" :confirmText="updateVersion.confirmText"
|
||||
:cancelText="updateVersion.cancelText" @cancel="modalCancel" @confirm="modalConfirm">
|
||||
<view style="text-align: center; color: #606266">
|
||||
<rich-text :nodes="updateVersion.modalContent"></rich-text>
|
||||
</view>
|
||||
|
@ -45,17 +38,24 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import updateVersion from '../../utils/updateVersion'
|
||||
import {setEntry, getIsUploadFace, getClassInfoByParams, getClassList} from '../../api'
|
||||
import { getStudentInfoApi, setEntryV1} from "../../api/api";
|
||||
import store from "../../store";
|
||||
import updateVersion from '../../utils/updateVersion'
|
||||
import {
|
||||
setEntry,
|
||||
getIsUploadFace,
|
||||
getClassInfoByParams,
|
||||
getClassList
|
||||
} from '../../api'
|
||||
import {
|
||||
getStudentInfoApi,
|
||||
setEntryV1
|
||||
} from "../../api/api";
|
||||
import store from "../../store";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
mixins: [updateVersion],
|
||||
data() {
|
||||
return {
|
||||
baseList: [
|
||||
{
|
||||
baseList: [{
|
||||
img: require('../../static/icon-apps/app_icons.png'),
|
||||
title: '电子工牌',
|
||||
url: '/pages/electronic_work_card/index'
|
||||
|
@ -90,7 +90,8 @@ export default {
|
|||
title: '培训管理',
|
||||
url: '/pages/train_management/index'
|
||||
}
|
||||
]
|
||||
],
|
||||
classInfo: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -123,19 +124,30 @@ export default {
|
|||
})
|
||||
},
|
||||
async fnScan() {
|
||||
this.classInfo = null; // 清空 classInfo
|
||||
uni.scanCode({
|
||||
success: async (res) => {
|
||||
// let obj = JSON.parse(res.result)
|
||||
// let type = obj[0].CODE_TYPE
|
||||
const { classId, type, RELEVANT_UNIT_NAME } = JSON.parse(res.result)
|
||||
const classInfo = await this.handleGetClassInfoByParams(classId);
|
||||
const resData = await getStudentInfoApi({classId:classInfo.classId})
|
||||
const {
|
||||
classId,
|
||||
stageexampaperinputId,
|
||||
type,
|
||||
CORPINFO_ID,
|
||||
RELEVANT_UNIT_NAME
|
||||
} = JSON.parse(res.result);
|
||||
if (type !== '0') {
|
||||
this.classInfo = await this.handleGetClassInfoByParams(classId);
|
||||
const resData = await getStudentInfoApi({
|
||||
classId: this.classInfo.classId
|
||||
})
|
||||
await this.$store.dispatch('setStudentInfo', resData.studentInfo)
|
||||
switch(type) {
|
||||
}
|
||||
switch (type) {
|
||||
case "0": {
|
||||
let info = await setEntryV1({
|
||||
userId: this.userInfo.USER_ID,
|
||||
// corpinfoId: obj[0].CORPINFO_ID,
|
||||
corpinfoId: CORPINFO_ID,
|
||||
RELEVANT_UNIT_NAME: RELEVANT_UNIT_NAME,
|
||||
postMethod: 'application/json'
|
||||
})
|
||||
|
@ -145,7 +157,7 @@ export default {
|
|||
uni.$u.toast('入职失败,请联系管理员')
|
||||
}
|
||||
break;
|
||||
};
|
||||
}
|
||||
// case "1": {
|
||||
// // type=1时跳转电子工牌页面
|
||||
// uni.$u.route({
|
||||
|
@ -163,7 +175,7 @@ export default {
|
|||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '检测到您还未完成人脸信息读取,请先完成人脸信息认证!',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/face_authentication',
|
||||
|
@ -173,12 +185,19 @@ export default {
|
|||
})
|
||||
}
|
||||
if (res.cancel) {
|
||||
uni.navigateBack({ delta: 1 })
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
if (classInfo) {
|
||||
if (store.getters.getVerification === '1') {
|
||||
if (this.classInfo) {
|
||||
if (this.classInfo.studystate === "3") {
|
||||
uni.$u.toast("您已经入班签到,无需再次签到!")
|
||||
return;
|
||||
}
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/realname_info_auth',
|
||||
params: {
|
||||
|
@ -189,11 +208,15 @@ export default {
|
|||
} else {
|
||||
uni.$u.toast('您未在培训计划内,无法入班签到,请联系教师')
|
||||
}
|
||||
} else {
|
||||
uni.$u.toast('您还未完成人脸信息读取,请先完成人脸信息认证!')
|
||||
}
|
||||
break;
|
||||
};
|
||||
}
|
||||
case "3": {
|
||||
// 考试二维码方式进入 [type: 3 --> 考试二维码方式进入]
|
||||
if (classInfo) {
|
||||
if (store.getters.getVerification === '1') {
|
||||
if (this.classInfo) {
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/face_authentication',
|
||||
params: {
|
||||
|
@ -202,14 +225,18 @@ export default {
|
|||
classId,
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
uni.$u.toast('您未在培训计划内,无法进行考试,请联系教师')
|
||||
}
|
||||
} else {
|
||||
uni.$u.toast('您还未完成人脸信息读取,请先完成人脸信息认证!')
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -230,13 +257,14 @@ export default {
|
|||
const userFaceData = await getIsUploadFace()
|
||||
// userFaceData.authentication --> 0: 未完成人脸认证
|
||||
// userFaceData.authentication --> 1: 已完成人脸认证
|
||||
this.$store.dispatch('setVerification', userFaceData.authentication ? userFaceData.authentication : "0"); // 设置本地存储人脸检测验证状态
|
||||
this.$store.dispatch('setVerification', userFaceData.authentication ? userFaceData.authentication :
|
||||
"0"); // 设置本地存储人脸检测验证状态
|
||||
const isPassedVerification = userFaceData.authentication === '0'
|
||||
if (isPassedVerification) {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '为了能够得到更好的体验,我们会获取您个人信息,请完成人脸信息认证!',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/face_authentication',
|
||||
|
@ -253,12 +281,12 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
.page {
|
||||
background-color: #f7f9ff;
|
||||
min-height: 100vh;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
}, 1000)
|
||||
},
|
||||
onLoad(query) {
|
||||
console.log('query: >> ', query)
|
||||
// facial_input 人脸认证 isFirst 1 第一次登录添加人脸
|
||||
// scan_face 扫码
|
||||
// update_facial_input 更新人脸
|
||||
|
@ -61,25 +62,18 @@
|
|||
// this.showButton = query.showButton || "yes";
|
||||
this.routeQueryparams = query ?? {}
|
||||
},
|
||||
onBackPress(event) {
|
||||
// if (event.from === 'backbutton') {
|
||||
// if ((this.type === 'scan_face' && this.isFirst === '1') || this.type === 'learning_certification' || this.type === 'facial_input') {
|
||||
// uni.$u.toast('请完成人脸验证')
|
||||
// return true
|
||||
// }
|
||||
// }
|
||||
if (this.type === 'facial_input') {
|
||||
uni.$u.route({
|
||||
type: 'redirect',
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}
|
||||
return false
|
||||
},
|
||||
// onBackPress(event) {
|
||||
// return false
|
||||
// },
|
||||
onUnload() {
|
||||
this.startPreviewTimer && clearInterval(this.startPreviewTimer)
|
||||
},
|
||||
methods: {
|
||||
handleBack() {
|
||||
uni.navigateBack({
|
||||
delta: 2,
|
||||
})
|
||||
},
|
||||
snapshot() {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<view> <text class="content_label">任务状态: </text>{{ handleCalcTaskStatus(item.state) }} </view>
|
||||
<view class="action-row">
|
||||
<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)" />
|
||||
<u-button v-if="item.examination === '1'" size="mini" type="primary" text="考试记录" :disabled="item.stageexamstate === '1' || item.stageexamstate === '4'" @click="ExamRecord(item)" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -46,7 +46,7 @@
|
|||
|
||||
<script>
|
||||
import store from '@/store/index'
|
||||
import {getClassInfoByParams, getClassList} from "../../api";
|
||||
import {getClassInfoByParams, getClassList, getExamExercises} from "../../api";
|
||||
import {getStudentInfoApi} from "../../api/api";
|
||||
|
||||
export default {
|
||||
|
@ -127,6 +127,10 @@ export default {
|
|||
if (type === '2') {
|
||||
// 签到二维码方式进入, [type: 2 --> 签到二维码方式进入]
|
||||
if (classInfo) {
|
||||
if (classInfo.studystate === "3") {
|
||||
uni.$u.toast("您已经入班签到,无需再次签到!")
|
||||
return;
|
||||
}
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/realname_info_auth',
|
||||
params: {
|
||||
|
@ -140,6 +144,19 @@ export default {
|
|||
} else if (type === '3') {
|
||||
// 考试二维码方式进入 [type: 3 --> 考试二维码方式进入]
|
||||
if (classInfo) {
|
||||
console.log('classInfo :>> ', classInfo);
|
||||
if (classInfo.stageexamstate === "3") {
|
||||
uni.$u.toast("您已经考试通过,无需再次考试!")
|
||||
return;
|
||||
}
|
||||
const resData = await getExamExercises({
|
||||
stageexampaperinputId,
|
||||
classId,
|
||||
})
|
||||
if (resData.numberofexams <= 0) {
|
||||
uni.$u.toast("您的考试次数已用尽,无法再次考试!")
|
||||
return;
|
||||
}
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/face_authentication',
|
||||
params: {
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getSignInfo } from '@/api'
|
||||
|
||||
import {getSignInfo} from "../../api";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
@ -93,6 +94,7 @@ export default {
|
|||
classId
|
||||
});
|
||||
this.signInfo = resData.page.list[0]
|
||||
console.log(this.signInfo);
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue