dev_2022-05-11
4 years ago
parent e40ec2d157
commit 3d914ed90d
  1. 14
      src/components/page/dashboard.vue

@ -10,7 +10,7 @@
<el-form label-width="80px">
<div>
<el-form-item label="实验时间" class="userRadio">
<el-radio-group v-model="form.month" @change="getData">
<el-radio-group v-model="month" @change="getData">
<el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{item.name}}</el-radio>
</el-radio-group>
<el-date-picker v-model="date" align="right" unlink-panels type="daterange" style="margin-left: 10px;"
@ -205,7 +205,6 @@ export default {
status: '',
startTime: '',
stopTime: '',
month: '',
searchContent: ''
},
multipleSelection: [],
@ -227,6 +226,7 @@ export default {
name: '近六个月'
}
],
month: '',
date: [],
pageNo: 1,
pageSize: 10,
@ -260,6 +260,14 @@ export default {
}
},
watch: {
month: function(val){
if(val){
let unit = 24 * 60 * 60 * 1000
this.date = [this.formatDate('yyyy-MM-dd',new Date(new Date().getTime() - unit * 30 * val)),this.formatDate('yyyy-MM-dd',new Date(new Date().getTime() + unit))]
}else{
this.date = []
}
},
date: function(val){
if(val){
this.form.startTime = val[0]
@ -299,7 +307,7 @@ export default {
type: this.form.type,
startTime: this.form.startTime,
stopTime: this.form.stopTime,
month: this.form.month,
month: this.month,
searchContent: this.encodeString(this.keyword),
status: this.form.status,
page: this.pageNo,

Loading…
Cancel
Save