|
@@ -111,7 +111,11 @@
|
|
|
};
|
|
|
},
|
|
|
},
|
|
|
- props: ['list', 'pId', 'selectTimes'],
|
|
|
+ props: {
|
|
|
+ list: Array,
|
|
|
+ pId: [String, Number],
|
|
|
+ selectTimes: Array
|
|
|
+ },
|
|
|
watch: {
|
|
|
list: {
|
|
|
handler(data) {
|
|
@@ -121,23 +125,24 @@
|
|
|
},
|
|
|
selectTimes: {
|
|
|
handler(data) {
|
|
|
+ this.resetData()
|
|
|
if (data.length === 1) {
|
|
|
this.times = [new Date(data[0]), new Date(data[0])]
|
|
|
} else if (data.length === 2) {
|
|
|
this.times = [new Date(data[0]), new Date(data[1])]
|
|
|
}
|
|
|
+ this.searchTab()
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
searchTab() {
|
|
|
let tempTimes = []
|
|
|
- if (this.times[0] === this.times[1]) {
|
|
|
+ if (this.times.length > 0 && this.times[0] === this.times[1]) {
|
|
|
tempTimes = [moment(this.times[0]).format('YYYY-MM-DD')]
|
|
|
- } else {
|
|
|
+ } else if (this.times.length > 0) {
|
|
|
tempTimes = this.times.map(item => moment(item).format('YYYY-MM-DD'))
|
|
|
}
|
|
|
-
|
|
|
const params = {
|
|
|
pageSize: 100,
|
|
|
pageNum: 1,
|
|
@@ -201,7 +206,6 @@
|
|
|
height: 40px;
|
|
|
background: rgba(0, 194, 255, 0.14) !important;
|
|
|
box-shadow: 0px 0px 2px 0px #44f1ff !important;
|
|
|
- // background: red !important;
|
|
|
}
|
|
|
|
|
|
.el-input {
|