| | |
| | | > |
| | | <div class="p-7 pt-0" style="display: flex; flex-direction: column; align-items: center;"> |
| | | <div class="image_box" v-if="['unStart', 'auditing'].includes(status)"> |
| | | <el-image :src="base64"></el-image> |
| | | <el-image :src="base64" style="width: 100%;" fit="cover"></el-image> |
| | | <div v-if="status=='auditing'" class="scan-line"></div> |
| | | </div> |
| | | <el-row justify="center" v-else-if="['success', 'fail'].includes(status)"> |
| | |
| | | data() { |
| | | return { |
| | | dialogFlag: false, |
| | | status: '' |
| | | status: '', |
| | | url: '' |
| | | } |
| | | }, |
| | | props: { |
| | |
| | | methods: { |
| | | async submitAudit() { |
| | | this.status = 'auditing' |
| | | const url = await uploadByBase64(this.base64 ,'人脸照片') |
| | | if (!url) { |
| | | this.url = await uploadByBase64(this.base64 ,'人脸照片') |
| | | if (!this.url) { |
| | | this.status = 'fail' |
| | | return |
| | | } |
| | | const params = { faceImgPath: url } |
| | | const params = { faceImgPath: this.url } |
| | | this.$axios.get('/system/auth/staff/checkin/face-match', { params }).then(res => { |
| | | if (res.data.code == 0) { |
| | | // this.status = res.data.data ? 'success' : 'fail' |
| | | this.status = 'success' |
| | | this.status = res.data.data ? 'success' : 'fail' |
| | | } else { |
| | | this.status = 'fail' |
| | | this.$message.error(res.data.msg || "人脸比对失败") |
| | |
| | | }, |
| | | handlerSuccess() { |
| | | this.dialogFlag = false |
| | | this.$emit('handlerSuccess') |
| | | this.$emit('handlerSuccess', this.url) |
| | | } |
| | | } |
| | | } |