...
|
...
|
@@ -7,10 +7,10 @@ |
|
|
</select>
|
|
|
</div>
|
|
|
<div class="panel-col" v-if="params.type==1">
|
|
|
<com-calendar :value.sync="reqTime" :placeholder="'选择时间'" :end="EndDate"></com-calendar>
|
|
|
<com-calendar :value.sync="params.reqTime" :placeholder="'选择时间'" :end="EndDate"></com-calendar>
|
|
|
</div>
|
|
|
<div class="panel-col" v-if="params.type==3">
|
|
|
<com-calendar :format="'yyyy-MM'" :value.sync="reqTime" :end="EndMonth" :placeholder="'选择月份'"></com-calendar>
|
|
|
<com-calendar :format="'yyyy-MM'" :value.sync="params.reqTime" :end="EndDate" :placeholder="'选择月份'"></com-calendar>
|
|
|
</div>
|
|
|
<div class="panel-col" v-if="params.type==2">
|
|
|
<com-calendar :value.sync="params.beginTime" :state="'week'" :placeholder="'开始时间'"></com-calendar>
|
...
|
...
|
@@ -47,21 +47,9 @@ |
|
|
props: {
|
|
|
params: {type: Object, default: {}}
|
|
|
},
|
|
|
data(){
|
|
|
let date=new Date();
|
|
|
date.setDate(date.getDate()-1);
|
|
|
return {
|
|
|
reqTime:util.dateFormat(date, "YYYY-MM-dd")
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
EndDate(){
|
|
|
let date=new Date();
|
|
|
date.setDate(date.getDate()-1);
|
|
|
return [date.getFullYear(),date.getMonth(),date.getDate()].join('-');
|
|
|
},
|
|
|
EndMonth(){
|
|
|
let date=new Date();
|
|
|
return [date.getFullYear(),date.getMonth(),date.getDate()-1].join('-');
|
|
|
},
|
|
|
EndTime(){
|
...
|
...
|
@@ -92,7 +80,7 @@ |
|
|
changeType(){
|
|
|
if (this.params.type == 2) {
|
|
|
//周报:reqTime时间不传
|
|
|
this.reqTime = "";
|
|
|
this.params.reqTime = "";
|
|
|
}
|
|
|
else {
|
|
|
//月报,日报,开始结束时间不传
|
...
|
...
|
|