diff --git a/src/views/enm_kilnbase/mgroupData.vue b/src/views/enm_kilnbase/mgroupData.vue index 024732d0..24b53162 100644 --- a/src/views/enm_kilnbase/mgroupData.vue +++ b/src/views/enm_kilnbase/mgroupData.vue @@ -187,17 +187,23 @@ export default { that.$refs.table.queryData(that.query); }, handle_add() {}, - typeChange() { + typeChange(val) { this.query.month_s = ""; this.query.year_s = ""; }, dateChange(val) { console.log(val); - if (this.query.type == "day_s") { - this.query.month_s = val.split("-")[1]; - this.query.year_s = val.split("-")[0]; + if (val !== null) { + if (this.query.type == "day_s") { + this.query.month_s = val.split("-")[1]; + this.query.year_s = val.split("-")[0]; + } else { + this.query.year_s = val; + this.query.month_s = ""; + } } else { - this.query.year_s = val; + this.query.month_s = ""; + this.query.year_s = ""; } this.$refs.table.queryData(this.query); },