Browse Source

更新高速云查询

develop
little4 2 months ago
parent
commit
5bf89c3ef0
  1. 38
      ruoyi-ui/src/views/JiHeExpressway/pages/service/analysis/search/index.vue

38
ruoyi-ui/src/views/JiHeExpressway/pages/service/analysis/search/index.vue

@ -12,11 +12,11 @@
<!-- 日期选择 -->
<el-date-picker size="mini" class="selectRoad" :clearable="false" v-model="dateTime" style="width: 140px"
:picker-options="pickerOptions" :type="type == 2
? 'date'
? 'dates'
: type == 1
? 'month'
? 'months'
: type == 0
? 'year'
? 'years'
: ''
" placeholder="请选择" />
@ -87,7 +87,7 @@ export default {
}
],
quarter: "2",
dateTime: moment().format("YYYY-MM-DD HH:mm:ss"),
dateTime: [moment().format("YYYY-MM-DD"),moment().format("YYYY-MM-DD")],
dataList: [],
year: "",
@ -101,6 +101,16 @@ export default {
},
created() { },
watch: {
dateTime:{
handler: function(n,o) {
if(n.length>2){
n.shift();
this.dateTime = n;
}
}
},
methods: {
//
@ -134,19 +144,21 @@ export default {
return filter;
},
getStartTime(){
let startTime = "";
let endTime = "";
let thisTime = this.dateTime[0];
let lastTime = this.dateTime[1];
if (this.type == 2) { //
startTime = moment(this.dateTime).format("YYYY-MM-DD 00:00:00");
endTime = moment(this.dateTime).format("YYYY-MM-DD 23:59:59");
// startTime = moment(this.dateTime).format("YYYY-MM-DD 00:00:00");
// endTime = moment(this.dateTime).format("YYYY-MM-DD 23:59:59");
thisTime = moment(this.dateTime[0]).format("YYYY-MM-DD");
lastTime = moment(this.dateTime[1]).format("YYYY-MM-DD");
} else if (this.type == 1) { //
startTime = moment(this.dateTime).format("YYYY-MM-01 00:00:00");
endTime = moment(this.dateTime).endOf('month').format("YYYY-MM-DD 23:59:59");
thisTime = moment(this.dateTime[0]).format("YYYY-MM");
lastTime = moment(this.dateTime[1]).format("YYYY-MM");
} else if (this.type == 0) { //
startTime = moment(this.dateTime).format("YYYY-01-01 00:00:00");
endTime = moment(this.dateTime).format("YYYY-12-31 23:59:59");
thisTime = moment(this.dateTime[0]).format("YYYY");
lastTime = moment(this.dateTime[1]).format("YYYY");
}
return {type: this.type, startTime,endTime}
return {type: this.type, thisTime,lastTime}
},
onReset() {
this.selectId = 1;

Loading…
Cancel
Save