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

Loading…
Cancel
Save