Browse Source

fix: 修改默认表单数据,确保状态字段正确初始化

xieyong 1 tuần trước cách đây
mục cha
commit
95a688c124
1 tập tin đã thay đổi với 8 bổ sung và 9 xóa
  1. 8 9
      src/views/technology/route/components/user-search.vue

+ 8 - 9
src/views/technology/route/components/user-search.vue

@@ -89,17 +89,16 @@
   import { getFactoryarea } from '@/api/factoryModel';
   export default {
     data() {
-      // 默认表单数据
-      const defaultWhere = {
-        code: '',
-        name: '',
-        status: 1,
-        produceVersionId: '',
-        factoriesId: ''
-      };
       return {
+        defaultWhere: {
+          code: '',
+          name: '',
+          status: '',
+          produceVersionId: '',
+          factoriesId: ''
+        },
         // 表单数据
-        where: { ...defaultWhere },
+        where: { ...this.defaultWhere },
         statusList: [
           { label: '草稿', value: -1 },
           { label: '失效', value: 0 },