|
@@ -1,75 +1,94 @@
|
|
<template>
|
|
<template>
|
|
- <view class="ding flex flex-col">
|
|
|
|
- <RadiusSelect title="服务单元名称" placeholder="请选择服务单元" :list="serviceUnit" :value.sync="params.serviceId" :on-change="getSopList"></RadiusSelect>
|
|
|
|
- <RadiusSelect title="SOP" placeholder="请选择SOP" :list="sopList" :value.sync="params.sopNo" :on-change="getDingInfo"></RadiusSelect>
|
|
|
|
- <view class="msg-item">
|
|
|
|
- <view class="m-head flex justify-between">
|
|
|
|
- <view class="m-title flex-col">
|
|
|
|
- <text class="title">签到{{ dingInfo.signInTimeScope ||'' }}</text>
|
|
|
|
- <view class="flex ">
|
|
|
|
- <image src="../../static/icon/ding-success.png" class="ding-success mr2" v-show="dingInfo.signInTime"/>
|
|
|
|
- <view class="sub-title mr2">{{dingInfo.signInTime?dateFormat(dingInfo.signInTime, 'hh:mm')+'已打卡':'未打卡'}}</view>
|
|
|
|
- <a @click="checkDingObj('IN')" class="a-title" v-show="dingInfo.signInTime">更新打卡</a>
|
|
|
|
|
|
+ <view class="page">
|
|
|
|
+ <view class="status-bar">
|
|
|
|
+ <!-- 这里是状态栏 -->
|
|
|
|
+ </view>
|
|
|
|
+ <div class="custom-navigation">
|
|
|
|
+ <UserSpace></UserSpace>
|
|
|
|
+ </div>
|
|
|
|
+ <view class="ding flex flex-col">
|
|
|
|
+ <RadiusSelect title="服务单元名称" placeholder="请选择服务单元" :list="serviceUnit" :value.sync="params.serviceId"
|
|
|
|
+ :on-change="getSopList"></RadiusSelect>
|
|
|
|
+ <RadiusSelect title="SOP" placeholder="请选择SOP" :list="sopList" :value.sync="params.sopNo"
|
|
|
|
+ :on-change="getDingInfo"></RadiusSelect>
|
|
|
|
+ <view class="msg-item">
|
|
|
|
+ <view class="m-head flex justify-between">
|
|
|
|
+ <view class="m-title flex-col">
|
|
|
|
+ <text class="title">签到{{ dingInfo.signInTimeScope || '' }}</text>
|
|
|
|
+ <view class="flex ">
|
|
|
|
+ <image src="../../static/icon/ding-success.png" class="ding-success mr2" v-show="dingInfo.signInTime"/>
|
|
|
|
+ <view class="sub-title mr2">
|
|
|
|
+ {{ dingInfo.signInTime ? dateFormat(dingInfo.signInTime, 'hh:mm') + '已打卡' : '未打卡' }}
|
|
|
|
+ </view>
|
|
|
|
+ <a @click="checkDingObj('IN')" class="a-title" v-show="dingInfo.signInTime">更新打卡</a>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="m-title flex-col">
|
|
|
|
- <text class="title">签退{{ dingInfo.signOutTimeScope ||'' }}</text>
|
|
|
|
- <view class="flex ">
|
|
|
|
- <image src="../../static/icon/ding-success.png" class="ding-success mr2" v-show="dingInfo.signOutTime"/>
|
|
|
|
- <view class="sub-title mr2">{{dingInfo.signOutTime?dateFormat(dingInfo.signOutTime, 'hh:mm')+'已打卡':'未打卡'}}</view>
|
|
|
|
- <a @click="checkDingObj('OUT')" class="a-title" v-show="dingInfo.signOutTime">更新打卡</a>
|
|
|
|
|
|
+ <view class="m-title flex-col">
|
|
|
|
+ <text class="title">签退{{ dingInfo.signOutTimeScope || '' }}</text>
|
|
|
|
+ <view class="flex ">
|
|
|
|
+ <image src="../../static/icon/ding-success.png" class="ding-success mr2" v-show="dingInfo.signOutTime"/>
|
|
|
|
+ <view class="sub-title mr2">
|
|
|
|
+ {{ dingInfo.signOutTime ? dateFormat(dingInfo.signOutTime, 'hh:mm') + '已打卡' : '未打卡' }}
|
|
|
|
+ </view>
|
|
|
|
+ <a @click="checkDingObj('OUT')" class="a-title" v-show="dingInfo.signOutTime">更新打卡</a>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="m-body flex items-center" >
|
|
|
|
- <view class="m-box flex flex-col items-center" v-show="dingInfo.sopNo" @click="checkDingObj(signOutEnable?'OUT':(signInEnable?'IN':''))" >
|
|
|
|
- <text class="m-box-1">{{signOutEnable?'签退':(signInEnable?'签到':'')}}打卡</text>
|
|
|
|
- <text class="m-box-2" v-show="dingInfo.faceOpen">(人脸识别)</text>
|
|
|
|
- <text class="m-box-3">{{dateFormat(currentTime, 'hh:mm')}}</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="m-box-disable m-box flex flex-col items-center" v-show="!dingInfo.sopNo">
|
|
|
|
- <text class="m-box-1">无法打卡</text>
|
|
|
|
- <text class="m-box-2" v-show="dingInfo.faceOpen">(人脸识别)</text>
|
|
|
|
- <text class="m-box-3">{{dateFormat(currentTime, 'hh:mm')}}</text>
|
|
|
|
|
|
+ <view class="m-body flex items-center">
|
|
|
|
+ <view class="m-box flex flex-col items-center" v-show="dingInfo.sopNo"
|
|
|
|
+ @click="checkDingObj(signOutEnable?'OUT':(signInEnable?'IN':''))">
|
|
|
|
+ <text class="m-box-1">{{ signOutEnable ? '签退' : (signInEnable ? '签到' : '') }}打卡</text>
|
|
|
|
+ <text class="m-box-2" v-show="dingInfo.faceOpen">(人脸识别)</text>
|
|
|
|
+ <text class="m-box-3">{{ dateFormat(currentTime, 'hh:mm') }}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="m-box-disable m-box flex flex-col items-center" v-show="!dingInfo.sopNo">
|
|
|
|
+ <text class="m-box-1">无法打卡</text>
|
|
|
|
+ <text class="m-box-2">(人脸识别)</text>
|
|
|
|
+ <text class="m-box-3">{{ dateFormat(currentTime, 'hh:mm') }}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="m-box-success flex flex-col items-center" v-show="dingSuccess">
|
|
|
|
+ <image src="../../static/icon/ding-success.png" class="image-success"/>
|
|
|
|
+ <text class="title-success">打卡成功,打卡时间{{ dateFormat(dingObj.signTime, 'hh:mm') }}</text>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- <view class="m-box-success flex flex-col items-center" v-show="dingSuccess">
|
|
|
|
- <image src="../../static/icon/ding-success.png" class="image-success"/>
|
|
|
|
- <text class="title-success">打卡成功,打卡时间{{dateFormat(dingObj.signTime, 'hh:mm')}}</text>
|
|
|
|
|
|
+ <view class="m-foot flex">
|
|
|
|
+ <u-icon name="map" color="#8C8C8C" size="28"></u-icon>
|
|
|
|
+ <text class="sub-title">{{ dingObj.signAddress }}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="m-foot flex">
|
|
|
|
- <u-icon name="map" color="#8C8C8C" size="28"></u-icon>
|
|
|
|
- <text class="sub-title">{{dingObj.signAddress}}</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="msg-item">
|
|
|
|
- <view class="m-head flex justify-between">
|
|
|
|
- <view class="msg-foot flex flex-col" @click="this.$Router.push({ path: '/pages/ding/ding-abnormal', query: params })">
|
|
|
|
- <u-icon name="error-circle" color="#8C8C8C" size="50"></u-icon>
|
|
|
|
- <text class="sub-title">异常处理</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="msg-separator"></view>
|
|
|
|
- <view class="msg-foot flex flex-col" @click="this.$Router.push({ path: '/pages/ding/ding-statistics', query: params })">
|
|
|
|
- <u-icon name="clock" color="#8C8C8C" size="50"></u-icon>
|
|
|
|
- <text class="sub-title">统计</text>
|
|
|
|
|
|
+ <view class="msg-item">
|
|
|
|
+ <view class="m-head flex justify-between">
|
|
|
|
+ <view class="msg-foot flex flex-col"
|
|
|
|
+ @click="this.$Router.push({ path: '/pages/ding/ding-abnormal', query: params })">
|
|
|
|
+ <u-icon name="error-circle" color="#8C8C8C" size="50"></u-icon>
|
|
|
|
+ <text class="sub-title">异常处理</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="msg-separator"></view>
|
|
|
|
+ <view class="msg-foot flex flex-col"
|
|
|
|
+ @click="this.$Router.push({ path: '/pages/ding/ding-statistics', query: params })">
|
|
|
|
+ <u-icon name="clock" color="#8C8C8C" size="50"></u-icon>
|
|
|
|
+ <text class="sub-title">统计</text>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
<u-toast ref="uToast"/>
|
|
<u-toast ref="uToast"/>
|
|
|
|
|
|
<u-popup v-model="show" mode="center" border-radius="14">
|
|
<u-popup v-model="show" mode="center" border-radius="14">
|
|
<view class="popup-main flex flex-col justify-between items-center">
|
|
<view class="popup-main flex flex-col justify-between items-center">
|
|
|
|
+ <view class="flex justify-between" style="width: -webkit-fill-available;">
|
|
|
|
+ <text></text>
|
|
<text class="title">打卡提醒</text>
|
|
<text class="title">打卡提醒</text>
|
|
- <text class="sub-title">请选择你是签到还是签退</text>
|
|
|
|
- <u-button type="primary" @click="checkDingObj('IN')">签到</u-button>
|
|
|
|
- <u-button type="primary" plain @click="checkDingObj('OUT')">签退</u-button>
|
|
|
|
- <u-button type="default" @click="show=false">取消</u-button>
|
|
|
|
|
|
+ <u-icon @click="show=false" name="close" color="#000000" size="28"></u-icon>
|
|
|
|
+ </view>
|
|
|
|
+ <text class="sub-title">请选择你是签到还是签退</text>
|
|
|
|
+ <u-button type="primary" @click="checkDingObj('IN')">签到</u-button>
|
|
|
|
+ <u-button type="primary" plain @click="checkDingObj('OUT')">签退</u-button>
|
|
|
|
+ <u-button type="default" @click="faceModel=true">取消</u-button>
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
</u-popup>
|
|
- <u-popup v-if="faceModel" mode="center" border-radius="200" :mask-close-able="false">
|
|
|
|
- <DingFace :on-change="dingFace"></DingFace>
|
|
|
|
- </u-popup>
|
|
|
|
|
|
+ <DingFace :show='faceModel'></DingFace>
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -79,11 +98,12 @@ import {getServiceUnit} from '@/api/common'
|
|
import {dateFormat, getAppWxLatLon, timeCompare} from '@/utils/utils'
|
|
import {dateFormat, getAppWxLatLon, timeCompare} from '@/utils/utils'
|
|
import RadiusSelect from "@/components/radius-select.vue";
|
|
import RadiusSelect from "@/components/radius-select.vue";
|
|
import DingFace from "./ding-face.vue";
|
|
import DingFace from "./ding-face.vue";
|
|
|
|
+import UserSpace from "@/components/user-space.vue";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'ding',
|
|
name: 'ding',
|
|
- components: {RadiusSelect,DingFace},
|
|
|
|
|
|
+ components: {UserSpace, RadiusSelect,DingFace},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
dateFormat,
|
|
dateFormat,
|
|
@@ -105,7 +125,8 @@ export default {
|
|
signType: "OUT",
|
|
signType: "OUT",
|
|
signAddress: "",
|
|
signAddress: "",
|
|
axisX: "",
|
|
axisX: "",
|
|
- axisY: ""
|
|
|
|
|
|
+ axisY: "",
|
|
|
|
+ facePhotoPath:''
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -125,9 +146,10 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
|
|
+ this.currentTime = new Date().getTime();
|
|
this.setTime = setInterval( ()=> {
|
|
this.setTime = setInterval( ()=> {
|
|
this.currentTime = new Date().getTime()
|
|
this.currentTime = new Date().getTime()
|
|
- }, 1000)
|
|
|
|
|
|
+ }, 10000)
|
|
|
|
|
|
},
|
|
},
|
|
onHide(){
|
|
onHide(){
|
|
@@ -160,21 +182,23 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- checkDingObj(signType) {
|
|
|
|
- if(!signType){
|
|
|
|
- this.show=true;return;
|
|
|
|
|
|
+ async checkDingObj(signType) {
|
|
|
|
+ if (!signType) {
|
|
|
|
+ this.show = true;
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
this.dingObj.sopNo = this.params.sopNo;
|
|
this.dingObj.sopNo = this.params.sopNo;
|
|
this.dingObj.signType = signType;
|
|
this.dingObj.signType = signType;
|
|
this.dingObj.signTime = this.currentTime;
|
|
this.dingObj.signTime = this.currentTime;
|
|
this.dingObj.facePass = false;
|
|
this.dingObj.facePass = false;
|
|
if (this.dingInfo.faceOpen) {
|
|
if (this.dingInfo.faceOpen) {
|
|
- this.faceModel=true;
|
|
|
|
- }else{
|
|
|
|
|
|
+ this.faceModel=true;
|
|
|
|
+ } else {
|
|
this.saveDing();
|
|
this.saveDing();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
dingFace(facePhotoPath){
|
|
dingFace(facePhotoPath){
|
|
|
|
+ this.faceModel=false;
|
|
this.dingObj.facePhotoPath = facePhotoPath;
|
|
this.dingObj.facePhotoPath = facePhotoPath;
|
|
this.saveDing();
|
|
this.saveDing();
|
|
},
|
|
},
|
|
@@ -198,9 +222,13 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
+.page {
|
|
|
|
+ height: 100vh;
|
|
|
|
+}
|
|
.ding {
|
|
.ding {
|
|
- //height: calc(100vh - 80rpx);
|
|
|
|
|
|
+ height:calc(100% - 70px);
|
|
padding: 24rpx;
|
|
padding: 24rpx;
|
|
|
|
+ overflow: scroll;
|
|
}
|
|
}
|
|
.msg-item {
|
|
.msg-item {
|
|
padding: 24rpx;
|
|
padding: 24rpx;
|
|
@@ -331,7 +359,6 @@ export default {
|
|
background: linear-gradient(180deg, #D7EAFF 0%, #FFFFFF 100%);
|
|
background: linear-gradient(180deg, #D7EAFF 0%, #FFFFFF 100%);
|
|
backdrop-filter: blur(10px);
|
|
backdrop-filter: blur(10px);
|
|
.title {
|
|
.title {
|
|
- width: 160px;
|
|
|
|
height: 24px;
|
|
height: 24px;
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
font-family: PingFangSC-Semibold, PingFang SC;
|
|
font-family: PingFangSC-Semibold, PingFang SC;
|
|
@@ -341,7 +368,6 @@ export default {
|
|
text-align: center;
|
|
text-align: center;
|
|
}
|
|
}
|
|
.sub-title {
|
|
.sub-title {
|
|
- width: 168px;
|
|
|
|
height: 20px;
|
|
height: 20px;
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|