Эх сурвалжийг харах

高级查询清空表单修改

zhongxiaoyu 2 жил өмнө
parent
commit
1c95744b83

+ 2 - 2
src/views/advancedQuery/views/advancedHome.vue

@@ -1026,11 +1026,11 @@ export default {
     },
     // 查询
     getSearchData(val) {
-      this.clearForm()
       if (this.flightDate[0] === '' || this.flightDate[1] === '' || val === '') {
         this.$message.error('请先输入完整查询信息')
         return
       }
+      this.clearForm()
       // 点击搜索后清除跳转携带的查询信息
       this.$route.query && this.$router.replace(this.$route.path)
       // let searchData = {dataContent:[this.time[0],this.time[1],val]}
@@ -1064,7 +1064,7 @@ export default {
     // 清除表单
     clearForm() {
       Object.keys(this.form).forEach(key => {
-        this.form[key] = ''
+        this.form[key] = ['specialType'].includes(key) ? [] : ''
       })
     },
     // 高级查询-确定