Browse Source

Merge branch 'Inspection' into online

wolyshaw 4 years ago
parent
commit
acb1ceb34b
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/views/main/baseinfo/index.vue

+ 6 - 2
src/views/main/baseinfo/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="container">
-    <save-form inline :model="search" @submit="FetchDetail" @reset="FetchDetail">
+    <save-form inline :model="search" @submit="FetchDetail" @reset="reset">
       <el-form-item prop="year">
         <el-date-picker
           v-model="search.year"
@@ -89,10 +89,14 @@ export default {
     }
   },
   mounted () {
-    this.FetchDetail();
+    this.reset()
     this.$store.dispatch('setBranchs')
   },
   methods: {
+    reset() {
+      this.$set(this.search, 'year', this.$helpers.dayjs())
+      this.FetchDetail()
+    },
     async FetchDetail() {
       const data = {}
       try {