时间格式修改
This commit is contained in:
parent
b47614a94f
commit
71227bf0a9
|
@ -132,12 +132,13 @@ export default {
|
||||||
const currentDate = new Date();
|
const currentDate = new Date();
|
||||||
currentDate.setTime(currentDate.getTime());
|
currentDate.setTime(currentDate.getTime());
|
||||||
currentDate.setTime(currentDate.getTime() - 24 * 60 * 60 * 1000);
|
currentDate.setTime(currentDate.getTime() - 24 * 60 * 60 * 1000);
|
||||||
|
const yDate = currentDate.getDate() > 9 ? currentDate.getDate(): '0' + currentDate.getDate()
|
||||||
this.preTime =
|
this.preTime =
|
||||||
currentDate.getFullYear() +
|
currentDate.getFullYear() +
|
||||||
"-" +
|
"-" +
|
||||||
((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) +
|
((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) +
|
||||||
"-" +
|
"-" +
|
||||||
currentDate.getDate() +
|
yDate +
|
||||||
" " +
|
" " +
|
||||||
"00:00:00";
|
"00:00:00";
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @Author: hisense.wuhongjian
|
* @Author: hisense.wuhongjian
|
||||||
* @Date: 2022-03-08 14:10:05
|
* @Date: 2022-03-08 14:10:05
|
||||||
* @LastEditors: hisense.wuhongjian
|
* @LastEditors: hisense.wuhongjian
|
||||||
* @LastEditTime: 2022-05-12 18:24:51
|
* @LastEditTime: 2022-08-02 14:31:25
|
||||||
* @Description: 道路治理专题
|
* @Description: 道路治理专题
|
||||||
-->
|
-->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
|
@ -243,11 +243,12 @@ export default {
|
||||||
const currentDate = new Date();
|
const currentDate = new Date();
|
||||||
currentDate.setTime(currentDate.getTime());
|
currentDate.setTime(currentDate.getTime());
|
||||||
this.monthTime = currentDate.getFullYear() + "-" + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) + "-" + "01" + " " + "00:00:00";
|
this.monthTime = currentDate.getFullYear() + "-" + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) + "-" + "01" + " " + "00:00:00";
|
||||||
this.currentTime = currentDate.getFullYear() + "-" + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) + "-" + currentDate.getDate() + " " + "00:00:00";
|
this.currentTime = currentDate.getFullYear() + "-" + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) + "-" + yDate + " " + "00:00:00";
|
||||||
currentDate.setTime(currentDate.getTime() - 24 * 60 * 60 * 1000);
|
currentDate.setTime(currentDate.getTime() - 24 * 60 * 60 * 1000);
|
||||||
this.preTime =currentDate.getFullYear() +"-" + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) + "-" + currentDate.getDate() + " " +"00:00:00";
|
const yDate = currentDate.getDate() > 9 ? currentDate.getDate(): '0' + currentDate.getDate()
|
||||||
|
this.preTime =currentDate.getFullYear() +"-" + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) + "-" + yDate + " " +"00:00:00";
|
||||||
currentDate.setDate(currentDate.getDate() - currentDate.getDay() + 1);
|
currentDate.setDate(currentDate.getDate() - currentDate.getDay() + 1);
|
||||||
this.weekTime =currentDate.getFullYear() + "-" + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) + "-" + currentDate.getDate() + " " + "00:00:00";
|
this.weekTime =currentDate.getFullYear() + "-" + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) + "-" + yDate + " " + "00:00:00";
|
||||||
},
|
},
|
||||||
// 生命周期 - 挂载完成(访问DOM元素)
|
// 生命周期 - 挂载完成(访问DOM元素)
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import dayjs from 'dayjs'
|
||||||
import { selectRaise, getAndSaveRecords, selectNoiceEvent } from '@/api/construction/index'
|
import { selectRaise, getAndSaveRecords, selectNoiceEvent } from '@/api/construction/index'
|
||||||
import { selectWaterPoint,selectWaterCamera,selectReportOrigin } from '@/api/waterPoints'
|
import { selectWaterPoint,selectWaterCamera,selectReportOrigin } from '@/api/waterPoints'
|
||||||
import StatisticalAnalysis from './StatisticalAnalysis.vue'
|
import StatisticalAnalysis from './StatisticalAnalysis.vue'
|
||||||
|
@ -129,12 +130,14 @@ export default {
|
||||||
const currentDate = new Date()
|
const currentDate = new Date()
|
||||||
currentDate.setTime(currentDate.getTime())
|
currentDate.setTime(currentDate.getTime())
|
||||||
currentDate.setTime(currentDate.getTime() - 24 * 60 * 60 * 1000)
|
currentDate.setTime(currentDate.getTime() - 24 * 60 * 60 * 1000)
|
||||||
|
const yMonth = currentDate.getMonth() > 8 ? currentDate.getMonth() + 1: '0' + (currentDate.getMonth()+1)
|
||||||
|
const yDate = currentDate.getDate() > 9 ? currentDate.getDate(): '0' + currentDate.getDate()
|
||||||
this.preTime =
|
this.preTime =
|
||||||
currentDate.getFullYear() +
|
currentDate.getFullYear() +
|
||||||
'-' +
|
'-' +
|
||||||
(currentDate.getMonth() + 1) +
|
yMonth +
|
||||||
'-' +
|
'-' +
|
||||||
currentDate.getDate() +
|
yDate +
|
||||||
' ' +
|
' ' +
|
||||||
'00:00:00'
|
'00:00:00'
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue