-
+
{{clockDate}}
打卡成功!
知道了
@@ -54,7 +54,7 @@
export default{
data(){
- const nowday = this.$util.cutDate(new Date())
+ const nowday = this.$util.cutDate(new Date())
return {
loading: true,
clockDate:'',
@@ -105,7 +105,7 @@
// const latitude = res.latitude
// const longitude = res.longitude
// let { ClockLng,ClockLat } = _this.workLocale
-
+
// _this.$util.calculateDistance(
// {latitude:latitude, longitude:longitude},
// {latitude: ClockLat, longitude: ClockLng})
@@ -128,10 +128,10 @@
this.signin.time = this.$util.cutDate(time,'hh:mm:ss')
},
getDay (){
-
- var a = new Array("日", "一", "二", "三", "四", "五", "六");
- var week = new Date().getDay();
- this.signin.day = "星期"+ a[week];
+
+ var a = new Array("日", "一", "二", "三", "四", "五", "六");
+ var week = new Date().getDay();
+ this.signin.day = "星期"+ a[week];
},
// getWorkLocale(){ //获取 考勤地址、坐标,打卡范围,上、下班时间
// let _this= this
@@ -149,18 +149,18 @@
// longitude: ClockLng,
// title: msg.ClockAddress,
// }]
-
+
// _this.circles[0].latitude = ClockLat
// _this.circles[0].longitude = ClockLng
// _this.circles[0].radius = msg.ClockRange
-
+
// let am = new Date(nowDay+' '+msg.AMEndtime+':00')
// msg.isAmclock = am.getTime()-(new Date()).getTime() >0 ? true: false
// _this.workLocale = msg
// _this.loading = false
// // _this.getLocation()
// }
-
+
// }else {
// uni.showModal({
// title:'温馨提示',
@@ -170,7 +170,7 @@
// }
// })
// },
-
+
getMsg(){ // 更新用户当前打卡时间
let _this= this
let nowDay = this.nowDay
@@ -182,16 +182,16 @@
if( res.Data.List.length>0){
let msg = res.Data.List[0]
_this.pageMsg = msg
-
+
}
-
+
}
})
},
faceClock(){ // 提交打卡
let _this= this
let location = this.signin
-
+
if(!this.signin.isAble) return
_this.signinTime = this.signin.time
uni.showLoading({
@@ -204,13 +204,13 @@
photo: this.userPhoto || ''
}).then(res =>{
_this.loading = false
-
+
uni.hideLoading()
if(res.Result_Code==100) {
_this.clockDate = res.Data.ClockDate
_this.getMsg()
_this.showPop = true
-
+
}else{
uni.showModal({
content:'打卡失败:'+res.Result_Desc
@@ -227,31 +227,31 @@
let _this = this
if(!this.signin.isAble) return // 是否可以打卡
if(this.loading ) return // 是否正在上传
-
+
uni.navigateTo({
url:'/pages/additionalFeatures/takePhoto'
})
},
photoTobase64(photoPath){ // 把图片转为base64
-
+
let _this= this
uni.getFileSystemManager().readFile({
filePath: photoPath, //选择图片返回的相对路径
encoding: 'base64', //编码格式
- success: res => { //
+ success: res => { //
let base64 = res.data.replace(/\+/ig,'%2B') //不加上这串字符,在页面无法显示的哦
-
- _this.userPhoto = base64
+
+ _this.userPhoto = base64
_this.faceClock()
}
})
-
+
}
},
onLoad() {
let _this = this
// this.getWorkLocale()
-
+
_this.setTime = setInterval(function(){_this.getTime()},1000)
_this.getMsg()
uni.$on('addUserPhoto',function(data){ // 监听打卡拍照的数据,接收拍照的照片地址
@@ -263,13 +263,13 @@
onPullDownRefresh() {
let _this = this
_this.getLocation()
-
+
setTimeout(function() {
uni.stopPullDownRefresh()
-
+
}, 1000)
},
-
+
onUnload() {
// console.log(1)
uni.$off('addUserPhoto')
@@ -308,7 +308,7 @@
}
.date-text {
color: #A3A3A3;
-
+
font-size: 22rpx;
/* line-height: 50rpx; */
/* margin-left: 8rpx; */
@@ -330,7 +330,7 @@
}
.punching-date-box:nth-child(2)::before {
content: '';
- position: absolute;
+ position: absolute;
height: 190rpx;
width: 2rpx;
display: block;
@@ -385,7 +385,7 @@
box-sizing: border-box;
}
.bg-gray.btn {
- background:linear-gradient(#cdd4d8 0%, #ADB2BF 100%);
+ background:linear-gradient(#cdd4d8 0%, #ADB2BF 100%);
}
.able-text {
color: #8B8D8E;
@@ -413,7 +413,7 @@
margin: 0 50%;
}
.tip-text {
-
+
font-size: 46rpx;
text-align: center;
color: #7B95A9;
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 6c13c95..c3dcf89 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -16,8 +16,8 @@
{{ single }}
-
-
+
+
@@ -1422,8 +1422,9 @@ export default {
// 切换考核的数据
this.handleGetExamine()
// 切换日常巡检数据
-
this.handleGetDailyPatrol()
+ // 获取全省平均车流量
+ this.handleGetAllCarTraffic()
}
},
getCarInfo(date){
@@ -1614,14 +1615,13 @@ export default {
// 同比去年的年度累计
let yearYoY = (((result.MonthRevenueModel.YearRevenueAmount - result.MonthRevenueModel.YearRevenueYOY) / result.MonthRevenueModel.YearRevenueYOY)*100).toFixed(2)
console.log('yearYoY',yearYoY)
- this.showTableData.yearYoY = Number(yearYoY)
+ this.showTableData.yearYoY = Number(yearYoY)>0 ? '+' + Number(yearYoY) : Number(yearYoY)
}
if (this.showTableData.RevenueQOQ){
// 对客的环比
let customerQoQ = (((result.MonthRevenueModel.CashPay - result.MonthRevenueModel.RevenueQOQ) / result.MonthRevenueModel.RevenueQOQ)*100).toFixed(2)
console.log('customerQoQ',customerQoQ)
- this.showTableData.customerQoQ = Number(customerQoQ)>0?'+'+customerQoQ+'%':Number(customerQoQ)<0?'-'+customerQoQ+'%':''
-
+ this.showTableData.customerQoQ = Number(customerQoQ)>0?'+'+customerQoQ+'%':Number(customerQoQ)<0?customerQoQ+'%':''
}
this.yesObj = result.RevenuePushModel
diff --git a/pages/newamine/component/yearCharts.vue b/pages/newamine/component/yearCharts.vue
new file mode 100644
index 0000000..5ad089a
--- /dev/null
+++ b/pages/newamine/component/yearCharts.vue
@@ -0,0 +1,81 @@
+