2022.10.14 date

master
271556543@qq.com 3 years ago
parent 0f33f25daf
commit d60a549b28

File diff suppressed because one or more lines are too long

@ -91,15 +91,15 @@
</view>
<view class="btn" v-if="detail.status === 0 && flag" @click="$u.throttle(sign,1000)">
<view class="text1">签到</view>
<view class="text2">{{$u.timeFormat(time,'hh:MM:ss')}}</view>
<view class="text2">{{dateFormat(time,'HH:mm:ss')}}</view>
</view>
<view class="btn" v-if="detail.status === 1" @click="$u.throttle(signOut,1000)">
<view class="text1">签退</view>
<view class="text2">{{$u.timeFormat(time,'hh:MM:ss')}}</view>
<view class="text2">{{dateFormat(time,'HH:mm:ss')}}</view>
</view>
<view class="btn" v-if="detail.status === 0 && !flag" @click="$u.throttle(refreshLoaction,1000)">
<view class="text1">更新定位</view>
<view class="text2">{{$u.timeFormat(time,'hh:MM:ss')}}</view>
<view class="text2">{{dateFormat(time,'HH:mm:ss')}}</view>
</view>
<view class="btn" v-if="detail.status === 2">
<view class="text1">护理已完成</view>
@ -108,7 +108,7 @@
<!-- 打卡信息 -->
<view class="clock-info" v-if="location.lat && location.lng && location.time">
定位时间{{$u.timeFormat(location.time,'hh:MM:ss')}} {{location.address}}
定位时间{{dateFormat(location.time,'HH:mm:ss')}} {{location.address}}
</view>
</view>
@ -121,6 +121,7 @@
ROOTPATH
} from '@/common/config.js'
import QQMapWX from '@/libs/qqmap-wx-jssdk.js'
import moment from '@/libs/moment.min.js'
import imgUpload from './components/imgUpload.vue'
export default {
@ -460,6 +461,13 @@
item.default === 1
})[0]?.address || addresses[0]?.address || '无'
}
},
dateFormat() {
return function(date, fmt = "YYYY-MM-DD") {
if (date) {
return moment(date).format(fmt)
}
}
}
},
onLoad(option) {

@ -139,7 +139,7 @@
{{item.title}}
</view>
<view class="info-time">
{{$u.timeFormat(new Date(item.created_at),'yyyy-mm-dd')}}
{{dateFormat(new Date(item.created_at))}}
</view>
</view>
</view>
@ -159,6 +159,7 @@
</template>
<script>
import moment from "@/libs/moment.min.js"
export default {
data() {
return {
@ -233,7 +234,13 @@
}
},
computed: {
dateFormat() {
return function(date, fmt = "YYYY-MM-DD") {
if (date) {
return moment(date).format(fmt)
}
}
}
},
onShow() {
this.getStatistic()

@ -89,7 +89,7 @@
<view class="top">{{item.customer.name}}</view>
<view class="bottom">
<view class="time">
{{$u.timeFormat(new Date(item.start_time),'hh:MM')}}~{{$u.timeFormat(new Date(item.end_time),'hh:MM')}}
{{dateFormat(new Date(item.start_time),'HH:mm')}}~{{dateFormat(new Date(item.end_time),'HH:MM')}}
</view>
<view class="list-status-icon"
:class="{icon1:item.status === 0,icon2:item.status === 2,icon3:item.status === 1}">
@ -121,6 +121,7 @@
</template>
<script>
import moment from "@/libs/moment.min.js"
import {
formatDate
} from 'common/util.js'
@ -360,6 +361,13 @@
return res[0] ? res[0].status : false
}
},
dateFormat() {
return function(date, fmt = "YYYY-MM-DD") {
if (date) {
return moment(date).format(fmt)
}
}
}
},
watch: {
select: {

Loading…
Cancel
Save