Commit 4edd65b3 authored by 13841799530's avatar 13841799530

日期问题

解润东
20220513
parent 80d3b42a
Pipeline #8331 passed with stage
in 5 minutes and 2 seconds
...@@ -98,6 +98,8 @@ export default { ...@@ -98,6 +98,8 @@ export default {
}, },
data() { data() {
return { return {
startTime:'',
endTime:'',
date: '', date: '',
id:'',//巡查周期id id:'',//巡查周期id
text: "巡查记录", text: "巡查记录",
...@@ -170,17 +172,19 @@ export default { ...@@ -170,17 +172,19 @@ export default {
this.loading(); this.loading();
}, },
methods: { methods: {
formatDate(date) {
return `${date.getMonth() + 1}/${date.getDate()}`;
},
onConfirm(date) { onConfirm(date) {
const [start, end] = date;
this.show = false; this.show = false;
this.date = `${this.formatDate(start)} - ${this.formatDate(end)}`; this.date=date
}, },
loading(){ loading(){
if(this.date.length){
this.startTime=this.util.timestampToTime(this.date[0],'DT5',true)
this.endTime=this.util.timestampToTime(this.date[1],'DT5',true)
}
var obj={ var obj={
cycle:this.id cycle:this.id,
startTime:this.startTime,
endTime:this.endTime
} }
this.patrolList=[] this.patrolList=[]
getFun('patrol/list',obj).then((res)=>{ getFun('patrol/list',obj).then((res)=>{
...@@ -191,7 +195,7 @@ export default { ...@@ -191,7 +195,7 @@ export default {
}) })
}, },
onSearch(val) { onSearch(val) {
this.getList(this.searchValue); this.loading()
}, },
touchstart(item) { touchstart(item) {
item.show = true item.show = true
......
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