浏览代码

活动管理车辆登记

wangwei 3 年之前
父节点
当前提交
6784809435

+ 0 - 5
src/components/Form/src/components/CarArrayCom.vue

@@ -46,12 +46,7 @@
       });
       // 初始化
       function init() {
-        // setTimeout(() => {
-
-        // }, 200);
         nextTick(() => {
-          console.log(`props.value`, props.value);
-          console.log(`props.placeholder`, props.placeholder);
           state.list = props.value;
         });
       }

+ 1 - 3
src/components/Form/src/components/FamilyArrCom.vue

@@ -48,7 +48,7 @@
   };
 
   export default defineComponent({
-    name: 'ArrCom',
+    name: 'FamilyArrCom',
     components: { Input },
     props,
     emits: ['change'],
@@ -62,8 +62,6 @@
 
         // }, 200);
         nextTick(() => {
-          console.log(`props.value`, props.value);
-          console.log(`props.placeholder`, props.placeholder);
           state.list = props.value;
         });
       }

+ 0 - 12
src/views/event/activity/data.ts

@@ -402,18 +402,6 @@ export const schemas: FormSchema[] = [
       };
     },
   },
-  // {
-  //   field: 'car',
-  //   component: 'CarArrayCom',
-  //   label: '车辆登记',
-  //   labelWidth: adaptWidth.labelWidth,
-  //   colProps: {
-  //     span: adaptWidth.elContainer,
-  //   },
-  //   componentProps: {
-  //     placeholder: '车辆登记',
-  //   },
-  // },
   {
     field: 'status',
     component: 'Select',

+ 7 - 3
src/views/event/activity/popup.vue

@@ -68,6 +68,7 @@
           ]);
         } else {
           role.id = 0;
+          data.car = '';
           updateSchema([
             {
               field: 'year',
@@ -94,7 +95,7 @@
           const data = await validate();
           console.log(`确定`, data);
           data.id = role.id;
-          if (data.plan[0]) {
+          if (data.plan && data.plan[0]) {
             const plan: any[] = [];
             data.plan.map((item) => {
               if (item.id) {
@@ -103,7 +104,7 @@
             });
             data.plan = plan.toString();
           }
-          if (data.apply[0]) {
+          if (data.apply && data.apply[0]) {
             const apply: any[] = [];
             data.apply.map((item) => {
               if (item.id) {
@@ -112,7 +113,7 @@
             });
             data.apply = apply.toString();
           }
-          if (data.actual[0]) {
+          if (data.actual && data.actual[0]) {
             const actual: any[] = [];
             data.actual.map((item) => {
               if (item.id) {
@@ -121,6 +122,9 @@
             });
             data.actual = actual.toString();
           }
+          if (data.car) {
+            data.car = JSON.stringify(data.car);
+          }
           data.starttime = moment(data.starttime).unix();
           data.endtime = moment(data.endtime).unix();
           const popupData = { closeModal, data };

+ 1 - 1
src/views/member/person/popup.vue

@@ -76,7 +76,7 @@
           data.family = JSON.stringify(data.family);
           const popupData = { closeModal, data };
           emit('saveData', popupData);
-        } catch (err) {
+        } catch (err: any) {
           error(err.errorFields[0].errors[0]);
         }
       }