| | |
| | | <template> |
| | | <view> |
| | | <view class='chuany-flex camera-fill chuany-justify-center chuany-align-center'> |
| | | <fui-upload immediate :url="`${apiBaseUrl}api/UpFile/UpdateFile`" ref="uploadB" max='1' @success="success" |
| | | @error="error" @complete="complete" width="280" height="280"> |
| | | <image v-if="checkPhoto" :src="checkPhoto" mode="widthFix" style="width: 280rpx;height: 280rpx;"> |
| | | </image> |
| | | <fui-upload immediate :url="`${apiBaseUrl}/api/UpFile/UpdateFile`" ref="uploadE" max='1' @success="success" |
| | | :sourceType='sourceType' @error="error" @complete="complete" width="280" height="280"> |
| | | <view class="" v-if="checkPhoto"> |
| | | <image :src="checkPhoto" mode="widthFix" style="width: 280rpx;height: 280rpx;"> |
| | | </image> |
| | | </view> |
| | | <view class=" chuany-flex chuany-flex-direction chuany-align-center" v-else> |
| | | <fui-icon name="camera-fill"></fui-icon> |
| | | <view class="chuany-font20">拍摄环境照片</view> |
| | | </view> |
| | | </fui-upload> |
| | | <fui-upload ref="uploadB" max='1' @error="error" @complete="completePerson" width="280" height="280"> |
| | | <image v-if="src" :src="src" mode="widthFix" style="width: 280rpx;height: 280rpx;"></image> |
| | | <fui-upload ref="uploadP" max='1' @error="error" @complete="completePerson" width="280" height="280" |
| | | :sourceType='sourceType'> |
| | | <view class="" v-if="faceImg"> |
| | | <image :src="faceImg" mode="widthFix" style="width: 280rpx;height: 280rpx;"></image> |
| | | </view> |
| | | <view class=" chuany-flex chuany-flex-direction chuany-align-center" v-else> |
| | | <fui-icon name="addfriends-fill"></fui-icon> |
| | | <view class="chuany-font20">拍摄人脸照片</view> |
| | |
| | | orderBiddingId: '', //招工明细OrderBiddingId |
| | | checkPhoto: '', //打卡照片 |
| | | faceImg: '', //人脸图片 |
| | | dakaList: null |
| | | dakaList: null, |
| | | sourceType: ["camera"] |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | |
| | | this.$api.getDaka({ |
| | | orderId: id |
| | | }).then(res => { |
| | | if(res.code==1){ |
| | | this.dakaList = res.data.orderBiddingDetailCheck |
| | | this.dakaList.length = 3 |
| | | if (res.code == 1) { |
| | | this.dakaList = res.data ? res.data.orderBiddingDetailCheck : [] |
| | | if (this.dakaList.length == 0) { |
| | | this.dakaList.length = 2 |
| | | } |
| | | if (this.dakaList.length > 6) { |
| | | this.dakaList.length = 6 |
| | | } |
| | | if (this.dakaList.length % 2 !== 0) { |
| | | this.dakaList.push({}) |
| | | } |
| | | }else{ |
| | | } else { |
| | | this.$util.showToast({ |
| | | title: res.error |
| | | }) |
| | |
| | | console.log(e, '删除') |
| | | }, |
| | | completePerson(e) { |
| | | if (e.action == 'delete') { |
| | | // 删除处理 |
| | | return |
| | | } |
| | | this.$util.pathToBase64(e.urls[0]).then(res => { |
| | | this.faceImg = res |
| | | }) |
| | |
| | | title: "打卡成功!", |
| | | icon: "success" |
| | | }) |
| | | this.checkPhoto = '' //打卡照片 |
| | | this.faceImg = '' |
| | | this.$refs.uploadP.deleteImage() |
| | | this.$refs.uploadE.deleteImage() |
| | | this.getDaka(this.orderBiddingId) |
| | | } else { |
| | | this.$util.showToast({ |
| | | title: res.data, |
| | | title: res.error, |
| | | }) |
| | | } |
| | | }) |