Commit 8835c938 authored by 李苏's avatar 李苏 💬

时间戳调整

parent 575e7461
<template> <template>
<DefaultDialog :app='app'> <DefaultDialog :app='app'>
<div v-loading="loading" element-loading-text='正在同步请稍后!' slot="form" style="display: flex;padding: 30px;padding-bottom: 60px;" class="flex-center" > <div v-loading="loading" element-loading-text='正在同步请稍后!' slot="form" style="display: flex;padding: 30px;padding-bottom: 60px;" class="flex-center" >
<RelDatetimerangeV2 :form='form' start='startTime' end='endTime' /> <RelDaterangeV2 :form='form' start='startTime' end='endTime' />
</div> </div>
<div slot="reFooter" class="refooter" > <div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" > <span slot="footer" class="dialog-footer" >
...@@ -25,20 +25,29 @@ ...@@ -25,20 +25,29 @@
} }
}, },
async mounted() { async mounted() {
this.form.endTime=this.getStartOfToday()
this.form.startTime=this.getStartOfToday() - 7*24*60*60*1000
}, },
data() { data() {
return { return {
loading:false, loading:false,
form:{ form:{
startTime:new Date().getTime() - 7*24*60*60*1000, startTime:'',
endTime:new Date().getTime() endTime:''
} }
} }
}, },
methods: { methods: {
getStartOfToday() {
const today = new Date();
// 重置小时、分钟、秒和毫秒为0
today.setHours(0, 0, 0, 0);
return new Date(today).getTime() ;
},
save(){ save(){
if(this.form.startTime&&this.form.endTime){ if(this.form.startTime&&this.form.endTime){
this.$confirm('是否继续该操作?', '提示', { this.$confirm('是否继续该操作?', '提示', {
...@@ -48,7 +57,7 @@ ...@@ -48,7 +57,7 @@
}).then(res=>{ }).then(res=>{
if(this.form.startTime&&this.form.endTime){ if(this.form.startTime&&this.form.endTime){
this.loading=true this.loading=true
this.$post('jxgl/usbjx/sync/jx',this.form).then(res=>{ this.$post('sync/jx',this.form).then(res=>{
if(res.success){ if(res.success){
this.$success('操作成功!') this.$success('操作成功!')
this.loading=false this.loading=false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment