update
This commit is contained in:
@@ -20,17 +20,20 @@ const {data} = defineProps({
|
|||||||
<view style="font-size: 28rpx">
|
<view style="font-size: 28rpx">
|
||||||
任务编号:{{ data.uid }}
|
任务编号:{{ data.uid }}
|
||||||
</view>
|
</view>
|
||||||
<view v-if="data.back_status === 1" style="font-size: 24rpx">
|
<view v-if="data.back_status === 0" style="font-size: 24rpx">
|
||||||
<Text class="text-[#165DFF]">{{ dayjs(data.time).format('MM-DD-HH:mm') }}</Text>
|
<Text class="text-[#165DFF]">{{ dayjs(data.time).format('MM-DD-HH:mm') }}</Text>
|
||||||
后可开始回填
|
后可开始回填
|
||||||
</view>
|
</view>
|
||||||
|
<x-countdown v-else-if="data.back_status === 1" :time="dayjs(data.time)">
|
||||||
|
<view style="font-size: 24rpx;font-weight: 400;" class="text-[rgb(78,89,105)]">回填倒计时:</view>
|
||||||
|
</x-countdown>
|
||||||
|
<x-countdown v-else-if="data.back_status === 2" :time="dayjs(data.time)">
|
||||||
|
<view style="font-size: 24rpx;font-weight: 400;" class="text-[rgb(78,89,105)]">审核倒计时:</view>
|
||||||
|
</x-countdown>
|
||||||
<view v-else-if="data.status === -1 || data.status === 3" class="text-[rgb(78,89,105)]"
|
<view v-else-if="data.status === -1 || data.status === 3" class="text-[rgb(78,89,105)]"
|
||||||
style="font-size: 24rpx">
|
style="font-size: 24rpx">
|
||||||
{{ data.time }}
|
{{ data.time }}
|
||||||
</view>
|
</view>
|
||||||
<x-countdown v-else :time="dayjs(data.time)">
|
|
||||||
<view style="font-size: 24rpx;font-weight: 400;" class="text-[rgb(78,89,105)]">审核倒计时:</view>
|
|
||||||
</x-countdown>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="!flex gap-[26rpx] !pt-[20rpx]">
|
<view class="!flex gap-[26rpx] !pt-[20rpx]">
|
||||||
|
|||||||
@@ -1,25 +1,39 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {ref} from "vue";
|
import {ref, watch} from "vue";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
const {time} = defineProps({
|
const props = defineProps({
|
||||||
time: {
|
time: {
|
||||||
type: String,
|
type: String,
|
||||||
default: dayjs(new Date()).add(20, 'minutes'),
|
default: null,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const diff = ref(dayjs(time).diff(dayjs(new Date()), 'second'));
|
const diff = ref(dayjs(props.time).diff(dayjs(new Date()), 'second'));
|
||||||
const hours = ref(null);
|
const hours = ref(null);
|
||||||
const minutes = ref(null);
|
const minutes = ref(null);
|
||||||
const seconds = ref(null);
|
const seconds = ref(null);
|
||||||
|
|
||||||
const timer = setInterval(() => {
|
let timer = null;
|
||||||
diff.value = dayjs(time).diff(dayjs(new Date()), 'second');
|
|
||||||
hours.value = Math.floor(diff.value / 3600);
|
watch(
|
||||||
minutes.value = Math.floor((diff.value % 3600) / 60);
|
() => props.time,
|
||||||
seconds.value = diff.value % 60;
|
() => {
|
||||||
}, 1000);
|
console.log('运行')
|
||||||
|
clearInterval(timer);
|
||||||
|
diff.value = dayjs(props.time).diff(dayjs(new Date()), 'second');
|
||||||
|
hours.value = Math.floor(diff.value / 3600);
|
||||||
|
minutes.value = Math.floor((diff.value % 3600) / 60);
|
||||||
|
seconds.value = diff.value % 60;
|
||||||
|
timer = setInterval(() => {
|
||||||
|
diff.value = dayjs(props.time).diff(dayjs(new Date()), 'second');
|
||||||
|
hours.value = Math.floor(diff.value / 3600);
|
||||||
|
minutes.value = Math.floor((diff.value % 3600) / 60);
|
||||||
|
seconds.value = diff.value % 60;
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
{deep: true, immediate: true}
|
||||||
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -57,13 +57,13 @@ defineExpose({
|
|||||||
<swiper class="!size-full" :current="cur" @change="({detail:{current}})=>cur=current">
|
<swiper class="!size-full" :current="cur" @change="({detail:{current}})=>cur=current">
|
||||||
<swiper-item v-for="src in list">
|
<swiper-item v-for="src in list">
|
||||||
<template v-if="!src.endsWith('.mp4')">
|
<template v-if="!src.endsWith('.mp4')">
|
||||||
<image class="!size-full" :src="src" mode="aspectFit"></image>
|
<image @click.stop class="!size-full" :src="src" mode="aspectFit"></image>
|
||||||
<image v-if="sy" class="!size-full !absolute left-0 top-0" :src="SY_ICON"
|
<image @click.stop v-if="sy" class="!size-full !absolute left-0 top-0" :src="SY_ICON"
|
||||||
mode="aspectFit"></image>
|
mode="aspectFit"></image>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<view class="!size-full !flex items-center">
|
<view class="!size-full !flex items-center" @click.stop>
|
||||||
<video class="!w-full" :src="src"></video>
|
<video class="!w-full" :src="src" :controls="true"></video>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ onMounted(() => {
|
|||||||
</view>
|
</view>
|
||||||
<view class="block-info">
|
<view class="block-info">
|
||||||
<view v-if="!dayjs().isBefore(dayjs(data.children?.back[current].back_time))">/</view>
|
<view v-if="!dayjs().isBefore(dayjs(data.children?.back[current].back_time))">/</view>
|
||||||
<x-countdown v-else :time="dayjs(data.children?.back[current].back_time)">
|
<x-countdown v-else :time="data.children?.back[current].back_time">
|
||||||
</x-countdown>
|
</x-countdown>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
Reference in New Issue
Block a user