Преглед изворни кода

修改pushobject传给父组件的参数 1-null-null 2-data-null 3-null-data

chauncey пре 1 година
родитељ
комит
f7e0fd2957
1 измењених фајлова са 15 додато и 1 уклоњено
  1. 15 1
      src/views/message/components/PushObject.vue

+ 15 - 1
src/views/message/components/PushObject.vue

@@ -208,7 +208,21 @@ const submitForm = () => {
   return ruleFormRef.value!.validate(() => {});
 };
 const getChildValue = () => {
-  return ruleForm;
+  return {
+    recipientType: ruleForm.recipientType,
+    userGroupList:
+      ruleForm.recipientType === 3
+        ? []
+        : ruleForm.recipientType === 1
+        ? []
+        : ruleForm.userGroupList.map((item) => item),
+    customUserList:
+      ruleForm.recipientType === 2
+        ? []
+        : ruleForm.recipientType === 1
+        ? []
+        : ruleForm.customUserList.map((item) => item.userId),
+  };
 };
 const toggleExpand = (group) => {
   group.isExpand = !group.isExpand;