|
|
@@ -24,6 +24,7 @@
|
|
|
class="padding-right"
|
|
|
style="width: 80%"
|
|
|
@change="change($event, 2)"
|
|
|
+ @clear="clear($event, 1)"
|
|
|
clearable
|
|
|
>
|
|
|
<el-option
|
|
|
@@ -44,6 +45,7 @@
|
|
|
class="padding-right"
|
|
|
style="width: 60%"
|
|
|
@change="change($event, 3)"
|
|
|
+ @clear="clear($event, 1)"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in types"
|
|
|
@@ -71,6 +73,14 @@
|
|
|
* 顶部搜索
|
|
|
*/
|
|
|
export default {
|
|
|
+ watch: {
|
|
|
+ time: {
|
|
|
+ handler(val) {
|
|
|
+ this.change(val, 4)
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
query: {
|
|
|
@@ -79,7 +89,7 @@ export default {
|
|
|
timeType: '',
|
|
|
findTime: ''
|
|
|
},
|
|
|
- time: '',
|
|
|
+ time: null,
|
|
|
years: [],
|
|
|
dateType: '计划(实际)开工时间',
|
|
|
types: [
|
|
|
@@ -121,6 +131,9 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ clear(res, type) {
|
|
|
+ console.log(type)
|
|
|
+ },
|
|
|
change(res, type) {
|
|
|
if (type === 1) {
|
|
|
this.query.projectYear = res
|
|
|
@@ -132,7 +145,8 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
} else {
|
|
|
- this.query.findTime = this.time.join(',')
|
|
|
+ console.log(this.time)
|
|
|
+ this.query.findTime = this.time === null ? '' : this.time.join(',')
|
|
|
}
|
|
|
this.$bus.emit('serach', this.query)
|
|
|
}
|