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

@ -31,7 +31,7 @@ li {
min-height: calc(100vh); min-height: calc(100vh);
padding-bottom: 30px; padding-bottom: 30px;
-webkit-transition: left .3s ease-in-out; -webkit-transition: left .3s ease-in-out;
transition: left .3s ease-in-out; transition: left .3s ease-in-out;
background: #f0f0f0; background: #f0f0f0;
} }

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

Loading…
Cancel
Save