task#15348,司机app培训,更新时间取当前时间

This commit is contained in:
2024-10-11 14:48:31 +08:00
parent c9cedc526a
commit 06591b6eb4

View File

@ -31,7 +31,7 @@
<div class="statisticWrap"> <div class="statisticWrap">
<div class="line1"> <div class="line1">
<span>培训统计</span> <span>培训统计</span>
<span>更新时间2023-11-22 90:00:00</span> <span>更新时间{{time}}</span>
</div> </div>
<div class="numWrap"> <div class="numWrap">
<div> <div>
@ -79,6 +79,7 @@
<script> <script>
import {myMixins} from "@/utils/myMixins" import {myMixins} from "@/utils/myMixins"
import {getTrainingList} from "@/api/mine" import {getTrainingList} from "@/api/mine"
import {timeFormat} from "@/utils/common";
export default { export default {
name: "diverTrainDocment", name: "diverTrainDocment",
computed: { computed: {
@ -96,11 +97,13 @@ export default {
showEmpty:false, showEmpty:false,
isLoading:false, isLoading:false,
driverId:'', driverId:'',
time:'',
} }
}, },
mounted() { mounted() {
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
this.driverId = urlParams.get('driverId'); this.driverId = urlParams.get('driverId');
this.time=timeFormat(Date.now())
this.getTrainingList(); this.getTrainingList();
}, },
methods:{ methods:{
@ -135,6 +138,7 @@ export default {
} }
if(result){ if(result){
this.pageList=result[0].materials this.pageList=result[0].materials
this.time=timeFormat(Date.now())
} }
if(this.pageList?.length === 0){ if(this.pageList?.length === 0){
this.showEmpty = true this.showEmpty = true