zhgdyunapp/unpackage/dist/build/h5/static/js/pages-projectEnd-laborManage-clockIn.3efda256.js
2023-05-04 15:33:11 +08:00

1 line
12 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-projectEnd-laborManage-clockIn","pages-my-my"],{"0e93":function(e,t,n){var a=n("ebe9");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var i=n("4f06").default;i("ff6b7228",a,!0,{sourceMap:!1,shadowMode:!1})},"1f6e":function(e,t,n){"use strict";n.r(t);var a=n("f0c5"),i=Object(a["a"])({},void 0,void 0,!1,null,null,null,!1,void 0,void 0);t["default"]=i.exports},2554:function(e,t,n){"use strict";var a=n("0e93"),i=n.n(a);i.a},"2b86":function(e,t,n){var a=n("bcba");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var i=n("4f06").default;i("e952f8d0",a,!0,{sourceMap:!1,shadowMode:!1})},"460a":function(e,t,n){"use strict";n.r(t);var a=n("6618"),i=n("72c8");for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);n("8435");var s=n("f0c5"),r=Object(s["a"])(i["default"],a["b"],a["c"],!1,null,"86a5944e",null,!1,a["a"],void 0);t["default"]=r.exports},58885:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));var a={uniIcons:n("1f6e").default},i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{class:e.themeType?"whiteHeaderBox":""},[n("v-uni-view",{staticClass:"statusBar",style:{height:e.mobileTopHeight+"px"}}),n("v-uni-view",{staticClass:"headerBox"},[n("uni-icons",{directives:[{name:"show",rawName:"v-show",value:e.showBack,expression:"showBack"}],staticClass:"backImg",attrs:{type:"arrowleft",size:"24"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.goBackFn.apply(void 0,arguments)}}}),e._t("default")],2)],1)},o=[]},6618:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));var a={headers:n("996e").default,uniIcons:n("1f6e").default},i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"fullHeight"},[n("headers",{attrs:{showBack:!0,themeType:"white"}},[n("v-uni-view",{staticClass:"headerName"},[e._v("移动考勤")])],1),n("v-uni-view",{staticClass:"box personInfoBox"},[n("v-uni-image",{staticClass:"profile_photo",attrs:{src:"/static/profile_photo.png"}}),n("v-uni-view",{staticClass:"info"},[n("v-uni-view",{staticClass:"personName"},[e._v(e._s(e.realName))])],1)],1),n("v-uni-view",{staticClass:"box",style:{height:e.screenHeight-e.statusBarHeight-44-105-15-30+"px"}},[n("v-uni-view",{staticClass:"top"},[n("v-uni-view",{staticClass:"item"},[n("v-uni-view",{staticClass:"type"},[e._v("上班")]),e.attendenceData.enterTime?n("v-uni-view",{staticClass:"time"},[n("uni-icons",{staticClass:"backImg",attrs:{type:"checkbox-filled",size:"14",color:"#5181F6"}}),e._v(e._s(e.enterTime)+" 已打卡")],1):n("v-uni-view",{staticClass:"time"},[e._v("未打卡")])],1),n("v-uni-view",{staticClass:"item"},[n("v-uni-view",{staticClass:"type"},[e._v("下班")]),e.attendenceData.outTime?n("v-uni-view",{staticClass:"time"},[n("uni-icons",{staticClass:"backImg",attrs:{type:"checkbox-filled",size:"14",color:"#5181F6"}}),e._v(e._s(e.outTime)+"已打卡")],1):n("v-uni-view",{staticClass:"time"},[e._v("未打卡")])],1)],1),n("v-uni-view",{staticClass:"bottom"},[n("v-uni-view",{},[n("v-uni-view",{staticClass:"circleBox",class:e.canClick?"":"grey",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.clockIn.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"name"},[e._v(e._s(e.attendenceData.enterTime?e.attendenceData.outTime?"更新":"下班":"上班")+"打卡")]),n("v-uni-view",{staticClass:"time"},[e._v(e._s(e.nowTime))])],1),e.canClick?n("v-uni-view",{staticClass:"address"},[n("uni-icons",{staticClass:"backImg",attrs:{type:"checkbox-filled",size:"14",color:"#0bb44e"}}),e._v("已进入考勤范围:"+e._s(e.electricFence.addr))],1):n("v-uni-view",{staticClass:"address"},[n("uni-icons",{staticClass:"backImg",attrs:{type:"location-filled",size:"14",color:"rgba(38, 45, 71, 0.7)"}}),e._v("未进入考勤区域")],1)],1)],1)],1)],1)},o=[]},"6bf9":function(e,t,n){"use strict";n.r(t);var a=n("b65d"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);t["default"]=i.a},"72c8":function(e,t,n){"use strict";n.r(t);var a=n("8ba9"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);t["default"]=i.a},8435:function(e,t,n){"use strict";var a=n("2b86"),i=n.n(a);i.a},"8ba9":function(e,t,n){"use strict";n("7a82");var a=n("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("99af"),n("acd8");var i=a(n("ade3")),o=a(n("1f6e")),s={components:{uniIcons:o.default},data:function(){var e;return e={statusBarHeight:0,screenHeight:667,personDetail:{fieldAcquisitionUrl:""},canClick:!1,projectDetail:{},electricFence:{},attendenceData:{enterTime:null,outTime:null},currentTime:"",photoUrl:"",timer:null,realName:"",phoneClockImageType:0,faceScore:0},(0,i.default)(e,"timer",""),(0,i.default)(e,"nowTime",""),e},computed:{enterTime:function(){if(this.attendenceData.enterTime){var e=this.attendenceData.enterTime.split(" ")[1];return e}return null},outTime:function(){if(this.attendenceData.outTime){var e=this.attendenceData.outTime.split(" ")[1];return e}return null}},created:function(){this.getTime()},beforeDestroy:function(){this.timer&&clearInterval(this.timer)},onLoad:function(){this.statusBarHeight=uni.getStorageSync("systemInfo").statusBarHeight,this.screenHeight=uni.getStorageSync("systemInfo").screenHeight,this.projectDetail=JSON.parse(uni.getStorageSync("projectDetail"));var e=JSON.parse(uni.getStorageSync("userInfo"));this.workerId=e.workerId,this.realName=e.realName,this.GetLOcation(),this.getAttendenceData(),this.getNowTime(),this.getAttendenceTypeFn()},onShow:function(){1==this.phoneClockImageType&&this.photoUrl&&this.addPhoneAttendanceFn()},methods:{getAttendenceTypeFn:function(){var e=this;this.sendRequest({url:"xmgl/projectConfig/getProjectConfigList",data:{projectSn:this.projectDetail.projectSn},method:"POST",success:function(t){t.result&&(e.phoneClockImageType=t.result[0].phoneClockImageType,e.faceScore=t.result[0].faceScore)}})},getTime:function(){var e=this;this.timer=setInterval((function(){var t=new Date,n=(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours());n=n>=10?n:"0"+n;var a=t.getMinutes();a=a>=10?a:"0"+a;var i=t.getSeconds();i=i>=10?i:"0"+i;t.getDay();e.nowTime=" ".concat(n,":").concat(a,":").concat(i)}),1e3)},getAttendenceData:function(){var e=this;this.sendRequest({url:"xmgl/workerAttendance/getPersonAttendanceTime",data:{workerId:this.workerId},method:"POST",success:function(t){console.log("getAttendenceData",t),e.attendenceData=t.result}})},GetLOcation:function(){var e=this;uni.getLocation({type:"gcj02",success:function(t){console.log("success",t);var n=parseFloat(t.latitude),a=parseFloat(t.longitude);e.isInArea(a,n)},fail:function(e){console.log("fail",e)}})},isInArea:function(e,t){var n=this;this.sendRequest({url:"xmgl/electricFence/checkLocation",data:{longitude:e,projectSn:this.projectDetail.projectSn,latitude:t,workerId:this.workerId},method:"POST",hideLoading:!0,success:function(e){console.log("isInArea",e),0==e.result.checkType?(console.log("不在考勤范围内"),n.canClick=!1):(console.log("在考勤范围内"),n.canClick=!0,n.electricFence=e.result.electricFence)}})},addPhoneAttendanceFn:function(){var e=this,t=1;this.attendenceData.enterTime&&(t=2),this.sendRequest({url:"xmgl/workerAttendance/addPhoneAttendance",data:{workerId:this.workerId,photoUrl:this.photoUrl,type:t},method:"POST",success:function(t){console.log("addPhoneAttendanceFn",t),e.getAttendenceData()}})},clockIn:function(){this.canClick&&(this.phoneClockImageType?uni.navigateTo({url:"./faceRecognition?faceScore="+this.faceScore}):this.addPhoneAttendanceFn())}}};t.default=s},"996e":function(e,t,n){"use strict";n.r(t);var a=n("58885"),i=n("6bf9");for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);n("2554");var s=n("f0c5"),r=Object(s["a"])(i["default"],a["b"],a["c"],!1,null,"929d0930",null,!1,a["a"],void 0);t["default"]=r.exports},b65d:function(e,t,n){"use strict";n("7a82");var a=n("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n("1f6e")),o={props:["showBack","themeType"],components:{uniIcons:i.default},data:function(){return{mobileTopHeight:0}},mounted:function(){var e=this;uni.getSystemInfo({success:function(t){e.mobileTopHeight=t.statusBarHeight,uni.setStorageSync("systemInfo",t),console.log(t)}}),console.log("this.mobileTopHeight",this.mobileTopHeight)},methods:{goBackFn:function(){uni.navigateBack({success:function(){}})}}};t.default=o},bcba:function(e,t,n){var a=n("24fb");t=a(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.profile_photo[data-v-86a5944e]{width:45px;height:45px;border-radius:50%;margin-right:10px}.box[data-v-86a5944e]{box-shadow:0 4px 24px 0 rgba(212,220,236,.69);border-radius:8px;margin:15px;padding:15px}.personInfoBox[data-v-86a5944e]{display:flex;align-items:center;flex-direction:row}.personInfoBox .personName[data-v-86a5944e]{color:#488dec;font-size:17px}.personInfoBox .groupName[data-v-86a5944e]{color:rgba(42,43,91,.8);font-size:13px}.top[data-v-86a5944e]{display:flex;align-items:center;flex-direction:row}.top .item[data-v-86a5944e]{background-color:#f3f4f8;border-radius:4px;padding:8px 12px;flex:1;font-size:15px}.top .item[data-v-86a5944e]:first-child{margin-right:10px}.top .item .time[data-v-86a5944e]{font-size:13px;color:rgba(38,45,71,.7);display:flex;align-items:center;margin-top:3px;flex-direction:row}.backImg[data-v-86a5944e]{margin-right:3px}.bottom[data-v-86a5944e]{text-align:center;display:flex;align-items:center;justify-content:center;height:calc(100% - 60px)}.bottom .address[data-v-86a5944e]{font-size:13px;margin-top:20px;color:rgba(38,45,71,.7);flex-direction:row;display:flex;align-items:center;justify-content:center}.circleBox[data-v-86a5944e]{width:140px;height:140px;border-radius:50%;background-image:linear-gradient(#0093f9,#066af8);color:#fff;display:inline-block;box-shadow:0 4px 24px 0 rgba(81,129,246,.5)}.circleBox.grey[data-v-86a5944e]{background-image:linear-gradient(#f1f1f1,#c3c3c3);box-shadow:0 4px 24px 0 hsla(0,0%,76.5%,.5)}.circleBox .name[data-v-86a5944e]{padding-top:45px;font-size:20px}.circleBox .time[data-v-86a5944e]{font-size:15px}',""]),e.exports=t},ebe9:function(e,t,n){var a=n("24fb");t=a(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.statusBar[data-v-929d0930]{background-color:#2a2b5b}.whiteHeaderBox .statusBar[data-v-929d0930]{background-color:#2b8df3}',""]),e.exports=t}}]);