scorpio 2 years ago
parent
commit
f8c5b7caf8
2 changed files with 16 additions and 1 deletions
  1. 3 0
      src/components/industry-picker/index.vue
  2. 13 1
      src/views/home/component/dash.vue

+ 3 - 0
src/components/industry-picker/index.vue

@@ -59,6 +59,9 @@ export default {
         }
       })
       this.$emit('change', tmps)
+    },
+    reset() {
+      this.industry = ''
     }
   }
 }

+ 13 - 1
src/views/home/component/dash.vue

@@ -254,6 +254,7 @@
       title="新增项目"
       :close-on-click-modal="false"
       width="35%"
+      @close="addClose"
     >
       <div v-loading="addLoading">
         <el-form
@@ -324,7 +325,7 @@
               </el-select>
             </el-form-item>
             <el-form-item class="full-width" label="所属行业" prop="dictKey">
-              <industry-picker @change="changeIndustry" />
+              <industry-picker ref="picker" @change="changeIndustry" />
             </el-form-item>
             <el-form-item class="full-width" label="建设内容">
               <el-input
@@ -1044,6 +1045,17 @@ export default {
     },
     changeIndustry(list) {
       this.projectForm.dictKey = list
+    },
+    addClose() {
+      this.projectForm = {
+        name: '',
+        totalAmount: '',
+        tags: '',
+        constructionContent: '',
+        dictKey: '',
+        createDept: ''
+      }
+      this.$refs.picker.reset()
     }
   }
 }